From: Eric Christopher Date: Thu, 7 Oct 2010 05:39:19 +0000 (+0000) Subject: Use the correct register class here. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d18d92aad587381b5d9ecf0aeb3c2eb1530ee61;p=oota-llvm.git Use the correct register class here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115906 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 67ba05ec259..9e8e1df0f15 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -943,7 +943,9 @@ bool ARMFastISel::SelectCmp(const Instruction *I) { // Now set a register based on the comparison. Explicitly set the predicates // here. unsigned MovCCOpc = isThumb ? ARM::t2MOVCCi : ARM::MOVCCi; - unsigned DestReg = createResultReg(ARM::GPRRegisterClass); + TargetRegisterClass *RC = isThumb ? ARM::rGPRRegisterClass + : ARM::GPRRegisterClass; + unsigned DestReg = createResultReg(RC); Constant *Zero = ConstantInt::get(Type::getInt32Ty(*Context), 0); unsigned ZeroReg = TargetMaterializeConstant(Zero);