[llvm] LAA: version unit stride for stores (PR #124567)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 08:18:35 PST 2025


================
@@ -5,26 +5,27 @@ define void @test_variable_stride(ptr %dst, i32 %scale) {
 ; CHECK-LABEL: define void @test_variable_stride
 ; CHECK-SAME: (ptr [[DST:%.*]], i32 [[SCALE:%.*]]) {
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
+; CHECK-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_SCEVCHECK:%.*]]
+; CHECK:       vector.scevcheck:
+; CHECK-NEXT:    [[IDENT_CHECK:%.*]] = icmp ne i32 [[SCALE]], 1
+; CHECK-NEXT:    br i1 [[IDENT_CHECK]], label [[SCALAR_PH]], label [[VECTOR_PH:%.*]]
----------------
fhahn wrote:

Yeah it would be faster with the `mul` removed,  but this is not the reason we added the predicate, and now we can only execute the interleaved loop if `scale == 1`

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


More information about the llvm-commits mailing list