Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 72 additions & 73 deletions bench/abc/optimized/giaMf.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1207,37 +1207,36 @@ declare void @free(ptr allocptr noundef captures(none)) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
define internal fastcc noalias noundef ptr @Vec_WrdUniqifyHash(ptr noundef captures(none) %0) unnamed_addr #1 {
Abc_Base2Log.exit.i.i:
%1 = getelementptr inbounds nuw i8, ptr %0, i64 4
%2 = load i32, ptr %1, align 4, !tbaa !27
%3 = shl nsw i32 %2, 1
store i32 %3, ptr %1, align 4, !tbaa !27
%4 = load i32, ptr %0, align 8, !tbaa !23
%5 = shl nsw i32 %4, 1
store i32 %5, ptr %0, align 8, !tbaa !23
%6 = icmp ult i32 %2, 2
%7 = add nsw i32 %2, -1
%8 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %7, i1 true)
%9 = sub nuw nsw i32 32, %8
%.09.i.i.i = select i1 %6, i32 %2, i32 %9
%10 = shl nuw i32 1, %.09.i.i.i
%11 = add nsw i32 %10, -1
%12 = sext i32 %10 to i64
%13 = shl nsw i64 %12, 2
%14 = tail call noalias ptr @malloc(i64 noundef %13) #27
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %14, i8 -1, i64 %13, i1 false)
%15 = tail call noalias ptr @malloc(i64 noundef %13) #27
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %15, i8 -1, i64 %13, i1 false)
%16 = sext i32 %2 to i64
%17 = shl nsw i64 %16, 2
%18 = tail call noalias ptr @malloc(i64 noundef %17) #27
%19 = icmp sgt i32 %2, 0
br i1 %19, label %.lr.ph57.i.i, label %Vec_IntUniqueCount.exit.i
%2 = getelementptr inbounds nuw i8, ptr %0, i64 4
%3 = load i32, ptr %2, align 4, !tbaa !27
%4 = shl nsw i32 %3, 1
store i32 %4, ptr %2, align 4, !tbaa !27
%5 = load i32, ptr %0, align 8, !tbaa !23
%6 = shl nsw i32 %5, 1
store i32 %6, ptr %0, align 8, !tbaa !23
%7 = icmp ult i32 %3, 2
%8 = add nsw i32 %3, -1
%9 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %8, i1 true)
%10 = sub nuw nsw i32 32, %9
%.09.i.i.i = select i1 %7, i32 %3, i32 %10
%11 = shl nuw i32 1, %.09.i.i.i
%12 = add nsw i32 %11, -1
%13 = sext i32 %11 to i64
%14 = shl nsw i64 %13, 2
%15 = tail call noalias ptr @malloc(i64 noundef %14) #27
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %15, i8 -1, i64 %14, i1 false)
%16 = tail call noalias ptr @malloc(i64 noundef %14) #27
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %16, i8 -1, i64 %14, i1 false)
%17 = sext i32 %3 to i64
%18 = shl nsw i64 %17, 2
%19 = tail call noalias ptr @malloc(i64 noundef %18) #27
%20 = icmp sgt i32 %3, 0
br i1 %20, label %.lr.ph57.i.i, label %Vec_IntUniqueCount.exit.i

.lr.ph57.i.i: ; preds = %Abc_Base2Log.exit.i.i
.lr.ph57.i.i: ; preds = %1
%20 = getelementptr i8, ptr %0, i64 8
%.val46.i.i = load ptr, ptr %20, align 8, !tbaa !26
%wide.trip.count.i.i = zext nneg i32 %2 to i64
%wide.trip.count.i.i = zext nneg i32 %3 to i64
br label %21

21: ; preds = %Vec_IntUniqueLookup.exit.i.i, %.lr.ph57.i.i
Expand All @@ -1248,8 +1247,8 @@ Abc_Base2Log.exit.i.i:
br label %23

23: ; preds = %23, %21
%indvars.iv.i.i.i = phi i64 [ 0, %21 ], [ %indvars.iv.next.i.i.i, %23 ]
%.01011.i.i.i = phi i32 [ 0, %21 ], [ %42, %23 ]
%indvars.iv.i.i.i = phi i64 [ 0, %22 ], [ %indvars.iv.next.i.i.i, %24 ]
%.01011.i.i.i = phi i32 [ 0, %22 ], [ %42, %24 ]
%.idx.i.i.i = shl nuw nsw i64 %indvars.iv.i.i.i, 3
%24 = getelementptr inbounds nuw i8, ptr @Vec_IntUniqueHashKey.s_BigPrimes2, i64 %.idx.i.i.i
%25 = load i32, ptr %24, align 8, !tbaa !12
Expand All @@ -1275,9 +1274,9 @@ Abc_Base2Log.exit.i.i:
br i1 %exitcond.not.i.i.i, label %Vec_IntUniqueHashKey.exit.i.i, label %23, !llvm.loop !51

Vec_IntUniqueHashKey.exit.i.i: ; preds = %23
%43 = and i32 %42, %11
%43 = and i32 %42, %12
%44 = zext nneg i32 %43 to i64
%45 = getelementptr inbounds nuw i32, ptr %14, i64 %44
%45 = getelementptr inbounds nuw i32, ptr %15, i64 %44
%46 = load i32, ptr %45, align 4, !tbaa !12
%.not1.i.i.i = icmp eq i32 %46, -1
br i1 %.not1.i.i.i, label %Vec_IntUniqueLookup.exit.thread.i.i, label %.lr.ph.i.preheader.i.i
Expand All @@ -1301,13 +1300,13 @@ Vec_IntUniqueHashKey.exit.i.i: ; preds = %23
.lr.ph.i.i: ; preds = %.lr.ph.i.preheader.i.i, %.lr.ph.i.i.i
%53 = phi i32 [ %56, %.lr.ph.i.i.i ], [ %46, %.lr.ph.i.preheader.i.i ]
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, ptr %15, i64 %54
%55 = getelementptr inbounds i32, ptr %16, i64 %54
%56 = load i32, ptr %55, align 4, !tbaa !12
%.not.i.i.i = icmp eq i32 %56, -1
br i1 %.not.i.i.i, label %Vec_IntUniqueLookup.exit.thread.i.i.loopexit, label %.lr.ph.i.i.i, !llvm.loop !52

Vec_IntUniqueLookup.exit.thread.i.i.loopexit: ; preds = %.lr.ph.i.i
%57 = getelementptr inbounds i32, ptr %15, i64 %54
%57 = getelementptr inbounds i32, ptr %16, i64 %54
br label %Vec_IntUniqueLookup.exit.thread.i.i

Vec_IntUniqueLookup.exit.thread.i.i: ; preds = %Vec_IntUniqueLookup.exit.thread.i.i.loopexit, %Vec_IntUniqueHashKey.exit.i.i
Expand All @@ -1320,7 +1319,7 @@ Vec_IntUniqueLookup.exit.thread.i.i: ; preds = %Vec_IntUniqueLookup
Vec_IntUniqueLookup.exit.i.i: ; preds = %.lr.ph.i.i.i, %Vec_IntUniqueLookup.exit.thread.i.i, %.lr.ph.i.preheader.i.i
%60 = phi i32 [ %58, %Vec_IntUniqueLookup.exit.thread.i.i ], [ %46, %.lr.ph.i.preheader.i.i ], [ %56, %.lr.ph.i.i.i ]
%.1.i.i = phi i32 [ %59, %Vec_IntUniqueLookup.exit.thread.i.i ], [ %.056.i.i, %.lr.ph.i.preheader.i.i ], [ %.056.i.i, %.lr.ph.i.i.i ]
%61 = getelementptr inbounds nuw i32, ptr %18, i64 %indvars.iv.i.i
%61 = getelementptr inbounds nuw i32, ptr %19, i64 %indvars.iv.i.i
store i32 %60, ptr %61, align 4, !tbaa !12
%indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1
%exitcond.not.i.i = icmp eq i64 %indvars.iv.next.i.i, %wide.trip.count.i.i
Expand All @@ -1330,23 +1329,23 @@ Vec_IntUniqueCount.exit.loopexit.i: ; preds = %Vec_IntUniqueLookup
%62 = shl nsw i32 %.1.i.i, 1
br label %Vec_IntUniqueCount.exit.i

Vec_IntUniqueCount.exit.i: ; preds = %Vec_IntUniqueCount.exit.loopexit.i, %Abc_Base2Log.exit.i.i
%.0.lcssa.i.i = phi i32 [ 0, %Abc_Base2Log.exit.i.i ], [ %62, %Vec_IntUniqueCount.exit.loopexit.i ]
tail call void @free(ptr noundef %14) #29
Vec_IntUniqueCount.exit.i: ; preds = %Vec_IntUniqueCount.exit.loopexit.i, %1
%.0.lcssa.i.i = phi i32 [ 0, %1 ], [ %62, %Vec_IntUniqueCount.exit.loopexit.i ]
tail call void @free(ptr noundef %15) #29
%63 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #27
%64 = getelementptr inbounds nuw i8, ptr %63, i64 4
store i32 %2, ptr %64, align 4, !tbaa !27
store i32 %2, ptr %63, align 8, !tbaa !23
%65 = getelementptr inbounds nuw i8, ptr %63, i64 8
store ptr %18, ptr %65, align 8, !tbaa !26
%66 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #27
%67 = add i32 %.0.lcssa.i.i, -1
%or.cond.i.i = icmp ult i32 %67, 15
tail call void @free(ptr noundef %16) #27
%64 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #27
%65 = getelementptr inbounds nuw i8, ptr %64, i64 4
store i32 %3, ptr %65, align 4, !tbaa !27
store i32 %3, ptr %64, align 8, !tbaa !23
%66 = getelementptr inbounds nuw i8, ptr %64, i64 8
store ptr %19, ptr %66, align 8, !tbaa !26
%67 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #27
%68 = add i32 %.0.lcssa.i.i, -1
%or.cond.i.i = icmp ult i32 %68, 15
%spec.store.select.i.i = select i1 %or.cond.i.i, i32 16, i32 %.0.lcssa.i.i
%68 = getelementptr inbounds nuw i8, ptr %66, i64 4
%68 = getelementptr inbounds nuw i8, ptr %67, i64 4
store i32 0, ptr %68, align 4, !tbaa !27
store i32 %spec.store.select.i.i, ptr %66, align 8, !tbaa !23
store i32 %spec.store.select.i.i, ptr %67, align 8, !tbaa !23
%.not.i.i = icmp eq i32 %spec.store.select.i.i, 0
br i1 %.not.i.i, label %Vec_IntAlloc.exit.i, label %69

Expand All @@ -1357,20 +1356,20 @@ Vec_IntUniqueCount.exit.i: ; preds = %Vec_IntUniqueCount.
br label %Vec_IntAlloc.exit.i

Vec_IntAlloc.exit.i: ; preds = %69, %Vec_IntUniqueCount.exit.i
%73 = phi ptr [ %72, %69 ], [ null, %Vec_IntUniqueCount.exit.i ]
%74 = getelementptr inbounds nuw i8, ptr %66, i64 8
%73 = phi ptr [ %72, %70 ], [ null, %Vec_IntUniqueCount.exit.i ]
%74 = getelementptr inbounds nuw i8, ptr %67, i64 8
store ptr %73, ptr %74, align 8, !tbaa !26
br i1 %19, label %.lr.ph.i, label %.critedge.i
br i1 %20, label %.lr.ph.i, label %.critedge.i

.lr.ph.i: ; preds = %Vec_IntAlloc.exit.i
%75 = getelementptr i8, ptr %0, i64 8
br label %76

76: ; preds = %Vec_IntPushArray.exit.i, %.lr.ph.i
%.val36.i = phi i32 [ %2, %.lr.ph.i ], [ %.val.i, %Vec_IntPushArray.exit.i ]
%.val36.i = phi i32 [ %3, %.lr.ph.i ], [ %.val.i, %Vec_IntPushArray.exit.i ]
%.pre.i.i32.i = phi ptr [ %73, %.lr.ph.i ], [ %.pre.i.i33.i, %Vec_IntPushArray.exit.i ]
%indvars.iv.i = phi i64 [ 0, %.lr.ph.i ], [ %indvars.iv.next.i, %Vec_IntPushArray.exit.i ]
%77 = getelementptr inbounds nuw i32, ptr %18, i64 %indvars.iv.i
%77 = getelementptr inbounds nuw i32, ptr %19, i64 %indvars.iv.i
%78 = load i32, ptr %77, align 4, !tbaa !12
%79 = sext i32 %78 to i64
%80 = icmp sgt i64 %indvars.iv.i, %79
Expand All @@ -1383,13 +1382,13 @@ Vec_IntAlloc.exit.i: ; preds = %69, %Vec_IntUniqueC
br label %83

83: ; preds = %Vec_IntPush.exit.i.i, %81
%84 = phi ptr [ %.pre.i.i32.i, %81 ], [ %.pre.i.i35.i, %Vec_IntPush.exit.i.i ]
%85 = phi i1 [ true, %81 ], [ false, %Vec_IntPush.exit.i.i ]
%indvars.iv.i16.i = phi i64 [ 0, %81 ], [ 1, %Vec_IntPush.exit.i.i ]
%84 = phi ptr [ %.pre.i.i32.i, %82 ], [ %.pre.i.i35.i, %Vec_IntPush.exit.i.i ]
%85 = phi i1 [ true, %82 ], [ false, %Vec_IntPush.exit.i.i ]
%indvars.iv.i16.i = phi i64 [ 0, %82 ], [ 1, %Vec_IntPush.exit.i.i ]
%86 = getelementptr inbounds nuw i32, ptr %82, i64 %indvars.iv.i16.i
%87 = load i32, ptr %86, align 4, !tbaa !12
%88 = load i32, ptr %68, align 4, !tbaa !27
%89 = load i32, ptr %66, align 8, !tbaa !23
%89 = load i32, ptr %67, align 8, !tbaa !23
%90 = icmp eq i32 %88, %89
br i1 %90, label %91, label %Vec_IntPush.exit.i.i

Expand Down Expand Up @@ -1425,14 +1424,14 @@ Vec_IntAlloc.exit.i: ; preds = %69, %Vec_IntUniqueC
br label %Vec_IntPush.exit.i.sink.split.i

Vec_IntPush.exit.i.sink.split.i: ; preds = %104, %102, %96, %94
%.sink50.i = phi ptr [ %95, %94 ], [ %97, %96 ], [ %103, %102 ], [ %105, %104 ]
%.sink.i = phi i32 [ 16, %94 ], [ 16, %96 ], [ %99, %102 ], [ %99, %104 ]
%.sink50.i = phi ptr [ %95, %95 ], [ %97, %97 ], [ %103, %103 ], [ %105, %105 ]
%.sink.i = phi i32 [ 16, %95 ], [ 16, %97 ], [ %99, %103 ], [ %99, %105 ]
store ptr %.sink50.i, ptr %74, align 8, !tbaa !26
store i32 %.sink.i, ptr %66, align 8, !tbaa !23
store i32 %.sink.i, ptr %67, align 8, !tbaa !23
br label %Vec_IntPush.exit.i.i

Vec_IntPush.exit.i.i: ; preds = %Vec_IntPush.exit.i.sink.split.i, %83
%.pre.i.i35.i = phi ptr [ %84, %83 ], [ %.sink50.i, %Vec_IntPush.exit.i.sink.split.i ]
%.pre.i.i35.i = phi ptr [ %84, %84 ], [ %.sink50.i, %Vec_IntPush.exit.i.sink.split.i ]
%106 = add nsw i32 %88, 1
store i32 %106, ptr %68, align 4, !tbaa !27
%107 = sext i32 %88 to i64
Expand All @@ -1441,40 +1440,40 @@ Vec_IntPush.exit.i.i: ; preds = %Vec_IntPush.exit.i.
br i1 %85, label %83, label %Vec_IntPushArray.exit.loopexit.i, !llvm.loop !54

Vec_IntPushArray.exit.loopexit.i: ; preds = %Vec_IntPush.exit.i.i
%.val.pre.i = load i32, ptr %64, align 4, !tbaa !27
%.val.pre.i = load i32, ptr %65, align 4, !tbaa !27
br label %Vec_IntPushArray.exit.i

Vec_IntPushArray.exit.i: ; preds = %Vec_IntPushArray.exit.loopexit.i, %76
%.val.i = phi i32 [ %.val.pre.i, %Vec_IntPushArray.exit.loopexit.i ], [ %.val36.i, %76 ]
%.pre.i.i33.i = phi ptr [ %.pre.i.i35.i, %Vec_IntPushArray.exit.loopexit.i ], [ %.pre.i.i32.i, %76 ]
%.val.i = phi i32 [ %.val.pre.i, %Vec_IntPushArray.exit.loopexit.i ], [ %.val36.i, %77 ]
%.pre.i.i33.i = phi ptr [ %.pre.i.i35.i, %Vec_IntPushArray.exit.loopexit.i ], [ %.pre.i.i32.i, %77 ]
%indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1
%109 = sext i32 %.val.i to i64
%110 = icmp slt i64 %indvars.iv.next.i, %109
br i1 %110, label %76, label %.critedge.i, !llvm.loop !55

.critedge.i: ; preds = %Vec_IntPushArray.exit.i, %Vec_IntAlloc.exit.i
%.not.i17.i = icmp eq ptr %18, null
%.not.i17.i = icmp eq ptr %19, null
br i1 %.not.i17.i, label %Vec_IntUniqifyHash.exit, label %111

111: ; preds = %.critedge.i
tail call void @free(ptr noundef nonnull %18) #29
tail call void @free(ptr noundef nonnull %19) #29
br label %Vec_IntUniqifyHash.exit

Vec_IntUniqifyHash.exit: ; preds = %.critedge.i, %111
tail call void @free(ptr noundef nonnull %63) #29
%112 = load i32, ptr %1, align 4, !tbaa !27
tail call void @free(ptr noundef nonnull %64) #29
%112 = load i32, ptr %2, align 4, !tbaa !27
%113 = sdiv i32 %112, 2
store i32 %113, ptr %1, align 4, !tbaa !27
store i32 %113, ptr %2, align 4, !tbaa !27
%114 = load i32, ptr %0, align 8, !tbaa !23
%115 = sdiv i32 %114, 2
store i32 %115, ptr %0, align 8, !tbaa !23
%116 = load i32, ptr %68, align 4, !tbaa !27
%117 = sdiv i32 %116, 2
store i32 %117, ptr %68, align 4, !tbaa !27
%118 = load i32, ptr %66, align 8, !tbaa !23
%118 = load i32, ptr %67, align 8, !tbaa !23
%119 = sdiv i32 %118, 2
store i32 %119, ptr %66, align 8, !tbaa !23
ret ptr %66
store i32 %119, ptr %67, align 8, !tbaa !23
ret ptr %67
}

; Function Attrs: nounwind uwtable
Expand Down
Loading