diff options
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r-- | gcc/fwprop.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 006dca3c..b54ff50 100644 --- a/gcc/fwprop.c +++ b/gcc/fwprop.c @@ -1294,10 +1294,11 @@ forward_propagate_and_simplify (df_ref use, rtx def_insn, rtx def_set) loc = &SET_SRC (use_set); /* Do not replace an existing REG_EQUAL note if the insn is not - recognized. Either we're already replacing in the note, or - we'll separately try plugging the definition in the note and - simplifying. */ - set_reg_equal = (note == NULL_RTX); + recognized. Either we're already replacing in the note, or we'll + separately try plugging the definition in the note and simplifying. + And only install a REQ_EQUAL note when the destination is a REG, + as the note would be invalid otherwise. */ + set_reg_equal = (note == NULL_RTX && REG_P (SET_DEST (use_set))); } if (GET_MODE (*loc) == VOIDmode) |