aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-05-13 22:25:21 +0000
committerAndrew Pinski <apinski@marvell.com>2023-05-14 19:58:50 +0000
commit82502b5c3463bde98d4b7ffb9ecef9b123799ed1 (patch)
tree0f5c205cfbbebf0547be5ecfc2a6e8fa405c87a0 /libgcc
parentaed51e2051b24a6a2127c6626f451641557a571a (diff)
downloadgcc-82502b5c3463bde98d4b7ffb9ecef9b123799ed1.zip
gcc-82502b5c3463bde98d4b7ffb9ecef9b123799ed1.tar.gz
gcc-82502b5c3463bde98d4b7ffb9ecef9b123799ed1.tar.bz2
MATCH: Add pattern for `signbit(x) ? x : -x` into abs (and swapped)
This adds a simple pattern to match.pd for `signbit(x) ? x : -x` into abs<x>. This can be done for all types even ones that honor signed zeros and NaNs because both signbit and - are considered only looking at/touching the sign bit of those types and does not trap either. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/109829 gcc/ChangeLog: * match.pd: Add pattern for `signbit(x) !=/== 0 ? x : -x`. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/abs-3.c: New test. * gcc.dg/tree-ssa/abs-4.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions