|
4 | 4 | target datalayout = "E-m:e-i64:64-n32:64" |
5 | 5 | target triple = "powerpc64le-ibm-linux-gnu" |
6 | 6 |
|
7 | | -declare i32 @inlined() |
| 7 | +declare void @inlined() |
8 | 8 |
|
9 | | -define i32 @foo() #0 { |
10 | | -; CHECK-LABEL: foo |
| 9 | +define void @explicit() #0 { |
| 10 | +; CHECK-LABEL: explicit |
11 | 11 | ; CHECK: entry |
12 | | -; CHECK-NEXT: call i32 @bar() |
13 | | -; CHECK-NEXT: call i32 @inlined() |
| 12 | +; CHECK-NEXT: call void @not_compatible1() |
| 13 | +; CHECK-NEXT: call void @inlined() |
14 | 14 | entry: |
15 | | - %1 = call i32 @bar() |
16 | | - %2 = call i32 @baz() |
17 | | - %3 = add i32 %1, %2 |
18 | | - ret i32 %3 |
| 15 | + call void @not_compatible1() |
| 16 | + call void @compatible1() |
| 17 | + ret void |
19 | 18 | } |
20 | 19 |
|
21 | | -define i32 @bar() #1 { |
| 20 | +define void @not_compatible1() #1 { |
22 | 21 | entry: |
23 | | - %1 = call i32 @inlined() |
24 | | - ret i32 %1 |
| 22 | + call i32 @inlined() |
| 23 | + ret void |
25 | 24 | } |
26 | 25 |
|
27 | | -define i32 @baz() #0 { |
| 26 | +define void @compatible1() #0 { |
28 | 27 | entry: |
29 | | - %1 = call i32 @inlined() |
30 | | - ret i32 %1 |
| 28 | + call void @inlined() |
| 29 | + ret void |
31 | 30 | } |
32 | 31 |
|
| 32 | +define void @default() #3 { |
| 33 | +; CHECK-LABEL: default |
| 34 | +; CHECK: entry |
| 35 | +; CHECK-NEXT: call void @not_compatible2() |
| 36 | +; CHECK-NEXT: call void @inlined() |
| 37 | +entry: |
| 38 | + call void @not_compatible2() |
| 39 | + call void @compatible2() |
| 40 | + ret void |
| 41 | +} |
| 42 | + |
| 43 | +define void @not_compatible2() #4 { |
| 44 | +entry: |
| 45 | + call void @inlined() |
| 46 | + ret void |
| 47 | +} |
| 48 | + |
| 49 | +define void @compatible2() #5 { |
| 50 | +entry: |
| 51 | + call void @inlined() |
| 52 | + ret void |
| 53 | +} |
| 54 | + |
| 55 | +; explicit |
33 | 56 | attributes #0 = { "target-cpu"="pwr7" "target-features"="+allow-unaligned-fp-access" } |
34 | 57 | attributes #1 = { "target-cpu"="pwr7" "target-features"="-allow-unaligned-fp-access" } |
| 58 | + |
| 59 | +; pwr7 by default implies +vsx |
| 60 | +attributes #3 = { "target-cpu"="pwr7" } |
| 61 | +attributes #4 = { "target-cpu"="pwr7" "target-features"="-vsx" } |
| 62 | +attributes #5 = { "target-cpu"="pwr7" "target-features"="+vsx" } |
| 63 | + |
0 commit comments