]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
expmed.c (expand_mult_const): Expand shift into temporary.
authorUros Bizjak <ubizjak@gmail.com>
Fri, 6 Aug 2010 12:13:25 +0000 (14:13 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 6 Aug 2010 12:13:25 +0000 (14:13 +0200)
2010-08-06  Uros Bizjak  <ubizjak@gmail.com>

* expmed.c (expand_mult_const) <case alg_shift>: Expand shift into
temporary. Emit move from temporary to accum, so REG_EQUAL note will
be attached to this insn in correct mode.

2010-08-06  Uros Bizjak  <ubizjak@gmail.com>

* config/i386/i386.c (ix86_decompose_address): Check for SI_REG
using REGNO of base_reg directly.

From-SVN: r162944

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/expmed.c

index b3bc6ff3d8d25fec567ccae4668584d3ffb790c6..20f9ea24acef7bf783e952e8bfcaf745960b8b4f 100644 (file)
@@ -1,3 +1,14 @@
+2010-08-06  Uros Bizjak  <ubizjak@gmail.com>
+
+       * expmed.c (expand_mult_const) <case alg_shift>: Expand shift into
+       temporary. Emit move from temporary to accum, so REG_EQUAL note will
+       be attached to this insn in correct mode.
+
+2010-08-06  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (ix86_decompose_address): Check for SI_REG
+       using REGNO of base_reg directly.
+
 2010-08-05  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/spu/spu.c (spu_emit_branch_hint): Do not access NOTE_KIND of
index fdabc1e9d5040d71b0d9c980ef937a02b9d171ff..64be3b28dcae7a8f1e702e6b785db78065a8a150 100644 (file)
@@ -6871,8 +6871,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
      Avoid this by transforming to [%esi+0].  */
   if (TARGET_K6 && !optimize_size
       && base_reg && !index_reg && !disp
-      && REG_P (base_reg)
-      && REGNO_REG_CLASS (REGNO (base_reg)) == SIREG)
+      && REG_P (base_reg) && REGNO (base_reg) == SI_REG)
     disp = const0_rtx;
 
   /* Special case: encode reg+reg instead of reg*2.  */
index c1233aacb5abcb524d8e82771f1b40f726dc0609..829d6bbdca082c715cccc9ac54f19417d5513c7f 100644 (file)
@@ -2954,9 +2954,11 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val,
       switch (alg->op[opno])
        {
        case alg_shift:
-         accum = expand_shift (LSHIFT_EXPR, mode, accum,
-                               build_int_cst (NULL_TREE, log),
-                               NULL_RTX, 0);
+         tem = expand_shift (LSHIFT_EXPR, mode, accum,
+                             build_int_cst (NULL_TREE, log),
+                             NULL_RTX, 0);
+         /* REG_EQUAL note will be attached to the following insn.  */
+         emit_move_insn (accum, tem);
          val_so_far <<= log;
          break;