[llvm] c18c3cc - Fix unused variable warning in release build
Haojian Wu via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 24 08:05:46 PDT 2025
Author: Haojian Wu
Date: 2025-10-24T17:05:03+02:00
New Revision: c18c3ccd0b48c4055dfdcdc2ff7514ca8ab3dfae
URL: https://github.com/llvm/llvm-project/commit/c18c3ccd0b48c4055dfdcdc2ff7514ca8ab3dfae
DIFF: https://github.com/llvm/llvm-project/commit/c18c3ccd0b48c4055dfdcdc2ff7514ca8ab3dfae.diff
LOG: Fix unused variable warning in release build
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 1f68fa4ff1356..6bd974774059c 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -2163,7 +2163,8 @@ Value *HvxIdioms::processVScatter(Instruction &In) const {
// Our indexes are represented as a constant. We need it in a reg.
AllocaInst *IndexesAlloca =
Builder.CreateAlloca(HVC.getHvxTy(HVC.getIntTy(32), false));
- auto *StoreIndexes = Builder.CreateStore(cstDataVector, IndexesAlloca);
+ [[maybe_unused]] auto *StoreIndexes =
+ Builder.CreateStore(cstDataVector, IndexesAlloca);
LLVM_DEBUG(dbgs() << " StoreIndexes : " << *StoreIndexes << "\n");
CastIndex = Builder.CreateLoad(IndexesAlloca->getAllocatedType(),
IndexesAlloca, "reload_index");
More information about the llvm-commits
mailing list