[pinskia: I'm CCing you as the author of the match.pd pattern.] So, as I wrap up the work here (latest patch attached), I see there's another phiopt regression (not spaceship related). I was hoping someone could either give me a hand, or offer some guidance. The failure is in gcc.dg/tree-ssa/phi-opt-24.c. We fail to transform the following into -A: /* { dg-options "-O2 -fno-signed-zeros -fdump-tree-phiopt" } */ float f0(float A) { // A == 0? A : -A same as -A if (A == 0) return A; return -A; } This is because the abs/negative match.pd pattern here: /* abs/negative simplifications moved from fold_cond_expr_with_comparison, Need to handle (A - B) case as fold_cond_expr_with_comparison does. Need to handle UN* comparisons. ... ... Sees IL that has the 0.0 propagated. Instead of: [local count: 1073741824]: if (A_2(D) == 0.0) goto ; [34.00%] else goto ; [66.00%] [local count: 708669601]: _3 = -A_2(D); [local count: 1073741824]: # _1 = PHI It now sees: [local count: 1073741824]: # _1 = PHI <0.0(2), _3(3)> which it leaves untouched, causing the if conditional to survive. Is this something that can be done by improving the match.pd pattern, or should be done elsewhere? Thanks. Aldy