diff options
author | Richard Biener <rguenther@suse.de> | 2016-09-29 12:27:19 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-09-29 12:27:19 +0000 |
commit | d657e9952231dee084e1ba658dc3462a82504d78 (patch) | |
tree | 02078d57ea55f712b86706b6e750a6d977ddcd59 /gcc/tree-ssa-phiopt.c | |
parent | 75304c879397bf5179784f004076ce8ef74643a6 (diff) | |
download | gcc-d657e9952231dee084e1ba658dc3462a82504d78.zip gcc-d657e9952231dee084e1ba658dc3462a82504d78.tar.gz gcc-d657e9952231dee084e1ba658dc3462a82504d78.tar.bz2 |
re PR middle-end/55152 (MAX_EXPR(a,-a) is really ABS_EXPR(a))
2016-09-29 Richard Biener <rguenther@suse.de>
PR middle-end/55152
* match.pd: Add max(a,-a) -> abs(a) pattern.
* tree-ssa-phiopt.c (minmax_replacement): Disable for
HONOR_SIGNED_ZEROS types.
* gcc.dg/pr55152.c: New testcase.
* gcc.dg/tree-ssa/phi-opt-5.c: Adjust.
From-SVN: r240615
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index dd3837d..3f3b88c 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1075,7 +1075,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, type = TREE_TYPE (PHI_RESULT (phi)); /* The optimization may be unsafe due to NaNs. */ - if (HONOR_NANS (type)) + if (HONOR_NANS (type) || HONOR_SIGNED_ZEROS (type)) return false; cond = as_a <gcond *> (last_stmt (cond_bb)); |