[llvm] [VPlan] Compute blend masks from minimum set of edge masks (PR #184838)
Andrei Elovikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 10:08:30 PDT 2026
================
@@ -224,10 +232,100 @@ void VPPredicator::createSwitchEdgeMasks(const VPInstruction *SI) {
setEdgeMask(Src, DefaultDst, DefaultMask);
}
+// Compute the blend masks required for each incoming block for a phi. Do this
+// by traversing the iterated post-dominance frontier for each incoming block
+// until we find an edge that can lead to multiple incoming blocks. The final
+// blend mask is then the disjunction of these edges.
+//
+// In the example below:
+// a
+// / \
+// b c
+// / | |
+// d | |
+// /| | /
+// / e f
----------------
eas wrote:
```suggestion
// b c
// / | |
// d g |
// /| / \ /
// / e f
```
Modify like this to explain why it's safe to ignore b->g ?
https://github.com/llvm/llvm-project/pull/184838
More information about the llvm-commits
mailing list