@@ -762,6 +762,13 @@ define void @histogram_generates_vectors_crash(ptr %data_array, ptr noalias %ind
762762; CHECK-NEXT: br label [[FOR_BODY:%.*]]
763763; CHECK: for.body:
764764; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[FOR_BODY]] ]
765+ ; CHECK-NEXT: [[GEP_INDICES:%.*]] = getelementptr [1048576 x i32], ptr [[INDICES]], i64 [[IV]]
766+ ; CHECK-NEXT: [[L_IDX:%.*]] = load i32, ptr [[GEP_INDICES]], align 4
767+ ; CHECK-NEXT: [[IDXPROM5:%.*]] = sext i32 [[L_IDX]] to i64
768+ ; CHECK-NEXT: [[GEP_BUCKET:%.*]] = getelementptr [1048576 x i32], ptr [[DATA_ARRAY]], i64 [[IDXPROM5]]
769+ ; CHECK-NEXT: [[L_BUCKET:%.*]] = load i32, ptr [[GEP_BUCKET]], align 4
770+ ; CHECK-NEXT: [[INC:%.*]] = add i32 [[L_BUCKET]], 1
771+ ; CHECK-NEXT: store i32 [[INC]], ptr [[GEP_BUCKET]], align 4
765772; CHECK-NEXT: [[IV_NEXT]] = add i64 [[IV]], 1
766773; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV]], 1
767774; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_EXIT:%.*]], label [[FOR_BODY]]
@@ -778,7 +785,7 @@ for.body:
778785 %idxprom5 = sext i32 %l.idx to i64
779786 %gep.bucket = getelementptr [1048576 x i32 ], ptr %data_array , i64 %idxprom5
780787 %l.bucket = load i32 , ptr %gep.bucket , align 4
781- %inc = add i32 %l.bucket , 0
788+ %inc = add i32 %l.bucket , 1
782789 store i32 %inc , ptr %gep.bucket , align 4
783790 %iv.next = add i64 %iv , 1
784791 %exitcond = icmp eq i64 %iv , 1
0 commit comments