Re: [PATCH] Improve strlen pass handling of loads from memory (PR tree-optimization/83444)

2017-12-19 Thread Richard Biener
On Mon, 18 Dec 2017, Jakub Jelinek wrote: > Hi! > > As the testcase shows, we fold strlen (str) == 0 into *str == 0 before > the strlen pass has a chance to optimize. The following patch optimizes > loads from the known termination '\0' into lhs = '\0' and loads from the > part of the string kno

Re: [PATCH] Improve strlen pass handling of loads from memory (PR tree-optimization/83444)

2017-12-18 Thread Jeff Law
On 12/18/2017 02:45 PM, Jakub Jelinek wrote: > Hi! > > As the testcase shows, we fold strlen (str) == 0 into *str == 0 before > the strlen pass has a chance to optimize. The following patch optimizes > loads from the known termination '\0' into lhs = '\0' and loads from the > part of the string k

[PATCH] Improve strlen pass handling of loads from memory (PR tree-optimization/83444)

2017-12-18 Thread Jakub Jelinek
Hi! As the testcase shows, we fold strlen (str) == 0 into *str == 0 before the strlen pass has a chance to optimize. The following patch optimizes loads from the known termination '\0' into lhs = '\0' and loads from the part of the string known to be non-zero results in ~[0, 0] range being record