Add "unknown" results for memdep, which mean "I don't know whether a dependence for...
[oota-llvm.git] / lib / Transforms / Scalar / MemCpyOptimizer.cpp
index be5aa2ea5832feb0c5047fe9e0dd9732de826796..3347fc3519c51c8d8d15f87e0799fb8bbe70cb55 100644 (file)
@@ -497,7 +497,7 @@ bool MemCpyOpt::processStore(StoreInst *SI, BasicBlock::iterator &BBI) {
         // Check that nothing touches the dest of the "copy" between
         // the call and the store.
         MemDepResult sdep = MD->getDependency(SI);
-        if (!sdep.isNonLocal()) {
+        if (!sdep.isNonLocal() && !sdep.isUnknown()) {
           bool FoundCall = false;
           for (BasicBlock::iterator I = SI, E = sdep.getInst(); I != E; --I) {
             if (&*I == C) {