[llvm] r374599 - [mips] Remove unused local variables. NFC
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 14:51:39 PDT 2019
Author: atanasyan
Date: Fri Oct 11 14:51:39 2019
New Revision: 374599
URL: http://llvm.org/viewvc/llvm-project?rev=374599&view=rev
Log:
[mips] Remove unused local variables. NFC
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=374599&r1=374598&r2=374599&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Fri Oct 11 14:51:39 2019
@@ -3322,9 +3322,7 @@ bool MipsAsmParser::expandLoadSingleImmT
unsigned FirstReg = Inst.getOperand(0).getReg();
uint64_t ImmOp64 = Inst.getOperand(1).getImm();
- ImmOp64 = convertIntToDoubleImm(ImmOp64);
-
- uint32_t ImmOp32 = covertDoubleImmToSingleImm(ImmOp64);
+ uint32_t ImmOp32 = covertDoubleImmToSingleImm(convertIntToDoubleImm(ImmOp64));
return loadImmediate(ImmOp32, FirstReg, Mips::NoRegister, true, true, IDLoc,
Out, STI);
@@ -3397,20 +3395,13 @@ bool MipsAsmParser::expandLoadDoubleImmT
ImmOp64 = convertIntToDoubleImm(ImmOp64);
- uint32_t LoImmOp64 = Lo_32(ImmOp64);
- uint32_t HiImmOp64 = Hi_32(ImmOp64);
-
- unsigned TmpReg = getATReg(IDLoc);
- if (!TmpReg)
- return true;
-
- if (LoImmOp64 == 0) {
+ if (Lo_32(ImmOp64) == 0) {
if (isABI_N32() || isABI_N64()) {
if (loadImmediate(ImmOp64, FirstReg, Mips::NoRegister, false, true, IDLoc,
Out, STI))
return true;
} else {
- if (loadImmediate(HiImmOp64, FirstReg, Mips::NoRegister, true, true,
+ if (loadImmediate(Hi_32(ImmOp64), FirstReg, Mips::NoRegister, true, true,
IDLoc, Out, STI))
return true;
@@ -3437,6 +3428,10 @@ bool MipsAsmParser::expandLoadDoubleImmT
getStreamer().EmitIntValue(ImmOp64, 8);
getStreamer().SwitchSection(CS);
+ unsigned TmpReg = getATReg(IDLoc);
+ if (!TmpReg)
+ return true;
+
if (emitPartialAddress(TOut, IDLoc, Sym))
return true;
@@ -3469,9 +3464,6 @@ bool MipsAsmParser::expandLoadDoubleImmT
ImmOp64 = convertIntToDoubleImm(ImmOp64);
- uint32_t LoImmOp64 = Lo_32(ImmOp64);
- uint32_t HiImmOp64 = Hi_32(ImmOp64);
-
unsigned TmpReg = Mips::ZERO;
if (ImmOp64 != 0) {
TmpReg = getATReg(IDLoc);
@@ -3479,8 +3471,8 @@ bool MipsAsmParser::expandLoadDoubleImmT
return true;
}
- if ((LoImmOp64 == 0) &&
- !((HiImmOp64 & 0xffff0000) && (HiImmOp64 & 0x0000ffff))) {
+ if ((Lo_32(ImmOp64) == 0) &&
+ !((Hi_32(ImmOp64) & 0xffff0000) && (Hi_32(ImmOp64) & 0x0000ffff))) {
if (isABI_N32() || isABI_N64()) {
if (TmpReg != Mips::ZERO &&
loadImmediate(ImmOp64, TmpReg, Mips::NoRegister, false, false, IDLoc,
@@ -3491,8 +3483,8 @@ bool MipsAsmParser::expandLoadDoubleImmT
}
if (TmpReg != Mips::ZERO &&
- loadImmediate(HiImmOp64, TmpReg, Mips::NoRegister, true, false, IDLoc,
- Out, STI))
+ loadImmediate(Hi_32(ImmOp64), TmpReg, Mips::NoRegister, true, false,
+ IDLoc, Out, STI))
return true;
if (hasMips32r2()) {
More information about the llvm-commits
mailing list