From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11601 invoked by alias); 19 May 2017 15:59:49 -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 11589 invoked by uid 89); 19 May 2017 15:59:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:VI1PR08, H*c:HHH X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0082.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 May 2017 15:59:45 +0000 Received: from VI1PR0802MB2176.eurprd08.prod.outlook.com (10.172.12.21) by VI1PR0802MB2175.eurprd08.prod.outlook.com (10.172.12.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 15:59:44 +0000 Received: from VI1PR0802MB2176.eurprd08.prod.outlook.com ([10.172.12.21]) by VI1PR0802MB2176.eurprd08.prod.outlook.com ([10.172.12.21]) with mapi id 15.01.1101.011; Fri, 19 May 2017 15:59:44 +0000 From: Bin Cheng To: "gcc-patches@gcc.gnu.org" CC: nd Subject: [PATCH GCC]Check tieable TRUNCATE only if inner rtx is register Date: Fri, 19 May 2017 16:07:00 -0000 Message-ID: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR0802MB2175;7:80XmCKCd2mmaoSPKh6r9jdZFkuemyCZyoVGtYzj08a2aG640o3vn+lyy7rs77LrbYvYVtDIr0hPrsAN/2fe+IZk2+yC9oKrPg6n4X34EHi3rCH9qM/C3f8WgQ+3VJZunGamjAQy7WfxwGW03J8pvMmDTg5RQpCfjbDiceNiY40XMjLrPv+25xfaceGDqmqZglGprpfybsZkC06QlkmgxBjopMEVU5WUe/ccRvFCg5KResTz+uyWoWVEbC0ahLMUSoXxxRUfbj/riVqg8acOBlLh+QDIQygXgPfYWnX8T3kPw4itq+Y4eHiYPkkRTLzWznySJQPRMoGPERpp4GvpsdA== x-ms-traffictypediagnostic: VI1PR0802MB2175: x-ms-office365-filtering-correlation-id: b8a83bf6-3b81-4ca3-8a7f-08d49ed0114d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:VI1PR0802MB2175; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(102415395)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(6072148);SRVR:VI1PR0802MB2175;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0802MB2175; x-forefront-prvs: 031257FE13 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(39400400002)(39850400002)(39410400002)(39840400002)(39860400002)(377424004)(52314003)(81166006)(8936002)(189998001)(2351001)(74316002)(8676002)(9686003)(99936001)(99286003)(50986999)(478600001)(55016002)(54356999)(6436002)(305945005)(4326008)(6506006)(5640700003)(3660700001)(53936002)(102836003)(3846002)(7736002)(77096006)(5660300001)(72206003)(3280700002)(7696004)(2501003)(66066001)(38730400002)(2900100001)(25786009)(110136004)(33656002)(122556002)(6116002)(2906002)(6916009)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0802MB2175;H:VI1PR0802MB2176.eurprd08.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/mixed; boundary="_002_VI1PR0802MB217616EFF8D5064D6F27F00FE7E50VI1PR0802MB2176_" MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2017 15:59:44.4591 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2175 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg01591.txt.bz2 --_002_VI1PR0802MB217616EFF8D5064D6F27F00FE7E50VI1PR0802MB2176_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1214 Hi, Revision 247881 possibly exposes bug in RTL or ARM backend, while the chang= e itself may be incomplete too. Given a TRUNCATE rtx with complicated sub-rtx, back= end may want to know the complicated sub-rtx happens in context of TRUNCATE in orde= r to give different costs. This patch adds restriction only checking tieable TRUNCAT= E if its operand is register. This is enough for middle-end, it builds up (truncate:SI (reg= :DI)) in order to setup conversion cost for GIMPLE optimizations. On the other hand, targets like = i386/arm don't handle register truncation at the moment. Note, this patch minimize the impact of cost change and workaround PR80754 = for now. So far the effect of change in r247881 is to allow smulsi3_highpart_v6 patt= ern to be used rather than smullsidi, which means it actually gives RA more free in choosi= ng registers. If it's because of the cost change that smulsi3_highpart_v6 is now preferre= d, it could be suggesting that r247881 is good. Anyway, it's just my guess before looking= into rtl passes. Bootstrap and test ongoing. Is it OK? 2017-05-13 Bin Cheng * rtlanal.c (rtx_cost): Check tieable TRUNCATE only if inner rtx is register.= --_002_VI1PR0802MB217616EFF8D5064D6F27F00FE7E50VI1PR0802MB2176_ Content-Type: text/plain; name="pr80754.txt" Content-Description: pr80754.txt Content-Disposition: attachment; filename="pr80754.txt"; size=544; creation-date="Fri, 19 May 2017 15:52:40 GMT"; modification-date="Fri, 19 May 2017 15:52:40 GMT" Content-Transfer-Encoding: base64 Content-length: 741 ZGlmZiAtLWdpdCBhL2djYy9ydGxhbmFsLmMgYi9nY2MvcnRsYW5hbC5jCmlu ZGV4IGQ5ZjU3YzMuLmIyMTFlZmIgMTAwNjQ0Ci0tLSBhL2djYy9ydGxhbmFs LmMKKysrIGIvZ2NjL3J0bGFuYWwuYwpAQCAtNDE2NSw3ICs0MTY1LDEwIEBA IHJ0eF9jb3N0IChydHggeCwgbWFjaGluZV9tb2RlIG1vZGUsIGVudW0gcnR4 X2NvZGUgb3V0ZXJfY29kZSwKICAgICAgIGJyZWFrOwogCiAgICAgY2FzZSBU UlVOQ0FURToKLSAgICAgIGlmIChNT0RFU19USUVBQkxFX1AgKG1vZGUsIEdF VF9NT0RFIChYRVhQICh4LCAwKSkpKQorICAgICAgLyogSWYgaW5uZXIgcnR4 IGlzbid0IHJlZ2lzdGVyLCBmYWxsIHRocm91Z2ggYW5kIGNhbGwgdGFyZ2V0 IGhvb2suCisJIEJhY2tlbmQgbWF5IHdhbnQgdG8ga25vdyB0aGF0IHN1Yi1y dHggaXMgaW4gdHJ1bmNhdGUuICAqLworICAgICAgaWYgKFJFR19QIChYRVhQ ICh4LCAwKSkKKwkgICYmIE1PREVTX1RJRUFCTEVfUCAobW9kZSwgR0VUX01P REUgKFhFWFAgKHgsIDApKSkpCiAJewogCSAgdG90YWwgPSAwOwogCSAgYnJl YWs7Cg== --_002_VI1PR0802MB217616EFF8D5064D6F27F00FE7E50VI1PR0802MB2176_--