[llvm] [VPlan] Compute the cost for scalar cmp not used for exit condition (PR #197146)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 03:59:49 PDT 2026


================
@@ -43,7 +43,7 @@ define void @wide_or_replaced_with_add_vpinstruction(ptr %src, ptr noalias %dst)
 ; CHECK:  Cost of 0 for VF 2: IR %l = load i64, ptr %g.src, align 8
 ; CHECK:  Cost of 0 for VF 2: IR %iv.4 = add nuw nsw i64 %iv, 4
 ; CHECK:  Cost of 0 for VF 2: IR %c = icmp ule i64 %l, 128
-; CHECK:  Cost of 0 for VF 2: EMIT vp<%cmp.n> = icmp eq ir<32>, vp<[[VP2]]>
+; CHECK:  Cost of 1 for VF 2: EMIT vp<%cmp.n> = icmp eq ir<32>, vp<[[VP2]]>
----------------
david-arm wrote:

It looks like this is being used as the exit condition?

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


More information about the llvm-commits mailing list