[llvm] [VPlan] Strip first-lane handling in legalizeOptzInd (PR #194795)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 04:55:44 PDT 2026


================
@@ -83,8 +82,8 @@ define i64 @select_decreasing_induction_icmp_non_const_start(ptr %a, ptr %b, i64
 ; CHECK-NEXT:    [[TMP7:%.*]] = sub nsw i64 0, [[TMP5]]
 ; CHECK-NEXT:    [[BROADCAST_SPLATINSERT2:%.*]] = insertelement <vscale x 4 x i64> poison, i64 [[TMP7]], i64 0
 ; CHECK-NEXT:    [[BROADCAST_SPLAT3:%.*]] = shufflevector <vscale x 4 x i64> [[BROADCAST_SPLATINSERT2]], <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
-; CHECK-NEXT:    [[OFFSET_IDX:%.*]] = sub i64 [[N]], [[INDEX]]
-; CHECK-NEXT:    [[TMP38:%.*]] = add nsw i64 [[OFFSET_IDX]], -1
----------------
fhahn wrote:

There are uArchs where this should be strictly negative, i.e. if ExtractElement is more expensive than scalar integer ops, which holds for a number of AArch64 for example I think

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


More information about the llvm-commits mailing list