[llvm] 646d185 - [LV] Pre-commit extra test for fixed width VF fully unrolled loop cost model change
Igor Kirillov via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 07:31:47 PST 2024
Author: Igor Kirillov
Date: 2024-12-09T15:31:38Z
New Revision: 646d1854c04e508bd4203fdaead5447ecb72398e
URL: https://github.com/llvm/llvm-project/commit/646d1854c04e508bd4203fdaead5447ecb72398e
DIFF: https://github.com/llvm/llvm-project/commit/646d1854c04e508bd4203fdaead5447ecb72398e.diff
LOG: [LV] Pre-commit extra test for fixed width VF fully unrolled loop cost model change
Added:
Modified:
llvm/test/Transforms/LoopVectorize/AArch64/fully-unrolled-cost.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopVectorize/AArch64/fully-unrolled-cost.ll b/llvm/test/Transforms/LoopVectorize/AArch64/fully-unrolled-cost.ll
index ab29bf8d2d52a3..aea5467c0edb12 100644
--- a/llvm/test/Transforms/LoopVectorize/AArch64/fully-unrolled-cost.ll
+++ b/llvm/test/Transforms/LoopVectorize/AArch64/fully-unrolled-cost.ll
@@ -118,4 +118,36 @@ for.body: ; preds = %entry, %for.body
br i1 %exitcond.not, label %exit, label %for.body
}
+define i1 @test_extra_cmp_user(ptr nocapture noundef %dst, ptr nocapture noundef readonly %src) {
+; CHECK-LABEL: LV: Checking a loop in 'test_extra_cmp_user'
+; CHECK: Cost of 4 for VF 8: induction instruction %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
+; CHECK-NEXT: Cost of 0 for VF 8: induction instruction %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
+; CHECK-NEXT: Cost of 4 for VF 8: exit condition instruction %exitcond.not = icmp eq i64 %indvars.iv.next, 16
+; CHECK-NEXT: Cost of 0 for VF 8: EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
+; CHECK: Cost for VF 8: 12
+; CHECK-NEXT: Cost of 8 for VF 16: induction instruction %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
+; CHECK-NEXT: Cost of 0 for VF 16: induction instruction %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
+; CHECK-NEXT: Cost of 8 for VF 16: exit condition instruction %exitcond.not = icmp eq i64 %indvars.iv.next, 16
+; CHECK-NEXT: Cost of 0 for VF 16: EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
+; CHECK: Cost for VF 16: 20
+; CHECK: LV: Selecting VF: 16
+entry:
+ br label %for.body
+
+for.body:
+ %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
+ %arrayidx = getelementptr inbounds nuw i8, ptr %src, i64 %indvars.iv
+ %0 = load i8, ptr %arrayidx, align 4
+ %arrayidx2 = getelementptr inbounds nuw i8, ptr %dst, i64 %indvars.iv
+ %1 = load i8, ptr %arrayidx2, align 4
+ %add = add nsw i8 %1, %0
+ store i8 %add, ptr %arrayidx2, align 4
+ %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
+ %exitcond.not = icmp eq i64 %indvars.iv.next, 16
+ br i1 %exitcond.not, label %exit, label %for.body
+
+exit:
+ ret i1 %exitcond.not
+}
+
attributes #0 = { vscale_range(1, 16) "target-features"="+sve" }
More information about the llvm-commits
mailing list