[llvm] [VPlan] Add initial CFG simplification, removing BranchOnCond true. (PR #106748)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 07:31:51 PDT 2024
================
@@ -1007,9 +1007,19 @@ void VPlan::execute(VPTransformState *State) {
"middle block has unexpected successors");
VPBasicBlock *ScalarPhVPBB = cast<VPBasicBlock>(
MiddleSuccs.size() == 1 ? MiddleSuccs[0] : MiddleSuccs[1]);
- assert(!isa<VPIRBasicBlock>(ScalarPhVPBB) &&
- "scalar preheader cannot be wrapped already");
- replaceVPBBWithIRVPBB(ScalarPhVPBB, ScalarPh);
+ if (!isa<VPIRBasicBlock>(ScalarPhVPBB)) {
+ assert(!isa<VPIRBasicBlock>(ScalarPhVPBB) &&
----------------
david-arm wrote:
Isn't this testing exactly the same thing in the if statement? I think you can remove this as being redundant.
https://github.com/llvm/llvm-project/pull/106748
More information about the llvm-commits
mailing list