On Thu, Aug 03, 2017 at 10:58:07AM +0200, Richard Biener wrote: > > The reason why we punt is the unexpected _4 != 1 condition, the code > > is prepared to handle just _4 == 0 (or _4 != 0) where _4 == 0 is equivalent > > to _4 != 1 for boolean type. > > Hmm, I thought we had code to canonicalize boolean compares (but I can't > find that right now). Some is in
I was looking for that too, but didn't find anything that would be done always. > forwprop:forward_propagate_into_gimple_cond where it canonicalizes > != 1 to == 0. Yes, but from Canonicalize _Bool == 0 and _Bool != 1 to _Bool != 0 by swapping edges. it seems that it can keep _Bool == 1 around, which is something optimize_range_tests_var_bound didn't handle before either and now does. Jakub