aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/SafepointIRVerifier
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-06-20 17:14:52 +0200
committerNikita Popov <npopov@redhat.com>2023-06-20 17:15:21 +0200
commit3fbbfa7f24d0bfc515b7202b7260701d16d04ed7 (patch)
treee7185f703c017fbf95864fbdbe31a6dd62c93e89 /llvm/test/SafepointIRVerifier
parent43ad2e9c8b03bfeb413f2af515ad1c2dcea0b871 (diff)
downloadllvm-3fbbfa7f24d0bfc515b7202b7260701d16d04ed7.zip
llvm-3fbbfa7f24d0bfc515b7202b7260701d16d04ed7.tar.gz
llvm-3fbbfa7f24d0bfc515b7202b7260701d16d04ed7.tar.bz2
[SafepointIRVerifier] Convert test to opaque pointers (NFC)
Diffstat (limited to 'llvm/test/SafepointIRVerifier')
-rw-r--r--llvm/test/SafepointIRVerifier/uses-in-phi-nodes.ll102
1 files changed, 51 insertions, 51 deletions
diff --git a/llvm/test/SafepointIRVerifier/uses-in-phi-nodes.ll b/llvm/test/SafepointIRVerifier/uses-in-phi-nodes.ll
index 81b8765..2311d2d 100644
--- a/llvm/test/SafepointIRVerifier/uses-in-phi-nodes.ll
+++ b/llvm/test/SafepointIRVerifier/uses-in-phi-nodes.ll
@@ -1,12 +1,12 @@
-; RUN: opt -opaque-pointers=0 -safepoint-ir-verifier-print-only -verify-safepoint-ir -S %s 2>&1 | FileCheck %s
+; RUN: opt -safepoint-ir-verifier-print-only -verify-safepoint-ir -S %s 2>&1 | FileCheck %s
-define i8 addrspace(1)* @test.not.ok.0(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define ptr addrspace(1) @test.not.ok.0(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK-LABEL: Verifying gc pointers in function: test.not.ok.0
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
br label %merge
right:
@@ -14,19 +14,19 @@ define i8 addrspace(1)* @test.not.ok.0(i8 addrspace(1)* %arg) gc "statepoint-exa
merge:
; CHECK: Illegal use of unrelocated value found!
-; CHECK-NEXT: Def: %val = phi i8 addrspace(1)* [ %arg, %left ], [ %arg, %right ]
-; CHECK-NEXT: Use: ret i8 addrspace(1)* %val
- %val = phi i8 addrspace(1)* [ %arg, %left ], [ %arg, %right ]
- ret i8 addrspace(1)* %val
+; CHECK-NEXT: Def: %val = phi ptr addrspace(1) [ %arg, %left ], [ %arg, %right ]
+; CHECK-NEXT: Use: ret ptr addrspace(1) %val
+ %val = phi ptr addrspace(1) [ %arg, %left ], [ %arg, %right ]
+ ret ptr addrspace(1) %val
}
-define i8 addrspace(1)* @test.not.ok.1(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define ptr addrspace(1) @test.not.ok.1(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK-LABEL: Verifying gc pointers in function: test.not.ok.1
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
br label %merge
right:
@@ -34,30 +34,30 @@ define i8 addrspace(1)* @test.not.ok.1(i8 addrspace(1)* %arg) gc "statepoint-exa
merge:
; CHECK: Illegal use of unrelocated value found!
-; CHECK-NEXT: Def: %val = phi i8 addrspace(1)* [ %arg, %left ], [ null, %right ]
-; CHECK-NEXT: Use: ret i8 addrspace(1)* %val
- %val = phi i8 addrspace(1)* [ %arg, %left ], [ null, %right ]
- ret i8 addrspace(1)* %val
+; CHECK-NEXT: Def: %val = phi ptr addrspace(1) [ %arg, %left ], [ null, %right ]
+; CHECK-NEXT: Use: ret ptr addrspace(1) %val
+ %val = phi ptr addrspace(1) [ %arg, %left ], [ null, %right ]
+ ret ptr addrspace(1) %val
}
-define i8 addrspace(1)* @test.ok.0(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define ptr addrspace(1) @test.ok.0(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK: No illegal uses found by SafepointIRVerifier in: test.ok.0
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
br label %merge
right:
br label %merge
merge:
- %val = phi i8 addrspace(1)* [ null, %left ], [ null, %right]
- ret i8 addrspace(1)* %val
+ %val = phi ptr addrspace(1) [ null, %left ], [ null, %right]
+ ret ptr addrspace(1) %val
}
-define i8 addrspace(1)* @test.ok.1(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define ptr addrspace(1) @test.ok.1(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK: No illegal uses found by SafepointIRVerifier in: test.ok.1
bci_0:
br i1 undef, label %left, label %right
@@ -70,91 +70,91 @@ define i8 addrspace(1)* @test.ok.1(i8 addrspace(1)* %arg) gc "statepoint-example
br label %merge
merge:
- %val = phi i8 addrspace(1)* [ %arg, %left ], [ %arg, %right]
- ret i8 addrspace(1)* %val
+ %val = phi ptr addrspace(1) [ %arg, %left ], [ %arg, %right]
+ ret ptr addrspace(1) %val
}
; It should be allowed to compare poisoned ptr with null.
-define void @test.poisoned.cmp.ok(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define void @test.poisoned.cmp.ok(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK-LABEL: Verifying gc pointers in function: test.poisoned.cmp.ok
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(i8 addrspace(1)* %arg)]
- %arg.relocated = call i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %safepoint_token, i32 0, i32 0) ; arg, arg
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
+ %arg.relocated = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 0) ; arg, arg
br label %merge
right:
- %safepoint_token2 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(i8 addrspace(1)* %arg)]
+ %safepoint_token2 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
br label %merge
merge:
; CHECK: No illegal uses found by SafepointIRVerifier in: test.poisoned.cmp.ok
- %val.poisoned = phi i8 addrspace(1)* [ %arg.relocated, %left ], [ %arg, %right ]
- %c = icmp eq i8 addrspace(1)* %val.poisoned, null
+ %val.poisoned = phi ptr addrspace(1) [ %arg.relocated, %left ], [ %arg, %right ]
+ %c = icmp eq ptr addrspace(1) %val.poisoned, null
ret void
}
; It is illegal to compare poisoned ptr and relocated.
-define void @test.poisoned.cmp.fail.0(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define void @test.poisoned.cmp.fail.0(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK-LABEL: Verifying gc pointers in function: test.poisoned.cmp.fail.0
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(i8 addrspace(1)* %arg)]
- %arg.relocated = call i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %safepoint_token, i32 0, i32 0) ; arg, arg
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
+ %arg.relocated = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 0) ; arg, arg
br label %merge
right:
- %safepoint_token2 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(i8 addrspace(1)* %arg), "deopt"(i32 -1, i32 0, i32 0, i32 0)]
- %arg.relocated2 = call i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %safepoint_token2, i32 0, i32 0) ; arg, arg
+ %safepoint_token2 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg), "deopt"(i32 -1, i32 0, i32 0, i32 0)]
+ %arg.relocated2 = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token2, i32 0, i32 0) ; arg, arg
br label %merge
merge:
; CHECK: Illegal use of unrelocated value found!
-; CHECK-NEXT: Def: %val.poisoned = phi i8 addrspace(1)* [ %arg.relocated, %left ], [ %arg, %right ]
-; CHECK-NEXT: Use: %c = icmp eq i8 addrspace(1)* %val.poisoned, %val
- %val.poisoned = phi i8 addrspace(1)* [ %arg.relocated, %left ], [ %arg, %right ]
- %val = phi i8 addrspace(1)* [ %arg.relocated, %left ], [ %arg.relocated2, %right ]
- %c = icmp eq i8 addrspace(1)* %val.poisoned, %val
+; CHECK-NEXT: Def: %val.poisoned = phi ptr addrspace(1) [ %arg.relocated, %left ], [ %arg, %right ]
+; CHECK-NEXT: Use: %c = icmp eq ptr addrspace(1) %val.poisoned, %val
+ %val.poisoned = phi ptr addrspace(1) [ %arg.relocated, %left ], [ %arg, %right ]
+ %val = phi ptr addrspace(1) [ %arg.relocated, %left ], [ %arg.relocated2, %right ]
+ %c = icmp eq ptr addrspace(1) %val.poisoned, %val
ret void
}
; It is illegal to compare poisoned ptr and unrelocated.
-define void @test.poisoned.cmp.fail.1(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define void @test.poisoned.cmp.fail.1(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK-LABEL: Verifying gc pointers in function: test.poisoned.cmp.fail.1
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(i8 addrspace(1)* %arg)]
- %arg.relocated = call i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %safepoint_token, i32 0, i32 0) ; arg, arg
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
+ %arg.relocated = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 0) ; arg, arg
br label %merge
right:
- %safepoint_token2 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(i8 addrspace(1)* %arg), "deopt"(i32 -1, i32 0, i32 0, i32 0)]
- %arg.relocated2 = call i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %safepoint_token2, i32 0, i32 0) ; arg, arg
+ %safepoint_token2 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg), "deopt"(i32 -1, i32 0, i32 0, i32 0)]
+ %arg.relocated2 = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token2, i32 0, i32 0) ; arg, arg
br label %merge
merge:
; CHECK: Illegal use of unrelocated value found!
-; CHECK-NEXT: Def: %val.poisoned = phi i8 addrspace(1)* [ %arg.relocated, %left ], [ %arg, %right ]
-; CHECK-NEXT: Use: %c = icmp eq i8 addrspace(1)* %val.poisoned, %arg
- %val.poisoned = phi i8 addrspace(1)* [ %arg.relocated, %left ], [ %arg, %right ]
- %c = icmp eq i8 addrspace(1)* %val.poisoned, %arg
+; CHECK-NEXT: Def: %val.poisoned = phi ptr addrspace(1) [ %arg.relocated, %left ], [ %arg, %right ]
+; CHECK-NEXT: Use: %c = icmp eq ptr addrspace(1) %val.poisoned, %arg
+ %val.poisoned = phi ptr addrspace(1) [ %arg.relocated, %left ], [ %arg, %right ]
+ %c = icmp eq ptr addrspace(1) %val.poisoned, %arg
ret void
}
; It should be allowed to compare unrelocated phi with unrelocated value.
-define void @test.unrelocated-phi.cmp.ok(i8 addrspace(1)* %arg) gc "statepoint-example" {
+define void @test.unrelocated-phi.cmp.ok(ptr addrspace(1) %arg) gc "statepoint-example" {
; CHECK-LABEL: Verifying gc pointers in function: test.unrelocated-phi.cmp.ok
bci_0:
br i1 undef, label %left, label %right
left:
- %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
+ %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
br label %merge
right:
@@ -162,11 +162,11 @@ define void @test.unrelocated-phi.cmp.ok(i8 addrspace(1)* %arg) gc "statepoint-e
merge:
; CHECK: No illegal uses found by SafepointIRVerifier in: test.unrelocated-phi.cmp.ok
- %val.unrelocated = phi i8 addrspace(1)* [ %arg, %left ], [ null, %right ]
- %c = icmp eq i8 addrspace(1)* %val.unrelocated, %arg
+ %val.unrelocated = phi ptr addrspace(1) [ %arg, %left ], [ null, %right ]
+ %c = icmp eq ptr addrspace(1) %val.unrelocated, %arg
ret void
}
-declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
-declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32, i32)
+declare token @llvm.experimental.gc.statepoint.p0(i64, i32, ptr, i32, i32, ...)
+declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32, i32)
declare void @not_statepoint()