mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 04:35:00 +00:00
Handle a wider arrangement of loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
519c893c26
commit
5532433a57
@ -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)) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user