[llvm] 7562183 - [NFC][Hexagon] Fix unused variable warning (#174466)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 5 11:25:00 PST 2026


Author: Aiden Grossman
Date: 2026-01-05T11:24:56-08:00
New Revision: 75621835ea1c9afc262ce72c23389f17719c9eaf

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

LOG: [NFC][Hexagon] Fix unused variable warning (#174466)

8f5b067dc321b977353b2342aa8fcfbbbd09d04b introduced this. The variable
is not used in non-asserts configurations, which throws a compiler
warning.

Added: 
    

Modified: 
    llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
index fbb8a36da9053..df4cdd71415de 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -2842,7 +2842,8 @@ HvxIdioms::getAlignmentImpl(Instruction &In, Value *ptr,
 }
 
 Value *HvxIdioms::processMStore(Instruction &In) const {
-  auto *InpTy = dyn_cast<VectorType>(In.getOperand(0)->getType());
+  [[maybe_unused]] auto *InpTy =
+      dyn_cast<VectorType>(In.getOperand(0)->getType());
   assert(InpTy && "Cannot handle no vector type for llvm.masked.store");
 
   LLVM_DEBUG(dbgs() << "\n[Process mstore](" << In << ")\n"
@@ -2877,7 +2878,7 @@ Value *HvxIdioms::processMStore(Instruction &In) const {
 }
 
 Value *HvxIdioms::processMLoad(Instruction &In) const {
-  auto *InpTy = dyn_cast<VectorType>(In.getType());
+  [[maybe_unused]] auto *InpTy = dyn_cast<VectorType>(In.getType());
   assert(InpTy && "Cannot handle non vector type for llvm.masked.store");
   LLVM_DEBUG(dbgs() << "\n[Process mload](" << In << ")\n"
                     << *In.getParent() << "\n");


        


More information about the llvm-commits mailing list