https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103513
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note we disable the creation of the cond_expr here normally until !canonicalize_math_p () is true But evrp does: Folding statement: _10 = _9 * 20; Matching expression match.pd:2075, gimple-match.c:819 Matching expression match.pd:2078, gimple-match.c:892 Matching expression match.pd:2085, gimple-match.c:952 Applying pattern match.pd:5297, gimple-match.c:53296 Matching expression match.pd:1718, gimple-match.c:280 Matching expression match.pd:2075, gimple-match.c:819 Matching expression match.pd:2078, gimple-match.c:892 Matching expression match.pd:2085, gimple-match.c:952 gimple_simplified to _10 = _1 == 0 ? 0 : 20; We should definitely be more defensive in evaluate_conditions_for_known_args for the cond_expr but also I think evrp should disable this transformation until later if we produce a cond_expr ...