From: Eric Christopher Date: Sun, 17 Oct 2010 01:41:46 +0000 (+0000) Subject: Turn on AddOperator folding in GEP. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dc0b0ef6cd593a7eb502ca0842fa1f653cb68140;p=oota-llvm.git Turn on AddOperator folding in GEP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116679 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 40269a8a9bd..7dd11ffb3e5 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -632,7 +632,7 @@ bool ARMFastISel::ARMComputeRegOffset(const Value *Obj, AddrBase &Base, if (const ConstantInt *CI = dyn_cast(Op)) { // Constant-offset addressing. TmpOffset += CI->getSExtValue() * S; - } else if (0 && isa(Op) && + } else if (isa(Op) && isa(cast(Op)->getOperand(1))) { // An add with a constant operand. Fold the constant. ConstantInt *CI =