aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/call.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-01 18:11:34 +0000
committerChris Lattner <sabre@nondot.org>2010-02-01 18:11:34 +0000
commitd569561835b0fa4dbbb0fca1b1f0a8de6c01439a (patch)
treef0bf9cfda7327d5f4b3bc6bc62e68caa8d7b1f4e /test/Transforms/InstCombine/call.ll
parent830f3f205d8a77acbf8838fe78c2c733ca924d9c (diff)
downloadexternal_llvm-d569561835b0fa4dbbb0fca1b1f0a8de6c01439a.zip
external_llvm-d569561835b0fa4dbbb0fca1b1f0a8de6c01439a.tar.gz
external_llvm-d569561835b0fa4dbbb0fca1b1f0a8de6c01439a.tar.bz2
fix rdar://7590304, a miscompilation of objc apps on arm. The caller
of objc message send was getting marked arm_apcscc, but the prototype isn't. This is fine at runtime because objcmsgsend is implemented in assembly. Only turn a mismatched caller and callee into 'unreachable' if the callee is a definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/call.ll')
-rw-r--r--test/Transforms/InstCombine/call.ll22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/call.ll b/test/Transforms/InstCombine/call.ll
index 05c063d..dd65b96 100644
--- a/test/Transforms/InstCombine/call.ll
+++ b/test/Transforms/InstCombine/call.ll
@@ -75,7 +75,7 @@ define i32 @test5() {
declare i32 @test6a(i32)
define i32 @test6() {
- %X = call i32 bitcast (i32 (i32)* @test6a to i32 ()*)( ) ; <i32> [#uses=1]
+ %X = call i32 bitcast (i32 (i32)* @test6a to i32 ()*)( )
ret i32 %X
; CHECK: %X1 = call i32 @test6a(i32 0)
; CHECK: ret i32 %X1
@@ -96,3 +96,23 @@ define void @test7() {
}
+; rdar://7590304
+declare void @test8a()
+
+define i8* @test8() {
+ invoke arm_apcscc void @test8a()
+ to label %invoke.cont unwind label %try.handler
+
+invoke.cont: ; preds = %entry
+ unreachable
+
+try.handler: ; preds = %entry
+ ret i8* null
+}
+
+; Don't turn this into "unreachable": the callee and caller don't agree in
+; calling conv, but the implementation of test8a may actually end up using the
+; right calling conv.
+; CHECK: @test8() {
+; CHECK-NEXT: invoke arm_apcscc void @test8a()
+