Attempt to fix breakage from r128782 reported by Francois Pichet on
authorEli Friedman <eli.friedman@gmail.com>
Mon, 4 Apr 2011 00:37:38 +0000 (00:37 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 4 Apr 2011 00:37:38 +0000 (00:37 +0000)
llvm-commits.  (Not sure why it only breaks on Windows; maybe it has
something to do with the iterator representation...)

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

lib/Transforms/Utils/Local.cpp

index 26ae295d5dc0c94da5c5e4283a1046154737dcf6..d7e23364ccf74effc1b726d7e760c76e640c927c 100644 (file)
@@ -333,6 +333,9 @@ bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB, const TargetData *TD) {
       continue;
     }
 
+    if (Inst->isTerminator())
+      break;
+
     WeakVH BIHandle(BI);
     MadeChange |= RecursivelyDeleteTriviallyDeadInstructions(Inst);
     if (BIHandle != BI)