[Bug tree-optimization/81588] [7/8 Regression] Wrong code at -O2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 1 08:44:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81588
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Aug 1 08:43:45 2017
New Revision: 250761
URL: https://gcc.gnu.org/viewcvs?rev=250761&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:
branches/gcc-7-branch/gcc/testsuite/gcc.c-torture/execute/pr81588.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr81588.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/tree-ssa-reassoc.c
More information about the Gcc-bugs
mailing list