@@ -160,45 +160,45 @@ define void @test_shrink_zext_in_preheader(ptr noalias %src, ptr noalias %dst, i
160
160
; CHECK: vector.main.loop.iter.check:
161
161
; CHECK-NEXT: br i1 false, label [[VEC_EPILOG_PH:%.*]], label [[VECTOR_PH:%.*]]
162
162
; CHECK: vector.ph:
163
+ ; CHECK-NEXT: [[BROADCAST_SPLATINSERT:%.*]] = insertelement <16 x i16> poison, i16 [[B]], i64 0
163
164
; CHECK-NEXT: [[TMP0:%.*]] = trunc i32 [[A]] to i16
164
165
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <16 x i16> poison, i16 [[TMP0]], i64 0
165
- ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <16 x i16> poison, i16 [[B]], i64 0
166
- ; CHECK-NEXT: [[TMP3:%.*]] = mul <16 x i16> [[TMP1]], [[TMP2]]
167
- ; CHECK-NEXT: [[TMP4:%.*]] = lshr <16 x i16> [[TMP3]], <i16 8, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison>
168
- ; CHECK-NEXT: [[TMP5:%.*]] = trunc nuw <16 x i16> [[TMP4]] to <16 x i8>
169
- ; CHECK-NEXT: [[TMP6:%.*]] = shufflevector <16 x i8> [[TMP5]], <16 x i8> poison, <16 x i32> zeroinitializer
166
+ ; CHECK-NEXT: [[TMP2:%.*]] = mul <16 x i16> [[TMP1]], [[BROADCAST_SPLATINSERT]]
167
+ ; CHECK-NEXT: [[TMP3:%.*]] = lshr <16 x i16> [[TMP2]], <i16 8, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison>
168
+ ; CHECK-NEXT: [[TMP4:%.*]] = trunc nuw <16 x i16> [[TMP3]] to <16 x i8>
169
+ ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <16 x i8> [[TMP4]], <16 x i8> poison, <16 x i32> zeroinitializer
170
170
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
171
171
; CHECK: vector.body:
172
172
; CHECK-NEXT: [[INDEX:%.*]] = phi i32 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
173
- ; CHECK-NEXT: [[TMP7 :%.*]] = sext i32 [[INDEX]] to i64
174
- ; CHECK-NEXT: [[TMP8 :%.*]] = getelementptr inbounds i8, ptr [[DST]], i64 [[TMP7 ]]
175
- ; CHECK-NEXT: [[TMP9 :%.*]] = getelementptr inbounds nuw i8, ptr [[TMP8 ]], i64 16
176
- ; CHECK-NEXT: store <16 x i8> [[TMP6 ]], ptr [[TMP8 ]], align 1
177
- ; CHECK-NEXT: store <16 x i8> [[TMP6 ]], ptr [[TMP9 ]], align 1
173
+ ; CHECK-NEXT: [[TMP6 :%.*]] = sext i32 [[INDEX]] to i64
174
+ ; CHECK-NEXT: [[TMP7 :%.*]] = getelementptr inbounds i8, ptr [[DST]], i64 [[TMP6 ]]
175
+ ; CHECK-NEXT: [[TMP8 :%.*]] = getelementptr inbounds nuw i8, ptr [[TMP7 ]], i64 16
176
+ ; CHECK-NEXT: store <16 x i8> [[TMP5 ]], ptr [[TMP7 ]], align 1
177
+ ; CHECK-NEXT: store <16 x i8> [[TMP5 ]], ptr [[TMP8 ]], align 1
178
178
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i32 [[INDEX]], 32
179
- ; CHECK-NEXT: [[TMP10 :%.*]] = icmp eq i32 [[INDEX_NEXT]], 992
180
- ; CHECK-NEXT: br i1 [[TMP10 ]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP5:![0-9]+]]
179
+ ; CHECK-NEXT: [[TMP9 :%.*]] = icmp eq i32 [[INDEX_NEXT]], 992
180
+ ; CHECK-NEXT: br i1 [[TMP9 ]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP5:![0-9]+]]
181
181
; CHECK: middle.block:
182
182
; CHECK-NEXT: br i1 false, label [[EXIT:%.*]], label [[VEC_EPILOG_ITER_CHECK:%.*]]
183
183
; CHECK: vec.epilog.iter.check:
184
184
; CHECK-NEXT: br i1 false, label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
185
185
; CHECK: vec.epilog.ph:
186
- ; CHECK-NEXT: [[TMP11 :%.*]] = trunc i32 [[A]] to i16
187
- ; CHECK-NEXT: [[TMP12 :%.*]] = insertelement <8 x i16> poison, i16 [[TMP11]], i64 0
188
- ; CHECK-NEXT: [[TMP13 :%.*]] = insertelement <8 x i16> poison, i16 [[B ]], i64 0
189
- ; CHECK-NEXT: [[TMP14 :%.*]] = mul <8 x i16> [[TMP12 ]], [[TMP13 ]]
190
- ; CHECK-NEXT: [[TMP15 :%.*]] = lshr <8 x i16> [[TMP14 ]], <i16 8, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison>
191
- ; CHECK-NEXT: [[TMP16 :%.*]] = trunc nuw <8 x i16> [[TMP15 ]] to <8 x i8>
192
- ; CHECK-NEXT: [[TMP17 :%.*]] = shufflevector <8 x i8> [[TMP16 ]], <8 x i8> poison, <8 x i32> zeroinitializer
186
+ ; CHECK-NEXT: [[BROADCAST_SPLATINSERT3 :%.*]] = insertelement <8 x i16> poison, i16 [[B]], i64 0
187
+ ; CHECK-NEXT: [[TMP10 :%.*]] = trunc i32 [[A]] to i16
188
+ ; CHECK-NEXT: [[TMP11 :%.*]] = insertelement <8 x i16> poison, i16 [[TMP10 ]], i64 0
189
+ ; CHECK-NEXT: [[TMP12 :%.*]] = mul <8 x i16> [[TMP11 ]], [[BROADCAST_SPLATINSERT3 ]]
190
+ ; CHECK-NEXT: [[TMP13 :%.*]] = lshr <8 x i16> [[TMP12 ]], <i16 8, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison, i16 poison>
191
+ ; CHECK-NEXT: [[TMP14 :%.*]] = trunc nuw <8 x i16> [[TMP13 ]] to <8 x i8>
192
+ ; CHECK-NEXT: [[TMP15 :%.*]] = shufflevector <8 x i8> [[TMP14 ]], <8 x i8> poison, <8 x i32> zeroinitializer
193
193
; CHECK-NEXT: br label [[VEC_EPILOG_VECTOR_BODY:%.*]]
194
194
; CHECK: vec.epilog.vector.body:
195
195
; CHECK-NEXT: [[INDEX7:%.*]] = phi i32 [ 992, [[VEC_EPILOG_PH]] ], [ [[INDEX_NEXT8:%.*]], [[VEC_EPILOG_VECTOR_BODY]] ]
196
- ; CHECK-NEXT: [[TMP18 :%.*]] = sext i32 [[INDEX7]] to i64
197
- ; CHECK-NEXT: [[TMP19 :%.*]] = getelementptr inbounds i8, ptr [[DST]], i64 [[TMP18 ]]
198
- ; CHECK-NEXT: store <8 x i8> [[TMP17 ]], ptr [[TMP19 ]], align 1
196
+ ; CHECK-NEXT: [[TMP16 :%.*]] = sext i32 [[INDEX7]] to i64
197
+ ; CHECK-NEXT: [[TMP17 :%.*]] = getelementptr inbounds i8, ptr [[DST]], i64 [[TMP16 ]]
198
+ ; CHECK-NEXT: store <8 x i8> [[TMP15 ]], ptr [[TMP17 ]], align 1
199
199
; CHECK-NEXT: [[INDEX_NEXT8]] = add nuw i32 [[INDEX7]], 8
200
- ; CHECK-NEXT: [[TMP20 :%.*]] = icmp eq i32 [[INDEX_NEXT8]], 1000
201
- ; CHECK-NEXT: br i1 [[TMP20 ]], label [[VEC_EPILOG_MIDDLE_BLOCK:%.*]], label [[VEC_EPILOG_VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]]
200
+ ; CHECK-NEXT: [[TMP18 :%.*]] = icmp eq i32 [[INDEX_NEXT8]], 1000
201
+ ; CHECK-NEXT: br i1 [[TMP18 ]], label [[VEC_EPILOG_MIDDLE_BLOCK:%.*]], label [[VEC_EPILOG_VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]]
202
202
; CHECK: vec.epilog.middle.block:
203
203
; CHECK-NEXT: br i1 true, label [[EXIT]], label [[VEC_EPILOG_SCALAR_PH]]
204
204
; CHECK: vec.epilog.scalar.ph:
0 commit comments