Fix logical_combine OR operation. Again.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 10 Nov 2020 00:38:22 +0000 (19:38 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 10 Nov 2020 00:41:05 +0000 (19:41 -0500)
commit7d26a337bfa1135d95caa3c213e82f2a97f18a01
treebf1633d16785790c688b97118e4aedf716550ba6
parent2bee28dd41ff2b2bc73223aaa18d02e5329b219f
Fix logical_combine OR operation. Again.

The original fix was incorrect and results in loss of opportunities.
Revert the original fix. When processing logical chains, do not
follow chains outside of the current basic block.  Use the import
value instead.

gcc/
PR tree-optimization/97567
* gimple-range-gori.cc: (gori_compute::logical_combine): False
OR operations should intersect the 2 results.
(gori_compute::compute_logical_operands_in_chain): If def chains
are outside the current basic block, don't follow them.
gcc/testsuite/
* gcc.dg/pr97567-2.c: New.
gcc/gimple-range-gori.cc
gcc/testsuite/gcc.dg/pr97567-2.c [new file with mode: 0644]