Reid Kleckner | f9b67b8 | 2019-10-07 22:28:58 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=i686-unknown-linux | FileCheck %s |
| 2 | %struct.s = type {i32, i32, i32, i32, i32, i32, i32, i32, |
| 3 | i32, i32, i32, i32, i32, i32, i32, i32, |
| 4 | i32, i32, i32, i32, i32, i32, i32, i32 } |
| 5 | |
| 6 | define tailcc i32 @tailcallee(%struct.s* byval %a) nounwind { |
| 7 | entry: |
| 8 | %tmp2 = getelementptr %struct.s, %struct.s* %a, i32 0, i32 0 |
| 9 | %tmp3 = load i32, i32* %tmp2 |
| 10 | ret i32 %tmp3 |
| 11 | ; CHECK: tailcallee |
| 12 | ; CHECK: movl 4(%esp), %eax |
| 13 | } |
| 14 | |
| 15 | define tailcc i32 @tailcaller(%struct.s* byval %a) nounwind { |
| 16 | entry: |
| 17 | %tmp4 = tail call tailcc i32 @tailcallee(%struct.s* byval %a ) |
| 18 | ret i32 %tmp4 |
| 19 | ; CHECK: tailcaller |
| 20 | ; CHECK: jmp tailcallee |
| 21 | } |