Re: [PATCH] Small load strlen opt follow-up improvement (PR tree-optimization/83444)

2017-12-19 Thread Jeff Law
On 12/19/2017 10:23 AM, Jakub Jelinek wrote: > Hi! > > As the testcase shows, we weren't handling the case where we have > _34 = MEM_REF[&b, 4B]; > - we would (if it exists) find the string length for b.a, but not > for the second field. Using get_addr_stridx handles that well. > The reason to us

Re: [PATCH] Small load strlen opt follow-up improvement (PR tree-optimization/83444)

2017-12-19 Thread Richard Biener
On December 19, 2017 6:23:55 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >As the testcase shows, we weren't handling the case where we have >_34 = MEM_REF[&b, 4B]; >- we would (if it exists) find the string length for b.a, but not >for the second field. Using get_addr_stridx handles that well. >Th

[PATCH] Small load strlen opt follow-up improvement (PR tree-optimization/83444)

2017-12-19 Thread Jakub Jelinek
Hi! As the testcase shows, we weren't handling the case where we have _34 = MEM_REF[&b, 4B]; - we would (if it exists) find the string length for b.a, but not for the second field. Using get_addr_stridx handles that well. The reason to use get_stridx on the MEM_REF first operand is to handle the