mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[GVN] Add clarifying assert [NFCI]
Just adding an assert which makes invariants between AnalyzeLoadsFromClobberingLoads and GetLoadValueForLoad slightly more clear. llvm-svn: 259145
This commit is contained in:
parent
40c4ebd071
commit
3b5cd40eee
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user