From 76a9752d45941db6604c01502be675b0345cb2d4 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 7 Oct 2010 05:39:19 +0000 Subject: [PATCH] Use the correct register class here. llvm-svn: 115906 --- llvm/lib/Target/ARM/ARMFastISel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 67ba05ec259d..9e8e1df0f156 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/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);