https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87874
--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> --- Author: aoliva Date: Wed Nov 7 06:25:30 2018 New Revision: 265860 URL: https://gcc.gnu.org/viewcvs?rev=265860&root=gcc&view=rev Log: [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. Added: trunk/gcc/testsuite/gcc.dg/pr87874.c Modified: trunk/gcc/ChangeLog trunk/gcc/lra.c trunk/gcc/testsuite/ChangeLog