From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37836 invoked by alias); 3 Dec 2018 15:21:27 -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 37818 invoked by uid 89); 3 Dec 2018 15:21:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=concern X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Dec 2018 15:21:25 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DFB72D2BD3 for ; Mon, 3 Dec 2018 15:21:24 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-27.rdu2.redhat.com [10.10.112.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id B72991868F for ; Mon, 3 Dec 2018 15:21:23 +0000 (UTC) From: Jeff Law Openpgp: preference=signencrypt To: gcc-patches Subject: [committed] Fix ICE due to bogus operand predicate in H8 port peepholes Message-ID: <2fa4692d-ce8b-c3d4-c0a2-3ca60a90dc57@redhat.com> Date: Mon, 03 Dec 2018 15:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------A4E973A29CD093CBCABB6172" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00082.txt.bz2 This is a multi-part message in MIME format. --------------A4E973A29CD093CBCABB6172 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-length: 992 This is a bit more interesting than the last H8 fix. The H8 has peepholes to optimize masking a value down to a byte. They rely on using gen_lowpart to extract the low byte value of the source operand which works well on the H8 because accessing the low byte of a reg is particularly cheap. THey also work on memory operands. These peepholes don't really work on symbolic operands. And if one makes it into the peephole we'll abort in gen_lowpart. Anyway, the peepholes currently accept "general_operand", which of course allows those problematical symbolic operands. Changing the operand to "nonimmediate_operand" resolves the issue. Note that compile-time constants aren't really a concern here as the expression would have already been simplified. This fixes a half-dozen failures in the H8 testsuite. More importantly it makes it less likely that a test will suddenly fail because of improvements to constant propagation or forward propagation. Installing on the trunk. Jeff --------------A4E973A29CD093CBCABB6172 Content-Type: text/plain; charset=UTF-8; name="P" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="P" Content-length: 1570 ZGlmZiAtLWdpdCBhL2djYy9DaGFuZ2VMb2cgYi9nY2MvQ2hhbmdlTG9nCmlu ZGV4IGJkZTNjZDRmMDQyLi5iZTBhYWIyYzg3NiAxMDA2NDQKLS0tIGEvZ2Nj L0NoYW5nZUxvZworKysgYi9nY2MvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsOCBA QAorMjAxOC0xMi0wMyAgSmVmZiBMYXcgIDxsYXdAcmVkaGF0LmNvbT4KKwor CSogY29uZmlnL2g4MzAwL2g4MzAwLm1kIChsb3cgYnl0ZSBtYXNraW5nIHBl ZXBob2xlcyk6IE9ubHkgYWNjZXB0CisJbm9uaW1tZWRpYXRlX29wZXJhbmQg Zm9yIHRoZSB0by1iZS1tYXNrZWQgb3BlcmFuZC4KKwogMjAxOC0xMi0wMyAg UmljaGFyZCBCaWVuZXIgIDxyZ3VlbnRoZXJAc3VzZS5kZT4KIAogCSogdHJl ZS1zc2Etc2Njdm4uYyAoZWxpbWluYXRlX2RvbV93YWxrZXI6OmVsaW1pbmF0 ZV9zdG10KTogT25seQpkaWZmIC0tZ2l0IGEvZ2NjL2NvbmZ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