[RS6000] ICE in decompose, at rtl.h:2282
authorAlan Modra <amodra@gmail.com>
Thu, 1 Oct 2020 09:44:09 +0000 (19:14 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 1 Oct 2020 23:06:25 +0000 (08:36 +0930)
commit4c69e61f4307865b95151006e480ae2022b30454
treeefcf3a1081fe6d6ad8d3080f989a7148e8e04dad
parentd26cc5885a491dedad0bdf3468a7b91c1f75a868
[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.
gcc/config/rs6000/rs6000.c