[PATCH] D151435: [RISCV] Fix -Wunused-variable in release builds. NFCI
Alexander Kornienko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 05:48:27 PDT 2023
alexfh created this revision.
alexfh added reviewers: bkramer, craig.topper.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
alexfh requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
Fix -Wunused-variable in release builds
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151435
Files:
llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
Index: llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
+++ llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
@@ -275,8 +275,7 @@
.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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151435.525561.patch
Type: text/x-patch
Size: 735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230525/d3e36dbe/attachment.bin>
More information about the llvm-commits
mailing list