diff options
author | Florian Hahn <florian.hahn@arm.com> | 2018-01-03 13:35:43 +0000 |
---|---|---|
committer | Florian Hahn <florian.hahn@arm.com> | 2018-01-03 13:35:43 +0000 |
commit | 158a5683af0f3796fa1233fb25f1140d3891b2ba (patch) | |
tree | 09de815afdc348de5e958f3e6469a46c4fb00403 /test | |
parent | b52179dcd3c31734771895cb15ce135b51b3c4ae (diff) |
[InstCombine] Add test to remove VarArg casts (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/call.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/call.ll b/test/Transforms/InstCombine/call.ll index 5307dcb6df7..c494bfb62c7 100644 --- a/test/Transforms/InstCombine/call.ll +++ b/test/Transforms/InstCombine/call.ll @@ -287,3 +287,14 @@ entry: ; CHECK-LABEL: @test17( ; CHECK: call i32 @pr28655(i32 0) ; CHECK: ret i32 0 + +define void @non_vararg(i8*, i32) { + ret void +} + +define void @test_cast_to_vararg(i8* %this) { +; CHECK-LABEL: test_cast_to_vararg +; CHECK: call void @non_vararg(i8* %this, i32 42) + call void (i8*, ...) bitcast (void (i8*, i32)* @non_vararg to void (i8*, ...)*)(i8* %this, i32 42) + ret void +} |