diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2015-04-10 21:22:52 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-10 21:23:04 +0000 |
commit | 31195f0bdca6ee2a5e72d07edf13e1d81206d949 (patch) | |
tree | 1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/Transforms/InstCombine/call-cast-target.ll | |
parent | c75239e6119d0f9a74c57099d91cbc9bde56bf33 (diff) | |
parent | 4c5e43da7792f75567b693105cc53e3f1992ad98 (diff) | |
download | external_llvm-31195f0bdca6ee2a5e72d07edf13e1d81206d949.zip external_llvm-31195f0bdca6ee2a5e72d07edf13e1d81206d949.tar.gz external_llvm-31195f0bdca6ee2a5e72d07edf13e1d81206d949.tar.bz2 |
Merge "Update aosp/master llvm for rebase to r233350"
Diffstat (limited to 'test/Transforms/InstCombine/call-cast-target.ll')
-rw-r--r-- | test/Transforms/InstCombine/call-cast-target.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/call-cast-target.ll b/test/Transforms/InstCombine/call-cast-target.ll index 4a5c949..881e807 100644 --- a/test/Transforms/InstCombine/call-cast-target.ll +++ b/test/Transforms/InstCombine/call-cast-target.ll @@ -72,3 +72,18 @@ entry: %call = tail call i32 bitcast (i32 (i32)* @fn4 to i32 (i32*)*)(i32* %a) ret i32 %call } + +declare i1 @fn5({ i32, i32 }* byval align 4 %r) + +define i1 @test5() { +; CHECK-LABEL: @test5 +; CHECK: %[[call:.*]] = call i1 bitcast (i1 ({ i32, i32 }*)* @fn5 to i1 (i32, i32)*)(i32 {{.*}}, i32 {{.*}}) +; CHECK-NEXT: ret i1 %[[call]] + %1 = alloca { i32, i32 }, align 4 + %2 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 0 + %3 = load i32, i32* %2, align 4 + %4 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %1, i32 0, i32 1 + %5 = load i32, i32* %4, align 4 + %6 = call i1 bitcast (i1 ({ i32, i32 }*)* @fn5 to i1 (i32, i32)*)(i32 %3, i32 %5) + ret i1 %6 +} |