[llvm] [SCEV] Use a predicate in howManyLessThans() to prove overflow (PR #208581)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 00:37:05 PDT 2026


================
@@ -0,0 +1,34 @@
+; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s
+
+; Verify that ScalarEvolution can compute a predicated backedge-taken count
+; for a loop with a non-unit stride (stride = 3) and no 'nsw' flag on the
+; induction variable (e.g. from compilation under -fwrapv).
----------------
fhahn wrote:

I don't think we need reference to `-fwrapv` either in the comments or test names. It is clang specific and there ar many reasons why the flags may be dropped

https://github.com/llvm/llvm-project/pull/208581


More information about the llvm-commits mailing list