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 tree-optimization/81588] [7/8 Regression] Wrong code at -O2


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Aug  1 08:32:37 2017
New Revision: 250760

URL: https://gcc.gnu.org/viewcvs?rev=250760&root=gcc&view=rev
Log:
        PR tree-optimization/81588
        * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
        ranges[i].in_p, invert comparison code ccode.  For >/>=,
        swap rhs1 and rhs2 and comparison code unconditionally,
        for </<= don't do that.  Don't swap rhs1/rhs2 again if
        ranges[i].in_p, instead invert comparison code ccode if
        opcode or oe->rank is BIT_IOR_EXPR.

        * gcc.dg/tree-ssa/pr81588.c: New test.
        * gcc.dg/pr81588.c: New test.
        * gcc.c-torture/execute/pr81588.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr81588.c
    trunk/gcc/testsuite/gcc.dg/pr81588.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-reassoc.c

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