re PR middle-end/33290 (gcc.c-torture/execute/930921-1.c fails at -O1 and above now)
gcc/ PR middle-end/33290 * optabs.c (avoid_expensive_constant): Canonicalize CONST_INTs before forcing them into a register. From-SVN: r128048
This commit is contained in:
parent
171cb6996f
commit
c722c7daaf
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-09-03 Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
PR middle-end/33290
|
||||
* optabs.c (avoid_expensive_constant): Canonicalize CONST_INTs
|
||||
before forcing them into a register.
|
||||
|
||||
2007-09-03 Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
* config/mips/mips.md (fetchop_bit): Use define_code_iterator
|
||||
|
|
|
@ -1290,7 +1290,13 @@ avoid_expensive_constant (enum machine_mode mode, optab binoptab,
|
|||
&& CONSTANT_P (x)
|
||||
&& rtx_cost (x, binoptab->code) > COSTS_N_INSNS (1))
|
||||
{
|
||||
if (GET_MODE (x) != VOIDmode)
|
||||
if (GET_CODE (x) == CONST_INT)
|
||||
{
|
||||
HOST_WIDE_INT intval = trunc_int_for_mode (INTVAL (x), mode);
|
||||
if (intval != INTVAL (x))
|
||||
x = GEN_INT (intval);
|
||||
}
|
||||
else
|
||||
x = convert_modes (mode, VOIDmode, x, unsignedp);
|
||||
x = force_reg (mode, x);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue