Remove unnecessary assignment to temporary, ResultReg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier 2012-02-16 22:45:33 +00:00
parent 5b0e7886f3
commit a69feb0f33

View File

@ -1442,14 +1442,11 @@ bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
// We have i1, i8, or i16, we need to either zero extend or sign extend.
if (needsExt) {
unsigned ResultReg;
ResultReg = ARMEmitIntExt(SrcVT, SrcReg1, MVT::i32, isZExt);
if (ResultReg == 0) return false;
SrcReg1 = ResultReg;
SrcReg1 = ARMEmitIntExt(SrcVT, SrcReg1, MVT::i32, isZExt);
if (SrcReg1 == 0) return false;
if (!UseImm) {
ResultReg = ARMEmitIntExt(SrcVT, SrcReg2, MVT::i32, isZExt);
if (ResultReg == 0) return false;
SrcReg2 = ResultReg;
SrcReg2 = ARMEmitIntExt(SrcVT, SrcReg2, MVT::i32, isZExt);
if (SrcReg2 == 0) return false;
}
}
@ -1566,10 +1563,9 @@ bool ARMFastISel::SelectIToFP(const Instruction *I, bool isSigned) {
// Handle sign-extension.
if (SrcVT == MVT::i16 || SrcVT == MVT::i8) {
EVT DestVT = MVT::i32;
unsigned ResultReg = ARMEmitIntExt(SrcVT, SrcReg, DestVT,
SrcReg = ARMEmitIntExt(SrcVT, SrcReg, DestVT,
/*isZExt*/!isSigned);
if (ResultReg == 0) return false;
SrcReg = ResultReg;
if (SrcReg == 0) return false;
}
// The conversion routine works on fp-reg to fp-reg and the operand above
@ -2047,9 +2043,8 @@ bool ARMFastISel::SelectRet(const Instruction *I) {
assert(DestVT == MVT::i32 && "ARM should always ext to i32");
bool isZExt = Outs[0].Flags.isZExt();
unsigned ResultReg = ARMEmitIntExt(RVVT, SrcReg, DestVT, isZExt);
if (ResultReg == 0) return false;
SrcReg = ResultReg;
SrcReg = ARMEmitIntExt(RVVT, SrcReg, DestVT, isZExt);
if (SrcReg == 0) return false;
}
// Make the copy.