Re: [PATCH] Fix __builtin_expect folding (PR tree-optimization/85156)

2018-04-03 Thread Richard Biener
On April 3, 2018 6:07:06 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >As the following testcases show, fold_builtin_expect replaces >__builtin_expect (x && y, z) with >__builtin_expect (x, z) && __builtin_expect (y, z) >and similarly for || instead of &&. It does so without any kind of >copying of

[PATCH] Fix __builtin_expect folding (PR tree-optimization/85156)

2018-04-03 Thread Jakub Jelinek
Hi! As the following testcases show, fold_builtin_expect replaces __builtin_expect (x && y, z) with __builtin_expect (x, z) && __builtin_expect (y, z) and similarly for || instead of &&. It does so without any kind of copying of the z argument, which means if it is e.g. statement expression witho