1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Minor tweak to get isel opt

llvm-svn: 24663
This commit is contained in:
Chris Lattner 2005-12-11 09:05:13 +00:00
parent 6f047565cb
commit a54452fd4f

View File

@ -1324,7 +1324,8 @@ static void OptimizeGEPExpression(GetElementPtrInst *GEPI,
break;
}
}
if (!hasConstantIndex) return;
// If this is a GEP &Alloca, 0, 0, forward subst the frame index into uses.
if (!hasConstantIndex && !isa<AllocaInst>(GEPI->getOperand(0))) return;
// Otherwise, decompose the GEP instruction into multiplies and adds. Sum the
// constant offset (which we now know is non-zero) and deal with it later.