aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-07-10 18:41:27 -0700
committerAndrew Pinski <pinskia@gmail.com>2023-10-23 03:55:15 -0700
commit1acd4576435974f36dc91a8cc707cdcdccd049be (patch)
tree3defdbd04685cc135c325fbd214db9d3cf9fed9c /gcc/tree-vect-loop-manip.cc
parent85e930ac8557c444680b5b29a0a13a14ea6672b5 (diff)
downloadgcc-1acd4576435974f36dc91a8cc707cdcdccd049be.zip
gcc-1acd4576435974f36dc91a8cc707cdcdccd049be.tar.gz
gcc-1acd4576435974f36dc91a8cc707cdcdccd049be.tar.bz2
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.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions