* expr.c (store_expr): Promote all MEM intermediates to regs.
From-SVN: r62173
This commit is contained in:
parent
cdd1f01b22
commit
7abec5bec9
1 changed files with 6 additions and 6 deletions
12
gcc/expr.c
12
gcc/expr.c
|
@ -4398,12 +4398,12 @@ store_expr (exp, target, want_value)
|
|||
|
||||
temp = expand_expr (exp, inner_target, VOIDmode, 0);
|
||||
|
||||
/* If TEMP is a volatile MEM and we want a result value, make
|
||||
the access now so it gets done only once. Likewise if
|
||||
it contains TARGET. */
|
||||
if (GET_CODE (temp) == MEM && want_value
|
||||
&& (MEM_VOLATILE_P (temp)
|
||||
|| reg_mentioned_p (SUBREG_REG (target), XEXP (temp, 0))))
|
||||
/* If TEMP is a MEM and we want a result value, make the access
|
||||
now so it gets done only once. Strictly speaking, this is
|
||||
only necessary if the MEM is volatile, or if the address
|
||||
overlaps TARGET. But not performing the load twice also
|
||||
reduces the amount of rtl we generate and then have to CSE. */
|
||||
if (GET_CODE (temp) == MEM && want_value)
|
||||
temp = copy_to_reg (temp);
|
||||
|
||||
/* If TEMP is a VOIDmode constant, use convert_modes to make
|
||||
|
|
Loading…
Add table
Reference in a new issue