File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
llvm/test/Transforms/Inline/PowerPC Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ ; RUN: opt < %s -mtriple=powerpc64le-ibm-linux-gnu -S -passes=inline | FileCheck %s
2+ ; RUN: opt < %s -mtriple=powerpc64le-ibm-linux-gnu -S -passes='cgscc(inline)' | FileCheck %s
3+
4+ target datalayout = "E-m:e-i64:64-n32:64"
5+ target triple = "powerpc64le-ibm-linux-gnu"
6+
7+ declare i32 @inlined ()
8+
9+ define i32 @foo () #0 {
10+ ; CHECK-LABEL: foo
11+ ; CHECK: entry
12+ ; CHECK-NEXT: call i32 @bar()
13+ ; CHECK-NEXT: call i32 @inlined()
14+ entry:
15+ %1 = call i32 @bar ()
16+ %2 = call i32 @baz ()
17+ %3 = add i32 %1 , %2
18+ ret i32 %3
19+ }
20+
21+ define i32 @bar () #1 {
22+ entry:
23+ %1 = call i32 @inlined ()
24+ ret i32 %1
25+ }
26+
27+ define i32 @baz () #0 {
28+ entry:
29+ %1 = call i32 @inlined ()
30+ ret i32 %1
31+ }
32+
33+ attributes #0 = { "target-cpu" ="pwr7" "target-features" ="+allow-unaligned-fp-access" }
34+
35+ ; We explictly disable -power8-vector to avoid emitting those instructions
36+ ; so we should not inline them into +power8-vector
37+ attributes #1 = { "target-cpu" ="pwr7" "target-features" ="-allow-unaligned-fp-access" }
You can’t perform that action at this time.
0 commit comments