diff options
| author | Eric Christopher <echristo@apple.com> | 2010-08-24 22:07:27 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2010-08-24 22:07:27 +0000 |
| commit | 3c1fada9859db2493b63b1b3854b803b6871165a (patch) | |
| tree | 2dd7848f3791ffa148556f03d23fb4b10eab6c53 /lib | |
| parent | ba1b277fd74478b9f5c9149281ea46a452af8337 (diff) | |
| download | external_llvm-3c1fada9859db2493b63b1b3854b803b6871165a.zip external_llvm-3c1fada9859db2493b63b1b3854b803b6871165a.tar.gz external_llvm-3c1fada9859db2493b63b1b3854b803b6871165a.tar.bz2 | |
Rework braindead conditionals I put in yesterday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Target/ARM/ARMFastISel.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 81ecdb5..51dbfc2 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -365,20 +365,18 @@ bool ARMFastISel::ARMLoadAlloca(const Instruction *I) { Value *Op0 = I->getOperand(0); // Verify it's an alloca. - const Instruction *Inst = dyn_cast<Instruction>(Op0); - if (!Inst || Inst->getOpcode() != Instruction::Alloca) return false; - - const AllocaInst *AI = cast<AllocaInst>(Op0); - DenseMap<const AllocaInst*, int>::iterator SI = - FuncInfo.StaticAllocaMap.find(AI); - - if (SI != FuncInfo.StaticAllocaMap.end()) { - unsigned ResultReg = createResultReg(FixedRC); - TII.loadRegFromStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt, - ResultReg, SI->second, FixedRC, - TM.getRegisterInfo()); - UpdateValueMap(I, ResultReg); - return true; + if (const AllocaInst *AI = dyn_cast<AllocaInst>(Op0)) { + DenseMap<const AllocaInst*, int>::iterator SI = + FuncInfo.StaticAllocaMap.find(AI); + + if (SI != FuncInfo.StaticAllocaMap.end()) { + unsigned ResultReg = createResultReg(FixedRC); + TII.loadRegFromStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt, + ResultReg, SI->second, FixedRC, + TM.getRegisterInfo()); + UpdateValueMap(I, ResultReg); + return true; + } } return false; |
