aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index d581513..3b975cc 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1533,9 +1533,12 @@ simplify_operand_subreg (int nop, machine_mode reg_mode)
a word.
If valid memory becomes invalid after subreg elimination
- we still have to reload memory.
+ and address might be different we still have to reload
+ memory.
*/
- if ((! addr_was_valid || addr_is_valid)
+ if ((! addr_was_valid
+ || addr_is_valid
+ || known_eq (GET_MODE_SIZE (mode), GET_MODE_SIZE (innermode)))
&& !(maybe_ne (GET_MODE_PRECISION (mode),
GET_MODE_PRECISION (innermode))
&& known_le (GET_MODE_SIZE (mode), UNITS_PER_WORD)