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

Handle a wider arrangement of loads.

llvm-svn: 116284
This commit is contained in:
Eric Christopher 2010-10-12 00:43:21 +00:00
parent 71cdbd5d44
commit 8789aa8799

View File

@ -588,6 +588,22 @@ bool ARMFastISel::ARMComputeRegOffset(const Value *Obj, unsigned &Reg,
switch (Opcode) {
default:
break;
case Instruction::BitCast: {
// Look through bitcasts.
return ARMComputeRegOffset(U->getOperand(0), Reg, Offset);
}
case Instruction::IntToPtr: {
// Look past no-op inttoptrs.
if (TLI.getValueType(U->getOperand(0)->getType()) == TLI.getPointerTy())
return ARMComputeRegOffset(U->getOperand(0), Reg, Offset);
break;
}
case Instruction::PtrToInt: {
// Look past no-op ptrtoints.
if (TLI.getValueType(U->getType()) == TLI.getPointerTy())
return ARMComputeRegOffset(U->getOperand(0), Reg, Offset);
break;
}
case Instruction::Alloca: {
// Don't handle dynamic allocas.
assert(!FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(Obj)) &&