Skip to content

Commit 2b7c347

Browse files
committed
[LoopVectorize] Convert test to opaque pointers (NFC)
I'm keeping the bitcast in the input here, because without it we end up introducing a stride 1 assumption and end up testing a different case.
1 parent 9929f95 commit 2b7c347

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
; RUN: opt -opaque-pointers=0 -mtriple=s390x-unknown-linux -mcpu=z13 -passes=loop-vectorize \
1+
; RUN: opt -mtriple=s390x-unknown-linux -mcpu=z13 -passes=loop-vectorize \
22
; RUN: -force-vector-width=2 -debug-only=loop-vectorize \
33
; RUN: -disable-output < %s 2>&1 | FileCheck %s
44
; REQUIRES: asserts
55
;
66
; Check that a scalarized load does not get operands scalarization costs added.
77

8-
define void @fun(i64* %data, i64 %n, i64 %s, double* %Src) {
8+
define void @fun(ptr %data, i64 %n, i64 %s, ptr %Src) {
99
entry:
1010
br label %for.body
1111

1212
for.body:
1313
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
1414
%mul = mul nsw i64 %iv, %s
15-
%gep = getelementptr inbounds double, double* %Src, i64 %mul
16-
%bct = bitcast double* %gep to i64*
17-
%ld = load i64, i64* %bct
15+
%gep = getelementptr inbounds double, ptr %Src, i64 %mul
16+
%bct = bitcast ptr %gep to ptr
17+
%ld = load i64, ptr %bct
1818
%iv.next = add nuw nsw i64 %iv, 1
1919
%cmp110.us = icmp slt i64 %iv.next, %n
2020
br i1 %cmp110.us, label %for.body, label %for.end
@@ -23,5 +23,5 @@ for.end:
2323
ret void
2424

2525
; CHECK: LV: Found an estimated cost of 2 for VF 2 For instruction: %mul = mul nsw i64 %iv, %s
26-
; CHECK: LV: Found an estimated cost of 2 for VF 2 For instruction: %ld = load i64, i64* %bct
26+
; CHECK: LV: Found an estimated cost of 2 for VF 2 For instruction: %ld = load i64, ptr %bct
2727
}

0 commit comments

Comments
 (0)