S/390: Reject invalid Q/R/S/T addresses after LRA
The following insn: (insn (set (reg:DI %r2) (sign_extend:DI (mem:SI (const:DI (plus:DI (symbol_ref:DI ("*.LC0")) (const_int 16))))))) is correctly recognized by LRA as RIL alternative of extendsidi2 define_insn. However, when recognition runs after LRA, it returns RXY alternative, which is incorrect, since the offset 16 points past the end of of *.LC0 literal pool entry. Such addresses are normally rejected by s390_decompose_address (). This inconsistency confuses annotate_constant_pool_refs: the selected alternative makes it proceed with annotation, only to find that the annotated address is invalid, causing ICE. This patch fixes the root cause, namely, that s390_check_qrst_address () behaves differently during and after LRA. gcc/ChangeLog: 2019-02-12 Ilya Leoshkevich <iii@linux.ibm.com> PR target/89233 * config/s390/s390.c (s390_decompose_address): Update comment. (s390_check_qrst_address): Reject invalid address forms after LRA. gcc/testsuite/ChangeLog: 2019-02-12 Ilya Leoshkevich <iii@linux.ibm.com> PR target/89233 * gcc.target/s390/pr89233.c: New test. From-SVN: r268798
Showing
gcc/testsuite/gcc.target/s390/pr89233.c
0 → 100644
Please
register
or
sign in
to comment