Commit 7aa605c9 by Jakub Jelinek

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  <jakub@redhat.com>

	PR target/94121
	* config/aarch64/aarch64.c (aarch64_add_offset_1): Use gen_int_mode
	instead of GEN_INT.
parent fd867997
2020-03-13 Jakub Jelinek <jakub@redhat.com>
PR target/94121
* config/aarch64/aarch64.c (aarch64_add_offset_1): Use gen_int_mode
instead of GEN_INT.
2020-03-13 H.J. Lu <hongjiu.lu@intel.com> 2020-03-13 H.J. Lu <hongjiu.lu@intel.com>
PR target/89229 PR target/89229
......
...@@ -3757,7 +3757,8 @@ aarch64_add_offset_1 (scalar_int_mode mode, rtx dest, ...@@ -3757,7 +3757,8 @@ aarch64_add_offset_1 (scalar_int_mode mode, rtx dest,
if (emit_move_imm) if (emit_move_imm)
{ {
gcc_assert (temp1 != NULL_RTX || can_create_pseudo_p ()); 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 insn = emit_insn (offset < 0
? gen_sub3_insn (dest, src, temp1) ? gen_sub3_insn (dest, src, temp1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment