From: Uros Bizjak Date: Thu, 5 Aug 2010 12:03:36 +0000 (+0200) Subject: expmed.c (expand_mult_const): Expand shift into temporary. X-Git-Tag: releases/gcc-4.6.0~5228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4caa21a13b14b333714d1f8dcce3adefe6fe910e;p=thirdparty%2Fgcc.git expmed.c (expand_mult_const): Expand shift into temporary. * expmed.c (expand_mult_const) : 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3456501c8f91..0b0d41810576 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-08-05 Uros Bizjak + + * expmed.c (expand_mult_const) : 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 * config/i386/i386.c (ix86_decompose_address): Check for SI_REG diff --git a/gcc/expmed.c b/gcc/expmed.c index ddace9f2e392..9aa5ff617c57 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;