From: Uros Bizjak Date: Fri, 6 Aug 2010 12:13:25 +0000 (+0200) Subject: expmed.c (expand_mult_const): Expand shift into temporary. X-Git-Tag: releases/gcc-4.3.6~392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=030b8c48a92ebb2ce98d6a41a399d97184226b7d;p=thirdparty%2Fgcc.git expmed.c (expand_mult_const): Expand shift into temporary. 2010-08-06 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-06 Uros Bizjak * config/i386/i386.c (ix86_decompose_address): Check for SI_REG using REGNO of base_reg directly. From-SVN: r162944 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3bc6ff3d8d2..20f9ea24acef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2010-08-06 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-06 Uros Bizjak + + * config/i386/i386.c (ix86_decompose_address): Check for SI_REG + using REGNO of base_reg directly. + 2010-08-05 Ulrich Weigand * config/spu/spu.c (spu_emit_branch_hint): Do not access NOTE_KIND of diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index fdabc1e9d504..64be3b28dcae 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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. */ diff --git a/gcc/expmed.c b/gcc/expmed.c index c1233aacb5ab..829d6bbdca08 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -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;