[PATCH] D147588: [LV] Add a test for register pressure estimation. NFC
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 01:14:13 PDT 2023
yrouban updated this revision to Diff 520929.
yrouban added a comment.
addressed comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147588/new/
https://reviews.llvm.org/D147588
Files:
llvm/test/Transforms/LoopVectorize/X86/interleave-count.ll
Index: llvm/test/Transforms/LoopVectorize/X86/interleave-count.ll
===================================================================
--- /dev/null
+++ llvm/test/Transforms/LoopVectorize/X86/interleave-count.ll
@@ -0,0 +1,40 @@
+; REQUIRES: asserts
+;
+; RUN: opt -S -passes=loop-vectorize -debug-only=loop-vectorize \
+; RUN: -mtriple=x86_64-pc_linux -mcpu=cascadelake \
+; RUN: -force-target-max-vector-interleave=16 -force-target-num-vector-regs=16 \
+; RUN: %s 2>&1 | FileCheck %s
+
+; Check that the interleave count is limited by 8 even if there is no
+; register use except one induction variable.
+define void @test(ptr %dst, i64 %size) {
+; CHECK-LABEL: LV: Checking a loop in 'test'
+; CHECK: LV: IC is 8
+;
+; CHECK-LABEL: define void @test
+;
+; Number of @llvm.masked.scatter() calls is 8.
+; CHECK: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NEXT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+; CHECK-NOT: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double>
+;
+entry:
+ %p.end = getelementptr inbounds double, ptr %dst, i64 %size
+ br label %loop
+
+loop:
+ %p = phi ptr [%dst, %entry], [%p.next, %loop]
+ store double -1.000000e+00, ptr %p, align 8
+ %p.next = getelementptr inbounds double, ptr %p, i64 8
+ %done = icmp eq ptr %p.next, %p.end
+ br i1 %done, label %exit, label %loop
+
+exit:
+ ret void
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147588.520929.patch
Type: text/x-patch
Size: 1837 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230510/0b2908a6/attachment.bin>
More information about the llvm-commits
mailing list