From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92662 invoked by alias); 21 Jul 2015 09:15:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 92652 invoked by uid 89); 21 Jul 2015 09:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: na01-by2-obe.outbound.protection.outlook.com Received: from mail-by2on0080.outbound.protection.outlook.com (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.100.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 21 Jul 2015 09:15:34 +0000 Received: from SN2PR0701MB1024.namprd07.prod.outlook.com (10.160.57.150) by BY1PR0701MB1237.namprd07.prod.outlook.com (10.160.105.156) with Microsoft SMTP Server (TLS) id 15.1.213.14; Tue, 21 Jul 2015 09:15:32 +0000 Received: from SN2PR0701MB1024.namprd07.prod.outlook.com ([10.160.57.150]) by SN2PR0701MB1024.namprd07.prod.outlook.com ([10.160.57.150]) with mapi id 15.01.0213.021; Tue, 21 Jul 2015 09:15:31 +0000 From: "Hurugalawadi, Naveen" To: "gcc-patches@gcc.gnu.org" CC: "Pinski, Andrew" Subject: Fold some equal to and not equal to patterns in match.pd Date: Tue, 21 Jul 2015 09:16:00 -0000 Message-ID: authentication-results: caviumnetworks.com; dkim=none (message not signed) header.d=none; x-microsoft-exchange-diagnostics: 1;BY1PR0701MB1237;5:i2zCYFsFj1/GDav6EVW/+jC8UaV3VAdJdRMTXNSzZqL7j6SqJVuZpVn4T0sr4FmyjUMPkf8zHBnPFZ0SCRzW1icAo79SeSYd6LK06Dx47Og6COCjVRenapy7/8LT6KlK8THbprZxNjxA1R9px03KJA==;24:GqdRoYHSpCxMPJm/r+9itoGWjHtaM4dG1Y2YMDdYpHFwsequu9lEVN+qjJjF5ZixSIGq9hLWHwkTzStK5i78+XcT/PAGmbfSOKGgj+FazzI=;20:IDAxby8S0vwDIjmjHfLtcBUlMvvimTlOrcnHG9ZNBnGYlZglN+q1fX9BMydp7/I9clNJYJxDmxxrFDeTiA4DLw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1237; by1pr0701mb1237: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY1PR0701MB1237;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1237; x-forefront-prvs: 0644578634 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(6009001)(377424004)(54534003)(99286002)(2900100001)(92566002)(107886002)(102836002)(46102003)(110136002)(5001960100002)(122556002)(77096005)(2501003)(5002640100001)(450100001)(62966003)(77156002)(106116001)(5890100001)(189998001)(40100003)(229853001)(19580395003)(19580405001)(99936001)(2351001)(2656002)(87936001)(76576001)(86362001)(5001920100001)(33656002)(50986999)(54356999)(66066001)(74316001)(4001430100001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1237;H:SN2PR0701MB1024.namprd07.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; Content-Type: multipart/mixed; boundary="_002_DM2PR0701MB1018928F9138DEBCB2A0E9108E840DM2PR0701MB1018_" MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2015 09:15:31.1848 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1237 X-SW-Source: 2015-07/txt/msg01712.txt.bz2 --_002_DM2PR0701MB1018928F9138DEBCB2A0E9108E840DM2PR0701MB1018_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1037 Hi, Please find attached the patch which performs following patterns folding in match.pd:- a =3D=3D/!=3D a p+ b to b =3D=3D/!=3D 0. a << N =3D=3D/!=3D 0 to a&(-1>>N) =3D=3D/!=3D 0. a * N =3D=3D/!=3D 0 where N is a power of 2 to a & (-1< * testsuite/gcc.dg/tree-ssa/compare-shiftmult-1.c: New testcase. * testsuite/gcc.dg/tree-ssa/compare_pointers-1.c: New testcase. gcc/ChangeLog: 2015-01-21 Andrew Pinski * match.pd (define_predicates): Add integer_pow2p. Add pattern for folding of a =3D=3D/!=3D a p+ b to b =3D=3D/!=3D 0. (unsigned_integral_valued_p): New match. Add pattern for folding of a<>N) =3D=3D/!=3D 0. Add pattern for folding of a*N =3D=3D/!=3D 0 where N is a power of 2 to a&(-1<