[llvm] 236bfac - [RISCV] Fix -Wunused-variable in release builds. NFCI

Alexander Kornienko via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 06:35:30 PDT 2023


Author: Alexander Kornienko
Date: 2023-05-25T15:35:24+02:00
New Revision: 236bface848f31e6b6a9d7d4b310ccacc0b3ebab

URL: https://github.com/llvm/llvm-project/commit/236bface848f31e6b6a9d7d4b310ccacc0b3ebab
DIFF: https://github.com/llvm/llvm-project/commit/236bface848f31e6b6a9d7d4b310ccacc0b3ebab.diff

LOG: [RISCV] Fix -Wunused-variable in release builds. NFCI

Fix -Wunused-variable in release builds

Reviewed By: krasimir

Differential Revision: https://reviews.llvm.org/D151435

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp b/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
index 30ab8df70a0f..00868dad2982 100644
--- a/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
@@ -275,8 +275,7 @@ bool RISCVExpandPseudo::expandRV32ZdinxStore(MachineBasicBlock &MBB,
       .add(MBBI->getOperand(2));
   if (MBBI->getOperand(2).isGlobal() || MBBI->getOperand(2).isCPI()) {
     // FIXME: Zdinx RV32 can not work on unaligned scalar memory.
-    const auto &STI = MF->getSubtarget<RISCVSubtarget>();
-    assert(!STI.enableUnalignedScalarMem());
+    assert(!MF->getSubtarget<RISCVSubtarget>().enableUnalignedScalarMem());
 
     assert(MBBI->getOperand(2).getOffset() % 8 == 0);
     MBBI->getOperand(2).setOffset(MBBI->getOperand(2).getOffset() + 4);


        


More information about the llvm-commits mailing list