From 15e9575fb5988a66aa6e57a55818b54b575dd795 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 11 Sep 2021 12:06:42 -0700 Subject: [PATCH] [Vectorize] Fix "unused variable" warnings --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 2808cef..1a511ef 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(I); - StoreInst *SI = dyn_cast(I); - assert((LI || SI) && "Invalid memory instruction"); + assert((isa(I)) && "Invalid memory instruction"); auto *Ptr = getLoadStorePointerOperand(I); auto *ScalarTy = getLoadStoreType(I); -- 2.7.4