On 11/17/2021 1:00 AM, apinski--- via Gcc-patches wrote:
From: Andrew Pinski <apin...@marvell.com> So like many optimizations on the gimple level, sometimes it makes sense to do the optimization early or later. In this case, creating a cond expression early causes other optimizations to be missed. So just disable it until canonicalize_math_p () is false. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/103257 gcc/ChangeLog: * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0): Disable until !canonicalize_math_p (). gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/vrp116.c: Check optimized instead of vrp1. * gcc.dg/tree-ssa/pr103257-1.c: New test.
OK jeff