[llvm] [VPlan] Preserve WideIVStep wrap-flags (PR #191284)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 06:41:49 PDT 2026
================
@@ -6110,7 +6110,7 @@ define void @test_optimized_cast_induction_feeding_first_order_recurrence(i64 %n
; UNROLL-NO-IC-NEXT: [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i32> [[BROADCAST_SPLATINSERT]], <2 x i32> poison, <2 x i32> zeroinitializer
; UNROLL-NO-IC-NEXT: [[DOTCAST:%.*]] = trunc i64 [[N_VEC]] to i32
; UNROLL-NO-IC-NEXT: [[IND_END:%.*]] = mul i32 [[DOTCAST]], [[STEP]]
-; UNROLL-NO-IC-NEXT: [[TMP17:%.*]] = mul <2 x i32> splat (i32 2), [[BROADCAST_SPLAT]]
+; UNROLL-NO-IC-NEXT: [[TMP17:%.*]] = mul nsw <2 x i32> splat (i32 2), [[BROADCAST_SPLAT]]
----------------
fhahn wrote:
Hmm, thinking a bit more about this, I am no sure if this is actually correct in all cases, in particular VF * step wraps to signed int min, see https://alive2.llvm.org/ce/z/E4Y3cL. This is something we may have to check
https://github.com/llvm/llvm-project/pull/191284
More information about the llvm-commits
mailing list