[llvm] [LV] Use SCEV to check if IV overflow check is known (PR #115705)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 04:25:45 PST 2024


================
@@ -0,0 +1,85 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -passes=loop-vectorize \
+; RUN: -force-tail-folding-style=data-with-evl \
+; RUN: -prefer-predicate-over-epilogue=predicate-dont-vectorize \
+; RUN: -mtriple=riscv64 -mattr=+v -S < %s | FileCheck %s
+
+; If we know the IV will never overflow then we can skip the IV overflow check
+
+define void @f(ptr %p, i64 %tc) vscale_range(2, 1024) {
----------------
lukel97 wrote:

This crashes without the assertion removed unfortunately. I could split this into two patches to remove the assert first, and then a second one that shows the change in the overflow check?

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


More information about the llvm-commits mailing list