@@ -998,11 +998,7 @@ define i64 @multiple_geps_inbounds_nuw(ptr %base, i64 %idx, i64 %idx2) {
998
998
999
999
define <2 x i64 > @splat_geps (ptr %base , <2 x i64 > %idx1 , <2 x i64 > %idx2 ) {
1000
1000
; 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:%.*]]
1006
1002
; CHECK-NEXT: ret <2 x i64> [[D]]
1007
1003
;
1008
1004
%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) {
1015
1011
1016
1012
define <2 x i64 > @splat_geps_multiple (ptr %base , i64 %idx0 , <2 x i64 > %idx1 , <2 x i64 > %idx2 ) {
1017
1013
; 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]]
1024
1018
; CHECK-NEXT: ret <2 x i64> [[D]]
1025
1019
;
1026
1020
%gep0 = getelementptr inbounds i8 , ptr %base , i64 %idx0
0 commit comments