From 51f40eb614feeb3285a0727dee026f66ebb50951 Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Wed, 21 Aug 2019 18:54:51 +0000 Subject: [PATCH] [mips] Replace call `expandLoadAddress` by `loadAndAddSymbolAddress`. NFC In case of expanding `lw/sw $reg, symbol($reg)` instruction for PIC it's enough to call the `loadAndAddSymbolAddress` method. Additional work performed by the `expandLoadAddress` is not required here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369563 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 8e6abd5b8e6..54c88ab5781 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -3659,8 +3659,8 @@ void MipsAsmParser::expandMemInst(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out, // d) Use R_MIPS_GOT_PAGE/R_MIPS_GOT_OFST relocations instead // of R_MIPS_GOT_DISP in appropriate cases to reduce number // of GOT entries. - expandLoadAddress(TmpReg, Mips::NoRegister, OffsetOp, !ABI.ArePtrs64bit(), - IDLoc, Out, STI); + loadAndAddSymbolAddress(OffsetOp.getExpr(), TmpReg, Mips::NoRegister, + !ABI.ArePtrs64bit(), IDLoc, Out, STI); TOut.emitRRI(Inst.getOpcode(), DstReg, TmpReg, 0, IDLoc, STI); } else { const MCExpr *ExprOffset = OffsetOp.getExpr(); -- 2.50.1