[GVN] Add clarifying assert [NFCI]

Just adding an assert which makes invariants between AnalyzeLoadsFromClobberingLoads and GetLoadValueForLoad slightly more clear.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Philip Reames 2016-01-29 02:23:10 +00:00
parent 7d3e90397f
commit e0561f3765

View File

@ -1109,6 +1109,11 @@ static int AnalyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr,
LoadBase, LoadOffs, LoadSize, DepLI);
if (Size == 0) return -1;
// Check non-obvious conditions enforced by MDA which we rely on for being
// able to materialize this potentially available value
assert(DepLI->isSimple() && "Cannot widen volatile/atomic load!");
assert(DepLI->getType()->isIntegerTy() && "Can't widen non-integer load");
return AnalyzeLoadFromClobberingWrite(LoadTy, LoadPtr, DepPtr, Size*8, DL);
}