Reid Kleckner | 710c1a4 | 2014-04-24 20:14:34 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -o /dev/null |
| 2 | |
| 3 | ; Should assemble without error. |
| 4 | |
| 5 | declare void @similar_param_ptrty_callee(i8*) |
| 6 | define void @similar_param_ptrty(i32*) { |
| 7 | musttail call void @similar_param_ptrty_callee(i8* null) |
| 8 | ret void |
| 9 | } |
| 10 | |
| 11 | declare i8* @similar_ret_ptrty_callee() |
| 12 | define i32* @similar_ret_ptrty() { |
| 13 | %v = musttail call i8* @similar_ret_ptrty_callee() |
| 14 | %w = bitcast i8* %v to i32* |
| 15 | ret i32* %w |
| 16 | } |
Reid Kleckner | dae2873 | 2014-08-29 21:25:28 +0000 | [diff] [blame] | 17 | |
| 18 | declare x86_thiscallcc void @varargs_thiscall(i8*, ...) |
| 19 | define x86_thiscallcc void @varargs_thiscall_thunk(i8* %this, ...) { |
David Blaikie | 32b845d | 2015-04-16 23:24:18 +0000 | [diff] [blame] | 20 | musttail call x86_thiscallcc void (i8*, ...) @varargs_thiscall(i8* %this, ...) |
Reid Kleckner | dae2873 | 2014-08-29 21:25:28 +0000 | [diff] [blame] | 21 | ret void |
| 22 | } |
| 23 | |
| 24 | declare x86_fastcallcc void @varargs_fastcall(i8*, ...) |
| 25 | define x86_fastcallcc void @varargs_fastcall_thunk(i8* %this, ...) { |
David Blaikie | 32b845d | 2015-04-16 23:24:18 +0000 | [diff] [blame] | 26 | musttail call x86_fastcallcc void (i8*, ...) @varargs_fastcall(i8* %this, ...) |
Reid Kleckner | dae2873 | 2014-08-29 21:25:28 +0000 | [diff] [blame] | 27 | ret void |
| 28 | } |
| 29 | |
| 30 | define x86_thiscallcc void @varargs_thiscall_unreachable(i8* %this, ...) { |
| 31 | unreachable |
| 32 | } |
| 33 | |
| 34 | define x86_thiscallcc void @varargs_thiscall_ret_unreachable(i8* %this, ...) { |
David Blaikie | 32b845d | 2015-04-16 23:24:18 +0000 | [diff] [blame] | 35 | musttail call x86_thiscallcc void (i8*, ...) @varargs_thiscall(i8* %this, ...) |
Reid Kleckner | dae2873 | 2014-08-29 21:25:28 +0000 | [diff] [blame] | 36 | ret void |
| 37 | bb1: |
| 38 | ret void |
| 39 | } |