@@ -1513,6 +1513,25 @@ define <4 x float> @insertelement_constant_chain() {
1513
1513
ret <4 x float > %ins.3
1514
1514
}
1515
1515
1516
+ define <4 x float > @insertelement_non_constant_chain (i32 %idx ) {
1517
+ ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
1518
+ ; CHECK-LABEL: define <4 x float> @insertelement_non_constant_chain
1519
+ ; CHECK-SAME: (i32 [[IDX:%.*]]) #[[ATTR3]] {
1520
+ ; CHECK-NEXT: [[INS_0:%.*]] = insertelement <4 x float> poison, float 1.000000e+00, i32 0
1521
+ ; CHECK-NEXT: [[INS_1:%.*]] = insertelement <4 x float> [[INS_0]], float 0.000000e+00, i32 1
1522
+ ; CHECK-NEXT: [[INS_2:%.*]] = insertelement <4 x float> [[INS_1]], float -9.000000e+00, i32 2
1523
+ ; CHECK-NEXT: [[INS_4:%.*]] = insertelement <4 x float> [[INS_2]], float 3.000000e+00, i32 3
1524
+ ; CHECK-NEXT: [[INS_3:%.*]] = insertelement <4 x float> [[INS_2]], float 4.000000e+00, i32 [[IDX]]
1525
+ ; CHECK-NEXT: ret <4 x float> [[INS_3]]
1526
+ ;
1527
+ %ins.0 = insertelement <4 x float > poison, float 1 .0 , i32 0
1528
+ %ins.1 = insertelement <4 x float > %ins.0 , float 0 .0 , i32 1
1529
+ %ins.2 = insertelement <4 x float > %ins.1 , float -9 .0 , i32 2
1530
+ %ins.3 = insertelement <4 x float > %ins.2 , float 3 .0 , i32 3
1531
+ %ins.4 = insertelement <4 x float > %ins.2 , float 4 .0 , i32 %idx
1532
+ ret <4 x float > %ins.4
1533
+ }
1534
+
1516
1535
define <vscale x 4 x float > @insertelement_scalable_constant_chain () {
1517
1536
; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
1518
1537
; CHECK-LABEL: define <vscale x 4 x float> @insertelement_scalable_constant_chain
0 commit comments