[llvm] c6bbf05 - [LV] Convert some tests to use opaque pointers (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 12:57:35 PST 2022
Author: Florian Hahn
Date: 2022-12-19T20:55:44Z
New Revision: c6bbf05a02790847cf7ab2c93e92fe2c8d05ac8b
URL: https://github.com/llvm/llvm-project/commit/c6bbf05a02790847cf7ab2c93e92fe2c8d05ac8b
DIFF: https://github.com/llvm/llvm-project/commit/c6bbf05a02790847cf7ab2c93e92fe2c8d05ac8b.diff
LOG: [LV] Convert some tests to use opaque pointers (NFC).
Added:
Modified:
llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
llvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll
llvm/test/Transforms/LoopVectorize/vectorize-once.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
index eeaf7c93d834..6aeca3391579 100644
--- a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
+++ b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
@@ -2,7 +2,7 @@
; RUN: opt -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -debug-only=loop-vectorize -disable-output -S %s 2>&1 | FileCheck %s
-define void @test_chained_first_order_recurrences_1(i16* %ptr) {
+define void @test_chained_first_order_recurrences_1(ptr %ptr) {
; CHECK-LABEL: 'test_chained_first_order_recurrences_1'
; CHECK: VPlan 'Initial VPlan for VF={4},UF>=1' {
; CHECK-NEXT: Live-in vp<%1> = vector-trip-count
@@ -40,10 +40,10 @@ loop:
%for.2 = phi i16 [ 33, %entry ], [ %for.1, %loop ]
%iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
%iv.next = add nuw nsw i64 %iv, 1
- %gep.ptr = getelementptr inbounds i16, i16* %ptr, i64 %iv
- %for.1.next = load i16, i16* %gep.ptr, align 2
+ %gep.ptr = getelementptr inbounds i16, ptr %ptr, i64 %iv
+ %for.1.next = load i16, ptr %gep.ptr, align 2
%add = add i16 %for.1, %for.2
- store i16 %add, i16* %gep.ptr
+ store i16 %add, ptr %gep.ptr
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
@@ -51,7 +51,7 @@ exit:
ret void
}
-define void @test_chained_first_order_recurrences_3(i16* %ptr) {
+define void @test_chained_first_order_recurrences_3(ptr %ptr) {
; CHECK-LABEL: 'test_chained_first_order_recurrences_3'
; CHECK: VPlan 'Initial VPlan for VF={4},UF>=1' {
; CHECK-NEXT: Live-in vp<%1> = vector-trip-count
@@ -95,11 +95,11 @@ loop:
%for.3 = phi i16 [ 33, %entry ], [ %for.2, %loop ]
%iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
%iv.next = add nuw nsw i64 %iv, 1
- %gep.ptr = getelementptr inbounds i16, i16* %ptr, i64 %iv
- %for.1.next = load i16, i16* %gep.ptr, align 2
+ %gep.ptr = getelementptr inbounds i16, ptr %ptr, i64 %iv
+ %for.1.next = load i16, ptr %gep.ptr, align 2
%add.1 = add i16 %for.1, %for.2
%add.2 = add i16 %add.1, %for.3
- store i16 %add.2, i16* %gep.ptr
+ store i16 %add.2, ptr %gep.ptr
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
diff --git a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
index 2476b272c26a..225b1c01294f 100644
--- a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
+++ b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
@@ -395,7 +395,7 @@ exit:
ret void
}
-define void @test_chained_first_order_recurrence_sink_users_1(double* %ptr) {
+define void @test_chained_first_order_recurrence_sink_users_1(ptr %ptr) {
; CHECK-LABEL: @test_chained_first_order_recurrence_sink_users_1
; CHECK: vector.body:
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %vector.ph ], [ [[INDEX_NEXT:%.*]], %vector.body ]
@@ -431,9 +431,9 @@ loop:
%add.1 = fadd double 10.0, %for.2
%add.2 = fadd double %add.1, %for.1
%iv.next = add nuw nsw i64 %iv, 1
- %gep.ptr = getelementptr inbounds double, double* %ptr, i64 %iv
- %for.1.next = load double, double* %gep.ptr, align 8
- store double %add.2, double* %gep.ptr
+ %gep.ptr = getelementptr inbounds double, ptr %ptr, i64 %iv
+ %for.1.next = load double, ptr %gep.ptr, align 8
+ store double %add.2, ptr %gep.ptr
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
diff --git a/llvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll b/llvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll
index 2d961eae68cc..e5d00b35f11e 100644
--- a/llvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll
+++ b/llvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll
@@ -91,8 +91,8 @@ entry:
br label %outer
outer:
- %l.1 = load i16*, ptr %arg, align 8
- %l.2 = load i16*, ptr %arg, align 8
+ %l.1 = load ptr, ptr %arg, align 8
+ %l.2 = load ptr, ptr %arg, align 8
%c.1 = call i1 @cond()
br i1 %c.1, label %outer, label %inner
@@ -116,9 +116,9 @@ loop.3:
%iv.next = add nsw nuw i64 %iv, 1
%c.5 = icmp ult i64 %iv, %N
%gep.1 = getelementptr inbounds i16, ptr %l.1, i64 %iv.next
- %loop.l.1 = load i16, i16* %gep.1, align 2
+ %loop.l.1 = load i16, ptr %gep.1, align 2
%gep.2 = getelementptr inbounds i16, ptr %l.2, i64 0
- store i16 %loop.l.1, i16* %gep.2 , align 2
+ store i16 %loop.l.1, ptr %gep.2 , align 2
br i1 %c.5, label %loop.3, label %exit
exit:
diff --git a/llvm/test/Transforms/LoopVectorize/vectorize-once.ll b/llvm/test/Transforms/LoopVectorize/vectorize-once.ll
index 58b53be00462..1d25fad5ab53 100644
--- a/llvm/test/Transforms/LoopVectorize/vectorize-once.ll
+++ b/llvm/test/Transforms/LoopVectorize/vectorize-once.ll
@@ -20,20 +20,20 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
;int foo (int *A, int n) {
; return std::accumulate(A, A + n, 0);
;}
-define i32 @_Z4foo1Pii(i32* %A, i32 %n) #0 {
+define i32 @_Z4foo1Pii(ptr %A, i32 %n) #0 {
entry:
%idx.ext = sext i32 %n to i64
- %add.ptr = getelementptr inbounds i32, i32* %A, i64 %idx.ext
+ %add.ptr = getelementptr inbounds i32, ptr %A, i64 %idx.ext
%cmp3.i = icmp eq i32 %n, 0
br i1 %cmp3.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i
for.body.i: ; preds = %entry, %for.body.i
%__init.addr.05.i = phi i32 [ %add.i, %for.body.i ], [ 0, %entry ]
- %__first.addr.04.i = phi i32* [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ]
- %0 = load i32, i32* %__first.addr.04.i, align 4
+ %__first.addr.04.i = phi ptr [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ]
+ %0 = load i32, ptr %__first.addr.04.i, align 4
%add.i = add nsw i32 %0, %__init.addr.05.i
- %incdec.ptr.i = getelementptr inbounds i32, i32* %__first.addr.04.i, i64 1
- %cmp.i = icmp eq i32* %incdec.ptr.i, %add.ptr
+ %incdec.ptr.i = getelementptr inbounds i32, ptr %__first.addr.04.i, i64 1
+ %cmp.i = icmp eq ptr %incdec.ptr.i, %add.ptr
br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i
_ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry
@@ -46,20 +46,20 @@ _ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry
; CHECK-NOT: <4 x i32>
; CHECK: br i1 %{{.*}}, label %{{.*}}, label %for.body.i, !llvm.loop [[SCALAR_LOOP2:![0-9]+]]
; CHECK: ret
-define i32 @_Z4foo2Pii(i32* %A, i32 %n) #0 {
+define i32 @_Z4foo2Pii(ptr %A, i32 %n) #0 {
entry:
%idx.ext = sext i32 %n to i64
- %add.ptr = getelementptr inbounds i32, i32* %A, i64 %idx.ext
+ %add.ptr = getelementptr inbounds i32, ptr %A, i64 %idx.ext
%cmp3.i = icmp eq i32 %n, 0
br i1 %cmp3.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i
for.body.i: ; preds = %entry, %for.body.i
%__init.addr.05.i = phi i32 [ %add.i, %for.body.i ], [ 0, %entry ]
- %__first.addr.04.i = phi i32* [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ]
- %0 = load i32, i32* %__first.addr.04.i, align 4
+ %__first.addr.04.i = phi ptr [ %incdec.ptr.i, %for.body.i ], [ %A, %entry ]
+ %0 = load i32, ptr %__first.addr.04.i, align 4
%add.i = add nsw i32 %0, %__init.addr.05.i
- %incdec.ptr.i = getelementptr inbounds i32, i32* %__first.addr.04.i, i64 1
- %cmp.i = icmp eq i32* %incdec.ptr.i, %add.ptr
+ %incdec.ptr.i = getelementptr inbounds i32, ptr %__first.addr.04.i, i64 1
+ %cmp.i = icmp eq ptr %incdec.ptr.i, %add.ptr
br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i, !llvm.loop !0
_ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry
More information about the llvm-commits
mailing list