From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125934 invoked by alias); 19 Aug 2015 04:53:07 -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 125914 invoked by uid 89); 19 Aug 2015 04:53:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: na01-bl2-obe.outbound.protection.outlook.com Received: from mail-bl2on0078.outbound.protection.outlook.com (HELO na01-bl2-obe.outbound.protection.outlook.com) (65.55.169.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Wed, 19 Aug 2015 04:53:05 +0000 Received: from SN2PR0701MB1024.namprd07.prod.outlook.com (10.160.57.150) by SN2PR0701MB1024.namprd07.prod.outlook.com (10.160.57.150) with Microsoft SMTP Server (TLS) id 15.1.231.21; Wed, 19 Aug 2015 04:53:02 +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.0231.024; Wed, 19 Aug 2015 04:53:02 +0000 From: "Hurugalawadi, Naveen" To: Richard Biener CC: "gcc-patches@gcc.gnu.org" , "marc.glisse@inria.fr" Subject: Re: Move some flag_unsafe_math_optimizations using simplify and match Date: Wed, 19 Aug 2015 06:47:00 -0000 Message-ID: References: , In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Naveen.Hurugalawadi@caviumnetworks.com; x-microsoft-exchange-diagnostics: 1;SN2PR0701MB1024;5:v2TlCjlOg+i38j8KHz/wE/11oDPa0MD2LA4kwl1Yuhs+Usjyehps7+HfuCEUtrs96WcUMgu9oLgPbLtpwkkMx4odSmi2+bfyQmaBxuGqyzCsEsI0fNb2wwkeK142grGDqpJdUSEyTFYUi5Vpszbp0w==;24:+iVoMQJe9l8TL9HdgJn4GHg7C9M2eov1YPook09Tng7exe3nVaV9Tk1p925VPMTZI9ktqd31356rfEvk+GxO9A1912CiTqcfPqYRCAgdrZw=;20:gSkytepd1EViyfE9cHqY2uhHUHLMcs6nh8cU1Mv4RkMKkEa02nd1UQ5lpZKPuPmo1vP7V7uIZjmeqOQgHu6n6w== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR0701MB1024; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:SN2PR0701MB1024;BCL:0;PCL:0;RULEID:;SRVR:SN2PR0701MB1024; x-forefront-prvs: 0673F5BE31 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(6009001)(199003)(164054003)(189002)(64706001)(189998001)(87936001)(86362001)(101416001)(46102003)(122556002)(66066001)(40100003)(2656002)(62966003)(5002640100001)(92566002)(77156002)(4001540100001)(19580405001)(105586002)(106116001)(54356999)(99286002)(15975445007)(97736004)(102836002)(5001830100001)(19580395003)(77096005)(10400500002)(81156007)(5003600100002)(33656002)(68736005)(2950100001)(74316001)(5001960100002)(2900100001)(110136002)(5001860100001)(106356001)(76176999)(76576001)(50986999)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN2PR0701MB1024;H:SN2PR0701MB1024.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Aug 2015 04:53:01.5521 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1024 X-SW-Source: 2015-08/txt/msg01044.txt.bz2 Hi Richard, Thanks very much for your review and comments. >> Can you point me to which patterns exhibit this behavior?=20=20 root(x)*root(y) as root(x*y) expN(x)*expN(y) as expN(x+y) pow(x,y)*pow(x,z) as pow(x,y+z) x/expN(y) into x*expN(-y) Long Double and Float variants FAIL with segmentation fault with these patterns in match.pd file for AArch64. However, most of these work as expected with X86_64. I had those implemented as per the fold-const.c which can be found at:- https://gcc.gnu.org/ml/gcc/2015-08/msg00021.html >> (mult (SQRT@1 @0) @1) Sorry for the typo in there. However, the current pattern does not generate the optimized pattern as exp= ected. x_2 =3D ABS_EXPR ; return x_2; >> use (rdiv (POW @0 REAL_CST@1) @0) It generates ICE with the above modification internal compiler error: tree check: expected ssa_name, have var_decl in si= mplify_builtin_call, at tree-ssa-forwprop.c:1259 Also, can you please explain me the significance and use of ":s" I could understand it a bit but still confused about its use in match.pd Thanks, Naveen