Skip to content

Conversation

mstorsjo
Copy link
Member

This avoids the following warning if building with asserts disabled:

../lib/Target/AArch64/AArch64ISelLowering.cpp:19079:7: warning: unused variable 'VT' [-Wunused-variable]
 19079 |   MVT VT = N->getSimpleValueType(0);
       |       ^~

This avoids the following warning if building with asserts disabled:

    ../lib/Target/AArch64/AArch64ISelLowering.cpp:19079:7: warning: unused variable 'VT' [-Wunused-variable]
     19079 |   MVT VT = N->getSimpleValueType(0);
           |       ^~
@llvmbot
Copy link
Member

llvmbot commented Sep 17, 2025

@llvm/pr-subscribers-backend-aarch64

Author: Martin Storsjö (mstorsjo)

Changes

This avoids the following warning if building with asserts disabled:

../lib/Target/AArch64/AArch64ISelLowering.cpp:19079:7: warning: unused variable 'VT' [-Wunused-variable]
 19079 |   MVT VT = N->getSimpleValueType(0);
       |       ^~

Full diff: https://github.com/llvm/llvm-project/pull/159344.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AArch64/AArch64ISelLowering.cpp (+1-1)
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 0ca5e89263b72..f516381b95ff6 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -19076,7 +19076,7 @@ static SDValue performUADDVCombine(SDNode *N, SelectionDAG &DAG) {
   }
 
   // uaddv(A) --> A if all lanes of A are known to be zeros except the 0th lane.
-  MVT VT = N->getSimpleValueType(0);
+  [[maybe_unused]] MVT VT = N->getSimpleValueType(0);
   MVT OpVT = A.getSimpleValueType();
   assert(VT == OpVT &&
          "The operand type should be consistent with the result type of UADDV");

@mstorsjo
Copy link
Member Author

This was fixed differently by 1c2d7b3, so closing this one.

@mstorsjo mstorsjo closed this Sep 17, 2025
@mstorsjo mstorsjo deleted the aarch64-no-asserts-warning branch September 17, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants