@@ -932,21 +932,17 @@ define i1 @gep_multiple_multi_use_below_limit_extra_one_use_gep2(ptr %base, i64
932932 ret i1 %cmp
933933}
934934
935- define i1 @gep_multiple_multi_use_below_limit_consts (ptr %base , i64 %idx1 , i64 %idx2 ) {
936- ; CHECK-LABEL: @gep_multiple_multi_use_below_limit_consts (
935+ define i1 @gep_multiple_multi_above_below_limit_consts (ptr %base , i64 %idx1 , i64 %idx2 ) {
936+ ; CHECK-LABEL: @gep_multiple_multi_above_below_limit_consts (
937937; CHECK-NEXT: [[GEP1:%.*]] = getelementptr i8, ptr [[BASE:%.*]], i64 16
938938; CHECK-NEXT: call void @use(ptr [[GEP1]])
939- ; CHECK-NEXT: [[GEP4_IDX:%.*]] = shl i64 [[IDX2:%.*]], 2
940- ; CHECK-NEXT: [[GEP4:%.*]] = getelementptr i8, ptr [[GEP1]], i64 [[GEP4_IDX]]
941- ; CHECK-NEXT: call void @use(ptr [[GEP4]])
942- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr i8, ptr [[GEP4]], i64 16
939+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr i32, ptr [[GEP1]], i64 [[IDX1:%.*]]
940+ ; CHECK-NEXT: call void @use(ptr [[GEP2]])
941+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr i8, ptr [[GEP2]], i64 16
943942; CHECK-NEXT: call void @use(ptr [[GEP3]])
944- ; CHECK-NEXT: [[GEP4_IDX1:%.*]] = shl i64 [[IDX3:%.*]], 2
945- ; CHECK-NEXT: [[GEP5:%.*]] = getelementptr i8, ptr [[GEP3]], i64 [[GEP4_IDX1]]
946- ; CHECK-NEXT: call void @use(ptr [[GEP5]])
947- ; CHECK-NEXT: [[TMP1:%.*]] = add i64 [[GEP4_IDX]], 32
948- ; CHECK-NEXT: [[TMP2:%.*]] = sub i64 0, [[GEP4_IDX1]]
949- ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[TMP1]], [[TMP2]]
943+ ; CHECK-NEXT: [[GEP4:%.*]] = getelementptr i32, ptr [[GEP3]], i64 [[IDX2:%.*]]
944+ ; CHECK-NEXT: call void @use(ptr [[GEP4]])
945+ ; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr [[GEP4]], [[BASE]]
950946; CHECK-NEXT: ret i1 [[CMP]]
951947;
952948 %gep1 = getelementptr i32 , ptr %base , i64 4
0 commit comments