diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-07-10 18:41:27 -0700 |
---|---|---|
committer | Andrew Pinski <pinskia@gmail.com> | 2023-10-23 03:55:15 -0700 |
commit | 1acd4576435974f36dc91a8cc707cdcdccd049be (patch) | |
tree | 3defdbd04685cc135c325fbd214db9d3cf9fed9c /gcc/tree-vect-loop-manip.cc | |
parent | 85e930ac8557c444680b5b29a0a13a14ea6672b5 (diff) | |
download | gcc-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