[llvm] 8801a5d - SystemZAsmPrinter.cpp: Fix a warning. [-Wunused-variable]
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 15:55:30 PDT 2022
Author: NAKAMURA Takumi
Date: 2022-05-21T07:54:09+09:00
New Revision: 8801a5d185fafcb8c03f71ceb717b84c2f08b220
URL: https://github.com/llvm/llvm-project/commit/8801a5d185fafcb8c03f71ceb717b84c2f08b220
DIFF: https://github.com/llvm/llvm-project/commit/8801a5d185fafcb8c03f71ceb717b84c2f08b220.diff
LOG: SystemZAsmPrinter.cpp: Fix a warning. [-Wunused-variable]
This could be rewritten as `!ZFL->hasFP(*MF) || FrameReg < 16`
but I thought better to clarify it is `AllocaReg`.
Added:
Modified:
llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
index 3142abb2b08c3..e34f522ab5505 100644
--- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
@@ -970,6 +970,7 @@ void SystemZAsmPrinter::emitPPA1(MCSymbol *FnEndSym) {
uint8_t FrameReg = TRI->getEncodingValue(TRI->getFrameRegister(*MF));
uint8_t AllocaReg = ZFL->hasFP(*MF) ? FrameReg : 0;
assert(AllocaReg < 16 && "Can't have alloca register larger than 15");
+ (void)AllocaReg;
// Build FPR save area offset.
uint32_t FrameAndFPROffset = 0;
More information about the llvm-commits
mailing list