[llvm] c1ae9ea - [AArch64] Fixup possibly unused variable warning after #207199 (#209418)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 03:49:05 PDT 2026


Author: Sander de Smalen
Date: 2026-07-14T11:49:00+01:00
New Revision: c1ae9eabc8b55aa4e2a06efacca6003ccecf6249

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

LOG: [AArch64] Fixup possibly unused variable warning after #207199 (#209418)

Using [[maybe_unused]] as the variable is only used in asserts which
results in a diagnostic for no-assert builds.

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 ffd16b16a4e84..d6f2633297e51 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -5197,8 +5197,8 @@ AArch64TargetLowering::LowerVectorFP_TO_INT_SAT(SDValue Op,
   const EVT DstElementVT = DstVT.getVectorElementType();
   const EVT SatVT = cast<VTSDNode>(Op.getOperand(1))->getVT();
 
+  [[maybe_unused]] const uint64_t DstElementWidth = DstVT.getScalarSizeInBits();
   const uint64_t SrcElementWidth = SrcVT.getScalarSizeInBits();
-  const uint64_t DstElementWidth = DstVT.getScalarSizeInBits();
   const uint64_t SatWidth = SatVT.getScalarSizeInBits();
   assert(SatWidth <= DstElementWidth &&
          "Saturation width cannot exceed result width");


        


More information about the llvm-commits mailing list