[llvm] [VPlan] Add VPlan-dump-based test for predication (PR #180794)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 11 00:58:24 PST 2026
================
@@ -0,0 +1,389 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -disable-output < %s -p loop-vectorize -vplan-print-after=introduceMasksAndLinearize -vplan-print-limit-to-vector-region 2>&1 | FileCheck %s
+
+define void @diamond_phi(ptr %a) {
+; CHECK-LABEL: 'diamond_phi'
+; CHECK-NEXT: <x1> vector loop: {
+; CHECK-NEXT: vector.body:
+; CHECK-NEXT: EMIT vp<[[VP3:%[0-9]+]]> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
+; CHECK-NEXT: ir<%iv> = WIDEN-INDUCTION nuw nsw ir<0>, ir<1>, vp<[[VP0:%[0-9]+]]>
+; CHECK-NEXT: EMIT ir<%gep> = getelementptr ir<%a>, ir<%iv>
+; CHECK-NEXT: EMIT ir<%c0> = icmp sle ir<%iv>, ir<0>
+; CHECK-NEXT: Successor(s): bb2
+; CHECK-EMPTY:
+; CHECK-NEXT: bb2:
----------------
lukel97 wrote:
Not for this PR, but after #142285 do we still need to preserve the BBs after they're linearized, can we call mergeBlocksIntoPredecessors at some point? I think createAndOptimizeReplicateRegions does it but maybe we can run it earlier.
https://github.com/llvm/llvm-project/pull/180794
More information about the llvm-commits
mailing list