diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2018-11-07 06:25:30 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2018-11-07 06:25:30 +0000 |
commit | 59193b1bdf0b0d707d3a21b006d3cb9d3fec7013 (patch) | |
tree | baa2a3a8ccecccdcb8110541d7a9f419fc409709 /gcc/lra.c | |
parent | 513c11068ff08576975039c37d6d6f7192f8f190 (diff) | |
download | gcc-59193b1bdf0b0d707d3a21b006d3cb9d3fec7013.zip gcc-59193b1bdf0b0d707d3a21b006d3cb9d3fec7013.tar.gz gcc-59193b1bdf0b0d707d3a21b006d3cb9d3fec7013.tar.bz2 |
[PR87874] avoid const-wide-int subreg in LRA
Just like CONST_INT, CONST_WIDE_INT is VOIDmode, so LRA might be
tempted to build a SUBREG to "convert" it to the wanted mode. That's
no use. Test for CONST_SCALAR_INT_P instead of CONST_INT_P so that we
skip the subreg creation for both.
for gcc/ChangeLog
PR rtl-optimization/87874
* lra.c (lra_substitute_pseudo): Do not create a subreg for
const wide ints.
for gcc/testsuite/ChangeLog
PR rtl-optimization/87874
* gcc.dg/pr87874.c: New.
From-SVN: r265860
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1961,7 +1961,7 @@ lra_substitute_pseudo (rtx *loc, int old_regno, rtx new_reg, bool subreg_p, machine_mode inner_mode = GET_MODE (new_reg); if (mode != inner_mode - && ! (CONST_INT_P (new_reg) && SCALAR_INT_MODE_P (mode))) + && ! (CONST_SCALAR_INT_P (new_reg) && SCALAR_INT_MODE_P (mode))) { poly_uint64 offset = 0; if (partial_subreg_p (mode, inner_mode) |