blob: 22ca5cad1da2c1d5534b76d98c2115b354fe9455 [file] [log] [blame]
Philip Reames2b1084a2016-08-31 15:12:17 +00001; RUN: opt -rewrite-statepoints-for-gc -S < %s | FileCheck %s
2; Check that the "deopt-lowering" function attribute gets transcoded into
3; flags on the resulting statepoint
4
5target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6target triple = "x86_64-apple-macosx10.11.0"
7
8declare void @foo()
9declare void @bar() "deopt-lowering"="live-in"
10declare void @baz() "deopt-lowering"="live-through"
11
12define void @test1() gc "statepoint-example" {
13; CHECK-LABEL: @test1(
14; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 1, i32 57)
15; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @bar, i32 0, i32 2, i32 0, i32 1, i32 42)
16; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @baz, i32 0, i32 0, i32 0, i32 1, i32 13)
17
18entry:
19 call void @foo() [ "deopt"(i32 57) ]
20 call void @bar() [ "deopt"(i32 42) ]
21 call void @baz() [ "deopt"(i32 13) ]
22 ret void
23}