Update memdep to handle PartialAlias as MayAlias.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-12-13 22:47:57 +00:00
parent e8d02539d7
commit 2cd1952917

View File

@ -291,7 +291,7 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
continue; continue;
// May-alias loads don't depend on each other without a dependence. // May-alias loads don't depend on each other without a dependence.
if (isLoad && R == AliasAnalysis::MayAlias) if (isLoad && R != AliasAnalysis::MustAlias)
continue; continue;
// Stores don't alias loads from read-only memory. // Stores don't alias loads from read-only memory.
@ -323,9 +323,9 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
if (R == AliasAnalysis::NoAlias) if (R == AliasAnalysis::NoAlias)
continue; continue;
if (R == AliasAnalysis::MayAlias) if (R == AliasAnalysis::MustAlias)
return MemDepResult::getClobber(Inst); return MemDepResult::getDef(Inst);
return MemDepResult::getDef(Inst); return MemDepResult::getClobber(Inst);
} }
// If this is an allocation, and if we know that the accessed pointer is to // If this is an allocation, and if we know that the accessed pointer is to