1 ; RUN: opt < %s -mtriple=arm-unknown-linux-gnu -S -inline | FileCheck %s
2 ; RUN: opt < %s -mtriple=arm-unknown-linux-gnu -S -passes='cgscc(inline)' | FileCheck %s
3 ; Check that we only inline when we have compatible target attributes.
4 ; ARM has implemented a target attribute that will verify that the attribute
9 %call = call i32 (...) @baz()
12 ; CHECK: call i32 (...) @baz()
14 declare i32 @baz(...) #0
16 define i32 @bar() #1 {
18 %call = call i32 @foo()
21 ; CHECK: call i32 (...) @baz()
24 define i32 @qux() #0 {
26 %call = call i32 @bar()
29 ; CHECK: call i32 @bar()
32 define i32 @thumb_fn() #2 {
34 %call = call i32 @foo()
36 ; CHECK-LABEL: thumb_fn
37 ; CHECK: call i32 @foo
40 define i32 @strict_align() #3 {
42 %call = call i32 @foo()
44 ; CHECK-LABEL: strict_align
45 ; CHECK: call i32 (...) @baz()
48 define i32 @soft_float_fn() #4 {
50 %call = call i32 @foo()
52 ; CHECK-LABEL: soft_float_fn
53 ; CHECK: call i32 @foo
56 attributes #0 = { "target-cpu"="generic" "target-features"="+dsp,+neon" }
57 attributes #1 = { "target-cpu"="generic" "target-features"="+dsp,+neon,+fp16" }
58 attributes #2 = { "target-cpu"="generic" "target-features"="+dsp,+neon,+fp16,+thumb-mode" }
59 attributes #3 = { "target-cpu"="generic" "target-features"="+dsp,+neon,+strict-align" }
60 attributes #4 = { "target-cpu"="generic" "target-features"="+dsp,+neon,+fp16,+soft-float" }