[llvm] 52d1397 - [LoongArch] Fix -Wunused-variable in LoongArchExpandPseudoInsts.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 20:06:36 PST 2024
Author: Jie Fu
Date: 2024-01-05T12:05:23+08:00
New Revision: 52d1397e38ee88b170585c9c824d08e6975890ca
URL: https://github.com/llvm/llvm-project/commit/52d1397e38ee88b170585c9c824d08e6975890ca
DIFF: https://github.com/llvm/llvm-project/commit/52d1397e38ee88b170585c9c824d08e6975890ca.diff
LOG: [LoongArch] Fix -Wunused-variable in LoongArchExpandPseudoInsts.cpp (NFC)
llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp:480:20:
error: unused variable 'MF' [-Werror,-Wunused-variable]
MachineFunction *MF = MBB.getParent();
^
1 error generated.
Added:
Modified:
llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
index f977f176066a5c..ad39658f698e7b 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
@@ -477,12 +477,11 @@ bool LoongArchExpandPseudo::expandLargeAddressLoad(
break;
}
- MachineFunction *MF = MBB.getParent();
MachineInstr &MI = *MBBI;
DebugLoc DL = MI.getDebugLoc();
Register ScratchReg = LoongArch::R20; // $t8
- assert(MF->getSubtarget<LoongArchSubtarget>().is64Bit() &&
+ assert(MBB.getParent()->getSubtarget<LoongArchSubtarget>().is64Bit() &&
"Large code model requires LA64");
auto Part1 = BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCALAU12I), DestReg);
More information about the llvm-commits
mailing list