Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit: PR121892 #1924

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions bench/linux/optimized/huf_decompress.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2622,9 +2622,9 @@ define dso_local i64 @HUF_readDTableX2_wksp_bmi2(ptr noundef %0, ptr noundef %1,
%191 = zext i32 %190 to i64
%192 = getelementptr %struct.HUF_DEltX2, ptr %153, i64 %191
%193 = sext i32 %183 to i64
%194 = getelementptr %struct.sortedSymbol_t, ptr %118, i64 %193
%194 = getelementptr i8, ptr %118, i64 %193
%195 = sext i32 %186 to i64
%196 = getelementptr %struct.sortedSymbol_t, ptr %118, i64 %195
%196 = getelementptr i8, ptr %118, i64 %195
%197 = sub i32 %48, %188
%198 = and i32 %197, 31
%199 = shl nuw i32 1, %198
Expand Down Expand Up @@ -2794,9 +2794,9 @@ HUF_fillDTableX2ForWeight.exit: ; preds = %253, %241, %231, %2
%293 = zext i32 %292 to i64
%294 = getelementptr %struct.HUF_DEltX2, ptr %14, i64 %293
%295 = sext i32 %123 to i64
%296 = getelementptr %struct.sortedSymbol_t, ptr %118, i64 %295
%296 = getelementptr i8, ptr %118, i64 %295
%297 = sext i32 %126 to i64
%298 = getelementptr %struct.sortedSymbol_t, ptr %118, i64 %297
%298 = getelementptr i8, ptr %118, i64 %297
%299 = and i32 %129, 31
%300 = shl nuw i32 1, %299
%301 = icmp eq i32 %123, %126
Expand Down
10 changes: 6 additions & 4 deletions bench/pbrt-v4/optimized/aggregates.cpp.ll
Original file line number Diff line number Diff line change
Expand Up @@ -6165,7 +6165,10 @@ for.body153: ; preds = %for.end148, %for.bo
for.end163: ; preds = %for.body153
%conv164 = sext i32 %start to i64
%57 = load ptr, ptr %treeletRoots, align 8
%add.ptr.i328 = getelementptr inbounds ptr, ptr %57, i64 %conv164
%add.ptr.i328.idx = shl nsw i64 %conv164, 3
%add.ptr.i328 = getelementptr inbounds i8, ptr %57, i64 %add.ptr.i328.idx
%58 = sext i32 %end to i64
%.idx = shl nsw i64 %58, 3
call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %agg.tmp1.i)
store i32 %retval.0.i, ptr %agg.tmp1.i, align 8
%agg.tmp169330.sroa.4.0.agg.tmp1.i.sroa_idx = getelementptr inbounds nuw i8, ptr %agg.tmp1.i, i64 4
Expand All @@ -6178,12 +6181,11 @@ for.end163: ; preds = %for.body153
store float %.sroa.speculated.i10.i108, ptr %agg.tmp169330.sroa.7.0.agg.tmp1.i.sroa_idx, align 8
%agg.tmp169330.sroa.8.0.agg.tmp1.i.sroa_idx = getelementptr inbounds nuw i8, ptr %agg.tmp1.i, i64 28
store i32 %minCostSplitBucket.1, ptr %agg.tmp169330.sroa.8.0.agg.tmp1.i.sroa_idx, align 4
%cmp1720.i.i = icmp eq i32 %start, %end
%cmp1720.i.i = icmp eq i64 %add.ptr.i328.idx, %.idx
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be folded into icmp eq i32 %start, %end. It is weird that it doesn't happen.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should further relax one-use constraint like llvm/llvm-project#76384

br i1 %cmp1720.i.i, label %"_ZSt9partitionIPPN4pbrt12BVHBuildNodeEZNKS0_12BVHAggregate13buildUpperSAHEN4pstd3pmr21polymorphic_allocatorISt4byteEERSt6vectorIS2_SaIS2_EEiiPSt6atomicIiEE3$_0ET_SI_SI_T0_.exit", label %if.else.lr.ph.i.i.preheader

if.else.lr.ph.i.i.preheader: ; preds = %for.end163
%58 = sext i32 %end to i64
%59 = getelementptr ptr, ptr %57, i64 %58
%59 = getelementptr i8, ptr %57, i64 %.idx
br label %if.else.lr.ph.i.i

if.else.lr.ph.i.i: ; preds = %if.else.lr.ph.i.i.preheader, %while.end18.i.i
Expand Down
6 changes: 4 additions & 2 deletions bench/pbrt-v4/optimized/lightsamplers.cpp.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3345,13 +3345,15 @@ if.then113: ; preds = %for.end111

if.else: ; preds = %for.end111
%114 = load ptr, ptr %bvhLights, align 8
%add.ptr.i497 = getelementptr inbounds %"struct.std::pair", ptr %114, i64 %.pre-phi
%add.ptr.i497.idx = mul nsw i64 %.pre-phi, 56
%add.ptr.i497 = getelementptr inbounds i8, ptr %114, i64 %add.ptr.i497.idx
%cmp7376.i.i = icmp eq i32 %start, %end
br i1 %cmp7376.i.i, label %"_ZSt9partitionIPSt4pairIiN4pbrt11LightBoundsEEZNS1_15BVHLightSampler8buildBVHERSt6vectorIS3_SaIS3_EEiijiE3$_0ET_SB_SB_T0_.exit", label %if.else.lr.ph.i.preheader.i

if.else.lr.ph.i.preheader.i: ; preds = %if.else
%115 = sext i32 %end to i64
%116 = getelementptr %"struct.std::pair", ptr %114, i64 %115
%.idx = mul nsw i64 %115, 56
%116 = getelementptr i8, ptr %114, i64 %.idx
br label %if.else.lr.ph.i.i

if.else.lr.ph.i.i: ; preds = %while.end18.i.i, %if.else.lr.ph.i.preheader.i
Expand Down
16 changes: 10 additions & 6 deletions bench/postgres/optimized/subscriptioncmds.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4246,7 +4246,8 @@ define internal fastcc void @check_duplicates_in_publist(ptr noundef readonly %0

.lr.ph.us.us59: ; preds = %.thread33.us.us58, %.lr.ph56.split.us
%indvars.iv81 = phi i64 [ %indvars.iv.next82, %.thread33.us.us58 ], [ 0, %.lr.ph56.split.us ]
%8 = getelementptr %union.ListCell, ptr %7, i64 %indvars.iv81
%.idx88 = shl i64 %indvars.iv81, 3
%8 = getelementptr i8, ptr %7, i64 %.idx88
%9 = load ptr, ptr %8, align 8
%10 = getelementptr inbounds nuw i8, ptr %9, i64 8
%11 = load ptr, ptr %10, align 8
Expand All @@ -4259,11 +4260,12 @@ define internal fastcc void @check_duplicates_in_publist(ptr noundef readonly %0

13: ; preds = %.lr.ph.us.us59, %12
%indvars.iv76 = phi i64 [ 0, %.lr.ph.us.us59 ], [ %indvars.iv.next77, %12 ]
%14 = icmp eq i64 %indvars.iv76, %indvars.iv81
%.idx87 = shl i64 %indvars.iv76, 3
%14 = icmp eq i64 %.idx87, %.idx88
br i1 %14, label %.thread33.us.us58, label %15

15: ; preds = %13
%16 = getelementptr %union.ListCell, ptr %7, i64 %indvars.iv76
%16 = getelementptr i8, ptr %7, i64 %.idx87
%17 = load ptr, ptr %16, align 8
%18 = getelementptr inbounds nuw i8, ptr %17, i64 8
%19 = load ptr, ptr %18, align 8
Expand All @@ -4283,7 +4285,8 @@ define internal fastcc void @check_duplicates_in_publist(ptr noundef readonly %0
%22 = phi i32 [ %45, %.thread33 ], [ %5, %.lr.ph40.split.split ]
%indvars.iv71 = phi i64 [ %indvars.iv.next72, %.thread33 ], [ 0, %.lr.ph40.split.split ]
%23 = load ptr, ptr %4, align 8
%24 = getelementptr %union.ListCell, ptr %23, i64 %indvars.iv71
%.idx86 = shl i64 %indvars.iv71, 3
%24 = getelementptr i8, ptr %23, i64 %.idx86
%25 = load ptr, ptr %24, align 8
%26 = getelementptr inbounds nuw i8, ptr %25, i64 8
%27 = load ptr, ptr %26, align 8
Expand All @@ -4301,11 +4304,12 @@ define internal fastcc void @check_duplicates_in_publist(ptr noundef readonly %0

30: ; preds = %.lr.ph, %29
%indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %29 ]
%31 = icmp eq i64 %indvars.iv, %indvars.iv71
%.idx = shl i64 %indvars.iv, 3
%31 = icmp eq i64 %.idx, %.idx86
br i1 %31, label %.thread33, label %32

32: ; preds = %30
%33 = getelementptr %union.ListCell, ptr %23, i64 %indvars.iv
%33 = getelementptr i8, ptr %23, i64 %.idx
%34 = load ptr, ptr %33, align 8
%35 = getelementptr inbounds nuw i8, ptr %34, i64 8
%36 = load ptr, ptr %35, align 8
Expand Down
Loading