aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-08-25 07:21:26 +0200
committerJakub Jelinek <jakub@redhat.com>2020-08-25 07:21:26 +0200
commitbb5e895245ebef488b63efc239f64488aef65cf1 (patch)
tree86b971ab006647bbc6f505b7b5cbbd517f2d30d3 /gcc/fold-const.c
parent61680cfaf1eef26a5953f36ab82a1cc13f9b2f2c (diff)
downloadgcc-bb5e895245ebef488b63efc239f64488aef65cf1.zip
gcc-bb5e895245ebef488b63efc239f64488aef65cf1.tar.gz
gcc-bb5e895245ebef488b63efc239f64488aef65cf1.tar.bz2
match.pd: Simplify copysign (x, -x) to -x [PR96715]
The following patch implements an optimization suggested in the PR, copysign(x,-x) can be optimized into -x (even without -ffast-math, should work fine even for signed zeros and infinities or nans). 2020-08-25 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/96715 * match.pd (copysign(x,-x) -> -x): New simplification. * gcc.dg/tree-ssa/copy-sign-3.c: New test.
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions