re PR tree-optimization/69320 (wrong code generation at -O2 and higher)
authorJeff Law <law@redhat.com>
Tue, 19 Jan 2016 06:43:54 +0000 (23:43 -0700)
committerJeff Law <law@gcc.gnu.org>
Tue, 19 Jan 2016 06:43:54 +0000 (23:43 -0700)
commit2bedb645f2aef48d7cbb70bf5ddb8bf0a4342019
tree01f06939e38904f487d71de67d847c5e7cc30273
parent17c15cb932563bb814865c39abc2b952c7707f79
re PR tree-optimization/69320 (wrong code generation at -O2 and higher)

2016-01-18  Jeff Law  <law@redhat.com>

PR tree-optimization/69320
* tree-ssa-dom.c (record_edge_info): For comparisons against a boolean
ranged object, do nothing if the RHS constant is not [0..1].
(optimize_stmt): Comparing a boolean ranged object against a
constant outside [0..1] results in a compile-time constant.

* tree-ssanames.c (ssa_name_has_boolean_range): Remove unnecessary
test.

PR tree-optimization/69320
* gcc.c-torture/pr69320-1.c: New test.
* gcc.c-torture/pr69320-2.c: New test.
* gcc.c-torture/pr69320-3.c: New test.
* gcc.c-torture/pr69320-4.c: New test.

From-SVN: r232548
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr69320-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr69320-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr69320-3.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr69320-4.c [new file with mode: 0644]
gcc/tree-ssa-dom.c
gcc/tree-ssanames.c