From patchwork Thu Jan 30 16:52:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1231515 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-518580-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=FRqG0zig; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 487mcV3YfDz9sPn for ; Fri, 31 Jan 2020 03:52:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=hbFU1wnlJJ7HI2SGXH/D/PUyTu6o1d96NkIAJW+ROXMSVOrQg6rUO y8oDn92Y8wnRD6dUNlHEIxA00GRlRMy51LOofKRCK7/Qywcd9KdCySvLfVWcy1W5 O1vjXSP3G7iRRqeWYxkOheCEFkstl4fvOXjDP3EBUxqZhRKFG5QgPo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=fFKbtexpv6tBBL2Ha3eKrnX7u8k=; b=FRqG0zigNM64cGwHq63U wK9oj04bfMthLDEAAK1KxIHehJD/0TqqjcZ/JZaQsXVjzgka6x8ryaG1frGmUZIV uNtA/u+r3WODQpG5fLn0jQUW2hw/OEh5SLHjghIvOMFE1BoUhQ6gwIF1pDS+A60E 9nFhXheCRURsrvIas2BZDP8= Received: (qmail 29226 invoked by alias); 30 Jan 2020 16:52:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29218 invoked by uid 89); 30 Jan 2020 16:52:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2020 16:52:32 +0000 IronPort-SDR: ybMNZob7LZviH28XDsWBvSaO6G8I+zhhULalRYIv4oG3gZt8jqjCWK+mcR+7eNH33bqCWPdona AHcCx2VpqAgDTntyVCLMOtxfb5s2Qn3/AfT8lnZOX9XZ0ECkoWkHnl3GSOrxO8b2ODFJBakYEy KSFNnf2v5aD3mXnWY7//jQF5BRGDJ0dstBIT+0YfK8MN+HE9XvwXvOVsDovHSD9bHTJ5oK69wb Egfkv0y+h2reMCqm2lEl1ZXNX0WNYPOnoHpJiY45j3rdTXBk0fdUmpeokqCaReqmfMRrGsO+tx la4= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 30 Jan 2020 08:52:31 -0800 IronPort-SDR: /USSkCPTYQfkPRaL24a/2HSZ2qFmlMRNXKsMEVvSYmPO3j1yxo186d0/eXS/mEFg2v+ZxbeI4Q CeGJOg4I8IiA== From: Andrew Stubbs Subject: [committed, amdgcn] Add LTGT support To: "gcc-patches@gcc.gnu.org" Message-ID: Date: Thu, 30 Jan 2020 16:52:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 This patch adds support for the LTGT FP comparison operator that was previously missing from the backend, and apparently not optional (unlike UNLE etc). It wasn't that we couldn't have it (also unlike UNLE), we just didn't. Besides just correcting an omission, this also fixes an ICE in testcase gcc.dg/pr81228.c. Andrew Add LTGT operator support for amdgcn Fixes ICE in testcase gcc.dg/pr81228.c 2020-01-30 Andrew Stubbs gcc/ * config/gcn/gcn.c (print_operand): Handle LTGT. * config/gcn/predicates.md (gcn_fp_compare_operator): Allow ltgt. diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index c78df1d5e3e..a39e9f3fbd6 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -5929,6 +5929,9 @@ print_operand (FILE *file, rtx x, int code) case UNORDERED: s = "_u_"; break; + case LTGT: + s = "_lg_"; + break; default: output_operand_lossage ("invalid %%xn code"); return; diff --git a/gcc/config/gcn/predicates.md b/gcc/config/gcn/predicates.md index 2f904b1f131..7bf763a4ba5 100644 --- a/gcc/config/gcn/predicates.md +++ b/gcc/config/gcn/predicates.md @@ -165,7 +165,7 @@ (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu")) (define_predicate "gcn_fp_compare_operator" - (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu,ordered,unordered")) + (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu,ordered,unordered,ltgt")) (define_predicate "unary_operator" (match_code "not,popcount"))