diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-03-13 22:59:14 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-03-13 22:59:14 +0000 |
commit | fc0b80d9746e5fd4b45057ab814c67371fb0f9ea (patch) | |
tree | 4e1792d9877bf7d0f8cb6090004afe0f8cfc31df /test/CodeGen/X86/split-eh-lpad-edges.ll | |
parent | 557f7f88ba686886278f83159b7a629c24a47176 (diff) | |
download | llvm-fc0b80d9746e5fd4b45057ab814c67371fb0f9ea.tar.gz llvm-fc0b80d9746e5fd4b45057ab814c67371fb0f9ea.tar.bz2 llvm-fc0b80d9746e5fd4b45057ab814c67371fb0f9ea.tar.xz |
Fix PR3784: If the source of a phi comes from a bb ended with an invoke, make sure the copy is inserted before the try range (unless it's used as an input to the invoke, then insert it after the last use), not at the end of the bb.
Also re-apply r66140 which was disabled as a workaround.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/split-eh-lpad-edges.ll')
-rw-r--r-- | test/CodeGen/X86/split-eh-lpad-edges.ll | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/CodeGen/X86/split-eh-lpad-edges.ll b/test/CodeGen/X86/split-eh-lpad-edges.ll index 2cc8e54672..7808ad6316 100644 --- a/test/CodeGen/X86/split-eh-lpad-edges.ll +++ b/test/CodeGen/X86/split-eh-lpad-edges.ll @@ -1,5 +1,39 @@ ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | not grep jmp ; rdar://6647639 + + %struct.FetchPlanHeader = type { i8*, i8*, i32, i8*, i8*, i8*, i8*, i8*, %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...)*, %struct.__attributeDescriptionFlags } + %struct.NSArray = type { %struct.NSObject } + %struct.NSAutoreleasePool = type { %struct.NSObject, i8*, i8*, i8*, i8* } + %struct.NSObject = type { %struct.NSObject* } + %struct.__attributeDescriptionFlags = type <{ i32 }> + %struct._message_ref_t = type { %struct.NSObject* (%struct.NSObject*, %struct._message_ref_t*, ...)*, %struct.objc_selector* } + %struct.objc_selector = type opaque +@"\01l_objc_msgSend_fixup_alloc" = external global %struct._message_ref_t, align 16 ; <%struct._message_ref_t*> [#uses=2] + +define %struct.NSArray* @newFetchedRowsForFetchPlan_MT(%struct.FetchPlanHeader* %fetchPlan, %struct.objc_selector* %selectionMethod, %struct.NSObject* %selectionParameter) ssp { +entry: + %0 = invoke %struct.NSObject* null(%struct.NSObject* null, %struct._message_ref_t* @"\01l_objc_msgSend_fixup_alloc") + to label %invcont unwind label %lpad ; <%struct.NSObject*> [#uses=1] + +invcont: ; preds = %entry + %1 = invoke %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...)* @objc_msgSend(%struct.NSObject* %0, %struct.objc_selector* null) + to label %invcont26 unwind label %lpad ; <%struct.NSObject*> [#uses=0] + +invcont26: ; preds = %invcont + %2 = invoke %struct.NSObject* null(%struct.NSObject* null, %struct._message_ref_t* @"\01l_objc_msgSend_fixup_alloc") + to label %invcont27 unwind label %lpad ; <%struct.NSObject*> [#uses=0] + +invcont27: ; preds = %invcont26 + unreachable + +lpad: ; preds = %invcont26, %invcont, %entry + %pool.1 = phi %struct.NSAutoreleasePool* [ null, %entry ], [ null, %invcont ], [ null, %invcont26 ] ; <%struct.NSAutoreleasePool*> [#uses=0] + unreachable +} + +declare %struct.NSObject* @objc_msgSend(%struct.NSObject*, %struct.objc_selector*, ...) +; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | not grep jmp +; rdar://6647639 ; XFAIL: * %struct.FetchPlanHeader = type { i8*, i8*, i32, i8*, i8*, i8*, i8*, i8*, %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...)*, %struct.__attributeDescriptionFlags } |