From patchwork Thu Nov 17 09:26:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 82682 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp766303obn; Thu, 17 Nov 2016 01:27:04 -0800 (PST) X-Received: by 10.98.70.150 with SMTP id o22mr3436573pfi.134.1479374824010; Thu, 17 Nov 2016 01:27:04 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id c17si2436003pgi.292.2016.11.17.01.27.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 01:27:04 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-441776-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-441776-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-441776-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=mEslESZYupkUvcbZk31g+vx9BeW+IGczPQ5Dsy/Yn6A k56pIOWHcDTEKWmkna38hATytlcPn53o8xV8eDTAD5IF3FYUmfJMERvAGHr//vrt Mr6a/mREQe7TDHnkBBvOkMYsh+V/qpKkr10ElqXibu617enEfF6AxnoSejxqq7sk = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=lZG7IRb3HR8UANSdgQGtt9/baQg=; b=bew2g4ONEBFTCec4V 5XIA/czptQYZVKQ8G2Ar/CKal4Uj5lca3zNK7XOPsgSFlryjj+NnGmbMwv7UIyEg GPMq1y2GZo8DfpEEyDQ93xTWPO6N7NeH+TfIO9wKZyuo7GT4e0mleSFNBjCzUKsx PLkLAhYjkrdv27yKbOExseyji4= Received: (qmail 70923 invoked by alias); 17 Nov 2016 09:26:49 -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 70914 invoked by uid 89); 17 Nov 2016 09:26:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:2076, match_code, family, 2016-11-17 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Nov 2016 09:26:39 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D026028; Thu, 17 Nov 2016 01:26:37 -0800 (PST) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1AE0E3F318; Thu, 17 Nov 2016 01:26:36 -0800 (PST) Message-ID: <582D77CB.9090606@foss.arm.com> Date: Thu, 17 Nov 2016 09:26:35 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft , Richard Earnshaw , James Greenhalgh Subject: [PATCH][AArch64] Fix gcc.dg/torture/float32-builtin.c with RTL checking Hi all, Testing with RTL checking enabled showed another failure in gcc.dg/torture/float32-builtin.c. aarch64_float_const_zero_rtx_p was passed down a complex subreg expression during combine/recog. The pattern was supposed to reject that expression but it made its way to aarch64_float_const_zero_rtx_p which is only supposed to handle CONST_DOUBLEs. The culprit is the aarch64_reg_or_fp_zero predicate that restricts the accepted codes to reg,subreg,const_double but passes down anything that is not a reg into aarch64_float_const_zero_rtx_p. That includes SUBREGs that do not match register_operand, which we want to reject. This patch checks that the argument is a CONST_DOUBLE before passing it to aarch64_float_const_zero_rtx_p Bootstrapped and tested on aarch64-none-linux-gnu with RTL checking enabled. Ok for trunk? Thanks, Kyrill P.S. This predicate is only used in the store-pair family of patterns. 2016-11-17 Kyrylo Tkachov * config/aarch64/predicates.md (aarch64_reg_or_fp_zero): Check for const_double code before calling aarch64_float_const_zero_rtx_p. commit 950f8638a894aa699d1743fc3277b0aee3009fb7 Author: Kyrylo Tkachov Date: Tue Nov 15 16:04:39 2016 +0000 [AArch64] Fix gcc.dg/torture/float32-builtin.c with RTL checking diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index ebda6d8..0671cc8 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -54,9 +54,9 @@ (define_predicate "aarch64_reg_or_zero" (match_test "op == const0_rtx")))) (define_predicate "aarch64_reg_or_fp_zero" - (and (match_code "reg,subreg,const_double") - (ior (match_operand 0 "register_operand") - (match_test "aarch64_float_const_zero_rtx_p (op)")))) + (ior (match_operand 0 "register_operand") + (and (match_code "const_double") + (match_test "aarch64_float_const_zero_rtx_p (op)")))) (define_predicate "aarch64_reg_zero_or_m1_or_1" (and (match_code "reg,subreg,const_int")