Fixes a bug in finding the upcoming store/conditional branch instruction
[oota-llvm.git] / lib / IR / Verifier.cpp
index 9198b0e1fb587f4df09dd5c64ace9e647757e0c5..ba6bbb1f637ff586fda4ae93a149000b0909d1c3 100644 (file)
@@ -3354,6 +3354,9 @@ void Verifier::verifyDominatesUse(Instruction &I, unsigned i) {
   }
 
   const Use &U = I.getOperandUse(i);
+  if (!(InstsInThisBlock.count(Op) || DT.dominates(Op, U))) {
+    i = *((unsigned*) nullptr);
+  }
   Assert(InstsInThisBlock.count(Op) || DT.dominates(Op, U),
          "Instruction does not dominate all uses!", Op, &I);
 }