aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-08-24 22:07:27 +0000
committerEric Christopher <echristo@apple.com>2010-08-24 22:07:27 +0000
commite24d66f525825a96ee76508076696936451902be (patch)
tree2dd7848f3791ffa148556f03d23fb4b10eab6c53 /lib
parent9f782d4dcf580ae508cc83f412884cd3c5f9207d (diff)
downloadexternal_llvm-e24d66f525825a96ee76508076696936451902be.zip
external_llvm-e24d66f525825a96ee76508076696936451902be.tar.gz
external_llvm-e24d66f525825a96ee76508076696936451902be.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.cpp26
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;