[PATCH, rs6000] Add additional checks when identifying load/store instructions

Segher Boessenkool segher@kernel.crashing.org
Fri Aug 6 16:05:41 GMT 2021


On Fri, Aug 06, 2021 at 10:29:40AM -0500, Pat Haugen wrote:
> On 8/6/21 10:02 AM, Segher Boessenkool wrote:
> >> -  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;

Well, that isn't quiet it either, no?  It returns false for all stores
then?


Segher


More information about the Gcc-patches mailing list