summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2010-08-05 14:03:36 +0200
committerUros Bizjak <uros@gcc.gnu.org>2010-08-05 14:03:36 +0200
commit4caa21a13b14b333714d1f8dcce3adefe6fe910e (patch)
treee6146abcc03ac16fe3abb84343a95270707d3b41
parente2534738ee23d66ecbbbc9bacce6bc19395045c5 (diff)
downloadgcc-4caa21a13b14b333714d1f8dcce3adefe6fe910e.tar.gz
expmed.c (expand_mult_const): Expand shift into temporary.
* 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. From-SVN: r162910
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/expmed.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3456501c8f9..0b0d4181057 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2010-08-05 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-05 Uros Bizjak <ubizjak@gmail.com>
+
* config/i386/i386.c (ix86_decompose_address): Check for SI_REG
using REGNO of base_reg directly.
diff --git a/gcc/expmed.c b/gcc/expmed.c
index ddace9f2e39..9aa5ff617c5 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2904,9 +2904,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;