[llvm] [LV] Use SCEV to check if minimum iteration check is known. (PR #111310)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 08:04:59 PDT 2024


================
@@ -11,8 +11,7 @@ define void @f1(ptr %A) #0 {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[TMP0:%.*]] = call i64 @llvm.vscale.i64()
 ; CHECK-NEXT:    [[TMP1:%.*]] = mul i64 [[TMP0]], 4
-; CHECK-NEXT:    [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 1024, [[TMP1]]
-; CHECK-NEXT:    br i1 [[MIN_ITERS_CHECK]], label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
+; CHECK-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
----------------
ayalz wrote:

Step of 4 * vscale is known to be smaller than count of 1024, based on vscale_range(1,16) attribute?

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


More information about the llvm-commits mailing list