[llvm] [VPlan] Use VPlan-based costs for pointer inductions. (PR #223394)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 12:57:06 PDT 2026


================
@@ -93,7 +93,7 @@ for.end:
 ; CHECK: Found scalar instruction:   %addr = phi ptr [ %a, %entry ], [ %addr.next, %for.inc ]
 ; CHECK: Found scalar instruction:   %addr.next = getelementptr inbounds i32, ptr %addr, i64 1
 ; CHECK: Scalarizing and predicating: store i32 %tmp2, ptr %addr, align 4
-; CHECK: Cost of 0 for VF 2: induction instruction   %addr = phi ptr [ %a, %entry ], [ %addr.next, %for.inc ]
+; CHECK: Cost of 0 for VF 2: forced scalar   %addr = phi ptr [ %a, %entry ], [ %addr.next, %for.inc ]
----------------
fhahn wrote:

Yep, the remaining code is dealing with forced costs. But I think that is much less relevant in practice on most targets

https://github.com/llvm/llvm-project/pull/223394


More information about the llvm-commits mailing list