|
4 | 4 |
|
5 | 5 | # RUN: llc --call-graph-section %s -run-pass=none -o - | FileCheck --match-full-lines %s |
6 | 6 | # CHECK-NOT: calleeTypeIds |
7 | | -# CHECK: name: _Z3barii |
| 7 | +# CHECK: name: bar |
8 | 8 | # CHECK: callSites: |
9 | 9 | # CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [] } |
10 | 10 | # CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [] } |
11 | | -# CHECK: name: _Z3fooii |
| 11 | +# CHECK: name: foo |
12 | 12 | # CHECK: callSites: |
13 | 13 | # CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [] } |
14 | 14 |
|
15 | | ---- | |
16 | | - declare !type !0 i32 @_Z4fizzii(i32 %x, i32 %y) |
17 | | - |
18 | | - declare !type !0 i32 @_Z4buzzii(i32 %x, i32 %y) |
19 | | - |
20 | | - define i32 @_Z3barii(i32 %x, i32 %y) !type !0 { |
| 15 | +--- | |
| 16 | + declare i32 @fizz(i32, i32) |
| 17 | + |
| 18 | + declare i32 @buzz(i32, i32) |
| 19 | + |
| 20 | + define i32 @bar(i32 %x, i32 %y) !type !0 { |
21 | 21 | entry: |
22 | | - %x.addr = alloca i32, align 4 |
23 | | - %y.addr = alloca i32, align 4 |
24 | | - store i32 %x, ptr %x.addr, align 4 |
25 | | - store i32 %y, ptr %y.addr, align 4 |
26 | | - %x_val = load i32, ptr %x.addr, align 4 |
27 | | - %y_val = load i32, ptr %y.addr, align 4 |
28 | | - %call = call i32 @_Z4buzzii(i32 %x_val, i32 %y_val) |
29 | | - %x_val_2 = load i32, ptr %x.addr, align 4 |
30 | | - %y_val_2 = load i32, ptr %y.addr, align 4 |
31 | | - %call1 = call i32 @_Z4fizzii(i32 %x_val_2, i32 %y_val_2) |
32 | | - %sub = sub nsw i32 %call, %call1 |
33 | | - ret i32 %sub |
| 22 | + %call = call i32 @buzz(i32 %x, i32 %x) |
| 23 | + %call1 = call i32 @fizz(i32 %x, i32 %x) |
| 24 | + ret i32 0 |
34 | 25 | } |
35 | 26 |
|
36 | | - define i32 @_Z3fooii(i32 %x, i32 %y) !type !0 { |
| 27 | + define i32 @foo(i32 %x, i32 %y) !type !0 { |
37 | 28 | entry: |
38 | | - %x.addr = alloca i32, align 4 |
39 | | - %y.addr = alloca i32, align 4 |
40 | | - store i32 %x, ptr %x.addr, align 4 |
41 | | - store i32 %y, ptr %y.addr, align 4 |
42 | | - %x_val = load i32, ptr %x.addr, align 4 |
43 | | - %y_val = load i32, ptr %y.addr, align 4 |
44 | | - %call = call i32 @_Z3barii(i32 %x_val, i32 %y_val) |
45 | | - ret i32 %call |
| 29 | + %call1 = call i32 @bar(i32 %x, i32 %x) |
| 30 | + ret i32 0 |
46 | 31 | } |
47 | 32 |
|
48 | 33 | !0 = !{i64 0, !"_ZTSFiiiE.generalized"} |
49 | | - |
50 | 34 | ... |
51 | 35 | --- |
52 | | -name: _Z3barii |
| 36 | +name: bar |
53 | 37 | callSites: |
54 | 38 | - { bb: 0, offset: 0, fwdArgRegs: [] } |
55 | 39 | - { bb: 0, offset: 1, fwdArgRegs: [] } |
56 | 40 | body: | |
57 | 41 | bb.0.entry: |
58 | | - CALL64pcrel32 @_Z4buzzii, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax |
59 | | - CALL64pcrel32 @_Z4fizzii, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax |
| 42 | + CALL64pcrel32 target-flags(x86-plt) @buzz, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax |
| 43 | + CALL64pcrel32 target-flags(x86-plt) @fizz, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax |
60 | 44 |
|
61 | 45 | ... |
62 | 46 | --- |
63 | | -name: _Z3fooii |
| 47 | +name: foo |
64 | 48 | callSites: |
65 | 49 | - { bb: 0, offset: 0, fwdArgRegs: [] } |
66 | 50 | body: | |
67 | 51 | bb.0.entry: |
68 | | - CALL64pcrel32 @_Z3barii, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax |
| 52 | + CALL64pcrel32 target-flags(x86-plt) @bar, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax |
69 | 53 |
|
70 | 54 | ... |
0 commit comments