re PR middle-end/55152 (MAX_EXPR(a,-a) is really ABS_EXPR(a))
authorRichard Biener <rguenther@suse.de>
Thu, 29 Sep 2016 12:27:19 +0000 (12:27 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 29 Sep 2016 12:27:19 +0000 (12:27 +0000)
commitd657e9952231dee084e1ba658dc3462a82504d78
tree02078d57ea55f712b86706b6e750a6d977ddcd59
parent75304c879397bf5179784f004076ce8ef74643a6
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
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr55152.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-5.c
gcc/tree-ssa-phiopt.c