[llvm] 15e9575 - [Vectorize] Fix "unused variable" warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 11 12:06:58 PDT 2021
Author: Kazu Hirata
Date: 2021-09-11T12:06:43-07:00
New Revision: 15e9575fb5988a66aa6e57a55818b54b575dd795
URL: https://github.com/llvm/llvm-project/commit/15e9575fb5988a66aa6e57a55818b54b575dd795
DIFF: https://github.com/llvm/llvm-project/commit/15e9575fb5988a66aa6e57a55818b54b575dd795.diff
LOG: [Vectorize] Fix "unused variable" warnings
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 2808cefc1d9a..1a511efeeb0e 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5329,9 +5329,7 @@ bool LoopVectorizationCostModel::interleavedAccessCanBeWidened(
bool LoopVectorizationCostModel::memoryInstructionCanBeWidened(
Instruction *I, ElementCount VF) {
// Get and ensure we have a valid memory instruction.
- LoadInst *LI = dyn_cast<LoadInst>(I);
- StoreInst *SI = dyn_cast<StoreInst>(I);
- assert((LI || SI) && "Invalid memory instruction");
+ assert((isa<LoadInst, StoreInst>(I)) && "Invalid memory instruction");
auto *Ptr = getLoadStorePointerOperand(I);
auto *ScalarTy = getLoadStoreType(I);
More information about the llvm-commits
mailing list