summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/basic.ll35
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/call-in-loop.ll5
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/finite-loops.ll28
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/no-statepoints.ll2
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/patchable-statepoints.ll44
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/split-backedge.ll6
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll4
-rw-r--r--llvm/test/Transforms/PlaceSafepoints/statepoint-frameescape.ll2
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/call-gc-result.ll (renamed from llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll)6
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/invokes.ll (renamed from llvm/test/Transforms/PlaceSafepoints/invokes.ll)8
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/leaf-function.ll (renamed from llvm/test/Transforms/PlaceSafepoints/leaf-function.ll)8
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-calling-conventions.ll (renamed from llvm/test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll)8
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-coreclr.ll31
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-format.ll (renamed from llvm/test/Transforms/PlaceSafepoints/statepoint-format.ll)8
14 files changed, 80 insertions, 115 deletions
diff --git a/llvm/test/Transforms/PlaceSafepoints/basic.ll b/llvm/test/Transforms/PlaceSafepoints/basic.ll
index ade219e3703..5cbf2798f4a 100644
--- a/llvm/test/Transforms/PlaceSafepoints/basic.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/basic.ll
@@ -6,7 +6,7 @@ define void @test_entry() gc "statepoint-example" {
; CHECK-LABEL: @test_entry
entry:
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
ret void
}
@@ -14,7 +14,7 @@ entry:
define void @test_negative() {
; CHECK-LABEL: @test_negative
entry:
-; CHECK-NOT: statepoint
+; CHECK-NOT: do_safepoint
ret void
}
@@ -25,13 +25,12 @@ define void @test_backedge() gc "statepoint-example" {
entry:
; CHECK-LABEL: entry
; This statepoint is technically not required, but we don't exploit that yet.
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
br label %other
; CHECK-LABEL: other
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
other:
- call void undef()
br label %other
}
@@ -41,40 +40,24 @@ define void @test_unreachable() gc "statepoint-example" {
; CHECK-LABEL: test_unreachable
entry:
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
ret void
; CHECK-NOT: other
-; CHECK-NOT: statepoint
+; CHECK-NOT: do_safepoint
other:
br label %other
}
declare void @foo()
-; Do we turn a call into it's own statepoint
-define void @test_simple_call() gc "statepoint-example" {
-; CHECK-LABEL: test_simple_call
-entry:
- br label %other
-other:
-; CHECK-LABEL: other
-; CHECK: statepoint
-; CHECK-NOT: gc.result
- call void @foo()
- ret void
-}
-
declare zeroext i1 @i1_return_i1(i1)
define i1 @test_call_with_result() gc "statepoint-example" {
; CHECK-LABEL: test_call_with_result
-; This is checking that a statepoint_poll + statepoint + result is
-; inserted for a function that takes 1 argument.
-; CHECK: gc.statepoint.p0f_isVoidf
-; CHECK: gc.statepoint.p0f_i1i1f
-; CHECK: (i64 2882400000, i32 0, i1 (i1)* @i1_return_i1, i32 1, i32 0, i1 false, i32 0, i32 0)
-; CHECK: %call12 = call i1 @llvm.experimental.gc.result.i1
+; This is checking that a statepoint_poll is inserted for a function
+; that takes 1 argument.
+; CHECK: call void @do_safepoint
entry:
%call1 = tail call i1 (i1) @i1_return_i1(i1 false)
ret i1 %call1
diff --git a/llvm/test/Transforms/PlaceSafepoints/call-in-loop.ll b/llvm/test/Transforms/PlaceSafepoints/call-in-loop.ll
index 003548ffad7..7601b6c81fe 100644
--- a/llvm/test/Transforms/PlaceSafepoints/call-in-loop.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/call-in-loop.ll
@@ -10,13 +10,12 @@ define void @test1() gc "statepoint-example" {
entry:
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
br label %loop
loop:
; CHECK-LABEL: loop
-; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @foo
-; CHECK-NOT: statepoint
+; CHECK-NOT: call void @do_safepoint
call void @foo()
br label %loop
}
diff --git a/llvm/test/Transforms/PlaceSafepoints/finite-loops.ll b/llvm/test/Transforms/PlaceSafepoints/finite-loops.ll
index ea090eea1bc..e7d51878196 100644
--- a/llvm/test/Transforms/PlaceSafepoints/finite-loops.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/finite-loops.ll
@@ -8,9 +8,9 @@
define void @test1(i32) gc "statepoint-example" {
; CHECK-LABEL: test1
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: loop
-; CHECK-NOT: statepoint
+; CHECK-NOT: call void @do_safepoint
; CHECK-LABEL: exit
entry:
@@ -30,9 +30,9 @@ exit:
define void @test2(i32) gc "statepoint-example" {
; CHECK-LABEL: test2
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: loop
-; CHECK-NOT: statepoint
+; CHECK-NOT: call void @do_safepoint
; CHECK-LABEL: exit
entry:
@@ -55,9 +55,9 @@ exit:
define void @test3(i8 %upper) gc "statepoint-example" {
; CHECK-LABEL: test3
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: loop
-; CHECK-NOT: statepoint
+; CHECK-NOT: call void @do_safepoint
; CHECK-LABEL: exit
entry:
@@ -77,16 +77,16 @@ exit:
define void @test4(i64 %upper) gc "statepoint-example" {
; CHECK-LABEL: test4
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: loop
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: exit
; COUNTED-64-LABEL: test4
; COUNTED-64-LABEL: entry
-; COUNTED-64: statepoint
+; COUNTED-64: call void @do_safepoint
; COUNTED-64-LABEL: loop
-; COUNTED-64-NOT: statepoint
+; COUNTED-64-NOT: call void @do_safepoint
; COUNTED-64-LABEL: exit
entry:
@@ -107,16 +107,16 @@ exit:
define void @test5(i64 %upper) gc "statepoint-example" {
; CHECK-LABEL: test5
; CHECK-LABEL: entry
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: loop
-; CHECK: statepoint
+; CHECK: call void @do_safepoint
; CHECK-LABEL: exit
; COUNTED-64-LABEL: test5
; COUNTED-64-LABEL: entry
-; COUNTED-64: statepoint
+; COUNTED-64: call void @do_safepoint
; COUNTED-64-LABEL: loop
-; COUNTED-64: statepoint
+; COUNTED-64: call void @do_safepoint
; COUNTED-64-LABEL: exit
entry:
diff --git a/llvm/test/Transforms/PlaceSafepoints/no-statepoints.ll b/llvm/test/Transforms/PlaceSafepoints/no-statepoints.ll
index 3e4988cb316..698f295f5f9 100644
--- a/llvm/test/Transforms/PlaceSafepoints/no-statepoints.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/no-statepoints.ll
@@ -1,4 +1,4 @@
-; RUN: opt -spp-no-statepoints -S -place-safepoints < %s | FileCheck %s
+; RUN: opt -S -place-safepoints < %s | FileCheck %s
define void @test() gc "statepoint-example" {
; CHECK-LABEL: test(
diff --git a/llvm/test/Transforms/PlaceSafepoints/patchable-statepoints.ll b/llvm/test/Transforms/PlaceSafepoints/patchable-statepoints.ll
deleted file mode 100644
index 2303ac7ef51..00000000000
--- a/llvm/test/Transforms/PlaceSafepoints/patchable-statepoints.ll
+++ /dev/null
@@ -1,44 +0,0 @@
-; RUN: opt -place-safepoints -S < %s | FileCheck %s
-
-declare void @f()
-declare i32 @personality_function()
-
-define void @test_id() gc "statepoint-example" personality i32 ()* @personality_function {
-; CHECK-LABEL: @test_id(
-entry:
-; CHECK-LABEL: entry:
-; CHECK: invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 100, i32 0, void ()* @f
- invoke void @f() "statepoint-id"="100" to label %normal_return unwind label %exceptional_return
-
-normal_return:
- ret void
-
-exceptional_return:
- %landing_pad4 = landingpad {i8*, i32} cleanup
- ret void
-}
-
-define void @test_num_patch_bytes() gc "statepoint-example" personality i32 ()* @personality_function {
-; CHECK-LABEL: @test_num_patch_bytes(
-entry:
-; CHECK-LABEL: entry:
-; CHECK: invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 99, void ()* @f,
- invoke void @f() "statepoint-num-patch-bytes"="99" to label %normal_return unwind label %exceptional_return
-
-normal_return:
- ret void
-
-exceptional_return:
- %landing_pad4 = landingpad {i8*, i32} cleanup
- ret void
-}
-
-declare void @do_safepoint()
-define void @gc.safepoint_poll() {
-entry:
- call void @do_safepoint()
- ret void
-}
-
-; CHECK-NOT: statepoint-id
-; CHECK-NOT: statepoint-num-patch_bytes
diff --git a/llvm/test/Transforms/PlaceSafepoints/split-backedge.ll b/llvm/test/Transforms/PlaceSafepoints/split-backedge.ll
index 5695441408a..82dc5277135 100644
--- a/llvm/test/Transforms/PlaceSafepoints/split-backedge.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/split-backedge.ll
@@ -4,7 +4,7 @@
define void @test(i32, i1 %cond) gc "statepoint-example" {
; CHECK-LABEL: @test
; CHECK-LABEL: loop.loop_crit_edge
-; CHECK: gc.statepoint
+; CHECK: call void @do_safepoint
; CHECK-NEXT: br label %loop
entry:
br label %loop
@@ -23,10 +23,10 @@ exit:
define void @test2(i32, i1 %cond) gc "statepoint-example" {
; CHECK-LABEL: @test2
; CHECK-LABEL: loop2.loop2_crit_edge:
-; CHECK: gc.statepoint
+; CHECK: call void @do_safepoint
; CHECK-NEXT: br label %loop2
; CHECK-LABEL: loop2.loop_crit_edge:
-; CHECK: gc.statepoint
+; CHECK: call void @do_safepoint
; CHECK-NEXT: br label %loop
entry:
br label %loop
diff --git a/llvm/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll b/llvm/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll
index 3cc3b1805eb..5914b2c5141 100644
--- a/llvm/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll
@@ -8,11 +8,9 @@ declare void @foo()
define void @test_simple_call() gc "coreclr" {
; CHECK-LABEL: test_simple_call
entry:
+; CHECK: call void @do_safepoint
br label %other
other:
-; CHECK-LABEL: other
-; CHECK: statepoint
-; CHECK-NOT: gc.result
call void @foo()
ret void
}
diff --git a/llvm/test/Transforms/PlaceSafepoints/statepoint-frameescape.ll b/llvm/test/Transforms/PlaceSafepoints/statepoint-frameescape.ll
index 13a5c6e6d8d..bd646bd2f54 100644
--- a/llvm/test/Transforms/PlaceSafepoints/statepoint-frameescape.ll
+++ b/llvm/test/Transforms/PlaceSafepoints/statepoint-frameescape.ll
@@ -9,7 +9,7 @@ entry:
; CHECK-LABEL: entry
; CHECK-NEXT: alloca
; CHECK-NEXT: localescape
-; CHECK-NEXT: statepoint
+; CHECK-NEXT: call void @do_safepoint
%ptr = alloca i32
call void (...) @llvm.localescape(i32* %ptr)
ret void
diff --git a/llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/call-gc-result.ll
index a382cea3b14..d3c37cef9c5 100644
--- a/llvm/test/Transforms/PlaceSafepoints/call_gc_result.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/call-gc-result.ll
@@ -1,4 +1,4 @@
-;; RUN: opt < %s -place-safepoints -S | FileCheck %s
+;; RUN: opt < %s -rewrite-statepoints-for-gc -rs4gc-use-deopt-bundles -S | FileCheck %s
;; This test is to verify that gc_result from a call statepoint
;; can have preceding phis in its parent basic block. Unlike
@@ -21,8 +21,8 @@ branch2:
merge:
;; CHECK: %phi = phi i32 [ %a, %branch2 ], [ %b, %branch1 ]
-;; CHECK-NEXT: %safepoint_token1 = call token (i64, i32, i32 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32f(i64 2882400000, i32 0, i32 ()* @foo, i32 0, i32 0, i32 0, i32 0)
-;; CHECK-NEXT: %ret2 = call i32 @llvm.experimental.gc.result.i32(token %safepoint_token1)
+;; CHECK-NEXT: [[TOKEN:%[^ ]+]] = call token (i64, i32, i32 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32f(i64 2882400000, i32 0, i32 ()* @foo, i32 0, i32 0, i32 0, i32 0
+;; CHECK-NEXT: call i32 @llvm.experimental.gc.result.i32(token [[TOKEN]])
%phi = phi i32 [ %a, %branch2 ], [ %b, %branch1 ]
%ret = call i32 @foo()
ret i32 %ret
diff --git a/llvm/test/Transforms/PlaceSafepoints/invokes.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/invokes.ll
index e5258c18952..ac0c1740fd0 100644
--- a/llvm/test/Transforms/PlaceSafepoints/invokes.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/invokes.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -S -place-safepoints | FileCheck %s
+; RUN: opt < %s -S -rewrite-statepoints-for-gc -rs4gc-use-deopt-bundles | FileCheck %s
declare i64 addrspace(1)* @some_call(i64 addrspace(1)*)
declare i32 @personality_function()
@@ -24,7 +24,7 @@ normal_return:
; CHECK: ret i64
exceptional_return:
- %landing_pad4 = landingpad {i8*, i32}
+ %landing_pad4 = landingpad token
cleanup
ret i64 addrspace(1)* %obj1
}
@@ -56,7 +56,7 @@ normal_return:
; CHECK: ret i64
exceptional_return:
- %landing_pad4 = landingpad {i8*, i32}
+ %landing_pad4 = landingpad token
cleanup
ret i64 addrspace(1)* %obj1
}
@@ -94,7 +94,7 @@ merge:
; CHECK: ret i64 addrspace(1)*
exceptional_return:
- %landing_pad4 = landingpad {i8*, i32}
+ %landing_pad4 = landingpad token
cleanup
ret i64 addrspace(1)* %obj
}
diff --git a/llvm/test/Transforms/PlaceSafepoints/leaf-function.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/leaf-function.ll
index 5d914c12778..79757a3dc90 100644
--- a/llvm/test/Transforms/PlaceSafepoints/leaf-function.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/leaf-function.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -S -place-safepoints | FileCheck %s
+; RUN: opt < %s -S -rewrite-statepoints-for-gc -rs4gc-use-deopt-bundles | FileCheck %s
declare void @foo() "gc-leaf-function"
declare void @bar()
@@ -7,8 +7,7 @@ declare void @bar()
; into a safepoint. An entry safepoint should get inserted, though.
define void @test_leaf_function() gc "statepoint-example" {
; CHECK-LABEL: test_leaf_function
-; CHECK: gc.statepoint.p0f_isVoidf
-; CHECK-NOT: statepoint
+; CHECK-NOT: gc.statepoint
; CHECK-NOT: gc.result
entry:
call void @foo()
@@ -17,8 +16,7 @@ entry:
define void @test_leaf_function_call() gc "statepoint-example" {
; CHECK-LABEL: test_leaf_function_call
-; CHECK: gc.statepoint.p0f_isVoidf
-; CHECK-NOT: statepoint
+; CHECK-NOT: gc.statepoint
; CHECK-NOT: gc.result
entry:
call void @bar() "gc-leaf-function"
diff --git a/llvm/test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-calling-conventions.ll
index eaefefa7ad1..c1cd4be035d 100644
--- a/llvm/test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-calling-conventions.ll
@@ -1,4 +1,4 @@
-; RUN: opt -place-safepoints -S < %s | FileCheck %s
+; RUN: opt -rewrite-statepoints-for-gc -rs4gc-use-deopt-bundles -S < %s | FileCheck %s
; Ensure that the gc.statepoint calls / invokes we generate carry over
; the right calling conventions.
@@ -6,7 +6,7 @@
define i64 addrspace(1)* @test_invoke_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @personality {
; CHECK-LABEL: @test_invoke_format(
; CHECK-LABEL: entry:
-; CHECK: invoke coldcc token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0)
+; CHECK: invoke coldcc token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0
entry:
%ret_val = invoke coldcc i64 addrspace(1)* @callee(i64 addrspace(1)* %obj)
to label %normal_return unwind label %exceptional_return
@@ -15,7 +15,7 @@ normal_return:
ret i64 addrspace(1)* %ret_val
exceptional_return:
- %landing_pad4 = landingpad {i8*, i32}
+ %landing_pad4 = landingpad token
cleanup
ret i64 addrspace(1)* %obj1
}
@@ -23,7 +23,7 @@ exceptional_return:
define i64 addrspace(1)* @test_call_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" {
; CHECK-LABEL: @test_call_format(
; CHECK-LABEL: entry:
-; CHECK: call coldcc token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0)
+; CHECK: call coldcc token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0
entry:
%ret_val = call coldcc i64 addrspace(1)* @callee(i64 addrspace(1)* %obj)
ret i64 addrspace(1)* %ret_val
diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-coreclr.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-coreclr.ll
new file mode 100644
index 00000000000..d8648a5afd6
--- /dev/null
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-coreclr.ll
@@ -0,0 +1,31 @@
+; RUN: opt < %s -S -rewrite-statepoints-for-gc -rs4gc-use-deopt-bundles | FileCheck %s
+
+; Basic test to make sure that safepoints are placed
+; for CoreCLR GC
+
+declare void @foo()
+
+define void @test_simple_call() gc "coreclr" {
+; CHECK-LABEL: test_simple_call
+entry:
+ br label %other
+other:
+; CHECK-LABEL: other
+; CHECK: statepoint
+; CHECK-NOT: gc.result
+ call void @foo()
+ ret void
+}
+
+; This function is inlined when inserting a poll. To avoid recursive
+; issues, make sure we don't place safepoints in it.
+declare void @do_safepoint()
+define void @gc.safepoint_poll() {
+; CHECK-LABEL: gc.safepoint_poll
+; CHECK-LABEL: entry
+; CHECK-NEXT: do_safepoint
+; CHECK-NEXT: ret void
+entry:
+ call void @do_safepoint()
+ ret void
+}
diff --git a/llvm/test/Transforms/PlaceSafepoints/statepoint-format.ll b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-format.ll
index c3712a3ace0..ebf89aac9d2 100644
--- a/llvm/test/Transforms/PlaceSafepoints/statepoint-format.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/deopt-bundles/statepoint-format.ll
@@ -1,4 +1,4 @@
-; RUN: opt -place-safepoints -S < %s | FileCheck %s
+; RUN: opt -rewrite-statepoints-for-gc -rs4gc-use-deopt-bundles -S < %s | FileCheck %s
; Ensure that the gc.statepoint calls / invokes we generate have the
; set of arguments we expect it to have.
@@ -6,7 +6,7 @@
define i64 addrspace(1)* @test_invoke_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @personality {
; CHECK-LABEL: @test_invoke_format(
; CHECK-LABEL: entry:
-; CHECK: invoke token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0)
+; CHECK: invoke token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0, i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1)
entry:
%ret_val = invoke i64 addrspace(1)* @callee(i64 addrspace(1)* %obj)
to label %normal_return unwind label %exceptional_return
@@ -15,7 +15,7 @@ normal_return:
ret i64 addrspace(1)* %ret_val
exceptional_return:
- %landing_pad4 = landingpad {i8*, i32}
+ %landing_pad4 = landingpad token
cleanup
ret i64 addrspace(1)* %obj1
}
@@ -23,7 +23,7 @@ exceptional_return:
define i64 addrspace(1)* @test_call_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" {
; CHECK-LABEL: @test_call_format(
; CHECK-LABEL: entry:
-; CHECK: call token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0)
+; CHECK: call token (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0, i64 addrspace(1)* %obj)
entry:
%ret_val = call i64 addrspace(1)* @callee(i64 addrspace(1)* %obj)
ret i64 addrspace(1)* %ret_val
OpenPOWER on IntegriCloud