[llvm] 597aefa - Fix unused variable warning by embedding inside assertion
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 10:42:24 PDT 2022
Author: Simon Pilgrim
Date: 2022-03-24T17:41:24Z
New Revision: 597aefa89c6d99b6cf0daa5aa99ed67ee8da4fdb
URL: https://github.com/llvm/llvm-project/commit/597aefa89c6d99b6cf0daa5aa99ed67ee8da4fdb
DIFF: https://github.com/llvm/llvm-project/commit/597aefa89c6d99b6cf0daa5aa99ed67ee8da4fdb.diff
LOG: Fix unused variable warning by embedding inside assertion
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 03dcd304db40e..14ee2616c1367 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -9545,9 +9545,8 @@ void VPWidenIntOrFpInductionRecipe::execute(VPTransformState &State) {
void VPWidenPointerInductionRecipe::execute(VPTransformState &State) {
assert(IndDesc.getKind() == InductionDescriptor::IK_PtrInduction &&
"Not a pointer induction according to InductionDescriptor!");
-
- PHINode *Phi = cast<PHINode>(getUnderlyingInstr());
- assert(Phi->getType()->isPointerTy() && "Unexpected type.");
+ assert(cast<PHINode>(getUnderlyingInstr())->getType()->isPointerTy() &&
+ "Unexpected type.");
auto *IVR = getParent()->getPlan()->getCanonicalIV();
PHINode *CanonicalIV = cast<PHINode>(State.get(IVR, 0));
More information about the llvm-commits
mailing list