diff options
author | Eric Christopher <echristo@apple.com> | 2010-10-12 00:43:21 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-10-12 00:43:21 +0000 |
commit | 5532433a574043b516aec26a4dd4b6c8d7fc551e (patch) | |
tree | 3f4d72d8fad60b4372b635992e9bc6c72e09263f | |
parent | 519c893c2682a597049f958b2842e34c456b0434 (diff) |
Handle a wider arrangement of loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116284 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMFastISel.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index d29b075ff8..9110e99d3b 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -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)) && |