summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-03-27 05:09:33 +0000
committerPhilip Reames <listmail@philipreames.com>2015-03-27 05:09:33 +0000
commite1bf27045de74e279a003a9d0d1a322c953a71d6 (patch)
tree8a5313c59874090509ff46627e0a5f5969fba692 /llvm/test/CodeGen
parentf8f0933b488bcbd1cc4b69a93bb18f8c33ce6847 (diff)
downloadbcm5719-llvm-e1bf27045de74e279a003a9d0d1a322c953a71d6.tar.gz
bcm5719-llvm-e1bf27045de74e279a003a9d0d1a322c953a71d6.zip
Require a GC strategy be specified for functions which use gc.statepoint
This was discussed a while back and I left it optional for migration. Since it's been far more than the 'week or two' that was discussed, time to actually make this manditory. llvm-svn: 233357
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Generic/overloaded-intrinsic-name.ll10
-rw-r--r--llvm/test/CodeGen/X86/statepoint-invoke.ll4
-rw-r--r--llvm/test/CodeGen/X86/statepoint-stack-usage.ll4
3 files changed, 10 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/Generic/overloaded-intrinsic-name.ll b/llvm/test/CodeGen/Generic/overloaded-intrinsic-name.ll
index aa6a031d8b7..722b5643269 100644
--- a/llvm/test/CodeGen/Generic/overloaded-intrinsic-name.ll
+++ b/llvm/test/CodeGen/Generic/overloaded-intrinsic-name.ll
@@ -12,28 +12,28 @@
; will serve the purpose.
; function and integer
-define i32* @test_iAny(i32* %v) {
+define i32* @test_iAny(i32* %v) gc "statepoint-example" {
%tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32* %v)
%v-new = call i32* @llvm.experimental.gc.relocate.p0i32(i32 %tok, i32 4, i32 4)
ret i32* %v-new
}
; float
-define float* @test_fAny(float* %v) {
+define float* @test_fAny(float* %v) gc "statepoint-example" {
%tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, float* %v)
%v-new = call float* @llvm.experimental.gc.relocate.p0f32(i32 %tok, i32 4, i32 4)
ret float* %v-new
}
; array of integers
-define [3 x i32]* @test_aAny([3 x i32]* %v) {
+define [3 x i32]* @test_aAny([3 x i32]* %v) gc "statepoint-example" {
%tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, [3 x i32]* %v)
%v-new = call [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(i32 %tok, i32 4, i32 4)
ret [3 x i32]* %v-new
}
; vector of integers
-define <3 x i32>* @test_vAny(<3 x i32>* %v) {
+define <3 x i32>* @test_vAny(<3 x i32>* %v) gc "statepoint-example" {
%tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, <3 x i32>* %v)
%v-new = call <3 x i32>* @llvm.experimental.gc.relocate.p0v3i32(i32 %tok, i32 4, i32 4)
ret <3 x i32>* %v-new
@@ -42,7 +42,7 @@ define <3 x i32>* @test_vAny(<3 x i32>* %v) {
%struct.test = type { i32, i1 }
; struct
-define %struct.test* @test_struct(%struct.test* %v) {
+define %struct.test* @test_struct(%struct.test* %v) gc "statepoint-example" {
%tok = call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, %struct.test* %v)
%v-new = call %struct.test* @llvm.experimental.gc.relocate.p0struct.test(i32 %tok, i32 4, i32 4)
ret %struct.test* %v-new
diff --git a/llvm/test/CodeGen/X86/statepoint-invoke.ll b/llvm/test/CodeGen/X86/statepoint-invoke.ll
index 91bf46a2a20..177eb96e0d6 100644
--- a/llvm/test/CodeGen/X86/statepoint-invoke.ll
+++ b/llvm/test/CodeGen/X86/statepoint-invoke.ll
@@ -6,7 +6,9 @@ declare i64 addrspace(1)* @"some_other_call"(i64 addrspace(1)*)
declare i32 @"personality_function"()
-define i64 addrspace(1)* @test_result(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) {
+define i64 addrspace(1)* @test_result(i64 addrspace(1)* %obj,
+ i64 addrspace(1)* %obj1)
+ gc "statepoint-example" {
entry:
; CHECK: .Ltmp{{[0-9]+}}:
; CHECK: callq some_other_call
diff --git a/llvm/test/CodeGen/X86/statepoint-stack-usage.ll b/llvm/test/CodeGen/X86/statepoint-stack-usage.ll
index 3ecef3345ff..65343d121ce 100644
--- a/llvm/test/CodeGen/X86/statepoint-stack-usage.ll
+++ b/llvm/test/CodeGen/X86/statepoint-stack-usage.ll
@@ -8,7 +8,7 @@ target triple = "x86_64-pc-linux-gnu"
; of GC arguments differ, niave lowering code would insert loads and
; stores to rearrange items on the stack. We need to make sure (for
; performance) that this doesn't happen.
-define i32 @back_to_back_calls(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #1 {
+define i32 @back_to_back_calls(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #1 gc "statepoint-example" {
; CHECK-LABEL: back_to_back_calls
; The exact stores don't matter, but there need to be three stack slots created
; CHECK: movq %rdx, 16(%rsp)
@@ -31,7 +31,7 @@ define i32 @back_to_back_calls(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 a
; This test simply checks that minor changes in vm state don't prevent slots
; being reused for gc values.
-define i32 @reserve_first(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #1 {
+define i32 @reserve_first(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #1 gc "statepoint-example" {
; CHECK-LABEL: reserve_first
; The exact stores don't matter, but there need to be three stack slots created
; CHECK: movq %rdx, 16(%rsp)
OpenPOWER on IntegriCloud