From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 7673F38708DF; Thu, 17 Sep 2020 14:25:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7673F38708DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600352707; bh=8WkpuvyB1Tkt20vpQbkopPgB0jPUvunhyc98qndWIPM=; h=From:To:Subject:Date:From; b=f5pjO84wwgCV2e8NhOvoeZ5YAVvcEM5rwgVTR8kLGZ5WOCYrMOUPr3cU70d1QXEF6 Qt/ORa+8IevTmsZoNLl7yLNPYgOEHcsCtv/K0R7Czsv+jsPBV2yCBMHT8U8W24X26l 7gViZ/8eEWGYMKxx0Rw6VKqG+GJVy6VzM8YlBocU= 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 r8-10466] aarch64: Fix another bug in aarch64_add_offset_1 [PR94121] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/releases/gcc-8 X-Git-Oldrev: 7fb0f17a66c8a6f91d82c136954edc181e3df9d3 X-Git-Newrev: ce8325e77d923a11dce089a7ef3a24b4737bf95f Message-Id: <20200917142507.7673F38708DF@sourceware.org> Date: Thu, 17 Sep 2020 14:25:07 +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: Thu, 17 Sep 2020 14:25:07 -0000 https://gcc.gnu.org/g:ce8325e77d923a11dce089a7ef3a24b4737bf95f commit r8-10466-gce8325e77d923a11dce089a7ef3a24b4737bf95f Author: Jakub Jelinek Date: Fri Mar 13 11:33:16 2020 +0100 aarch64: Fix another bug in aarch64_add_offset_1 [PR94121] > I'm getting this ICE with -mabi=ilp32: > > during RTL pass: fwprop1 > /opt/gcc/gcc-20200312/gcc/testsuite/gcc.dg/pr94121.c: In function 'bar': > /opt/gcc/gcc-20200312/gcc/testsuite/gcc.dg/pr94121.c:16:1: internal compiler error: in decompose, at rtl.h:2279 That is a preexisting issue, caused by another bug in the same function. When mode is SImode and moffset is 0x80000000 (or anything else with the bit 31 set), we need to sign-extend it. 2020-03-13 Jakub Jelinek PR target/94121 * config/aarch64/aarch64.c (aarch64_add_offset_1): Use gen_int_mode instead of GEN_INT. (cherry picked from commit c2f836c413b1e9ae45598338b4a2ecd33bd926fb) Diff: --- gcc/config/aarch64/aarch64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 7e16b6c59c3..e20a4ccc6dc 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -2585,7 +2585,8 @@ aarch64_add_offset_1 (scalar_int_mode mode, rtx dest, if (emit_move_imm) { gcc_assert (temp1 != NULL_RTX || can_create_pseudo_p ()); - temp1 = aarch64_force_temporary (mode, temp1, GEN_INT (moffset)); + temp1 = aarch64_force_temporary (mode, temp1, + gen_int_mode (moffset, mode)); } insn = emit_insn (offset < 0 ? gen_sub3_insn (dest, src, temp1)