Revert commit 66140 since it caused several failures
authorDuncan Sands <baldrick@free.fr>
Thu, 12 Mar 2009 21:13:42 +0000 (21:13 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 12 Mar 2009 21:13:42 +0000 (21:13 +0000)
in the Ada testcase.  Reverting this only covers up
the real problem, which is a nasty conceptual difficulty
in the phi elimination pass: when eliminating phi nodes
in landing pads, the register copies need to come before
the invoke, not at the end of the basic block which is
too late...  See PR3784.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66826 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/CodeGenPrepare.cpp
test/CodeGen/X86/split-eh-lpad-edges.ll

index 85e57661c1545b975a9d8acb1d5548099f52d934..1f3a13cc9cec2193da4c804ba484878deefed8f3 100644 (file)
@@ -327,12 +327,6 @@ static void SplitEdgeNicely(TerminatorInst *TI, unsigned SuccNum,
   assert(isa<PHINode>(Dest->begin()) &&
          "This should only be called if Dest has a PHI!");
 
-  // Do not split edges to EH landing pads.
-  if (InvokeInst *Invoke = dyn_cast<InvokeInst>(TI)) {
-    if (Invoke->getSuccessor(1) == Dest)
-      return;
-  }
-
   // As a hack, never split backedges of loops.  Even though the copy for any
   // PHIs inserted on the backedge would be dead for exits from the loop, we
   // assume that the cost of *splitting* the backedge would be too high.
index 281ee7782da1e215cd32a4552c3cd81a749b2d3b..2cc8e54672b0a3cde8b3159b11346bfe00cc99de 100644 (file)
@@ -1,5 +1,6 @@
 ; 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 }
        %struct.NSArray = type { %struct.NSObject }