[llvm] [VPlan] Add BranchOnMultiCond, use for early exit plans. (PR #172750)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 24 15:51:10 PST 2025
================
@@ -3714,6 +3714,54 @@ void VPlanTransforms::dissolveLoopRegions(VPlan &Plan) {
R->dissolveToCFGLoop();
}
+void VPlanTransforms::expandBranchOnTwoConds(VPlan &Plan) {
+ // Expand BranchOnTwoConds instructions into explicit CFG with
+ // single-condition branches
+ SmallVector<VPInstruction *> WorkList;
+ for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
+ vp_depth_first_shallow(Plan.getEntry()))) {
+ assert((!isa<VPRegionBlock>(VPBB) ||
+ cast<VPRegionBlock>(VPBB)->isReplicator()) &&
+ "only replicating regions must remain");
----------------
ayalz wrote:
```suggestion
"only replicating regions expected");
```
https://github.com/llvm/llvm-project/pull/172750
More information about the llvm-commits
mailing list