On 8/6/21 10:02 AM, Segher Boessenkool wrote: > On Fri, Aug 06, 2021 at 09:47:40AM -0500, Pat Haugen wrote: >> Add additional checks to verify destination[source] of a load[store] >> instruction is a register. > >> * config/rs6000/rs6000.c: (is_load_insn1): Verify destination is a >> register. > > No colon before " (". > >> --- a/gcc/config/rs6000/rs6000.c >> +++ b/gcc/config/rs6000/rs6000.c >> @@ -18357,7 +18361,7 @@ is_load_insn1 (rtx pat, rtx *load_mem) >> if (!pat || pat == NULL_RTX) >> return false; >> >> - if (GET_CODE (pat) == SET) >> + if (GET_CODE (pat) == SET && REG_P (SET_DEST (pat))) >> return find_mem_ref (SET_SRC (pat), load_mem); > > So this now falls through if it is a SET of something else than a reg. > Is that intentional? If so, this should be in the changelog. >
Falling through eventually resulted in returning false, but no, wasn't really intentional to change the logic that way. I'll fix up both places to look like the following and resubmit. if (GET_CODE (pat)== SET) if (REG_P (SET_DEST (pat))) return find_mem_ref (SET_SRC (pat), load_mem); else return false; -Pat