From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id C9D453A9F45B; Fri, 23 Apr 2021 10:16:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9D453A9F45B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] [RS6000] ICE in decompose, at rtl.h:2282 X-Act-Checkin: gcc X-Git-Author: Alan Modra X-Git-Refname: refs/vendors/redhat/heads/gcc-8-branch X-Git-Oldrev: 14e259ed86e544e2094f407f68b0202a90263b9b X-Git-Newrev: 436cd7f941543feac0a68061e507a22bc80e9f26 Message-Id: <20210423101612.C9D453A9F45B@sourceware.org> Date: Fri, 23 Apr 2021 10:16:12 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2021 10:16:12 -0000 https://gcc.gnu.org/g:436cd7f941543feac0a68061e507a22bc80e9f26 commit 436cd7f941543feac0a68061e507a22bc80e9f26 Author: Alan Modra Date: Thu Oct 1 19:14:09 2020 +0930 [RS6000] ICE in decompose, at rtl.h:2282 during RTL pass: fwprop1 gcc.dg/pr82596.c: In function 'test_cststring': gcc.dg/pr82596.c:27:1: internal compiler error: in decompose, at rtl.h:2282 -m32 gcc/testsuite/gcc.dg/pr82596.c fails along with other tests after applying rtx_cost patches, which exposed a backend bug. legitimize_address when presented with the following address (plus (reg) (const_int 0x7ffffffff)) attempts to rewrite it as a high/low sum. The low part is 0xffff, or -1, making the high part 0x80000000. But this is no longer canonical for SImode. * config/rs6000/rs6000.c (rs6000_legitimize_address): Use gen_int_mode for high part of address constant. (cherry picked from commit 4c69e61f4307865b95151006e480ae2022b30454) Diff: --- gcc/config/rs6000/rs6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 42bbfd1acb8..be8c76edf73 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -8967,7 +8967,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, low_int = 0; high_int = INTVAL (XEXP (x, 1)) - low_int; sum = force_operand (gen_rtx_PLUS (Pmode, XEXP (x, 0), - GEN_INT (high_int)), 0); + gen_int_mode (high_int, Pmode)), 0); return plus_constant (Pmode, sum, low_int); } else if (GET_CODE (x) == PLUS