[llvm] 45c3053 - [AArch64] Fix unused-variable warning for non-dbg builds. (#143175)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 10:35:21 PDT 2025
Author: Chenguang Wang
Date: 2025-06-06T10:35:16-07:00
New Revision: 45c3053ae0abfb570ec41994c96c754b4daa7efa
URL: https://github.com/llvm/llvm-project/commit/45c3053ae0abfb570ec41994c96c754b4daa7efa
DIFF: https://github.com/llvm/llvm-project/commit/45c3053ae0abfb570ec41994c96c754b4daa7efa.diff
LOG: [AArch64] Fix unused-variable warning for non-dbg builds. (#143175)
AArch64ISelLowering.cpp currently fails -Wunused-variable because SrcVT
is only used in assert(), so it is an unused variable if not using debug
builds. This behavior was introduced in 2c0a2261.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 724e3eac3b69e..379f07e14948c 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -11040,8 +11040,7 @@ SDValue AArch64TargetLowering::LowerSETCCCARRY(SDValue Op,
static SDValue emitVectorComparison(SDValue LHS, SDValue RHS,
AArch64CC::CondCode CC, bool NoNans, EVT VT,
const SDLoc &DL, SelectionDAG &DAG) {
- EVT SrcVT = LHS.getValueType();
- assert(VT.getSizeInBits() == SrcVT.getSizeInBits() &&
+ assert(VT.getSizeInBits() == LHS.getValueType().getSizeInBits() &&
"function only supposed to emit natural comparisons");
switch (CC) {
More information about the llvm-commits
mailing list