Skip to content

Commit 149f7e6

Browse files
committed
Review: Pass pointers as arguments in lit test
1 parent c3a5eb3 commit 149f7e6

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

llvm/test/Transforms/LoopVectorize/use-iv-start-value.ll

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@
44
; Check that we correctly handle the use of %start2 in the exit block, and do
55
; not crash.
66

7-
define i64 @foo(i64 %start, i64 %end) {
7+
define i64 @foo(ptr %p1, ptr %p2, i64 %start, i64 %end) {
88
; CHECK-LABEL: define i64 @foo(
9-
; CHECK-SAME: i64 [[START:%.*]], i64 [[END:%.*]]) {
9+
; CHECK-SAME: ptr [[P1:%.*]], ptr [[P2:%.*]], i64 [[START:%.*]], i64 [[END:%.*]]) {
1010
; CHECK-NEXT: [[ENTRY:.*]]:
11-
; CHECK-NEXT: [[P1:%.*]] = alloca [1024 x i32], align 4
12-
; CHECK-NEXT: [[P2:%.*]] = alloca [1024 x i32], align 4
13-
; CHECK-NEXT: call void @init_mem(ptr [[P1]], i64 1024)
14-
; CHECK-NEXT: call void @init_mem(ptr [[P2]], i64 1024)
1511
; CHECK-NEXT: [[START2:%.*]] = and i64 [[START]], 12345
1612
; CHECK-NEXT: [[TMP0:%.*]] = sub i64 [[END]], [[START2]]
1713
; CHECK-NEXT: [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 [[TMP0]], 4
@@ -52,10 +48,6 @@ define i64 @foo(i64 %start, i64 %end) {
5248
; CHECK-NEXT: ret i64 [[USE]]
5349
;
5450
entry:
55-
%p1 = alloca [1024 x i32]
56-
%p2 = alloca [1024 x i32]
57-
call void @init_mem(ptr %p1, i64 1024)
58-
call void @init_mem(ptr %p2, i64 1024)
5951
%start2 = and i64 %start, 12345
6052
br label %for.body
6153

@@ -74,8 +66,6 @@ exit:
7466
ret i64 %use
7567
}
7668

77-
declare void @init_mem(ptr, i64)
78-
7969
;.
8070
; CHECK: [[LOOP0]] = distinct !{[[LOOP0]], [[META1:![0-9]+]], [[META2:![0-9]+]]}
8171
; CHECK: [[META1]] = !{!"llvm.loop.isvectorized", i32 1}

0 commit comments

Comments
 (0)