[PHITransAddr] Don't translate unreachable values
[oota-llvm.git] / lib / Analysis / MemoryDependenceAnalysis.cpp
index 3c1826a58e669878057a3ff81d45c5919bac7c77..ecc1c9bda9b9ccb5ea89d9495b4afe1f7f76c7f3 100644 (file)
@@ -1278,8 +1278,7 @@ getNonLocalPointerDepFromBB(Instruction *QueryInst,
       // Get the PHI translated pointer in this predecessor.  This can fail if
       // not translatable, in which case the getAddr() returns null.
       PHITransAddr &PredPointer = PredList.back().second;
-      PredPointer.PHITranslateValue(BB, Pred, nullptr);
-
+      PredPointer.PHITranslateValue(BB, Pred, DT, /*MustDominate=*/false);
       Value *PredPtrVal = PredPointer.getAddr();
 
       // Check to see if we have already visited this pred block with another