Re: [PATCH] Slightly improve phiopt value_replacement optimization (PR middle-end/62263, PR middle-end/82498)

2017-10-14 Thread Richard Biener
On October 13, 2017 9:43:10 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >First of all, there was a typo, we are optimizing >(x != 0) ? x + y : y >into x + y rather than y. > >And, as the comment mentions, the condition that there is just a single >stmt is too restrictive and in

[PATCH] Slightly improve phiopt value_replacement optimization (PR middle-end/62263, PR middle-end/82498)

2017-10-13 Thread Jakub Jelinek
Hi! First of all, there was a typo, we are optimizing (x != 0) ? x + y : y into x + y rather than y. And, as the comment mentions, the condition that there is just a single stmt is too restrictive and in the various patterns posted in the various rotate related PRs there are cases where in