From patchwork Wed Aug 3 22:08:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 73228 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1080142qga; Wed, 3 Aug 2016 15:08:56 -0700 (PDT) X-Received: by 10.66.233.38 with SMTP id tt6mr118847273pac.99.1470262136663; Wed, 03 Aug 2016 15:08:56 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id h128si10833866pfb.176.2016.08.03.15.08.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 15:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-433121-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-433121-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-433121-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=qV5nqoKnC/z1PLtzBAVL+bhF0lsc6AGT8UQYYCF5sszMct ym/MOOTBlGcMjxTkY5EbeswrS0ioHlkI5V+w+qxvkoz08k0+jKWTY6uK0mgBYHaT Ykw+s/mC0lVEv+klPsz7k4hhWO432pi2599226w87zZnOa27tFFcHCO0iFRKU= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=F5ExUx8aznCRANUWSHYY/VoczcU=; b=BJBgY9R7DPy6MwCsu7nv U7YMsxPFIEp8aJJ7ciLoz3jS4eijfZmSzDCYjV9nyXnBWj1RI420m+BxbxExUDzL OA81wS//Po3Ep+iyPqvv3jooAI8lFqYbLboAMpinp7AaWxye3Bavo98Hq5kxb75M 5CunACZ1hGngEhTw/W8slh0= Received: (qmail 89995 invoked by alias); 3 Aug 2016 22:08:39 -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 89928 invoked by uid 89); 3 Aug 2016 22:08:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=2016-08-04, 20160804, Cross X-HELO: mail-it0-f46.google.com Received: from mail-it0-f46.google.com (HELO mail-it0-f46.google.com) (209.85.214.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 03 Aug 2016 22:08:28 +0000 Received: by mail-it0-f46.google.com with SMTP id f6so308390028ith.1 for ; Wed, 03 Aug 2016 15:08:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NYOjsA+5fPhXcapZR2pLXSdr+dAiQEcuvEe8Z5Wn5pE=; b=Bzrq1qo8nU75ldn79vLfePTbj1mwjk8RfNUd7wE19mMMyYYdD+EiH+9uyoISC9Ga6S qPhKieauvHD7gtBm3JFzemp8GZeRd8gXRArTK9kcJuDXdCwl7dm4VGIS9TSqkeSeFZpd 9DjWI+JdF3qj4x+Sqz+wmQCOwpPM0rMjbdHacEnc4+CaQcyWdPg94BOUHqgFTdeyYvKY EO+t0NbcYwH1kcsJalGM4vVthxjJwqISDYPtnjR9HUiJvKfMa6n+Ob5qTXXEmb1Cl58F hfizSZ7TiEiKER08S+OXKZ9C9PRrAmzXVvrFmjv4v/QUUrl5FBZcTiFPxppsfHvbqMQg fykg== X-Gm-Message-State: AEkooutWwahybCQT/lMRo1A60WOm8cq4f/5V4lz4H9IrOqBZO662mzA/tEA/89TNfqaR7YcJpnwf4DCtToKNZYOi X-Received: by 10.36.130.135 with SMTP id t129mr25706647itd.31.1470262106955; Wed, 03 Aug 2016 15:08:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.208.18 with HTTP; Wed, 3 Aug 2016 15:08:26 -0700 (PDT) From: Prathamesh Kulkarni Date: Thu, 4 Aug 2016 03:38:26 +0530 Message-ID: Subject: fix fallout of pr22051-2.c on arm To: Richard Biener , matthew.wahab@foss.arm.com, gcc Patches X-IsSubscribed: yes Hi, The attached patch fixes pr22051-2.c which regressed due to r238754. Matthew, could you please confirm if this patch fixes the test-case for you ? Bootstrapped and tested on x86_64-unknown-linux-gnu. Cross tested on arm*-*-*. OK for trunk ? Thanks, Prathamesh 2016-08-04 Prathamesh Kulkarni * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Disable transform if operand's type is pointer to function. diff --git a/gcc/match.pd b/gcc/match.pd index 2380d90..9b97aac 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -2532,8 +2532,10 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (for cmp (ne eq) (simplify (cmp (convert @0) INTEGER_CST@1) - (if ((POINTER_TYPE_P (TREE_TYPE (@0)) && INTEGRAL_TYPE_P (TREE_TYPE (@1))) - || (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && POINTER_TYPE_P (TREE_TYPE (@1)))) + (if ((POINTER_TYPE_P (TREE_TYPE (@0)) && !FUNCTION_POINTER_TYPE_P (TREE_TYPE (@0)) + && INTEGRAL_TYPE_P (TREE_TYPE (@1))) + || (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && POINTER_TYPE_P (TREE_TYPE (@1)) + && !FUNCTION_POINTER_TYPE_P (TREE_TYPE (@1)))) (cmp @0 (convert @1))))) /* Non-equality compare simplifications from fold_binary */