This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/55152] MAX_EXPR(a,-a) is really ABS_EXPR(a)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55152

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Sep 29 12:27:19 2016
New Revision: 240615

URL: https://gcc.gnu.org/viewcvs?rev=240615&root=gcc&view=rev
Log:
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.

Added:
    trunk/gcc/testsuite/gcc.dg/pr55152.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-5.c
    trunk/gcc/tree-ssa-phiopt.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]