[llvm] 44e32a2 - [Verifier] Fix intrinsic signatures in immarg tests (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 08:24:59 PDT 2025
Author: Nikita Popov
Date: 2025-04-14T17:24:50+02:00
New Revision: 44e32a263a7a696e17f8785108e89e1cb1cbd850
URL: https://github.com/llvm/llvm-project/commit/44e32a263a7a696e17f8785108e89e1cb1cbd850
DIFF: https://github.com/llvm/llvm-project/commit/44e32a263a7a696e17f8785108e89e1cb1cbd850.diff
LOG: [Verifier] Fix intrinsic signatures in immarg tests (NFC)
Added:
Modified:
llvm/test/Verifier/AMDGPU/intrinsic-immarg.ll
llvm/test/Verifier/SystemZ/intrinsic-immarg.ll
llvm/test/Verifier/intrinsic-immarg.ll
Removed:
################################################################################
diff --git a/llvm/test/Verifier/AMDGPU/intrinsic-immarg.ll b/llvm/test/Verifier/AMDGPU/intrinsic-immarg.ll
index cb99632c287b3..34ee20c1d52a8 100644
--- a/llvm/test/Verifier/AMDGPU/intrinsic-immarg.ll
+++ b/llvm/test/Verifier/AMDGPU/intrinsic-immarg.ll
@@ -148,30 +148,30 @@ define amdgpu_ps void @init_exec(i64 %var) {
ret void
}
-declare i32 @llvm.amdgcn.s.sendmsg(i32, i32)
+declare void @llvm.amdgcn.s.sendmsg(i32, i32)
define void @sendmsg(i32 %arg0, i32 %arg1) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg0
- ; CHECK-NEXT: %val = call i32 @llvm.amdgcn.s.sendmsg(i32 %arg0, i32 %arg1)
- %val = call i32 @llvm.amdgcn.s.sendmsg(i32 %arg0, i32 %arg1)
+ ; CHECK-NEXT: call void @llvm.amdgcn.s.sendmsg(i32 %arg0, i32 %arg1)
+ call void @llvm.amdgcn.s.sendmsg(i32 %arg0, i32 %arg1)
ret void
}
-declare i32 @llvm.amdgcn.s.sendmsghalt(i32, i32)
+declare void @llvm.amdgcn.s.sendmsghalt(i32, i32)
define void @sendmsghalt(i32 %arg0, i32 %arg1) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg0
- ; CHECK-NEXT: %val = call i32 @llvm.amdgcn.s.sendmsghalt(i32 %arg0, i32 %arg1)
- %val = call i32 @llvm.amdgcn.s.sendmsghalt(i32 %arg0, i32 %arg1)
+ ; CHECK-NEXT: call void @llvm.amdgcn.s.sendmsghalt(i32 %arg0, i32 %arg1)
+ call void @llvm.amdgcn.s.sendmsghalt(i32 %arg0, i32 %arg1)
ret void
}
-declare i32 @llvm.amdgcn.s.waitcnt(i32)
+declare void @llvm.amdgcn.s.waitcnt(i32)
define void @waitcnt(i32 %arg0) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg0
- ; CHECK-NEXT: %val = call i32 @llvm.amdgcn.s.waitcnt(i32 %arg0)
- %val = call i32 @llvm.amdgcn.s.waitcnt(i32 %arg0)
+ ; CHECK-NEXT: call void @llvm.amdgcn.s.waitcnt(i32 %arg0)
+ call void @llvm.amdgcn.s.waitcnt(i32 %arg0)
ret void
}
@@ -184,30 +184,30 @@ define void @getreg(i32 %arg0, i32 %arg1) {
ret void
}
-declare i32 @llvm.amdgcn.s.sleep(i32)
+declare void @llvm.amdgcn.s.sleep(i32)
define void @sleep(i32 %arg0, i32 %arg1) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg0
- ; CHECK-NEXT: %val = call i32 @llvm.amdgcn.s.sleep(i32 %arg0)
- %val = call i32 @llvm.amdgcn.s.sleep(i32 %arg0)
+ ; CHECK-NEXT: call void @llvm.amdgcn.s.sleep(i32 %arg0)
+ call void @llvm.amdgcn.s.sleep(i32 %arg0)
ret void
}
-declare i32 @llvm.amdgcn.s.incperflevel(i32)
+declare void @llvm.amdgcn.s.incperflevel(i32)
define void @incperflevel(i32 %arg0, i32 %arg1) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg0
- ; CHECK-NEXT: %val = call i32 @llvm.amdgcn.s.incperflevel(i32 %arg0)
- %val = call i32 @llvm.amdgcn.s.incperflevel(i32 %arg0)
+ ; CHECK-NEXT: call void @llvm.amdgcn.s.incperflevel(i32 %arg0)
+ call void @llvm.amdgcn.s.incperflevel(i32 %arg0)
ret void
}
-declare i32 @llvm.amdgcn.s.decperflevel(i32)
+declare void @llvm.amdgcn.s.decperflevel(i32)
define void @decperflevel(i32 %arg0, i32 %arg1) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg0
- ; CHECK-NEXT: %val = call i32 @llvm.amdgcn.s.decperflevel(i32 %arg0)
- %val = call i32 @llvm.amdgcn.s.decperflevel(i32 %arg0)
+ ; CHECK-NEXT: call void @llvm.amdgcn.s.decperflevel(i32 %arg0)
+ call void @llvm.amdgcn.s.decperflevel(i32 %arg0)
ret void
}
@@ -629,25 +629,25 @@ define void @test_interp_p2_f16(float %arg0, float %arg1, i32 %arg2, i32 %arg3,
ret void
}
-declare <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float, float, <32 x i32>, i32, i32, i32)
-define void @test_mfma_f32_32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 %arg3, i32 %arg4, i32 %arg5) {
+declare <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float, float, <32 x float>, i32, i32, i32)
+define void @test_mfma_f32_32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 %arg3, i32 %arg4, i32 %arg5) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg3
- ; CHECK-NEXT: %val0 = call <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 %arg3, i32 2, i32 3)
- %val0 = call <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 %arg3, i32 2, i32 3)
- store volatile <32 x i32> %val0, ptr addrspace(1) undef
+ ; CHECK-NEXT: %val0 = call <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 %arg3, i32 2, i32 3)
+ %val0 = call <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 %arg3, i32 2, i32 3)
+ store volatile <32 x float> %val0, ptr addrspace(1) undef
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg4
- ; CHECK-NEXT: %val1 = call <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 1, i32 %arg4, i32 3)
- %val1 = call <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 1, i32 %arg4, i32 3)
- store volatile <32 x i32> %val1, ptr addrspace(1) undef
+ ; CHECK-NEXT: %val1 = call <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 1, i32 %arg4, i32 3)
+ %val1 = call <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 1, i32 %arg4, i32 3)
+ store volatile <32 x float> %val1, ptr addrspace(1) undef
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg5
- ; CHECK-NEXT: %val2 = call <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 1, i32 2, i32 %arg5)
- %val2 = call <32 x i32> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x i32> %arg2, i32 1, i32 2, i32 %arg5)
- store volatile <32 x i32> %val2, ptr addrspace(1) undef
+ ; CHECK-NEXT: %val2 = call <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 1, i32 2, i32 %arg5)
+ %val2 = call <32 x float> @llvm.amdgcn.mfma.f32.32x32x1f32(float %arg0, float %arg1, <32 x float> %arg2, i32 1, i32 2, i32 %arg5)
+ store volatile <32 x float> %val2, ptr addrspace(1) undef
ret void
}
diff --git a/llvm/test/Verifier/SystemZ/intrinsic-immarg.ll b/llvm/test/Verifier/SystemZ/intrinsic-immarg.ll
index 5df012d3e2786..4a18ece4f9eb9 100644
--- a/llvm/test/Verifier/SystemZ/intrinsic-immarg.ll
+++ b/llvm/test/Verifier/SystemZ/intrinsic-immarg.ll
@@ -31,22 +31,22 @@ define <2 x double> @test_vfmindb(<2 x double> %arg0, <2 x double> %arg1, i32 %a
ret <2 x double> %ret
}
-declare <2 x float> @llvm.s390.vfmaxsb(<2 x float>, <2 x float>, i32)
-define <2 x float> @test_vfmaxsb(<2 x float> %arg0, <2 x float> %arg1, i32 %arg2) {
+declare <4 x float> @llvm.s390.vfmaxsb(<4 x float>, <4 x float>, i32)
+define <4 x float> @test_vfmaxsb(<4 x float> %arg0, <4 x float> %arg1, i32 %arg2) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg2
- ; CHECK-NEXT: %ret = call <2 x float> @llvm.s390.vfmaxsb(<2 x float> %arg0, <2 x float> %arg1, i32 %arg2)
- %ret = call <2 x float> @llvm.s390.vfmaxsb(<2 x float> %arg0, <2 x float> %arg1, i32 %arg2)
- ret <2 x float> %ret
+ ; CHECK-NEXT: %ret = call <4 x float> @llvm.s390.vfmaxsb(<4 x float> %arg0, <4 x float> %arg1, i32 %arg2)
+ %ret = call <4 x float> @llvm.s390.vfmaxsb(<4 x float> %arg0, <4 x float> %arg1, i32 %arg2)
+ ret <4 x float> %ret
}
-declare <2 x float> @llvm.s390.vfminsb(<2 x float>, <2 x float>, i32)
-define <2 x float> @test_vfminsb(<2 x float> %arg0, <2 x float> %arg1, i32 %arg2) {
+declare <4 x float> @llvm.s390.vfminsb(<4 x float>, <4 x float>, i32)
+define <4 x float> @test_vfminsb(<4 x float> %arg0, <4 x float> %arg1, i32 %arg2) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %arg2
- ; CHECK-NEXT: %ret = call <2 x float> @llvm.s390.vfminsb(<2 x float> %arg0, <2 x float> %arg1, i32 %arg2)
- %ret = call <2 x float> @llvm.s390.vfminsb(<2 x float> %arg0, <2 x float> %arg1, i32 %arg2)
- ret <2 x float> %ret
+ ; CHECK-NEXT: %ret = call <4 x float> @llvm.s390.vfminsb(<4 x float> %arg0, <4 x float> %arg1, i32 %arg2)
+ %ret = call <4 x float> @llvm.s390.vfminsb(<4 x float> %arg0, <4 x float> %arg1, i32 %arg2)
+ ret <4 x float> %ret
}
declare <4 x float> @llvm.s390.vfisb(<4 x float>, i32, i32)
@@ -363,13 +363,13 @@ define <2 x i64> @test_vpdi(<2 x i64> %a, <2 x i64> %b, i32 %c) {
ret <2 x i64> %res
}
-declare <16 x i8> @llvm.s390.vmslg(<2 x i64>, <2 x i64>, <16 x i8>, i32)
-define <16 x i8> @test_vmslg(<2 x i64> %a, <2 x i64> %b, <16 x i8> %c, i32 %d) {
+declare i128 @llvm.s390.vmslg(<2 x i64>, <2 x i64>, i128, i32)
+define i128 @test_vmslg(<2 x i64> %a, <2 x i64> %b, i128 %c, i32 %d) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %d
- ; CHECK-NEXT: %res = call <16 x i8> @llvm.s390.vmslg(<2 x i64> %a, <2 x i64> %b, <16 x i8> %c, i32 %d)
- %res = call <16 x i8> @llvm.s390.vmslg(<2 x i64> %a, <2 x i64> %b, <16 x i8> %c, i32 %d)
- ret <16 x i8> %res
+ ; CHECK-NEXT: %res = call i128 @llvm.s390.vmslg(<2 x i64> %a, <2 x i64> %b, i128 %c, i32 %d)
+ %res = call i128 @llvm.s390.vmslg(<2 x i64> %a, <2 x i64> %b, i128 %c, i32 %d)
+ ret i128 %res
}
declare <16 x i8> @llvm.s390.vsldb(<16 x i8>, <16 x i8>, i32)
diff --git a/llvm/test/Verifier/intrinsic-immarg.ll b/llvm/test/Verifier/intrinsic-immarg.ll
index ab1286e8a3d76..dd940d550c4e9 100644
--- a/llvm/test/Verifier/intrinsic-immarg.ll
+++ b/llvm/test/Verifier/intrinsic-immarg.ll
@@ -181,12 +181,12 @@ define void @test_lifetime_end(i64 %arg0, ptr %ptr) {
ret void
}
-declare void @llvm.invariant.start.p0(i64, ptr)
+declare ptr @llvm.invariant.start.p0(i64, ptr)
define void @test_invariant_start(i64 %arg0, ptr %ptr) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i64 %arg0
- ; CHECK-NEXT: call void @llvm.invariant.start.p0(i64 %arg0, ptr %ptr)
- call void @llvm.invariant.start.p0(i64 %arg0, ptr %ptr)
+ ; CHECK-NEXT: call ptr @llvm.invariant.start.p0(i64 %arg0, ptr %ptr)
+ call ptr @llvm.invariant.start.p0(i64 %arg0, ptr %ptr)
ret void
}
@@ -211,12 +211,12 @@ define void @test_prefetch(ptr %ptr, i32 %arg0, i32 %arg1) {
ret void
}
-declare void @llvm.localrecover(ptr, ptr, i32)
+declare ptr @llvm.localrecover(ptr, ptr, i32)
define void @test_localrecover(ptr %func, ptr %fp, i32 %idx) {
; CHECK: immarg operand has non-immediate parameter
; CHECK-NEXT: i32 %idx
- ; CHECK-NEXT: call void @llvm.localrecover(ptr %func, ptr %fp, i32 %idx)
- call void @llvm.localrecover(ptr %func, ptr %fp, i32 %idx)
+ ; CHECK-NEXT: call ptr @llvm.localrecover(ptr %func, ptr %fp, i32 %idx)
+ call ptr @llvm.localrecover(ptr %func, ptr %fp, i32 %idx)
ret void
}
More information about the llvm-commits
mailing list