[llvm] ead7b7b - [SandboxVec] Fix unused variables warnings

Vasileios Porpodas via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 10:39:16 PST 2025


Author: Vasileios Porpodas
Date: 2025-02-27T10:38:31-08:00
New Revision: ead7b7be0948572a6d1feb300790f37fb83cfa00

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

LOG: [SandboxVec] Fix unused variables warnings

Added: 
    

Modified: 
    llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp b/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
index 48703dfc72eb8..6f6e8a089bacd 100644
--- a/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
@@ -347,15 +347,15 @@ define void @foo(ptr %ptr, i16 %arg) {
   auto *F = Ctx.createFunction(LLVMF);
   auto *BB = &*F->begin();
   auto It = BB->begin();
-  auto *Gep0 = cast<sandboxir::GetElementPtrInst>(&*It++);
-  auto *Gep1 = cast<sandboxir::GetElementPtrInst>(&*It++);
-  auto *ZextX = cast<sandboxir::CastInst>(&*It++);
+  [[maybe_unused]] auto *Gep0 = cast<sandboxir::GetElementPtrInst>(&*It++);
+  [[maybe_unused]] auto *Gep1 = cast<sandboxir::GetElementPtrInst>(&*It++);
+  [[maybe_unused]] auto *ZextX = cast<sandboxir::CastInst>(&*It++);
   auto *Zext1 = cast<sandboxir::CastInst>(&*It++);
   auto *Zext0 = cast<sandboxir::CastInst>(&*It++);
   auto *Shl1 = cast<sandboxir::BinaryOperator>(&*It++);
   auto *Shl0 = cast<sandboxir::BinaryOperator>(&*It++);
-  auto *Sub1 = cast<sandboxir::BinaryOperator>(&*It++);
-  auto *Sub0 = cast<sandboxir::BinaryOperator>(&*It++);
+  [[maybe_unused]] auto *Sub1 = cast<sandboxir::BinaryOperator>(&*It++);
+  [[maybe_unused]] auto *Sub0 = cast<sandboxir::BinaryOperator>(&*It++);
   auto *S0 = cast<sandboxir::StoreInst>(&*It++);
   auto *S1 = cast<sandboxir::StoreInst>(&*It++);
 


        


More information about the llvm-commits mailing list