diff options
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.cc')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc index 1330cf8..5856f76 100644 --- a/gcc/tree-ssa-loop-ivcanon.cc +++ b/gcc/tree-ssa-loop-ivcanon.cc @@ -622,10 +622,11 @@ remove_redundant_iv_tests (class loop *loop) || !integer_zerop (niter.may_be_zero) || !niter.niter || TREE_CODE (niter.niter) != INTEGER_CST - || !wi::ltu_p (loop->nb_iterations_upper_bound, + || !wi::ltu_p (widest_int::from (loop->nb_iterations_upper_bound, + SIGNED), wi::to_widest (niter.niter))) continue; - + if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "Removed pointless exit: "); |