@@ -137,6 +137,8 @@ define void @test_induction_step_needs_expansion(ptr noalias %j, ptr %k, i64 %l,
137137; CHECK-LABEL: @test_induction_step_needs_expansion(
138138; CHECK-NEXT: iter.check:
139139; CHECK-NEXT: [[TMP0:%.*]] = sub i16 0, [[OFF:%.*]]
140+ ; CHECK-NEXT: [[BROADCAST_SPLATINSERT:%.*]] = insertelement <16 x i16> poison, i16 [[TMP0]], i64 0
141+ ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[BROADCAST_SPLATINSERT]], <16 x i16> poison, <16 x i32> zeroinitializer
140142; CHECK-NEXT: [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 [[L:%.*]], 8
141143; CHECK-NEXT: br i1 [[MIN_ITERS_CHECK]], label [[VEC_EPILOG_SCALAR_PH:%.*]], label [[VECTOR_MAIN_LOOP_ITER_CHECK:%.*]]
142144; CHECK: vector.main.loop.iter.check:
@@ -147,15 +149,13 @@ define void @test_induction_step_needs_expansion(ptr noalias %j, ptr %k, i64 %l,
147149; CHECK-NEXT: [[N_VEC:%.*]] = sub i64 [[L]], [[N_MOD_VF]]
148150; CHECK-NEXT: [[DOTCAST:%.*]] = trunc i64 [[N_VEC]] to i16
149151; CHECK-NEXT: [[IND_END:%.*]] = mul i16 [[DOTCAST]], [[TMP0]]
150- ; CHECK-NEXT: [[DOTSPLATINSERT2:%.*]] = insertelement <16 x i16> poison, i16 [[TMP0]], i64 0
151- ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[DOTSPLATINSERT2]], <16 x i16> poison, <16 x i32> zeroinitializer
152152; CHECK-NEXT: [[TMP1:%.*]] = mul <16 x i16> splat (i16 16), [[TMP2]]
153153; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <16 x i16> poison, i16 [[TMP0]], i64 0
154154; CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <16 x i16> [[DOTSPLATINSERT]], <16 x i16> poison, <16 x i32> zeroinitializer
155155; CHECK-NEXT: [[TMP11:%.*]] = mul <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, [[DOTSPLAT]]
156156; CHECK-NEXT: [[INDUCTION:%.*]] = add <16 x i16> zeroinitializer, [[TMP11]]
157- ; CHECK-NEXT: [[BROADCAST_SPLATINSERT :%.*]] = insertelement <16 x i16> poison, i16 [[OFF]], i64 0
158- ; CHECK-NEXT: [[BROADCAST_SPLAT3:%.*]] = shufflevector <16 x i16> [[BROADCAST_SPLATINSERT ]], <16 x i16> poison, <16 x i32> zeroinitializer
157+ ; CHECK-NEXT: [[BROADCAST_SPLATINSERT2 :%.*]] = insertelement <16 x i16> poison, i16 [[OFF]], i64 0
158+ ; CHECK-NEXT: [[BROADCAST_SPLAT3:%.*]] = shufflevector <16 x i16> [[BROADCAST_SPLATINSERT2 ]], <16 x i16> poison, <16 x i32> zeroinitializer
159159; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
160160; CHECK: vector.body:
161161; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
@@ -171,11 +171,11 @@ define void @test_induction_step_needs_expansion(ptr noalias %j, ptr %k, i64 %l,
171171; CHECK-NEXT: [[TMP8:%.*]] = getelementptr inbounds i16, ptr [[K:%.*]], i64 [[TMP3]]
172172; CHECK-NEXT: [[TMP9:%.*]] = getelementptr inbounds i16, ptr [[TMP8]], i32 0
173173; CHECK-NEXT: [[TMP10:%.*]] = getelementptr inbounds i16, ptr [[TMP8]], i32 16
174- ; CHECK-NEXT: [[TMP11 :%.*]] = getelementptr inbounds i16, ptr [[TMP8]], i32 32
174+ ; CHECK-NEXT: [[TMP21 :%.*]] = getelementptr inbounds i16, ptr [[TMP8]], i32 32
175175; CHECK-NEXT: [[TMP12:%.*]] = getelementptr inbounds i16, ptr [[TMP8]], i32 48
176176; CHECK-NEXT: store <16 x i16> [[TMP4]], ptr [[TMP9]], align 2
177177; CHECK-NEXT: store <16 x i16> [[TMP5]], ptr [[TMP10]], align 2
178- ; CHECK-NEXT: store <16 x i16> [[TMP6]], ptr [[TMP11 ]], align 2
178+ ; CHECK-NEXT: store <16 x i16> [[TMP6]], ptr [[TMP21 ]], align 2
179179; CHECK-NEXT: store <16 x i16> [[TMP7]], ptr [[TMP12]], align 2
180180; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 64
181181; CHECK-NEXT: [[VEC_IND_NEXT]] = add <16 x i16> [[STEP_ADD_3]], [[TMP1]]
0 commit comments