[llvm] 6b7c186 - [VPlan] Inline variable into assertion. NFC.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 05:00:42 PDT 2022
Author: Benjamin Kramer
Date: 2022-06-03T13:59:48+02:00
New Revision: 6b7c18639021cd3da69c6c2812e189b9cd4cf34f
URL: https://github.com/llvm/llvm-project/commit/6b7c18639021cd3da69c6c2812e189b9cd4cf34f
DIFF: https://github.com/llvm/llvm-project/commit/6b7c18639021cd3da69c6c2812e189b9cd4cf34f.diff
LOG: [VPlan] Inline variable into assertion. NFC.
Avoids a warning in release builds
llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp:311:14: warning: unused variable 'BrCond' [-Wunused-variable]
Value *BrCond = Br->getCondition();
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
index 986212ca462af..84b0dac862b62 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
@@ -307,11 +307,9 @@ VPBasicBlock *PlainCFGBuilder::buildPlainCFG() {
// Get VPBB's condition bit.
assert(isa<BranchInst>(TI) && "Unsupported terminator!");
- auto *Br = cast<BranchInst>(TI);
- Value *BrCond = Br->getCondition();
// Look up the branch condition to get the corresponding VPValue
// representing the condition bit in VPlan (which may be in another VPBB).
- assert(IRDef2VPValue.count(BrCond) &&
+ assert(IRDef2VPValue.count(cast<BranchInst>(TI)->getCondition()) &&
"Missing condition bit in IRDef2VPValue!");
// Link successors.
More information about the llvm-commits
mailing list