OSDN Git Service

[ARM] Fix typo in test added in r307889
[android-x86/external-llvm.git] / test / Transforms / Inline / ARM / inline-target-attr.ll
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
5 ; sets are compatible.
6
7 define i32 @foo() #0 {
8 entry:
9   %call = call i32 (...) @baz()
10   ret i32 %call
11 ; CHECK-LABEL: foo
12 ; CHECK: call i32 (...) @baz()
13 }
14 declare i32 @baz(...) #0
15
16 define i32 @bar() #1 {
17 entry:
18   %call = call i32 @foo()
19   ret i32 %call
20 ; CHECK-LABEL: bar
21 ; CHECK: call i32 (...) @baz()
22 }
23
24 define i32 @qux() #0 {
25 entry:
26   %call = call i32 @bar()
27   ret i32 %call
28 ; CHECK-LABEL: qux
29 ; CHECK: call i32 @bar()
30 }
31
32 define i32 @thumb_fn() #2 {
33 entry:
34   %call = call i32 @foo()
35   ret i32 %call
36 ; CHECK-LABEL: thumb_fn
37 ; CHECK: call i32 @foo
38 }
39
40 define i32 @strict_align() #3 {
41 entry:
42   %call = call i32 @foo()
43   ret i32 %call
44 ; CHECK-LABEL: strict_align
45 ; CHECK: call i32 (...) @baz()
46 }
47
48 define i32 @soft_float_fn() #4 {
49 entry:
50   %call = call i32 @foo()
51   ret i32 %call
52 ; CHECK-LABEL: soft_float_fn
53 ; CHECK: call i32 @foo
54 }
55
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" }