summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-01-18 22:47:12 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-01-18 22:47:12 +0000
commit6d2bd95ff1c6edf7ffdeefa826e382743de1f649 (patch)
tree08e0a61419e5553233783841c7f3349f463427ab /test/Transforms
parentc97595849897fff829ec34cf37ac09760b8539dc (diff)
downloadllvm-6d2bd95ff1c6edf7ffdeefa826e382743de1f649.tar.gz
llvm-6d2bd95ff1c6edf7ffdeefa826e382743de1f649.tar.bz2
llvm-6d2bd95ff1c6edf7ffdeefa826e382743de1f649.tar.xz
Don't refuse to transform constexpr(call(arg, ...)) to call(constexpr(arg), ...)) just because the function has multiple return values even if their return types are the same. Patch by Eduard Burtescu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/call-cast-target.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/call-cast-target.ll b/test/Transforms/InstCombine/call-cast-target.ll
index 315c51683f..1af3317a39 100644
--- a/test/Transforms/InstCombine/call-cast-target.ll
+++ b/test/Transforms/InstCombine/call-cast-target.ll
@@ -13,3 +13,15 @@ entry:
declare i8* @ctime(i32*)
+define internal { i8 } @foo(i32*) {
+entry:
+ ret { i8 } { i8 0 }
+}
+
+define void @test_struct_ret() {
+; CHECK-LABEL: @test_struct_ret
+; CHECK-NOT: bitcast
+entry:
+ %0 = call { i8 } bitcast ({ i8 } (i32*)* @foo to { i8 } (i16*)*)(i16* null)
+ ret void
+}