From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58078 invoked by alias); 26 Jul 2016 17:32:29 -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 58069 invoked by uid 89); 26 Jul 2016 17:32:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=1047, Cristina, cristina, H*MI:eurprd07 X-HELO: BLU004-OMC4S2.hotmail.com Received: from blu004-omc4s2.hotmail.com (HELO BLU004-OMC4S2.hotmail.com) (65.55.111.141) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 26 Jul 2016 17:32:18 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com ([65.55.111.136]) by BLU004-OMC4S2.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 26 Jul 2016 10:32:17 -0700 Received: from HE1EUR01FT008.eop-EUR01.prod.protection.outlook.com (10.152.0.59) by HE1EUR01HT028.eop-EUR01.prod.protection.outlook.com (10.152.1.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.5; Tue, 26 Jul 2016 17:32:15 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com (10.152.0.54) by HE1EUR01FT008.mail.protection.outlook.com (10.152.1.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.5 via Frontend Transport; Tue, 26 Jul 2016 17:32:14 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) by AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) with mapi id 15.01.0549.016; Tue, 26 Jul 2016 17:32:12 +0000 From: Bernd Edlinger To: GCC Patches CC: Eric Botcazou , Bernd Schmidt , Segher Boessenkool , Andreas Schwab , Tamar Christina Subject: [PATCH] Fix wrong code on aarch64 due to paradoxical subreg Date: Tue, 26 Jul 2016 17:32:00 -0000 Message-ID: authentication-results: spf=softfail (sender IP is 10.152.0.54) smtp.mailfrom=hotmail.de; adacore.com; dkim=none (message not signed) header.d=none;adacore.com; dmarc=none action=none header.from=hotmail.de; received-spf: SoftFail (protection.outlook.com: domain of transitioning hotmail.de discourages use of 10.152.0.54 as permitted sender) x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [k8tfaFSzShKqjyVn4xTQM1/HjSogdRmP] x-eopattributedmessage: 0 x-forefront-antispam-report: CIP:10.152.0.54;IPV:NLI;CTRY:;EFV:NLI;SFV:NSPM;SFS:(10019020)(98900003);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1EUR01HT028;H:AM4PR0701MB2162.eurprd07.prod.outlook.com;FPR:;SPF:None;LANG:en; x-microsoft-exchange-diagnostics: 1;HE1EUR01HT028;5:8KfRMl5/BU2Y+T9GMGYlVIXv8AIbUEC5tCBphDF1tQyocrzF6kfa50wPeQeiiisF8Ee6xop+alQWSnrVcrGYUfNFsQu99sruzYLgoP4UCA8gAXb0hFt/xwsd4Sa4mHcnynhluU8oCWN/vH3GLB5gEg==;24:uHhpMiJOdtTC2h4ZTj/Z7CteqrbA0MG0OHZDWWx++ttkavEf5lZvUgZrp8SzxJ5e4NL2v+OOCqE7UALEq5Af+Hp+kmYCVVKCJ8XQEGVR0wI=;7:yK/OAbs9XmsIqUj21D2I2Ri1wI919sz2Te2rlQnFdqO8NBZk5a5oRQrfsguf/caBFQCYddhlD7CNUvVZOozE+yFwIDADJctV3KEUbcOUbWARB1fT9MGqxpCGQIo+yrD6hvsuJPQ03VCxCmXyqqefWT3PjG4wlQhBHShLXH3cxjgDl7z2FpgBNkJQTiizMcHvNvYVZurGaqoN2M4gx1zEgcoJb21buyMH2K7bckgi/f/YJB245t+9V6n5Cp4JEkAD x-ms-office365-filtering-correlation-id: aa244c22-dea4-4635-2ed2-08d3b57ac78a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(1601124038)(1601125047);SRVR:HE1EUR01HT028; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(432015012)(102415321)(82015046);SRVR:HE1EUR01HT028;BCL:0;PCL:0;RULEID:;SRVR:HE1EUR01HT028; x-forefront-prvs: 00159D1518 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/mixed; boundary="_002_AM4PR0701MB21624450BD0047719BD173B7E40E0AM4PR0701MB2162_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2016 17:32:12.6810 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT028 X-SW-Source: 2016-07/txt/msg01742.txt.bz2 --_002_AM4PR0701MB21624450BD0047719BD173B7E40E0AM4PR0701MB2162_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1252 Hi! As described in PR 71779 and PR 70903 we have a wrong code issue on aarch64 which is triggered by a paradoxical subreg that can be created in store_bit_field_using_insv when the target has an EP_insv bitfield instruct= ion. The attached patch changes this insn... (insn 1047 1046 1048 (set (reg:DI 481) (subreg:DI (reg/f:SI 479) 0)) y.c:12702 -1 (nil)) ... into a more simple insn: (insn 1047 1046 1048 (set (reg:DI 479) (zero_extend:DI (reg:SI 480))) isl_input.c:2496 -1 (nil)) which manages to fix two bugs at the same time. The patch does not include a test case, as I was looking at the PR 71779 just by curiosity, and I have only a theoretical interest in aarch64. Howev= er, it should be easy to extract one from PR 70903 at least, but I can't do tha= t by myself. Therefore I would like to leave the test case(s) to Cristina Tamar from ARM, and/or Andreas Schwab, who have also helped out with bootstrapping and reg-testing on aarch64 and aarch64-ilp32. Bootstrap and reg-test on x86_64-linux-gnu with no regressions. Successfully bootstrapped on aarch64_ilp32 and the ISL testsuite passes. Also successfully bootstrapped on an aarch64 juno board and no regressions. Is it OK for trunk? Thanks Bernd.= --_002_AM4PR0701MB21624450BD0047719BD173B7E40E0AM4PR0701MB2162_ Content-Type: text/x-patch; name="patch-pr71779.diff" Content-Description: patch-pr71779.diff Content-Disposition: attachment; filename="patch-pr71779.diff"; size=917; creation-date="Tue, 26 Jul 2016 16:54:32 GMT"; modification-date="Tue, 26 Jul 2016 16:54:32 GMT" Content-Transfer-Encoding: base64 Content-length: 1245 MjAxNi0wNy0yNSAgQmVybmQgRWRsaW5nZXIgIDxiZXJuZC5lZGxpbmdlckBo b3RtYWlsLmRlPgoKCVBSIHJ0bC1vcHRpbWl6YXRpb24vNzE3NzkKCVBSIHJ0 bC1vcHRpbWl6YXRpb24vNzA5MDMKCSogZXhwbWVkLmMgKHN0b3JlX2JpdF9m aWVsZF91c2luZ19pbnN2KTogRG9uJ3QgZ2VuZXJhdGUgYSBwYXJhZG94aWNh bAoJc3VicmVnLgoKSW5kZXg6IGdjYy9jYWxscy5jCkluZGV4OiBleHBtZWQu Ywo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBleHBtZWQuYwkocmV2aXNp b24gMjM4Njk0KQorKysgZXhwbWVkLmMJKHdvcmtpbmcgY29weSkKQEAgLTY2 NCwxNCArNjY0LDcgQEAgc3RvcmVfYml0X2ZpZWxkX3VzaW5nX2luc3YgKGNv bnN0IGV4dHJhY3Rpb25faW5zbgogCSAgICAgaWYgd2UgbXVzdCBuYXJyb3cg aXQsIGJlIHN1cmUgd2UgZG8gaXQgY29ycmVjdGx5LiAgKi8KIAogCSAgaWYg KEdFVF9NT0RFX1NJWkUgKEdFVF9NT0RFICh2YWx1ZSkpIDwgR0VUX01PREVf U0laRSAob3BfbW9kZSkpCi0JICAgIHsKLQkgICAgICB0bXAgPSBzaW1wbGlm eV9zdWJyZWcgKG9wX21vZGUsIHZhbHVlMSwgR0VUX01PREUgKHZhbHVlKSwg MCk7Ci0JICAgICAgaWYgKCEgdG1wKQotCQl0bXAgPSBzaW1wbGlmeV9nZW5f c3VicmVnIChvcF9tb2RlLAotCQkJCQkgICBmb3JjZV9yZWcgKEdFVF9NT0RF ICh2YWx1ZSksCi0JCQkJCQkgICAgICB2YWx1ZTEpLAotCQkJCQkgICBHRVRf TU9ERSAodmFsdWUpLCAwKTsKLQkgICAgfQorCSAgICB0bXAgPSBjb252ZXJ0 X3RvX21vZGUgKG9wX21vZGUsIHZhbHVlMSwgMSk7CiAJICBlbHNlCiAJICAg IHsKIAkgICAgICB0bXAgPSBnZW5fbG93cGFydF9pZl9wb3NzaWJsZSAob3Bf bW9kZSwgdmFsdWUxKTsKCgo= --_002_AM4PR0701MB21624450BD0047719BD173B7E40E0AM4PR0701MB2162_--