Fix bug: LICM/2003-02-28-PromoteDifferentType.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-02-28 19:21:40 +00:00
parent 2daba3bb1c
commit caadc93f7b

View File

@ -487,9 +487,15 @@ void LICM::findPromotableValuesInLoop(
bool PointerOk = true;
for (std::set<Value*>::const_iterator I =CurLBI->LoadedPointers.begin(),
E = CurLBI->LoadedPointers.end(); I != E; ++I)
if (AA->alias(V, ~0, *I, ~0) == AliasAnalysis::MayAlias) {
E = CurLBI->LoadedPointers.end(); PointerOk && I != E; ++I)
switch (AA->alias(V, ~0, *I, ~0)) {
case AliasAnalysis::MustAlias:
if (V->getType() != (*I)->getType())
PointerOk = false;
break;
case AliasAnalysis::MayAlias:
PointerOk = false;
case AliasAnalysis::NoAlias:
break;
}