diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-31 06:53:07 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-31 06:53:07 +0000 |
| commit | ae5877265b0ae1060485f0df4d76ecde4d089576 (patch) | |
| tree | 99e6ba7364dd8f5dd30f4ec7cfe162ed473a75a2 | |
| parent | e518230225fad2147fc4c1cd6657b465ba97fba7 (diff) | |
| download | ppe42-gcc-ae5877265b0ae1060485f0df4d76ecde4d089576.tar.gz ppe42-gcc-ae5877265b0ae1060485f0df4d76ecde4d089576.zip | |
* expr.c (store_expr): Promote all MEM intermediates to regs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62173 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 99f38987f6a..8d1fd4d4d1d 100644 --- a/gcc/expr.c +++ b/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 |

