diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-08-25 07:21:26 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-08-25 07:21:26 +0200 |
commit | bb5e895245ebef488b63efc239f64488aef65cf1 (patch) | |
tree | 86b971ab006647bbc6f505b7b5cbbd517f2d30d3 /gcc/fold-const.c | |
parent | 61680cfaf1eef26a5953f36ab82a1cc13f9b2f2c (diff) | |
download | gcc-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