1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Simplify conditional and fix LICM/2004-11-17-UndefIndexCrash.ll

by saying what we mean

llvm-svn: 17913
This commit is contained in:
Chris Lattner 2004-11-17 17:39:39 +00:00
parent 38280c9ace
commit bd02c10b87

View File

@ -379,8 +379,7 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
// the arguments provided, except substitute 0's for any variable
// indexes we find...
for (unsigned i = 0; i != GEPOperands.size(); ++i)
if (!isa<Constant>(GEPOperands[i]) || isa<GlobalValue>(GEPOperands[i]) ||
isa<ConstantExpr>(GEPOperands[i]))
if (!isa<ConstantInt>(GEPOperands[i]))
GEPOperands[i] =Constant::getNullValue(GEPOperands[i]->getType());
int64_t Offset = getTargetData().getIndexedOffset(BasePtr->getType(),
GEPOperands);