Message ID | 507D8B74.4090900@arm.com |
---|---|
State | New |
Headers | show |
diff --git a/gcc/recog.c b/gcc/recog.c index 39a9dda..fa323df 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -984,6 +984,11 @@ general_operand (rtx op, enum machine_mode mode) && MEM_P (sub)) return 0; + /* Similarly, avoid SUBREG (MEM) with side effects (e.g. volatile + mem, PRE_INC address etc). */ + if (!reload_completed && MEM_P (sub) && side_effects_p (sub)) + return 0; + /* FLOAT_MODE subregs can't be paradoxical. Combine will occasionally create such rtl, and we must reject it. */ if (SCALAR_FLOAT_MODE_P (GET_MODE (op))