1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

Fix Transforms/GlobalOpt/2007-05-13-Crash.ll

llvm-svn: 37020
This commit is contained in:
Chris Lattner 2007-05-13 21:28:07 +00:00
parent ad0dd14386
commit 8ed56b8c48

View File

@ -623,7 +623,10 @@ static bool OptimizeAwayTrappingUsesOfLoads(GlobalVariable *GV, Constant *LV) {
Loads.push_back(LI);
Changed |= OptimizeAwayTrappingUsesOfValue(LI, LV);
} else {
assert(isa<StoreInst>(*GUI) && "Only expect load and stores!");
// If we get here we could have stores, loads, or phi nodes whose values
// are loaded.
assert((isa<StoreInst>(*GUI) || isa<PHINode>(*GUI)) &&
"Only expect load and stores!");
}
if (Changed) {