1; 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} 24 25; add deopt-lowering attribute as part of callsite 26define void @test2() gc "statepoint-example" { 27; CHECK-LABEL: @test2( 28; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @foo, i32 0, i32 2, i32 0, i32 1, i32 57) 29 30entry: 31 call void @foo() "deopt-lowering"="live-in" [ "deopt"(i32 57) ] 32 ret void 33} 34 35