gnu/gcc/ea41a5efe4b4a715f66ebfcad35cfd3b22e94690 ranger: Fix operator_div with VREL_LT [PR126934]
The problem here (which I missed during the review) is
that when we don't set the rel_range to 0, the rel_range
will be undefined (rather than varying) so when we do
an intersection with that the lhs becomes undefined.
That is wrong. This fixes the problem by instead
doing an early return if either of the ops are not
nonnegative.
Pushed as obvious after bootstrap/test on x86_64-linux-gnu.
PR tree-optimization/126934
gcc/ChangeLog:
* range-op.cc (operator_div::op1_op2_relation_effect): Fix
for ops range being negative with VREL_LT.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr126934-1.c: New test.
Signed-off-by: Andrea Pinski <andrew.pinski@oss.qualcomm.com>
2 files changed