[llvm] 0008b9c - [Vectorize] Fix an unused variable warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 2 11:21:03 PST 2023


Author: Kazu Hirata
Date: 2023-12-02T11:20:57-08:00
New Revision: 0008b9c0ac284e0303d9db1745d243975d8642d8

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

LOG: [Vectorize] Fix an unused variable warning

This patch fixes:

  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:912:16: error:
  unused variable 'OldResSizeInBits' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index a2cd7e384efe..8eb33a3e5336 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -912,6 +912,7 @@ void VPlanTransforms::truncateToMinimalBitwidths(
       unsigned OldResSizeInBits = OldResTy->getScalarSizeInBits();
       assert(OldResTy->isIntegerTy() && "only integer types supported");
       assert(OldResSizeInBits > NewResSizeInBits && "Nothing to shrink?");
+      (void)OldResSizeInBits;
 
       auto *NewResTy = IntegerType::get(Ctx, NewResSizeInBits);
 


        


More information about the llvm-commits mailing list