lra-eliminations.c (lra_eliminate_regs_1): Use simplify_gen_subreg rather than gen_rt...
authorRichard Sandiford <r.sandiford@uk.ibm.com>
Tue, 30 Oct 2012 14:33:48 +0000 (14:33 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 30 Oct 2012 14:33:48 +0000 (14:33 +0000)
gcc/
* lra-eliminations.c (lra_eliminate_regs_1): Use simplify_gen_subreg
rather than gen_rtx_SUBREG.

From-SVN: r192988

gcc/ChangeLog
gcc/lra-eliminations.c

index b1eabfc9488cd471d5636801a7dc98c777dbad4e..2ea4266ad069b282667393fe432fdade340f09fe 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+       * lra-eliminations.c (lra_eliminate_regs_1): Use simplify_gen_subreg
+       rather than gen_rtx_SUBREG.
+
 2012-10-30  Richard Biener  <rguenther@suse.de>
 
        * gimple.h (gimple_store_p): New predicate.
index 5f8a8c8d41f7e97f9c2a135ea7c67834c69907f3..24c58f699c94c15efc95c57e06e229f41bed19e5 100644 (file)
@@ -550,7 +550,8 @@ lra_eliminate_regs_1 (rtx x, enum machine_mode mem_mode,
              return x;
            }
          else
-           return gen_rtx_SUBREG (GET_MODE (x), new_rtx, SUBREG_BYTE (x));
+           return simplify_gen_subreg (GET_MODE (x), new_rtx,
+                                       GET_MODE (new_rtx), SUBREG_BYTE (x));
        }
 
       return x;