From: Chad Rosier Date: Tue, 27 Nov 2012 21:46:46 +0000 (+0000) Subject: [arm fast-isel] Appease the machine verifier by using the proper register X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ac3158b5718ad724a02694c9f1c08bbfaf5fec11;p=oota-llvm.git [arm fast-isel] Appease the machine verifier by using the proper register classes. Also a bit of cleanup. rdar://12719844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168728 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 5de555614cc..96e2ce9f38d 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -1667,7 +1667,6 @@ bool ARMFastISel::SelectSelect(const Instruction *I) { // Things need to be register sized for register moves. if (VT != MVT::i32) return false; - const TargetRegisterClass *RC = TLI.getRegClassFor(VT); unsigned CondReg = getRegForValue(I->getOperand(0)); if (CondReg == 0) return false; @@ -1700,14 +1699,16 @@ bool ARMFastISel::SelectSelect(const Instruction *I) { .addReg(CondReg).addImm(0)); unsigned MovCCOpc; + const TargetRegisterClass *RC; if (!UseImm) { + RC = isThumb2 ? &ARM::tGPRRegClass : &ARM::GPRRegClass; MovCCOpc = isThumb2 ? ARM::t2MOVCCr : ARM::MOVCCr; } else { - if (!isNegativeImm) { + RC = isThumb2 ? &ARM::rGPRRegClass : &ARM::GPRRegClass; + if (!isNegativeImm) MovCCOpc = isThumb2 ? ARM::t2MOVCCi : ARM::MOVCCi; - } else { + else MovCCOpc = isThumb2 ? ARM::t2MVNCCi : ARM::MVNCCi; - } } unsigned ResultReg = createResultReg(RC); if (!UseImm) @@ -2589,7 +2590,7 @@ unsigned ARMFastISel::ARMEmitIntExt(EVT SrcVT, unsigned SrcReg, EVT DestVT, Opc = isThumb2 ? ARM::t2UXTH : ARM::UXTH; } else { Opc = isThumb2 ? ARM::t2SXTH : ARM::SXTH; - RC = isThumb2 ?&ARM::rGPRRegClass : &ARM::GPRnopcRegClass; + RC = isThumb2 ? &ARM::rGPRRegClass : &ARM::GPRnopcRegClass; } break; case MVT::i8: