• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -S -inline | FileCheck %s
2; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -S -passes='cgscc(inline)' | FileCheck %s
3; Check that we only inline when we have compatible target attributes.
4
5define i32 @foo() #0 {
6entry:
7  %call = call i32 (...) @baz()
8  ret i32 %call
9; CHECK-LABEL: foo
10; CHECK: call i32 (...) @baz()
11}
12declare i32 @baz(...) #0
13
14define i32 @bar() #1 {
15entry:
16  %call = call i32 @foo()
17  ret i32 %call
18; CHECK-LABEL: bar
19; CHECK: call i32 (...) @baz()
20}
21
22define i32 @qux() #0 {
23entry:
24  %call = call i32 @bar()
25  ret i32 %call
26; CHECK-LABEL: qux
27; CHECK: call i32 @bar()
28}
29
30define i32 @strict_align() #2 {
31entry:
32  %call = call i32 @foo()
33  ret i32 %call
34; CHECK-LABEL: strict_align
35; CHECK: call i32 (...) @baz()
36}
37
38attributes #0 = { "target-cpu"="generic" "target-features"="+crc,+neon" }
39attributes #1 = { "target-cpu"="generic" "target-features"="+crc,+neon,+crypto" }
40attributes #2 = { "target-cpu"="generic" "target-features"="+crc,+neon,+strict-align" }
41