summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-05 12:03:36 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-05 12:03:36 +0000
commit8813f8fe71a49dff1bf2c486166fef7c935738fa (patch)
treee6146abcc03ac16fe3abb84343a95270707d3b41 /gcc/expmed.c
parente8a30fc08bc41a2b2f4482581376d4e0540749b3 (diff)
downloadgcc-8813f8fe71a49dff1bf2c486166fef7c935738fa.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c8
1 files changed, 5 insertions, 3 deletions
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;