1 ; RUN: opt < %s -globalopt -S | FileCheck %s
3 define internal i32 @f(i32* %m) {
4 ; CHECK-LABEL: define internal fastcc i32 @f
9 define internal x86_thiscallcc i32 @g(i32* %m) {
10 ; CHECK-LABEL: define internal fastcc i32 @g
11 %v = load i32, i32* %m
15 ; Leave this one alone, because the user went out of their way to request this
17 define internal coldcc i32 @h(i32* %m) {
18 ; CHECK-LABEL: define internal coldcc i32 @h
19 %v = load i32, i32* %m
23 define internal i32 @j(i32* %m) {
24 ; CHECK-LABEL: define internal i32 @j
25 %v = load i32, i32* %m
29 define internal i32 @inalloca(i32* inalloca %p) {
30 ; CHECK-LABEL: define internal fastcc i32 @inalloca(i32* %p)
31 %rv = load i32, i32* %p
35 define void @call_things() {
38 call x86_thiscallcc i32 @g(i32* %m)
39 call coldcc i32 @h(i32* %m)
41 %args = alloca inalloca i32
42 call i32 @inalloca(i32* inalloca %args)
46 @llvm.used = appending global [1 x i8*] [
47 i8* bitcast (i32(i32*)* @j to i8*)
48 ], section "llvm.metadata"
50 ; CHECK-LABEL: define void @call_things()
51 ; CHECK: call fastcc i32 @f
52 ; CHECK: call fastcc i32 @g
53 ; CHECK: call coldcc i32 @h
55 ; CHECK: call fastcc i32 @inalloca(i32* %args)