Add support for invoke to the MemoryBuiltin analysid.
[oota-llvm.git] / lib / Transforms / InstCombine / InstructionCombining.cpp
index 2653fc316d3a6fd38c7ee68e4bd0c16b11260190..269ea1516ff089770bebb2db2f8000535209a66c 100644 (file)
@@ -1167,6 +1167,10 @@ Instruction *InstCombiner::visitMalloc(Instruction &MI) {
       }
       EraseInstFromFunction(*I);
     }
+
+    if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
+      BranchInst::Create(II->getNormalDest(), II->getParent());
+    }
     return EraseInstFromFunction(MI);
   }
   return 0;