@@ -998,11 +998,7 @@ define i64 @multiple_geps_inbounds_nuw(ptr %base, i64 %idx, i64 %idx2) {
998998
999999define <2 x i64 > @splat_geps (ptr %base , <2 x i64 > %idx1 , <2 x i64 > %idx2 ) {
10001000; CHECK-LABEL: @splat_geps(
1001- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds i8, ptr [[BASE:%.*]], <2 x i64> [[IDX1:%.*]]
1002- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds i8, ptr [[BASE]], <2 x i64> [[IDX2:%.*]]
1003- ; CHECK-NEXT: [[GEP1_INT:%.*]] = ptrtoint <2 x ptr> [[GEP1]] to <2 x i64>
1004- ; CHECK-NEXT: [[GEP2_INT:%.*]] = ptrtoint <2 x ptr> [[GEP2]] to <2 x i64>
1005- ; CHECK-NEXT: [[D:%.*]] = sub <2 x i64> [[GEP2_INT]], [[GEP1_INT]]
1001+ ; CHECK-NEXT: [[D:%.*]] = sub nsw <2 x i64> [[IDX2:%.*]], [[IDX1:%.*]]
10061002; CHECK-NEXT: ret <2 x i64> [[D]]
10071003;
10081004 %gep1 = getelementptr inbounds i8 , ptr %base , <2 x i64 > %idx1
@@ -1015,12 +1011,10 @@ define <2 x i64> @splat_geps(ptr %base, <2 x i64> %idx1, <2 x i64> %idx2) {
10151011
10161012define <2 x i64 > @splat_geps_multiple (ptr %base , i64 %idx0 , <2 x i64 > %idx1 , <2 x i64 > %idx2 ) {
10171013; CHECK-LABEL: @splat_geps_multiple(
1018- ; CHECK-NEXT: [[GEP0:%.*]] = getelementptr inbounds i8, ptr [[BASE:%.*]], i64 [[IDX0:%.*]]
1019- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds i8, ptr [[GEP0]], <2 x i64> [[IDX1:%.*]]
1020- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds i8, ptr [[BASE]], <2 x i64> [[IDX2:%.*]]
1021- ; CHECK-NEXT: [[GEP1_INT:%.*]] = ptrtoint <2 x ptr> [[GEP1]] to <2 x i64>
1022- ; CHECK-NEXT: [[GEP2_INT:%.*]] = ptrtoint <2 x ptr> [[GEP2]] to <2 x i64>
1023- ; CHECK-NEXT: [[D:%.*]] = sub <2 x i64> [[GEP2_INT]], [[GEP1_INT]]
1014+ ; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[IDX0:%.*]], i64 0
1015+ ; CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <2 x i64> [[DOTSPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer
1016+ ; CHECK-NEXT: [[TMP1:%.*]] = add nsw <2 x i64> [[DOTSPLAT]], [[IDX1:%.*]]
1017+ ; CHECK-NEXT: [[D:%.*]] = sub nsw <2 x i64> [[IDX2:%.*]], [[TMP1]]
10241018; CHECK-NEXT: ret <2 x i64> [[D]]
10251019;
10261020 %gep0 = getelementptr inbounds i8 , ptr %base , i64 %idx0
0 commit comments