Arnold Schwaighofer | 9779494 | 2007-11-10 10:48:01 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -march=x86 -tailcallopt | grep TAILCALL |
Arnold Schwaighofer | a38df10 | 2008-04-12 18:11:06 +0000 | [diff] [blame^] | 2 | ; check for the 2 byval moves |
| 3 | ; RUN: llvm-as < %s | llc -march=x86 -tailcallopt | grep rep | wc -l | grep 2 |
| 4 | %struct.s = type {i32, i32, i32, i32, i32, i32, i32, i32, |
| 5 | i32, i32, i32, i32, i32, i32, i32, i32, |
| 6 | i32, i32, i32, i32, i32, i32, i32, i32 } |
Arnold Schwaighofer | 9779494 | 2007-11-10 10:48:01 +0000 | [diff] [blame] | 7 | |
| 8 | define fastcc i32 @tailcallee(%struct.s* byval %a) { |
| 9 | entry: |
| 10 | %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0 |
| 11 | %tmp3 = load i32* %tmp2 |
| 12 | ret i32 %tmp3 |
| 13 | } |
| 14 | |
| 15 | define fastcc i32 @tailcaller(%struct.s* byval %a) { |
| 16 | entry: |
| 17 | %tmp4 = tail call fastcc i32 @tailcallee(%struct.s* %a byval) |
| 18 | ret i32 %tmp4 |
| 19 | } |