-
- Downloads
move the (a-b) CMP 0 ? (a-b) : (b-a) optimization from fold_cond_expr_with_comparison to match
This patch moves the `(a-b) CMP 0 ? (a-b) : (b-a)` optimization from fold_cond_expr_with_comparison to match. Bootstrapped and tested on x86_64-linux-gnu. Changes in: v2: Removes `(a == b) ? 0 : (b - a)` handling since it was handled via r14-3606-g3d86e7f4a8ae Change zerop to integer_zerop for `(a - b) == 0 ? 0 : (b - a)`, Add `(a - b) != 0 ? (a - b) : 0` handling. gcc/ChangeLog: * match.pd (`(A - B) CMP 0 ? (A - B) : (B - A)`): New patterns. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/phi-opt-38.c: New test.
Loading
Please register or sign in to comment