diff --git a/bench/abc/optimized/cbaNtk.ll b/bench/abc/optimized/cbaNtk.ll index 74d90616d9a..b0f04c5f3da 100644 --- a/bench/abc/optimized/cbaNtk.ll +++ b/bench/abc/optimized/cbaNtk.ll @@ -3797,23 +3797,27 @@ Vec_IntPush.exit: ; preds = %.Vec_IntGrow.exit10 %111 = zext nneg i32 %.val40 to i64 br label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %.lr.ph.i.i.preheader, %115 - %indvars.iv.i.i = phi i64 [ %indvars.iv.next.i.i, %115 ], [ 0, %.lr.ph.i.i.preheader ] +.lr.ph.i.i: ; preds = %.lr.ph.i.i.preheader, %118 + %indvars.iv.i.i = phi i64 [ %indvars.iv.next.i.i, %118 ], [ 0, %.lr.ph.i.i.preheader ] %112 = getelementptr inbounds nuw ptr, ptr %.pre.pre.pre.pre, i64 %indvars.iv.i.i %113 = load ptr, ptr %112, align 8, !tbaa !9 - %switch.i.i = icmp ult ptr %113, inttoptr (i64 3 to ptr) - br i1 %switch.i.i, label %115, label %114 - -114: ; preds = %.lr.ph.i.i - tail call void @free(ptr noundef %113) #25 - br label %115 - -115: ; preds = %114, %.lr.ph.i.i + %switch.i.i = icmp ne ptr %113, inttoptr (i64 1 to ptr) + %115 = icmp ne ptr %113, inttoptr (i64 2 to ptr) + %or.cond.i.i = and i1 %114, %115 + %116 = icmp ne ptr %113, null + %or.cond3.i.i = and i1 %116, %or.cond.i.i + br i1 %or.cond3.i.i, label %115, label %118 + +115: ; preds = %.lr.ph.i.i + tail call void @free(ptr noundef nonnull %113) #25 + br label %118 + +118: ; preds = %117, %.lr.ph.i.i %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 %exitcond.not = icmp eq i64 %indvars.iv.next.i.i, %111 br i1 %exitcond.not, label %Vec_PtrFreeFree.exit, label %.lr.ph.i.i, !llvm.loop !77 -Vec_PtrFreeFree.exit: ; preds = %115, %.critedge2 +Vec_PtrFreeFree.exit: ; preds = %118, %.critedge2 tail call void @free(ptr noundef nonnull %.pre.pre.pre.pre) #25 tail call void @free(ptr noundef nonnull %7) #25 br label %116 diff --git a/bench/abc/optimized/fraMan.ll b/bench/abc/optimized/fraMan.ll index a703e82f0ee..a363cfb5a7c 100644 --- a/bench/abc/optimized/fraMan.ll +++ b/bench/abc/optimized/fraMan.ll @@ -197,8 +197,10 @@ define void @Fra_ManClean(ptr noundef captures(none) %0, i32 noundef %1) local_u %9 = load ptr, ptr %6, align 8, !tbaa !61 %10 = getelementptr inbounds nuw ptr, ptr %9, i64 %indvars.iv %11 = load ptr, ptr %10, align 8, !tbaa !62 - %switch = icmp ult ptr %11, inttoptr (i64 2 to ptr) - br i1 %switch, label %16, label %12 + %switch = icmp eq ptr %11, null + %.not34 = icmp eq ptr %11, inttoptr (i64 1 to ptr) + %or.cond = or i1 %.not33, %.not34 + br i1 %or.cond, label %16, label %12 12: ; preds = %7 %13 = getelementptr inbounds nuw i8, ptr %11, i64 8 diff --git a/bench/abc/optimized/fxuSingle.ll b/bench/abc/optimized/fxuSingle.ll index 974323da8f4..e3e3c79cd81 100644 --- a/bench/abc/optimized/fxuSingle.ll +++ b/bench/abc/optimized/fxuSingle.ll @@ -76,8 +76,10 @@ define void @Fxu_MatrixComputeSingles(ptr noundef initializes((120, 124)) %0, i3 ._crit_edge63.i: ; preds = %._crit_edge.i %.pre.i = load ptr, ptr %11, align 8, !tbaa !30 - %switch.i = icmp ult ptr %.pre.i, inttoptr (i64 2 to ptr) - br i1 %switch.i, label %Fxu_MatrixComputeSinglesOneCollect.exit, label %.lr.ph66.i + %switch.i = icmp eq ptr %.pre.i, null + %.not3764.i = icmp eq ptr %.pre.i, inttoptr (i64 1 to ptr) + %or.cond.i = or i1 %.not36.i, %.not3764.i + br i1 %or.cond.i, label %Fxu_MatrixComputeSinglesOneCollect.exit, label %.lr.ph66.i .lr.ph66.i: ; preds = %._crit_edge63.i, %155 %28 = phi i32 [ %156, %155 ], [ %14, %._crit_edge63.i ] @@ -591,8 +593,10 @@ define void @Fxu_MatrixComputeSinglesOne(ptr noundef %0, ptr noundef %1) local_u ._crit_edge47: ; preds = %._crit_edge %.pre = load ptr, ptr %3, align 8, !tbaa !30 - %switch = icmp ult ptr %.pre, inttoptr (i64 2 to ptr) - br i1 %switch, label %.loopexit, label %.lr.ph50 + %switch = icmp eq ptr %.pre, null + %.not3548 = icmp eq ptr %.pre, inttoptr (i64 1 to ptr) + %or.cond = or i1 %.not34, %.not3548 + br i1 %or.cond, label %.loopexit, label %.lr.ph50 .lr.ph50: ; preds = %._crit_edge47 %17 = getelementptr inbounds nuw i8, ptr %0, i64 120 diff --git a/bench/abc/optimized/fxuUpdate.ll b/bench/abc/optimized/fxuUpdate.ll index 77b8fa21b92..dbc4bfa1ee1 100644 --- a/bench/abc/optimized/fxuUpdate.ll +++ b/bench/abc/optimized/fxuUpdate.ll @@ -61,8 +61,10 @@ define void @Fxu_Update(ptr noundef %0, ptr noundef readonly captures(address_is tail call void @Fxu_MatrixAddLiteral(ptr noundef %0, ptr noundef %20, ptr noundef %11) #7 tail call void @Fxu_MatrixAddLiteral(ptr noundef %0, ptr noundef %20, ptr noundef %13) #7 %31 = load ptr, ptr %23, align 8, !tbaa !35 - %switch = icmp ult ptr %31, inttoptr (i64 2 to ptr) - br i1 %switch, label %.loopexit, label %.lr.ph + %switch = icmp eq ptr %31, null + %.not6067 = icmp eq ptr %31, inttoptr (i64 1 to ptr) + %or.cond = or i1 %.not, %.not6067 + br i1 %or.cond, label %.loopexit, label %.lr.ph .lr.ph: ; preds = %9, %Fxu_UpdateAddNewDoubles.exit %.068 = phi ptr [ %60, %Fxu_UpdateAddNewDoubles.exit ], [ %31, %9 ] @@ -256,8 +258,10 @@ Fxu_UpdateMatrixDoubleCreateCubes.exit: ; preds = %50 store ptr null, ptr %58, align 8, !tbaa !63 tail call fastcc void @Fxu_UpdateDoublePairs(ptr noundef %0, ptr noundef %4, ptr noundef %7) %60 = load ptr, ptr %56, align 8, !tbaa !35 - %switch = icmp ult ptr %60, inttoptr (i64 2 to ptr) - br i1 %switch, label %.loopexit, label %.lr.ph + %switch = icmp eq ptr %60, null + %.not4048 = icmp eq ptr %60, inttoptr (i64 1 to ptr) + %or.cond = or i1 %.not, %.not4048 + br i1 %or.cond, label %.loopexit, label %.lr.ph .lr.ph: ; preds = %Fxu_UpdateMatrixDoubleCreateCubes.exit, %Fxu_UpdateAddNewDoubles.exit %.049 = phi ptr [ %89, %Fxu_UpdateAddNewDoubles.exit ], [ %60, %Fxu_UpdateMatrixDoubleCreateCubes.exit ] @@ -377,8 +381,10 @@ define void @Fxu_UpdateSingle(ptr noundef %0) local_unnamed_addr #0 { tail call void @Fxu_MatrixAddLiteral(ptr noundef %0, ptr noundef %13, ptr noundef %6) #7 tail call void @Fxu_MatrixAddLiteral(ptr noundef %0, ptr noundef %13, ptr noundef %8) #7 %24 = load ptr, ptr %16, align 8, !tbaa !35 - %switch = icmp ult ptr %24, inttoptr (i64 2 to ptr) - br i1 %switch, label %.loopexit, label %.lr.ph + %switch = icmp eq ptr %24, null + %.not4652 = icmp eq ptr %24, inttoptr (i64 1 to ptr) + %or.cond = or i1 %.not, %.not4652 + br i1 %or.cond, label %.loopexit, label %.lr.ph .lr.ph: ; preds = %1, %Fxu_UpdateAddNewDoubles.exit %.053 = phi ptr [ %53, %Fxu_UpdateAddNewDoubles.exit ], [ %24, %1 ] diff --git a/bench/abc/optimized/giaMini.ll b/bench/abc/optimized/giaMini.ll index a749d7c8132..c91f1d0bca7 100644 --- a/bench/abc/optimized/giaMini.ll +++ b/bench/abc/optimized/giaMini.ll @@ -1579,17 +1579,21 @@ Vec_PtrPush.exit81: ; preds = %.Vec_PtrGrow.exit11 br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %.critedge, %246 - %indvars.iv.i.i = phi i64 [ %indvars.iv.next.i.i, %246 ], [ 0, %.critedge ] + %indvars.iv.i.i = phi i64 [ %indvars.iv.next.i.i, %249 ], [ 0, %.critedge ] %243 = getelementptr inbounds nuw ptr, ptr %.pre, i64 %indvars.iv.i.i %244 = load ptr, ptr %243, align 8, !tbaa !67 - %switch.i.i = icmp ult ptr %244, inttoptr (i64 3 to ptr) - br i1 %switch.i.i, label %246, label %245 - -245: ; preds = %.lr.ph.i.i - call void @free(ptr noundef %244) #25 - br label %246 + %switch.i.i = icmp ne ptr %244, inttoptr (i64 1 to ptr) + %246 = icmp ne ptr %244, inttoptr (i64 2 to ptr) + %or.cond.i.i = and i1 %245, %246 + %247 = icmp ne ptr %244, null + %or.cond3.i.i = and i1 %247, %or.cond.i.i + br i1 %or.cond3.i.i, label %248, label %246 + +248: ; preds = %.lr.ph.i.i + call void @free(ptr noundef nonnull %244) #25 + br label %249 -246: ; preds = %245, %.lr.ph.i.i +246: ; preds = %248, %.lr.ph.i.i %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 %exitcond87.not = icmp eq i64 %indvars.iv.next.i.i, %242 br i1 %exitcond87.not, label %Vec_PtrFreeData.exit.i.thread, label %.lr.ph.i.i, !llvm.loop !70 @@ -1600,7 +1604,7 @@ Vec_PtrFreeData.exit.i: ; preds = %Vec_PtrAlloc.exit49 br i1 %.not.i.i, label %Vec_PtrFreeFree.exit, label %Vec_PtrFreeData.exit.i.thread Vec_PtrFreeData.exit.i.thread: ; preds = %246, %Vec_PtrFreeData.exit.i - %.pre110113 = phi ptr [ %.pre109, %Vec_PtrFreeData.exit.i ], [ %.pre, %246 ] + %.pre110113 = phi ptr [ %.pre109, %Vec_PtrFreeData.exit.i ], [ %.pre, %249 ] call void @free(ptr noundef nonnull %.pre110113) #25 br label %Vec_PtrFreeFree.exit diff --git a/bench/abc/optimized/pdrIncr.ll b/bench/abc/optimized/pdrIncr.ll index d0ab47ed7e0..7be4a1e0107 100644 --- a/bench/abc/optimized/pdrIncr.ll +++ b/bench/abc/optimized/pdrIncr.ll @@ -5040,21 +5040,25 @@ Abc_Clock.exit31: ; preds = %26, %29 br label %51 51: ; preds = %55, %.lr.ph.i.i - %.val18.i.i = phi i32 [ %.val15.i.i, %.lr.ph.i.i ], [ %.val.i.i, %55 ] - %indvars.iv.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %indvars.iv.next.i.i, %55 ] + %.val18.i.i = phi i32 [ %.val15.i.i, %.lr.ph.i.i ], [ %.val.i.i, %58 ] + %indvars.iv.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %indvars.iv.next.i.i, %58 ] %.val14.i.i = load ptr, ptr %50, align 8, !tbaa !28 %52 = getelementptr inbounds nuw ptr, ptr %.val14.i.i, i64 %indvars.iv.i.i %53 = load ptr, ptr %52, align 8, !tbaa !26 - %switch.i.i = icmp ult ptr %53, inttoptr (i64 3 to ptr) - br i1 %switch.i.i, label %55, label %54 - -54: ; preds = %51 - call void @free(ptr noundef %53) #17 + %switch.i.i = icmp ne ptr %53, inttoptr (i64 1 to ptr) + %55 = icmp ne ptr %53, inttoptr (i64 2 to ptr) + %or.cond.i.i = and i1 %54, %55 + %56 = icmp ne ptr %53, null + %or.cond3.i.i = and i1 %56, %or.cond.i.i + br i1 %or.cond3.i.i, label %57, label %58 + +57: ; preds = %51 + call void @free(ptr noundef nonnull %53) #17 %.val.pre.i.i = load i32, ptr %48, align 4, !tbaa !27 br label %55 -55: ; preds = %54, %51 - %.val.i.i = phi i32 [ %.val18.i.i, %51 ], [ %.val.pre.i.i, %54 ] +55: ; preds = %57, %51 + %.val.i.i = phi i32 [ %.val18.i.i, %51 ], [ %.val.pre.i.i, %57 ] %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 %56 = sext i32 %.val.i.i to i64 %57 = icmp slt i64 %indvars.iv.next.i.i, %56 diff --git a/bench/actix-rs/optimized/3sxbtmgc7txd1oqx.ll b/bench/actix-rs/optimized/3sxbtmgc7txd1oqx.ll index 14a4896911e..70a4a4bd2a4 100644 --- a/bench/actix-rs/optimized/3sxbtmgc7txd1oqx.ll +++ b/bench/actix-rs/optimized/3sxbtmgc7txd1oqx.ll @@ -8162,11 +8162,10 @@ define hidden void @"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..driver..Hand %7 = getelementptr inbounds nuw i8, ptr %0, i64 72 tail call void @llvm.experimental.noalias.scope.decl(metadata !2581) %8 = load ptr, ptr %7, align 8, !alias.scope !2581, !noundef !4 - %magicptr.i = ptrtoint ptr %8 to i64 - switch i64 %magicptr.i, label %9 [ - i64 0, label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285.exit" - i64 -1, label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285.exit" - ] + %9 = icmp eq ptr %8, null + %10 = icmp eq ptr %8, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %9, %10 + br i1 %or.cond.i, label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285.exit", label %9 9: ; preds = %6 %10 = getelementptr inbounds nuw i8, ptr %8, i64 8 @@ -8179,7 +8178,7 @@ define hidden void @"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..driver..Hand tail call void @__rust_dealloc(ptr noundef nonnull %8, i64 noundef 16, i64 noundef 8) #24, !noalias !2584 br label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285.exit" -"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285.exit": ; preds = %13, %9, %6, %6 +"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285.exit": ; preds = %13, %9, %6 tail call void @llvm.experimental.noalias.scope.decl(metadata !2591) %14 = getelementptr inbounds nuw i8, ptr %0, i64 160 %15 = load i32, ptr %14, align 8, !range !2594, !alias.scope !2591, !noundef !4 @@ -14370,13 +14369,12 @@ define hidden void @"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$acti ; Function Attrs: nounwind nonlazybind uwtable define hidden void @"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17hf98eaca973097e4aE.llvm.8740116509709696285"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #1 { %2 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr = ptrtoint ptr %2 to i64 - switch i64 %magicptr, label %3 [ - i64 0, label %"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17hbe461234a30b905bE.llvm.8740116509709696285.exit" - i64 -1, label %"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17hbe461234a30b905bE.llvm.8740116509709696285.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %3, %4 + br i1 %or.cond, label %"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17hbe461234a30b905bE.llvm.8740116509709696285.exit", label %5 -"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17hbe461234a30b905bE.llvm.8740116509709696285.exit": ; preds = %1, %1, %7, %3 +"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17hbe461234a30b905bE.llvm.8740116509709696285.exit": ; preds = %9, %5, %1 ret void 3: ; preds = %1 diff --git a/bench/assimp/optimized/ASEParser.ll b/bench/assimp/optimized/ASEParser.ll index 134f32d3509..dd92fceebba 100644 --- a/bench/assimp/optimized/ASEParser.ll +++ b/bench/assimp/optimized/ASEParser.ll @@ -19481,7 +19481,7 @@ _ZNSt12_Vector_baseIN6Assimp3ASE8MaterialESaIS2_EE13_M_deallocateEPS2_m.exit: ; %245 = landingpad { ptr, i32 } cleanup invoke void @__cxa_end_catch() - to label %249 unwind label %250 + to label %248 unwind label %250 246: ; preds = %.body96 %247 = mul nuw nsw i64 %165, 736 @@ -19490,7 +19490,7 @@ _ZNSt12_Vector_baseIN6Assimp3ASE8MaterialESaIS2_EE13_M_deallocateEPS2_m.exit: ; _ZNSt12_Vector_baseIN6Assimp3ASE8MaterialESaIS2_EE13_M_deallocateEPS2_m.exit128: ; preds = %.lr.ph.i.i.i118, %246 invoke void @__cxa_rethrow() #31 - to label %253 unwind label %244 + to label %252 unwind label %244 248: ; preds = %_ZSt4fillIPN6Assimp3ASE8MaterialES2_EvT_S4_RKT0_.exit, %_ZNSt12_Vector_baseIN6Assimp3ASE8MaterialESaIS2_EE13_M_deallocateEPS2_m.exit, %4 ret void diff --git a/bench/boost/optimized/async.ll b/bench/boost/optimized/async.ll index baeae288fa8..f4b30d80a55 100644 --- a/bench/boost/optimized/async.ll +++ b/bench/boost/optimized/async.ll @@ -183912,8 +183912,8 @@ _ZN5boost6system10error_codeaSINS_4asio5error12basic_errorsEEERNSt9enable_ifIXsr br label %.loopexit .loopexit: ; preds = %.loopexit.loopexit, %18, %.critedge - %.070111 = phi ptr [ %.070114.lcssa, %.critedge ], [ %20, %18 ], [ %27, %.loopexit.loopexit ] - %.071109 = phi ptr [ %.071115.lcssa, %.critedge ], [ null, %18 ], [ null, %.loopexit.loopexit ] + %.070111 = phi ptr [ %.070114.lcssa, %.critedge ], [ %20, %18 ], [ %27, %.critedge.thread.loopexit ] + %.071109 = phi ptr [ %.071115.lcssa, %.critedge ], [ null, %18 ], [ null, %.critedge.thread.loopexit ] %28 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #64 to label %29 unwind label %_ZN5boost4asio6detail11scoped_lockINS1_18posix_static_mutexEED2Ev.exit diff --git a/bench/boost/optimized/bind_stdin_stdout.ll b/bench/boost/optimized/bind_stdin_stdout.ll index 13aa391eec0..d44ae7aaf0d 100644 --- a/bench/boost/optimized/bind_stdin_stdout.ll +++ b/bench/boost/optimized/bind_stdin_stdout.ll @@ -149595,18 +149595,19 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN5boost7process2v16detail5posix to label %39 unwind label %68 39: ; preds = %35 - %.fr = freeze i32 %34 - %40 = icmp ne i32 %.fr, 17 + %40 = icmp eq i32 %34, 17 %41 = load ptr, ptr %7, align 8 - %switch = icmp ult ptr %41, inttoptr (i64 2 to ptr) - %or.cond = select i1 %40, i1 true, i1 %switch - br i1 %or.cond, label %43, label %42 + %switch = icmp ne ptr %41, null + %43 = icmp ne ptr %41, inttoptr (i64 1 to ptr) + %44 = and i1 %switch, %43 + %or.cond5 = select i1 %40, i1 %44, i1 false + br i1 %or.cond5, label %45, label %46 42: ; preds = %39 invoke void %41(i32 noundef %38) - to label %43 unwind label %68 + to label %46 unwind label %68 -43: ; preds = %39, %42 +43: ; preds = %45, %39 %44 = icmp eq i32 %38, 0 br i1 %44, label %45, label %47 @@ -149660,7 +149661,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN5boost7process2v16detail5posix br label %.loopexit .loopexit: ; preds = %45, %62, %.critedge7, %26 - %.1 = phi i1 [ false, %26 ], [ true, %.critedge7 ], [ true, %62 ], [ false, %45 ] + %.1 = phi i1 [ false, %26 ], [ true, %.critedge7 ], [ true, %65 ], [ false, %48 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %65 @@ -149690,14 +149691,16 @@ declare i32 @sigtimedwait(ptr noundef, ptr noundef, ptr noundef) local_unnamed_a define linkonce_odr hidden void @_ZZN5boost7process2v16detail5posix10wait_untilINSt6chrono3_V212steady_clockENS5_8durationIlSt5ratioILl1ELl1000000000EEEEEEbRKNS3_12child_handleERiRKNS5_10time_pointIT_T0_EERSt10error_codeEN20signal_interceptor_t12handler_funcEi(i32 noundef %0) #3 comdat align 2 { %2 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZZN5boost7process2v16detail5posix10wait_untilINSt6chrono3_V212steady_clockENS5_8durationIlSt5ratioILl1ELl1000000000EEEEEEbRKNS3_12child_handleERiRKNS5_10time_pointIT_T0_EERSt10error_codeE15sigchld_handler) %3 = load ptr, ptr %2, align 8, !tbaa !174 - %switch = icmp ult ptr %3, inttoptr (i64 2 to ptr) - br i1 %switch, label %5, label %4 + %switch = icmp ne ptr %3, null + %5 = icmp ne ptr %3, inttoptr (i64 1 to ptr) + %or.cond = and i1 %4, %5 + br i1 %or.cond, label %6, label %7 4: ; preds = %1 tail call void %3(i32 noundef %0) br label %5 -5: ; preds = %1, %4 +5: ; preds = %6, %1 ret void } diff --git a/bench/box2d/optimized/TaskScheduler.ll b/bench/box2d/optimized/TaskScheduler.ll index a4a2d7af92c..d0c211a8bce 100644 --- a/bench/box2d/optimized/TaskScheduler.ll +++ b/bench/box2d/optimized/TaskScheduler.ll @@ -2775,7 +2775,7 @@ _ZN12_GLOBAL__N_112SafeCallbackEPFvjEj.exit: ; preds = %18, %21 br i1 %.not2940, label %.lr.ph43.split.us, label %.lr.ph43.split .lr.ph43.split.us: ; preds = %.lr.ph43, %_ZN12_GLOBAL__N_18SpinWaitEj.exit.us - %.02642.us = phi i32 [ %.2.us, %_ZN12_GLOBAL__N_18SpinWaitEj.exit.us ], [ 0, %.lr.ph43 ] + %.02642.us = phi i32 [ %.2.us, %_ZN12_GLOBAL__N_18SpinWaitEj.exit.us ], [ 0, %.lr.ph44 ] %27 = load atomic i8, ptr %26 acquire, align 8 %28 = trunc i8 %27 to i1 br i1 %28, label %29, label %.critedge @@ -2811,7 +2811,7 @@ _ZN12_GLOBAL__N_18SpinWaitEj.exit.us: ; preds = %.lr.ph.i.us, %40, % br i1 %42, label %.critedge, label %.lr.ph43.split.us, !llvm.loop !128 .lr.ph43.split: ; preds = %.lr.ph43, %_ZN12_GLOBAL__N_18SpinWaitEj.exit - %.02642 = phi i32 [ %.2, %_ZN12_GLOBAL__N_18SpinWaitEj.exit ], [ 0, %.lr.ph43 ] + %.02642 = phi i32 [ %.2, %_ZN12_GLOBAL__N_18SpinWaitEj.exit ], [ 0, %.lr.ph44 ] %43 = load atomic i8, ptr %26 acquire, align 8 %44 = trunc i8 %43 to i1 br i1 %44, label %.lr.ph, label %.critedge @@ -2871,7 +2871,7 @@ _ZN12_GLOBAL__N_18SpinWaitEj.exit: ; preds = %.lr.ph.i, %.thread, br label %_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj.exit32 .lr.ph47: ; preds = %.preheader, %.lr.ph47 - %.046 = phi i32 [ %66, %.lr.ph47 ], [ 0, %.preheader ] + %.046 = phi i32 [ %66, %.lr.ph48 ], [ 0, %.preheader ] %65 = call noundef zeroext i1 @_ZN4enki13TaskScheduler10TryRunTaskEjjRj(ptr noundef nonnull align 8 dereferenceable(220) %0, i32 noundef %6, i32 noundef %.046, ptr noundef nonnull align 4 dereferenceable(4) %4) %66 = add nuw i32 %.046, 1 %exitcond50.not = icmp eq i32 %.046, %2 diff --git a/bench/casadi/optimized/feasiblesqpmethod.ll b/bench/casadi/optimized/feasiblesqpmethod.ll index f2e50628835..a8591e6ff9e 100644 --- a/bench/casadi/optimized/feasiblesqpmethod.ll +++ b/bench/casadi/optimized/feasiblesqpmethod.ll @@ -20444,8 +20444,9 @@ _ZN6casadi11casadi_copyIdEEvPKT_xPS1_.exit336: ; preds = %.lr.ph.i329, %.lr.p br i1 %exitcond.not.i343, label %_ZN6casadi11casadi_axpyIdEEvxT_PKS1_PS1_.exit344, label %.lr.ph.i339, !llvm.loop !324 _ZN6casadi11casadi_axpyIdEEvxT_PKS1_PS1_.exit344: ; preds = %.lr.ph.i339, %_ZN6casadi11casadi_copyIdEEvPKT_xPS1_.exit336 + %.not15.i346 = icmp eq ptr %346, null %364 = icmp sgt i64 %318, 0 - br i1 %.not15.i327, label %.preheader.i353, label %.preheader16.i347 + br i1 %.not15.i346, label %.preheader.i353, label %.preheader16.i347 .preheader16.i347: ; preds = %_ZN6casadi11casadi_axpyIdEEvxT_PKS1_PS1_.exit344 br i1 %364, label %.lr.ph.i348.preheader, label %_ZN6casadi11casadi_copyIdEEvPKT_xPS1_.exit355.thread diff --git a/bench/clamav/optimized/optparser.ll b/bench/clamav/optimized/optparser.ll index 7cd341dda44..d235843f158 100644 --- a/bench/clamav/optimized/optparser.ll +++ b/bench/clamav/optimized/optparser.ll @@ -831,7 +831,7 @@ define void @optfree(ptr noundef captures(address_is_null) %0) local_unnamed_add tail call void @free(ptr noundef nonnull %.lcssa) #18 br label %.lr.ph43.preheader -.lr.ph43.preheader: ; preds = %2, %._crit_edge +.lr.ph43.preheader: ; preds = %._crit_edge, %2 br label %.lr.ph43 .lr.ph43: ; preds = %.lr.ph43.preheader, %._crit_edge39 diff --git a/bench/coreutils-rs/optimized/2oz1n2pr10bv8jmi.ll b/bench/coreutils-rs/optimized/2oz1n2pr10bv8jmi.ll index baaf51c8d98..bc4b30245fd 100644 --- a/bench/coreutils-rs/optimized/2oz1n2pr10bv8jmi.ll +++ b/bench/coreutils-rs/optimized/2oz1n2pr10bv8jmi.ll @@ -3951,7 +3951,7 @@ _ZN6chrono6format10formatting14write_hundreds17h11a4511f0181ba2eE.exit.i: ; pred %.not261 = icmp eq i8 %1197, 7 br i1 %.not261, label %._crit_edge, label %415 -"_ZN4core3ptr41drop_in_place$LT$chrono..format..Item$GT$17hfe2436226205e6c5E.exit132": ; preds = %415, %"_ZN6chrono6format10formatting22DelayedFormat$LT$I$GT$14format_numeric17h280603e5929ab703E.exit", %.noexc100, %.noexc99, %977, %_ZN5alloc6string6String4push17h1a3e9179dd826612E.llvm.16544676712327837833.exit89.i, %718, %964, %969, %970, %729, %419, %420, %421, %422, %423, %424, %425, %426, %427, %428, %429, %430, %431, %432, %433, %434, %435, %436, %437, %438, %.noexc117, %.noexc115, %.noexc116, %.noexc118, %905, %.noexc104, %.noexc107, %.noexc110, %.noexc111, %.noexc112, %.noexc113, %.noexc114, %.noexc164, %_ZN6chrono6format10formatting14write_hundreds17h11a4511f0181ba2eE.exit.i +"_ZN4core3ptr41drop_in_place$LT$chrono..format..Item$GT$17hfe2436226205e6c5E.exit132": ; preds = %415, %"_ZN6chrono6format10formatting22DelayedFormat$LT$I$GT$14format_numeric17h280603e5929ab703E.exit", %.noexc100, %.noexc99, %977, %_ZN5alloc6string6String4push17h1a3e9179dd826612E.llvm.16544676712327837833.exit89.i, %729, %718, %964, %969, %970, %419, %420, %421, %422, %423, %424, %425, %426, %427, %428, %429, %430, %431, %432, %433, %434, %435, %436, %437, %438, %.noexc117, %.noexc115, %.noexc116, %.noexc118, %905, %.noexc104, %.noexc107, %.noexc110, %.noexc111, %.noexc112, %.noexc113, %.noexc114, %.noexc164, %_ZN6chrono6format10formatting14write_hundreds17h11a4511f0181ba2eE.exit.i call void @llvm.lifetime.end.p0(ptr nonnull %67) br label %._crit_edge } diff --git a/bench/cpython/optimized/_cursesmodule.ll b/bench/cpython/optimized/_cursesmodule.ll index 573c9056949..87d81270404 100644 --- a/bench/cpython/optimized/_cursesmodule.ll +++ b/bench/cpython/optimized/_cursesmodule.ll @@ -6556,18 +6556,17 @@ _PyCursesStatefulCheckFunction.exit.thread.i: ; preds = %16 _PyCursesStatefulCheckFunction.exit.i: ; preds = %16 %20 = call ptr @tigetstr(ptr noundef nonnull %9) #9 - %magicptr.i = ptrtoint ptr %20 to i64 - switch i64 %magicptr.i, label %21 [ - i64 -1, label %_curses_tigetstr_impl.exit - i64 0, label %_curses_tigetstr_impl.exit - ] + %21 = icmp eq ptr %20, null + %22 = icmp eq ptr %20, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %21, %22 + br i1 %or.cond.i, label %_curses_tigetstr_impl.exit, label %23 21: ; preds = %_PyCursesStatefulCheckFunction.exit.i - %22 = call ptr @PyBytes_FromString(ptr noundef %20) #9 + %22 = call ptr @PyBytes_FromString(ptr noundef nonnull %20) #9 br label %_curses_tigetstr_impl.exit -_curses_tigetstr_impl.exit: ; preds = %21, %_PyCursesStatefulCheckFunction.exit.i, %_PyCursesStatefulCheckFunction.exit.i, %_PyCursesStatefulCheckFunction.exit.thread.i, %8, %14, %7 - %.0 = phi ptr [ null, %8 ], [ null, %14 ], [ null, %7 ], [ %22, %21 ], [ @_Py_NoneStruct, %_PyCursesStatefulCheckFunction.exit.i ], [ @_Py_NoneStruct, %_PyCursesStatefulCheckFunction.exit.i ], [ null, %_PyCursesStatefulCheckFunction.exit.thread.i ] +_curses_tigetstr_impl.exit: ; preds = %21, %_PyCursesStatefulCheckFunction.exit.i, %_PyCursesStatefulCheckFunction.exit.thread.i, %8, %14, %7 + %.0 = phi ptr [ null, %8 ], [ null, %14 ], [ null, %7 ], [ %22, %23 ], [ @_Py_NoneStruct, %_PyCursesStatefulCheckFunction.exit.i ], [ null, %_PyCursesStatefulCheckFunction.exit.thread.i ] ret ptr %.0 } diff --git a/bench/cpython/optimized/_posixsubprocess.ll b/bench/cpython/optimized/_posixsubprocess.ll index 42957caeb73..86d71047140 100644 --- a/bench/cpython/optimized/_posixsubprocess.ll +++ b/bench/cpython/optimized/_posixsubprocess.ll @@ -1612,7 +1612,7 @@ define internal fastcc void @reset_signal_handlers(ptr noundef nonnull %0) unnam ret void 5: ; preds = %1, %16 - %.012 = phi i32 [ 1, %1 ], [ %17, %16 ] + %.012 = phi i32 [ 1, %1 ], [ %17, %19 ] switch i32 %.012, label %6 [ i32 19, label %16 i32 9, label %16 @@ -1627,20 +1627,24 @@ define internal fastcc void @reset_signal_handlers(ptr noundef nonnull %0) unnam call void @llvm.lifetime.start.p0(ptr nonnull %3) %10 = call i32 @sigaction(i32 noundef %.012, ptr noundef null, ptr noundef nonnull %3) #12 %11 = icmp eq i32 %10, -1 - %12 = load ptr, ptr %3, align 8 - %switch = icmp ult ptr %12, inttoptr (i64 2 to ptr) - %or.cond = select i1 %11, i1 true, i1 %switch - br i1 %or.cond, label %15, label %13 + br i1 %11, label %18, label %13 13: ; preds = %9 - %14 = call i32 @sigaction(i32 noundef %.012, ptr noundef nonnull %2, ptr noundef null) #12 - br label %15 + %13 = load ptr, ptr %3, align 8 + %14 = icmp eq ptr %13, inttoptr (i64 1 to ptr) + %15 = icmp eq ptr %13, null + %or.cond3 = or i1 %14, %15 + br i1 %or.cond3, label %18, label %16 -15: ; preds = %13, %9 +15: ; preds = %13 + %17 = call i32 @sigaction(i32 noundef %.012, ptr noundef nonnull %2, ptr noundef null) #12 + br label %18 + +18: ; preds = %16, %12, %9 call void @llvm.lifetime.end.p0(ptr nonnull %3) br label %16 -16: ; preds = %5, %5, %15, %6 +16: ; preds = %5, %5, %18, %6 %17 = add nuw nsw i32 %.012, 1 %exitcond.not = icmp eq i32 %17, 65 br i1 %exitcond.not, label %4, label %5, !llvm.loop !48 diff --git a/bench/cpython/optimized/obmalloc.ll b/bench/cpython/optimized/obmalloc.ll index b9fe21d8e07..8036aa931a9 100644 --- a/bench/cpython/optimized/obmalloc.ll +++ b/bench/cpython/optimized/obmalloc.ll @@ -7782,13 +7782,12 @@ mi_os_prim_free.exit.i: ; preds = %135, %133 unix_mmap_prim.exit116.i: ; preds = %147, %141 store i8 0, ptr %8, align 1, !tbaa !117 %148 = tail call ptr @mmap64(ptr noundef null, i64 noundef %139, i32 noundef range(i32 0, 4) %142, i32 noundef range(i32 34, 2013528099) %spec.select.i.i103.i, i32 noundef -1, i64 noundef 0) #54 - %magicptr12.i = ptrtoint ptr %148 to i64 - switch i64 %magicptr12.i, label %153 [ - i64 -1, label %_mi_prim_alloc.exit109.i - i64 0, label %_mi_prim_alloc.exit109.i - ] + %.not33.i114.i = icmp eq ptr %148, inttoptr (i64 -1 to ptr) + %.not.i10710.i = icmp eq ptr %148, null + %.not.i107.i = or i1 %.not33.i114.i, %.not.i10710.i + br i1 %.not.i107.i, label %_mi_prim_alloc.exit109.i, label %153 -_mi_prim_alloc.exit109.i: ; preds = %unix_mmap_prim.exit116.i, %unix_mmap_prim.exit116.i +_mi_prim_alloc.exit109.i: ; preds = %unix_mmap_prim.exit116.i %149 = tail call ptr @__errno_location() #64 %150 = load i32, ptr %149, align 4, !tbaa !96 %.not.i90.i = icmp eq i32 %150, 0 @@ -7830,7 +7829,7 @@ mi_atomic_maxi64_relaxed.exit.i.i.i93.i: ; preds = %159, %157 br label %_mi_stat_increase.exit.i94.i _mi_stat_increase.exit.i94.i: ; preds = %166, %164 - br i1 %2, label %169, label %mi_os_prim_alloc.exit97.i + br i1 %2, label %169, label %mi_align_up_ptr.exit99.i 169: ; preds = %_mi_stat_increase.exit.i94.i %170 = atomicrmw add ptr getelementptr inbounds nuw (i8, ptr @_mi_stats_main, i64 120), i64 %139 monotonic, align 8 @@ -7854,23 +7853,20 @@ mi_atomic_maxi64_relaxed.exit.i.i27.i.i: ; preds = %175, %173 179: ; preds = %mi_atomic_maxi64_relaxed.exit.i.i27.i.i %180 = atomicrmw add ptr getelementptr inbounds nuw (i8, ptr @_mi_stats_main, i64 96), i64 %139 monotonic, align 8 - br label %mi_os_prim_alloc.exit97.i + br label %mi_align_up_ptr.exit99.i 181: ; preds = %mi_atomic_maxi64_relaxed.exit.i.i27.i.i %182 = sub i64 0, %139 %183 = atomicrmw add ptr getelementptr inbounds nuw (i8, ptr @_mi_stats_main, i64 104), i64 %182 monotonic, align 8 - br label %mi_os_prim_alloc.exit97.i - -mi_os_prim_alloc.exit97.i: ; preds = %181, %179, %_mi_stat_increase.exit.i94.i - %184 = icmp eq ptr %148, null - br i1 %184, label %mi_os_prim_alloc_aligned.exit.thread, label %mi_align_up_ptr.exit99.i + br label %mi_align_up_ptr.exit99.i -mi_align_up_ptr.exit99.i: ; preds = %mi_os_prim_alloc.exit97.i - %185 = add i64 %98, %magicptr12.i +mi_align_up_ptr.exit99.i: ; preds = %181, %179, %_mi_stat_increase.exit.i94.i + %184 = ptrtoint ptr %148 to i64 + %185 = add i64 %98, %184 %186 = sub i64 0, %.0.i16 %187 = and i64 %185, %186 %188 = inttoptr i64 %187 to ptr - %189 = sub i64 %187, %magicptr12.i + %189 = sub i64 %187, %184 %190 = load i64, ptr @mi_os_mem_config.0, align 8, !tbaa !84 %191 = tail call range(i64 0, 65) i64 @llvm.ctpop.i64(i64 %190) %192 = icmp samesign ult i64 %191, 2 @@ -7932,8 +7928,8 @@ mi_os_prim_alloc_aligned.exit.thread30: ; preds = %96, %mi_os_prim_all store i64 %.0.i16, ptr %210, align 8, !tbaa !54 br label %mi_os_prim_alloc_aligned.exit.thread -mi_os_prim_alloc_aligned.exit.thread: ; preds = %_mi_align_up.exit.i, %mi_os_prim_alloc.exit.thread25, %_mi_prim_alloc.exit109.i, %151, %138, %mi_os_prim_alloc.exit97.i, %mi_os_prim_free.exit.i, %mi_os_prim_alloc.exit, %_mi_align_up.exit, %mi_os_prim_alloc_aligned.exit.thread30, %mi_os_prim_alloc_aligned.exit - %.0.i1829 = phi ptr [ %.02334, %mi_os_prim_alloc_aligned.exit.thread30 ], [ null, %mi_os_prim_alloc_aligned.exit ], [ null, %_mi_align_up.exit ], [ null, %mi_os_prim_alloc.exit ], [ null, %mi_os_prim_free.exit.i ], [ null, %mi_os_prim_alloc.exit97.i ], [ null, %138 ], [ null, %151 ], [ null, %_mi_prim_alloc.exit109.i ], [ null, %mi_os_prim_alloc.exit.thread25 ], [ null, %_mi_align_up.exit.i ] +mi_os_prim_alloc_aligned.exit.thread: ; preds = %_mi_align_up.exit.i, %mi_os_prim_alloc.exit.thread25, %_mi_prim_alloc.exit109.i, %151, %138, %mi_os_prim_free.exit.i, %mi_os_prim_alloc.exit, %_mi_align_up.exit, %mi_os_prim_alloc_aligned.exit.thread30, %mi_os_prim_alloc_aligned.exit + %.0.i1829 = phi ptr [ %.02334, %mi_os_prim_alloc_aligned.exit.thread30 ], [ null, %mi_os_prim_alloc_aligned.exit ], [ null, %_mi_align_up.exit ], [ null, %mi_os_prim_alloc.exit ], [ null, %mi_os_prim_free.exit.i ], [ null, %138 ], [ null, %151 ], [ null, %_mi_prim_alloc.exit109.i ], [ null, %mi_os_prim_alloc.exit.thread25 ], [ null, %_mi_align_up.exit.i ] call void @llvm.lifetime.end.p0(ptr nonnull %9) call void @llvm.lifetime.end.p0(ptr nonnull %8) br label %211 diff --git a/bench/cpython/optimized/readline.ll b/bench/cpython/optimized/readline.ll index 6a992056e25..010a398d7bb 100644 --- a/bench/cpython/optimized/readline.ll +++ b/bench/cpython/optimized/readline.ll @@ -2182,14 +2182,16 @@ declare ptr @PyOS_setsig(i32 noundef, ptr noundef) local_unnamed_addr #2 define internal void @readline_sigwinch_handler(i32 noundef %0) #0 { store volatile i32 1, ptr @sigwinch_received, align 4, !tbaa !17 %2 = load ptr, ptr @sigwinch_ohandler, align 8, !tbaa !19 - %switch = icmp ult ptr %2, inttoptr (i64 2 to ptr) - br i1 %switch, label %4, label %3 + %switch = icmp ne ptr %2, null + %4 = icmp ne ptr %2, inttoptr (i64 1 to ptr) + %or.cond = and i1 %3, %4 + br i1 %or.cond, label %5, label %6 3: ; preds = %1 tail call void %2(i32 noundef %0) #14 br label %4 -4: ; preds = %1, %3 +4: ; preds = %5, %1 ret void } diff --git a/bench/cpython/optimized/signalmodule.ll b/bench/cpython/optimized/signalmodule.ll index 47940bba0c3..e78f866685c 100644 --- a/bench/cpython/optimized/signalmodule.ll +++ b/bench/cpython/optimized/signalmodule.ll @@ -3977,54 +3977,44 @@ signal_add_constants.exit: ; preds = %137 %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %Py_XDECREF.exit.i ], [ 1, %162 ] %173 = trunc nuw nsw i64 %indvars.iv.i to i32 %174 = tail call ptr @PyOS_getsig(i32 noundef %173) #15 - %magicptr.i = ptrtoint ptr %174 to i64 - switch i64 %magicptr.i, label %179 [ - i64 0, label %175 - i64 1, label %177 - ] - -175: ; preds = %.preheader - %176 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 2208), align 8, !tbaa !177 - br label %179 - -177: ; preds = %.preheader - %178 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 2216), align 8, !tbaa !179 - br label %179 - -179: ; preds = %177, %175, %.preheader - %.020.i = phi ptr [ %176, %175 ], [ %178, %177 ], [ @_Py_NoneStruct, %.preheader ] - %180 = getelementptr %struct.anon.3, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 1152), i64 %indvars.iv.i - %181 = getelementptr inbounds nuw i8, ptr %180, i64 8 - %182 = load atomic i64, ptr %181 seq_cst, align 8 - %183 = inttoptr i64 %182 to ptr - %184 = load i32, ptr %.020.i, align 8, !tbaa !180 - %185 = icmp slt i32 %184, 0 - br i1 %185, label %_Py_NewRef.exit.i, label %186 - -186: ; preds = %179 - %187 = add nuw i32 %184, 1 - store i32 %187, ptr %.020.i, align 8, !tbaa !180 + %175 = icmp eq ptr %174, null + %176 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 2208), align 8 + %177 = icmp eq ptr %174, inttoptr (i64 1 to ptr) + %178 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 2216), align 8 + %spec.select.i = select i1 %177, ptr %178, ptr @_Py_NoneStruct + %.020.i = select i1 %175, ptr %176, ptr %spec.select.i + %179 = getelementptr %struct.anon.3, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 1152), i64 %indvars.iv.i + %180 = getelementptr inbounds nuw i8, ptr %179, i64 8 + %181 = load atomic i64, ptr %180 seq_cst, align 8 + %182 = inttoptr i64 %181 to ptr + %183 = load i32, ptr %.020.i, align 8, !tbaa !180 + %184 = icmp slt i32 %183, 0 + br i1 %184, label %_Py_NewRef.exit.i, label %179 + +179: ; preds = %.preheader + %186 = add nuw i32 %183, 1 + store i32 %186, ptr %.020.i, align 8, !tbaa !180 br label %_Py_NewRef.exit.i -_Py_NewRef.exit.i: ; preds = %186, %179 +_Py_NewRef.exit.i: ; preds = %185, %.preheader %188 = ptrtoint ptr %.020.i to i64 - store atomic i64 %188, ptr %181 seq_cst, align 8 - %.not.i24.i = icmp eq i64 %182, 0 + store atomic i64 %188, ptr %180 seq_cst, align 8 + %.not.i24.i = icmp eq i64 %181, 0 br i1 %.not.i24.i, label %Py_XDECREF.exit.i, label %189 189: ; preds = %_Py_NewRef.exit.i - %190 = load i32, ptr %183, align 8, !tbaa !180 + %190 = load i32, ptr %182, align 8, !tbaa !180 %.not.i.i.i = icmp sgt i32 %190, -1 br i1 %.not.i.i.i, label %191, label %Py_XDECREF.exit.i 191: ; preds = %189 %192 = add nsw i32 %190, -1 - store i32 %192, ptr %183, align 8, !tbaa !180 + store i32 %192, ptr %182, align 8, !tbaa !180 %193 = icmp eq i32 %192, 0 br i1 %193, label %194, label %Py_XDECREF.exit.i 194: ; preds = %191 - tail call void @_Py_Dealloc(ptr noundef nonnull %183) #15 + tail call void @_Py_Dealloc(ptr noundef nonnull %182) #15 br label %Py_XDECREF.exit.i Py_XDECREF.exit.i: ; preds = %194, %191, %189, %_Py_NewRef.exit.i @@ -4059,7 +4049,7 @@ Py_DECREF.exit.i: ; preds = %203, %200, %197 br label %signal_get_set_handlers.exit signal_get_set_handlers.exit: ; preds = %168, %Py_DECREF.exit.i, %137, %134, %131, %126, %121, %118, %115, %112, %109, %106, %103, %100, %97, %94, %91, %88, %85, %82, %79, %76, %73, %70, %67, %64, %61, %58, %55, %52, %49, %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %162, %195, %142, %147, %151, %155, %159, %signal_add_constants.exit, %1 - %.0 = phi i32 [ -1, %1 ], [ -1, %signal_add_constants.exit ], [ -1, %142 ], [ -1, %147 ], [ -1, %151 ], [ -1, %155 ], [ -1, %159 ], [ -1, %195 ], [ 0, %162 ], [ -1, %10 ], [ -1, %13 ], [ -1, %16 ], [ -1, %19 ], [ -1, %22 ], [ -1, %25 ], [ -1, %28 ], [ -1, %31 ], [ -1, %34 ], [ -1, %37 ], [ -1, %40 ], [ -1, %43 ], [ -1, %46 ], [ -1, %49 ], [ -1, %52 ], [ -1, %55 ], [ -1, %58 ], [ -1, %61 ], [ -1, %64 ], [ -1, %67 ], [ -1, %70 ], [ -1, %73 ], [ -1, %76 ], [ -1, %79 ], [ -1, %82 ], [ -1, %85 ], [ -1, %88 ], [ -1, %91 ], [ -1, %94 ], [ -1, %97 ], [ -1, %100 ], [ -1, %103 ], [ -1, %106 ], [ -1, %109 ], [ -1, %112 ], [ -1, %115 ], [ -1, %118 ], [ -1, %121 ], [ -1, %126 ], [ -1, %131 ], [ -1, %134 ], [ -1, %137 ], [ 0, %Py_DECREF.exit.i ], [ 0, %168 ] + %.0 = phi i32 [ -1, %1 ], [ -1, %signal_add_constants.exit ], [ -1, %142 ], [ -1, %147 ], [ -1, %151 ], [ -1, %155 ], [ -1, %159 ], [ -1, %194 ], [ 0, %162 ], [ -1, %10 ], [ -1, %13 ], [ -1, %16 ], [ -1, %19 ], [ -1, %22 ], [ -1, %25 ], [ -1, %28 ], [ -1, %31 ], [ -1, %34 ], [ -1, %37 ], [ -1, %40 ], [ -1, %43 ], [ -1, %46 ], [ -1, %49 ], [ -1, %52 ], [ -1, %55 ], [ -1, %58 ], [ -1, %61 ], [ -1, %64 ], [ -1, %67 ], [ -1, %70 ], [ -1, %73 ], [ -1, %76 ], [ -1, %79 ], [ -1, %82 ], [ -1, %85 ], [ -1, %88 ], [ -1, %91 ], [ -1, %94 ], [ -1, %97 ], [ -1, %100 ], [ -1, %103 ], [ -1, %106 ], [ -1, %109 ], [ -1, %112 ], [ -1, %115 ], [ -1, %118 ], [ -1, %121 ], [ -1, %126 ], [ -1, %131 ], [ -1, %134 ], [ -1, %137 ], [ 0, %Py_DECREF.exit.i ], [ 0, %168 ] ret i32 %.0 } diff --git a/bench/crow/optimized/example.ll b/bench/crow/optimized/example.ll index a4898049821..202bcb573ed 100644 --- a/bench/crow/optimized/example.ll +++ b/bench/crow/optimized/example.ll @@ -75307,8 +75307,8 @@ _ZNSt10error_codeaSIN4asio5error12basic_errorsEEENSt9enable_ifIXsr18is_error_cod br label %.loopexit .loopexit: ; preds = %.loopexit.loopexit, %13, %.critedge - %.05681 = phi ptr [ %.05684.lcssa, %.critedge ], [ %15, %13 ], [ %22, %.loopexit.loopexit ] - %.05579 = phi ptr [ %.05585.lcssa, %.critedge ], [ null, %13 ], [ null, %.loopexit.loopexit ] + %.05681 = phi ptr [ %.05684.lcssa, %.critedge ], [ %15, %13 ], [ %22, %.critedge.thread.loopexit ] + %.05579 = phi ptr [ %.05585.lcssa, %.critedge ], [ null, %13 ], [ null, %.critedge.thread.loopexit ] %23 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #40 to label %24 unwind label %_ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit @@ -75410,8 +75410,8 @@ _ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit64: ; preds = %5 br label %61 61: ; preds = %_ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit64, %_ZNSt10error_codeaSIN4asio5error12basic_errorsEEENSt9enable_ifIXsr18is_error_code_enumIT_EE5valueERS_E4typeES5_.exit - %.sroa.0.0 = phi i32 [ 22, %_ZNSt10error_codeaSIN4asio5error12basic_errorsEEENSt9enable_ifIXsr18is_error_code_enumIT_EE5valueERS_E4typeES5_.exit ], [ %.sroa.0.4, %_ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit64 ] - %.sroa.450.0 = phi ptr [ @_ZZN4asio15system_categoryEvE8instance, %_ZNSt10error_codeaSIN4asio5error12basic_errorsEEENSt9enable_ifIXsr18is_error_code_enumIT_EE5valueERS_E4typeES5_.exit ], [ %.sroa.450.4, %_ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit64 ] + %.sroa.0.0 = phi i32 [ 22, %_ZNSt10error_codeaSIN4asio5error12basic_errorsEEENSt9enable_ifIXsr18is_error_code_enumIT_EE5valueERS_E4typeES5_.exit ], [ %.sroa.0.4, %_ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit63 ] + %.sroa.450.0 = phi ptr [ @_ZZN4asio15system_categoryEvE8instance, %_ZNSt10error_codeaSIN4asio5error12basic_errorsEEENSt9enable_ifIXsr18is_error_code_enumIT_EE5valueERS_E4typeES5_.exit ], [ %.sroa.450.4, %_ZN4asio6detail11scoped_lockINS0_18posix_static_mutexEED2Ev.exit63 ] %.fca.0.insert = insertvalue { i32, ptr } poison, i32 %.sroa.0.0, 0 %.fca.1.insert = insertvalue { i32, ptr } %.fca.0.insert, ptr %.sroa.450.0, 1 ret { i32, ptr } %.fca.1.insert diff --git a/bench/csmith/optimized/FactUnion.ll b/bench/csmith/optimized/FactUnion.ll index 21c0b0a887a..5e69edc23fd 100644 --- a/bench/csmith/optimized/FactUnion.ll +++ b/bench/csmith/optimized/FactUnion.ll @@ -946,7 +946,7 @@ _ZNK8Variable21is_inside_union_fieldEv.exit.preheader: ; preds = %_ZNK8Variable1 %13 = load ptr, ptr %12, align 8, !tbaa !20 %14 = load i32, ptr %13, align 8, !tbaa !90 %15 = icmp eq i32 %14, 2 - br i1 %15, label %.critedge, label %.lr.ph + br i1 %15, label %.critedge, label %.lr.ph, !llvm.loop !120 .critedge: ; preds = %.lr.ph call void @llvm.lifetime.start.p0(ptr nonnull %3) @@ -1230,7 +1230,7 @@ define dso_local noundef ptr @_ZNK9FactUnion14join_var_factsERKSt6vectorIPK4Fact %47 = sub i64 %45, %46 %48 = ashr exact i64 %47, 3 %49 = icmp ult i64 %42, %48 - br i1 %49, label %10, label %._crit_edge, !llvm.loop !120 + br i1 %49, label %10, label %._crit_edge, !llvm.loop !121 } ; Function Attrs: mustprogress uwtable @@ -1383,9 +1383,9 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZNK9FactUnion13is_assertableE ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZNK4Fact10is_relatedERKS_(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef nonnull align 8 dereferenceable(12) %1) unnamed_addr #3 comdat align 2 { %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %4 = load i32, ptr %3, align 8, !tbaa !121 + %4 = load i32, ptr %3, align 8, !tbaa !122 %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %6 = load i32, ptr %5, align 8, !tbaa !121 + %6 = load i32, ptr %5, align 8, !tbaa !122 %7 = icmp eq i32 %4, %6 br i1 %7, label %8, label %18 @@ -1596,4 +1596,5 @@ attributes #18 = { builtin allocsize(0) } !118 = !{!116, !83, i64 0} !119 = !{} !120 = distinct !{!120, !86} -!121 = !{!9, !10, i64 8} +!121 = distinct !{!121, !86} +!122 = !{!9, !10, i64 8} diff --git a/bench/curl/optimized/cf-h1-proxy.ll b/bench/curl/optimized/cf-h1-proxy.ll index d9d31190cde..12c79c9ee77 100644 --- a/bench/curl/optimized/cf-h1-proxy.ll +++ b/bench/curl/optimized/cf-h1-proxy.ll @@ -1584,7 +1584,7 @@ define internal void @cf_h1_proxy_close(ptr noundef %0, ptr noundef %1) #0 { %cond = icmp eq ptr %0, null br i1 %cond, label %63, label %16 -16: ; preds = %15, %10 +16: ; preds = %10, %15 %17 = load ptr, ptr %0, align 8, !tbaa !77 %18 = getelementptr inbounds nuw i8, ptr %17, i64 12 %19 = load i32, ptr %18, align 4, !tbaa !81 diff --git a/bench/darktable/optimized/tags.ll b/bench/darktable/optimized/tags.ll index 04af6fe3752..7aecf03edc3 100644 --- a/bench/darktable/optimized/tags.ll +++ b/bench/darktable/optimized/tags.ll @@ -2661,14 +2661,12 @@ _tag_get_attached_export.exit: ; preds = %49 dt_sort_tag.exit: ; preds = %88, %._crit_edge.i81 %91 = call ptr @g_list_reverse(ptr noundef %68) #11 - %.not = icmp ne i32 %67, 0 + %.not = icmp eq i32 %67, 0 %.not66109 = icmp eq ptr %91, null - br i1 %.not, label %.preheader94, label %.loopexit95 + %or.cond = select i1 %.not, i1 true, i1 %.not6597 + br i1 %or.cond, label %.loopexit95, label %.lr.ph .preheader94: ; preds = %dt_sort_tag.exit - br i1 %.not66109, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %.preheader94 %92 = load ptr, ptr %91, align 8, !tbaa !58 %93 = getelementptr inbounds nuw i8, ptr %92, i64 40 %.promoted = load i32, ptr %93, align 8, !tbaa !72 @@ -2692,6 +2690,7 @@ dt_sort_tag.exit: ; preds = %88, %._crit_edge.i8 .lr.ph112: ; preds = %.loopexit95.thread, %.loopexit95 %.not69 = icmp eq i32 %4, 0 %.not74 = icmp eq i32 %5, 0 + %.not.not = xor i1 %.not, true br label %98 98: ; preds = %.lr.ph112, %153 @@ -2702,7 +2701,7 @@ dt_sort_tag.exit: ; preds = %88, %._crit_edge.i8 %101 = load i32, ptr %100, align 8, !tbaa !72 %102 = and i32 %101, 2 %.not67 = icmp eq i32 %102, 0 - %or.cond = select i1 %.not, i1 true, i1 %.not67 + %or.cond = select i1 %.not.not, i1 true, i1 %.not67 %103 = and i32 %101, 1 %.not68 = icmp eq i32 %103, 0 %or.cond141 = select i1 %or.cond, i1 %.not68, i1 false @@ -2837,8 +2836,8 @@ dt_sort_tag.exit: ; preds = %88, %._crit_edge.i8 %.not66 = icmp eq ptr %155, null br i1 %.not66, label %._crit_edge, label %98 -._crit_edge: ; preds = %153, %.preheader94, %.loopexit95 - %.056.lcssa = phi ptr [ null, %.loopexit95 ], [ null, %.preheader94 ], [ %.1, %153 ] +._crit_edge: ; preds = %153, %.loopexit95 + %.056.lcssa = phi ptr [ null, %.loopexit95 ], [ %.1, %153 ] br i1 %.not35.i, label %dt_tag_free_result.exit, label %156 156: ; preds = %._crit_edge @@ -4670,9 +4669,9 @@ define range(i64 -2147483648, 2147483648) i64 @dt_tag_export(ptr noundef readonl %30 = sext i32 %.1.lcssa to i64 br label %._crit_edge142 -._crit_edge142: ; preds = %._crit_edge142.loopexit, %._crit_edge.i - %.078.lcssa = phi ptr [ null, %._crit_edge.i ], [ %.fr146, %._crit_edge142.loopexit ] - %.077.lcssa = phi i64 [ 0, %._crit_edge.i ], [ %30, %._crit_edge142.loopexit ] +._crit_edge142: ; preds = %._crit_edge.i, %._crit_edge142.loopexit + %.078.lcssa = phi ptr [ %.fr146, %._crit_edge142.loopexit ], [ null, %._crit_edge.i ] + %.077.lcssa = phi i64 [ %30, %._crit_edge142.loopexit ], [ 0, %._crit_edge.i ] tail call void @g_strfreev(ptr noundef %.078.lcssa) #11 br i1 %.not35.i, label %dt_tag_free_result.exit, label %31 @@ -4850,7 +4849,7 @@ dt_tag_free_result.exit: ; preds = %._crit_edge142, %31 br i1 %.not93, label %.critedge3, label %.preheader102 .critedge3: ; preds = %82, %.lr.ph130, %.critedge.thread173, %.critedge - %.1.lcssa = phi i32 [ %.077140, %.critedge ], [ %.077140, %.critedge.thread173 ], [ %.077140, %.lr.ph130 ], [ %.2, %82 ] + %.1.lcssa = phi i32 [ %.077140, %.critedge ], [ %.077140, %.critedge.thread174 ], [ %.077140, %.lr.ph130 ], [ %.2, %82 ] %85 = getelementptr inbounds nuw i8, ptr %.079135, i64 8 %86 = load ptr, ptr %85, align 8, !tbaa !62 %.not88 = icmp eq ptr %86, null diff --git a/bench/duckdb/optimized/pages.ll b/bench/duckdb/optimized/pages.ll index db1d5d33994..4a5e130a8c1 100644 --- a/bench/duckdb/optimized/pages.ll +++ b/bench/duckdb/optimized/pages.ll @@ -77,47 +77,44 @@ os_pages_unmap.exit: ; preds = %15, %25 .preheader.i: ; preds = %os_pages_unmap.exit %30 = sub i64 0, %2 - br label %31 + %31 = load i8, ptr @os_overcommits, align 1, !tbaa !7, !range !9, !noundef !10 + %32 = trunc nuw i8 %31 to i1 + br i1 %32, label %35, label %._crit_edge.i.i -31: ; preds = %71, %.preheader.i - %32 = load i8, ptr @os_overcommits, align 1, !tbaa !7, !range !9, !noundef !10 - %33 = trunc nuw i8 %32 to i1 - br i1 %33, label %36, label %._crit_edge.i.i - -._crit_edge.i.i: ; preds = %31 +31: ; preds = %.preheader.i %.pre.i.i = load i8, ptr %3, align 1, !tbaa !7, !range !9 %34 = trunc nuw i8 %.pre.i.i to i1 %35 = select i1 %34, i32 3, i32 0 - br label %37 + br label %36 -36: ; preds = %31 +36: ; preds = %.preheader.i store i8 1, ptr %3, align 1, !tbaa !7 - br label %37 - -37: ; preds = %36, %._crit_edge.i.i - %38 = phi i32 [ %35, %._crit_edge.i.i ], [ 3, %36 ] - %39 = load i32, ptr @mmap_flags, align 4, !tbaa !3 - %40 = call ptr @mmap(ptr noundef null, i64 noundef %28, i32 noundef %38, i32 noundef %39, i32 noundef -1, i64 noundef 0) #10 - %magicptr.i = ptrtoint ptr %40 to i64 - switch i64 %magicptr.i, label %41 [ - i64 -1, label %pages_map_slow.exit - i64 0, label %pages_map_slow.exit - ] - -41: ; preds = %37 - %42 = add i64 %13, %magicptr.i - %43 = and i64 %42, %30 - %44 = sub i64 %43, %magicptr.i - %45 = add i64 %44, %1 - %.not.i.i = icmp eq i64 %43, %magicptr.i - br i1 %.not.i.i, label %os_pages_unmap.exit.i.i, label %46 - -46: ; preds = %41 - %47 = call i32 @munmap(ptr noundef nonnull %40, i64 noundef %44) #10 - %48 = icmp eq i32 %47, -1 - br i1 %48, label %49, label %os_pages_unmap.exit.i.i + br label %36 -49: ; preds = %46 +49: ; preds = %36, %31 + %37 = phi i32 [ %34, %._crit_edge.i.i ], [ 3, %35 ] + %38 = load i32, ptr @mmap_flags, align 4, !tbaa !3 + %39 = call ptr @mmap(ptr noundef null, i64 noundef %28, i32 noundef %37, i32 noundef %38, i32 noundef -1, i64 noundef 0) #10 + %40 = icmp eq ptr %39, inttoptr (i64 -1 to ptr) + %.not.i = icmp eq ptr %39, null + %or.cond.i = or i1 %40, %.not.i + br i1 %or.cond.i, label %pages_map_slow.exit, label %41 + +41: ; preds = %36 + %42 = ptrtoint ptr %39 to i64 + %43 = add i64 %13, %42 + %44 = and i64 %43, %30 + %45 = sub i64 %44, %42 + %46 = add i64 %45, %1 + %.not.i.i = icmp eq i64 %44, %42 + br i1 %.not.i.i, label %os_pages_unmap.exit.i.i, label %47 + +47: ; preds = %41 + %48 = call i32 @munmap(ptr noundef nonnull %39, i64 noundef %45) #10 + %49 = icmp eq i32 %48, -1 + br i1 %49, label %50, label %os_pages_unmap.exit.i.i + +50: ; preds = %47 call void @llvm.lifetime.start.p0(ptr nonnull %6) %50 = tail call ptr @__errno_location() #11 %51 = load i32, ptr %50, align 4, !tbaa !3 @@ -127,25 +124,25 @@ os_pages_unmap.exit: ; preds = %15, %25 %54 = trunc nuw i8 %53 to i1 br i1 %54, label %55, label %56 -55: ; preds = %49 +55: ; preds = %50 call void @abort() #12 unreachable -56: ; preds = %49 +56: ; preds = %50 call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %os_pages_unmap.exit.i.i -os_pages_unmap.exit.i.i: ; preds = %56, %46, %41 - %.not13.i.i = icmp eq i64 %28, %45 - br i1 %.not13.i.i, label %71, label %57 +os_pages_unmap.exit.i.i: ; preds = %56, %47, %41 + %.not13.i.i = icmp eq i64 %28, %46 + %58 = getelementptr inbounds nuw i8, ptr %39, i64 %45 + br i1 %.not13.i.i, label %pages_map_slow.exit, label %59 57: ; preds = %os_pages_unmap.exit.i.i - %58 = getelementptr inbounds nuw i8, ptr %40, i64 %44 - %59 = sub i64 %28, %45 - %60 = getelementptr inbounds nuw i8, ptr %58, i64 %1 - %61 = call i32 @munmap(ptr noundef nonnull %60, i64 noundef %59) #10 - %62 = icmp eq i32 %61, -1 - br i1 %62, label %63, label %pages_map_slow.exit + %60 = sub i64 %28, %46 + %61 = getelementptr inbounds nuw i8, ptr %58, i64 %1 + %62 = call i32 @munmap(ptr noundef nonnull %61, i64 noundef %60) #10 + %63 = icmp eq i32 %62, -1 + br i1 %63, label %64, label %71 63: ; preds = %57 call void @llvm.lifetime.start.p0(ptr nonnull %5) @@ -165,16 +162,8 @@ os_pages_unmap.exit.i.i: ; preds = %56, %46, %41 call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %pages_map_slow.exit -71: ; preds = %os_pages_unmap.exit.i.i - %72 = icmp eq ptr %40, null - br i1 %72, label %31, label %os_pages_trim.exit.loopexit.split.loop.exit.i - -os_pages_trim.exit.loopexit.split.loop.exit.i: ; preds = %71 - %73 = getelementptr inbounds nuw i8, ptr %40, i64 %44 - br label %pages_map_slow.exit - -pages_map_slow.exit: ; preds = %37, %37, %os_pages_trim.exit.loopexit.split.loop.exit.i, %70, %57, %os_pages_unmap.exit, %11, %4 - %.0 = phi ptr [ %8, %4 ], [ %8, %11 ], [ null, %os_pages_unmap.exit ], [ %58, %57 ], [ %58, %70 ], [ %73, %os_pages_trim.exit.loopexit.split.loop.exit.i ], [ null, %37 ], [ null, %37 ] +71: ; preds = %71, %59, %os_pages_unmap.exit.i.i, %36, %os_pages_unmap.exit, %11, %4 + %.0 = phi ptr [ %8, %4 ], [ %8, %11 ], [ null, %os_pages_unmap.exit ], [ %58, %59 ], [ %58, %71 ], [ null, %36 ], [ %58, %os_pages_unmap.exit.i.i ] ret ptr %.0 } @@ -618,11 +607,10 @@ init_thp_state.exit: ; preds = %55 %65 = phi i32 [ 0, %init_thp_state.exit.thread ], [ %spec.select, %init_thp_state.exit ] %66 = load i32, ptr @mmap_flags, align 4, !tbaa !3 %67 = call ptr @mmap(ptr noundef null, i64 noundef 4096, i32 noundef %65, i32 noundef %66, i32 noundef -1, i64 noundef 0) #10 - %magicptr = ptrtoint ptr %67 to i64 - switch i64 %magicptr, label %68 [ - i64 -1, label %os_pages_unmap.exit - i64 0, label %os_pages_unmap.exit - ] + %68 = icmp eq ptr %67, inttoptr (i64 -1 to ptr) + %68 = icmp eq ptr %67, null + %or.cond = or i1 %68, %69 + br i1 %or.cond, label %os_pages_unmap.exit, label %70 68: ; preds = %._crit_edge.i %.b.i = load i1, ptr @pages_can_purge_lazy_runtime, align 1 @@ -660,8 +648,8 @@ duckdb_je_pages_purge_lazy.exit.thread: ; preds = %68, %duckdb_je_page call void @llvm.lifetime.end.p0(ptr nonnull %1) br label %os_pages_unmap.exit -os_pages_unmap.exit: ; preds = %._crit_edge.i, %._crit_edge.i, %70, %80, %6 - %.04 = phi i1 [ true, %6 ], [ false, %70 ], [ false, %80 ], [ true, %._crit_edge.i ], [ true, %._crit_edge.i ] +os_pages_unmap.exit: ; preds = %._crit_edge.i, %70, %80, %6 + %.04 = phi i1 [ true, %6 ], [ false, %72 ], [ false, %82 ], [ true, %._crit_edge.i ] ret i1 %.04 } diff --git a/bench/duckdb/optimized/tcache.ll b/bench/duckdb/optimized/tcache.ll index 4a2bfecd1e6..8841e801ad8 100644 --- a/bench/duckdb/optimized/tcache.ll +++ b/bench/duckdb/optimized/tcache.ll @@ -4614,13 +4614,15 @@ malloc_mutex_lock.exit: ; preds = %5, %9 %13 = zext i32 %1 to i64 %14 = getelementptr inbounds nuw %struct.tcaches_s, ptr %12, i64 %13 %15 = load ptr, ptr %14, align 8, !tbaa !39 - %switch = icmp ult ptr %15, inttoptr (i64 2 to ptr) + %switch = icmp eq ptr %15, inttoptr (i64 1 to ptr) %16 = load ptr, ptr @tcaches_avail, align 8, !tbaa !174 store ptr %16, ptr %14, align 8, !tbaa !39 store ptr %14, ptr @tcaches_avail, align 8, !tbaa !174 store atomic i8 0, ptr getelementptr inbounds nuw (i8, ptr @tcaches_mtx, i64 64) monotonic, align 8 %17 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @tcaches_mtx, i64 72)) #16 - br i1 %switch, label %19, label %18 + %.not10 = icmp eq ptr %15, null + %.not = or i1 %16, %.not10 + br i1 %.not, label %20, label %19 18: ; preds = %malloc_mutex_lock.exit tail call fastcc void @tcache_destroy(ptr noundef %0, ptr noundef nonnull %15, i1 noundef zeroext false) diff --git a/bench/eastl/optimized/TestFixedHash.ll b/bench/eastl/optimized/TestFixedHash.ll index 045b737fada..7937a9ca268 100644 --- a/bench/eastl/optimized/TestFixedHash.ll +++ b/bench/eastl/optimized/TestFixedHash.ll @@ -35200,16 +35200,17 @@ while.cond.i.i.i529: ; preds = %invoke.cont459, %wh %.pn.i.i.i530 = phi ptr [ %storemerge.i.i.i531, %while.cond.i.i.i529 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont459 ] %storemerge.i.i.i531 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i530, i64 8 %374 = load ptr, ptr %storemerge.i.i.i531, align 8 - %magicptr = ptrtoint ptr %374 to i64 - switch i64 %magicptr, label %for.body.i510 [ - i64 0, label %while.cond.i.i.i529 - i64 -1, label %invoke.cont460 - ] - -for.body.i510: ; preds = %while.cond.i.i.i529, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i - %nElementCount.012.i511 = phi i64 [ %inc.i514, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i ], [ 0, %while.cond.i.i.i529 ] - %temp.sroa.5.011.i512 = phi ptr [ %temp.sroa.5.1.i519, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i ], [ %storemerge.i.i.i531, %while.cond.i.i.i529 ] - %temp.sroa.0.010.i513 = phi ptr [ %temp.sroa.0.1.i518, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i ], [ %374, %while.cond.i.i.i529 ] + %cmp.i.i.i532 = icmp eq ptr %374, null + br i1 %cmp.i.i.i532, label %while.cond.i.i.i529, label %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i, !llvm.loop !5 + +_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i:; preds = %while.cond.i.i.i529 + %cmp.i.not9.i509 = icmp eq ptr %374, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i509, label %invoke.cont460, label %for.body.i510 + +for.body.i510:; preds = %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i + %temp.sroa.5.011.i512 = phi i64 [ %inc.i514, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i ], [ 0, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i ] + %temp.sroa.0.010.i513 = phi ptr [ %temp.sroa.5.1.i519, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i ], [ %storemerge.i.i.i531, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i ] + %temp.sroa.0.010.i513 = phi ptr [ %temp.sroa.0.1.i518, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i ], [ %374, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i ] %inc.i514 = add i64 %nElementCount.012.i511, 1 %mpNext.i.i.i515 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i513, i64 8 %storemerge1.i.i.i516 = load ptr, ptr %mpNext.i.i.i515, align 8 @@ -35233,8 +35234,8 @@ for.end.i521.loopexit: ; preds = %_ZN5eastl18hashtabl %376 = icmp eq i64 %inc.i514, 0 br label %invoke.cont460 -invoke.cont460: ; preds = %while.cond.i.i.i529, %for.end.i521.loopexit, %invoke.cont459 - %retval.0.i495 = phi i1 [ false, %invoke.cont459 ], [ %376, %for.end.i521.loopexit ], [ true, %while.cond.i.i.i529 ] +invoke.cont460: ; preds = %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i, %for.end.i521.loopexit, %invoke.cont459 + %retval.0.i495 = phi i1 [ false, %invoke.cont459 ], [ true, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm101ELm16ELm100ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i ], [ %376, %for.end.i521.loopexit ] %call463 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i495, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str, i32 noundef 414, ptr noundef nonnull @.str.21) to label %invoke.cont462 unwind label %lpad427.loopexit.split-lp @@ -36372,16 +36373,17 @@ while.cond.i.i.i697: ; preds = %invoke.cont600, %wh %.pn.i.i.i698 = phi ptr [ %storemerge.i.i.i699, %while.cond.i.i.i697 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont600 ] %storemerge.i.i.i699 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i698, i64 8 %523 = load ptr, ptr %storemerge.i.i.i699, align 8 - %magicptr3765 = ptrtoint ptr %523 to i64 - switch i64 %magicptr3765, label %for.body.i677 [ - i64 0, label %while.cond.i.i.i697 - i64 -1, label %invoke.cont601 - ] - -for.body.i677: ; preds = %while.cond.i.i.i697, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 - %nElementCount.012.i678 = phi i64 [ %inc.i681, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 ], [ 0, %while.cond.i.i.i697 ] - %temp.sroa.5.011.i679 = phi ptr [ %temp.sroa.5.1.i687, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 ], [ %storemerge.i.i.i699, %while.cond.i.i.i697 ] - %temp.sroa.0.010.i680 = phi ptr [ %temp.sroa.0.1.i686, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 ], [ %523, %while.cond.i.i.i697 ] + %cmp.i.i.i700 = icmp eq ptr %523, null + br i1 %cmp.i.i.i700, label %while.cond.i.i.i697, label %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672, !llvm.loop !5 + +_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672:; preds = %while.cond.i.i.i697 + %cmp.i.not9.i676 = icmp eq ptr %523, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i676, label %invoke.cont601, label %for.body.i677 + +for.body.i677:; preds = %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 + %temp.sroa.5.011.i679 = phi i64 [ %inc.i681, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 ], [ 0, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672 ] + %temp.sroa.0.010.i680 = phi ptr [ %temp.sroa.5.1.i687, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 ], [ %storemerge.i.i.i699, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672 ] + %temp.sroa.0.010.i680 = phi ptr [ %temp.sroa.0.1.i686, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i685 ], [ %523, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672 ] %inc.i681 = add i64 %nElementCount.012.i678, 1 %mpNext.i.i.i682 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i680, i64 8 %storemerge1.i.i.i683 = load ptr, ptr %mpNext.i.i.i682, align 8 @@ -36405,8 +36407,8 @@ for.end.i689.loopexit: ; preds = %_ZN5eastl18hashtabl %525 = icmp eq i64 %inc.i681, 0 br label %invoke.cont601 -invoke.cont601: ; preds = %while.cond.i.i.i697, %for.end.i689.loopexit, %invoke.cont600 - %retval.0.i661 = phi i1 [ false, %invoke.cont600 ], [ %525, %for.end.i689.loopexit ], [ true, %while.cond.i.i.i697 ] +invoke.cont601: ; preds = %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672, %for.end.i689.loopexit, %invoke.cont600 + %retval.0.i661 = phi i1 [ false, %invoke.cont600 ], [ true, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i672 ], [ %525, %for.end.i689.loopexit ] %call604 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i661, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str, i32 noundef 502, ptr noundef nonnull @.str.21) to label %invoke.cont603 unwind label %lpad591.loopexit.split-lp.loopexit.split-lp @@ -36574,16 +36576,17 @@ while.cond.i.i.i800: ; preds = %invoke.cont630, %wh %.pn.i.i.i801 = phi ptr [ %storemerge.i.i.i802, %while.cond.i.i.i800 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont630 ] %storemerge.i.i.i802 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i801, i64 8 %546 = load ptr, ptr %storemerge.i.i.i802, align 8 - %magicptr3766 = ptrtoint ptr %546 to i64 - switch i64 %magicptr3766, label %for.body.i780 [ - i64 0, label %while.cond.i.i.i800 - i64 -1, label %invoke.cont631 - ] - -for.body.i780: ; preds = %while.cond.i.i.i800, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 - %nElementCount.012.i781 = phi i64 [ %inc.i784, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 ], [ 0, %while.cond.i.i.i800 ] - %temp.sroa.5.011.i782 = phi ptr [ %temp.sroa.5.1.i790, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 ], [ %storemerge.i.i.i802, %while.cond.i.i.i800 ] - %temp.sroa.0.010.i783 = phi ptr [ %temp.sroa.0.1.i789, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 ], [ %546, %while.cond.i.i.i800 ] + %cmp.i.i.i803 = icmp eq ptr %546, null + br i1 %cmp.i.i.i803, label %while.cond.i.i.i800, label %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775, !llvm.loop !5 + +_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775:; preds = %while.cond.i.i.i800 + %cmp.i.not9.i779 = icmp eq ptr %546, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i779, label %invoke.cont631, label %for.body.i780 + +for.body.i780:; preds = %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 + %temp.sroa.5.011.i782 = phi i64 [ %inc.i784, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 ], [ 0, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775 ] + %temp.sroa.0.010.i783 = phi ptr [ %temp.sroa.5.1.i790, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 ], [ %storemerge.i.i.i802, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775 ] + %temp.sroa.0.010.i783 = phi ptr [ %temp.sroa.0.1.i789, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i788 ], [ %546, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775 ] %inc.i784 = add i64 %nElementCount.012.i781, 1 %mpNext.i.i.i785 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i783, i64 8 %storemerge1.i.i.i786 = load ptr, ptr %mpNext.i.i.i785, align 8 @@ -36607,8 +36610,8 @@ for.end.i792.loopexit: ; preds = %_ZN5eastl18hashtabl %548 = icmp eq i64 %inc.i784, 0 br label %invoke.cont631 -invoke.cont631: ; preds = %while.cond.i.i.i800, %for.end.i792.loopexit, %invoke.cont630 - %retval.0.i764 = phi i1 [ false, %invoke.cont630 ], [ %548, %for.end.i792.loopexit ], [ true, %while.cond.i.i.i800 ] +invoke.cont631: ; preds = %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775, %for.end.i792.loopexit, %invoke.cont630 + %retval.0.i764 = phi i1 [ false, %invoke.cont630 ], [ true, %_ZNK5eastl9hashtableIiiNS_25fixed_hashtable_allocatorILm12ELm16ELm11ELm8ELm0ELb1ENS_9allocatorEEENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i775 ], [ %548, %for.end.i792.loopexit ] %call634 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i764, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str, i32 noundef 512, ptr noundef nonnull @.str.21) to label %invoke.cont633 unwind label %lpad591.loopexit.split-lp.loopexit.split-lp diff --git a/bench/eastl/optimized/TestHash.ll b/bench/eastl/optimized/TestHash.ll index 7fbc997d848..017b349e971 100644 --- a/bench/eastl/optimized/TestHash.ll +++ b/bench/eastl/optimized/TestHash.ll @@ -13060,16 +13060,17 @@ while.cond.i.i.i438: ; preds = %invoke.cont74, %whi %.pn.i.i.i439 = phi ptr [ %storemerge.i.i.i440, %while.cond.i.i.i438 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont74 ] %storemerge.i.i.i440 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i439, i64 8 %97 = load ptr, ptr %storemerge.i.i.i440, align 8 - %magicptr = ptrtoint ptr %97 to i64 - switch i64 %magicptr, label %for.body.i430 [ - i64 0, label %while.cond.i.i.i438 - i64 -1, label %invoke.cont75 - ] - -for.body.i430: ; preds = %while.cond.i.i.i438, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 - %nElementCount.012.i = phi i64 [ %inc.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 ], [ 0, %while.cond.i.i.i438 ] - %temp.sroa.5.011.i = phi ptr [ %temp.sroa.5.1.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 ], [ %storemerge.i.i.i440, %while.cond.i.i.i438 ] - %temp.sroa.0.010.i = phi ptr [ %temp.sroa.0.1.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 ], [ %97, %while.cond.i.i.i438 ] + %cmp.i.i.i441 = icmp eq ptr %97, null + br i1 %cmp.i.i.i441, label %while.cond.i.i.i438, label %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426, !llvm.loop !197 + +_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426:; preds = %while.cond.i.i.i438 + %cmp.i.not9.i = icmp eq ptr %97, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i, label %invoke.cont75, label %for.body.i430 + +for.body.i430:; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 + %temp.sroa.5.011.i = phi i64 [ %inc.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 ], [ 0, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426 ] + %temp.sroa.0.010.i = phi ptr [ %temp.sroa.5.1.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 ], [ %storemerge.i.i.i440, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426 ] + %temp.sroa.0.010.i = phi ptr [ %temp.sroa.0.1.i, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i434 ], [ %97, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426 ] %inc.i = add i64 %nElementCount.012.i, 1 %mpNext.i.i.i431 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i, i64 8 %storemerge1.i.i.i432 = load ptr, ptr %mpNext.i.i.i431, align 8 @@ -13093,8 +13094,8 @@ for.end.i.loopexit: ; preds = %_ZN5eastl18hashtabl %99 = icmp eq i64 %inc.i, 0 br label %invoke.cont75 -invoke.cont75: ; preds = %while.cond.i.i.i438, %for.end.i.loopexit, %invoke.cont74 - %retval.0.i422 = phi i1 [ false, %invoke.cont74 ], [ %99, %for.end.i.loopexit ], [ true, %while.cond.i.i.i438 ] +invoke.cont75: ; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426, %for.end.i.loopexit, %invoke.cont74 + %retval.0.i422 = phi i1 [ false, %invoke.cont74 ], [ true, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i426 ], [ %99, %for.end.i.loopexit ] %call78 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i422, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str.4, i32 noundef 239, ptr noundef nonnull @.str.13) to label %invoke.cont77 unwind label %lpad73.loopexit.split-lp.loopexit.split-lp @@ -13423,16 +13424,17 @@ while.cond.i.i.i560: ; preds = %invoke.cont97, %whi %.pn.i.i.i561 = phi ptr [ %storemerge.i.i.i562, %while.cond.i.i.i560 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont97 ] %storemerge.i.i.i562 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i561, i64 8 %136 = load ptr, ptr %storemerge.i.i.i562, align 8 - %magicptr12088 = ptrtoint ptr %136 to i64 - switch i64 %magicptr12088, label %for.body.i540 [ - i64 0, label %while.cond.i.i.i560 - i64 -1, label %invoke.cont98 - ] - -for.body.i540: ; preds = %while.cond.i.i.i560, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 - %nElementCount.012.i541 = phi i64 [ %inc.i544, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 ], [ 0, %while.cond.i.i.i560 ] - %temp.sroa.5.011.i542 = phi ptr [ %temp.sroa.5.1.i550, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 ], [ %storemerge.i.i.i562, %while.cond.i.i.i560 ] - %temp.sroa.0.010.i543 = phi ptr [ %temp.sroa.0.1.i549, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 ], [ %136, %while.cond.i.i.i560 ] + %cmp.i.i.i563 = icmp eq ptr %136, null + br i1 %cmp.i.i.i563, label %while.cond.i.i.i560, label %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535, !llvm.loop !197 + +_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535:; preds = %while.cond.i.i.i560 + %cmp.i.not9.i539 = icmp eq ptr %136, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i539, label %invoke.cont98, label %for.body.i540 + +for.body.i540:; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 + %temp.sroa.5.011.i542 = phi i64 [ %inc.i544, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 ], [ 0, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535 ] + %temp.sroa.0.010.i543 = phi ptr [ %temp.sroa.5.1.i550, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 ], [ %storemerge.i.i.i562, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535 ] + %temp.sroa.0.010.i543 = phi ptr [ %temp.sroa.0.1.i549, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i548 ], [ %136, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535 ] %inc.i544 = add i64 %nElementCount.012.i541, 1 %mpNext.i.i.i545 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i543, i64 8 %storemerge1.i.i.i546 = load ptr, ptr %mpNext.i.i.i545, align 8 @@ -13456,8 +13458,8 @@ for.end.i552.loopexit: ; preds = %_ZN5eastl18hashtabl %138 = icmp eq i64 %inc.i544, 0 br label %invoke.cont98 -invoke.cont98: ; preds = %while.cond.i.i.i560, %for.end.i552.loopexit, %invoke.cont97 - %retval.0.i524 = phi i1 [ false, %invoke.cont97 ], [ %138, %for.end.i552.loopexit ], [ true, %while.cond.i.i.i560 ] +invoke.cont98: ; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535, %for.end.i552.loopexit, %invoke.cont97 + %retval.0.i524 = phi i1 [ false, %invoke.cont97 ], [ true, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i535 ], [ %138, %for.end.i552.loopexit ] %call101 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i524, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str.4, i32 noundef 249, ptr noundef nonnull @.str.13) to label %invoke.cont100 unwind label %lpad73.loopexit.split-lp.loopexit.split-lp @@ -13680,16 +13682,17 @@ while.cond.i.i.i706: ; preds = %invoke.cont127, %wh %.pn.i.i.i707 = phi ptr [ %storemerge.i.i.i708, %while.cond.i.i.i706 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont127 ] %storemerge.i.i.i708 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i707, i64 8 %166 = load ptr, ptr %storemerge.i.i.i708, align 8 - %magicptr12089 = ptrtoint ptr %166 to i64 - switch i64 %magicptr12089, label %for.body.i686 [ - i64 0, label %while.cond.i.i.i706 - i64 -1, label %invoke.cont128 - ] - -for.body.i686: ; preds = %while.cond.i.i.i706, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 - %nElementCount.012.i687 = phi i64 [ %inc.i690, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 ], [ 0, %while.cond.i.i.i706 ] - %temp.sroa.5.011.i688 = phi ptr [ %temp.sroa.5.1.i696, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 ], [ %storemerge.i.i.i708, %while.cond.i.i.i706 ] - %temp.sroa.0.010.i689 = phi ptr [ %temp.sroa.0.1.i695, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 ], [ %166, %while.cond.i.i.i706 ] + %cmp.i.i.i709 = icmp eq ptr %166, null + br i1 %cmp.i.i.i709, label %while.cond.i.i.i706, label %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681, !llvm.loop !197 + +_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681:; preds = %while.cond.i.i.i706 + %cmp.i.not9.i685 = icmp eq ptr %166, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i685, label %invoke.cont128, label %for.body.i686 + +for.body.i686:; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 + %temp.sroa.5.011.i688 = phi i64 [ %inc.i690, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 ], [ 0, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681 ] + %temp.sroa.0.010.i689 = phi ptr [ %temp.sroa.5.1.i696, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 ], [ %storemerge.i.i.i708, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681 ] + %temp.sroa.0.010.i689 = phi ptr [ %temp.sroa.0.1.i695, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i694 ], [ %166, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681 ] %inc.i690 = add i64 %nElementCount.012.i687, 1 %mpNext.i.i.i691 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i689, i64 8 %storemerge1.i.i.i692 = load ptr, ptr %mpNext.i.i.i691, align 8 @@ -13713,8 +13716,8 @@ for.end.i698.loopexit: ; preds = %_ZN5eastl18hashtabl %168 = icmp eq i64 %inc.i690, 0 br label %invoke.cont128 -invoke.cont128: ; preds = %while.cond.i.i.i706, %for.end.i698.loopexit, %invoke.cont127 - %retval.0.i670 = phi i1 [ false, %invoke.cont127 ], [ %168, %for.end.i698.loopexit ], [ true, %while.cond.i.i.i706 ] +invoke.cont128: ; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681, %for.end.i698.loopexit, %invoke.cont127 + %retval.0.i670 = phi i1 [ false, %invoke.cont127 ], [ true, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i681 ], [ %168, %for.end.i698.loopexit ] %call131 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i670, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str.4, i32 noundef 259, ptr noundef nonnull @.str.13) to label %invoke.cont130 unwind label %lpad73.loopexit.split-lp.loopexit.split-lp @@ -15177,16 +15180,17 @@ while.cond.i.i.i1272: ; preds = %invoke.cont363, %wh %.pn.i.i.i1273 = phi ptr [ %storemerge.i.i.i1274, %while.cond.i.i.i1272 ], [ @_ZN5eastl18gpEmptyBucketArrayE, %invoke.cont363 ] %storemerge.i.i.i1274 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i1273, i64 8 %368 = load ptr, ptr %storemerge.i.i.i1274, align 8 - %magicptr12090 = ptrtoint ptr %368 to i64 - switch i64 %magicptr12090, label %for.body.i1252 [ - i64 0, label %while.cond.i.i.i1272 - i64 -1, label %invoke.cont364 - ] - -for.body.i1252: ; preds = %while.cond.i.i.i1272, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 - %nElementCount.012.i1253 = phi i64 [ %inc.i1256, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 ], [ 0, %while.cond.i.i.i1272 ] - %temp.sroa.5.011.i1254 = phi ptr [ %temp.sroa.5.1.i1262, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 ], [ %storemerge.i.i.i1274, %while.cond.i.i.i1272 ] - %temp.sroa.0.010.i1255 = phi ptr [ %temp.sroa.0.1.i1261, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 ], [ %368, %while.cond.i.i.i1272 ] + %cmp.i.i.i1275 = icmp eq ptr %368, null + br i1 %cmp.i.i.i1275, label %while.cond.i.i.i1272, label %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247, !llvm.loop !197 + +_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247:; preds = %while.cond.i.i.i1272 + %cmp.i.not9.i1251 = icmp eq ptr %368, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not9.i1251, label %invoke.cont364, label %for.body.i1252 + +for.body.i1252:; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 + %temp.sroa.5.011.i1254 = phi i64 [ %inc.i1256, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 ], [ 0, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247 ] + %temp.sroa.0.010.i1255 = phi ptr [ %temp.sroa.5.1.i1262, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 ], [ %storemerge.i.i.i1274, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247 ] + %temp.sroa.0.010.i1255 = phi ptr [ %temp.sroa.0.1.i1261, %_ZN5eastl18hashtable_iteratorIiLb1ELb0EEppEv.exit.i1260 ], [ %368, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247 ] %inc.i1256 = add i64 %nElementCount.012.i1253, 1 %mpNext.i.i.i1257 = getelementptr inbounds nuw i8, ptr %temp.sroa.0.010.i1255, i64 8 %storemerge1.i.i.i1258 = load ptr, ptr %mpNext.i.i.i1257, align 8 @@ -15210,8 +15214,8 @@ for.end.i1264.loopexit: ; preds = %_ZN5eastl18hashtabl %370 = icmp eq i64 %inc.i1256, 0 br label %invoke.cont364 -invoke.cont364: ; preds = %while.cond.i.i.i1272, %for.end.i1264.loopexit, %invoke.cont363 - %retval.0.i1236 = phi i1 [ false, %invoke.cont363 ], [ %370, %for.end.i1264.loopexit ], [ true, %while.cond.i.i.i1272 ] +invoke.cont364: ; preds = %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247, %for.end.i1264.loopexit, %invoke.cont363 + %retval.0.i1236 = phi i1 [ false, %invoke.cont363 ], [ true, %_ZNK5eastl9hashtableIiiNS_9allocatorENS_8use_selfIiEENS_8equal_toIiEENS_4hashIiEENS_17mod_range_hashingENS_19default_ranged_hashENS_19prime_rehash_policyELb0ELb0ELb1EE5beginEv.exit.i1247 ], [ %370, %for.end.i1264.loopexit ] %call367 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %retval.0.i1236, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str.4, i32 noundef 405, ptr noundef nonnull @.str.13) to label %invoke.cont366 unwind label %lpad281.loopexit.split-lp.loopexit.split-lp diff --git a/bench/eastl/optimized/TestIntrusiveHash.ll b/bench/eastl/optimized/TestIntrusiveHash.ll index 8295d49577c..f79cb91c088 100644 --- a/bench/eastl/optimized/TestIntrusiveHash.ll +++ b/bench/eastl/optimized/TestIntrusiveHash.ll @@ -4329,20 +4329,21 @@ while.cond.i.i.i2712.preheader: ; preds = %while.body.i2622, % store i64 3, ptr %mnElementCount.i.i2625, align 8, !noalias !243 br label %while.cond.i.i.i2712 -while.cond.i.i.i2712: ; preds = %while.cond.i.i.i2712, %while.cond.i.i.i2712.preheader +while.cond.i.i.i2712: ; preds = %while.cond.i.i.i2712.preheader, %while.cond.i.i.i2712 %.pn.i.i.i2713 = phi ptr [ %storemerge.i.i.i2714, %while.cond.i.i.i2712 ], [ %hs811, %while.cond.i.i.i2712.preheader ] %storemerge.i.i.i2714 = getelementptr inbounds nuw i8, ptr %.pn.i.i.i2713, i64 8 %529 = load ptr, ptr %storemerge.i.i.i2714, align 8 - %magicptr = ptrtoint ptr %529 to i64 - switch i64 %magicptr, label %for.body.i2693 [ - i64 0, label %while.cond.i.i.i2712 - i64 -1, label %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716 - ] - -for.body.i2693: ; preds = %while.cond.i.i.i2712, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 - %nElementCount.09.i2694 = phi i64 [ %inc.i2697, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 ], [ 0, %while.cond.i.i.i2712 ] - %temp.sroa.5.08.i2695 = phi ptr [ %temp.sroa.5.1.i2702, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 ], [ %storemerge.i.i.i2714, %while.cond.i.i.i2712 ] - %temp.sroa.0.07.i2696 = phi ptr [ %temp.sroa.0.1.i2701, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 ], [ %529, %while.cond.i.i.i2712 ] + %cmp.i.i.i2715 = icmp eq ptr %529, null + br i1 %cmp.i.i.i2715, label %while.cond.i.i.i2712, label %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688, !llvm.loop !7 + +_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688:; preds = %while.cond.i.i.i2712 + %cmp.i.not6.i2692 = icmp eq ptr %529, inttoptr (i64 -1 to ptr) + br i1 %cmp.i.not6.i2692, label %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716, label %for.body.i2693 + +for.body.i2693:; preds = %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 + %temp.sroa.5.08.i2695 = phi i64 [ %inc.i2697, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 ], [ 0, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688 ] + %temp.sroa.0.07.i2696 = phi ptr [ %temp.sroa.5.1.i2702, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 ], [ %storemerge.i.i.i2714, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688 ] + %temp.sroa.0.07.i2696 = phi ptr [ %temp.sroa.0.1.i2701, %_ZN5eastl28intrusive_hashtable_iteratorIN12_GLOBAL__N_19SetWidgetELb1EEppEv.exit.i2700 ], [ %529, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688 ] %inc.i2697 = add i64 %nElementCount.09.i2694, 1 %storemerge1.i.i.i2698 = load ptr, ptr %temp.sroa.0.07.i2696, align 8 %cmp2.i.i.i2699 = icmp eq ptr %storemerge1.i.i.i2698, null @@ -4365,8 +4366,8 @@ _ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equ %531 = icmp eq i64 %inc.i2697, 3 br label %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716 -_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716: ; preds = %while.cond.i.i.i2712, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716.loopexit - %nElementCount.0.lcssa.i2705 = phi i1 [ %531, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716.loopexit ], [ false, %while.cond.i.i.i2712 ] +_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716: ; preds = %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716.loopexit, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688 + %nElementCount.0.lcssa.i2705 = phi i1 [ false, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE5beginEv.exit.i2688 ], [ %531, %_ZNK5eastl19intrusive_hashtableIN12_GLOBAL__N_19SetWidgetES2_NS1_6SWHashENS_8equal_toIS2_EELm37ELb1ELb1EE8validateEv.exit2716.loopexit ] %call824 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %nElementCount.0.lcssa.i2705, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str, i32 noundef 745, ptr noundef nonnull @.str.88) %call.val.i = load i32, ptr %mX.i2627, align 8 %conv.i.i2717 = sext i32 %call.val.i to i64 diff --git a/bench/ffmpeg/optimized/xcbgrab.ll b/bench/ffmpeg/optimized/xcbgrab.ll index d82361fcdde..d8b16d75cfd 100644 --- a/bench/ffmpeg/optimized/xcbgrab.ll +++ b/bench/ffmpeg/optimized/xcbgrab.ll @@ -1604,25 +1604,24 @@ define internal ptr @allocate_shm_buffer(ptr noundef %0, i64 noundef %1) #1 { %7 = tail call i32 @xcb_shm_attach(ptr noundef %0, i32 noundef %6, i32 noundef %3, i8 noundef zeroext 0) #10 %8 = tail call ptr @shmat(i32 noundef %3, ptr noundef null, i32 noundef 0) #10 %9 = tail call i32 @shmctl(i32 noundef %3, i32 noundef 0, ptr noundef null) #10 - %magicptr = ptrtoint ptr %8 to i64 - switch i64 %magicptr, label %10 [ - i64 -1, label %16 - i64 0, label %16 - ] - -10: ; preds = %5 - %11 = zext i32 %6 to i64 - %12 = inttoptr i64 %11 to ptr - %13 = tail call ptr @av_buffer_create(ptr noundef nonnull %8, i64 noundef %1, ptr noundef nonnull @free_shm_buffer, ptr noundef %12, i32 noundef 0) #10 - %.not = icmp eq ptr %13, null - br i1 %.not, label %14, label %16 + %10 = icmp ne ptr %8, inttoptr (i64 -1 to ptr) + %11 = icmp ne ptr %8, null + %or.cond = and i1 %10, %11 + br i1 %or.cond, label %12, label %16 + +12: ; preds = %5 + %13 = zext i32 %6 to i64 + %14 = inttoptr i64 %13 to ptr + %15 = tail call ptr @av_buffer_create(ptr noundef nonnull %8, i64 noundef %1, ptr noundef nonnull @free_shm_buffer, ptr noundef %14, i32 noundef 0) #10 + %.not = icmp eq ptr %15, null + br i1 %.not, label %16, label %18 -14: ; preds = %10 +14: ; preds = %12 %15 = tail call i32 @shmdt(ptr noundef nonnull %8) #10 br label %16 -16: ; preds = %10, %14, %5, %5, %2 - %.0 = phi ptr [ null, %2 ], [ null, %5 ], [ null, %5 ], [ null, %14 ], [ %13, %10 ] +16: ; preds = %12, %14, %5, %2 + %.0 = phi ptr [ null, %2 ], [ null, %5 ], [ null, %16 ], [ %15, %12 ] ret ptr %.0 } diff --git a/bench/folly/optimized/EpollBackend.ll b/bench/folly/optimized/EpollBackend.ll index 02e846c7534..f9317f93b2f 100644 --- a/bench/folly/optimized/EpollBackend.ll +++ b/bench/folly/optimized/EpollBackend.ll @@ -1945,47 +1945,48 @@ define void @_ZN5folly12EpollBackend13addTimerEventERNS_14EventBaseEventEPK7time %21 = getelementptr inbounds nuw i8, ptr %.0, i64 24 store i64 %20, ptr %21, align 8, !tbaa !44 %22 = load ptr, ptr %.0, align 8, !tbaa !92 + %.not = icmp eq ptr %22, inttoptr (i64 1 to ptr) %23 = getelementptr inbounds nuw i8, ptr %0, i64 96 - %magicptr = ptrtoint ptr %22 to i64 - switch i64 %magicptr, label %24 [ - i64 1, label %58 - i64 0, label %29 - ] + br i1 %.not, label %60, label %24 24: ; preds = %12 - %25 = getelementptr inbounds nuw i8, ptr %22, i64 8 - %26 = load ptr, ptr %25, align 8, !tbaa !94 - %27 = icmp eq ptr %26, %.0 - %28 = getelementptr inbounds nuw i8, ptr %22, i64 16 - %spec.select.i.i = select i1 %27, ptr %25, ptr %28 - br label %29 - -29: ; preds = %12, %24 - %.0.i.i = phi ptr [ %spec.select.i.i, %24 ], [ %23, %12 ] - %30 = getelementptr inbounds nuw i8, ptr %.0, i64 8 - %31 = load ptr, ptr %30, align 8, !tbaa !94 - %32 = getelementptr inbounds nuw i8, ptr %.0, i64 16 - %33 = load ptr, ptr %32, align 8, !tbaa !95 - %34 = icmp eq ptr %31, null - %35 = icmp eq ptr %33, null - %or.cond.i.i.i = or i1 %34, %35 - br i1 %or.cond.i.i.i, label %36, label %.preheader.i.i - -36: ; preds = %29 - %37 = select i1 %34, ptr %33, ptr %31 - store ptr %37, ptr %.0.i.i, align 8, !tbaa !96 - %.not38.i.i.i = icmp eq ptr %37, null - br i1 %.not38.i.i.i, label %_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE5eraseEPS2_.exit.i, label %38 - -38: ; preds = %36 - store ptr %22, ptr %37, align 8, !tbaa !92 + %25 = icmp eq ptr %22, null + br i1 %25, label %31, label %26 + +26: ; preds = %24 + %27 = getelementptr inbounds nuw i8, ptr %22, i64 8 + %28 = load ptr, ptr %27, align 8, !tbaa !94 + %29 = icmp eq ptr %28, %.0 + %30 = getelementptr inbounds nuw i8, ptr %22, i64 16 + %spec.select.i.i = select i1 %29, ptr %27, ptr %30 + br label %31 + +31: ; preds = %26, %24 + %.0.i.i = phi ptr [ %23, %24 ], [ %spec.select.i.i, %26 ] + %32 = getelementptr inbounds nuw i8, ptr %.0, i64 8 + %33 = load ptr, ptr %32, align 8, !tbaa !94 + %34 = getelementptr inbounds nuw i8, ptr %.0, i64 16 + %35 = load ptr, ptr %34, align 8, !tbaa !95 + %36 = icmp eq ptr %33, null + %37 = icmp eq ptr %35, null + %or.cond.i.i.i = or i1 %36, %37 + br i1 %or.cond.i.i.i, label %38, label %.preheader.i.i + +38: ; preds = %31 + %39 = select i1 %36, ptr %35, ptr %33 + store ptr %39, ptr %.0.i.i, align 8, !tbaa !96 + %.not38.i.i.i = icmp eq ptr %39, null + br i1 %.not38.i.i.i, label %_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE5eraseEPS2_.exit.i, label %40 + +40: ; preds = %38 + store ptr %22, ptr %39, align 8, !tbaa !92 br label %_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE5eraseEPS2_.exit.i -.preheader.i.i: ; preds = %29, %.preheader.i.i - %.032.i.i.i = phi ptr [ %43, %.preheader.i.i ], [ %33, %29 ] - %.030.i.i.i = phi ptr [ %.032..0.i.i.i, %.preheader.i.i ], [ %22, %29 ] - %.029.i.i.i = phi ptr [ %44, %.preheader.i.i ], [ %.0.i.i, %29 ] - %.0.i.i.i = phi ptr [ %.0..032.i.i.i, %.preheader.i.i ], [ %31, %29 ] +.preheader.i.i: ; preds = %31, %.preheader.i.i + %.032.i.i.i = phi ptr [ %43, %.preheader.i.i ], [ %35, %31 ] + %.030.i.i.i = phi ptr [ %.032..0.i.i.i, %.preheader.i.i ], [ %22, %31 ] + %.029.i.i.i = phi ptr [ %44, %.preheader.i.i ], [ %.0.i.i, %31 ] + %.0.i.i.i = phi ptr [ %.0..032.i.i.i, %.preheader.i.i ], [ %33, %31 ] %39 = getelementptr inbounds nuw i8, ptr %.0.i.i.i, i64 24 %40 = getelementptr inbounds nuw i8, ptr %.032.i.i.i, i64 24 %.sroa.0.0.copyload.i.i.i.i.i.i.i.i.i = load i64, ptr %40, align 8, !tbaa !44 @@ -2008,7 +2009,7 @@ define void @_ZN5folly12EpollBackend13addTimerEventERNS_14EventBaseEventEPK7time store ptr %.032..0.i.i.i, ptr %.0..032.i.i.i, align 8, !tbaa !92 br label %_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE5eraseEPS2_.exit.i -_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE5eraseEPS2_.exit.i: ; preds = %46, %38, %36 +_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE5eraseEPS2_.exit.i: ; preds = %46, %40, %38 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.0, i8 0, i64 24, i1 false) %47 = load ptr, ptr %23, align 8, !tbaa !107 %48 = icmp eq ptr %47, null @@ -2058,10 +2059,10 @@ _ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNode br label %_ZN5folly13IntrusiveHeapINS_12EpollBackend9TimerInfoESt4lessIvEvNS_17DerivedNodeTraitsIS2_vEEE6updateEPS2_.exit .preheader.i: ; preds = %58, %.preheader.i - %.032.i.i = phi ptr [ %66, %.preheader.i ], [ %59, %58 ] - %.030.i.i = phi ptr [ %.032..0.i.i, %.preheader.i ], [ null, %58 ] - %.029.i.i = phi ptr [ %67, %.preheader.i ], [ %23, %58 ] - %.0.i.i16 = phi ptr [ %.0..032.i.i, %.preheader.i ], [ %.0, %58 ] + %.032.i.i = phi ptr [ %66, %.preheader.i ], [ %59, %60 ] + %.030.i.i = phi ptr [ %.032..0.i.i, %.preheader.i ], [ null, %60 ] + %.029.i.i = phi ptr [ %67, %.preheader.i ], [ %23, %60 ] + %.0.i.i16 = phi ptr [ %.0..032.i.i, %.preheader.i ], [ %.0, %60 ] %62 = getelementptr inbounds nuw i8, ptr %.0.i.i16, i64 24 %63 = getelementptr inbounds nuw i8, ptr %.032.i.i, i64 24 %.sroa.0.0.copyload.i.i.i.i.i.i.i.i = load i64, ptr %63, align 8, !tbaa !44 diff --git a/bench/foundations-rs/optimized/7zdc97sa0ogd517y2re7ok0yw.ll b/bench/foundations-rs/optimized/7zdc97sa0ogd517y2re7ok0yw.ll index a1ee9af31f4..89b2010e91a 100644 --- a/bench/foundations-rs/optimized/7zdc97sa0ogd517y2re7ok0yw.ll +++ b/bench/foundations-rs/optimized/7zdc97sa0ogd517y2re7ok0yw.ll @@ -1891,13 +1891,12 @@ define hidden void @"_ZN4core3ptr107drop_in_place$LT$core..cell..RefMut$LT$std.. ; Function Attrs: nounwind nonlazybind uwtable define internal fastcc void @"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E"(ptr %.0.val) unnamed_addr #2 { - %magicptr = ptrtoint ptr %.0.val to i64 - switch i64 %magicptr, label %1 [ - i64 0, label %"_ZN4core3ptr79drop_in_place$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$17h3ead1c5db20779c1E.exit" - i64 -1, label %"_ZN4core3ptr79drop_in_place$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$17h3ead1c5db20779c1E.exit" - ] + %1 = icmp eq ptr %.0.val, null + %2 = icmp eq ptr %.0.val, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %1, %2 + br i1 %or.cond, label %"_ZN4core3ptr79drop_in_place$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$17h3ead1c5db20779c1E.exit", label %3 -"_ZN4core3ptr79drop_in_place$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$17h3ead1c5db20779c1E.exit": ; preds = %0, %0, %5, %1 +"_ZN4core3ptr79drop_in_place$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$17h3ead1c5db20779c1E.exit": ; preds = %7, %3, %0 ret void 1: ; preds = %0 @@ -35043,24 +35042,23 @@ define hidden void @"_ZN4core3ptr606drop_in_place$LT$tower..buffer..worker..Work "_ZN4core3ptr50drop_in_place$LT$tower..buffer..worker..Handle$GT$17hed95591838732301E.exit18": ; preds = %"_ZN4core3ptr83drop_in_place$LT$core..option..Option$LT$tower..buffer..error..ServiceError$GT$$GT$17h5709aea0b2e3159eE.exit15", %49 %53 = getelementptr inbounds nuw i8, ptr %0, i64 352 %.val = load ptr, ptr %53, align 8, !noundef !7 - %magicptr.i = ptrtoint ptr %.val to i64 - switch i64 %magicptr.i, label %54 [ - i64 0, label %"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit" - i64 -1, label %"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit" - ] - -54: ; preds = %"_ZN4core3ptr50drop_in_place$LT$tower..buffer..worker..Handle$GT$17hed95591838732301E.exit18" - %55 = getelementptr inbounds nuw i8, ptr %.val, i64 8 - %56 = atomicrmw sub ptr %55, i64 1 release, align 8, !noalias !7176 - %57 = icmp eq i64 %56, 1 - br i1 %57, label %58, label %"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit" + %54 = icmp eq ptr %.val, null + %55 = icmp eq ptr %.val, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %54, %55 + br i1 %or.cond.i, label %"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit", label %56 + +56: ; preds = %"_ZN4core3ptr50drop_in_place$LT$tower..buffer..worker..Handle$GT$17hed95591838732301E.exit18" + %57 = getelementptr inbounds nuw i8, ptr %.val, i64 8 + %58 = atomicrmw sub ptr %57, i64 1 release, align 8, !noalias !7176 + %59 = icmp eq i64 %58, 1 + br i1 %59, label %60, label %"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit" -58: ; preds = %54 +58: ; preds = %56 fence acquire tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef 56, i64 noundef 8) #26, !noalias !7176 br label %"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit" -"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit": ; preds = %"_ZN4core3ptr50drop_in_place$LT$tower..buffer..worker..Handle$GT$17hed95591838732301E.exit18", %"_ZN4core3ptr50drop_in_place$LT$tower..buffer..worker..Handle$GT$17hed95591838732301E.exit18", %54, %58 +"_ZN4core3ptr107drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$tokio..sync..semaphore..Semaphore$GT$$GT$$GT$17h6fc9d85a4c5832d0E.exit": ; preds = %"_ZN4core3ptr50drop_in_place$LT$tower..buffer..worker..Handle$GT$17hed95591838732301E.exit18", %56, %58 ret void 59: ; preds = %42, %27, %7, %16, %"_ZN4core3ptr887drop_in_place$LT$core..option..Option$LT$tower..buffer..message..Message$LT$http..request..Request$LT$http_body..combinators..box_body..UnsyncBoxBody$LT$bytes..bytes..Bytes$C$tonic..status..Status$GT$$GT$$C$tower..util..either..Either$LT$core..pin..Pin$LT$alloc..boxed..Box$LT$dyn$u20$core..future..future..Future$u2b$Output$u20$$u3d$$u20$core..result..Result$LT$http..response..Response$LT$hyper..body..body..Body$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..error..Error$u2b$core..marker..Sync$u2b$core..marker..Send$GT$$GT$$u2b$core..marker..Send$GT$$GT$$C$core..pin..Pin$LT$alloc..boxed..Box$LT$dyn$u20$core..future..future..Future$u2b$Output$u20$$u3d$$u20$core..result..Result$LT$http..response..Response$LT$hyper..body..body..Body$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..error..Error$u2b$core..marker..Sync$u2b$core..marker..Send$GT$$GT$$u2b$core..marker..Send$GT$$GT$$GT$$GT$$GT$$GT$17h06594319e14ef145E.exit" diff --git a/bench/freetype/optimized/ftbase.ll b/bench/freetype/optimized/ftbase.ll index f37fc8b0eb3..2923316ff74 100644 --- a/bench/freetype/optimized/ftbase.ll +++ b/bench/freetype/optimized/ftbase.ll @@ -10330,52 +10330,48 @@ define i32 @FT_Get_Name_Index(ptr noundef %0, ptr noundef %1) local_unnamed_addr %11 = load ptr, ptr %10, align 8, !tbaa !82 %12 = getelementptr inbounds nuw i8, ptr %11, i64 80 %13 = load ptr, ptr %12, align 8, !tbaa !412 - %magicptr = ptrtoint ptr %13 to i64 - switch i64 %magicptr, label %.fold.split [ - i64 -2, label %.thread - i64 0, label %14 - ] + %14 = icmp eq ptr %13, inttoptr (i64 -2 to ptr) + br i1 %14, label %.thread, label %15 14: ; preds = %9 - %15 = getelementptr inbounds nuw i8, ptr %0, i64 176 - %16 = load ptr, ptr %15, align 8, !tbaa !25 - %17 = load ptr, ptr %16, align 8, !tbaa !88 - %18 = getelementptr inbounds nuw i8, ptr %17, i64 64 - %19 = load ptr, ptr %18, align 8, !tbaa !90 - %.not28 = icmp eq ptr %19, null - br i1 %.not28, label %22, label %20 + %16 = icmp eq ptr %13, null + br i1 %16, label %17, label %.thread34 20: ; preds = %14 - %21 = tail call ptr %19(ptr noundef nonnull %16, ptr noundef nonnull @.str.4) #34 - %.pre = load ptr, ptr %10, align 8, !tbaa !82 - br label %22 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 176 + %.pre = load ptr, ptr %18, align 8, !tbaa !25 + %20 = load ptr, ptr %19, align 8, !tbaa !88 + %21 = getelementptr inbounds nuw i8, ptr %20, i64 64 + %22 = load ptr, ptr %21, align 8, !tbaa !90 + %.not28 = icmp eq ptr %22, null + br i1 %.not28, label %.thread38, label %23 -22: ; preds = %20, %14 - %23 = phi ptr [ %.pre, %20 ], [ %11, %14 ] - %.0 = phi ptr [ %21, %20 ], [ null, %14 ] - %.not29 = icmp eq ptr %.0, null - %24 = select i1 %.not29, ptr inttoptr (i64 -2 to ptr), ptr %.0 - %25 = getelementptr inbounds nuw i8, ptr %23, i64 80 - store ptr %24, ptr %25, align 8, !tbaa !412 - br label %.fold.split - -.fold.split: ; preds = %9, %22 - %.022 = phi ptr [ %.0, %22 ], [ %13, %9 ] - %.not30 = icmp eq ptr %.022, null - br i1 %.not30, label %.thread, label %26 - -26: ; preds = %.fold.split - %27 = getelementptr inbounds nuw i8, ptr %.022, i64 8 - %28 = load ptr, ptr %27, align 8, !tbaa !413 - %.not31 = icmp eq ptr %28, null - br i1 %.not31, label %.thread, label %29 +22: ; preds = %20 + store ptr inttoptr (i64 -2 to ptr), ptr %12, align 8, !tbaa !412 + br label %.thread -29: ; preds = %26 - %30 = tail call i32 %28(ptr noundef nonnull %0, ptr noundef nonnull %1) #34 +29: ; preds = %20 + %30 = tail call ptr %22(ptr noundef nonnull %19, ptr noundef nonnull @.str.4) #34 + %.not29 = icmp eq ptr %24, null + %25 = select i1 %.not29, ptr inttoptr (i64 -2 to ptr), ptr %24 + %26 = load ptr, ptr %10, align 8, !tbaa !82 + %27 = getelementptr inbounds nuw i8, ptr %26, i64 80 + store ptr %25, ptr %27, align 8, !tbaa !412 + br i1 %.not29, label %.thread, label %.thread34 + +.thread34: ; preds = %15, %23 + %.02237 = phi ptr [ %24, %23 ], [ %13, %15 ] + %28 = getelementptr inbounds nuw i8, ptr %.02237, i64 8 + %29 = load ptr, ptr %28, align 8, !tbaa !413 + %.not31 = icmp eq ptr %29, null + br i1 %.not31, label %.thread, label %30 + +30: ; preds = %.thread34 + %31 = tail call i32 %29(ptr noundef nonnull %0, ptr noundef nonnull %1) #34 br label %.thread -.thread: ; preds = %9, %.fold.split, %26, %29, %3, %2 - %.021 = phi i32 [ 0, %3 ], [ 0, %2 ], [ %30, %29 ], [ 0, %26 ], [ 0, %.fold.split ], [ 0, %9 ] +.thread: ; preds = %9, %22, %23, %.thread34, %30, %3, %2 + %.021 = phi i32 [ 0, %3 ], [ 0, %2 ], [ %31, %30 ], [ 0, %.thread34 ], [ 0, %23 ], [ 0, %.thread38 ], [ 0, %9 ] ret i32 %.021 } @@ -10410,51 +10406,47 @@ define i32 @FT_Get_Glyph_Name(ptr noundef %0, i32 noundef %1, ptr noundef %2, i3 %18 = load ptr, ptr %17, align 8, !tbaa !82 %19 = getelementptr inbounds nuw i8, ptr %18, i64 80 %20 = load ptr, ptr %19, align 8, !tbaa !412 - %magicptr = ptrtoint ptr %20 to i64 - switch i64 %magicptr, label %.fold.split [ - i64 -2, label %.thread - i64 0, label %21 - ] + %21 = icmp eq ptr %20, inttoptr (i64 -2 to ptr) + br i1 %21, label %.thread, label %22 21: ; preds = %16 - %22 = getelementptr inbounds nuw i8, ptr %0, i64 176 - %23 = load ptr, ptr %22, align 8, !tbaa !25 - %24 = load ptr, ptr %23, align 8, !tbaa !88 - %25 = getelementptr inbounds nuw i8, ptr %24, i64 64 - %26 = load ptr, ptr %25, align 8, !tbaa !90 - %.not39 = icmp eq ptr %26, null - br i1 %.not39, label %29, label %27 + %23 = icmp eq ptr %20, null + br i1 %23, label %24, label %.thread45 27: ; preds = %21 - %28 = tail call ptr %26(ptr noundef nonnull %23, ptr noundef nonnull @.str.4) #34 - %.pre = load ptr, ptr %17, align 8, !tbaa !82 - br label %29 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 176 + %.pre = load ptr, ptr %25, align 8, !tbaa !25 + %27 = load ptr, ptr %26, align 8, !tbaa !88 + %28 = getelementptr inbounds nuw i8, ptr %27, i64 64 + %29 = load ptr, ptr %28, align 8, !tbaa !90 + %.not39 = icmp eq ptr %29, null + br i1 %.not39, label %.thread49, label %30 -29: ; preds = %27, %21 - %30 = phi ptr [ %.pre, %27 ], [ %18, %21 ] - %.0 = phi ptr [ %28, %27 ], [ null, %21 ] - %.not40 = icmp eq ptr %.0, null - %31 = select i1 %.not40, ptr inttoptr (i64 -2 to ptr), ptr %.0 - %32 = getelementptr inbounds nuw i8, ptr %30, i64 80 - store ptr %31, ptr %32, align 8, !tbaa !412 - br label %.fold.split - -.fold.split: ; preds = %16, %29 - %.029 = phi ptr [ %.0, %29 ], [ %20, %16 ] - %.not41 = icmp eq ptr %.029, null - br i1 %.not41, label %.thread, label %33 - -33: ; preds = %.fold.split - %34 = load ptr, ptr %.029, align 8, !tbaa !415 - %.not42 = icmp eq ptr %34, null - br i1 %.not42, label %.thread, label %35 +29: ; preds = %27 + store ptr inttoptr (i64 -2 to ptr), ptr %.pre, align 8, !tbaa !412 + br label %.thread -35: ; preds = %33 - %36 = tail call i32 %34(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %3) #34 +35: ; preds = %30 + %36 = tail call ptr %29(ptr noundef nonnull %26, ptr noundef nonnull @.str.4) #34 + %.not40 = icmp eq ptr %31, null + %32 = select i1 %.not40, ptr inttoptr (i64 -2 to ptr), ptr %31 + %33 = load ptr, ptr %17, align 8, !tbaa !82 + %34 = getelementptr inbounds nuw i8, ptr %33, i64 80 + store ptr %32, ptr %34, align 8, !tbaa !412 + br i1 %.not40, label %.thread, label %.thread45 + +.thread45: ; preds = %22, %30 + %.02948 = phi ptr [ %31, %30 ], [ %20, %22 ] + %35 = load ptr, ptr %.02948, align 8, !tbaa !415 + %.not42 = icmp eq ptr %35, null + br i1 %.not42, label %.thread, label %36 + +36: ; preds = %.thread45 + %37 = tail call i32 %35(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %3) #34 br label %.thread -.thread: ; preds = %16, %35, %33, %.fold.split, %12, %8, %5, %4 - %.028 = phi i32 [ 35, %4 ], [ 6, %5 ], [ 16, %8 ], [ 6, %12 ], [ %36, %35 ], [ 6, %33 ], [ 6, %.fold.split ], [ 6, %16 ] +.thread: ; preds = %16, %29, %36, %.thread45, %30, %12, %8, %5, %4 + %.028 = phi i32 [ 35, %4 ], [ 6, %5 ], [ 16, %8 ], [ 6, %12 ], [ %37, %36 ], [ 6, %.thread45 ], [ 6, %30 ], [ 6, %.thread49 ], [ 6, %16 ] ret i32 %.028 } @@ -10468,51 +10460,47 @@ define ptr @FT_Get_Postscript_Name(ptr noundef %0) local_unnamed_addr #0 { %5 = load ptr, ptr %4, align 8, !tbaa !82 %6 = getelementptr inbounds nuw i8, ptr %5, i64 56 %7 = load ptr, ptr %6, align 8, !tbaa !416 - %magicptr = ptrtoint ptr %7 to i64 - switch i64 %magicptr, label %.fold.split [ - i64 -2, label %.thread - i64 0, label %8 - ] + %8 = icmp eq ptr %7, inttoptr (i64 -2 to ptr) + br i1 %8, label %.thread, label %9 8: ; preds = %3 - %9 = getelementptr inbounds nuw i8, ptr %0, i64 176 - %10 = load ptr, ptr %9, align 8, !tbaa !25 - %11 = load ptr, ptr %10, align 8, !tbaa !88 - %12 = getelementptr inbounds nuw i8, ptr %11, i64 64 - %13 = load ptr, ptr %12, align 8, !tbaa !90 - %.not = icmp eq ptr %13, null - br i1 %.not, label %16, label %14 - -14: ; preds = %8 - %15 = tail call ptr %13(ptr noundef nonnull %10, ptr noundef nonnull @.str.5) #34 - %.pre = load ptr, ptr %4, align 8, !tbaa !82 - br label %16 + %10 = icmp eq ptr %7, null + br i1 %10, label %11, label %.thread31 + +16: ; preds = %8 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 176 + %13 = load ptr, ptr %12, align 8, !tbaa !25 + %14 = load ptr, ptr %13, align 8, !tbaa !88 + %15 = getelementptr inbounds nuw i8, ptr %14, i64 64 + %16 = load ptr, ptr %15, align 8, !tbaa !90 + %.not = icmp eq ptr %16, null + br i1 %.not, label %.fold.split, label %17 + +.fold.split: ; preds = %16 + store ptr inttoptr (i64 -2 to ptr), ptr %6, align 8, !tbaa !416 + br label %.thread -16: ; preds = %14, %8 - %17 = phi ptr [ %.pre, %14 ], [ %5, %8 ] - %.0 = phi ptr [ %15, %14 ], [ null, %8 ] - %.not26 = icmp eq ptr %.0, null - %18 = select i1 %.not26, ptr inttoptr (i64 -2 to ptr), ptr %.0 - %19 = getelementptr inbounds nuw i8, ptr %17, i64 56 - store ptr %18, ptr %19, align 8, !tbaa !416 - br label %.fold.split - -.fold.split: ; preds = %3, %16 - %.021 = phi ptr [ %.0, %16 ], [ %7, %3 ] - %.not27 = icmp eq ptr %.021, null - br i1 %.not27, label %.thread, label %20 - -20: ; preds = %.fold.split - %21 = load ptr, ptr %.021, align 8, !tbaa !417 - %.not28 = icmp eq ptr %21, null - br i1 %.not28, label %.thread, label %22 +22: ; preds = %11 + %23 = tail call ptr %16(ptr noundef nonnull %13, ptr noundef nonnull @.str.5) #34 + %.not26 = icmp eq ptr %18, null + %19 = select i1 %.not26, ptr inttoptr (i64 -2 to ptr), ptr %18 + %20 = load ptr, ptr %4, align 8, !tbaa !82 + %21 = getelementptr inbounds nuw i8, ptr %20, i64 56 + store ptr %19, ptr %21, align 8, !tbaa !416 + br i1 %.not26, label %.thread, label %.thread31 + +.thread31: ; preds = %9, %17 + %.02134 = phi ptr [ %18, %17 ], [ %7, %9 ] + %22 = load ptr, ptr %.02134, align 8, !tbaa !417 + %.not28 = icmp eq ptr %22, null + br i1 %.not28, label %.thread, label %23 -22: ; preds = %20 - %23 = tail call ptr %21(ptr noundef nonnull %0) #34 +23: ; preds = %.thread31 + %24 = tail call ptr %22(ptr noundef nonnull %0) #34 br label %.thread -.thread: ; preds = %3, %.fold.split, %20, %22, %1 - %.020 = phi ptr [ null, %1 ], [ %23, %22 ], [ null, %20 ], [ null, %.fold.split ], [ null, %3 ] +.thread: ; preds = %3, %.fold.split, %20, %.thread31, %23, %1 + %.020 = phi ptr [ null, %1 ], [ %24, %23 ], [ null, %.thread31 ], [ null, %17 ], [ null, %.thread35 ], [ null, %3 ] ret ptr %.020 } diff --git a/bench/git/optimized/mv.ll b/bench/git/optimized/mv.ll index e9121957b1e..856f48d7d5b 100644 --- a/bench/git/optimized/mv.ll +++ b/bench/git/optimized/mv.ll @@ -662,15 +662,17 @@ submodule_gitfile_path.exit: ; preds = %298 %302 = load ptr, ptr %157, align 8, !tbaa !63 %303 = call ptr @read_gitfile_gently(ptr noundef %302, ptr noundef null) #12 call void @strbuf_release(ptr noundef nonnull %7) #12 + %.not6.i = icmp eq ptr %303, null call void @llvm.lifetime.end.p0(ptr nonnull %7) - %switch = icmp ult ptr %303, inttoptr (i64 2 to ptr) - br i1 %switch, label %306, label %304 + %switch = icmp eq ptr %303, inttoptr (i64 1 to ptr) + %.not312 = or i1 %.not6.i, %switch + br i1 %.not312, label %306, label %304 304: ; preds = %submodule_gitfile_path.exit %305 = call ptr @strvec_push(ptr noundef nonnull %17, ptr noundef nonnull %303) #12 br label %306 -306: ; preds = %submodule_gitfile_path.exit, %304 +306: ; preds = %304, %submodule_gitfile_path.exit %.0246 = phi ptr [ %305, %304 ], [ inttoptr (i64 1 to ptr), %submodule_gitfile_path.exit ] %307 = getelementptr inbounds ptr, ptr %.0222481, i64 %160 store ptr %.0246, ptr %307, align 8, !tbaa !23 diff --git a/bench/graphviz/optimized/gvplugin.ll b/bench/graphviz/optimized/gvplugin.ll index 7a32194b3b2..555297ad4b5 100644 --- a/bench/graphviz/optimized/gvplugin.ll +++ b/bench/graphviz/optimized/gvplugin.ll @@ -1145,14 +1145,12 @@ strview.exit: ; preds = %6, %10 %15 = load ptr, ptr %14, align 8, !tbaa !10 %16 = getelementptr inbounds nuw i8, ptr %2, i64 %.sroa.3.0.i.fr %17 = load i8, ptr %16, align 1, !tbaa !42 - %18 = icmp eq i8 %17, 58 - br i1 %18, label %.preheader, label %.critedge.preheader + %18 = icmp ne i8 %17, 58 + %.not4569 = icmp eq ptr %15, null + %or.cond87 = select i1 %18, i1 true, i1 %.not4569 + br i1 %or.cond87, label %.critedge.preheader, label %.lr.ph72 .preheader: ; preds = %strview.exit - %cond = icmp eq ptr %15, null - br i1 %cond, label %agxbuse.exit, label %.lr.ph72 - -.lr.ph72: ; preds = %.preheader %19 = icmp eq i64 %.sroa.3.0.i.fr, 0 br i1 %19, label %.lr.ph72.split.us, label %.lr.ph72.split @@ -1308,8 +1306,7 @@ strview_case_eq.exit.thread: ; preds = %.critedge84, %strvi br i1 %.142.lcssa, label %.critedge.preheader, label %.thread .critedge.preheader: ; preds = %._crit_edge73, %strview.exit - %.not4675 = icmp eq ptr %15, null - br i1 %.not4675, label %agxbuse.exit, label %.lr.ph80.outer + br i1 %.not4569, label %agxbuse.exit, label %.lr.ph80.outer .lr.ph80.outer: ; preds = %.critedge.preheader, %.critedge.thread %.179.ph = phi ptr [ %103, %.critedge.thread ], [ %15, %.critedge.preheader ] @@ -1431,8 +1428,8 @@ agxbclear.exit.thread.i: ; preds = %agxbputc.exit.i, %. %122 = load ptr, ptr @gvplugin_list.xb, align 8, !tbaa !42 br label %agxbuse.exit -agxbuse.exit: ; preds = %.preheader, %.critedge.preheader, %121, %agxbclear.exit.thread.i, %.critedge._crit_edge, %3 - %.0 = phi ptr [ null, %3 ], [ @.str.18, %.critedge._crit_edge ], [ %122, %121 ], [ @gvplugin_list.xb, %agxbclear.exit.thread.i ], [ @.str.18, %.critedge.preheader ], [ @.str.18, %.preheader ] +agxbuse.exit: ; preds = %.critedge.preheader, %121, %agxbclear.exit.thread.i, %.critedge._crit_edge, %3 + %.0 = phi ptr [ null, %3 ], [ @.str.18, %.critedge._crit_edge ], [ %122, %121 ], [ @gvplugin_list.xb, %agxbclear.exit.thread.i ], [ @.str.18, %.critedge.preheader ] ret ptr %.0 } diff --git a/bench/hermes/optimized/CodeMotion.ll b/bench/hermes/optimized/CodeMotion.ll index 79a23a40ef2..a0615bc9e36 100644 --- a/bench/hermes/optimized/CodeMotion.ll +++ b/bench/hermes/optimized/CodeMotion.ll @@ -650,13 +650,12 @@ for.body.preheader.i.i.i.i: ; preds = %_ZN6hermes12LoopAna br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %if.end13.i.i.i.i38, %for.body.preheader.i.i.i.i - %P.08.i.i.i.i = phi ptr [ %incdec.ptr.i.i.i.i, %if.end13.i.i.i.i38 ], [ %.pre1.i.i.i, %for.body.preheader.i.i.i.i ] + %P.08.i.i.i.i = phi ptr [ %incdec.ptr.i.i.i.i, %if.end13.i.i.i.i40 ], [ %.pre1.i.i.i, %for.body.preheader.i.i.i.i ] %85 = load ptr, ptr %P.08.i.i.i.i, align 8 - %magicptr.i.i.i.i = ptrtoint ptr %85 to i64 - switch i64 %magicptr.i.i.i.i, label %if.then11.i.i.i.i [ - i64 -8, label %if.end13.i.i.i.i38 - i64 -16, label %if.end13.i.i.i.i38 - ] + %cmp.i.i.i.i.i38 = icmp eq ptr %85, inttoptr (i64 -8 to ptr) + %cmp.i6.i.i.i.i = icmp eq ptr %85, inttoptr (i64 -16 to ptr) + %or.cond.i.i.i.i = or i1 %cmp.i.i.i.i.i38, %cmp.i6.i.i.i.i + br i1 %or.cond.i.i.i.i, label %if.end13.i.i.i.i38, label %if.then11.i.i.i.i if.then11.i.i.i.i: ; preds = %for.body.i.i.i.i %second.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %P.08.i.i.i.i, i64 8 @@ -682,7 +681,7 @@ _ZNSt10unique_ptrIN4llvh15DomTreeNodeBaseIN6hermes10BasicBlockEEESt14default_del store ptr null, ptr %second.i.i.i.i.i, align 8 br label %if.end13.i.i.i.i38 -if.end13.i.i.i.i38: ; preds = %_ZNSt10unique_ptrIN4llvh15DomTreeNodeBaseIN6hermes10BasicBlockEEESt14default_deleteIS4_EED2Ev.exit.i.i.i.i, %for.body.i.i.i.i, %for.body.i.i.i.i +if.end13.i.i.i.i38: ; preds = %_ZNSt10unique_ptrIN4llvh15DomTreeNodeBaseIN6hermes10BasicBlockEEESt14default_deleteIS4_EED2Ev.exit.i.i.i.i, %for.body.i.i.i.i %incdec.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %P.08.i.i.i.i, i64 16 %cmp6.not.i.i.i.i = icmp eq ptr %incdec.ptr.i.i.i.i, %add.ptr.i.i.i.i.i br i1 %cmp6.not.i.i.i.i, label %_ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes10BasicBlockESt10unique_ptrINS_15DomTreeNodeBaseIS3_EESt14default_deleteIS7_EENS_12DenseMapInfoIS4_EENS_6detail12DenseMapPairIS4_SA_EEEES4_SA_SC_SF_E10destroyAllEv.exit.loopexit.i.i.i, label %for.body.i.i.i.i, !llvm.loop !14 diff --git a/bench/hermes/optimized/GCBase.ll b/bench/hermes/optimized/GCBase.ll index 578483cd3c2..fa5abb06ea2 100644 --- a/bench/hermes/optimized/GCBase.ll +++ b/bench/hermes/optimized/GCBase.ll @@ -1570,10 +1570,12 @@ for.inc: ; preds = %_ZNSt6vectorIPN6her br i1 %cmp.not15.i3.i.i.i, label %_ZN6hermes2vm17JSWeakMapImplBase11KeyIteratorppEi.exit, label %land.rhs.i4.i.i.i land.rhs.i4.i.i.i: ; preds = %for.inc, %while.body.i6.i.i.i - %iter.sroa.0.1 = phi ptr [ %incdec.ptr.i.i.i.i, %while.body.i6.i.i.i ], [ %incdec.ptr3.i.i.i, %for.inc ] + %iter.sroa.0.1 = phi ptr [ %incdec.ptr.i.i.i.i, %while.body.i8.i.i.i ], [ %incdec.ptr3.i.i.i, %for.inc ] %7 = load ptr, ptr %iter.sroa.0.1, align 8 - %switch.i5.i.i.i = icmp ult ptr %7, inttoptr (i64 2 to ptr) - br i1 %switch.i5.i.i.i, label %while.body.i6.i.i.i, label %_ZN6hermes2vm17JSWeakMapImplBase11KeyIteratorppEi.exit + %switch.i5.i.i.i = icmp eq ptr %7, null + %cmp.i1.i6.i.i.i = icmp eq ptr %7, inttoptr (i64 1 to ptr) + %or.cond.i7.i.i.i = or i1 %cmp.i.i5.i.i.i, %cmp.i1.i6.i.i.i + br i1 %or.cond.i7.i.i.i, label %while.body.i8.i.i.i, label %_ZN6hermes2vm17JSWeakMapImplBase11KeyIteratorppEi.exit while.body.i6.i.i.i: ; preds = %land.rhs.i4.i.i.i %incdec.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %iter.sroa.0.1, i64 24 @@ -1581,7 +1583,7 @@ while.body.i6.i.i.i: ; preds = %land.rhs.i4.i.i.i br i1 %cmp.not.i7.i.i.i, label %_ZN6hermes2vm17JSWeakMapImplBase11KeyIteratorppEi.exit, label %land.rhs.i4.i.i.i, !llvm.loop !23 _ZN6hermes2vm17JSWeakMapImplBase11KeyIteratorppEi.exit: ; preds = %land.rhs.i4.i.i.i, %while.body.i6.i.i.i, %for.inc - %iter.sroa.0.2 = phi ptr [ %incdec.ptr3.i.i.i, %for.inc ], [ %iter.sroa.0.1, %land.rhs.i4.i.i.i ], [ %incdec.ptr.i.i.i.i, %while.body.i6.i.i.i ] + %iter.sroa.0.2 = phi ptr [ %incdec.ptr3.i.i.i, %for.inc ], [ %iter.sroa.0.1, %land.rhs.i4.i.i.i ], [ %incdec.ptr.i.i.i.i, %while.body.i8.i.i.i ] %cmp.i.i.i.not = icmp eq ptr %iter.sroa.0.2, %2 br i1 %cmp.i.i.i.not, label %nrvo.skipdtor, label %for.body, !llvm.loop !24 @@ -7120,18 +7122,18 @@ _ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12Dense for.body.i5: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12DenseMapPairIS3_jEEEES3_jS5_S8_E9initEmptyEv.exit.i, %if.end.i6 %B.020.i = phi ptr [ %incdec.ptr.i7, %if.end.i6 ], [ %1, %_ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12DenseMapPairIS3_jEEEES3_jS5_S8_E9initEmptyEv.exit.i ] %5 = load ptr, ptr %B.020.i, align 8 - %magicptr.i = ptrtoint ptr %5 to i64 - switch i64 %magicptr.i, label %if.then.i [ - i64 -4, label %if.end.i6 - i64 -8, label %if.end.i6 - ] + %cmp.i.i = icmp eq ptr %5, inttoptr (i64 -4 to ptr) + %cmp.i9.i = icmp eq ptr %5, inttoptr (i64 -8 to ptr) + %or.cond.i = or i1 %cmp.i.i, %cmp.i9.i + br i1 %or.cond.i, label %if.end.i6, label %if.then.i if.then.i: ; preds = %for.body.i5 %6 = load ptr, ptr %this, align 8 %7 = load i32, ptr %NumBuckets, align 8 %cmp.i.i.i = icmp ne i32 %7, 0 tail call void @llvm.assume(i1 %cmp.i.i.i) - %conv.i.i.i.i.i = trunc i64 %magicptr.i to i32 + %8 = ptrtoint ptr %5 to i64 + %conv.i.i.i.i.i = trunc i64 %8 to i32 %shr.i.i.i.i.i = lshr i32 %conv.i.i.i.i.i, 4 %shr2.i.i.i.i.i = lshr i32 %conv.i.i.i.i.i, 9 %xor.i.i.i.i.i = xor i32 %shr.i.i.i.i.i, %shr2.i.i.i.i.i @@ -7183,7 +7185,7 @@ _ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12Dense store i32 %add.i.i, ptr %NumEntries.i.i.i.i, align 8 br label %if.end.i6 -if.end.i6: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12DenseMapPairIS3_jEEEES3_jS5_S8_E15LookupBucketForIS3_EEbRKT_RPS8_.exit.i, %for.body.i5, %for.body.i5 +if.end.i6: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12DenseMapPairIS3_jEEEES3_jS5_S8_E15LookupBucketForIS3_EEbRKT_RPS8_.exit.i, %for.body.i5 %incdec.ptr.i7 = getelementptr inbounds nuw i8, ptr %B.020.i, i64 16 %cmp.not.i8 = icmp eq ptr %incdec.ptr.i7, %add.ptr br i1 %cmp.not.i8, label %_ZN4llvh12DenseMapBaseINS_8DenseMapIPKvjNS_12DenseMapInfoIS3_EENS_6detail12DenseMapPairIS3_jEEEES3_jS5_S8_E18moveFromOldBucketsEPS8_SB_.exit, label %for.body.i5, !llvm.loop !105 diff --git a/bench/hermes/optimized/InstSimplify.ll b/bench/hermes/optimized/InstSimplify.ll index 71397fc72a2..965a6bc9904 100644 --- a/bench/hermes/optimized/InstSimplify.ll +++ b/bench/hermes/optimized/InstSimplify.ll @@ -1038,23 +1038,22 @@ if.end8.i.i.i.i.i: ; preds = %for.end.i.i.i %cmp.not3.i3.i7.i5.i.i.i.i.i = icmp eq i32 %122, 0 br i1 %cmp.not3.i3.i7.i5.i.i.i.i.i, label %_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i, label %land.rhs.i4.i9.i6.i.i.i.i.i -land.rhs.i4.i9.i6.i.i.i.i.i: ; preds = %if.end8.i.i.i.i.i, %while.body.i6.i12.i9.i.i.i.i.i - %retval.sroa.0.3.i7.i.i.i.i.i = phi ptr [ %incdec.ptr.i.i13.i10.i.i.i.i.i, %while.body.i6.i12.i9.i.i.i.i.i ], [ %.pre18.i.i, %if.end8.i.i.i.i.i ] +land.rhs.i4.i9.i6.i.i.i.i.i: ; preds = %if.end8.i.i.i.i.i, %while.body.i8.i14.i14.i.i.i.i.i + %retval.sroa.0.3.i7.i.i.i.i.i = phi ptr [ %incdec.ptr.i.i15.i15.i.i.i.i.i, %while.body.i8.i14.i14.i.i.i.i.i ], [ %.pre18.i.i, %if.end8.i.i.i.i.i ] %123 = load ptr, ptr %retval.sroa.0.3.i7.i.i.i.i.i, align 8 - %magicptr.i5.i11.i8.i.i.i.i.i = ptrtoint ptr %123 to i64 - switch i64 %magicptr.i5.i11.i8.i.i.i.i.i, label %_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i [ - i64 -8, label %while.body.i6.i12.i9.i.i.i.i.i - i64 -16, label %while.body.i6.i12.i9.i.i.i.i.i - ] - -while.body.i6.i12.i9.i.i.i.i.i: ; preds = %land.rhs.i4.i9.i6.i.i.i.i.i, %land.rhs.i4.i9.i6.i.i.i.i.i - %incdec.ptr.i.i13.i10.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %retval.sroa.0.3.i7.i.i.i.i.i, i64 8 - %cmp.not.i7.i14.i11.i.i.i.i.i = icmp eq ptr %incdec.ptr.i.i13.i10.i.i.i.i.i, %add.ptr.i4.i.i10.i.i.i - br i1 %cmp.not.i7.i14.i11.i.i.i.i.i, label %_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i, label %land.rhs.i4.i9.i6.i.i.i.i.i, !llvm.loop !25 - -_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i: ; preds = %while.body.i6.i12.i9.i.i.i.i.i, %land.rhs.i4.i9.i6.i.i.i.i.i, %if.end8.i.i.i.i.i - %add.ptr.i.i.pn16.i.i.i.i.i = phi ptr [ %.pre18.i.i, %if.end8.i.i.i.i.i ], [ %add.ptr.i4.i.i10.i.i.i, %while.body.i6.i12.i9.i.i.i.i.i ], [ %retval.sroa.0.3.i7.i.i.i.i.i, %land.rhs.i4.i9.i6.i.i.i.i.i ] - %124 = load ptr, ptr %add.ptr.i.i.pn16.i.i.i.i.i, align 8 + %cmp.i.i5.i11.i8.i.i.i.i.i = icmp eq ptr %123, inttoptr (i64 -8 to ptr) + %cmp.i1.i6.i12.i9.i.i.i.i.i = icmp eq ptr %123, inttoptr (i64 -16 to ptr) + %or.cond.i7.i13.i10.i.i.i.i.i = or i1 %cmp.i.i5.i11.i8.i.i.i.i.i, %cmp.i1.i6.i12.i9.i.i.i.i.i + br i1 %or.cond.i7.i13.i10.i.i.i.i.i, label %while.body.i8.i14.i14.i.i.i.i.i, label %_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i + +while.body.i8.i14.i14.i.i.i.i.i: ; preds = %land.rhs.i4.i9.i6.i.i.i.i.i + %incdec.ptr.i.i15.i15.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %retval.sroa.0.3.i7.i.i.i.i.i, i64 8 + %cmp.not.i9.i16.i16.i.i.i.i.i = icmp eq ptr %incdec.ptr.i.i15.i15.i.i.i.i.i, %add.ptr.i4.i.i10.i.i.i + br i1 %cmp.not.i9.i16.i16.i.i.i.i.i, label %_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i, label %land.rhs.i4.i9.i6.i.i.i.i.i, !llvm.loop !25 + +_ZN4llvh6detail12DenseSetImplIPN6hermes5ValueENS_8DenseMapIS4_NS0_13DenseSetEmptyENS_12DenseMapInfoIS4_EENS0_12DenseSetPairIS4_EEEES8_E5beginEv.exit.i.i.i: ; preds = %while.body.i8.i14.i14.i.i.i.i.i, %land.rhs.i4.i9.i6.i.i.i.i.i, %if.end8.i.i.i.i.i + %add.ptr.i.i.pn18.i.i.i.i.i = phi ptr [ %.pre18.i.i, %if.end8.i.i.i.i.i ], [ %retval.sroa.0.3.i7.i.i.i.i.i, %land.rhs.i4.i9.i6.i.i.i.i.i ], [ %add.ptr.i4.i.i10.i.i.i, %while.body.i8.i14.i14.i.i.i.i.i ] + %124 = load ptr, ptr %add.ptr.i.i.pn18.i.i.i.i.i, align 8 %125 = load i8, ptr %124, align 8 %126 = add i8 %125, -109 %127 = icmp ult i8 %126, 11 @@ -1410,18 +1409,18 @@ _ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS for.body.i5: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS_12DenseMapInfoIS4_EENS5_12DenseSetPairIS4_EEEES4_S6_S8_SA_E9initEmptyEv.exit.i, %if.end.i6 %B.018.i = phi ptr [ %incdec.ptr.i7, %if.end.i6 ], [ %1, %_ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS_12DenseMapInfoIS4_EENS5_12DenseSetPairIS4_EEEES4_S6_S8_SA_E9initEmptyEv.exit.i ] %5 = load ptr, ptr %B.018.i, align 8 - %magicptr.i = ptrtoint ptr %5 to i64 - switch i64 %magicptr.i, label %if.then.i [ - i64 -8, label %if.end.i6 - i64 -16, label %if.end.i6 - ] + %cmp.i.i = icmp eq ptr %5, inttoptr (i64 -8 to ptr) + %cmp.i9.i = icmp eq ptr %5, inttoptr (i64 -16 to ptr) + %or.cond.i = or i1 %cmp.i.i, %cmp.i9.i + br i1 %or.cond.i, label %if.end.i6, label %if.then.i if.then.i: ; preds = %for.body.i5 %6 = load ptr, ptr %this, align 8 %7 = load i32, ptr %NumBuckets, align 8 %cmp.i.i.i = icmp ne i32 %7, 0 tail call void @llvm.assume(i1 %cmp.i.i.i) - %conv.i.i.i.i.i = trunc i64 %magicptr.i to i32 + %8 = ptrtoint ptr %5 to i64 + %conv.i.i.i.i.i = trunc i64 %8 to i32 %shr.i.i.i.i.i = lshr i32 %conv.i.i.i.i.i, 4 %shr2.i.i.i.i.i = lshr i32 %conv.i.i.i.i.i, 9 %xor.i.i.i.i.i = xor i32 %shr.i.i.i.i.i, %shr2.i.i.i.i.i @@ -1469,7 +1468,7 @@ _ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS store i32 %add.i.i, ptr %NumEntries.i.i.i.i, align 8 br label %if.end.i6 -if.end.i6: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS_12DenseMapInfoIS4_EENS5_12DenseSetPairIS4_EEEES4_S6_S8_SA_E15LookupBucketForIS4_EEbRKT_RPSA_.exit.i, %for.body.i5, %for.body.i5 +if.end.i6: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS_12DenseMapInfoIS4_EENS5_12DenseSetPairIS4_EEEES4_S6_S8_SA_E15LookupBucketForIS4_EEbRKT_RPSA_.exit.i, %for.body.i5 %incdec.ptr.i7 = getelementptr inbounds nuw i8, ptr %B.018.i, i64 8 %cmp.not.i8 = icmp eq ptr %incdec.ptr.i7, %add.ptr br i1 %cmp.not.i8, label %_ZN4llvh12DenseMapBaseINS_8DenseMapIPN6hermes5ValueENS_6detail13DenseSetEmptyENS_12DenseMapInfoIS4_EENS5_12DenseSetPairIS4_EEEES4_S6_S8_SA_E18moveFromOldBucketsEPSA_SD_.exit, label %for.body.i5, !llvm.loop !30 diff --git a/bench/hermes/optimized/Path.ll b/bench/hermes/optimized/Path.ll index 632e0887f8c..17c02e94e88 100644 --- a/bench/hermes/optimized/Path.ll +++ b/bench/hermes/optimized/Path.ll @@ -7946,13 +7946,16 @@ entry: %ref.tmp = alloca %"class.llvh::Twine", align 8 %agg.tmp = alloca %"class.llvh::sys::fs::basic_file_status", align 8 %call = tail call ptr @__errno_location() #30 - %Length.i35 = getelementptr inbounds nuw i8, ptr %Name, i64 8 store i32 0, ptr %call, align 4 %0 = load i64, ptr %It, align 8 %1 = inttoptr i64 %0 to ptr %call120 = tail call ptr @readdir(ptr noundef %1) #29 %cond21 = icmp eq ptr %call120, null - br i1 %cond21, label %land.lhs.true, label %if.then7 + br i1 %cond21, label %land.lhs.true, label %if.then7.lr.ph + +if.then7.lr.ph: ; preds = %entry + %Length.i35 = getelementptr inbounds nuw i8, ptr %Name, i64 8 + br label %if.then7 land.lhs.true: ; preds = %if.then23, %entry %2 = load i32, ptr %call, align 4 @@ -7964,8 +7967,8 @@ if.then: ; preds = %land.lhs.true %3 = insertvalue { i32, ptr } poison, i32 %2, 0 br label %return -if.then7: ; preds = %entry, %if.then23 - %call122 = phi ptr [ %call1, %if.then23 ], [ %call120, %entry ] +if.then7: ; preds = %if.then7.lr.ph, %if.then23 + %call122 = phi ptr [ %call115, %if.then7.lr.ph ], [ %call1, %if.then23 ] %d_name = getelementptr inbounds nuw i8, ptr %call122, i64 19 store ptr %d_name, ptr %Name, align 8 %call.i = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %d_name) #28 diff --git a/bench/html5ever-rs/optimized/2p0p1zz6gwjy9c4w.ll b/bench/html5ever-rs/optimized/2p0p1zz6gwjy9c4w.ll index 16cce90ce70..7689c7844ec 100644 --- a/bench/html5ever-rs/optimized/2p0p1zz6gwjy9c4w.ll +++ b/bench/html5ever-rs/optimized/2p0p1zz6gwjy9c4w.ll @@ -650,11 +650,10 @@ define hidden void @"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..o tail call void @llvm.experimental.noalias.scope.decl(metadata !217) tail call void @llvm.experimental.noalias.scope.decl(metadata !220) %2 = load ptr, ptr %0, align 8, !alias.scope !223, !noundef !4 - %magicptr.i.i = ptrtoint ptr %2 to i64 - switch i64 %magicptr.i.i, label %3 [ - i64 0, label %"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337.exit" - i64 -1, label %"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond.i.i = or i1 %3, %4 + br i1 %or.cond.i.i, label %"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337.exit", label %5 3: ; preds = %1 %4 = getelementptr inbounds nuw i8, ptr %2, i64 8 @@ -668,7 +667,7 @@ define hidden void @"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..o tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef 136, i64 noundef 8) #22, !noalias !224 br label %"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337.exit" -"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337.exit": ; preds = %1, %1, %3, %8 +"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337.exit": ; preds = %1, %5, %8 ret void } @@ -740,11 +739,10 @@ define hidden void @"_ZN4core3ptr123drop_in_place$LT$core..cell..UnsafeCell$LT$c define hidden void @"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h4c881dd0ae7cf0caE.llvm.10022686776672290337"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #0 { tail call void @llvm.experimental.noalias.scope.decl(metadata !250) %2 = load ptr, ptr %0, align 8, !alias.scope !250, !noundef !4 - %magicptr.i = ptrtoint ptr %2 to i64 - switch i64 %magicptr.i, label %3 [ - i64 0, label %"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337.exit" - i64 -1, label %"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %3, %4 + br i1 %or.cond.i, label %"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337.exit", label %5 3: ; preds = %1 %4 = getelementptr inbounds nuw i8, ptr %2, i64 8 @@ -758,7 +756,7 @@ define hidden void @"_ZN4core3ptr125drop_in_place$LT$core..cell..UnsafeCell$LT$c tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef 136, i64 noundef 8) #22, !noalias !253 br label %"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337.exit" -"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337.exit": ; preds = %1, %1, %3, %8 +"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337.exit": ; preds = %1, %3, %8 ret void } @@ -1148,11 +1146,10 @@ define hidden void @"_ZN4core3ptr44drop_in_place$LT$markup5ever_rcdom..Node$GT$1 tail call void @llvm.experimental.noalias.scope.decl(metadata !395) tail call void @llvm.experimental.noalias.scope.decl(metadata !398) %8 = load ptr, ptr %7, align 8, !alias.scope !401, !noundef !4 - %magicptr.i.i.i = ptrtoint ptr %8 to i64 - switch i64 %magicptr.i.i.i, label %9 [ - i64 0, label %"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hf1b98de9b91f2366E.llvm.10022686776672290337.exit" - i64 -1, label %"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hf1b98de9b91f2366E.llvm.10022686776672290337.exit" - ] + %9 = icmp eq ptr %8, null + %10 = icmp eq ptr %8, inttoptr (i64 -1 to ptr) + %or.cond.i.i.i = or i1 %9, %8 + br i1 %or.cond.i.i.i, label %"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hf1b98de9b91f2366E.llvm.10022686776672290337.exit", label %9 9: ; preds = %6 %10 = getelementptr inbounds nuw i8, ptr %8, i64 8 @@ -1166,7 +1163,7 @@ define hidden void @"_ZN4core3ptr44drop_in_place$LT$markup5ever_rcdom..Node$GT$1 tail call void @__rust_dealloc(ptr noundef nonnull %8, i64 noundef 136, i64 noundef 8) #22, !noalias !402 br label %"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hf1b98de9b91f2366E.llvm.10022686776672290337.exit" -"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hf1b98de9b91f2366E.llvm.10022686776672290337.exit": ; preds = %14, %9, %6, %6 +"_ZN4core3ptr119drop_in_place$LT$core..cell..Cell$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hf1b98de9b91f2366E.llvm.10022686776672290337.exit": ; preds = %14, %9, %6 %15 = getelementptr inbounds nuw i8, ptr %0, i64 96 tail call void @llvm.experimental.noalias.scope.decl(metadata !407) %16 = getelementptr inbounds nuw i8, ptr %0, i64 104 @@ -1211,7 +1208,7 @@ define hidden void @"_ZN4core3ptr44drop_in_place$LT$markup5ever_rcdom..Node$GT$1 br i1 %35, label %"_ZN4core3ptr118drop_in_place$LT$core..cell..UnsafeCell$LT$alloc..vec..Vec$LT$alloc..rc..Rc$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hd550bdd6081986d0E.llvm.10022686776672290337.exit", label %.lr.ph "_ZN4core3ptr65drop_in_place$LT$alloc..rc..Rc$LT$markup5ever_rcdom..Node$GT$$GT$17h38e6e968ed04c345E.exit7.i.i": ; preds = %39, %37 - %.1.i.i = phi i64 [ %22, %37 ], [ %41, %39 ] + %.1.i.i = phi i64 [ %22, %39 ], [ %41, %41 ] %36 = icmp eq i64 %.1.i.i, %19 br i1 %36, label %.body8, label %39 @@ -1257,9 +1254,9 @@ define hidden void @"_ZN4core3ptr44drop_in_place$LT$markup5ever_rcdom..Node$GT$1 br label %"_ZN4core3ptr115drop_in_place$LT$core..cell..RefCell$LT$alloc..vec..Vec$LT$alloc..rc..Rc$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h516e4a1b7bbe5eabE.exit4" "_ZN4core3ptr115drop_in_place$LT$core..cell..RefCell$LT$alloc..vec..Vec$LT$alloc..rc..Rc$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h516e4a1b7bbe5eabE.exit": ; preds = %45, %.body8, %2 - %.pn2 = phi { ptr, i32 } [ %3, %2 ], [ %38, %45 ], [ %38, %.body8 ] + %.pn2 = phi { ptr, i32 } [ %3, %2 ], [ %38, %47 ], [ %38, %.body8 ] invoke void @"_ZN4core3ptr48drop_in_place$LT$markup5ever_rcdom..NodeData$GT$17h12e711c87a1efc13E.llvm.10022686776672290337"(ptr noalias noundef nonnull align 8 dereferenceable(80) %0) #25 - to label %52 unwind label %50 + to label %54 unwind label %50 "_ZN4core3ptr115drop_in_place$LT$core..cell..RefCell$LT$alloc..vec..Vec$LT$alloc..rc..Rc$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17h516e4a1b7bbe5eabE.exit4": ; preds = %"_ZN4core3ptr118drop_in_place$LT$core..cell..UnsafeCell$LT$alloc..vec..Vec$LT$alloc..rc..Rc$LT$markup5ever_rcdom..Node$GT$$GT$$GT$$GT$17hd550bdd6081986d0E.llvm.10022686776672290337.exit", %48 tail call void @"_ZN4core3ptr48drop_in_place$LT$markup5ever_rcdom..NodeData$GT$17h12e711c87a1efc13E.llvm.10022686776672290337"(ptr noalias noundef nonnull align 8 dereferenceable(80) %0) @@ -2740,13 +2737,12 @@ define hidden void @"_ZN4core3ptr95drop_in_place$LT$core..cell..Ref$LT$tendril.. ; Function Attrs: nounwind nonlazybind uwtable define hidden void @"_ZN4core3ptr95drop_in_place$LT$core..option..Option$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$$GT$17he56a477076105f75E.llvm.10022686776672290337"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #0 { %2 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr = ptrtoint ptr %2 to i64 - switch i64 %magicptr, label %3 [ - i64 0, label %"_ZN4core3ptr67drop_in_place$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$17h614a7f44b369244bE.exit" - i64 -1, label %"_ZN4core3ptr67drop_in_place$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$17h614a7f44b369244bE.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %3, %4 + br i1 %or.cond, label %"_ZN4core3ptr67drop_in_place$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$17h614a7f44b369244bE.exit", label %5 -"_ZN4core3ptr67drop_in_place$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$17h614a7f44b369244bE.exit": ; preds = %1, %1, %8, %3 +"_ZN4core3ptr67drop_in_place$LT$alloc..rc..Weak$LT$markup5ever_rcdom..Node$GT$$GT$17h614a7f44b369244bE.exit": ; preds = %10, %5, %1 ret void 3: ; preds = %1 diff --git a/bench/icu/optimized/tznames_impl.ll b/bench/icu/optimized/tznames_impl.ll index 93c9a90b919..eac2c711db6 100644 --- a/bench/icu/optimized/tznames_impl.ll +++ b/bench/icu/optimized/tznames_impl.ll @@ -4278,8 +4278,8 @@ define noundef ptr @_ZNK6icu_7717TimeZoneNamesImpl6doFindERNS_18ZNameSearchHandl tail call void %30(ptr noundef nonnull align 8 dereferenceable(16) %11) #22 br label %31 -31: ; preds = %14, %27, %9, %5 - %.0 = phi ptr [ null, %5 ], [ %11, %14 ], [ null, %9 ], [ null, %27 ] +31: ; preds = %9, %14, %27, %5 + %.0 = phi ptr [ null, %5 ], [ %11, %14 ], [ null, %27 ], [ null, %9 ] ret ptr %.0 } diff --git a/bench/influxdb-rs/optimized/55ksfxb2g8gj9lwh.ll b/bench/influxdb-rs/optimized/55ksfxb2g8gj9lwh.ll index a09ce4cf38c..e7cb2b99d0a 100644 --- a/bench/influxdb-rs/optimized/55ksfxb2g8gj9lwh.ll +++ b/bench/influxdb-rs/optimized/55ksfxb2g8gj9lwh.ll @@ -20881,11 +20881,10 @@ define hidden void @"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..driver..Hand %7 = getelementptr inbounds nuw i8, ptr %0, i64 96 tail call void @llvm.experimental.noalias.scope.decl(metadata !8584) %8 = load ptr, ptr %7, align 8, !alias.scope !8584, !noundef !4 - %magicptr.i = ptrtoint ptr %8 to i64 - switch i64 %magicptr.i, label %9 [ - i64 0, label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965.exit" - i64 -1, label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965.exit" - ] + %9 = icmp eq ptr %8, null + %10 = icmp eq ptr %8, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %9, %10 + br i1 %or.cond.i, label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965.exit", label %9 9: ; preds = %6 %10 = getelementptr inbounds nuw i8, ptr %8, i64 8 @@ -20898,7 +20897,7 @@ define hidden void @"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..driver..Hand tail call void @__rust_dealloc(ptr noundef nonnull %8, i64 noundef 16, i64 noundef 8) #28, !noalias !8587 br label %"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965.exit" -"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965.exit": ; preds = %13, %9, %6, %6 +"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965.exit": ; preds = %13, %9, %6 tail call void @llvm.experimental.noalias.scope.decl(metadata !8594) %14 = getelementptr inbounds nuw i8, ptr %0, i64 240 %15 = load i32, ptr %14, align 8, !range !445, !alias.scope !8594, !noundef !4 @@ -37155,13 +37154,12 @@ define hidden void @"_ZN4core3ptr79drop_in_place$LT$alloc..vec..into_iter..IntoI ; Function Attrs: nounwind nonlazybind uwtable define hidden void @"_ZN4core3ptr79drop_in_place$LT$core..option..Option$LT$tokio..runtime..signal..Handle$GT$$GT$17h6f69b01415d68433E.llvm.12494526139044184965"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #1 { %2 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr = ptrtoint ptr %2 to i64 - switch i64 %magicptr, label %3 [ - i64 0, label %"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17h8b93599137c67f3cE.llvm.12494526139044184965.exit" - i64 -1, label %"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17h8b93599137c67f3cE.llvm.12494526139044184965.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %3, %4 + br i1 %or.cond, label %"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17h8b93599137c67f3cE.llvm.12494526139044184965.exit", label %5 -"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17h8b93599137c67f3cE.llvm.12494526139044184965.exit": ; preds = %1, %1, %7, %3 +"_ZN4core3ptr51drop_in_place$LT$tokio..runtime..signal..Handle$GT$17h8b93599137c67f3cE.llvm.12494526139044184965.exit": ; preds = %9, %5, %1 ret void 3: ; preds = %1 diff --git a/bench/jemalloc/optimized/pages.ll b/bench/jemalloc/optimized/pages.ll index 2da6fd6594e..ef38e86b1df 100644 --- a/bench/jemalloc/optimized/pages.ll +++ b/bench/jemalloc/optimized/pages.ll @@ -79,39 +79,36 @@ os_pages_unmap.exit: ; preds = %15, %25 .preheader.i: ; preds = %os_pages_unmap.exit %30 = sub i64 0, %2 - br label %31 - -31: ; preds = %71, %.preheader.i - %32 = load i8, ptr @os_overcommits, align 1, !tbaa !8, !range !10, !noundef !11 - %33 = trunc nuw i8 %32 to i1 - br i1 %33, label %36, label %._crit_edge.i.i + %31 = load i8, ptr @os_overcommits, align 1, !tbaa !8, !range !10, !noundef !11 + %32 = trunc nuw i8 %31 to i1 + br i1 %32, label %35, label %._crit_edge.i.i -._crit_edge.i.i: ; preds = %31 +._crit_edge.i.i: ; preds = %.preheader.i %.pre.i.i = load i8, ptr %3, align 1, !tbaa !8, !range !10 %34 = trunc nuw i8 %.pre.i.i to i1 %35 = select i1 %34, i32 3, i32 0 br label %37 -36: ; preds = %31 +36: ; preds = %.preheader.i store i8 1, ptr %3, align 1, !tbaa !8 br label %37 37: ; preds = %36, %._crit_edge.i.i - %38 = phi i32 [ %35, %._crit_edge.i.i ], [ 3, %36 ] + %38 = phi i32 [ %35, %._crit_edge.i.i ], [ 3, %35 ] %39 = load i32, ptr @mmap_flags, align 4, !tbaa !4 %40 = call ptr @mmap(ptr noundef null, i64 noundef %28, i32 noundef %38, i32 noundef %39, i32 noundef -1, i64 noundef 0) #10 - %magicptr.i = ptrtoint ptr %40 to i64 - switch i64 %magicptr.i, label %41 [ - i64 -1, label %pages_map_slow.exit - i64 0, label %pages_map_slow.exit - ] - -41: ; preds = %37 - %42 = add i64 %13, %magicptr.i + %40 = icmp eq ptr %40, inttoptr (i64 -1 to ptr) + %.not.i = icmp eq ptr %40, null + %or.cond.i = or i1 %40, %.not.i + br i1 %or.cond.i, label %pages_map_slow.exit, label %41 + +41: ; preds = %36 + %42 = ptrtoint ptr %39 to i64 + %42 = add i64 %13, %42 %43 = and i64 %42, %30 - %44 = sub i64 %43, %magicptr.i + %44 = sub i64 %43, %42 %45 = add i64 %44, %1 - %.not.i.i = icmp eq i64 %43, %magicptr.i + %.not.i.i = icmp eq i64 %43, %42 br i1 %.not.i.i, label %os_pages_unmap.exit.i.i, label %46 46: ; preds = %41 @@ -139,15 +136,15 @@ os_pages_unmap.exit: ; preds = %15, %25 os_pages_unmap.exit.i.i: ; preds = %56, %46, %41 %.not13.i.i = icmp eq i64 %28, %45 - br i1 %.not13.i.i, label %71, label %57 + %58 = getelementptr inbounds nuw i8, ptr %39, i64 %45 + br i1 %.not13.i.i, label %pages_map_slow.exit, label %59 57: ; preds = %os_pages_unmap.exit.i.i - %58 = getelementptr inbounds nuw i8, ptr %40, i64 %44 - %59 = sub i64 %28, %45 - %60 = getelementptr inbounds nuw i8, ptr %58, i64 %1 - %61 = call i32 @munmap(ptr noundef nonnull %60, i64 noundef %59) #10 - %62 = icmp eq i32 %61, -1 - br i1 %62, label %63, label %pages_map_slow.exit + %60 = sub i64 %28, %46 + %61 = getelementptr inbounds nuw i8, ptr %58, i64 %1 + %62 = call i32 @munmap(ptr noundef nonnull %61, i64 noundef %60) #10 + %63 = icmp eq i32 %62, -1 + br i1 %63, label %64, label %71 63: ; preds = %57 call void @llvm.lifetime.start.p0(ptr nonnull %5) @@ -167,16 +164,8 @@ os_pages_unmap.exit.i.i: ; preds = %56, %46, %41 call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %pages_map_slow.exit -71: ; preds = %os_pages_unmap.exit.i.i - %72 = icmp eq ptr %40, null - br i1 %72, label %31, label %os_pages_trim.exit.loopexit.split.loop.exit.i, !llvm.loop !14 - -os_pages_trim.exit.loopexit.split.loop.exit.i: ; preds = %71 - %73 = getelementptr inbounds nuw i8, ptr %40, i64 %44 - br label %pages_map_slow.exit - -pages_map_slow.exit: ; preds = %37, %37, %os_pages_trim.exit.loopexit.split.loop.exit.i, %70, %57, %os_pages_unmap.exit, %11, %4 - %.0 = phi ptr [ %8, %4 ], [ %8, %11 ], [ null, %os_pages_unmap.exit ], [ %58, %57 ], [ %58, %70 ], [ %73, %os_pages_trim.exit.loopexit.split.loop.exit.i ], [ null, %37 ], [ null, %37 ] +71: ; preds = %71, %59, %os_pages_unmap.exit.i.i, %36, %os_pages_unmap.exit, %11, %4 + %.0 = phi ptr [ %8, %4 ], [ %8, %11 ], [ null, %os_pages_unmap.exit ], [ %58, %59 ], [ %58, %71 ], [ null, %36 ], [ %58, %os_pages_unmap.exit.i.i ] ret ptr %.0 } @@ -408,7 +397,7 @@ declare i32 @madvise(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr # define hidden zeroext i1 @je_pages_purge_forced(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 { %3 = load i32, ptr @madvise_dont_need_zeros_is_faulty, align 4, !tbaa !4 %.not = icmp eq i32 %3, 0 - br i1 %.not, label %4, label %7, !prof !16 + br i1 %.not, label %4, label %7, !prof !14 4: ; preds = %2 %5 = tail call i32 @madvise(ptr noundef %0, i64 noundef %1, i32 noundef 4) #10 @@ -596,7 +585,7 @@ os_overcommits_proc.exit.thread: ; preds = %37 44: ; preds = %.preheader.i %45 = icmp slt i64 %41, 1 - br i1 %45, label %.preheader.i, label %malloc_read_fd.exit.loopexit.i, !llvm.loop !17 + br i1 %45, label %.preheader.i, label %malloc_read_fd.exit.loopexit.i, !llvm.loop !15 malloc_read_fd.exit.loopexit.i: ; preds = %44, %.preheader.i %46 = call i64 @llvm.smax.i64(i64 %41, i64 0) @@ -648,7 +637,7 @@ os_overcommits_proc.exit: ; preds = %.preheader.i, %mall 66: ; preds = %.preheader.i7 %67 = icmp ult i64 %.116.i.i, 24 - br i1 %67, label %.preheader.i7, label %malloc_read_fd.exit.i13, !llvm.loop !17 + br i1 %67, label %.preheader.i7, label %malloc_read_fd.exit.i13, !llvm.loop !15 malloc_read_fd.exit.i13.loopexit: ; preds = %.preheader.i7 br label %malloc_read_fd.exit.i13 @@ -698,11 +687,10 @@ init_thp_state.exit: ; preds = %73, %77, %81, %82 %spec.select = select i1 %84, i32 3, i32 0 %85 = load i32, ptr @mmap_flags, align 4, !tbaa !4 %86 = call ptr @mmap(ptr noundef null, i64 noundef 4096, i32 noundef %spec.select, i32 noundef %85, i32 noundef -1, i64 noundef 0) #10 - %magicptr = ptrtoint ptr %86 to i64 - switch i64 %magicptr, label %87 [ - i64 -1, label %os_pages_unmap.exit - i64 0, label %os_pages_unmap.exit - ] + %87 = icmp eq ptr %86, inttoptr (i64 -1 to ptr) + %88 = icmp eq ptr %86, null + %or.cond = or i1 %87, %88 + br i1 %or.cond, label %os_pages_unmap.exit, label %89 87: ; preds = %init_thp_state.exit %.b.i = load i1, ptr @pages_can_purge_lazy_runtime, align 1 @@ -740,8 +728,8 @@ je_pages_purge_lazy.exit.thread: ; preds = %87, %je_pages_purge call void @llvm.lifetime.end.p0(ptr nonnull %1) br label %os_pages_unmap.exit -os_pages_unmap.exit: ; preds = %init_thp_state.exit, %init_thp_state.exit, %89, %99, %7 - %.04 = phi i1 [ true, %7 ], [ false, %89 ], [ false, %99 ], [ true, %init_thp_state.exit ], [ true, %init_thp_state.exit ] +os_pages_unmap.exit: ; preds = %init_thp_state.exit, %89, %99, %7 + %.04 = phi i1 [ true, %7 ], [ false, %91 ], [ false, %101 ], [ true, %init_thp_state.exit ] ret i1 %.04 } @@ -818,7 +806,6 @@ attributes #13 = { nounwind willreturn memory(read) } !11 = !{} !12 = !{!13, !13, i64 0} !13 = !{!"long", !6, i64 0} -!14 = distinct !{!14, !15} -!15 = !{!"llvm.loop.mustprogress"} -!16 = !{!"branch_weights", !"expected", i32 2000, i32 1} -!17 = distinct !{!17, !15} +!14 = !{!"branch_weights", !"expected", i32 2000, i32 1} +!15 = distinct !{!15, !16} +!16 = !{!"llvm.loop.mustprogress"} diff --git a/bench/lean4/optimized/Constraint.ll b/bench/lean4/optimized/Constraint.ll index 043fb51aec3..eb1e7b458e5 100644 --- a/bench/lean4/optimized/Constraint.ll +++ b/bench/lean4/optimized/Constraint.ll @@ -10254,15 +10254,17 @@ define ptr @l_Lean_Omega_normalize_x3f(ptr noundef %0) local_unnamed_addr #1 { br i1 %.not184, label %lean_nat_eq.exit.thread, label %lean_nat_eq.exit, !prof !4 lean_nat_eq.exit: ; preds = %7 - switch i64 %9, label %lean_inc.exit110 [ - i64 1, label %lean_dec.exit103 - i64 3, label %lean_dec.exit106 - ] + %.not185 = icmp eq ptr %8, inttoptr (i64 1 to ptr) + br i1 %.not185, label %lean_dec.exit103, label %lean_nat_eq.exit137 lean_nat_eq.exit.thread: ; preds = %7 %11 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %8, ptr noundef nonnull inttoptr (i64 1 to ptr)) #4 br i1 %11, label %.thread171, label %lean_nat_eq.exit137.thread +lean_nat_eq.exit137: ; preds = %lean_nat_eq.exit + %.not187 = icmp eq ptr %8, inttoptr (i64 3 to ptr) + br i1 %.not187, label %lean_dec.exit106, label %lean_inc.exit110 + lean_nat_eq.exit137.thread: ; preds = %lean_nat_eq.exit.thread %12 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %8, ptr noundef nonnull inttoptr (i64 3 to ptr)) #4 %13 = load i32, ptr %8, align 4, !tbaa !5 @@ -10289,7 +10291,7 @@ lean_inc.exit110.thread: ; preds = %18, %17, %15 %19 = tail call ptr @l_Lean_Omega_Constraint_div(ptr noundef %4, ptr noundef nonnull %8) br label %lean_nat_to_int.exit -lean_inc.exit110: ; preds = %lean_nat_eq.exit +lean_inc.exit110: ; preds = %lean_nat_eq.exit137 %20 = tail call ptr @l_Lean_Omega_Constraint_div(ptr noundef %4, ptr noundef %8) %21 = icmp ult ptr %8, inttoptr (i64 4294967296 to ptr) br i1 %21, label %lean_nat_to_int.exit, label %22 @@ -10364,7 +10366,7 @@ lean_alloc_ctor.exit: ; preds = %lean_dec.exit107 tail call void @lean_dec_ref_cold(ptr noundef nonnull %8) #4 br label %lean_dec.exit106 -lean_dec.exit106: ; preds = %lean_nat_eq.exit, %44, %43, %41 +lean_dec.exit106: ; preds = %lean_nat_eq.exit137, %44, %43, %41 tail call void @lean_free_object(ptr noundef nonnull %0) #4 %45 = ptrtoint ptr %6 to i64 %46 = and i64 %45, 1 @@ -10581,15 +10583,17 @@ lean_dec.exit101: ; preds = %120, %119, %117, %l br i1 %.not180, label %lean_nat_eq.exit140.thread, label %lean_nat_eq.exit140, !prof !4 lean_nat_eq.exit140: ; preds = %lean_dec.exit101 - switch i64 %122, label %lean_inc.exit [ - i64 1, label %lean_dec.exit96 - i64 3, label %lean_dec.exit99 - ] + %.not181 = icmp eq ptr %121, inttoptr (i64 1 to ptr) + br i1 %.not181, label %lean_dec.exit96, label %lean_nat_eq.exit143 lean_nat_eq.exit140.thread: ; preds = %lean_dec.exit101 %124 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %121, ptr noundef nonnull inttoptr (i64 1 to ptr)) #4 br i1 %124, label %.thread177, label %lean_nat_eq.exit143.thread +lean_nat_eq.exit143: ; preds = %lean_nat_eq.exit140 + %.not182 = icmp eq ptr %121, inttoptr (i64 3 to ptr) + br i1 %.not182, label %lean_dec.exit99, label %lean_inc.exit + lean_nat_eq.exit143.thread: ; preds = %lean_nat_eq.exit140.thread %125 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %121, ptr noundef nonnull inttoptr (i64 3 to ptr)) #4 %126 = load i32, ptr %121, align 4, !tbaa !5 @@ -10616,7 +10620,7 @@ lean_inc.exit.thread: ; preds = %131, %130, %128 %132 = tail call ptr @l_Lean_Omega_Constraint_div(ptr noundef %4, ptr noundef nonnull %121) br label %lean_nat_to_int.exit160 -lean_inc.exit: ; preds = %lean_nat_eq.exit140 +lean_inc.exit: ; preds = %lean_nat_eq.exit143 %133 = tail call ptr @l_Lean_Omega_Constraint_div(ptr noundef %4, ptr noundef %121) %134 = icmp ult ptr %121, inttoptr (i64 4294967296 to ptr) br i1 %134, label %lean_nat_to_int.exit160, label %135 @@ -10706,7 +10710,7 @@ lean_alloc_ctor.exit162: ; preds = %lean_alloc_ctor.exi tail call void @lean_dec_ref_cold(ptr noundef nonnull %121) #4 br label %lean_dec.exit99 -lean_dec.exit99: ; preds = %lean_nat_eq.exit140, %163, %162, %160 +lean_dec.exit99: ; preds = %lean_nat_eq.exit143, %163, %162, %160 br i1 %.not, label %164, label %lean_dec.exit98 164: ; preds = %lean_dec.exit99 diff --git a/bench/lean4/optimized/FunInd.ll b/bench/lean4/optimized/FunInd.ll index 57357721e5e..527e3182f55 100644 --- a/bench/lean4/optimized/FunInd.ll +++ b/bench/lean4/optimized/FunInd.ll @@ -57235,20 +57235,22 @@ lean_dec.exit1237: ; preds = %2012, %2011, %2009, br i1 %.not2478, label %lean_nat_eq.exit.thread, label %lean_nat_eq.exit, !prof !17 lean_nat_eq.exit: ; preds = %lean_dec.exit1237 - switch i64 %1788, label %2015 [ - i64 1, label %lean_dec.exit1219 - i64 3, label %lean_dec.exit1231 - ] + %.not2482 = icmp eq ptr %1787, inttoptr (i64 1 to ptr) + br i1 %.not2482, label %lean_dec.exit1219, label %lean_nat_eq.exit1794 lean_nat_eq.exit.thread: ; preds = %lean_dec.exit1237 %2013 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %1787, ptr noundef nonnull inttoptr (i64 1 to ptr)) #6 br i1 %2013, label %.thread2444, label %lean_nat_eq.exit1794.thread +lean_nat_eq.exit1794: ; preds = %lean_nat_eq.exit + %.not2508 = icmp eq ptr %1787, inttoptr (i64 3 to ptr) + br i1 %.not2508, label %lean_dec.exit1231, label %2015 + lean_nat_eq.exit1794.thread: ; preds = %lean_nat_eq.exit.thread %2014 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %1787, ptr noundef nonnull inttoptr (i64 3 to ptr)) #6 br i1 %2014, label %.thread2443, label %2015 -2015: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit1794.thread +2015: ; preds = %lean_nat_eq.exit1794.thread, %lean_nat_eq.exit1794 %2016 = tail call ptr @l_Lean_Name_str___override(ptr noundef %1772, ptr noundef %1823) #6 %2017 = tail call ptr @l_Lean_Tactic_FunInd_foldAndCollect(ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %1797, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) %2018 = ptrtoint ptr %2017 to i64 @@ -57699,7 +57701,7 @@ lean_dec.exit1232: ; preds = %2179, %2178, %2176, tail call void @lean_dec_ref_cold(ptr noundef nonnull %1787) #6 br label %lean_dec.exit1231 -lean_dec.exit1231: ; preds = %lean_nat_eq.exit, %2188, %2187, %2185 +lean_dec.exit1231: ; preds = %lean_nat_eq.exit1794, %2188, %2187, %2185 %2189 = ptrtoint ptr %9 to i64 %2190 = and i64 %2189, 1 %.not2509 = icmp eq i64 %2190, 0 diff --git a/bench/lean4/optimized/TextSync.ll b/bench/lean4/optimized/TextSync.ll index 20802237976..407311b258f 100644 --- a/bench/lean4/optimized/TextSync.ll +++ b/bench/lean4/optimized/TextSync.ll @@ -491,20 +491,22 @@ lean_dec.exit25: ; preds = %32, %31, %29, %lean br i1 %.not, label %lean_nat_eq.exit.thread, label %lean_nat_eq.exit, !prof !15 lean_nat_eq.exit: ; preds = %lean_dec.exit25 - switch i64 %18, label %lean_nat_eq.exit40.thread [ - i64 1, label %lean_dec.exit26 - i64 3, label %lean_dec.exit26.fold.split - ] + %.not54 = icmp eq ptr %17, inttoptr (i64 1 to ptr) + br i1 %.not54, label %lean_dec.exit26, label %lean_nat_eq.exit37 lean_nat_eq.exit.thread: ; preds = %lean_dec.exit25 %33 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %17, ptr noundef nonnull inttoptr (i64 1 to ptr)) #5 br i1 %33, label %.thread52, label %lean_nat_eq.exit37.thread +lean_nat_eq.exit37: ; preds = %lean_nat_eq.exit + %.not55 = icmp eq ptr %17, inttoptr (i64 3 to ptr) + br i1 %.not55, label %lean_dec.exit26, label %lean_nat_eq.exit40.thread + lean_nat_eq.exit37.thread: ; preds = %lean_nat_eq.exit.thread %34 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %17, ptr noundef nonnull inttoptr (i64 3 to ptr)) #5 br i1 %34, label %.thread51, label %.thread49 -lean_nat_eq.exit40.thread: ; preds = %lean_nat_eq.exit +lean_nat_eq.exit40.thread: ; preds = %lean_nat_eq.exit37 %35 = icmp eq ptr %17, inttoptr (i64 5 to ptr) br label %lean_dec.exit24 @@ -568,11 +570,8 @@ lean_dec.exit24: ; preds = %42, %41, %39, %lean tail call void @lean_dec_ref_cold(ptr noundef nonnull %17) #5 br label %lean_dec.exit26 -lean_dec.exit26.fold.split: ; preds = %lean_nat_eq.exit - br label %lean_dec.exit26 - -lean_dec.exit26: ; preds = %lean_nat_eq.exit, %lean_dec.exit26.fold.split, %lean_obj_tag.exit, %51, %53, %54, %45, %47, %48, %11, %13, %14, %lean_dec.exit24 - %.0.in = phi ptr [ %l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2.l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3, %lean_dec.exit24 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %14 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %13 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %11 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %48 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %47 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %45 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %54 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %53 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %51 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %lean_nat_eq.exit ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %lean_obj_tag.exit ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %lean_dec.exit26.fold.split ] +lean_dec.exit26.fold.split: ; preds = %lean_obj_tag.exit, %lean_nat_eq.exit, %lean_nat_eq.exit37, %51, %53, %54, %45, %47, %48, %11, %13, %14, %lean_dec.exit24 + %.0.in = phi ptr [ %l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2.l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3, %lean_dec.exit24 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %14 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %13 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %11 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %48 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %47 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %45 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %54 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %53 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %51 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %lean_nat_eq.exit37 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %lean_nat_eq.exit ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %lean_obj_tag.exit ] %.0 = load ptr, ptr %.0.in, align 8, !tbaa !10 ret ptr %.0 } @@ -1085,20 +1084,22 @@ lean_dec.exit27: ; preds = %34, %33, %31, %lean br i1 %.not, label %lean_nat_eq.exit.thread, label %lean_nat_eq.exit, !prof !15 lean_nat_eq.exit: ; preds = %lean_dec.exit27 - switch i64 %20, label %lean_nat_eq.exit42.thread [ - i64 1, label %lean_dec.exit28 - i64 3, label %lean_dec.exit28.fold.split - ] + %.not56 = icmp eq ptr %19, inttoptr (i64 1 to ptr) + br i1 %.not56, label %lean_dec.exit28, label %lean_nat_eq.exit39 lean_nat_eq.exit.thread: ; preds = %lean_dec.exit27 %35 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %19, ptr noundef nonnull inttoptr (i64 1 to ptr)) #5 br i1 %35, label %.thread54, label %lean_nat_eq.exit39.thread +lean_nat_eq.exit39: ; preds = %lean_nat_eq.exit + %.not57 = icmp eq ptr %19, inttoptr (i64 3 to ptr) + br i1 %.not57, label %lean_dec.exit28, label %lean_nat_eq.exit42.thread + lean_nat_eq.exit39.thread: ; preds = %lean_nat_eq.exit.thread %36 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %19, ptr noundef nonnull inttoptr (i64 3 to ptr)) #5 br i1 %36, label %.thread53, label %.thread51 -lean_nat_eq.exit42.thread: ; preds = %lean_nat_eq.exit +lean_nat_eq.exit42.thread: ; preds = %lean_nat_eq.exit39 %37 = icmp eq ptr %19, inttoptr (i64 5 to ptr) br label %lean_dec.exit26 @@ -1162,11 +1163,8 @@ lean_dec.exit26: ; preds = %44, %43, %41, %lean tail call void @lean_dec_ref_cold(ptr noundef nonnull %19) #5 br label %lean_dec.exit28 -lean_dec.exit28.fold.split: ; preds = %lean_nat_eq.exit - br label %lean_dec.exit28 - -lean_dec.exit28: ; preds = %lean_nat_eq.exit, %lean_dec.exit28.fold.split, %lean_obj_tag.exit, %53, %55, %56, %47, %49, %50, %13, %15, %16, %lean_dec.exit26 - %.0.in = phi ptr [ %l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2.l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3, %lean_dec.exit26 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %16 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %15 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %13 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %50 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %49 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %47 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %56 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %55 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %53 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %lean_nat_eq.exit ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %lean_obj_tag.exit ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %lean_dec.exit28.fold.split ] +lean_dec.exit28.fold.split: ; preds = %lean_obj_tag.exit, %lean_nat_eq.exit, %lean_nat_eq.exit39, %53, %55, %56, %47, %49, %50, %13, %15, %16, %lean_dec.exit26 + %.0.in = phi ptr [ %l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2.l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__3, %lean_dec.exit26 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %16 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %15 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %13 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %50 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %49 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %47 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %56 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %55 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %53 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__4, %lean_nat_eq.exit39 ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__5, %lean_nat_eq.exit ], [ @l_Lean_Lsp_instFromJsonTextDocumentSyncKind___closed__2, %lean_obj_tag.exit ] %.0 = load ptr, ptr %.0.in, align 8, !tbaa !10 ret ptr %.0 } diff --git a/bench/lean4/optimized/WHNF.ll b/bench/lean4/optimized/WHNF.ll index 01675e6e296..b0d60f2737d 100644 --- a/bench/lean4/optimized/WHNF.ll +++ b/bench/lean4/optimized/WHNF.ll @@ -27100,20 +27100,22 @@ lean_dec.exit131: ; preds = %142, %141, %139, %l br i1 %.not259, label %lean_nat_eq.exit.thread, label %lean_nat_eq.exit, !prof !16 lean_nat_eq.exit: ; preds = %lean_dec.exit131 - switch i64 %128, label %145 [ - i64 1, label %lean_dec.exit128 - i64 3, label %lean_dec.exit129 - ] + %.not260 = icmp eq ptr %127, inttoptr (i64 1 to ptr) + br i1 %.not260, label %lean_dec.exit128, label %lean_nat_eq.exit180 lean_nat_eq.exit.thread: ; preds = %lean_dec.exit131 %143 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %127, ptr noundef nonnull inttoptr (i64 1 to ptr)) #5 br i1 %143, label %.thread237, label %lean_nat_eq.exit180.thread +lean_nat_eq.exit180: ; preds = %lean_nat_eq.exit + %.not261 = icmp eq ptr %127, inttoptr (i64 3 to ptr) + br i1 %.not261, label %lean_dec.exit129, label %145 + lean_nat_eq.exit180.thread: ; preds = %lean_nat_eq.exit.thread %144 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %127, ptr noundef nonnull inttoptr (i64 3 to ptr)) #5 br i1 %144, label %.thread236, label %.thread233 -145: ; preds = %lean_nat_eq.exit +145: ; preds = %lean_nat_eq.exit180 %146 = icmp ult ptr %127, inttoptr (i64 2 to ptr) br i1 %146, label %lean_dec.exit130, label %147 @@ -27168,7 +27170,7 @@ lean_dec.exit130: ; preds = %147, %145, %156, %1 tail call void @lean_dec_ref_cold(ptr noundef nonnull %127) #5 br label %lean_dec.exit129 -lean_dec.exit129: ; preds = %lean_nat_eq.exit, %166, %165, %163 +lean_dec.exit129: ; preds = %lean_nat_eq.exit180, %166, %165, %163 %167 = tail call ptr @l_Lean_mkNatSucc(ptr noundef %117) #5 store ptr %167, ptr %26, align 8, !tbaa !12 br label %308 @@ -27319,20 +27321,22 @@ lean_dec.exit126: ; preds = %218, %217, %215, %l br i1 %.not254, label %lean_nat_eq.exit183.thread, label %lean_nat_eq.exit183, !prof !16 lean_nat_eq.exit183: ; preds = %lean_dec.exit126 - switch i64 %204, label %221 [ - i64 1, label %lean_dec.exit123 - i64 3, label %lean_dec.exit124 - ] + %.not255 = icmp eq ptr %203, inttoptr (i64 1 to ptr) + br i1 %.not255, label %lean_dec.exit123, label %lean_nat_eq.exit186 lean_nat_eq.exit183.thread: ; preds = %lean_dec.exit126 %219 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %203, ptr noundef nonnull inttoptr (i64 1 to ptr)) #5 br i1 %219, label %.thread245, label %lean_nat_eq.exit186.thread +lean_nat_eq.exit186: ; preds = %lean_nat_eq.exit183 + %.not256 = icmp eq ptr %203, inttoptr (i64 3 to ptr) + br i1 %.not256, label %lean_dec.exit124, label %221 + lean_nat_eq.exit186.thread: ; preds = %lean_nat_eq.exit183.thread %220 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %203, ptr noundef nonnull inttoptr (i64 3 to ptr)) #5 br i1 %220, label %.thread244, label %.thread241 -221: ; preds = %lean_nat_eq.exit183 +221: ; preds = %lean_nat_eq.exit186 %222 = icmp ult ptr %203, inttoptr (i64 2 to ptr) br i1 %222, label %lean_dec.exit125, label %223 @@ -27391,7 +27395,7 @@ lean_dec.exit125: ; preds = %223, %221, %232, %2 tail call void @lean_dec_ref_cold(ptr noundef nonnull %203) #5 br label %lean_dec.exit124 -lean_dec.exit124: ; preds = %lean_nat_eq.exit183, %245, %244, %242 +lean_dec.exit124: ; preds = %lean_nat_eq.exit186, %245, %244, %242 %246 = tail call ptr @l_Lean_mkNatSucc(ptr noundef %193) #5 tail call void @lean_inc_heartbeat() #5 %247 = tail call noalias ptr @mi_malloc_small(i64 noundef 24) #5 diff --git a/bench/lean4/optimized/Weekday.ll b/bench/lean4/optimized/Weekday.ll index ff022ef2db7..d247d9a8396 100644 --- a/bench/lean4/optimized/Weekday.ll +++ b/bench/lean4/optimized/Weekday.ll @@ -2447,75 +2447,91 @@ define ptr @l_Std_Time_Weekday_ofNat_x3f(ptr noundef %0) local_unnamed_addr #1 { br i1 %.not, label %lean_nat_eq.exit.thread, label %lean_nat_eq.exit, !prof !15 lean_nat_eq.exit: ; preds = %1 - %magicptr = ptrtoint ptr %0 to i64 - switch i64 %magicptr, label %25 [ - i64 3, label %23 - i64 5, label %21 - i64 7, label %19 - i64 9, label %17 - i64 11, label %15 - i64 13, label %13 - i64 15, label %11 - ] + %.not58 = icmp eq ptr %0, inttoptr (i64 3 to ptr) + br i1 %.not58, label %25, label %lean_nat_eq.exit31 lean_nat_eq.exit.thread: ; preds = %1 %4 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 3 to ptr)) #7 br i1 %4, label %23, label %lean_nat_eq.exit31.thread +lean_nat_eq.exit31: ; preds = %lean_nat_eq.exit + %.not59 = icmp eq ptr %0, inttoptr (i64 5 to ptr) + br i1 %.not59, label %23, label %lean_nat_eq.exit34 + lean_nat_eq.exit31.thread: ; preds = %lean_nat_eq.exit.thread %5 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 5 to ptr)) #7 br i1 %5, label %21, label %lean_nat_eq.exit34.thread +lean_nat_eq.exit34: ; preds = %lean_nat_eq.exit31 + %.not60 = icmp eq ptr %0, inttoptr (i64 7 to ptr) + br i1 %.not60, label %21, label %lean_nat_eq.exit37 + lean_nat_eq.exit34.thread: ; preds = %lean_nat_eq.exit31.thread %6 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 7 to ptr)) #7 br i1 %6, label %19, label %lean_nat_eq.exit37.thread +lean_nat_eq.exit37: ; preds = %lean_nat_eq.exit34 + %.not61 = icmp eq ptr %0, inttoptr (i64 9 to ptr) + br i1 %.not61, label %19, label %lean_nat_eq.exit40 + lean_nat_eq.exit37.thread: ; preds = %lean_nat_eq.exit34.thread %7 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 9 to ptr)) #7 br i1 %7, label %17, label %lean_nat_eq.exit40.thread +lean_nat_eq.exit40: ; preds = %lean_nat_eq.exit37 + %.not62 = icmp eq ptr %0, inttoptr (i64 11 to ptr) + br i1 %.not62, label %17, label %lean_nat_eq.exit43 + lean_nat_eq.exit40.thread: ; preds = %lean_nat_eq.exit37.thread %8 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 11 to ptr)) #7 br i1 %8, label %15, label %lean_nat_eq.exit43.thread +lean_nat_eq.exit43: ; preds = %lean_nat_eq.exit40 + %.not63 = icmp eq ptr %0, inttoptr (i64 13 to ptr) + br i1 %.not63, label %15, label %10 + lean_nat_eq.exit43.thread: ; preds = %lean_nat_eq.exit40.thread %9 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 13 to ptr)) #7 br i1 %9, label %13, label %lean_nat_eq.exit46 +10: ; preds = %lean_nat_eq.exit43 + %11 = icmp eq ptr %0, inttoptr (i64 15 to ptr) + br i1 %11, label %13, label %27 + lean_nat_eq.exit46: ; preds = %lean_nat_eq.exit43.thread %10 = tail call zeroext i1 @lean_nat_big_eq(ptr noundef %0, ptr noundef nonnull inttoptr (i64 15 to ptr)) #7 br i1 %10, label %11, label %25 -11: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit46 +11: ; preds = %10, %lean_nat_eq.exit46 %12 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__1, align 8, !tbaa !10 br label %25 -13: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit43.thread +13: ; preds = %lean_nat_eq.exit43.thread, %lean_nat_eq.exit43 %14 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__2, align 8, !tbaa !10 br label %25 -15: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit40.thread +15: ; preds = %lean_nat_eq.exit40.thread, %lean_nat_eq.exit40 %16 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__3, align 8, !tbaa !10 br label %25 -17: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit37.thread +17: ; preds = %lean_nat_eq.exit37.thread, %lean_nat_eq.exit37 %18 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__4, align 8, !tbaa !10 br label %25 -19: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit34.thread +19: ; preds = %lean_nat_eq.exit34.thread, %lean_nat_eq.exit34 %20 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__5, align 8, !tbaa !10 br label %25 -21: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit31.thread +21: ; preds = %lean_nat_eq.exit31.thread, %lean_nat_eq.exit31 %22 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__6, align 8, !tbaa !10 br label %25 -23: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit.thread +23: ; preds = %lean_nat_eq.exit.thread, %lean_nat_eq.exit %24 = load ptr, ptr @l_Std_Time_Weekday_ofNat_x3f___closed__7, align 8, !tbaa !10 br label %25 -25: ; preds = %lean_nat_eq.exit, %lean_nat_eq.exit46, %21, %17, %13, %11, %15, %19, %23 - %.6 = phi ptr [ %24, %23 ], [ %22, %21 ], [ %20, %19 ], [ %18, %17 ], [ %16, %15 ], [ %14, %13 ], [ %12, %11 ], [ inttoptr (i64 1 to ptr), %lean_nat_eq.exit46 ], [ inttoptr (i64 1 to ptr), %lean_nat_eq.exit ] +25: ; preds = %10, %lean_nat_eq.exit46, %21, %17, %13, %11, %15, %19, %23 + %.6 = phi ptr [ %24, %25 ], [ %24, %23 ], [ %22, %21 ], [ %20, %19 ], [ %18, %17 ], [ %16, %15 ], [ %14, %13 ], [ inttoptr (i64 1 to ptr), %lean_nat_eq.exit46 ], [ inttoptr (i64 1 to ptr), %10 ] ret ptr %.6 } diff --git a/bench/libquic/optimized/heap_profiler_allocation_context_tracker.ll b/bench/libquic/optimized/heap_profiler_allocation_context_tracker.ll index e271e8b60b4..f8c870a0e6f 100644 --- a/bench/libquic/optimized/heap_profiler_allocation_context_tracker.ll +++ b/bench/libquic/optimized/heap_profiler_allocation_context_tracker.ll @@ -21,17 +21,18 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: mustprogress uwtable define noundef ptr @_ZN4base11trace_event24AllocationContextTracker27GetInstanceForCurrentThreadEv() local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 { %1 = tail call noundef ptr @_ZNK4base18ThreadLocalStorage10StaticSlot3GetEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN4base11trace_event12_GLOBAL__N_123g_tls_alloc_ctx_trackerE) - %magicptr = ptrtoint ptr %1 to i64 - switch i64 %magicptr, label %7 [ - i64 -1, label %8 - i64 0, label %2 - ] + %2 = icmp eq ptr %1, inttoptr (i64 -1 to ptr) + br i1 %2, label %7, label %3 + +3: ; preds = %0 + %.not = icmp eq ptr %1, null + br i1 %.not, label %4, label %9 -2: ; preds = %0 +2: ; preds = %3 tail call void @_ZN4base18ThreadLocalStorage10StaticSlot3SetEPv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN4base11trace_event12_GLOBAL__N_123g_tls_alloc_ctx_trackerE, ptr noundef nonnull inttoptr (i64 -1 to ptr)) %3 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #14 invoke void @_ZN4base11trace_event24AllocationContextTrackerC1Ev(ptr noundef nonnull align 8 dereferenceable(60) %3) - to label %4 unwind label %5 + to label %6 unwind label %5 4: ; preds = %2 tail call void @_ZN4base18ThreadLocalStorage10StaticSlot3SetEPv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN4base11trace_event12_GLOBAL__N_123g_tls_alloc_ctx_trackerE, ptr noundef nonnull %3) @@ -43,11 +44,8 @@ define noundef ptr @_ZN4base11trace_event24AllocationContextTracker27GetInstance tail call void @_ZdlPv(ptr noundef nonnull %3) #15 resume { ptr, i32 } %6 -7: ; preds = %0 - br label %8 - -8: ; preds = %4, %0, %7 - %.0 = phi ptr [ null, %0 ], [ %3, %4 ], [ %1, %7 ] +7: ; preds = %3, %6, %0 + %.0 = phi ptr [ null, %0 ], [ %1, %3 ], [ %5, %6 ] ret ptr %.0 } @@ -135,14 +133,16 @@ _ZN4base11trace_event24AllocationContextTracker12capture_modeEv.exit: ; preds = 6: ; preds = %_ZN4base11trace_event24AllocationContextTracker12capture_modeEv.exit %7 = tail call noundef ptr @_ZNK4base18ThreadLocalStorage10StaticSlot3GetEv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN4base11trace_event12_GLOBAL__N_123g_tls_alloc_ctx_trackerE) - %cond = icmp eq ptr %7, null - br i1 %cond, label %8, label %_ZN4base11trace_event24AllocationContextTracker27GetInstanceForCurrentThreadEv.exit + %cond = icmp ne ptr %7, inttoptr (i64 -1 to ptr) + tail call void @llvm.assume(i1 %cond) + %.not.i = icmp eq ptr %7, null + br i1 %.not.i, label %9, label %_ZN4base11trace_event24AllocationContextTracker27GetInstanceForCurrentThreadEv.exit 8: ; preds = %6 tail call void @_ZN4base18ThreadLocalStorage10StaticSlot3SetEPv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN4base11trace_event12_GLOBAL__N_123g_tls_alloc_ctx_trackerE, ptr noundef nonnull inttoptr (i64 -1 to ptr)) %9 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #14 invoke void @_ZN4base11trace_event24AllocationContextTrackerC1Ev(ptr noundef nonnull align 8 dereferenceable(60) %9) - to label %10 unwind label %11 + to label %11 unwind label %11 10: ; preds = %8 tail call void @_ZN4base18ThreadLocalStorage10StaticSlot3SetEPv(ptr noundef nonnull align 4 dereferenceable(8) @_ZN4base11trace_event12_GLOBAL__N_123g_tls_alloc_ctx_trackerE, ptr noundef nonnull %9) @@ -155,7 +155,7 @@ _ZN4base11trace_event24AllocationContextTracker12capture_modeEv.exit: ; preds = resume { ptr, i32 } %12 _ZN4base11trace_event24AllocationContextTracker27GetInstanceForCurrentThreadEv.exit: ; preds = %6, %10 - %.0.i3 = phi ptr [ %9, %10 ], [ %7, %6 ] + %.0.i3 = phi ptr [ %5, %6 ], [ %7, %11 ] %13 = getelementptr inbounds nuw i8, ptr %.0.i3, i64 24 store ptr %0, ptr %13, align 8, !tbaa !16 br label %_ZN4base11trace_event24AllocationContextTracker12capture_modeEv.exit.thread @@ -560,6 +560,9 @@ declare i64 @llvm.usub.sat.i64(i64, i64) #12 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #13 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) +declare void @llvm.assume(i1 noundef) #14 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #12 @@ -577,10 +580,11 @@ attributes #10 = { mustprogress nocallback nofree nounwind willreturn memory(arg attributes #11 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #13 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #14 = { builtin allocsize(0) } -attributes #15 = { builtin nounwind } -attributes #16 = { nounwind } -attributes #17 = { noreturn } +attributes #14 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #15 = { builtin allocsize(0) } +attributes #16 = { builtin nounwind } +attributes #17 = { nounwind } +attributes #18 = { noreturn } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/libquic/optimized/shared_memory_posix.ll b/bench/libquic/optimized/shared_memory_posix.ll index 85095f72975..a87f3672149 100644 --- a/bench/libquic/optimized/shared_memory_posix.ll +++ b/bench/libquic/optimized/shared_memory_posix.ll @@ -375,23 +375,22 @@ define noundef zeroext i1 @_ZN4base12SharedMemory21CreateAndMapAnonymousEm(ptr n %17 = select i1 %16, i32 1, i32 3 %18 = call ptr @mmap(ptr noundef null, i64 noundef %1, i32 noundef %17, i32 noundef 1, i32 noundef %7, i64 noundef 0) #22 store ptr %18, ptr %11, align 8, !tbaa !23 - %magicptr.i.i = ptrtoint ptr %18 to i64 - switch i64 %magicptr.i.i, label %19 [ - i64 -1, label %21 - i64 0, label %21 - ] - -19: ; preds = %13 - %20 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %1, ptr %20, align 8, !tbaa !24 + %.not9.i.i = icmp ne ptr %18, inttoptr (i64 -1 to ptr) + %19 = icmp ne ptr %18, null + %spec.select.i.i = and i1 %.not9.i.i, %19 + br i1 %spec.select.i.i, label %20, label %21 + +20: ; preds = %13 + %21 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %1, ptr %21, align 8, !tbaa !24 br label %_ZN4base12SharedMemory3MapEm.exit -21: ; preds = %13, %13 +21: ; preds = %13 store ptr null, ptr %11, align 8, !tbaa !23 br label %_ZN4base12SharedMemory3MapEm.exit _ZN4base12SharedMemory3MapEm.exit: ; preds = %21, %19, %10, %6, %2 - %22 = phi i1 [ false, %2 ], [ false, %6 ], [ false, %10 ], [ false, %21 ], [ true, %19 ] + %22 = phi i1 [ false, %2 ], [ false, %6 ], [ false, %10 ], [ false, %22 ], [ true, %20 ] ret i1 %22 } @@ -1874,23 +1873,22 @@ define noundef zeroext i1 @_ZN4base12SharedMemory5MapAtElm(ptr noundef nonnull a %14 = select i1 %13, i32 1, i32 3 %15 = tail call ptr @mmap(ptr noundef null, i64 noundef %2, i32 noundef %14, i32 noundef 1, i32 noundef %4, i64 noundef %1) #22 store ptr %15, ptr %8, align 8, !tbaa !23 - %magicptr = ptrtoint ptr %15 to i64 - switch i64 %magicptr, label %16 [ - i64 -1, label %18 - i64 0, label %18 - ] + %.not9 = icmp ne ptr %15, inttoptr (i64 -1 to ptr) + %16 = icmp ne ptr %15, null + %spec.select = and i1 %.not9, %16 + br i1 %spec.select, label %17, label %18 16: ; preds = %10 %17 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %2, ptr %17, align 8, !tbaa !24 br label %19 -18: ; preds = %10, %10 +18: ; preds = %10 store ptr null, ptr %8, align 8, !tbaa !23 br label %19 19: ; preds = %16, %18, %7, %3 - %.0 = phi i1 [ false, %3 ], [ false, %7 ], [ false, %18 ], [ true, %16 ] + %.0 = phi i1 [ false, %3 ], [ false, %7 ], [ false, %19 ], [ true, %17 ] ret i1 %.0 } diff --git a/bench/libsodium/optimized/utils.ll b/bench/libsodium/optimized/utils.ll index 37926d4a5d2..894f91a2cf4 100644 --- a/bench/libsodium/optimized/utils.ll +++ b/bench/libsodium/optimized/utils.ll @@ -360,11 +360,10 @@ define dso_local noalias noundef ptr @sodium_malloc(i64 noundef %0) local_unname %15 = mul i64 %2, 3 %16 = add i64 %14, %15 %17 = tail call ptr @mmap(ptr noundef null, i64 noundef %16, i32 noundef 3, i32 noundef 34, i32 noundef -1, i64 noundef 0) #14 - %magicptr.i = ptrtoint ptr %17 to i64 - switch i64 %magicptr.i, label %_sodium_malloc.exit [ - i64 -1, label %_sodium_malloc.exit.thread - i64 0, label %_sodium_malloc.exit.thread - ] + %18 = icmp eq ptr %17, inttoptr (i64 -1 to ptr) + %19 = icmp eq ptr %17, null + %20 = or i1 %18, %19 + br i1 %20, label %_sodium_malloc.exit.thread, label %_sodium_malloc.exit _sodium_malloc.exit: ; preds = %10 %18 = load i64, ptr @page_size, align 8 @@ -395,8 +394,8 @@ _sodium_malloc.exit: ; preds = %10 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 %35, i8 noundef -37, i64 noundef %0, i1 noundef false) #14 br label %_sodium_malloc.exit.thread -_sodium_malloc.exit.thread: ; preds = %10, %10, %5, %_sodium_malloc.exit, %38 - %.0 = phi ptr [ %35, %38 ], [ null, %_sodium_malloc.exit ], [ null, %5 ], [ null, %10 ], [ null, %10 ] +_sodium_malloc.exit.thread: ; preds = %10, %5, %_sodium_malloc.exit, %38 + %.0 = phi ptr [ %35, %41 ], [ null, %_sodium_malloc.exit ], [ null, %5 ], [ null, %10 ] ret ptr %.0 } diff --git a/bench/lvgl/optimized/lv_fs.ll b/bench/lvgl/optimized/lv_fs.ll index ccb01926ee5..86566bca704 100644 --- a/bench/lvgl/optimized/lv_fs.ll +++ b/bench/lvgl/optimized/lv_fs.ll @@ -155,11 +155,10 @@ lv_fs_get_drv.exit: ; preds = %.lr.ph.i 31: ; preds = %26 %32 = tail call ptr %24(ptr noundef nonnull %13, ptr noundef %.0.i, i32 noundef %2) #6 - %magicptr49 = ptrtoint ptr %32 to i64 - switch i64 %magicptr49, label %33 [ - i64 -1, label %lv_fs_get_drv.exit.thread - i64 0, label %lv_fs_get_drv.exit.thread - ] + %33 = icmp ne ptr %32, null + %34 = icmp ne ptr %32, inttoptr (i64 -1 to ptr) + %or.cond.not = and i1 %33, %34 + br i1 %or.cond.not, label %35, label %lv_fs_get_drv.exit.thread 33: ; preds = %31 store ptr %32, ptr %0, align 8, !tbaa !20 @@ -199,13 +198,13 @@ lv_fs_get_drv.exit: ; preds = %.lr.ph.i br label %lv_fs_get_drv.exit.thread.sink.split lv_fs_get_drv.exit.thread.sink.split: ; preds = %47, %40 - %.sink = phi i32 [ %46, %40 ], [ -2, %47 ] + %.sink = phi i32 [ %46, %42 ], [ -2, %49 ] %48 = getelementptr inbounds nuw i8, ptr %35, i64 4 store i32 %.sink, ptr %48, align 4, !tbaa !29 br label %lv_fs_get_drv.exit.thread -lv_fs_get_drv.exit.thread: ; preds = %16, %lv_fs_get_drv.exit.thread.sink.split, %31, %31, %lv_fs_resolve_path.exit, %20, %22, %33, %3 - %.0 = phi i32 [ 11, %3 ], [ 1, %20 ], [ 9, %22 ], [ 0, %33 ], [ 3, %lv_fs_resolve_path.exit ], [ 12, %31 ], [ 12, %31 ], [ 0, %lv_fs_get_drv.exit.thread.sink.split ], [ 3, %16 ] +lv_fs_get_drv.exit.thread: ; preds = %16, %lv_fs_get_drv.exit.thread.sink.split, %lv_fs_resolve_path.exit, %20, %22, %33, %31, %3 + %.0 = phi i32 [ 11, %3 ], [ 1, %20 ], [ 9, %22 ], [ 0, %35 ], [ 12, %31 ], [ 3, %lv_fs_resolve_path.exit ], [ 0, %.critedge.sink.split ], [ 3, %16 ] ret i32 %.0 } @@ -864,20 +863,19 @@ lv_fs_get_drv.exit: ; preds = %.lr.ph.i 25: ; preds = %21 %26 = tail call ptr %23(ptr noundef nonnull %12, ptr noundef %.0.i) #6 - %magicptr = ptrtoint ptr %26 to i64 - switch i64 %magicptr, label %27 [ - i64 -1, label %lv_fs_get_drv.exit.thread - i64 0, label %lv_fs_get_drv.exit.thread - ] - -27: ; preds = %25 - %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %12, ptr %28, align 8, !tbaa !37 + %27 = icmp eq ptr %26, null + %28 = icmp eq ptr %26, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %27, %28 + br i1 %or.cond, label %lv_fs_get_drv.exit.thread, label %29 + +29: ; preds = %25 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %12, ptr %30, align 8, !tbaa !37 store ptr %26, ptr %0, align 8, !tbaa !39 br label %lv_fs_get_drv.exit.thread -lv_fs_get_drv.exit.thread: ; preds = %15, %lv_fs_resolve_path.exit, %19, %21, %25, %25, %27, %2 - %.0 = phi i32 [ 11, %2 ], [ 1, %19 ], [ 9, %21 ], [ 0, %27 ], [ 12, %25 ], [ 12, %25 ], [ 3, %lv_fs_resolve_path.exit ], [ 3, %15 ] +lv_fs_get_drv.exit.thread: ; preds = %15, %lv_fs_resolve_path.exit, %19, %21, %25, %29, %2 + %.0 = phi i32 [ 11, %2 ], [ 1, %19 ], [ 9, %21 ], [ 0, %29 ], [ 12, %25 ], [ 3, %lv_fs_resolve_path.exit ], [ 3, %15 ] ret i32 %.0 } diff --git a/bench/mold/optimized/gdb-index.cc.X86_64.ll b/bench/mold/optimized/gdb-index.cc.X86_64.ll index c1b10d4ee1c..9c052c8ab04 100644 --- a/bench/mold/optimized/gdb-index.cc.X86_64.ll +++ b/bench/mold/optimized/gdb-index.cc.X86_64.ll @@ -13665,38 +13665,25 @@ define linkonce_odr dso_local { ptr, i8 } @_ZN4mold13ConcurrentMapINS_8MapValueE %14 = icmp eq i64 %.fr122, 0 br i1 %14, label %.split.us.split.us, label %.split.split -.split.us.split.us: ; preds = %5, %.thread64.us.us - %.078.us.us = phi i64 [ %37, %.thread64.us.us ], [ 0, %5 ] - %.sroa.053.076.us.us = phi ptr [ %.sroa.053.1.us.us, %.thread64.us.us ], [ undef, %5 ] - %15 = add i64 %.078.us.us, %9 +.split.us.split.us: ; preds = %5, %.thread68.us.us + %.078.us.us = phi i64 [ %34, %.thread68.us.us ], [ 0, %5 ] + %15 = add i64 %.080.us.us, %9 %16 = and i64 %15, %11 %17 = or i64 %16, %13 %18 = load ptr, ptr %0, align 8, !tbaa !133 %19 = getelementptr inbounds nuw %"struct.mold::ConcurrentMap::Entry", ptr %18, i64 %17 %20 = load atomic i64, ptr %19 acquire, align 8 - switch i64 %20, label %21 [ - i64 -1, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us - i64 0, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us - ] + %21 = add i64 %20, 1 + %or.cond.not.us.us = icmp ult i64 %21, 2 + br i1 %or.cond.not.us.us, label %26, label %22 21: ; preds = %.split.us.split.us %22 = getelementptr inbounds nuw i8, ptr %19, i64 8 %23 = load i32, ptr %22, align 8, !tbaa !152 %24 = icmp eq i32 %23, 0 - %25 = getelementptr inbounds nuw i8, ptr %19, i64 12 - %spec.select = select i1 %24, ptr %25, ptr %.sroa.053.076.us.us - %spec.select203 = select i1 %24, i32 1, i32 4 - br label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us - -_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us: ; preds = %21, %.split.us.split.us, %.split.us.split.us - %.sroa.053.1.us.us = phi ptr [ %.sroa.053.076.us.us, %.split.us.split.us ], [ %.sroa.053.076.us.us, %.split.us.split.us ], [ %spec.select, %21 ] - %.1.us.us = phi i32 [ 0, %.split.us.split.us ], [ 0, %.split.us.split.us ], [ %spec.select203, %21 ] - switch i64 %20, label %36 [ - i64 -1, label %26 - i64 0, label %26 - ] + br i1 %25, label %51, label %.thread64.us.us -26: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us +26: ; preds = %.split.us.split.us %27 = cmpxchg ptr %19, i64 0, i64 -1 acquire acquire, align 8 %28 = extractvalue { i64, i1 } %27, 1 br i1 %28, label %.split80.us, label %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit.us.us @@ -13710,65 +13697,51 @@ _ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit.us.us: ; %31 = getelementptr inbounds nuw i8, ptr %19, i64 8 %32 = load i32, ptr %31, align 8, !tbaa !152 %33 = icmp eq i32 %32, 0 - br i1 %33, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41, label %.thread64.us.us - -.lr.ph.us.us: ; preds = %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit.us.us, %.lr.ph.us.us - tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"() #12, !srcloc !854 - %34 = load atomic i64, ptr %19 acquire, align 8 - %35 = icmp eq i64 %34, -1 - br i1 %35, label %.lr.ph.us.us, label %._crit_edge.us.us, !llvm.loop !855 - -36: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us.us - switch i32 %.1.us.us, label %.thread [ - i32 0, label %.thread64.us.us - i32 4, label %.thread64.us.us - ] - -.thread64.us.us: ; preds = %36, %36, %._crit_edge.us.us - %37 = add nuw nsw i64 %.078.us.us, 1 - %exitcond178 = icmp eq i64 %37, 256 - br i1 %exitcond178, label %.critedge, label %.split.us.split.us, !llvm.loop !856 - -.split.split: ; preds = %5, %.thread64 - %.078 = phi i64 [ %76, %.thread64 ], [ 0, %5 ] - %.sroa.053.076 = phi ptr [ %.sroa.053.1, %.thread64 ], [ undef, %5 ] - %38 = add i64 %.078, %9 + br i1 %33, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41, label %.thread68.us.us + +.lr.ph.us.us: ; preds = %._crit_edge.us.us, %22 + %34 = add nuw nsw i64 %.080.us.us, 1 + %exitcond152 = icmp eq i64 %34, 256 + br i1 %exitcond152, label %.critedge, label %.split.us.split.us, !llvm.loop !854 + +.thread64.us.us: ; preds = %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit.us.us, %.lr.ph.us.us + tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"() #12, !srcloc !855 + %35 = load atomic i64, ptr %19 acquire, align 8 + %36 = icmp eq i64 %35, -1 + br i1 %36, label %.lr.ph.us.us, label %._crit_edge.us.us, !llvm.loop !856 + +.split.split:; preds = %5, %.thread68 + %.sroa.053.076 = phi i64 [ %75, %.thread68 ], [ 0, %5 ] + %38 = add i64 %.080, %9 %39 = and i64 %38, %11 %40 = or i64 %39, %13 %41 = load ptr, ptr %0, align 8, !tbaa !133 %42 = getelementptr inbounds nuw %"struct.mold::ConcurrentMap::Entry", ptr %41, i64 %40 %43 = load atomic i64, ptr %42 acquire, align 8 %.0.i.i.i = inttoptr i64 %43 to ptr - switch i64 %43, label %44 [ - i64 -1, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - i64 0, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - ] + %43 = add i64 %43, 1 + %or.cond.not = icmp ult i64 %43, 2 + br i1 %or.cond.not, label %51, label %44 44: ; preds = %.split.split %45 = getelementptr inbounds nuw i8, ptr %42, i64 8 %46 = load i32, ptr %45, align 8, !tbaa !152 %47 = zext i32 %46 to i64 %48 = icmp eq i64 %.fr122, %47 - br i1 %48, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread + br i1 %48, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, label %.thread68 _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i: ; preds = %44 - %bcmp.i = tail call i32 @bcmp(ptr %2, ptr %.0.i.i.i, i64 %.fr122) + %bcmp.i = tail call i32 @bcmp(ptr %2, ptr nonnull %.0.i.i.i, i64 %.fr122) %49 = icmp eq i32 %bcmp.i, 0 - %50 = getelementptr inbounds nuw i8, ptr %42, i64 12 - %spec.select204 = select i1 %49, ptr %50, ptr %.sroa.053.076 - %spec.select205 = select i1 %49, i32 1, i32 4 - br label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - -_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %44, %.split.split, %.split.split - %.sroa.053.1 = phi ptr [ %.sroa.053.076, %.split.split ], [ %.sroa.053.076, %.split.split ], [ %.sroa.053.076, %44 ], [ %spec.select204, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] - %.1 = phi i32 [ 0, %.split.split ], [ 0, %.split.split ], [ 4, %44 ], [ %spec.select205, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] - switch i64 %43, label %75 [ - i64 -1, label %51 - i64 0, label %51 - ] + br i1 %49, label %51, label %75 + +51: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %22 + %.us-phi = phi ptr [ %19, %22 ], [ %42, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] + %50 = getelementptr inbounds nuw i8, ptr %.us-phi, i64 12 + br label %.thread62 -51: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - %52 = cmpxchg ptr %42, i64 0, i64 -1 acquire acquire, align 8 +51: ; preds = %.split.split + %52 = cmpxchg ptr %41, i64 0, i64 -1 acquire acquire, align 8 %53 = extractvalue { i64, i1 } %52, 1 br i1 %53, label %.split80.us, label %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit @@ -13798,10 +13771,10 @@ _ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit: ; preds br label %.thread .lr.ph: ; preds = %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit, %.lr.ph - tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"() #12, !srcloc !854 + tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"() #12, !srcloc !855 %67 = load atomic i64, ptr %42 acquire, align 8 %68 = icmp eq i64 %67, -1 - br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !855 + br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !856 ._crit_edge: ; preds = %.lr.ph, %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit %.055.in.lcssa = phi i64 [ %54, %_ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit ], [ %67, %.lr.ph ] @@ -13809,38 +13782,32 @@ _ZNSt6atomicIPKcE23compare_exchange_strongERS1_S1_St12memory_order.exit: ; preds %70 = load i32, ptr %69, align 8, !tbaa !152 %71 = zext i32 %70 to i64 %72 = icmp eq i64 %.fr122, %71 - br i1 %72, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i38, label %.thread64 + br i1 %72, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i38, label %.thread68 _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i38: ; preds = %._crit_edge %.055.le = inttoptr i64 %.055.in.lcssa to ptr %bcmp.i39 = tail call i32 @bcmp(ptr %2, ptr %.055.le, i64 %.fr122) %73 = icmp eq i32 %bcmp.i39, 0 - br i1 %73, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41, label %.thread64 + br i1 %73, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41, label %.thread68 _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i38, %._crit_edge.us.us - %.us-phi81 = phi ptr [ %19, %._crit_edge.us.us ], [ %42, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i38 ] + %.us-phi81 = phi ptr [ %19, %._crit_edge.us.us ], [ %42, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i37 ] %74 = getelementptr inbounds nuw i8, ptr %.us-phi81, i64 12 br label %.thread -75: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - switch i32 %.1, label %.thread [ - i32 0, label %.thread64 - i32 4, label %.thread64 - ] - -.thread64: ; preds = %._crit_edge, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i38, %75, %75 - %76 = add nuw nsw i64 %.078, 1 - %exitcond = icmp eq i64 %76, 256 - br i1 %exitcond, label %.critedge, label %.split.split, !llvm.loop !856 +75: ; preds = %._crit_edge, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i37, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %44 + %75 = add nuw nsw i64 %.080, 1 + %exitcond = icmp eq i64 %75, 256 + br i1 %exitcond, label %.critedge, label %.split.split, !llvm.loop !854 -.critedge: ; preds = %.thread64, %.thread64.us.us - %77 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.32) +.critedge: ; preds = %.thread68, %.thread68.us.us + %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.32) tail call void @abort() #27 unreachable -.thread: ; preds = %75, %36, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41, %.split80.us - %.sroa.454.263 = phi i8 [ 0, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41 ], [ 1, %.split80.us ], [ 0, %36 ], [ 0, %75 ] - %.sroa.053.262 = phi ptr [ %74, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41 ], [ %56, %.split80.us ], [ %.sroa.053.1.us.us, %36 ], [ %.sroa.053.1, %75 ] +.thread: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit41, %.split80.us, %51 + %.sroa.454.263 = phi i8 [ 0, %.thread74 ], [ 0, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit40 ], [ 1, %.split82.us ] + %.sroa.053.262 = phi ptr [ %50, %.thread74 ], [ %74, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit40 ], [ %56, %.split82.us ] %.fca.0.insert = insertvalue { ptr, i8 } poison, ptr %.sroa.053.262, 0 %.fca.1.insert = insertvalue { ptr, i8 } %.fca.0.insert, i8 %.sroa.454.263, 1 ret { ptr, i8 } %.fca.1.insert @@ -17290,8 +17257,8 @@ attributes #31 = { nounwind allocsize(0) } !851 = !{!"_ZTSZN4mold15write_gdb_indexINS_6X86_64EEEvRNS_7ContextIT_EEEUlRNS_8CompunitEE0_", !135, i64 0} !852 = !{!147, !58, i64 0} !853 = !{!147, !58, i64 8} -!854 = !{i64 149053} -!855 = distinct !{!855, !127} +!854 = distinct !{!854, !127} +!855 = !{i64 149053} !856 = distinct !{!856, !127} !857 = !{!858, !519, i64 112} !858 = !{!"_ZTSN3tbb6detail2d19start_forINS1_13blocked_rangeIlEENS1_25parallel_for_body_wrapperIZN4mold13ConcurrentMapINS6_8MapValueEE22get_sorted_entries_allEvEUllE_lEEKNS1_16auto_partitionerEEE", !502, i64 0, !423, i64 64, !427, i64 88, !519, i64 112, !526, i64 120, !508, i64 136} diff --git a/bench/nanobind/optimized/nb_func.ll b/bench/nanobind/optimized/nb_func.ll index 5cc4e2d4dd9..83d1515107e 100644 --- a/bench/nanobind/optimized/nb_func.ll +++ b/bench/nanobind/optimized/nb_func.ll @@ -2134,11 +2134,8 @@ define internal noundef ptr @_ZN8nanobind6detailL27nb_func_vectorcall_simple_0EP to label %16 unwind label %17 16: ; preds = %8 - %magicptr = ptrtoint ptr %15 to i64 - switch i64 %magicptr, label %.thread [ - i64 1, label %.thread34 - i64 0, label %33 - ] + %17 = icmp eq ptr %15, inttoptr (i64 1 to ptr) + br i1 %17, label %.thread36, label %34 17: ; preds = %8 %18 = landingpad { ptr, i32 } @@ -2154,7 +2151,7 @@ define internal noundef ptr @_ZN8nanobind6detailL27nb_func_vectorcall_simple_0EP 23: ; preds = %17 %24 = tail call ptr @__cxa_begin_catch(ptr %19) #26 %25 = invoke fastcc noundef zeroext i1 @_ZN8nanobind6detailL28set_builtin_exception_statusERNS_17builtin_exceptionE(ptr noundef nonnull align 8 dereferenceable(20) %24) - to label %26 unwind label %36 + to label %27 unwind label %36 26: ; preds = %23 invoke void @__cxa_end_catch() @@ -2179,18 +2176,19 @@ define internal noundef ptr @_ZN8nanobind6detailL27nb_func_vectorcall_simple_0EP to label %.thread unwind label %36 33: ; preds = %16 - br label %.thread34 + %.not = icmp eq ptr %15, null + br i1 %.not, label %.thread36, label %.thread 34: ; preds = %26 br i1 %25, label %.thread, label %.thread34, !prof !36 -.thread34: ; preds = %4, %16, %33, %34 +.thread34: ; preds = %34, %4, %16, %34 %.138 = phi ptr [ @_ZN8nanobind6detailL22nb_func_error_overloadEP7_objectPKS2_mS2_, %34 ], [ @_ZN8nanobind6detailL22nb_func_error_overloadEP7_objectPKS2_mS2_, %4 ], [ @_ZN8nanobind6detailL22nb_func_error_overloadEP7_objectPKS2_mS2_, %16 ], [ @_ZN8nanobind6detailL23nb_func_error_noconvertEP7_objectPKS2_mS2_, %33 ] - %35 = tail call noundef ptr %.138(ptr noundef %0, ptr noundef %1, i64 noundef %5, ptr noundef %3) #26, !callees !35 + %35 = tail call noundef ptr %.140(ptr noundef %0, ptr noundef %1, i64 noundef %5, ptr noundef %3) #26, !callees !35 br label %.thread -.thread: ; preds = %.invoke, %16, %.thread34, %34 - %.124 = phi ptr [ %35, %.thread34 ], [ null, %34 ], [ %15, %16 ], [ null, %.invoke ] +.thread: ; preds = %.invoke, %34, %.thread34, %34 + %.124 = phi ptr [ %35, %.thread36 ], [ null, %34 ], [ %15, %34 ], [ null, %.invoke ] ret ptr %.124 36: ; preds = %.invoke, %26, %23 @@ -2240,11 +2238,8 @@ define internal noundef ptr @_ZN8nanobind6detailL27nb_func_vectorcall_simple_1EP to label %25 unwind label %26 25: ; preds = %16 - %magicptr = ptrtoint ptr %24 to i64 - switch i64 %magicptr, label %43 [ - i64 1, label %65 - i64 0, label %42 - ] + %26 = icmp eq ptr %24, inttoptr (i64 1 to ptr) + br i1 %26, label %65, label %43 26: ; preds = %16 %27 = landingpad { ptr, i32 } @@ -2285,11 +2280,11 @@ define internal noundef ptr @_ZN8nanobind6detailL27nb_func_vectorcall_simple_1EP invoke void @__cxa_end_catch() to label %65 unwind label %71 -42: ; preds = %25 - br label %65 - 43: ; preds = %25 - br i1 %.not, label %65, label %44 + %.not44 = icmp eq ptr %24, null + %brmerge = select i1 %.not44, i1 true, i1 %.not + %_ZN8nanobind6detailL23nb_func_error_noconvertEP7_objectPKS2_mS2_.mux = select i1 %.not44, ptr @_ZN8nanobind6detailL23nb_func_error_noconvertEP7_objectPKS2_mS2_, ptr null + br i1 %brmerge, label %65, label %44 44: ; preds = %43 %45 = getelementptr inbounds nuw i8, ptr %15, i64 20 @@ -2325,9 +2320,9 @@ _ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit: ; preds = %50, %62 call void %54(ptr noundef %64, ptr noundef %15) #26 br label %65 -65: ; preds = %.invoke, %35, %44, %_ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit, %25, %43, %42 - %.036 = phi ptr [ %24, %43 ], [ null, %42 ], [ inttoptr (i64 1 to ptr), %25 ], [ %24, %_ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit ], [ %24, %44 ], [ null, %35 ], [ null, %.invoke ] - %.1 = phi ptr [ null, %43 ], [ @_ZN8nanobind6detailL23nb_func_error_noconvertEP7_objectPKS2_mS2_, %42 ], [ @_ZN8nanobind6detailL22nb_func_error_overloadEP7_objectPKS2_mS2_, %25 ], [ null, %_ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit ], [ null, %44 ], [ %spec.select, %35 ], [ null, %.invoke ] +65: ; preds = %.invoke, %35, %44, %_ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit, %43, %25 + %.036 = phi ptr [ inttoptr (i64 1 to ptr), %25 ], [ %24, %43 ], [ %24, %_ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit ], [ %24, %44 ], [ null, %35 ], [ null, %.invoke ] + %.1 = phi ptr [ @_ZN8nanobind6detailL22nb_func_error_overloadEP7_objectPKS2_mS2_, %24 ], [ %_ZN8nanobind6detailL23nb_func_error_noconvertEP7_objectPKS2_mS2_.mux, %43 ], [ null, %_ZN8nanobind6detail8inst_ptrEPNS0_7nb_instE.exit ], [ null, %44 ], [ %spec.select, %35 ], [ null, %.invoke ] %66 = load i32, ptr %5, align 8 %.not51 = icmp eq i32 %66, 1 br i1 %.not51, label %68, label %67, !prof !8 diff --git a/bench/node/optimized/libnode.node_large_page.ll b/bench/node/optimized/libnode.node_large_page.ll index e329be5d138..375ac2e7be3 100644 --- a/bench/node/optimized/libnode.node_large_page.ll +++ b/bench/node/optimized/libnode.node_large_page.ll @@ -574,14 +574,14 @@ if.end12.i: ; preds = %if.end7.i br i1 %cmp15.i, label %fail.i, label %if.end17.i if.end17.i: ; preds = %if.end12.i - switch i64 %sub.ptr.rhs.cast.i7, label %if.then.i.i [ - i64 -1, label %cleanup.i12 - i64 0, label %cleanup.i12 - ] + %cmp.i24.i = icmp ne ptr %r.sroa.0.0, inttoptr (i64 -1 to ptr) + %cmp1.i.i = icmp ne ptr %r.sroa.0.0, null + %or.cond.i.i = and i1 %cmp.i24.i, %cmp1.i.i + br i1 %or.cond.i.i, label %if.then.i.i, label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i if.then.i.i: ; preds = %if.end17.i %call.i25.i = call i32 (i32, ...) @prctl(i32 noundef 1398164801, i32 noundef 0, i64 noundef %sub.ptr.rhs.cast.i7, i64 noundef %sub.ptr.sub.i8, i64 noundef ptrtoint (ptr @.str.38 to i64)) #16 - br label %cleanup.i12 + br label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i fail.i: ; preds = %if.end12.i, %if.end7.i, %if.end.i10, %if.end3 %tmem.sroa.4.0.i = phi ptr [ null, %if.end3 ], [ inttoptr (i64 -1 to ptr), %if.end.i10 ], [ %call.i.i11, %if.end7.i ], [ %call.i.i11, %if.end12.i ] @@ -589,35 +589,26 @@ fail.i: ; preds = %if.end12.i, %if.end %call18.i = tail call ptr @__errno_location() #18 %39 = load i32, ptr %call18.i, align 4 call fastcc void @_ZN4node12_GLOBAL__N_116PrintSystemErrorEi(i32 noundef %39) - br label %cleanup.i12 - -cleanup.i12: ; preds = %fail.i, %if.then.i.i, %if.end17.i, %if.end17.i - %tmem.sroa.4.1.i = phi ptr [ %tmem.sroa.4.0.i, %fail.i ], [ null, %if.end17.i ], [ null, %if.end17.i ], [ null, %if.then.i.i ] - %tmem.sroa.0.1.i = phi i64 [ %tmem.sroa.0.0.i, %fail.i ], [ 0, %if.end17.i ], [ 0, %if.end17.i ], [ 0, %if.then.i.i ] - %retval.0.i13 = phi i32 [ -1, %fail.i ], [ 0, %if.end17.i ], [ 0, %if.end17.i ], [ 0, %if.then.i.i ] - %magicptr.i = ptrtoint ptr %tmem.sroa.4.1.i to i64 - switch i64 %magicptr.i, label %if.end5.i.i [ - i64 0, label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i - i64 -1, label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i - ] + %cmp.i.i13 = icmp eq ptr %tmem.sroa.4.0.i, null + %cmp3.i.i = icmp eq ptr %tmem.sroa.4.0.i, inttoptr (i64 -1 to ptr) + %or.cond.i14 = or i1 %cmp.i.i13, %cmp3.i.i + br i1 %or.cond.i14, label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i, label %if.end5.i.i if.end5.i.i: ; preds = %cleanup.i12 - %call.i57.i = call i32 @munmap(ptr noundef nonnull %tmem.sroa.4.1.i, i64 noundef %tmem.sroa.0.1.i) #16 + %call.i57.i = call i32 @munmap(ptr noundef nonnull %tmem.sroa.4.0.i, i64 noundef %tmem.sroa.0.0.i) #16 %cmp7.i.i = icmp eq i32 %call.i57.i, 0 br i1 %cmp7.i.i, label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i, label %if.end9.i.i if.end9.i.i: ; preds = %if.end5.i.i - %call10.i.i = tail call ptr @__errno_location() #18 - %40 = load i32, ptr %call10.i.i, align 4 + %40 = load i32, ptr %call18.i, align 4 call fastcc void @_ZN4node12_GLOBAL__N_116PrintSystemErrorEi(i32 noundef %40) br label %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i -_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i: ; preds = %if.end9.i.i, %if.end5.i.i, %cleanup.i12, %cleanup.i12 - %magicptr24.i = ptrtoint ptr %call.i34.i to i64 - switch i64 %magicptr24.i, label %if.end5.i65.i [ - i64 -1, label %return - i64 0, label %return - ] +_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i: ; preds = %if.end9.i.i, %if.end5.i.i, %cleanup.i12, %if.then.i.i, %if.end17.i + %retval.07.i = phi i32 [ -1, %if.end5.i.i ], [ -1, %cleanup.i12 ], [ -1, %if.end9.i.i ], [ 0, %if.end17.i ], [ 0, %if.then.i.i ] + %cmp.i61.i = icmp eq ptr %call.i34.i, null + %brmerge.i = or i1 %cmp.i61.i, %cmp.i9 + br i1 %brmerge.i, label %return, label %if.end5.i65.i if.end5.i65.i: ; preds = %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i %call.i67.i = call i32 @munmap(ptr noundef nonnull %call.i34.i, i64 noundef %sub.ptr.sub.i8) #16 @@ -630,8 +621,8 @@ if.end9.i69.i: ; preds = %if.end5.i65.i call fastcc void @_ZN4node12_GLOBAL__N_116PrintSystemErrorEi(i32 noundef %41) br label %return -return: ; preds = %if.end9.i69.i, %if.end5.i65.i, %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i, %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i, %_ZN4node12_GLOBAL__N_129IsTransparentHugePagesEnabledEv.exit.thread, %_ZN4node12_GLOBAL__N_118FindNodeTextRegionEv.exit, %if.end4.i - %retval.0 = phi i32 [ 13, %if.end4.i ], [ 2, %_ZN4node12_GLOBAL__N_118FindNodeTextRegionEv.exit ], [ 13, %_ZN4node12_GLOBAL__N_129IsTransparentHugePagesEnabledEv.exit.thread ], [ %retval.0.i13, %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i ], [ %retval.0.i13, %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i ], [ %retval.0.i13, %if.end5.i65.i ], [ %retval.0.i13, %if.end9.i69.i ] +return: ; preds = %if.end9.i69.i, %if.end5.i65.i, %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i, %_ZN4node12_GLOBAL__N_129IsTransparentHugePagesEnabledEv.exit.thread, %_ZN4node12_GLOBAL__N_118FindNodeTextRegionEv.exit, %if.end4.i + %retval.0 = phi i32 [ 13, %if.end4.i ], [ 2, %_ZN4node12_GLOBAL__N_118FindNodeTextRegionEv.exit ], [ 13, %_ZN4node12_GLOBAL__N_129IsTransparentHugePagesEnabledEv.exit.thread ], [ %retval.07.i, %_ZN4node12_GLOBAL__N_116MemoryMapPointerD2Ev.exit.i ], [ %retval.07.i, %if.end5.i65.i ], [ %retval.07.i, %if.end9.i69.i ] ret i32 %retval.0 } diff --git a/bench/open3d/optimized/VoxelGrid.ll b/bench/open3d/optimized/VoxelGrid.ll index ae262b31de7..e112201f9f8 100644 --- a/bench/open3d/optimized/VoxelGrid.ll +++ b/bench/open3d/optimized/VoxelGrid.ll @@ -34329,6 +34329,7 @@ _ZNSt13unordered_mapIN5Eigen6MatrixIiLi3ELi1ELi0ELi3ELi1EEEN6open3d8geometry5Vox br label %49 .lr.ph66: ; preds = %49 + %39 = getelementptr inbounds nuw i8, ptr %0, i64 48 %.sroa.542.0..sroa_idx = getelementptr inbounds nuw i8, ptr %5, i64 4 %.sroa.643.0..sroa_idx = getelementptr inbounds nuw i8, ptr %5, i64 8 %39 = getelementptr inbounds nuw i8, ptr %5, i64 16 @@ -34343,7 +34344,7 @@ _ZNSt13unordered_mapIN5Eigen6MatrixIiLi3ELi1ELi0ELi3ELi1EEEN6open3d8geometry5Vox br i1 %.not.i25, label %_ZNSt14_Function_baseD2Ev.exit26, label %44 44: ; preds = %41 - %45 = invoke noundef zeroext i1 %43(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 3) + %45 = invoke noundef zeroext i1 %44(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 3) to label %_ZNSt14_Function_baseD2Ev.exit26 unwind label %46 46: ; preds = %44 @@ -34358,8 +34359,8 @@ _ZNSt14_Function_baseD2Ev.exit26: ; preds = %41, %44 br label %114 49: ; preds = %.lr.ph, %49 - %50 = phi double [ %.promoted, %.lr.ph ], [ %56, %49 ] - %.sroa.053.063 = phi ptr [ %37, %.lr.ph ], [ %57, %49 ] + %50 = phi double [ %.promoted, %.lr.ph ], [ %56, %50 ] + %.sroa.053.063 = phi ptr [ %37, %.lr.ph ], [ %57, %50 ] %51 = getelementptr inbounds nuw i8, ptr %.sroa.053.063, i64 24 %52 = load ptr, ptr %51, align 8, !tbaa !755 %53 = getelementptr inbounds nuw i8, ptr %52, i64 24 @@ -34414,7 +34415,7 @@ _ZNSt13unordered_mapISt10shared_ptrIN6open3d8geometry19OctreeColorLeafNodeEES0_I ret void 70: ; preds = %.lr.ph66, %101 - %.sroa.049.065 = phi ptr [ %37, %.lr.ph66 ], [ %111, %101 ] + %.sroa.049.065 = phi ptr [ %37, %.lr.ph66 ], [ %111, %102 ] %71 = getelementptr inbounds nuw i8, ptr %.sroa.049.065, i64 8 %72 = getelementptr inbounds nuw i8, ptr %.sroa.049.065, i64 24 %73 = load ptr, ptr %72, align 8, !tbaa !755 @@ -34430,7 +34431,7 @@ _ZNSt13unordered_mapISt10shared_ptrIN6open3d8geometry19OctreeColorLeafNodeEES0_I %82 = fadd double %76, %79 %83 = load <2 x double>, ptr %24, align 8, !tbaa !28 %84 = load double, ptr %26, align 8, !tbaa !33 - %85 = load double, ptr %38, align 8, !tbaa !33, !noalias !763 + %85 = load double, ptr %39, align 8, !tbaa !33, !noalias !763 %foldExtExtBinop = fsub <2 x double> %81, %83 %86 = extractelement <2 x double> %foldExtExtBinop, i64 0 %87 = fdiv double %86, %85 @@ -34453,7 +34454,7 @@ _ZNSt13unordered_mapISt10shared_ptrIN6open3d8geometry19OctreeColorLeafNodeEES0_I store i32 %97, ptr %.sroa.643.0..sroa_idx, align 8, !tbaa !28 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(24) %99, i64 24, i1 false), !tbaa.struct !30 %100 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt8__detail9_Map_baseIN5Eigen6MatrixIiLi3ELi1ELi0ELi3ELi1EEESt4pairIKS3_N6open3d8geometry5VoxelEESaIS9_ENS_10_Select1stESt8equal_toIS3_ENS6_7utility10hash_eigenIS3_EENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(40) %5) - to label %101 unwind label %112 + to label %102 unwind label %112 101: ; preds = %70 %102 = load i32, ptr %5, align 8, !tbaa !31 @@ -34482,7 +34483,7 @@ _ZNSt13unordered_mapISt10shared_ptrIN6open3d8geometry19OctreeColorLeafNodeEES0_I br label %114 114: ; preds = %112, %_ZNSt14_Function_baseD2Ev.exit26 - %.pn20.pn.pn.pn = phi { ptr, i32 } [ %42, %_ZNSt14_Function_baseD2Ev.exit26 ], [ %113, %112 ] + %.pn20.pn.pn.pn = phi { ptr, i32 } [ %42, %_ZNSt14_Function_baseD2Ev.exit26 ], [ %113, %113 ] call void @_ZNSt13unordered_mapISt10shared_ptrIN6open3d8geometry19OctreeColorLeafNodeEES0_INS2_14OctreeNodeInfoEESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #38 call void @llvm.lifetime.end.p0(ptr nonnull %3) resume { ptr, i32 } %.pn20.pn.pn.pn diff --git a/bench/opencv/optimized/perf_layer.ll b/bench/opencv/optimized/perf_layer.ll index d1a2e68b143..0ae545db5f1 100644 --- a/bench/opencv/optimized/perf_layer.ll +++ b/bench/opencv/optimized/perf_layer.ll @@ -110244,7 +110244,7 @@ _ZNSt12_Vector_baseIN2cv3MatESaIS1_EE13_M_deallocateEPS1_m.exit: ; preds = %_ZSt %110 = landingpad { ptr, i32 } cleanup invoke void @__cxa_end_catch() - to label %113 unwind label %114 + to label %112 unwind label %114 111: ; preds = %.body95 tail call void @_ZdlPv(ptr noundef nonnull %81) #31 @@ -110252,7 +110252,7 @@ _ZNSt12_Vector_baseIN2cv3MatESaIS1_EE13_M_deallocateEPS1_m.exit: ; preds = %_ZSt _ZNSt12_Vector_baseIN2cv3MatESaIS1_EE13_M_deallocateEPS1_m.exit125: ; preds = %.lr.ph.i.i.i115, %111 invoke void @__cxa_rethrow() #33 - to label %117 unwind label %109 + to label %116 unwind label %109 112: ; preds = %_ZSt4fillIPN2cv3MatES1_EvT_S3_RKT0_.exit, %_ZNSt12_Vector_baseIN2cv3MatESaIS1_EE13_M_deallocateEPS1_m.exit, %4 ret void diff --git a/bench/openjdk/optimized/classLoader.ll b/bench/openjdk/optimized/classLoader.ll index 5eb6d0b7b4a..c1360c0825f 100644 --- a/bench/openjdk/optimized/classLoader.ll +++ b/bench/openjdk/optimized/classLoader.ll @@ -2871,14 +2871,14 @@ define internal fastcc void @_ZL24print_module_entry_tablePK13GrowableArrayIP19M %42 = load volatile ptr, ptr %41, align 8 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #21, !srcloc !9 %cond = icmp eq ptr %42, null - br i1 %cond, label %._crit_edge, label %.lr.ph + br i1 %cond, label %._crit_edge, label %.lr.ph, !llvm.loop !19 ._crit_edge: ; preds = %.lr.ph, %.lr.ph.preheader, %17 %43 = load ptr, ptr @tty, align 8 tail call void (ptr, ptr, ...) @_ZN12outputStream5printEPKcz(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull @.str.96) #21 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond.not, label %._crit_edge21, label %17, !llvm.loop !19 + br i1 %exitcond.not, label %._crit_edge21, label %17, !llvm.loop !20 ._crit_edge21: ; preds = %._crit_edge, %1 %44 = load ptr, ptr %7, align 8 @@ -3245,7 +3245,7 @@ _ZNK6HandleclEv.exit: ; preds = %24, %38 %56 = load volatile ptr, ptr %55, align 8 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #21, !srcloc !9 %57 = icmp samesign ugt i32 %.048.i, 2 - br i1 %57, label %.lr.ph.i, label %_ZN11ClassLoader15classpath_entryEi.exit, !llvm.loop !20 + br i1 %57, label %.lr.ph.i, label %_ZN11ClassLoader15classpath_entryEi.exit, !llvm.loop !21 _ZN11ClassLoader15classpath_entryEi.exit: ; preds = %.lr.ph.i, %48, %50 %.05.i = phi ptr [ %49, %48 ], [ %51, %50 ], [ %56, %.lr.ph.i ] @@ -3387,7 +3387,7 @@ _ZNK6HandleclEv.exit: ; preds = %49, %52 %63 = load i32, ptr %15, align 4 %64 = sext i32 %63 to i64 %65 = icmp slt i64 %indvars.iv.next, %64 - br i1 %65, label %42, label %._crit_edge, !llvm.loop !21 + br i1 %65, label %42, label %._crit_edge, !llvm.loop !22 ._crit_edge: ; preds = %_ZNK6HandleclEv.exit, %_ZN14objArrayHandleC2EP6ThreadP15objArrayOopDesc.exit %storemerge.i.i32 = phi ptr [ %.0.i.i.i.i.i, %_ZN14objArrayHandleC2EP6ThreadP15objArrayOopDesc.exit ], [ %storemerge.i.i31, %_ZNK6HandleclEv.exit ] @@ -3516,7 +3516,7 @@ _ZN11MutexLockerC2EP6ThreadP5MutexNS2_18SafepointCheckFlagE.exit: ; preds = %27, 34: ; preds = %35 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i - br i1 %exitcond.not.i, label %_ZL21find_first_module_cpeP11ModuleEntryPK13GrowableArrayIP19ModuleClassPathListE.exit, label %35, !llvm.loop !22 + br i1 %exitcond.not.i, label %_ZL21find_first_module_cpeP11ModuleEntryPK13GrowableArrayIP19ModuleClassPathListE.exit, label %35, !llvm.loop !23 35: ; preds = %34, %.lr.ph.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.i ], [ %indvars.iv.next.i, %34 ] @@ -3553,7 +3553,7 @@ _ZL21find_first_module_cpeP11ModuleEntryPK13GrowableArrayIP19ModuleClassPathList 48: ; preds = %49 %indvars.iv.next.i38 = add nuw nsw i64 %indvars.iv.i36, 1 %exitcond.not.i39 = icmp eq i64 %indvars.iv.next.i38, %wide.trip.count.i35 - br i1 %exitcond.not.i39, label %._crit_edge, label %49, !llvm.loop !22 + br i1 %exitcond.not.i39, label %._crit_edge, label %49, !llvm.loop !23 49: ; preds = %48, %.lr.ph.i34 %indvars.iv.i36 = phi i64 [ 0, %.lr.ph.i34 ], [ %indvars.iv.next.i38, %48 ] @@ -3587,7 +3587,7 @@ _ZN11MutexLockerD2Ev.exit: ; preds = %53, %42, %_ZL21find %62 = load volatile ptr, ptr %61, align 8 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #21, !srcloc !9 %.not28 = icmp eq ptr %62, null - br i1 %.not28, label %._crit_edge, label %.lr.ph, !llvm.loop !23 + br i1 %.not28, label %._crit_edge, label %.lr.ph, !llvm.loop !24 ._crit_edge: ; preds = %48, %.lr.ph, %60, %43, %20, %21, %_ZN11MutexLockerD2Ev.exit %.021 = phi ptr [ null, %_ZN11MutexLockerD2Ev.exit ], [ null, %21 ], [ null, %20 ], [ null, %43 ], [ null, %60 ], [ %59, %.lr.ph ], [ null, %48 ] @@ -3680,7 +3680,7 @@ define hidden noundef ptr @_ZN11ClassLoader10load_classEP6SymbolP12PackageEntryb call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #21, !srcloc !9 %53 = add i16 %.14467, 1 %.not = icmp eq ptr %52, null - br i1 %.not, label %.thread, label %.lr.ph, !llvm.loop !24 + br i1 %.not, label %.thread, label %.lr.ph, !llvm.loop !25 54: ; preds = %42 br i1 %43, label %.thread, label %.thread57 @@ -3782,7 +3782,7 @@ define hidden noundef ptr @_ZN11ClassLoader17skip_uri_protocolEPc(ptr noundef re %5 = load i8, ptr %4, align 1 %6 = icmp eq i8 %5, 47 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - br i1 %6, label %.preheader, label %7, !llvm.loop !25 + br i1 %6, label %.preheader, label %7, !llvm.loop !26 7: ; preds = %.preheader %8 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv @@ -3879,7 +3879,7 @@ _ZN11FileMapInfo26get_number_of_shared_pathsEv.exit: ; preds = %25 %50 = load i8, ptr %49, align 1 %51 = icmp eq i8 %50, 47 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - br i1 %51, label %.preheader.i, label %52, !llvm.loop !25 + br i1 %51, label %.preheader.i, label %52, !llvm.loop !26 52: ; preds = %.preheader.i %53 = getelementptr inbounds nuw i8, ptr %26, i64 %indvars.iv.i @@ -3959,7 +3959,7 @@ _ZL18string_starts_withPKcS0_.exit.thread.us: ; preds = %_ZL18string_starts_ %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %89 = load ptr, ptr @_ZN11FileMapInfo18_shared_path_tableE, align 8 %90 = icmp eq ptr %89, null - br i1 %90, label %.critedge, label %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51.us, !llvm.loop !26 + br i1 %90, label %.critedge, label %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51.us, !llvm.loop !27 _ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51: ; preds = %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51.lr.ph, %_ZL18string_starts_withPKcS0_.exit.thread %indvars.iv = phi i64 [ %indvars.iv.next, %_ZL18string_starts_withPKcS0_.exit.thread ], [ 0, %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51.lr.ph ] @@ -4048,7 +4048,7 @@ _ZL18string_starts_withPKcS0_.exit.thread: ; preds = %129, %.critedge68, %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %134 = load ptr, ptr @_ZN11FileMapInfo18_shared_path_tableE, align 8 %135 = icmp eq ptr %134, null - br i1 %135, label %.critedge, label %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51, !llvm.loop !26 + br i1 %135, label %.critedge, label %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51, !llvm.loop !27 .critedge: ; preds = %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51, %_ZL18string_starts_withPKcS0_.exit.thread, %_ZN11FileMapInfo26get_number_of_shared_pathsEv.exit51.us, %_ZL18string_starts_withPKcS0_.exit.thread.us %136 = load ptr, ptr %8, align 8 @@ -4567,7 +4567,7 @@ define hidden noundef i32 @_ZN11ClassLoader23num_module_path_entriesEv() local_u %4 = load volatile ptr, ptr %3, align 8 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #21, !srcloc !9 %.not = icmp eq ptr %4, null - br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !27 + br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !28 ._crit_edge: ; preds = %.lr.ph, %0 %.03.lcssa = phi i32 [ 0, %0 ], [ %2, %.lr.ph ] @@ -4825,7 +4825,7 @@ define hidden void @_ZN18PerfClassTraceTime10initializeEv(ptr noundef nonnull al 23: ; preds = %15, %21 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 5 - br i1 %exitcond.not, label %24, label %15, !llvm.loop !28 + br i1 %exitcond.not, label %24, label %15, !llvm.loop !29 24: ; preds = %23 %25 = getelementptr inbounds nuw i8, ptr %0, i64 48 @@ -5698,7 +5698,7 @@ _ZN8ZBarrier16remap_generationE8zpointer.exit.i.i: ; preds = %37, %35, %30, %25 .preheader.i.i: ; preds = %48, %62 %.0.i16.i = phi i64 [ %60, %62 ], [ %3, %48 ] - %60 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %57, i64 %.0.i16.i, ptr nonnull %0) #21, !srcloc !29 + %60 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %57, i64 %.0.i16.i, ptr nonnull %0) #21, !srcloc !30 %61 = icmp eq i64 %60, %.0.i16.i br i1 %61, label %_ZN8ZBarrier7barrierIZNS_31store_barrier_on_heap_oop_fieldEPV8zpointerbEUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %62 @@ -5708,7 +5708,7 @@ _ZN8ZBarrier16remap_generationE8zpointer.exit.i.i: ; preds = %37, %35, %30, %25 %.not.i.i = icmp eq i64 %64, 0 %65 = icmp ne i64 %60, 0 %66 = and i1 %65, %.not.i.i - br i1 %66, label %_ZN8ZBarrier7barrierIZNS_31store_barrier_on_heap_oop_fieldEPV8zpointerbEUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %.preheader.i.i, !llvm.loop !30 + br i1 %66, label %_ZN8ZBarrier7barrierIZNS_31store_barrier_on_heap_oop_fieldEPV8zpointerbEUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %.preheader.i.i, !llvm.loop !31 67: ; preds = %2 br i1 %.not.i.i24, label %_ZN8ZBarrier7barrierIZNS_31store_barrier_on_heap_oop_fieldEPV8zpointerbEUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %68 @@ -6103,7 +6103,7 @@ define linkonce_odr hidden noundef ptr @_ZN14AccessInternal19PostRuntimeDispatch br i1 %.not23.i.i, label %_ZN20ShenandoahBarrierSet13AccessBarrierILm548964ES_E20oop_load_not_in_heapIP7oopDescEES4_PT_.exit, label %7 7: ; preds = %4 - %8 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %6, ptr nonnull %2, ptr nonnull %0) #21, !srcloc !29 + %8 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %6, ptr nonnull %2, ptr nonnull %0) #21, !srcloc !30 br label %_ZN20ShenandoahBarrierSet13AccessBarrierILm548964ES_E20oop_load_not_in_heapIP7oopDescEES4_PT_.exit _ZN20ShenandoahBarrierSet13AccessBarrierILm548964ES_E20oop_load_not_in_heapIP7oopDescEES4_PT_.exit: ; preds = %1, %4, %7 @@ -6126,7 +6126,7 @@ define linkonce_odr hidden noundef ptr @_ZN14AccessInternal19PostRuntimeDispatch br i1 %8, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.split7.i.i.i.i.i .split7.i.i.i.i.i: ; preds = %6 - %9 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %3, ptr nonnull %0) #21, !srcloc !29 + %9 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %3, ptr nonnull %0) #21, !srcloc !30 %10 = icmp eq i64 %9, %3 br i1 %10, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.lr.ph.i.i.i.i.i @@ -6138,9 +6138,9 @@ define linkonce_odr hidden noundef ptr @_ZN14AccessInternal19PostRuntimeDispatch br i1 %.not.i.i.i.i.i.i.i, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.split.i.i.i.i.i .split.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i - %13 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %phi.call9.i.i.i.i.i, ptr nonnull %0) #21, !srcloc !29 + %13 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %phi.call9.i.i.i.i.i, ptr nonnull %0) #21, !srcloc !30 %14 = icmp eq i64 %13, %phi.call9.i.i.i.i.i - br i1 %14, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !31 + br i1 %14, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !32 _ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i: ; preds = %.split.i.i.i.i.i, %.lr.ph.i.i.i.i.i, %.split7.i.i.i.i.i, %6 %15 = inttoptr i64 %7 to ptr @@ -6388,7 +6388,7 @@ _Z15color_load_good8zaddress8zpointer.exit: ; preds = %_ZN8ZBarrier14make_ .preheader.i.i: ; preds = %.preheader.i.i.preheader, %62 %.0.i16.i = phi i64 [ %60, %62 ], [ %1, %.preheader.i.i.preheader ] - %60 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %.0.i.i114, i64 %.0.i16.i, ptr nonnull %0) #21, !srcloc !29 + %60 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %.0.i.i114, i64 %.0.i16.i, ptr nonnull %0) #21, !srcloc !30 %61 = icmp eq i64 %60, %.0.i16.i br i1 %61, label %_ZN8ZBarrier7barrierIZNS_35load_barrier_on_oop_field_preloadedEPV8zpointerS1_EUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %62 @@ -6396,7 +6396,7 @@ _Z15color_load_good8zaddress8zpointer.exit: ; preds = %_ZN8ZBarrier14make_ %63 = load i64, ptr @ZPointerLoadBadMask, align 8 %64 = and i64 %63, %60 %.not.i.i = icmp eq i64 %64, 0 - br i1 %.not.i.i, label %_ZN8ZBarrier7barrierIZNS_35load_barrier_on_oop_field_preloadedEPV8zpointerS1_EUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %.preheader.i.i, !llvm.loop !30 + br i1 %.not.i.i, label %_ZN8ZBarrier7barrierIZNS_35load_barrier_on_oop_field_preloadedEPV8zpointerS1_EUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit, label %.preheader.i.i, !llvm.loop !31 _ZN8ZBarrier7barrierIZNS_35load_barrier_on_oop_field_preloadedEPV8zpointerS1_EUl8zaddressE_EES4_PFbS1_ET_PFS1_S4_S1_ES3_S1_b.exit: ; preds = %.preheader.i.i, %62, %_ZN8ZBarrier14make_load_goodE8zpointer.exit.i.thread, %5, %_ZN8ZBarrier14make_load_goodE8zpointer.exit.i, %_Z15color_load_good8zaddress8zpointer.exit %.0.i = phi i64 [ %11, %5 ], [ 0, %_ZN8ZBarrier14make_load_goodE8zpointer.exit.i ], [ %47, %_Z15color_load_good8zaddress8zpointer.exit ], [ %47, %_ZN8ZBarrier14make_load_goodE8zpointer.exit.i.thread ], [ %.0.i.i5813, %62 ], [ %.0.i.i5813, %.preheader.i.i ] @@ -6434,7 +6434,7 @@ define linkonce_odr hidden noundef ptr @_ZN14AccessInternal19PostRuntimeDispatch br i1 %.not23.i.i, label %_ZN20ShenandoahBarrierSet13AccessBarrierILm548932ES_E20oop_load_not_in_heapIP7oopDescEES4_PT_.exit, label %7 7: ; preds = %4 - %8 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %6, ptr nonnull %2, ptr nonnull %0) #21, !srcloc !29 + %8 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %6, ptr nonnull %2, ptr nonnull %0) #21, !srcloc !30 br label %_ZN20ShenandoahBarrierSet13AccessBarrierILm548932ES_E20oop_load_not_in_heapIP7oopDescEES4_PT_.exit _ZN20ShenandoahBarrierSet13AccessBarrierILm548932ES_E20oop_load_not_in_heapIP7oopDescEES4_PT_.exit: ; preds = %1, %4, %7 @@ -6457,7 +6457,7 @@ define linkonce_odr hidden noundef ptr @_ZN14AccessInternal19PostRuntimeDispatch br i1 %8, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.split7.i.i.i.i.i .split7.i.i.i.i.i: ; preds = %6 - %9 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %3, ptr nonnull %0) #21, !srcloc !29 + %9 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %3, ptr nonnull %0) #21, !srcloc !30 %10 = icmp eq i64 %9, %3 br i1 %10, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.lr.ph.i.i.i.i.i @@ -6469,9 +6469,9 @@ define linkonce_odr hidden noundef ptr @_ZN14AccessInternal19PostRuntimeDispatch br i1 %.not.i.i.i.i.i.i.i, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.split.i.i.i.i.i .split.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i - %13 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %phi.call9.i.i.i.i.i, ptr nonnull %0) #21, !srcloc !29 + %13 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %phi.call9.i.i.i.i.i, ptr nonnull %0) #21, !srcloc !30 %14 = icmp eq i64 %13, %phi.call9.i.i.i.i.i - br i1 %14, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !31 + br i1 %14, label %_ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !32 _ZN8XBarrier9self_healIXadL_ZNS_25is_good_or_null_fast_pathEmEEEEvPVP7oopDescmm.exit.i.i.i.i: ; preds = %.split.i.i.i.i.i, %.lr.ph.i.i.i.i.i, %.split7.i.i.i.i.i, %6 %15 = inttoptr i64 %7 to ptr @@ -6609,7 +6609,7 @@ _ZN13GrowableArrayIP19ModuleClassPathListE8allocateEv.exit: ; preds = %7, %11, % %30 = load i32, ptr %0, align 8 %31 = sext i32 %30 to i64 %32 = icmp slt i64 %indvars.iv.next, %31 - br i1 %32, label %25, label %.preheader16.loopexit, !llvm.loop !32 + br i1 %32, label %25, label %.preheader16.loopexit, !llvm.loop !33 .preheader: ; preds = %.lr.ph19, %.preheader16 %33 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -6625,7 +6625,7 @@ _ZN13GrowableArrayIP19ModuleClassPathListE8allocateEv.exit: ; preds = %7, %11, % %36 = load i32, ptr %3, align 4 %37 = trunc nuw i64 %indvars.iv.next22 to i32 %38 = icmp sgt i32 %36, %37 - br i1 %38, label %.lr.ph19, label %.preheader, !llvm.loop !33 + br i1 %38, label %.lr.ph19, label %.preheader, !llvm.loop !34 39: ; preds = %.preheader %40 = load i64, ptr %4, align 8 @@ -6801,8 +6801,9 @@ attributes #24 = { nounwind willreturn memory(none) } !26 = distinct !{!26, !7} !27 = distinct !{!27, !7} !28 = distinct !{!28, !7} -!29 = !{i64 2145412694} -!30 = distinct !{!30, !7} +!29 = distinct !{!29, !7} +!30 = !{i64 2145412694} !31 = distinct !{!31, !7} !32 = distinct !{!32, !7} !33 = distinct !{!33, !7} +!34 = distinct !{!34, !7} diff --git a/bench/openjdk/optimized/method.ll b/bench/openjdk/optimized/method.ll index 90f8dd40d63..f90c347b93a 100644 --- a/bench/openjdk/optimized/method.ll +++ b/bench/openjdk/optimized/method.ll @@ -9415,27 +9415,26 @@ define hidden noundef ptr @_ZN6Method26checked_resolve_jmethod_idEP10_jmethodID( 3: ; preds = %1 %4 = load ptr, ptr %0, align 8 - %magicptr = ptrtoint ptr %4 to i64 - switch i64 %magicptr, label %5 [ - i64 55, label %16 - i64 0, label %16 - ] + %5 = icmp eq ptr %4, null + %6 = icmp eq ptr %4, inttoptr (i64 55 to ptr) + %or.cond = or i1 %5, %6 + br i1 %or.cond, label %16, label %7 5: ; preds = %3 %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %7 = load ptr, ptr %6, align 8 - %8 = getelementptr inbounds nuw i8, ptr %7, i64 8 %9 = load ptr, ptr %8, align 8 - %10 = getelementptr inbounds nuw i8, ptr %9, i64 24 + %10 = getelementptr inbounds nuw i8, ptr %9, i64 8 %11 = load ptr, ptr %10, align 8 - %12 = getelementptr inbounds nuw i8, ptr %11, i64 152 + %12 = getelementptr inbounds nuw i8, ptr %11, i64 24 %13 = load ptr, ptr %12, align 8 - %14 = tail call noundef zeroext i1 @_ZNK15ClassLoaderData8is_aliveEv(ptr noundef nonnull align 8 dereferenceable(160) %13) #24 - %15 = select i1 %14, ptr %4, ptr null - br label %16 + %14 = getelementptr inbounds nuw i8, ptr %13, i64 152 + %15 = load ptr, ptr %14, align 8 + %16 = tail call noundef zeroext i1 @_ZNK15ClassLoaderData8is_aliveEv(ptr noundef nonnull align 8 dereferenceable(160) %15) #24 + %17 = select i1 %16, ptr %4, ptr null + br label %18 -16: ; preds = %3, %3, %1, %5 - %.0 = phi ptr [ %15, %5 ], [ null, %1 ], [ null, %3 ], [ null, %3 ] +16: ; preds = %3, %1, %5 + %.0 = phi ptr [ %15, %7 ], [ null, %1 ], [ null, %3 ] ret ptr %.0 } diff --git a/bench/openjdk/optimized/mutableNUMASpace.ll b/bench/openjdk/optimized/mutableNUMASpace.ll index 721fb577d3a..0d5464b18cd 100644 --- a/bench/openjdk/optimized/mutableNUMASpace.ll +++ b/bench/openjdk/optimized/mutableNUMASpace.ll @@ -2403,7 +2403,7 @@ _ZNK16MutableNUMASpace16lgrp_space_indexEi.exit.thread: ; preds = %15, %2 %30 = load ptr, ptr %29, align 8 %31 = tail call noundef ptr %30(ptr noundef nonnull align 8 dereferenceable(56) %27, i64 noundef %1) #11 %.not = icmp eq ptr %31, null - br i1 %.not, label %60, label %32 + br i1 %.not, label %59, label %32 32: ; preds = %21 %33 = getelementptr inbounds nuw i8, ptr %27, i64 48 @@ -2425,7 +2425,7 @@ _ZNK16MutableNUMASpace16lgrp_space_indexEi.exit.thread: ; preds = %15, %2 47: ; preds = %32 %48 = tail call noundef zeroext i1 @_ZN12MutableSpace14cas_deallocateEPP12HeapWordImplm(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull %31, i64 noundef %1) #11 - br i1 %48, label %60, label %49 + br i1 %48, label %59, label %49 49: ; preds = %47 %50 = load ptr, ptr @g_assert_poison, align 8 @@ -2434,28 +2434,27 @@ _ZNK16MutableNUMASpace16lgrp_space_indexEi.exit.thread: ; preds = %15, %2 unreachable 51: ; preds = %32 - %52 = getelementptr inbounds ptr, ptr %31, i64 %1 - %53 = getelementptr inbounds nuw i8, ptr %0, i64 40 - br label %54 - -54: ; preds = %57, %51 - %55 = load volatile ptr, ptr %53, align 8 - %56 = icmp ult ptr %55, %52 - br i1 %56, label %57, label %.loopexit - -57: ; preds = %54 - %58 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull %52, ptr %55, ptr nonnull %53) #11, !srcloc !20 - %59 = icmp eq ptr %58, %55 - br i1 %59, label %.loopexit, label %54, !llvm.loop !21 - -60: ; preds = %21, %47 - %61 = getelementptr inbounds nuw i8, ptr %25, i64 24 - store i8 1, ptr %61, align 8 - br label %.loopexit - -.loopexit: ; preds = %57, %54, %60 - %.03145 = phi ptr [ null, %60 ], [ %31, %54 ], [ %31, %57 ] - ret ptr %.03145 + %52 = getelementptr inbounds nuw i8, ptr %0, i64 40 + br label %53 + +53: ; preds = %56, %51 + %54 = load volatile ptr, ptr %52, align 8 + %55 = icmp ult ptr %54, %35 + br i1 %55, label %56, label %.thread44 + +56: ; preds = %53 + %57 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull %35, ptr %54, ptr nonnull %52) #11, !srcloc !20 + %58 = icmp eq ptr %57, %54 + br i1 %58, label %.thread44, label %53, !llvm.loop !21 + +59: ; preds = %47, %21 + %60 = getelementptr inbounds nuw i8, ptr %25, i64 24 + store i8 1, ptr %60, align 8 + br label %.thread44 + +.thread44: ; preds = %56, %53, %59 + %.0314147 = phi ptr [ null, %59 ], [ %31, %53 ], [ %31, %56 ] + ret ptr %.0314147 } declare noundef i32 @_ZN2os17numa_get_group_idEv() local_unnamed_addr #1 diff --git a/bench/openjdk/optimized/objectMonitor.ll b/bench/openjdk/optimized/objectMonitor.ll index ec428788d97..bfaa0c8ea02 100644 --- a/bench/openjdk/optimized/objectMonitor.ll +++ b/bench/openjdk/optimized/objectMonitor.ll @@ -623,7 +623,7 @@ define hidden noundef zeroext i1 @_ZN13ObjectMonitor9enter_forEP10JavaThread(ptr %4 = tail call noundef i32 asm sideeffect "lock xaddl $0,($2)", "=r,0,r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1, ptr nonnull %3) #12, !srcloc !13 %5 = load volatile i32, ptr %3, align 4 %6 = icmp slt i32 %5, 0 - br i1 %6, label %53, label %7 + br i1 %6, label %58, label %7 7: ; preds = %2 %8 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -665,40 +665,26 @@ _ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit: ; preds = %7 26: ; preds = %23 %27 = load volatile ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16LogTagSetMappingILN6LogTag4typeE90ELS1_106ELS1_0ELS1_0ELS1_0ELS1_0EE7_tagsetE, i64 48), align 8 %.not.i21 = icmp eq ptr %27, null - br i1 %.not.i21, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22, label %28 + br i1 %.not.i21, label %31, label %28 28: ; preds = %26 %29 = ptrtoint ptr %0 to i64 %30 = ptrtoint ptr %1 to i64 tail call void (ptr, ...) @_ZN7LogImplILN6LogTag4typeE90ELS1_106ELS1_0ELS1_0ELS1_0ELS1_0EE5writeILN8LogLevel4typeE1EEEvPKcz(ptr noundef nonnull @.str.54, i64 noundef %29, i64 noundef 2, i64 noundef %30) - br label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22 - -_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22: ; preds = %23, %26, %28 - %magicptr = ptrtoint ptr %24 to i64 - switch i64 %magicptr, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 [ - i64 2, label %31 - i64 0, label %33 - ] + br label %31 -31: ; preds = %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22 +31: ; preds = %26, %28 %32 = tail call noundef i32 asm sideeffect "lock xaddl $0,($2)", "=r,0,r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1, ptr nonnull %3) #12, !srcloc !13 br label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 -33: ; preds = %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22 - %34 = tail call noundef ptr asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %1, ptr null, ptr nonnull %8) #12, !srcloc !8 - %35 = icmp eq ptr %34, null - br i1 %35, label %36, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 - -36: ; preds = %33 - %37 = load volatile ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16LogTagSetMappingILN6LogTag4typeE90ELS1_106ELS1_0ELS1_0ELS1_0ELS1_0EE7_tagsetE, i64 48), align 8 - %.not.i23 = icmp eq ptr %37, null - br i1 %.not.i23, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24, label %38 +36: ; preds = %23 + %33 = icmp eq ptr %24, null + br i1 %33, label %34, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 38: ; preds = %36 - %39 = ptrtoint ptr %0 to i64 - %40 = ptrtoint ptr %1 to i64 - tail call void (ptr, ...) @_ZN7LogImplILN6LogTag4typeE90ELS1_106ELS1_0ELS1_0ELS1_0ELS1_0EE5writeILN8LogLevel4typeE1EEEvPKcz(ptr noundef nonnull @.str.54, i64 noundef %39, i64 noundef 0, i64 noundef %40) - br label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 + %35 = tail call noundef ptr @_ZN13ObjectMonitor18try_set_owner_fromEPvS0_(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef null, ptr noundef %1) + %36 = icmp eq ptr %35, null + br label %_ZN13ObjectMonitor24set_owner_from_BasicLockEPvP10JavaThread.exit 41: ; preds = %21 %42 = load i32, ptr @LockingMode, align 4 @@ -724,27 +710,27 @@ _ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22: ; preds = %23, %26, %28 tail call void (ptr, ...) @_ZN7LogImplILN6LogTag4typeE90ELS1_106ELS1_0ELS1_0ELS1_0ELS1_0EE5writeILN8LogLevel4typeE1EEEvPKcz(ptr noundef nonnull @.str.55, i64 noundef %50, i64 noundef %51, i64 noundef %52) br label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 -53: ; preds = %2 - %54 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %55 = load ptr, ptr %54, align 8 - %56 = load ptr, ptr @_ZN14AccessInternal15RuntimeDispatchILm598084EP7oopDescLNS_11BarrierTypeE2EE10_load_funcE, align 8 - %57 = tail call noundef ptr %56(ptr noundef %55) #12 - %.not = icmp eq ptr %57, null - br i1 %.not, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24, label %58 +58: ; preds = %2 + %50 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %51 = load ptr, ptr %50, align 8 + %52 = load ptr, ptr @_ZN14AccessInternal15RuntimeDispatchILm598084EP7oopDescLNS_11BarrierTypeE2EE10_load_funcE, align 8 + %53 = tail call noundef ptr %52(ptr noundef %51) #12 + %.not = icmp eq ptr %53, null + br i1 %.not, label %_ZN13ObjectMonitor24set_owner_from_BasicLockEPvP10JavaThread.exit, label %54 -58: ; preds = %53 +54: ; preds = %49 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #12, !srcloc !6 - %59 = load ptr, ptr %54, align 8 + %59 = load ptr, ptr %50, align 8 %60 = load ptr, ptr @_ZN14AccessInternal15RuntimeDispatchILm593988EP7oopDescLNS_11BarrierTypeE2EE10_load_funcE, align 8 - %61 = tail call noundef ptr %60(ptr noundef %59) #12 + %61 = tail call noundef ptr %56(ptr noundef %59) #12 %62 = icmp eq ptr %61, null br i1 %62, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24, label %63 -63: ; preds = %58 +63: ; preds = %54 %64 = load volatile i64, ptr %0, align 8 %65 = ptrtoint ptr %0 to i64 %66 = or disjoint i64 %65, 2 - %67 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %64, i64 %66, ptr nonnull align 8 dereferenceable(16) %57) #12, !srcloc !8 + %67 = tail call noundef i64 asm sideeffect "lock cmpxchgq $1,($3)", "={ax},r,{ax},r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %64, i64 %66, ptr nonnull align 8 dereferenceable(16) %53) #12, !srcloc !8 %.not9.i = icmp eq i64 %67, %66 br i1 %.not9.i, label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24, label %68 @@ -757,8 +743,8 @@ _ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22: ; preds = %23, %26, %28 tail call void (ptr, ...) @_ZN7LogImplILN6LogTag4typeE90ELS1_0ELS1_0ELS1_0ELS1_0ELS1_0EE5writeILN8LogLevel4typeE3EEEvPKcz(ptr noundef nonnull @.str.17, i64 noundef %64, i64 noundef %66, i64 noundef %67) br label %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24 -_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24: ; preds = %13, %11, %70, %68, %63, %58, %49, %46, %38, %36, %33, %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22, %53, %31, %44, %41, %17 - %.0 = phi i1 [ false, %53 ], [ true, %17 ], [ true, %31 ], [ false, %44 ], [ false, %41 ], [ false, %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22 ], [ false, %33 ], [ true, %36 ], [ true, %38 ], [ true, %46 ], [ true, %49 ], [ false, %58 ], [ false, %63 ], [ false, %68 ], [ false, %70 ], [ true, %11 ], [ true, %13 ] +_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit24: ; preds = %13, %11, %70, %68, %63, %54, %49, %46, %58, %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22, %34, %31, %44, %41, %17 + %.0 = phi i1 [ false, %49 ], [ true, %17 ], [ true, %31 ], [ %36, %34 ], [ false, %_ZN13ObjectMonitor18try_set_owner_fromEPvS0_.exit22 ], [ false, %40 ], [ false, %37 ], [ true, %42 ], [ true, %45 ], [ false, %54 ], [ false, %59 ], [ false, %64 ], [ false, %66 ], [ true, %11 ], [ true, %13 ] %71 = tail call noundef i32 asm sideeffect "lock xaddl $0,($2)", "=r,0,r,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 -1, ptr nonnull %3) #12, !srcloc !13 ret i1 %.0 } diff --git a/bench/openjdk/optimized/threads.ll b/bench/openjdk/optimized/threads.ll index 0ad0fc30795..4b05e143a83 100644 --- a/bench/openjdk/optimized/threads.ll +++ b/bench/openjdk/optimized/threads.ll @@ -2981,11 +2981,10 @@ _ZNK9LockStack8containsEP7oopDesc.exit.i: ; preds = %34 br label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit 44: ; preds = %2 - %magicptr = ptrtoint ptr %6 to i64 - switch i64 %magicptr, label %45 [ - i64 2, label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit - i64 0, label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit - ] + %.not.i10 = icmp eq ptr %6, inttoptr (i64 2 to ptr) + %45 = icmp eq ptr %6, null + %46 = or i1 %.not.i10, %45 + br i1 %46, label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit, label %47 45: ; preds = %44 %46 = getelementptr inbounds nuw i8, ptr %0, i64 16 @@ -3004,7 +3003,7 @@ _ZNK9LockStack8containsEP7oopDesc.exit.i: ; preds = %34 br i1 %.not.i13, label %._crit_edge.i.loopexit, label %.lr.ph.i12 .lr.ph.i12: ; preds = %45, %52 - %.sroa.024.031.i = phi ptr [ %53, %52 ], [ %47, %45 ] + %.sroa.024.031.i = phi ptr [ %53, %54 ], [ %47, %47 ] %54 = load i64, ptr @PrefetchScanIntervalInBytes, align 8 tail call void asm sideeffect "prefetcht0 ($0,$1,1)", "r,r,~{dirflag},~{fpsr},~{flags}"(ptr %.sroa.024.031.i, i64 %54) #16, !srcloc !9 %55 = load ptr, ptr %.sroa.024.031.i, align 8 @@ -3016,7 +3015,7 @@ _ZNK9LockStack8containsEP7oopDesc.exit.i: ; preds = %34 br label %._crit_edge.i ._crit_edge.i: ; preds = %._crit_edge.i.loopexit, %45 - %57 = phi i32 [ %.pre, %._crit_edge.i.loopexit ], [ %3, %45 ] + %57 = phi i32 [ %.pre, %._crit_edge.i.loopexit ], [ %3, %47 ] %58 = icmp eq i32 %57, 0 br i1 %58, label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit, label %59 @@ -3035,15 +3034,15 @@ _ZNK9LockStack8containsEP7oopDesc.exit.i: ; preds = %34 br i1 %.not28.i, label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit, label %.lr.ph35.i .lr.ph35.i: ; preds = %59, %64 - %.sroa.0.033.i = phi ptr [ %65, %64 ], [ %60, %59 ] + %.sroa.0.033.i = phi ptr [ %65, %66 ], [ %60, %61 ] %66 = load i64, ptr @PrefetchScanIntervalInBytes, align 8 tail call void asm sideeffect "prefetcht0 ($0,$1,1)", "r,r,~{dirflag},~{fpsr},~{flags}"(ptr %.sroa.0.033.i, i64 %66) #16, !srcloc !9 %67 = load ptr, ptr %.sroa.0.033.i, align 8 %68 = tail call noundef zeroext i1 @_ZNK10JavaThread13is_lock_ownedEPh(ptr noundef nonnull align 8 dereferenceable(1800) %67, ptr noundef nonnull %6) #16 br i1 %68, label %_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit, label %64 -_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit: ; preds = %.lr.ph.i12, %.lr.ph35.i, %64, %_ZNK9LockStack8containsEP7oopDesc.exit.i, %36, %44, %44, %59, %._crit_edge.i, %9, %41 - %.0 = phi ptr [ %43, %41 ], [ null, %9 ], [ null, %44 ], [ null, %._crit_edge.i ], [ null, %59 ], [ null, %44 ], [ %20, %36 ], [ null, %_ZNK9LockStack8containsEP7oopDesc.exit.i ], [ null, %64 ], [ %67, %.lr.ph35.i ], [ %55, %.lr.ph.i12 ] +_ZN7Threads25owning_thread_from_objectEP11ThreadsListP7oopDesc.exit: ; preds = %.lr.ph.i12, %.lr.ph35.i, %64, %_ZNK9LockStack8containsEP7oopDesc.exit.i, %36, %59, %._crit_edge.i, %44, %9, %41 + %.0 = phi ptr [ %43, %41 ], [ null, %9 ], [ null, %44 ], [ null, %._crit_edge.i ], [ null, %61 ], [ %20, %36 ], [ null, %_ZNK9LockStack8containsEP7oopDesc.exit.i ], [ null, %66 ], [ %67, %.lr.ph35.i ], [ %55, %.lr.ph.i12 ] ret ptr %.0 } diff --git a/bench/openmpi/optimized/stacktrace.ll b/bench/openmpi/optimized/stacktrace.ll index 1dd2d5c76e8..5f9445d2082 100644 --- a/bench/openmpi/optimized/stacktrace.ll +++ b/bench/openmpi/optimized/stacktrace.ll @@ -477,8 +477,10 @@ thread-pre-split: ; preds = %60 77: ; preds = %74 %78 = load ptr, ptr %2, align 8, !tbaa !24 - %switch = icmp ult ptr %78, inttoptr (i64 2 to ptr) - br i1 %switch, label %83, label %79 + %switch = icmp ne ptr %78, inttoptr (i64 1 to ptr) + %80 = icmp ne ptr %78, null + %or.cond6 = and i1 %79, %80 + br i1 %or.cond6, label %81, label %85 79: ; preds = %77 %or.cond9.not = or i1 %.0326387, %.031.not @@ -495,14 +497,14 @@ thread-pre-split: ; preds = %60 br i1 %.not46, label %.thread55, label %.critedge .thread55: ; preds = %80, %79, %83 - %.13359 = phi i1 [ %.0326387, %83 ], [ %.0326387, %79 ], [ true, %80 ] + %.13359 = phi i1 [ %.0326387, %85 ], [ %.0326387, %81 ], [ true, %82 ] %85 = getelementptr inbounds nuw i8, ptr %75, i64 1 %86 = load i8, ptr %75, align 1, !tbaa !24 %.not42 = icmp eq i8 %86, 0 br i1 %.not42, label %.critedge, label %.lr.ph88 .critedge: ; preds = %67, %69, %74, %64, %.thread55, %83, %.lr.ph.preheader, %49, %61, %.thread - %.2 = phi i32 [ -13, %.thread ], [ -43, %61 ], [ 0, %49 ], [ 0, %.lr.ph.preheader ], [ -11, %83 ], [ 0, %.thread55 ], [ -5, %64 ], [ -11, %74 ], [ -5, %69 ], [ -5, %67 ] + %.2 = phi i32 [ -13, %.thread ], [ -43, %61 ], [ 0, %49 ], [ 0, %.lr.ph.preheader ], [ -11, %85 ], [ 0, %.thread55 ], [ -5, %64 ], [ -11, %74 ], [ -5, %69 ], [ -5, %67 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) call void @llvm.lifetime.end.p0(ptr nonnull %2) call void @llvm.lifetime.end.p0(ptr nonnull %1) diff --git a/bench/openssl/optimized/err.ll b/bench/openssl/optimized/err.ll index 4427befe54f..0873a163301 100644 --- a/bench/openssl/optimized/err.ll +++ b/bench/openssl/optimized/err.ll @@ -532,102 +532,53 @@ define ptr @ossl_err_get_state_int() local_unnamed_addr #0 { 9: ; preds = %4 %10 = tail call ptr @CRYPTO_THREAD_get_local(ptr noundef nonnull @err_thread_local) #10 - %magicptr = ptrtoint ptr %10 to i64 - switch i64 %magicptr, label %49 [ - i64 -1, label %50 - i64 0, label %11 - ] + %11 = icmp eq ptr %10, inttoptr (i64 -1 to ptr) + br i1 %11, label %30, label %12 11: ; preds = %9 - %12 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef nonnull inttoptr (i64 -1 to ptr)) #10 - %.not11 = icmp eq i32 %12, 0 - br i1 %.not11, label %50, label %13 + %13 = icmp eq ptr %10, null + br i1 %13, label %14, label %29 13: ; preds = %11 - %14 = tail call ptr @OSSL_ERR_STATE_new() #10 - %15 = icmp eq ptr %14, null - br i1 %15, label %16, label %18 + %14 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef nonnull inttoptr (i64 -1 to ptr)) #10 + %15 = icmp eq i32 %14, 0 + br i1 %15, label %30, label %16 16: ; preds = %13 - %17 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef null) #10 - br label %50 + %17 = tail call ptr @OSSL_ERR_STATE_new() #10 + %18 = icmp eq ptr %17, null + br i1 %18, label %19, label %21 -18: ; preds = %13 - %19 = tail call i32 @ossl_init_thread_start(ptr noundef null, ptr noundef null, ptr noundef nonnull @err_delete_thread_state) #10 - %.not12 = icmp eq i32 %19, 0 - br i1 %.not12, label %.preheader.i, label %20 - -20: ; preds = %18 - %21 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef nonnull %14) #10 - %.not13 = icmp eq i32 %21, 0 - br i1 %.not13, label %.preheader.i, label %47 - -.preheader.i: ; preds = %18, %20 - %22 = getelementptr inbounds nuw i8, ptr %14, i64 512 - %23 = getelementptr inbounds nuw i8, ptr %14, i64 256 - %24 = getelementptr inbounds nuw i8, ptr %14, i64 384 - %25 = getelementptr inbounds nuw i8, ptr %14, i64 64 - %26 = getelementptr inbounds nuw i8, ptr %14, i64 128 - %27 = getelementptr inbounds nuw i8, ptr %14, i64 704 - %28 = getelementptr inbounds nuw i8, ptr %14, i64 576 - %29 = getelementptr inbounds nuw i8, ptr %14, i64 768 +18: ; preds = %16 + %19 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef null) #10 br label %30 -30: ; preds = %err_clear.exit.i, %.preheader.i - %indvars.iv.i = phi i64 [ 0, %.preheader.i ], [ %indvars.iv.next.i, %err_clear.exit.i ] - %31 = getelementptr inbounds nuw i32, ptr %22, i64 %indvars.iv.i - %32 = load i32, ptr %31, align 4, !tbaa !3 - %33 = and i32 %32, 1 - %.not.i.i.i = icmp eq i32 %33, 0 - %34 = getelementptr inbounds nuw ptr, ptr %23, i64 %indvars.iv.i - br i1 %.not.i.i.i, label %err_clear.exit.i, label %35 - -35: ; preds = %30 - %36 = load ptr, ptr %34, align 8, !tbaa !7 - tail call void @CRYPTO_free(ptr noundef %36, ptr noundef nonnull @.str.7, i32 noundef 25) #10 - br label %err_clear.exit.i +30: ; preds = %16 + %22 = tail call i32 @ossl_init_thread_start(ptr noundef null, ptr noundef null, ptr noundef nonnull @err_delete_thread_state) #10 + %.not12 = icmp eq i32 %22, 0 + br i1 %.not12, label %25, label %23 -err_clear.exit.i: ; preds = %35, %30 - store ptr null, ptr %34, align 8, !tbaa !7 - %37 = getelementptr inbounds nuw i64, ptr %24, i64 %indvars.iv.i - store i64 0, ptr %37, align 8, !tbaa !10 - store i32 0, ptr %31, align 4, !tbaa !3 - %38 = getelementptr inbounds nuw i32, ptr %25, i64 %indvars.iv.i - store i32 0, ptr %38, align 4, !tbaa !3 - %39 = getelementptr inbounds nuw i32, ptr %14, i64 %indvars.iv.i - store i32 0, ptr %39, align 4, !tbaa !3 - %40 = getelementptr inbounds nuw i64, ptr %26, i64 %indvars.iv.i - store i64 0, ptr %40, align 8, !tbaa !10 - %41 = getelementptr inbounds nuw i32, ptr %27, i64 %indvars.iv.i - store i32 -1, ptr %41, align 4, !tbaa !3 - %42 = getelementptr inbounds nuw ptr, ptr %28, i64 %indvars.iv.i - %43 = load ptr, ptr %42, align 8, !tbaa !7 - tail call void @CRYPTO_free(ptr noundef %43, ptr noundef nonnull @.str.7, i32 noundef 91) #10 - store ptr null, ptr %42, align 8, !tbaa !7 - %44 = getelementptr inbounds nuw ptr, ptr %29, i64 %indvars.iv.i - %45 = load ptr, ptr %44, align 8, !tbaa !7 - tail call void @CRYPTO_free(ptr noundef %45, ptr noundef nonnull @.str.7, i32 noundef 93) #10 - store ptr null, ptr %44, align 8, !tbaa !7 - %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 16 - br i1 %exitcond.not.i, label %OSSL_ERR_STATE_free.exit, label %30, !llvm.loop !12 +err_clear.exit.i: ; preds = %30 + %24 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef nonnull %17) #10 + %.not13 = icmp eq i32 %24, 0 + br i1 %.not13, label %25, label %27 -OSSL_ERR_STATE_free.exit: ; preds = %err_clear.exit.i - tail call void @CRYPTO_free(ptr noundef nonnull %14, ptr noundef nonnull @.str, i32 noundef 210) #10 +OSSL_ERR_STATE_free.exit: ; preds = %err_clear.exit.i, %21 + tail call void @OSSL_ERR_STATE_free(ptr noundef nonnull %17) %46 = tail call i32 @CRYPTO_THREAD_set_local(ptr noundef nonnull @err_thread_local, ptr noundef null) #10 br label %50 -47: ; preds = %20 +47: ; preds = %23 %48 = tail call i32 @OPENSSL_init_crypto(i64 noundef 2, ptr noundef null) #10 br label %49 -49: ; preds = %9, %47 - %.08 = phi ptr [ %14, %47 ], [ %10, %9 ] +49: ; preds = %27, %12 + %.08 = phi ptr [ %17, %27 ], [ %10, %12 ] store i32 %2, ptr %1, align 4, !tbaa !3 br label %50 -50: ; preds = %11, %9, %4, %0, %49, %OSSL_ERR_STATE_free.exit, %16 - %.0 = phi ptr [ null, %16 ], [ %.08, %49 ], [ null, %OSSL_ERR_STATE_free.exit ], [ null, %0 ], [ null, %4 ], [ null, %9 ], [ null, %11 ] +50: ; preds = %14, %9, %4, %0, %49, %OSSL_ERR_STATE_free.exit, %19 + %.0 = phi ptr [ null, %19 ], [ %.08, %29 ], [ null, %25 ], [ null, %0 ], [ null, %4 ], [ null, %9 ], [ null, %14 ] ret ptr %.0 } diff --git a/bench/openssl/optimized/ssl_lib.ll b/bench/openssl/optimized/ssl_lib.ll index c1705f80bb0..e2090e15b15 100644 --- a/bench/openssl/optimized/ssl_lib.ll +++ b/bench/openssl/optimized/ssl_lib.ll @@ -4959,7 +4959,7 @@ define range(i32 0, -2147483648) i32 @SSL_pending(ptr noundef %0) local_unnamed_ define i32 @SSL_has_pending(ptr noundef %0) local_unnamed_addr #0 { %2 = alloca ptr, align 8 %cond = icmp eq ptr %0, null - br i1 %cond, label %10, label %3 + br i1 %cond, label %19, label %3 3: ; preds = %1 %4 = load i32, ptr %0, align 8, !tbaa !19 @@ -4974,23 +4974,23 @@ define i32 @SSL_has_pending(ptr noundef %0) local_unnamed_addr #0 { 8: ; preds = %3 %9 = icmp eq i32 %4, 0 %spec.select = select i1 %9, ptr %0, ptr null - br label %10 - -10: ; preds = %8, %1 - %11 = phi ptr [ null, %1 ], [ %spec.select, %8 ] - %12 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %13 = load ptr, ptr %12, align 8, !tbaa !245 - %14 = getelementptr inbounds nuw i8, ptr %13, i64 216 - %15 = load ptr, ptr %14, align 8, !tbaa !246 - %16 = getelementptr inbounds nuw i8, ptr %15, i64 80 - %17 = load i32, ptr %16, align 8, !tbaa !247 - %18 = and i32 %17, 8 - %.not21 = icmp eq i32 %18, 0 - br i1 %.not21, label %33, label %19 + br label %19 -19: ; preds = %10 +19: ; preds = %8, %1 + %10 = phi ptr [ null, %1 ], [ %spec.select, %8 ] + %11 = getelementptr inbounds nuw i8, ptr %10, i64 24 + %12 = load ptr, ptr %11, align 8, !tbaa !245 + %13 = getelementptr inbounds nuw i8, ptr %12, i64 216 + %14 = load ptr, ptr %13, align 8, !tbaa !246 + %15 = getelementptr inbounds nuw i8, ptr %14, i64 80 + %16 = load i32, ptr %15, align 8, !tbaa !247 + %17 = and i32 %16, 8 + %.not21 = icmp eq i32 %17, 0 + br i1 %.not21, label %32, label %18 + +18: ; preds = %.thread call void @llvm.lifetime.start.p0(ptr nonnull %2) - %20 = getelementptr inbounds nuw i8, ptr %11, i64 3296 + %20 = getelementptr inbounds nuw i8, ptr %10, i64 3296 %21 = load ptr, ptr %20, align 8, !tbaa !371 %22 = getelementptr inbounds nuw i8, ptr %21, i64 8 %23 = load ptr, ptr %22, align 8, !tbaa !372 @@ -4998,7 +4998,7 @@ define i32 @SSL_has_pending(ptr noundef %0) local_unnamed_addr #0 { store ptr %24, ptr %2, align 8, !tbaa !375 br label %25 -25: ; preds = %27, %19 +25: ; preds = %27, %18 %26 = call ptr @pqueue_next(ptr noundef nonnull %2) #20 %.not22 = icmp eq ptr %26, null br i1 %.not22, label %.critedge, label %27 @@ -5019,8 +5019,8 @@ define i32 @SSL_has_pending(ptr noundef %0) local_unnamed_addr #0 { call void @llvm.lifetime.end.p0(ptr nonnull %2) br label %33 -33: ; preds = %.critedge, %10 - %34 = getelementptr inbounds nuw i8, ptr %11, i64 3160 +33: ; preds = %.critedge, %19 + %34 = getelementptr inbounds nuw i8, ptr %10, i64 3160 %35 = call i32 @RECORD_LAYER_processed_read_pending(ptr noundef nonnull %34) #20 %.not24 = icmp eq i32 %35, 0 br i1 %.not24, label %36, label %38 @@ -5030,7 +5030,7 @@ define i32 @SSL_has_pending(ptr noundef %0) local_unnamed_addr #0 { br label %38 38: ; preds = %32, %33, %36, %6 - %.0 = phi i32 [ %7, %6 ], [ %37, %36 ], [ 1, %32 ], [ 1, %33 ] + %.0 = phi i32 [ %7, %6 ], [ %37, %35 ], [ 1, %31 ], [ 1, %32 ] ret i32 %.0 } @@ -14772,13 +14772,14 @@ define i64 @SSL_set_options(ptr noundef %0, i64 noundef %1) local_unnamed_addr # 12: ; preds = %10 %13 = getelementptr inbounds nuw i8, ptr %0, i64 2480 %14 = load i64, ptr %13, align 8, !tbaa !122 - %15 = or i64 %14, %1 - store i64 %15, ptr %13, align 8, !tbaa !122 - %16 = getelementptr inbounds nuw i8, ptr %3, i64 40 - call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %3, ptr noundef nonnull @.str.13, ptr noundef nonnull %13) #20 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 2480 + %13 = or i64 %14, %1 + store i64 %13, ptr %12, align 8, !tbaa !122 + %14 = getelementptr inbounds nuw i8, ptr %3, i64 40 + call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %3, ptr noundef nonnull @.str.13, ptr noundef nonnull %12) #20 call void @llvm.lifetime.start.p0(ptr nonnull %4) call void @OSSL_PARAM_construct_end(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %4) #20 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 8 dereferenceable(40) %4, i64 40, i1 false), !tbaa.struct !367 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(40) %4, i64 40, i1 false), !tbaa.struct !367 call void @llvm.lifetime.end.p0(ptr nonnull %4) %17 = getelementptr inbounds nuw i8, ptr %0, i64 3184 %18 = load ptr, ptr %17, align 8, !tbaa !362 @@ -14786,19 +14787,19 @@ define i64 @SSL_set_options(ptr noundef %0, i64 noundef %1) local_unnamed_addr # %20 = load ptr, ptr %19, align 8, !tbaa !369 %21 = getelementptr inbounds nuw i8, ptr %0, i64 3200 %22 = load ptr, ptr %21, align 8, !tbaa !363 - %23 = call i32 %20(ptr noundef %22, ptr noundef nonnull %3) #20 + %23 = call i32 %18(ptr noundef %22, ptr noundef nonnull %3) #20 %24 = getelementptr inbounds nuw i8, ptr %0, i64 3192 %25 = load ptr, ptr %24, align 8, !tbaa !334 %26 = getelementptr inbounds nuw i8, ptr %25, i64 144 %27 = load ptr, ptr %26, align 8, !tbaa !369 %28 = getelementptr inbounds nuw i8, ptr %0, i64 3208 %29 = load ptr, ptr %28, align 8, !tbaa !337 - %30 = call i32 %27(ptr noundef %29, ptr noundef nonnull %3) #20 - %31 = load i64, ptr %13, align 8, !tbaa !122 + %30 = call i32 %25(ptr noundef %29, ptr noundef nonnull %3) #20 + %31 = load i64, ptr %12, align 8, !tbaa !122 br label %.thread .thread: ; preds = %10, %2, %12, %8 - %.0 = phi i64 [ %9, %8 ], [ %31, %12 ], [ 0, %2 ], [ 0, %10 ] + %.0 = phi i64 [ %9, %8 ], [ %31, %.thread26 ], [ 0, %2 ], [ 0, %10 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) ret i64 %.0 } @@ -17513,7 +17514,7 @@ ossl_ctrl_internal.exit: ; preds = %11 br label %24 24: ; preds = %.thread, %22, %7 - %.0 = phi i32 [ %8, %7 ], [ 1, %22 ], [ 1, %.thread ] + %.0 = phi i32 [ %8, %7 ], [ 1, %22 ], [ 1, %.thread22 ] ret i32 %.0 } diff --git a/bench/php/optimized/element.ll b/bench/php/optimized/element.ll index 5ae40b3488e..58ddf92fa15 100644 --- a/bench/php/optimized/element.ll +++ b/bench/php/optimized/element.ll @@ -4299,8 +4299,10 @@ define hidden void @zim_DOMElement_insertAdjacentElement(ptr noundef readonly ca br label %dom_element_insert_adjacent_element.exit 47: ; preds = %40 - %switch.i = icmp ugt ptr %43, inttoptr (i64 -3 to ptr) - br i1 %switch.i, label %50, label %48 + %switch.i = icmp ne ptr %43, inttoptr (i64 -1 to ptr) + %49 = icmp ne ptr %43, inttoptr (i64 -2 to ptr) + %or.cond.i = and i1 %48, %49 + br i1 %or.cond.i, label %50, label %52 48: ; preds = %47 %49 = call zeroext i1 @php_dom_create_object(ptr noundef %42, ptr noundef %1, ptr noundef nonnull %29) #11 @@ -4476,8 +4478,10 @@ thread-pre-split67: ; preds = %instanceof_function br label %dom_element_insert_adjacent_element.exit 85: ; preds = %78 - %switch.i = icmp ugt ptr %81, inttoptr (i64 -3 to ptr) - br i1 %switch.i, label %88, label %86 + %switch.i = icmp ne ptr %81, inttoptr (i64 -1 to ptr) + %87 = icmp ne ptr %81, inttoptr (i64 -2 to ptr) + %or.cond.i = and i1 %86, %87 + br i1 %or.cond.i, label %88, label %90 86: ; preds = %85 %87 = tail call zeroext i1 @php_dom_create_object(ptr noundef %80, ptr noundef %1, ptr noundef nonnull %67) #11 @@ -4554,13 +4558,12 @@ define hidden void @zim_DOMElement_insertAdjacentText(ptr noundef readonly captu %39 = trunc nuw nsw i64 %29 to i32 %40 = call ptr @xmlNewDocTextLen(ptr noundef %37, ptr noundef nonnull %38, i32 noundef %39) #11 %41 = call fastcc ptr @dom_insert_adjacent(ptr noundef %13, ptr noundef %35, ptr noundef nonnull %16, ptr noundef %40) - %magicptr.i = ptrtoint ptr %41 to i64 - switch i64 %magicptr.i, label %dom_element_insert_adjacent_text.exit [ - i64 -1, label %42 - i64 0, label %42 - ] + %42 = icmp eq ptr %41, null + %43 = icmp eq ptr %41, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %42, %43 + br i1 %or.cond.i, label %42, label %dom_element_insert_adjacent_text.exit -42: ; preds = %34, %34 +42: ; preds = %34 call void @xmlFreeNode(ptr noundef %40) #11 br label %dom_element_insert_adjacent_text.exit @@ -4703,13 +4706,12 @@ zend_parse_arg_str_ex.exit..critedge_crit_edge: ; preds = %zend_parse_arg_str_ %66 = trunc nuw nsw i64 %56 to i32 %67 = call ptr @xmlNewDocTextLen(ptr noundef %64, ptr noundef nonnull %65, i32 noundef %66) #11 %68 = call fastcc ptr @dom_insert_adjacent(ptr noundef %41, ptr noundef %62, ptr noundef nonnull %43, ptr noundef %67) - %magicptr.i = ptrtoint ptr %68 to i64 - switch i64 %magicptr.i, label %dom_element_insert_adjacent_text.exit [ - i64 -1, label %69 - i64 0, label %69 - ] + %69 = icmp eq ptr %68, null + %70 = icmp eq ptr %68, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %69, %70 + br i1 %or.cond.i, label %69, label %dom_element_insert_adjacent_text.exit -69: ; preds = %61, %61 +69: ; preds = %61 call void @xmlFreeNode(ptr noundef %67) #11 br label %dom_element_insert_adjacent_text.exit diff --git a/bench/php/optimized/zend_hash.ll b/bench/php/optimized/zend_hash.ll index 3b4e57c6027..00df2bba564 100644 --- a/bench/php/optimized/zend_hash.ll +++ b/bench/php/optimized/zend_hash.ll @@ -2058,11 +2058,10 @@ define dso_local i32 @zend_hash_iterator_pos(i32 noundef %0, ptr noundef %1) loc br i1 %14, label %15, label %26 15: ; preds = %.preheader28 - %magicptr.i = ptrtoint ptr %7 to i64 - switch i64 %magicptr.i, label %16 [ - i64 0, label %21 - i64 -1, label %21 - ], !prof !73 + %.not32.i = icmp eq ptr %7, null + %.not33.i = icmp eq ptr %7, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %.not32.i, %.not33.i + br i1 %or.cond.i, label %21, label %16, !prof !73 16: ; preds = %15 %17 = getelementptr inbounds nuw i8, ptr %7, i64 10 @@ -2075,7 +2074,7 @@ define dso_local i32 @zend_hash_iterator_pos(i32 noundef %0, ptr noundef %1) loc store i8 %20, ptr %17, align 2, !tbaa !5 br label %21 -21: ; preds = %19, %16, %15, %15 +21: ; preds = %19, %16, %15 %22 = getelementptr inbounds nuw i8, ptr %1, i64 10 %23 = load i8, ptr %22, align 2, !tbaa !5 %.not35.i = icmp eq i8 %23, -1 @@ -2109,11 +2108,10 @@ zend_hash_iterator_find_copy_pos.exit: ; preds = %24, %21 33: ; preds = %.thread, %8 %34 = phi ptr [ %.pre, %.thread ], [ %7, %8 ] - %magicptr = ptrtoint ptr %34 to i64 - switch i64 %magicptr, label %35 [ - i64 0, label %40 - i64 -1, label %40 - ], !prof !73 + %.not19 = icmp eq ptr %34, null + %.not20 = icmp eq ptr %34, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %.not19, %.not20 + br i1 %or.cond, label %40, label %35, !prof !73 35: ; preds = %33 %36 = getelementptr inbounds nuw i8, ptr %34, i64 10 @@ -2126,7 +2124,7 @@ zend_hash_iterator_find_copy_pos.exit: ; preds = %24, %21 store i8 %39, ptr %36, align 2, !tbaa !5 br label %40 -40: ; preds = %33, %33, %38, %35 +40: ; preds = %38, %35, %33 %41 = getelementptr inbounds nuw i8, ptr %1, i64 10 %42 = load i8, ptr %41, align 2, !tbaa !5 %.not22 = icmp eq i8 %42, -1 @@ -2205,7 +2203,7 @@ _zend_hash_get_valid_pos.exit.loopexit58.split.loop.exit61: ; preds = %60 br label %_zend_hash_get_valid_pos.exit _zend_hash_get_valid_pos.exit: ; preds = %65, %71, %_zend_hash_get_valid_pos.exit.loopexit58.split.loop.exit61, %_zend_hash_get_valid_pos.exit.loopexit.split.loop.exit63, %.preheader26, %.preheader - %.1.i = phi i32 [ %47, %.preheader ], [ %47, %.preheader26 ], [ %72, %_zend_hash_get_valid_pos.exit.loopexit.split.loop.exit63 ], [ %73, %_zend_hash_get_valid_pos.exit.loopexit58.split.loop.exit61 ], [ %52, %71 ], [ %52, %65 ] + %.1.i = phi i32 [ %47, %.preheader ], [ %47, %.preheader26 ], [ %72, %_zend_hash_get_valid_pos.exit.loopexit.split.loop.exit64 ], [ %73, %_zend_hash_get_valid_pos.exit.loopexit59.split.loop.exit62 ], [ %52, %71 ], [ %52, %65 ] %74 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i32 %.1.i, ptr %74, align 8, !tbaa !65 br label %75 @@ -2243,11 +2241,10 @@ define dso_local i32 @zend_hash_iterator_pos_ex(i32 noundef %0, ptr noundef capt br i1 %15, label %16, label %27 16: ; preds = %.preheader40 - %magicptr.i = ptrtoint ptr %8 to i64 - switch i64 %magicptr.i, label %17 [ - i64 0, label %22 - i64 -1, label %22 - ], !prof !73 + %.not32.i = icmp eq ptr %8, null + %.not33.i = icmp eq ptr %8, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %.not32.i, %.not33.i + br i1 %or.cond.i, label %22, label %17, !prof !73 17: ; preds = %16 %18 = getelementptr inbounds nuw i8, ptr %8, i64 10 @@ -2260,7 +2257,7 @@ define dso_local i32 @zend_hash_iterator_pos_ex(i32 noundef %0, ptr noundef capt store i8 %21, ptr %18, align 2, !tbaa !5 br label %22 -22: ; preds = %20, %17, %16, %16 +22: ; preds = %20, %17, %16 %23 = getelementptr inbounds nuw i8, ptr %3, i64 10 %24 = load i8, ptr %23, align 2, !tbaa !5 %.not35.i = icmp eq i8 %24, -1 @@ -2294,11 +2291,10 @@ zend_hash_iterator_find_copy_pos.exit: ; preds = %25, %22 34: ; preds = %.thread, %9 %35 = phi ptr [ %.pre, %.thread ], [ %8, %9 ] - %magicptr = ptrtoint ptr %35 to i64 - switch i64 %magicptr, label %36 [ - i64 0, label %43 - i64 -1, label %43 - ], !prof !73 + %.not30 = icmp eq ptr %35, null + %.not31 = icmp eq ptr %35, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %.not30, %.not31 + br i1 %or.cond, label %43, label %36, !prof !73 36: ; preds = %34 %37 = getelementptr inbounds nuw i8, ptr %3, i64 10 @@ -2313,7 +2309,7 @@ zend_hash_iterator_find_copy_pos.exit: ; preds = %25, %22 store i8 %42, ptr %40, align 2, !tbaa !5 br label %43 -43: ; preds = %34, %34, %36, %39 +43: ; preds = %34, %36, %39 %44 = load ptr, ptr %1, align 8, !tbaa !5 %45 = load i32, ptr %44, align 4, !tbaa !26 %46 = icmp ugt i32 %45, 1 @@ -2417,7 +2413,7 @@ _zend_hash_get_valid_pos.exit.loopexit70.split.loop.exit73: ; preds = %76 br label %_zend_hash_get_valid_pos.exit _zend_hash_get_valid_pos.exit: ; preds = %81, %87, %_zend_hash_get_valid_pos.exit.loopexit70.split.loop.exit73, %_zend_hash_get_valid_pos.exit.loopexit.split.loop.exit75, %.preheader38, %.preheader - %.1.i = phi i32 [ %63, %.preheader ], [ %63, %.preheader38 ], [ %88, %_zend_hash_get_valid_pos.exit.loopexit.split.loop.exit75 ], [ %89, %_zend_hash_get_valid_pos.exit.loopexit70.split.loop.exit73 ], [ %68, %87 ], [ %68, %81 ] + %.1.i = phi i32 [ %63, %.preheader ], [ %63, %.preheader38 ], [ %88, %_zend_hash_get_valid_pos.exit.loopexit.split.loop.exit76 ], [ %89, %_zend_hash_get_valid_pos.exit.loopexit71.split.loop.exit74 ], [ %68, %87 ], [ %68, %81 ] %90 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i32 %.1.i, ptr %90, align 8, !tbaa !65 br label %91 @@ -5045,11 +5041,10 @@ define dso_local void @zend_hash_iterator_del(i32 noundef %0) local_unnamed_addr %5 = icmp ne i32 %0, -1 tail call void @llvm.assume(i1 %5) %6 = load ptr, ptr %4, align 8, !tbaa !63 - %magicptr = ptrtoint ptr %6 to i64 - switch i64 %magicptr, label %7 [ - i64 0, label %13 - i64 -1, label %13 - ], !prof !73 + %.not = icmp eq ptr %6, null + %.not18 = icmp eq ptr %6, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %.not, %.not18 + br i1 %or.cond, label %13, label %7, !prof !73 7: ; preds = %1 %8 = getelementptr inbounds nuw i8, ptr %6, i64 10 @@ -5064,7 +5059,7 @@ define dso_local void @zend_hash_iterator_del(i32 noundef %0) local_unnamed_addr store i8 %12, ptr %8, align 2, !tbaa !5 br label %13 -13: ; preds = %1, %1, %10, %7 +13: ; preds = %10, %7, %1 store ptr null, ptr %4, align 8, !tbaa !63 %14 = getelementptr inbounds nuw i8, ptr %4, i64 12 %15 = load i32, ptr %14, align 4, !tbaa !72 @@ -5102,7 +5097,7 @@ define dso_local void @zend_hash_iterator_del(i32 noundef %0) local_unnamed_addr br label %.critedge .critedge: ; preds = %22, %.critedge.split.loop.exit24 - %.0.lcssa = phi i32 [ %28, %.critedge.split.loop.exit24 ], [ 0, %22 ] + %.0.lcssa = phi i32 [ %28, %.critedge.split.loop.exit25 ], [ 0, %22 ] store i32 %.0.lcssa, ptr getelementptr inbounds nuw (i8, ptr @executor_globals, i64 1108), align 4, !tbaa !62 br label %29 @@ -5132,11 +5127,10 @@ define internal fastcc void @zend_hash_remove_iterator_copies(i32 noundef range( %13 = icmp ne i32 %.015, -1 tail call void @llvm.assume(i1 %13) %14 = load ptr, ptr %12, align 8, !tbaa !63 - %magicptr.i = ptrtoint ptr %14 to i64 - switch i64 %magicptr.i, label %15 [ - i64 0, label %21 - i64 -1, label %21 - ], !prof !73 + %.not.i = icmp eq ptr %14, null + %.not18.i = icmp eq ptr %14, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %.not.i, %.not18.i + br i1 %or.cond.i, label %21, label %15, !prof !73 15: ; preds = %.lr.ph %16 = getelementptr inbounds nuw i8, ptr %14, i64 10 @@ -5151,7 +5145,7 @@ define internal fastcc void @zend_hash_remove_iterator_copies(i32 noundef range( store i8 %20, ptr %16, align 2, !tbaa !5 br label %21 -21: ; preds = %18, %15, %.lr.ph, %.lr.ph +21: ; preds = %18, %15, %.lr.ph store ptr null, ptr %12, align 8, !tbaa !63 %22 = getelementptr inbounds nuw i8, ptr %12, i64 12 %23 = load i32, ptr %22, align 4, !tbaa !72 @@ -18250,7 +18244,7 @@ attributes #32 = { nounwind willreturn memory(read) } !70 = !{!"branch_weights", i32 2000, i32 2002} !71 = !{!34, !12, i64 1104} !72 = !{!64, !12, i64 12} -!73 = !{!"branch_weights", i32 4000000, i32 2001, i32 2000} +!73 = !{!"branch_weights", i32 4001, i32 4000000} !74 = distinct !{!74, !69} !75 = distinct !{!75, !69} !76 = distinct !{!76, !69} diff --git a/bench/php/optimized/zend_inference.ll b/bench/php/optimized/zend_inference.ll index 8cf650f3c19..ee2c79a6525 100644 --- a/bench/php/optimized/zend_inference.ll +++ b/bench/php/optimized/zend_inference.ll @@ -31830,11 +31830,10 @@ define internal fastcc ptr @zend_fetch_prop_info(ptr noundef readonly captures(n store ptr %48, ptr getelementptr inbounds nuw (i8, ptr @executor_globals, i64 520), align 8, !tbaa !172 %59 = tail call ptr @zend_get_property_info(ptr noundef nonnull %.0, ptr noundef %46, i32 noundef 1) #18 store ptr %58, ptr getelementptr inbounds nuw (i8, ptr @executor_globals, i64 520), align 8, !tbaa !172 - %magicptr.i = ptrtoint ptr %59 to i64 - switch i64 %magicptr.i, label %lookup_prop_info.exit.thread31 [ - i64 -1, label %.thread - i64 0, label %.thread - ] + %.not31.i = icmp eq ptr %59, inttoptr (i64 -1 to ptr) + %.not24 = icmp eq ptr %59, null + %or.cond = or i1 %.not31.i, %.not24 + br i1 %or.cond, label %.thread, label %lookup_prop_info.exit.thread31 60: ; preds = %53, %44 %61 = getelementptr inbounds nuw i8, ptr %.0, i64 120 @@ -31869,8 +31868,8 @@ lookup_prop_info.exit.thread31: ; preds = %57, %63, %69 %spec.store.select = select i1 %.not25, ptr %.1.i34, ptr null br label %.thread -.thread: ; preds = %60, %68, %69, %57, %57, %18, %27, %lookup_prop_info.exit.thread31, %4 - %.018 = phi ptr [ null, %4 ], [ %spec.store.select, %lookup_prop_info.exit.thread31 ], [ null, %27 ], [ null, %18 ], [ null, %57 ], [ null, %57 ], [ null, %69 ], [ null, %68 ], [ null, %60 ] +.thread: ; preds = %57, %60, %68, %69, %18, %27, %lookup_prop_info.exit.thread31, %4 + %.018 = phi ptr [ null, %4 ], [ %spec.store.select, %lookup_prop_info.exit.thread31 ], [ null, %27 ], [ null, %18 ], [ null, %69 ], [ null, %68 ], [ null, %60 ], [ null, %57 ] ret ptr %.018 } @@ -32007,11 +32006,10 @@ define internal fastcc ptr @zend_fetch_static_prop_info(ptr noundef %0, ptr noun store ptr %69, ptr getelementptr inbounds nuw (i8, ptr @executor_globals, i64 520), align 8, !tbaa !172 %80 = tail call ptr @zend_get_property_info(ptr noundef nonnull %.129, ptr noundef %67, i32 noundef 1) #18 store ptr %79, ptr getelementptr inbounds nuw (i8, ptr @executor_globals, i64 520), align 8, !tbaa !172 - %magicptr.i = ptrtoint ptr %80 to i64 - switch i64 %magicptr.i, label %lookup_prop_info.exit.thread6 [ - i64 -1, label %.thread - i64 0, label %.thread - ] + %.not31.i = icmp eq ptr %80, inttoptr (i64 -1 to ptr) + %.not38 = icmp eq ptr %80, null + %or.cond = or i1 %.not31.i, %.not38 + br i1 %or.cond, label %.thread, label %lookup_prop_info.exit.thread6 81: ; preds = %74, %65 %82 = getelementptr inbounds nuw i8, ptr %.129, i64 120 @@ -32046,8 +32044,8 @@ lookup_prop_info.exit.thread6: ; preds = %78, %84, %90 %spec.store.select = select i1 %.not39, ptr null, ptr %.1.i9 br label %.thread -.thread: ; preds = %81, %89, %90, %78, %78, %7, %17, %20, %10, %48, %lookup_prop_info.exit.thread6, %3 - %.0 = phi ptr [ null, %3 ], [ null, %48 ], [ %spec.store.select, %lookup_prop_info.exit.thread6 ], [ null, %10 ], [ null, %20 ], [ null, %17 ], [ null, %7 ], [ null, %78 ], [ null, %78 ], [ null, %90 ], [ null, %89 ], [ null, %81 ] +.thread: ; preds = %78, %81, %89, %90, %7, %17, %20, %10, %48, %lookup_prop_info.exit.thread6, %3 + %.0 = phi ptr [ null, %3 ], [ null, %48 ], [ %spec.store.select, %lookup_prop_info.exit.thread6 ], [ null, %10 ], [ null, %20 ], [ null, %17 ], [ null, %7 ], [ null, %90 ], [ null, %89 ], [ null, %81 ], [ null, %78 ] ret ptr %.0 } diff --git a/bench/php/optimized/zend_shared_alloc.ll b/bench/php/optimized/zend_shared_alloc.ll index 725e2776dcb..2426d5e9738 100644 --- a/bench/php/optimized/zend_shared_alloc.ll +++ b/bench/php/optimized/zend_shared_alloc.ll @@ -161,7 +161,7 @@ define hidden i32 @zend_shared_alloc_startup(i64 noundef %0, i64 noundef %1) loc store i32 0, ptr %20, align 8, !tbaa !35 %22 = load ptr, ptr %.043.val68, align 8, !tbaa !36 %23 = call i32 %22(i64 noundef %0, ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef nonnull %4) #20 - switch i32 %23, label %zend_shared_alloc_try.exit.thread90 [ + switch i32 %23, label %zend_shared_alloc_try.exit.thread92 [ i32 0, label %24 i32 2, label %47 ] @@ -184,11 +184,10 @@ define hidden i32 @zend_shared_alloc_startup(i64 noundef %0, i64 noundef %1) loc %31 = load ptr, ptr %30, align 8, !tbaa !39 %32 = getelementptr inbounds nuw i8, ptr %31, i64 24 %33 = load ptr, ptr %32, align 8, !tbaa !41 - %magicptr.i = ptrtoint ptr %33 to i64 - switch i64 %magicptr.i, label %34 [ - i64 0, label %39 - i64 -1, label %39 - ] + %.not24.i = icmp eq ptr %33, null + %.not25.i = icmp eq ptr %33, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %.not24.i, %.not25.i + br i1 %or.cond.i, label %39, label %34 34: ; preds = %.lr.ph.i %35 = load ptr, ptr @g_shared_alloc_handler, align 8, !tbaa !33 @@ -198,8 +197,8 @@ define hidden i32 @zend_shared_alloc_startup(i64 noundef %0, i64 noundef %1) loc %.pre.i = load i32, ptr %20, align 4, !tbaa !4 br label %39 -39: ; preds = %34, %.lr.ph.i, %.lr.ph.i - %40 = phi i32 [ %28, %.lr.ph.i ], [ %28, %.lr.ph.i ], [ %.pre.i, %34 ] +39: ; preds = %34, %.lr.ph.i + %40 = phi i32 [ %28, %.lr.ph.i ], [ %.pre.i, %34 ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %41 = sext i32 %40 to i64 %42 = icmp slt i64 %indvars.iv.next.i, %41 @@ -236,8 +235,8 @@ zend_shared_alloc_try.exit.thread90: ; preds = %18, %44, %2, %9 br i1 %.not59, label %.preheader99, label %zend_shared_alloc_try.exit82.thread95 .preheader99: ; preds = %zend_shared_alloc_try.exit.thread90, %75 - %49 = phi ptr [ %77, %75 ], [ @.str.11, %zend_shared_alloc_try.exit.thread90 ] - %.144101 = phi ptr [ %76, %75 ], [ @handler_table, %zend_shared_alloc_try.exit.thread90 ] + %49 = phi ptr [ %77, %75 ], [ @.str.11, %zend_shared_alloc_try.exit.thread92 ] + %.144101 = phi ptr [ %76, %75 ], [ @handler_table, %zend_shared_alloc_try.exit.thread92 ] %50 = load ptr, ptr @smm_shared_globals, align 8, !tbaa !11 %51 = getelementptr inbounds nuw i8, ptr %50, i64 8 %52 = getelementptr i8, ptr %.144101, i64 8 @@ -269,11 +268,10 @@ zend_shared_alloc_try.exit.thread90: ; preds = %18, %44, %2, %9 %62 = load ptr, ptr %61, align 8, !tbaa !39 %63 = getelementptr inbounds nuw i8, ptr %62, i64 24 %64 = load ptr, ptr %63, align 8, !tbaa !41 - %magicptr.i77 = ptrtoint ptr %64 to i64 - switch i64 %magicptr.i77, label %65 [ - i64 0, label %70 - i64 -1, label %70 - ] + %.not24.i77 = icmp eq ptr %64, null + %.not25.i78 = icmp eq ptr %64, inttoptr (i64 -1 to ptr) + %or.cond.i79 = or i1 %.not24.i77, %.not25.i78 + br i1 %or.cond.i79, label %70, label %65 65: ; preds = %.lr.ph.i75 %66 = load ptr, ptr @g_shared_alloc_handler, align 8, !tbaa !33 @@ -283,8 +281,8 @@ zend_shared_alloc_try.exit.thread90: ; preds = %18, %44, %2, %9 %.pre.i81 = load i32, ptr %51, align 4, !tbaa !4 br label %70 -70: ; preds = %65, %.lr.ph.i75, %.lr.ph.i75 - %71 = phi i32 [ %59, %.lr.ph.i75 ], [ %59, %.lr.ph.i75 ], [ %.pre.i81, %65 ] +70: ; preds = %65, %.lr.ph.i75 + %71 = phi i32 [ %59, %.lr.ph.i75 ], [ %.pre.i81, %65 ] %indvars.iv.next.i78 = add nuw nsw i64 %indvars.iv.i76, 1 %72 = sext i32 %71 to i64 %73 = icmp slt i64 %indvars.iv.next.i78, %72 @@ -295,7 +293,7 @@ zend_shared_alloc_try.exit.thread90: ; preds = %18, %44, %2, %9 br label %._crit_edge.i74 ._crit_edge.i74: ; preds = %._crit_edge.loopexit.i79, %.preheader.i73 - %74 = phi ptr [ %.pre3.i80, %._crit_edge.loopexit.i79 ], [ %56, %.preheader.i73 ] + %74 = phi ptr [ %.pre3.i80, %._crit_edge.loopexit.i82 ], [ %56, %.preheader.i73 ] call void @free(ptr noundef %74) #20 store ptr null, ptr %50, align 8, !tbaa !38 br label %75 @@ -324,8 +322,8 @@ zend_shared_alloc_try.exit82.thread: ; preds = %75, %zend_shared_al unreachable zend_shared_alloc_try.exit82.thread95: ; preds = %zend_shared_alloc_try.exit.thread90, %zend_shared_alloc_try.exit82 - %.498 = phi i32 [ %54, %zend_shared_alloc_try.exit82 ], [ %.04292, %zend_shared_alloc_try.exit.thread90 ] - %84 = phi ptr [ %.pr.pre, %zend_shared_alloc_try.exit82 ], [ %48, %zend_shared_alloc_try.exit.thread90 ] + %.498 = phi i32 [ %54, %zend_shared_alloc_try.exit84 ], [ %.04292, %zend_shared_alloc_try.exit.thread92 ] + %84 = phi ptr [ %.pr.pre, %zend_shared_alloc_try.exit84 ], [ %48, %zend_shared_alloc_try.exit.thread92 ] %85 = icmp eq i32 %.498, 4 br i1 %85, label %164, label %.preheader @@ -405,9 +403,9 @@ zend_shared_alloc_try.exit82.thread95: ; preds = %zend_shared_alloc_t br label %127 127: ; preds = %127, %.lr.ph.i85 - %indvars.iv.i86 = phi i64 [ 0, %.lr.ph.i85 ], [ %indvars.iv.next.i87, %127 ] - %.01619.i = phi ptr [ %115, %.lr.ph.i85 ], [ %130, %127 ] - %.01718.i = phi ptr [ %125, %.lr.ph.i85 ], [ %129, %127 ] + %indvars.iv.i86 = phi i64 [ 0, %.lr.ph.i87 ], [ %indvars.iv.next.i87, %127 ] + %.01619.i = phi ptr [ %115, %.lr.ph.i87 ], [ %130, %127 ] + %.01718.i = phi ptr [ %125, %.lr.ph.i87 ], [ %129, %127 ] %128 = getelementptr inbounds nuw ptr, ptr %110, i64 %indvars.iv.i86 store ptr %.01718.i, ptr %128, align 8, !tbaa !39 call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.01718.i, ptr align 1 %.01619.i, i64 %126, i1 false) @@ -480,7 +478,7 @@ copy_shared_segments.exit: ; preds = %127, %112 br label %164 164: ; preds = %zend_shared_alloc_try.exit82.thread95, %163, %47 - %.045 = phi i32 [ 2, %47 ], [ %.498, %163 ], [ 4, %zend_shared_alloc_try.exit82.thread95 ] + %.045 = phi i32 [ 2, %47 ], [ %.498, %163 ], [ 4, %zend_shared_alloc_try.exit84.thread97 ] call void @llvm.lifetime.end.p0(ptr nonnull %4) call void @llvm.lifetime.end.p0(ptr nonnull %3) ret i32 %.045 diff --git a/bench/php/optimized/zend_signal.ll b/bench/php/optimized/zend_signal.ll index 5125aff64b6..ec3342562dc 100644 --- a/bench/php/optimized/zend_signal.ll +++ b/bench/php/optimized/zend_signal.ll @@ -545,56 +545,57 @@ define internal fastcc void @zend_signal_handler(i32 noundef %0, ptr noundef %1, %.sroa.0.0.copyload = load i32, ptr %10, align 8, !tbaa !17 %.sroa.52.0..sroa_idx = getelementptr i8, ptr %9, i64 -8 %.sroa.52.0.copyload = load ptr, ptr %.sroa.52.0..sroa_idx, align 8, !tbaa !18 - %magicptr = ptrtoint ptr %.sroa.52.0.copyload to i64 - switch i64 %magicptr, label %25 [ - i64 0, label %11 - i64 1, label %31 - ] - -11: ; preds = %3 - %12 = call i32 @sigaction(i32 noundef %0, ptr noundef null, ptr noundef nonnull %4) #8 - %13 = icmp eq i32 %12, 0 - br i1 %13, label %14, label %31 - -14: ; preds = %11 - store ptr null, ptr %4, align 8, !tbaa !34 - %15 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %16 = call i32 @sigemptyset(ptr noundef nonnull %15) #8 - %17 = call i32 @sigemptyset(ptr noundef nonnull %5) #8 - %18 = call i32 @sigaddset(ptr noundef nonnull %5, i32 noundef %0) #8 - %19 = call i32 @sigaction(i32 noundef %0, ptr noundef nonnull %4, ptr noundef null) #8 - %20 = icmp eq i32 %19, 0 - br i1 %20, label %21, label %31 - -21: ; preds = %14 - %22 = call i32 @sigprocmask(i32 noundef 1, ptr noundef nonnull %5, ptr noundef null) #8 - %23 = call i32 @getpid() #8 - %24 = call i32 @kill(i32 noundef %23, i32 noundef %0) #8 - br label %31 + %11 = icmp eq ptr %.sroa.52.0.copyload, null + br i1 %11, label %25, label %26 25: ; preds = %3 - %26 = and i32 %.sroa.0.0.copyload, 4 - %.not16 = icmp eq i32 %26, 0 - br i1 %.not16, label %30, label %27 + %13 = call i32 @sigaction(i32 noundef %0, ptr noundef null, ptr noundef nonnull %4) #8 + %.not16 = icmp eq i32 %13, 0 + br i1 %.not16, label %15, label %33 27: ; preds = %25 + store ptr null, ptr %4, align 8, !tbaa !34 + %16 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %17 = call i32 @sigemptyset(ptr noundef nonnull %16) #8 + %18 = call i32 @sigemptyset(ptr noundef nonnull %5) #8 + %19 = call i32 @sigaddset(ptr noundef nonnull %5, i32 noundef %0) #8 + %20 = call i32 @sigaction(i32 noundef %0, ptr noundef nonnull %4, ptr noundef null) #8 + %21 = icmp eq i32 %20, 0 + br i1 %21, label %22, label %33 + +22: ; preds = %15 + %23 = call i32 @sigprocmask(i32 noundef 1, ptr noundef nonnull %5, ptr noundef null) #8 + %24 = call i32 @getpid() #8 + %25 = call i32 @kill(i32 noundef %24, i32 noundef %0) #8 + br label %33 + +26: ; preds = %3 + %.not = icmp eq ptr %.sroa.52.0.copyload, inttoptr (i64 1 to ptr) + br i1 %.not, label %33, label %27 + +27: ; preds = %26 + %28 = and i32 %.sroa.0.0.copyload, 4 + %.not16 = icmp eq i32 %28, 0 + br i1 %.not16, label %32, label %29 + +29: ; preds = %27 %.not17 = icmp sgt i32 %.sroa.0.0.copyload, -1 br i1 %.not17, label %29, label %28 -28: ; preds = %27 +28: ; preds = %29 store i32 0, ptr %10, align 8, !tbaa !28 store ptr null, ptr %.sroa.52.0..sroa_idx, align 8, !tbaa !33 br label %29 -29: ; preds = %28, %27 +29: ; preds = %28, %29 tail call void %.sroa.52.0.copyload(i32 noundef %0, ptr noundef %1, ptr noundef %2) #8 br label %31 -30: ; preds = %25 +30: ; preds = %27 tail call void %.sroa.52.0.copyload(i32 noundef %0) #8 br label %31 -31: ; preds = %3, %30, %29, %11, %21, %14 +31: ; preds = %26, %30, %29, %25, %22, %15 store i32 %7, ptr %6, align 4, !tbaa !17 call void @llvm.lifetime.end.p0(ptr nonnull %5) call void @llvm.lifetime.end.p0(ptr nonnull %4) diff --git a/bench/portaudio/optimized/pa_unix_util.ll b/bench/portaudio/optimized/pa_unix_util.ll index a5be685de77..9ed86d86d8c 100644 --- a/bench/portaudio/optimized/pa_unix_util.ll +++ b/bench/portaudio/optimized/pa_unix_util.ll @@ -150,11 +150,10 @@ define noundef i32 @PaUtil_CancelThreading(ptr noundef readonly captures(none) % %11 = load i64, ptr %0, align 8, !tbaa !13 %12 = call i32 @pthread_join(i64 noundef %11, ptr noundef nonnull %4) #16 %13 = load ptr, ptr %4, align 8, !tbaa !15 - %magicptr = ptrtoint ptr %13 to i64 - switch i64 %magicptr, label %14 [ - i64 -1, label %18 - i64 0, label %18 - ] + %14 = icmp ne ptr %13, null + %15 = icmp ne ptr %13, inttoptr (i64 -1 to ptr) + %or.cond = and i1 %14, %15 + br i1 %or.cond, label %16, label %18 14: ; preds = %10 br i1 %.not, label %17, label %15 @@ -165,10 +164,10 @@ define noundef i32 @PaUtil_CancelThreading(ptr noundef readonly captures(none) % br label %17 17: ; preds = %15, %14 - call void @free(ptr noundef %13) #16 + call void @free(ptr noundef nonnull %13) #16 br label %18 -18: ; preds = %10, %10, %17 +18: ; preds = %19, %10 call void @llvm.lifetime.end.p0(ptr nonnull %4) ret i32 0 } @@ -557,32 +556,31 @@ define range(i32 -9999, 1) i32 @PaUnixThread_Terminate(ptr noundef initializes(( 20: ; preds = %17, %14 call void (ptr, ...) @PaUtil_DebugPrint(ptr noundef nonnull @.str.8) #16 - br label %27 + br label %29 21: ; preds = %11 %22 = load ptr, ptr %4, align 8, !tbaa !15 - %magicptr = ptrtoint ptr %22 to i64 - switch i64 %magicptr, label %23 [ - i64 -1, label %27 - i64 0, label %27 - ] - -23: ; preds = %21 - br i1 %.not, label %26, label %24 - -24: ; preds = %23 - %25 = load i32, ptr %22, align 4, !tbaa !11 - store i32 %25, ptr %2, align 4, !tbaa !11 - br label %26 - -26: ; preds = %24, %23 - call void @free(ptr noundef %22) #16 - br label %27 - -27: ; preds = %21, %21, %26, %20 - %.0 = phi i32 [ -9999, %20 ], [ 0, %26 ], [ 0, %21 ], [ 0, %21 ] - %28 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %29 = call i32 @pthread_mutex_destroy(ptr noundef nonnull %28) #16 + %23 = icmp ne ptr %22, null + %24 = icmp ne ptr %22, inttoptr (i64 -1 to ptr) + %or.cond = and i1 %23, %24 + br i1 %or.cond, label %25, label %29 + +25: ; preds = %21 + br i1 %.not, label %28, label %26 + +26: ; preds = %25 + %27 = load i32, ptr %22, align 4, !tbaa !11 + store i32 %27, ptr %2, align 4, !tbaa !11 + br label %28 + +28: ; preds = %26, %25 + call void @free(ptr noundef nonnull %22) #16 + br label %29 + +29: ; preds = %21, %28, %20 + %.0 = phi i32 [ -9999, %20 ], [ 0, %28 ], [ 0, %21 ] + %30 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %31 = call i32 @pthread_mutex_destroy(ptr noundef nonnull %30) #16 store i32 0, ptr @paUtilErr_, align 4, !tbaa !11 %30 = getelementptr inbounds nuw i8, ptr %0, i64 64 %31 = call i32 @pthread_cond_destroy(ptr noundef nonnull %30) #16 diff --git a/bench/qemu/optimized/libvhost-user.ll b/bench/qemu/optimized/libvhost-user.ll index 5213726517d..ec4036df249 100644 --- a/bench/qemu/optimized/libvhost-user.ll +++ b/bench/qemu/optimized/libvhost-user.ll @@ -4809,22 +4809,23 @@ define internal fastcc void @vu_get_inflight_fd(ptr noundef %0, ptr noundef nonn 27: ; preds = %24 %28 = tail call ptr @mmap64(ptr noundef null, i64 noundef range(i64 0, 68718428161) %18, i32 noundef 3, i32 noundef 1, i32 noundef %19, i64 noundef 0) #21 - %magicptr = ptrtoint ptr %28 to i64 - switch i64 %magicptr, label %30 [ - i64 -1, label %.sink.split.i - i64 0, label %memfd_alloc.exit.thread - ] + %29 = icmp eq ptr %28, inttoptr (i64 -1 to ptr) + br i1 %29, label %.sink.split.i, label %memfd_alloc.exit .sink.split.i: ; preds = %27, %24, %21 %29 = tail call i32 @close(i32 noundef %19) #21 br label %memfd_alloc.exit.thread -memfd_alloc.exit.thread: ; preds = %27, %.sink.split.i, %7 +memfd_alloc.exit.thread: ; preds = %27 + %.not23 = icmp eq ptr %28, null + br i1 %.not23, label %memfd_alloc.exit.thread, label %31 + +memfd_alloc.exit.thread: ; preds = %.sink.split.i, %7, %memfd_alloc.exit tail call void (ptr, ptr, ...) @vu_panic(ptr noundef %0, ptr noundef nonnull @.str.87) store i64 0, ptr %8, align 1 br label %37 -30: ; preds = %27 +30: ; preds = %memfd_alloc.exit tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %28, i8 0, i64 %18, i1 false) %31 = getelementptr inbounds nuw i8, ptr %0, i64 24 %32 = getelementptr inbounds nuw i8, ptr %0, i64 32 diff --git a/bench/redis/optimized/pages.ll b/bench/redis/optimized/pages.ll index ecd698fc03f..8cd1e8c5259 100644 --- a/bench/redis/optimized/pages.ll +++ b/bench/redis/optimized/pages.ll @@ -100,22 +100,22 @@ os_pages_unmap.exit: ; preds = %15, %25 %38 = phi i32 [ %35, %._crit_edge.i.i ], [ 3, %36 ] %39 = load i32, ptr @mmap_flags, align 4, !tbaa !4 %40 = call ptr @mmap(ptr noundef null, i64 noundef %28, i32 noundef %38, i32 noundef %39, i32 noundef -1, i64 noundef 0) #8 - %magicptr.i = ptrtoint ptr %40 to i64 - switch i64 %magicptr.i, label %41 [ - i64 -1, label %pages_map_slow.exit - i64 0, label %pages_map_slow.exit - ] - -41: ; preds = %37 - %42 = add i64 %13, %magicptr.i + %41 = icmp eq ptr %40, inttoptr (i64 -1 to ptr) + %.not.i = icmp eq ptr %40, null + %or.cond.i = or i1 %41, %.not.i + br i1 %or.cond.i, label %pages_map_slow.exit, label %42 + +42: ; preds = %37 + %43 = ptrtoint ptr %40 to i64 + %42 = add i64 %13, %43 %43 = and i64 %42, %30 - %44 = sub i64 %43, %magicptr.i + %44 = sub i64 %43, %43 %45 = add i64 %44, %1 %46 = sub i64 %28, %45 - %.not.i.i = icmp eq i64 %43, %magicptr.i + %.not.i.i = icmp eq i64 %43, %43 br i1 %.not.i.i, label %os_pages_unmap.exit.i.i, label %47 -47: ; preds = %41 +47: ; preds = %42 %48 = call i32 @munmap(ptr noundef nonnull %40, i64 noundef %44) #8 %49 = icmp eq i32 %48, -1 br i1 %49, label %50, label %os_pages_unmap.exit.i.i @@ -138,7 +138,7 @@ os_pages_unmap.exit: ; preds = %15, %25 call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %os_pages_unmap.exit.i.i -os_pages_unmap.exit.i.i: ; preds = %57, %47, %41 +os_pages_unmap.exit.i.i: ; preds = %57, %47, %42 %.not13.i26.i = icmp eq i64 %28, %45 br i1 %.not13.i26.i, label %71, label %58 @@ -175,8 +175,8 @@ os_pages_unmap.exit.i.i: ; preds = %57, %47, %41 %73 = inttoptr i64 %43 to ptr br label %pages_map_slow.exit -pages_map_slow.exit: ; preds = %37, %37, %.thread.loopexit.split.loop.exit.i, %os_pages_unmap.exit, %11, %4 - %.0 = phi ptr [ %8, %4 ], [ %8, %11 ], [ null, %os_pages_unmap.exit ], [ %73, %.thread.loopexit.split.loop.exit.i ], [ null, %37 ], [ null, %37 ] +pages_map_slow.exit: ; preds = %37, %.thread.loopexit.split.loop.exit.i, %os_pages_unmap.exit, %11, %4 + %.0 = phi ptr [ %8, %4 ], [ %8, %11 ], [ null, %os_pages_unmap.exit ], [ %73, %.thread.loopexit.split.loop.exit.i ], [ null, %37 ] ret ptr %.0 } @@ -647,11 +647,10 @@ init_thp_state.exit: ; preds = %62, %66, %70, %71 %spec.select = select i1 %73, i32 3, i32 0 %74 = load i32, ptr @mmap_flags, align 4, !tbaa !4 %75 = call ptr @mmap(ptr noundef null, i64 noundef 4096, i32 noundef %spec.select, i32 noundef %74, i32 noundef -1, i64 noundef 0) #8 - %magicptr = ptrtoint ptr %75 to i64 - switch i64 %magicptr, label %76 [ - i64 -1, label %os_pages_unmap.exit - i64 0, label %os_pages_unmap.exit - ] + %76 = icmp eq ptr %75, inttoptr (i64 -1 to ptr) + %77 = icmp eq ptr %75, null + %or.cond = or i1 %76, %77 + br i1 %or.cond, label %os_pages_unmap.exit, label %78 76: ; preds = %init_thp_state.exit %.b.i = load i1, ptr @pages_can_purge_lazy_runtime, align 1 @@ -689,8 +688,8 @@ je_pages_purge_lazy.exit.thread: ; preds = %76, %je_pages_purge call void @llvm.lifetime.end.p0(ptr nonnull %1) br label %os_pages_unmap.exit -os_pages_unmap.exit: ; preds = %init_thp_state.exit, %init_thp_state.exit, %78, %88, %7 - %.04 = phi i1 [ true, %7 ], [ false, %78 ], [ false, %88 ], [ true, %init_thp_state.exit ], [ true, %init_thp_state.exit ] +os_pages_unmap.exit: ; preds = %init_thp_state.exit, %78, %88, %7 + %.04 = phi i1 [ true, %7 ], [ false, %80 ], [ false, %90 ], [ true, %init_thp_state.exit ] ret i1 %.04 } diff --git a/bench/ruby/optimized/thread.ll b/bench/ruby/optimized/thread.ll index 9c262286631..86cbccba2f3 100644 --- a/bench/ruby/optimized/thread.ll +++ b/bench/ruby/optimized/thread.ll @@ -6411,34 +6411,32 @@ rb_ec_vm_ptr.exit: ; preds = %.thread, %22 %25 = getelementptr inbounds nuw i8, ptr %.0.i, i64 40 %26 = load ptr, ptr %25, align 8, !tbaa !166 %27 = icmp ne ptr %26, %.val - %magicptr = ptrtoint ptr %2 to i64 - switch i64 %magicptr, label %28 [ - i64 -1, label %36 - i64 0, label %.fold.split - ] - -28: ; preds = %rb_ec_vm_ptr.exit - %29 = getelementptr inbounds nuw i8, ptr %.val, i64 24 - %30 = load ptr, ptr %29, align 8, !tbaa !52 - %31 = call i32 @rb_ractor_living_thread_num(ptr noundef %30) #16 - %32 = icmp ne i32 %31, 1 - %or.cond3.not68 = select i1 %32, i1 true, i1 %27 - %33 = and i32 %4, 2 - %.not55 = icmp eq i32 %33, 0 + %28 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + br i1 %28, label %38, label %29 + +29: ; preds = %rb_ec_vm_ptr.exit + %.not54 = icmp eq ptr %2, null + br i1 %.not54, label %38, label %30 + +30: ; preds = %29 + %31 = getelementptr inbounds nuw i8, ptr %.val, i64 24 + %32 = load ptr, ptr %31, align 8, !tbaa !52 + %33 = call i32 @rb_ractor_living_thread_num(ptr noundef %32) #16 + %34 = icmp ne i32 %33, 1 + %or.cond3.not68 = select i1 %34, i1 true, i1 %27 + %35 = and i32 %4, 2 + %.not55 = icmp eq i32 %35, 0 %or.cond = or i1 %.not55, %or.cond3.not68 - br i1 %or.cond, label %36, label %34 + br i1 %or.cond, label %36, label %36 -34: ; preds = %28 - %35 = getelementptr inbounds nuw i8, ptr %.0.i, i64 504 - store volatile i32 1, ptr %35, align 8, !tbaa !167 - br label %36 - -.fold.split: ; preds = %rb_ec_vm_ptr.exit - br label %36 +.fold.split: ; preds = %30 + %37 = getelementptr inbounds nuw i8, ptr %.0.i, i64 504 + store volatile i32 1, ptr %37, align 8, !tbaa !167 + br label %38 -36: ; preds = %rb_ec_vm_ptr.exit, %.fold.split, %28, %34 - %.047 = phi ptr [ %3, %34 ], [ %3, %28 ], [ %.val, %rb_ec_vm_ptr.exit ], [ %3, %.fold.split ] - %.046 = phi ptr [ %2, %34 ], [ %2, %28 ], [ @ubf_select, %rb_ec_vm_ptr.exit ], [ null, %.fold.split ] +36: ; preds = %rb_ec_vm_ptr.exit, %29, %30, %.fold.split + %.047 = phi ptr [ %3, %36 ], [ %3, %30 ], [ %3, %29 ], [ %.val, %rb_ec_vm_ptr.exit ] + %.046 = phi ptr [ %2, %36 ], [ %2, %30 ], [ null, %29 ], [ @ubf_select, %rb_ec_vm_ptr.exit ] call void @llvm.lifetime.start.p0(ptr nonnull %7) store volatile ptr %.0.i, ptr %7, align 8, !tbaa !147 call void @llvm.lifetime.start.p0(ptr nonnull %8) @@ -6484,8 +6482,8 @@ thread_sched_to_waiting.exit: ; preds = %thread_sched_lock_. br label %56 56: ; preds = %thread_sched_to_waiting.exit, %36 - %.048 = phi ptr [ %54, %thread_sched_to_waiting.exit ], [ null, %36 ] - %.0 = phi i32 [ %55, %thread_sched_to_waiting.exit ], [ 0, %36 ] + %.048 = phi ptr [ %54, %thread_sched_to_waiting.exit ], [ null, %38 ] + %.0 = phi i32 [ %55, %thread_sched_to_waiting.exit ], [ 0, %38 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) %.0..0..0..0. = load volatile ptr, ptr %7, align 8, !tbaa !147 br i1 %27, label %59, label %57 @@ -6520,7 +6518,7 @@ thread_sched_to_waiting.exit: ; preds = %thread_sched_lock_. br label %rb_threadptr_pending_interrupt_empty_p.exit.i rb_threadptr_pending_interrupt_empty_p.exit.i: ; preds = %69, %66 - %.0.i.i.i = phi i64 [ %68, %66 ], [ %71, %69 ] + %.0.i.i.i = phi i64 [ %68, %68 ], [ %71, %71 ] %.not.i59 = icmp eq i64 %.0.i.i.i, 0 br i1 %.not.i59, label %72, label %77, !prof !45 diff --git a/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll b/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll index 992f9e24219..e0f057f99d9 100644 --- a/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll +++ b/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll @@ -112736,9 +112736,9 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef to label %15 unwind label %13 .body.thread24: ; preds = %.noexc20.i, %72, %.body, %.body.thread, %13 - %.pn = phi { ptr, i32 } [ %eh.lpad-body23, %.body.thread ], [ %lpad.thr_comm.split-lp, %.body ], [ %14, %13 ], [ %.pn147.i43, %.noexc20.i ], [ %73, %72 ] + %.pn = phi { ptr, i32 } [ %eh.lpad-body23, %.body.thread ], [ %lpad.thr_comm.split-lp, %.body ], [ %14, %13 ], [ %.pn147.i43, %.noexc20.i ], [ %73, %74 ] invoke void @"_ZN4core3ptr53drop_in_place$LT$typst..foundations..value..Value$GT$17h54cec887ca59b7d7E.llvm.16978709814855407318"(ptr noalias noundef nonnull align 8 dereferenceable(32) %1) #80 - to label %82 unwind label %80 + to label %84 unwind label %80 13: ; preds = %2 %14 = landingpad { ptr, i32 } @@ -112805,7 +112805,7 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef "_ZN4core3ptr46drop_in_place$LT$typst..diag..HintedString$GT$17h2439ce4349f780d9E.exit.i": ; preds = %28, %24 invoke void @"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$ecow..string..EcoString$GT$$GT$17hfe090965bfb15ae3E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %10) - to label %.thread37 unwind label %.body.thread28 + to label %.thread38 unwind label %.body.thread28 .thread37: ; preds = %"_ZN4core3ptr46drop_in_place$LT$typst..diag..HintedString$GT$17h2439ce4349f780d9E.exit.i" call void @llvm.lifetime.end.p0(ptr nonnull %10) @@ -112859,8 +112859,8 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef unreachable 46: ; preds = %.thread37, %21, %76 - %.sroa.5.0 = phi i64 [ %78, %76 ], [ undef, %21 ], [ undef, %.thread37 ] - %.sroa.0.0 = phi ptr [ %77, %76 ], [ null, %21 ], [ null, %.thread37 ] + %.sroa.5.0 = phi i64 [ %78, %78 ], [ undef, %21 ], [ undef, %.thread38 ] + %.sroa.0.0 = phi ptr [ %77, %78 ], [ null, %21 ], [ null, %.thread38 ] %.val9 = load ptr, ptr %12, align 8 %47 = getelementptr inbounds nuw i8, ptr %0, i64 160 %.val10 = load ptr, ptr %47, align 8 @@ -112874,11 +112874,10 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef to label %49 unwind label %.thread4.i 49: ; preds = %46 - %magicptr.i = ptrtoint ptr %.sroa.0.0 to i64 - switch i64 %magicptr.i, label %50 [ - i64 0, label %.fold.split.i - i64 16, label %.fold.split.i - ] + %50 = icmp eq ptr %.sroa.0.0, null + %.not.i.i = icmp eq ptr %.sroa.0.0, inttoptr (i64 16 to ptr) + %or.cond = or i1 %50, %.not.i.i + br i1 %or.cond, label %.fold.split.i, label %51 50: ; preds = %49 %51 = getelementptr inbounds i8, ptr %.sroa.0.0, i64 -16 @@ -112893,7 +112892,7 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef .noexc.i: ; preds = %54 unreachable -.fold.split.i: ; preds = %50, %49, %49 +.fold.split.i: ; preds = %50, %49 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %6, i64 32, i1 false), !noalias !21822 %55 = getelementptr inbounds nuw i8, ptr %7, i64 32 store ptr %.sroa.0.0, ptr %55, align 8, !noalias !21822 @@ -112907,7 +112906,7 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !21822 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %11, i64 32, i1 false) invoke void @_ZN5typst4eval6tracer6Tracer5value17h51072a060fd38b1fE(ptr noalias noundef nonnull align 8 dereferenceable(104) %.val9, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %5, ptr noundef %.sroa.0.0, i64 %.sroa.5.0) - to label %61 unwind label %72 + to label %63 unwind label %72 59: ; preds = %54 %60 = landingpad { ptr, i32 } @@ -112942,7 +112941,7 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef %69 = or disjoint i128 %68, %66 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !21822 invoke fastcc void @"_ZN6comemo10constraint26MutableConstraint$LT$T$GT$4push17hfce69a9854b99b8fE"(ptr noundef nonnull align 8 %.val10, ptr noalias noundef align 8 captures(none) dereferenceable(64) %4, i128 noundef %69) - to label %.noexc15 unwind label %.body + to label %.noexc16 unwind label %.body .noexc15: ; preds = %62 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !21822 @@ -112956,13 +112955,13 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef .critedge.i: ; preds = %61 invoke fastcc void @"_ZN4core3ptr60drop_in_place$LT$typst..eval..tracer.._..__ComemoVariant$GT$17haf1c55c22053dd85E"(ptr noalias noundef align 8 dereferenceable(64) %7) - to label %79 unwind label %.body + to label %81 unwind label %.body 72: ; preds = %.fold.split.i %73 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr60drop_in_place$LT$typst..eval..tracer.._..__ComemoVariant$GT$17haf1c55c22053dd85E"(ptr noalias noundef align 8 dereferenceable(64) %7) #80 - to label %.body.thread24 unwind label %70 + to label %.body.thread25 unwind label %70 .thread4.i: ; preds = %46 %74 = landingpad { ptr, i32 } @@ -112971,14 +112970,14 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef br i1 %75, label %.noexc20.i, label %.thread4.i.thread .thread4.i.thread: ; preds = %59, %.thread4.i - %.pn147.i42 = phi { ptr, i32 } [ %74, %.thread4.i ], [ %60, %59 ] + %.pn147.i42 = phi { ptr, i32 } [ %74, %.thread4.i ], [ %60, %61 ] invoke void @"_ZN68_$LT$ecow..vec..EcoVec$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h9e9926965acbe215E.llvm.16845035774076767816"(ptr noalias noundef nonnull align 8 dereferenceable(16) %8) to label %.noexc20.i unwind label %70 .noexc20.i: ; preds = %.thread4.i.thread, %.thread4.i %.pn147.i43 = phi { ptr, i32 } [ %.pn147.i42, %.thread4.i.thread ], [ %74, %.thread4.i ] invoke void @"_ZN4core3ptr53drop_in_place$LT$typst..foundations..value..Value$GT$17h54cec887ca59b7d7E.llvm.16978709814855407318"(ptr noalias noundef nonnull align 8 dereferenceable(32) %11) #80 - to label %.body.thread24 unwind label %70 + to label %.body.thread25 unwind label %70 76: ; preds = %38 %77 = load ptr, ptr %9, align 8, !noalias !21816, !nonnull !4, !noundef !4 @@ -112994,9 +112993,9 @@ define void @_ZN5typst4eval2vm2Vm5trace17h512556c2d6be59b5E(ptr noalias noundef ret void .body.thread: ; preds = %36, %30, %.body.thread28 - %eh.lpad-body23 = phi { ptr, i32 } [ %lpad.thr_comm, %.body.thread28 ], [ %31, %30 ], [ %37, %36 ] + %eh.lpad-body23 = phi { ptr, i32 } [ %lpad.thr_comm, %.body.thread29 ], [ %31, %30 ], [ %37, %36 ] invoke void @"_ZN4core3ptr53drop_in_place$LT$typst..foundations..value..Value$GT$17h54cec887ca59b7d7E.llvm.16978709814855407318"(ptr noalias noundef nonnull align 8 dereferenceable(32) %11) #80 - to label %.body.thread24 unwind label %80 + to label %.body.thread25 unwind label %80 80: ; preds = %.body.thread, %.body.thread24 %81 = landingpad { ptr, i32 } diff --git a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll index 5b028895704..8f12fdd3fd2 100644 --- a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll +++ b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll @@ -1640,7 +1640,7 @@ _ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i.i.i: ; preds = unreachable common.resume.i.i: ; preds = %87, %75, %35 - %common.resume.op.i.i = phi { ptr, i32 } [ %88, %87 ], [ %36, %35 ], [ %76, %75 ] + %common.resume.op.i.i = phi { ptr, i32 } [ %88, %89 ], [ %36, %35 ], [ %76, %76 ] resume { ptr, i32 } %common.resume.op.i.i _ZN4core4iter8adapters7flatten17and_then_or_clear17h6c2c9002045e6e36E.exit.i.i: ; preds = %34 @@ -1677,11 +1677,8 @@ _ZN4core4iter8adapters7flatten17and_then_or_clear17h6c2c9002045e6e36E.exit.i.i: %46 = tail call { ptr, i64 } @_ZN5typst13introspection12introspector12Introspector5query17hd714b316c98c7e90E(ptr noundef nonnull align 8 %45, ptr noalias noundef nonnull readonly align 16 dereferenceable(64) %39), !noalias !361 %47 = extractvalue { ptr, i64 } %46, 0 %48 = extractvalue { ptr, i64 } %46, 1 - %magicptr.i.i = ptrtoint ptr %47 to i64 - switch i64 %magicptr.i.i, label %79 [ - i64 0, label %"_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.thread.i.i" - i64 16, label %"_ZN88_$LT$ecow..vec..EcoVec$LT$T$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17ha31cb41cd4f05b0eE.exit.i.i" - ] + %49 = icmp eq ptr %47, null + br i1 %49, label %"_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.thread.i.i", label %79 "_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.thread.i.i": ; preds = %"_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.i.i", %41, %"_ZN4core3ptr85drop_in_place$LT$core..option..Option$LT$typst..foundations..content..Content$GT$$GT$17he7b68e2b72a053d5E.exit.i.i" %49 = getelementptr inbounds nuw i8, ptr %0, i64 72 @@ -1707,41 +1704,41 @@ _ZN4core4iter8adapters7flatten17and_then_or_clear17h6c2c9002045e6e36E.exit.i.i: %56 = getelementptr inbounds nuw i8, ptr %0, i64 96 %57 = load i64, ptr %56, align 8, !alias.scope !379, !noalias !380, !noundef !4 %58 = icmp ult i64 %55, %57 - br i1 %58, label %59, label %_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.thread.i4.i.i + br i1 %58, label %60, label %_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.thread.i4.i.i _ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.thread.i4.i.i: ; preds = %53 store ptr null, ptr %2, align 8, !alias.scope !381, !noalias !382 br label %74 -59: ; preds = %53 - %60 = add nuw i64 %55, 1 - store i64 %60, ptr %54, align 8, !alias.scope !379, !noalias !383 - %61 = trunc nuw i8 %51 to i1 - %62 = load ptr, ptr %49, align 8, !alias.scope !379, !noalias !383, !nonnull !4, !noundef !4 - br i1 %61, label %_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i, label %63 - -63: ; preds = %59 - %64 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %65 = load i64, ptr %64, align 8, !alias.scope !379, !noalias !383, !noundef !4 - %66 = icmp ult i64 %55, %65 - tail call void @llvm.assume(i1 %66) - %67 = getelementptr inbounds { { { { ptr, ptr } }, {}, {} }, i64 }, ptr %62, i64 %55 +63: ; preds = %54 + %61 = add nuw i64 %56, 1 + store i64 %61, ptr %54, align 8, !alias.scope !379, !noalias !383 + %62 = trunc nuw i8 %52 to i1 + %63 = load ptr, ptr %50, align 8, !alias.scope !379, !noalias !383, !nonnull !4, !noundef !4 + br i1 %62, label %_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i, label %64 + +64: ; preds = %60 + %65 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %66 = load i64, ptr %65, align 8, !alias.scope !379, !noalias !383, !noundef !4 + %67 = icmp ult i64 %56, %66 + tail call void @llvm.assume(i1 %67) + %68 = getelementptr inbounds { { { { ptr, ptr } }, {}, {} }, i64 }, ptr %63, i64 %56 tail call void @llvm.experimental.noalias.scope.decl(metadata !387) - %.val.i.i.i.i.i6.i.i = load ptr, ptr %67, align 8, !alias.scope !387, !noalias !390, !nonnull !4, !noundef !4 - %68 = getelementptr inbounds nuw i8, ptr %67, i64 8 + %.val.i.i.i.i.i6.i.i = load ptr, ptr %68, align 8, !alias.scope !387, !noalias !390, !nonnull !4, !noundef !4 + %68 = getelementptr inbounds nuw i8, ptr %68, i64 8 %.val1.i.i.i.i.i7.i.i = load ptr, ptr %68, align 8, !alias.scope !387, !noalias !390 %69 = atomicrmw add ptr %.val.i.i.i.i.i6.i.i, i64 1 monotonic, align 8, !noalias !392 %70 = icmp slt i64 %69, 0 br i1 %70, label %71, label %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread9" -71: ; preds = %63 +71: ; preds = %64 tail call void @llvm.trap() unreachable -"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread9": ; preds = %63 +"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread9": ; preds = %64 %72 = icmp ne ptr %.val1.i.i.i.i.i7.i.i, null tail call void @llvm.assume(i1 %72) - %.sroa.6.0.in.i.i15.i9.i.i = getelementptr inbounds nuw i8, ptr %67, i64 16 + %.sroa.6.0.in.i.i15.i9.i.i = getelementptr inbounds nuw i8, ptr %68, i64 16 %.sroa.6.0.i.i16.i10.i.i = load i64, ptr %.sroa.6.0.in.i.i15.i9.i.i, align 8, !noalias !393 %.sroa.5.0..sroa_idx.i.i17.i11.i.i = getelementptr inbounds nuw i8, ptr %2, i64 8 store ptr %.val1.i.i.i.i.i7.i.i, ptr %.sroa.5.0..sroa_idx.i.i17.i11.i.i, align 8, !alias.scope !381, !noalias !382 @@ -1751,8 +1748,8 @@ _ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.thread.i4.i.i: ; call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !365 br label %89 -_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i: ; preds = %59 - %73 = getelementptr inbounds { { { { ptr, ptr } }, {}, {} }, i64 }, ptr %62, i64 %55 +_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i: ; preds = %60 + %73 = getelementptr inbounds { { { { ptr, ptr } }, {}, {} }, i64 }, ptr %63, i64 %55 %.sroa.01.0.copyload2.i.i.i14.i.i = load ptr, ptr %73, align 8, !noalias !393 %.sroa.5.0..sroa_idx3.i.i.i15.i.i = getelementptr inbounds nuw i8, ptr %73, i64 8 %.sroa.5.0.copyload4.i.i.i16.i.i = load ptr, ptr %.sroa.5.0..sroa_idx3.i.i.i15.i.i, align 8, !noalias !393 @@ -1768,7 +1765,7 @@ _ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i: ; preds 74: ; preds = %_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i, %_ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.thread.i4.i.i invoke void @"_ZN4core3ptr84drop_in_place$LT$ecow..vec..IntoIter$LT$typst..foundations..content..Content$GT$$GT$17hd5b599fe6bcdf200E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %49) - to label %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread30" unwind label %75, !noalias !368 + to label %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread31" unwind label %75, !noalias !368 75: ; preds = %74 %76 = landingpad { ptr, i32 } @@ -1790,14 +1787,18 @@ _ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i: ; preds unreachable 79: ; preds = %"_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.i.i" - %80 = getelementptr inbounds i8, ptr %47, i64 -16 - %81 = load atomic i64, ptr %80 acquire, align 8, !noalias !394 - %82 = icmp eq i64 %81, 1 - %83 = zext i1 %82 to i8 + %.not.i.i.i.i = icmp eq ptr %47, inttoptr (i64 16 to ptr) + br i1 %.not.i.i.i.i, label %"_ZN88_$LT$ecow..vec..EcoVec$LT$T$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17ha31cb41cd4f05b0eE.exit.i.i", label %81 + +81:; preds = %80 + %82 = getelementptr inbounds i8, ptr %47, i64 -16 + %83 = load atomic i64, ptr %82 acquire, align 8, !noalias !394 + %84 = icmp eq i64 %83, 1 + %85 = zext i1 %84 to i8 br label %"_ZN88_$LT$ecow..vec..EcoVec$LT$T$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17ha31cb41cd4f05b0eE.exit.i.i" -"_ZN88_$LT$ecow..vec..EcoVec$LT$T$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17ha31cb41cd4f05b0eE.exit.i.i": ; preds = %79, %"_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.i.i" - %.0.i.i.i.i.i = phi i8 [ %83, %79 ], [ 1, %"_ZN107_$LT$core..iter..adapters..fuse..Fuse$LT$I$GT$$u20$as$u20$core..iter..adapters..fuse..FuseImpl$LT$I$GT$$GT$4next17heb0ea41d27770e5aE.exit.i.i" ] +"_ZN88_$LT$ecow..vec..EcoVec$LT$T$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17ha31cb41cd4f05b0eE.exit.i.i": ; preds = %81, %80 + %.0.i.i.i.i.i = phi i8 [ %85, %81 ], [ 1, %80 ] %84 = load i8, ptr %7, align 8, !range !303, !alias.scope !397, !noalias !344, !noundef !4 %85 = icmp eq i8 %84, 2 br i1 %85, label %"_ZN4core3ptr112drop_in_place$LT$core..option..Option$LT$ecow..vec..IntoIter$LT$typst..foundations..content..Content$GT$$GT$$GT$17haf32e941f308af9dE.exit.i.i", label %86 @@ -1842,8 +1843,8 @@ _ZN4core3ops8function6FnOnce9call_once17hfab0f6ee74a4e201E.exit.i13.i.i: ; preds br label %91 91: ; preds = %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread30", %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread7", %89 - %.sroa.3.0 = phi i64 [ %90, %89 ], [ undef, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread7" ], [ undef, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread30" ] - %.sroa.0.0 = phi i64 [ 1, %89 ], [ 0, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread7" ], [ 0, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread30" ] + %.sroa.3.0 = phi i64 [ %90, %91 ], [ undef, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread7" ], [ undef, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread31" ] + %.sroa.0.0 = phi i64 [ 1, %91 ], [ 0, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread7" ], [ 0, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17haf7e58ffc487ec90E.exit.thread31" ] call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.7) %92 = insertvalue { i64, i64 } poison, i64 %.sroa.0.0, 0 %93 = insertvalue { i64, i64 } %92, i64 %.sroa.3.0, 1 diff --git a/bench/velox/optimized/MmapAllocator.ll b/bench/velox/optimized/MmapAllocator.ll index df0cd30f16e..a7b6b237956 100644 --- a/bench/velox/optimized/MmapAllocator.ll +++ b/bench/velox/optimized/MmapAllocator.ll @@ -4567,13 +4567,12 @@ if.then.i.i.i: ; preds = %if.then.i.i.i.i.i30 if.end: ; preds = %invoke.cont19 %call28 = tail call ptr @mmap(ptr noundef null, i64 noundef %mul.i36, i32 noundef 3, i32 noundef 34, i32 noundef -1, i64 noundef 0) #24 - %magicptr = ptrtoint ptr %call28 to i64 - switch i64 %magicptr, label %if.end32 [ - i64 -1, label %if.then31 - i64 0, label %if.then31 - ] + %cmp29 = icmp eq ptr %call28, inttoptr (i64 -1 to ptr) + %cmp30 = icmp eq ptr %call28, null + %or.cond = or i1 %cmp29, %cmp30 + br i1 %or.cond, label %if.then31, label %if.end32 -if.then31: ; preds = %if.end, %if.end +if.then31: ; preds = %if.end tail call void @llvm.trap() unreachable diff --git a/bench/verilator/optimized/V3Branch.ll b/bench/verilator/optimized/V3Branch.ll index 649424c81d7..5905c494f73 100644 --- a/bench/verilator/optimized/V3Branch.ll +++ b/bench/verilator/optimized/V3Branch.ll @@ -2732,18 +2732,29 @@ _ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic to label %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit unwind label %28 _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit: ; preds = %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit - %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoPK7AstNode(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull %1) - to label %19 unwind label %28 + %18 = icmp eq ptr %1, inttoptr (i64 1 to ptr) + br i1 %18, label %19, label %21, !prof !4 19: ; preds = %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit - %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8) %18) - to label %_ZNSolsEPFRSoS_E.exit unwind label %28 - -_ZNSolsEPFRSoS_E.exit: ; preds = %19 - %21 = load ptr, ptr %3, align 8, !tbaa !5 - %22 = getelementptr inbounds nuw i8, ptr %3, i64 16 - %23 = icmp eq ptr %21, %22 - br i1 %23, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i + %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.19, i64 noundef 15) + to label %_ZlsRSoPK7AstNode.exit unwind label %28 + +_ZNSolsEPFRSoS_E.exit: ; preds = %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit + %21 = load ptr, ptr %1, align 8, !tbaa !15 + %22 = getelementptr inbounds nuw i8, ptr %22, i64 112 + %24 = load ptr, ptr %23, align 8 + invoke void %24(ptr noundef nonnull align 8 dereferenceable(152) %1, ptr noundef nonnull align 8 dereferenceable(8) %16) + to label %_ZlsRSoPK7AstNode.exit unwind label %33 + +_ZlsRSoPK7AstNode.exit: ; preds = %19, %21 + %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8) %16) + to label %_ZNSolsEPFRSoS_E.exit unwind label %33 + +_ZNSolsEPFRSoS_E.exit: ; preds = %_ZlsRSoPK7AstNode.exit + %26 = load ptr, ptr %3, align 8, !tbaa !5 + %27 = getelementptr inbounds nuw i8, ptr %3, i64 16 + %28 = icmp eq ptr %26, %27 + br i1 %28, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %_ZNSolsEPFRSoS_E.exit %24 = load i64, ptr %14, align 8, !tbaa !13 @@ -2752,16 +2763,16 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i: ; preds = %_ZNSolsEPFRSoS_E.exit - %26 = load i64, ptr %22, align 8, !tbaa !14 + %26 = load i64, ptr %27, align 8, !tbaa !14 %27 = add i64 %26, 1 - call void @_ZdlPvm(ptr noundef %21, i64 noundef %27) #20 + call void @_ZdlPvm(ptr noundef %26, i64 noundef %27) #20 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i call void @llvm.lifetime.end.p0(ptr nonnull %3) br label %37 -28: ; preds = %19, %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit, %11, %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit +28: ; preds = %_ZlsRSoPK7AstNode.exit, %21, %19, %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit, %11 %29 = landingpad { ptr, i32 } cleanup %30 = load ptr, ptr %3, align 8, !tbaa !5 @@ -2798,28 +2809,29 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit6: ; preds = %_ZNK ; Function Attrs: inlinehint mustprogress uwtable define linkonce_odr dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoPK7AstNode(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) local_unnamed_addr #4 comdat { - %magicptr = ptrtoint ptr %1 to i64 - switch i64 %magicptr, label %7 [ - i64 0, label %3 - i64 1, label %5 - ], !prof !116 + %.not = icmp eq ptr %1, null + br i1 %.not, label %3, label %5 3: ; preds = %2 %4 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.18, i64 noundef 7) br label %11 5: ; preds = %2 - %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.19, i64 noundef 15) - br label %11 + %6 = icmp eq ptr %1, inttoptr (i64 1 to ptr) + br i1 %6, label %7, label %9, !prof !4 + +7: ; preds = %5 + %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.19, i64 noundef 15) + br label %13 -7: ; preds = %2 +7: ; preds = %5 %8 = load ptr, ptr %1, align 8, !tbaa !15 %9 = getelementptr inbounds nuw i8, ptr %8, i64 112 %10 = load ptr, ptr %9, align 8 - tail call void %10(ptr noundef nonnull align 8 dereferenceable(152) %1, ptr noundef nonnull align 8 dereferenceable(8) %0) + tail call void %12(ptr noundef nonnull align 8 dereferenceable(152) %1, ptr noundef nonnull align 8 dereferenceable(8) %0) br label %11 -11: ; preds = %5, %7, %3 +11: ; preds = %7, %7, %3 ret ptr %0 } @@ -3050,4 +3062,3 @@ attributes #25 = { builtin allocsize(0) } !113 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !102, i64 56} !114 = !{!113, !8, i64 32} !115 = !{!"branch_weights", !"expected", i32 2000, i32 1} -!116 = !{!"branch_weights", i32 2000, i32 2001, i32 1} diff --git a/bench/verilator/optimized/V3Clock.ll b/bench/verilator/optimized/V3Clock.ll index b02560cd38a..ab8f31ab1cd 100644 --- a/bench/verilator/optimized/V3Clock.ll +++ b/bench/verilator/optimized/V3Clock.ll @@ -1952,7 +1952,7 @@ _ZN7AstNode9privateAsI12AstMTaskBodyPS_EEPT_S2_.exit: ; preds = %12, %.lr.ph %13 = getelementptr inbounds nuw i8, ptr %11, i64 64 %.sroa.0.0.copyload.i.i.i = load i16, ptr %13, align 8, !tbaa !94 %.not6.i = icmp eq i16 %.sroa.0.0.copyload.i.i.i, 25 - br i1 %.not6.i, label %_ZN7AstNode9privateAsI12AstMTaskBodyPS_EEPT_S2_.exit, label %14, !prof !95 + br i1 %.not6.i, label %_ZN7AstNode9privateAsI12AstMTaskBodyPS_EEPT_S2_.exit, label %14, !prof !95, !llvm.loop !121 14: ; preds = %12 %15 = getelementptr inbounds nuw i8, ptr %11, i64 64 @@ -2422,16 +2422,16 @@ define linkonce_odr dso_local void @_ZN12ClockVisitor5visitEP10AstSenTree(ptr no %3 = tail call noundef ptr @_ZN7AstNode12unlinkFrBackEP10VNRelinker(ptr noundef nonnull align 8 dereferenceable(160) %1, ptr noundef null) %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %6 = load ptr, ptr %5, align 8, !tbaa !121 + %6 = load ptr, ptr %5, align 8, !tbaa !123 %7 = getelementptr inbounds nuw i8, ptr %0, i64 24 %8 = load ptr, ptr %7, align 8, !tbaa !21 %.not.i.i = icmp eq ptr %6, %8 br i1 %.not.i.i, label %11, label %9 9: ; preds = %2 - store ptr %1, ptr %6, align 8, !tbaa !122 + store ptr %1, ptr %6, align 8, !tbaa !124 %10 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store ptr %10, ptr %5, align 8, !tbaa !121 + store ptr %10, ptr %5, align 8, !tbaa !123 br label %_ZN9VNDeleter11pushDeletepEP7AstNode.exit 11: ; preds = %2 @@ -2458,7 +2458,7 @@ _ZNKSt6vectorIP7AstNodeSaIS1_EE12_M_check_lenEmPKc.exit.i.i.i: ; preds = %11 %23 = shl nuw nsw i64 %22, 3 %24 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %23) #27 %25 = getelementptr inbounds i8, ptr %24, i64 %15 - store ptr %1, ptr %25, align 8, !tbaa !122 + store ptr %1, ptr %25, align 8, !tbaa !124 %26 = icmp sgt i64 %15, 0 br i1 %26, label %27, label %_ZNSt6vectorIP7AstNodeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16.i.i.i @@ -2477,7 +2477,7 @@ _ZNSt6vectorIP7AstNodeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16.i.i.i: ; preds _ZNSt6vectorIP7AstNodeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i: ; preds = %29, %_ZNSt6vectorIP7AstNodeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16.i.i.i store ptr %24, ptr %4, align 8, !tbaa !17 - store ptr %28, ptr %5, align 8, !tbaa !121 + store ptr %28, ptr %5, align 8, !tbaa !123 %30 = getelementptr inbounds nuw ptr, ptr %24, i64 %22 store ptr %30, ptr %7, align 8, !tbaa !21 br label %_ZN9VNDeleter11pushDeletepEP7AstNode.exit @@ -2636,7 +2636,7 @@ define linkonce_odr dso_local void @_ZN12ClockVisitor5visitEP11AstVarScope(ptr n %4 = alloca %"class.std::__cxx11::basic_string", align 8 %5 = alloca %"class.std::__cxx11::basic_string", align 8 %6 = getelementptr inbounds nuw i8, ptr %1, i64 168 - %7 = load ptr, ptr %6, align 8, !tbaa !123 + %7 = load ptr, ptr %6, align 8, !tbaa !125 %8 = getelementptr inbounds nuw i8, ptr %7, i64 40 %9 = load ptr, ptr %8, align 8, !tbaa !103 %.not.not = icmp eq ptr %9, null @@ -2645,23 +2645,23 @@ define linkonce_odr dso_local void @_ZN12ClockVisitor5visitEP11AstVarScope(ptr n 10: ; preds = %2 call void @llvm.lifetime.start.p0(ptr nonnull %4) call void @llvm.lifetime.start.p0(ptr nonnull %5) - tail call void @llvm.experimental.noalias.scope.decl(metadata !126) + tail call void @llvm.experimental.noalias.scope.decl(metadata !128) %11 = getelementptr inbounds nuw i8, ptr %7, i64 152 %12 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store ptr %12, ptr %5, align 8, !tbaa !22, !alias.scope !126 - %13 = load ptr, ptr %11, align 8, !tbaa !5, !noalias !126 + store ptr %12, ptr %5, align 8, !tbaa !22, !alias.scope !128 + %13 = load ptr, ptr %11, align 8, !tbaa !5, !noalias !128 %14 = getelementptr inbounds nuw i8, ptr %7, i64 160 - %15 = load i64, ptr %14, align 8, !tbaa !13, !noalias !126 - call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !126 - store i64 %15, ptr %3, align 8, !tbaa !97, !noalias !126 + %15 = load i64, ptr %14, align 8, !tbaa !13, !noalias !128 + call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !128 + store i64 %15, ptr %3, align 8, !tbaa !97, !noalias !128 %16 = icmp ugt i64 %15, 15 br i1 %16, label %.noexc.i.i, label %._crit_edge.i.i.i .noexc.i.i: ; preds = %10 %17 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef 0) - store ptr %17, ptr %5, align 8, !tbaa !5, !alias.scope !126 - %18 = load i64, ptr %3, align 8, !tbaa !97, !noalias !126 - store i64 %18, ptr %12, align 8, !tbaa !14, !alias.scope !126 + store ptr %17, ptr %5, align 8, !tbaa !5, !alias.scope !128 + %18 = load i64, ptr %3, align 8, !tbaa !97, !noalias !128 + store i64 %18, ptr %12, align 8, !tbaa !14, !alias.scope !128 br label %._crit_edge.i.i.i ._crit_edge.i.i.i: ; preds = %.noexc.i.i, %10 @@ -2681,18 +2681,18 @@ define linkonce_odr dso_local void @_ZN12ClockVisitor5visitEP11AstVarScope(ptr n br label %_ZNK6AstVar4nameB5cxx11Ev.exit _ZNK6AstVar4nameB5cxx11Ev.exit: ; preds = %._crit_edge.i.i.i, %20, %22 - %23 = load i64, ptr %3, align 8, !tbaa !97, !noalias !126 + %23 = load i64, ptr %3, align 8, !tbaa !97, !noalias !128 %24 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store i64 %23, ptr %24, align 8, !tbaa !13, !alias.scope !126 - %25 = load ptr, ptr %5, align 8, !tbaa !5, !alias.scope !126 + store i64 %23, ptr %24, align 8, !tbaa !13, !alias.scope !128 + %25 = load ptr, ptr %5, align 8, !tbaa !5, !alias.scope !128 %26 = getelementptr inbounds nuw i8, ptr %25, i64 %23 store i8 0, ptr %26, align 1, !tbaa !14 - call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !126 - call void @llvm.experimental.noalias.scope.decl(metadata !129) - %27 = load i64, ptr %24, align 8, !tbaa !13, !noalias !129 + call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !128 + call void @llvm.experimental.noalias.scope.decl(metadata !131) + %27 = load i64, ptr %24, align 8, !tbaa !13, !noalias !131 %28 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store ptr %28, ptr %4, align 8, !tbaa !22, !alias.scope !129 - %29 = load ptr, ptr %5, align 8, !tbaa !5, !noalias !129 + store ptr %28, ptr %4, align 8, !tbaa !22, !alias.scope !131 + %29 = load ptr, ptr %5, align 8, !tbaa !5, !noalias !131 %spec.select.i.i.i = call noundef i64 @llvm.umin.i64(i64 %27, i64 10) switch i64 %spec.select.i.i.i, label %32 [ i64 1, label %30 @@ -2710,7 +2710,7 @@ _ZNK6AstVar4nameB5cxx11Ev.exit: ; preds = %._crit_edge.i.i.i, .critedge: ; preds = %32, %30, %_ZNK6AstVar4nameB5cxx11Ev.exit %33 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 %spec.select.i.i.i, ptr %33, align 8, !tbaa !13, !alias.scope !129 + store i64 %spec.select.i.i.i, ptr %33, align 8, !tbaa !13, !alias.scope !131 %34 = getelementptr inbounds nuw i8, ptr %28, i64 %spec.select.i.i.i store i8 0, ptr %34, align 1, !tbaa !14 %35 = call noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.444) #26 @@ -2763,7 +2763,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i34 to label %56 unwind label %108 56: ; preds = %49 - %57 = load ptr, ptr %6, align 8, !tbaa !123 + %57 = load ptr, ptr %6, align 8, !tbaa !125 invoke void @_ZN7AstNodeC2E6VNTypeP8FileLine(ptr noundef nonnull align 8 dereferenceable(200) %55, i16 320, ptr noundef %54) to label %.noexc unwind label %110 @@ -2772,13 +2772,13 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i34 %58 = getelementptr inbounds nuw i8, ptr %55, i64 152 %59 = getelementptr inbounds nuw i8, ptr %55, i64 176 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %58, i8 0, i64 24, i1 false) - store i8 1, ptr %59, align 8, !tbaa !132 + store i8 1, ptr %59, align 8, !tbaa !134 %60 = getelementptr inbounds nuw i8, ptr %55, i64 184 - %61 = load ptr, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, align 8, !tbaa !134 - store ptr %61, ptr %60, align 8, !tbaa !134 + %61 = load ptr, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, align 8, !tbaa !136 + store ptr %61, ptr %60, align 8, !tbaa !136 %62 = getelementptr inbounds nuw i8, ptr %55, i64 192 - %63 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, i64 8), align 8, !tbaa !138 - store ptr %63, ptr %62, align 8, !tbaa !138 + %63 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, i64 8), align 8, !tbaa !140 + store ptr %63, ptr %62, align 8, !tbaa !140 %.not.i.i.i.i.i.i = icmp eq ptr %63, null br i1 %.not.i.i.i.i.i.i, label %_ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i, label %64 @@ -2799,7 +2799,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i34 br label %_ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i _ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i: ; preds = %70, %67, %.noexc - store ptr %57, ptr %58, align 8, !tbaa !139 + store ptr %57, ptr %58, align 8, !tbaa !141 %.not.i.i.i.i = icmp eq ptr %57, null br i1 %.not.i.i.i.i, label %80, label %72 @@ -2821,7 +2821,7 @@ _ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i: ; preds = %70, %67, %.noexc 80: ; preds = %77, %72, %_ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i store ptr getelementptr inbounds nuw inrange(-16, 352) (i8, ptr @_ZTV9AstVarRef, i64 16), ptr %55, align 8, !tbaa !15 %81 = getelementptr inbounds nuw i8, ptr %55, i64 160 - store ptr %1, ptr %81, align 8, !tbaa !146 + store ptr %1, ptr %81, align 8, !tbaa !148 %82 = load ptr, ptr %8, align 8, !tbaa !103 %83 = invoke noundef ptr @_ZN7AstNode12unlinkFrBackEP10VNRelinker(ptr noundef nonnull align 8 dereferenceable(152) %82, ptr noundef null) to label %84 unwind label %.thread67 @@ -2900,7 +2900,7 @@ _ZN9AstAssignC2EP8FileLineP11AstNodeExprS3_P7AstNode.exit: ; preds = %.noexc45, store ptr getelementptr inbounds nuw inrange(-16, 320) (i8, ptr @_ZTV9AstAssign, i64 16), ptr %52, align 8, !tbaa !15 call void @_ZN7AstNode7addOp2pEPS_(ptr noundef nonnull align 8 dereferenceable(328) %51, ptr noundef nonnull %52) %104 = getelementptr inbounds nuw i8, ptr %7, i64 249 - store i8 0, ptr %104, align 1, !tbaa !147 + store i8 0, ptr %104, align 1, !tbaa !149 %105 = getelementptr inbounds nuw i8, ptr %7, i64 260 %106 = load i64, ptr %105, align 4 %107 = and i64 %106, -9 @@ -3010,7 +3010,7 @@ define linkonce_odr dso_local noundef ptr @_ZNK7AstNode8typeNameEv(ptr noundef n ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZeqRK6VNTypeNS_2enE(ptr noundef nonnull align 2 dereferenceable(2) %0, i16 noundef zeroext %1) #7 comdat { - %3 = load i16, ptr %0, align 2, !tbaa !149 + %3 = load i16, ptr %0, align 2, !tbaa !151 %4 = icmp eq i16 %3, %1 ret i1 %4 } @@ -3027,7 +3027,7 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef ptr @_ZNK6VNType5asciiEv(ptr noundef nonnull align 2 dereferenceable(2) %0) #7 comdat align 2 { - %2 = load i16, ptr %0, align 2, !tbaa !149 + %2 = load i16, ptr %0, align 2, !tbaa !151 %3 = zext i16 %2 to i64 %4 = getelementptr inbounds nuw ptr, ptr @_ZZNK6VNType5asciiEvE5names, i64 %3 %5 = load ptr, ptr %4, align 8, !tbaa !96 @@ -3138,7 +3138,7 @@ define linkonce_odr dso_local noundef ptr @_ZN12ClockVisitor19createSenseEquatio %.031 = phi ptr [ %26, %29 ], [ null, %2 ] %.01530 = phi ptr [ %28, %29 ], [ %1, %2 ] %3 = getelementptr inbounds nuw i8, ptr %.01530, i64 152 - %.sroa.0.0.copyload.i = load i8, ptr %3, align 8, !tbaa !150 + %.sroa.0.0.copyload.i = load i8, ptr %3, align 8, !tbaa !152 %4 = icmp eq i8 %.sroa.0.0.copyload.i, 5 br i1 %4, label %9, label %5, !prof !95 @@ -3201,7 +3201,7 @@ _ZN5AstOrC2EP8FileLineP11AstNodeExprS3_.exit: ; preds = %23, %18, %9 %30 = getelementptr inbounds nuw i8, ptr %28, i64 64 %.sroa.0.0.copyload.i.i.i = load i16, ptr %30, align 8, !tbaa !94 %.not6.i = icmp eq i16 %.sroa.0.0.copyload.i.i.i, 39 - br i1 %.not6.i, label %.lr.ph, label %31, !prof !95 + br i1 %.not6.i, label %.lr.ph, label %31, !prof !95, !llvm.loop !154 31: ; preds = %29 %32 = getelementptr inbounds nuw i8, ptr %28, i64 64 @@ -3285,7 +3285,7 @@ declare noundef ptr @_ZN7AstNode9cloneTreeEbb(ptr noundef nonnull align 8 derefe ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local void @_ZN6VNTypeC2ENS_2enE(ptr noundef nonnull align 2 dereferenceable(2) %0, i16 noundef zeroext %1) unnamed_addr #7 comdat align 2 { - store i16 %1, ptr %0, align 2, !tbaa !149 + store i16 %1, ptr %0, align 2, !tbaa !151 ret void } @@ -3518,11 +3518,11 @@ _ZN9VNVisitorD2Ev.exit: ; preds = %3, %5 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local void @_ZN22ConvertWriteRefsToRead5visitEP9AstVarRef(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1) unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %3 = getelementptr inbounds nuw i8, ptr %1, i64 176 - %.sroa.0.0.copyload.i = load i8, ptr %3, align 8, !tbaa !132 + %.sroa.0.0.copyload.i = load i8, ptr %3, align 8, !tbaa !134 switch i8 %.sroa.0.0.copyload.i, label %_ZN9VNDeleter11pushDeletepEP7AstNode.exit [ i8 2, label %4 i8 1, label %8 - ], !prof !152 + ], !prof !155 4: ; preds = %2 %5 = tail call noundef nonnull align 8 dereferenceable(112) ptr @_ZN7V3Error19v3errorPrepFileLineB5cxx11E11V3ErrorCodePKci(i8 4, ptr noundef nonnull @.str.1, i32 noundef 52) @@ -3536,9 +3536,9 @@ define linkonce_odr dso_local void @_ZN22ConvertWriteRefsToRead5visitEP9AstVarRe %10 = getelementptr inbounds nuw i8, ptr %1, i64 88 %11 = load ptr, ptr %10, align 8, !tbaa !110 %12 = getelementptr inbounds nuw i8, ptr %1, i64 160 - %13 = load ptr, ptr %12, align 8, !tbaa !146 + %13 = load ptr, ptr %12, align 8, !tbaa !148 %14 = getelementptr inbounds nuw i8, ptr %13, i64 168 - %15 = load ptr, ptr %14, align 8, !tbaa !123 + %15 = load ptr, ptr %14, align 8, !tbaa !125 invoke void @_ZN7AstNodeC2E6VNTypeP8FileLine(ptr noundef nonnull align 8 dereferenceable(200) %9, i16 320, ptr noundef %11) to label %.noexc unwind label %66 @@ -3547,11 +3547,11 @@ define linkonce_odr dso_local void @_ZN22ConvertWriteRefsToRead5visitEP9AstVarRe %16 = getelementptr inbounds nuw i8, ptr %9, i64 152 %17 = getelementptr inbounds nuw i8, ptr %9, i64 184 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(25) %16, i8 0, i64 25, i1 false) - %18 = load ptr, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, align 8, !tbaa !134 - store ptr %18, ptr %17, align 8, !tbaa !134 + %18 = load ptr, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, align 8, !tbaa !136 + store ptr %18, ptr %17, align 8, !tbaa !136 %19 = getelementptr inbounds nuw i8, ptr %9, i64 192 - %20 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, i64 8), align 8, !tbaa !138 - store ptr %20, ptr %19, align 8, !tbaa !138 + %20 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16VSelfPointerText8s_emptypB5cxx11E, i64 8), align 8, !tbaa !140 + store ptr %20, ptr %19, align 8, !tbaa !140 %.not.i.i.i.i.i.i = icmp eq ptr %20, null br i1 %.not.i.i.i.i.i.i, label %_ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i, label %21 @@ -3572,7 +3572,7 @@ define linkonce_odr dso_local void @_ZN22ConvertWriteRefsToRead5visitEP9AstVarRe br label %_ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i _ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i: ; preds = %27, %24, %.noexc - store ptr %15, ptr %16, align 8, !tbaa !139 + store ptr %15, ptr %16, align 8, !tbaa !141 %.not.i.i.i.i = icmp eq ptr %15, null br i1 %.not.i.i.i.i, label %37, label %29 @@ -3594,20 +3594,20 @@ _ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i: ; preds = %27, %24, %.noexc 37: ; preds = %34, %29, %_ZN16VSelfPointerTextC2ENS_5EmptyE.exit.i.i store ptr getelementptr inbounds nuw inrange(-16, 352) (i8, ptr @_ZTV9AstVarRef, i64 16), ptr %9, align 8, !tbaa !15 %38 = getelementptr inbounds nuw i8, ptr %9, i64 160 - store ptr %13, ptr %38, align 8, !tbaa !146 + store ptr %13, ptr %38, align 8, !tbaa !148 tail call void @_ZN7AstNode11replaceWithEPS_(ptr noundef nonnull align 8 dereferenceable(152) %1, ptr noundef nonnull %9) %39 = getelementptr inbounds nuw i8, ptr %0, i64 8 %40 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %41 = load ptr, ptr %40, align 8, !tbaa !121 + %41 = load ptr, ptr %40, align 8, !tbaa !123 %42 = getelementptr inbounds nuw i8, ptr %0, i64 24 %43 = load ptr, ptr %42, align 8, !tbaa !21 %.not.i.i = icmp eq ptr %41, %43 br i1 %.not.i.i, label %46, label %44 44: ; preds = %37 - store ptr %1, ptr %41, align 8, !tbaa !122 + store ptr %1, ptr %41, align 8, !tbaa !124 %45 = getelementptr inbounds nuw i8, ptr %41, i64 8 - store ptr %45, ptr %40, align 8, !tbaa !121 + store ptr %45, ptr %40, align 8, !tbaa !123 br label %_ZN9VNDeleter11pushDeletepEP7AstNode.exit 46: ; preds = %37 @@ -3634,7 +3634,7 @@ _ZNKSt6vectorIP7AstNodeSaIS1_EE12_M_check_lenEmPKc.exit.i.i.i: ; preds = %46 %58 = shl nuw nsw i64 %57, 3 %59 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %58) #27 %60 = getelementptr inbounds i8, ptr %59, i64 %50 - store ptr %1, ptr %60, align 8, !tbaa !122 + store ptr %1, ptr %60, align 8, !tbaa !124 %61 = icmp sgt i64 %50, 0 br i1 %61, label %62, label %_ZNSt6vectorIP7AstNodeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16.i.i.i @@ -3653,7 +3653,7 @@ _ZNSt6vectorIP7AstNodeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16.i.i.i: ; preds _ZNSt6vectorIP7AstNodeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i: ; preds = %64, %_ZNSt6vectorIP7AstNodeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16.i.i.i store ptr %59, ptr %39, align 8, !tbaa !17 - store ptr %63, ptr %40, align 8, !tbaa !121 + store ptr %63, ptr %40, align 8, !tbaa !123 %65 = getelementptr inbounds nuw ptr, ptr %59, i64 %57 store ptr %65, ptr %42, align 8, !tbaa !21 br label %_ZN9VNDeleter11pushDeletepEP7AstNode.exit @@ -3670,7 +3670,7 @@ _ZN9VNDeleter11pushDeletepEP7AstNode.exit: ; preds = %2, %_ZNSt6vectorIP7 ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i16 @_ZNK6VNTypecvNS_2enEEv(ptr noundef nonnull align 2 dereferenceable(2) %0) #7 comdat align 2 { - %2 = load i16, ptr %0, align 2, !tbaa !149 + %2 = load i16, ptr %0, align 2, !tbaa !151 ret i16 %2 } @@ -3679,7 +3679,7 @@ declare noundef ptr @_ZN7AstNode25iterateSubtreeReturnEditsER9VNVisitor(ptr noun ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef ptr @_ZNK11AstVarScope4varpEv(ptr noundef nonnull align 8 dereferenceable(176) %0) #7 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 168 - %3 = load ptr, ptr %2, align 8, !tbaa !123 + %3 = load ptr, ptr %2, align 8, !tbaa !125 ret ptr %3 } @@ -3701,7 +3701,7 @@ define linkonce_odr dso_local i8 @_ZNK13AstBasicDType7keywordEv(ptr noundef nonn ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZNK14VBasicDTypeKwd8isOpaqueEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7 comdat align 2 { switch.edge: - %1 = load i8, ptr %0, align 1, !tbaa !153 + %1 = load i8, ptr %0, align 1, !tbaa !156 %2 = icmp ult i8 %1, 24 %switch.cast = zext nneg i8 %1 to i24 %switch.downshift = lshr i24 -3568, %switch.cast @@ -3812,7 +3812,7 @@ declare noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_cr ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZeqRK10VDirectionNS_2enE(ptr noundef nonnull align 1 dereferenceable(1) %0, i8 noundef zeroext %1) #7 comdat { - %3 = load i8, ptr %0, align 1, !tbaa !155 + %3 = load i8, ptr %0, align 1, !tbaa !158 %4 = icmp eq i8 %3, %1 ret i1 %4 } @@ -4322,39 +4322,42 @@ attributes #27 = { builtin allocsize(0) } !118 = !{!"_ZTS5AstIf", !115, i64 0, !53, i64 154, !53, i64 155, !53, i64 156} !119 = !{!118, !53, i64 155} !120 = !{!118, !53, i64 156} -!121 = !{!18, !19, i64 8} -!122 = !{!67, !67, i64 0} -!123 = !{!124, !79, i64 168} -!124 = !{!"_ZTS11AstVarScope", !66, i64 0, !53, i64 152, !125, i64 160, !79, i64 168} -!125 = !{!"p1 _ZTS8AstScope", !9, i64 0} -!126 = !{!127} -!127 = distinct !{!127, !128, !"_ZNK6AstVar4nameB5cxx11Ev: argument 0"} -!128 = distinct !{!128, !"_ZNK6AstVar4nameB5cxx11Ev"} -!129 = !{!130} -!130 = distinct !{!130, !131, !"_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm: argument 0"} -!131 = distinct !{!131, !"_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm"} -!132 = !{!133, !133, i64 0} -!133 = !{!"_ZTSN7VAccess2enE", !10, i64 0} -!134 = !{!135, !41, i64 0} -!135 = !{!"_ZTSSt12__shared_ptrIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EE", !41, i64 0, !136, i64 8} -!136 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !137, i64 0} -!137 = !{!"p1 _ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0} -!138 = !{!136, !137, i64 0} -!139 = !{!140, !79, i64 152} -!140 = !{!"_ZTS13AstNodeVarRef", !141, i64 0, !79, i64 152, !78, i64 160, !142, i64 168, !143, i64 176, !144, i64 184} -!141 = !{!"_ZTS11AstNodeExpr", !66, i64 0} -!142 = !{!"p1 _ZTS13AstNodeModule", !9, i64 0} -!143 = !{!"_ZTS7VAccess", !133, i64 0} -!144 = !{!"_ZTS16VSelfPointerText", !145, i64 0} -!145 = !{!"_ZTSSt10shared_ptrIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE", !135, i64 0} -!146 = !{!140, !78, i64 160} -!147 = !{!148, !148, i64 0} -!148 = !{!"_ZTSN10VDirection2enE", !10, i64 0} -!149 = !{!68, !69, i64 0} -!150 = !{!151, !151, i64 0} -!151 = !{!"_ZTSN9VEdgeType2enE", !10, i64 0} -!152 = !{!"branch_weights", i32 2000, i32 2, i32 2000} -!153 = !{!154, !109, i64 0} -!154 = !{!"_ZTS14VBasicDTypeKwd", !109, i64 0} -!155 = !{!156, !148, i64 0} -!156 = !{!"_ZTS10VDirection", !148, i64 0} +!121 = distinct !{!121, !122} +!122 = !{!"llvm.loop.mustprogress"} +!123 = !{!18, !19, i64 8} +!124 = !{!67, !67, i64 0} +!125 = !{!126, !79, i64 168} +!126 = !{!"_ZTS11AstVarScope", !66, i64 0, !53, i64 152, !127, i64 160, !79, i64 168} +!127 = !{!"p1 _ZTS8AstScope", !9, i64 0} +!128 = !{!129} +!129 = distinct !{!129, !130, !"_ZNK6AstVar4nameB5cxx11Ev: argument 0"} +!130 = distinct !{!130, !"_ZNK6AstVar4nameB5cxx11Ev"} +!131 = !{!132} +!132 = distinct !{!132, !133, !"_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm: argument 0"} +!133 = distinct !{!133, !"_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm"} +!134 = !{!135, !135, i64 0} +!135 = !{!"_ZTSN7VAccess2enE", !10, i64 0} +!136 = !{!137, !41, i64 0} +!137 = !{!"_ZTSSt12__shared_ptrIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EE", !41, i64 0, !138, i64 8} +!138 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !139, i64 0} +!139 = !{!"p1 _ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0} +!140 = !{!138, !139, i64 0} +!141 = !{!142, !79, i64 152} +!142 = !{!"_ZTS13AstNodeVarRef", !143, i64 0, !79, i64 152, !78, i64 160, !144, i64 168, !145, i64 176, !146, i64 184} +!143 = !{!"_ZTS11AstNodeExpr", !66, i64 0} +!144 = !{!"p1 _ZTS13AstNodeModule", !9, i64 0} +!145 = !{!"_ZTS7VAccess", !135, i64 0} +!146 = !{!"_ZTS16VSelfPointerText", !147, i64 0} +!147 = !{!"_ZTSSt10shared_ptrIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE", !137, i64 0} +!148 = !{!142, !78, i64 160} +!149 = !{!150, !150, i64 0} +!150 = !{!"_ZTSN10VDirection2enE", !10, i64 0} +!151 = !{!68, !69, i64 0} +!152 = !{!153, !153, i64 0} +!153 = !{!"_ZTSN9VEdgeType2enE", !10, i64 0} +!154 = distinct !{!154, !122} +!155 = !{!"branch_weights", i32 2000, i32 2, i32 2000} +!156 = !{!157, !109, i64 0} +!157 = !{!"_ZTS14VBasicDTypeKwd", !109, i64 0} +!158 = !{!159, !150, i64 0} +!159 = !{!"_ZTS10VDirection", !150, i64 0} diff --git a/bench/verilator/optimized/V3Common.ll b/bench/verilator/optimized/V3Common.ll index 3423ac7ee1b..345507fda81 100644 --- a/bench/verilator/optimized/V3Common.ll +++ b/bench/verilator/optimized/V3Common.ll @@ -4576,7 +4576,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit196.i: ; preds = % %1183 = getelementptr inbounds nuw i8, ptr %1181, i64 64 %.sroa.0.0.copyload.i.i.i.i175 = load i16, ptr %1183, align 8, !tbaa !14 %.not6.i.i = icmp eq i16 %.sroa.0.0.copyload.i.i.i.i175, 65 - br i1 %.not6.i.i, label %._crit_edge.i.i136.i, label %1184, !prof !168 + br i1 %.not6.i.i, label %._crit_edge.i.i136.i, label %1184, !prof !168, !llvm.loop !169 1184: ; preds = %1182 %1185 = getelementptr inbounds nuw i8, ptr %1181, i64 64 @@ -4595,7 +4595,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit196.i: ; preds = % %.sroa.0.0.copyload.i.i5.i.i = load i16, ptr %1185, align 8, !tbaa !14 %1189 = zext i16 %.sroa.0.0.copyload.i.i5.i.i to i64 %1190 = getelementptr inbounds nuw ptr, ptr @_ZZNK6VNType5asciiEvE5names, i64 %1189 - %1191 = load ptr, ptr %1190, align 8, !tbaa !169 + %1191 = load ptr, ptr %1190, align 8, !tbaa !170 %1192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1187, ptr noundef %1191) to label %.noexc195 unwind label %.loopexit.split-lp @@ -4963,7 +4963,7 @@ _ZL14makeVlToStringP21AstNodeUOrStructDType.exit: ; preds = %_ZNSt7__cxx1112basi %1289 = getelementptr inbounds nuw i8, ptr %.0171974, i64 8 %.017 = load ptr, ptr %1289, align 8, !tbaa !103 %.not27 = icmp eq ptr %.017, null - br i1 %.not27, label %._crit_edge.i.i, label %850, !llvm.loop !170 + br i1 %.not27, label %._crit_edge.i.i, label %850, !llvm.loop !171 .noexc203: ; preds = %._crit_edge.i.i %1290 = invoke noundef i32 @_ZL13dumpTreeLevelv() @@ -5111,7 +5111,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS call void @llvm.lifetime.end.p0(ptr nonnull %4) call void @llvm.lifetime.end.p0(ptr nonnull %3) %26 = call i32 @llvm.umax.i32(i32 %13, i32 %16) - %27 = load i8, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1890), align 2, !tbaa !171, !range !142, !noundef !143 + %27 = load i8, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1890), align 2, !tbaa !172, !range !142, !noundef !143 %28 = trunc nuw i8 %27 to i1 br i1 %28, label %43, label %44 @@ -5419,7 +5419,7 @@ declare noundef i32 @_ZNK9V3Options13debugSrcLevelERKNSt7__cxx1112basic_stringIc ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZNK9V3Options9availableEv(ptr noundef nonnull align 8 dereferenceable(1720) %0) #4 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 1714 - %3 = load i8, ptr %2, align 2, !tbaa !171, !range !142, !noundef !143 + %3 = load i8, ptr %2, align 2, !tbaa !172, !range !142, !noundef !143 %4 = trunc nuw i8 %3 to i1 ret i1 %4 } @@ -5431,7 +5431,7 @@ define linkonce_odr dso_local void @_ZN15VNUserInUseBase8allocateEiRjRb(i32 noun %6 = alloca %"class.std::__cxx11::basic_string", align 8 %7 = alloca %"class.std::__cxx11::basic_string", align 8 store i32 %0, ptr %4, align 4, !tbaa !32 - %8 = load i8, ptr %2, align 1, !tbaa !172, !range !142, !noundef !143 + %8 = load i8, ptr %2, align 1, !tbaa !173, !range !142, !noundef !143 %9 = trunc nuw i8 %8 to i1 br i1 %9, label %10, label %83, !prof !48 @@ -5444,10 +5444,10 @@ define linkonce_odr dso_local void @_ZN15VNUserInUseBase8allocateEiRjRb(i32 noun %16 = load i64, ptr %15, align 8 %17 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %16 %18 = getelementptr inbounds nuw i8, ptr %17, i64 24 - %19 = load i32, ptr %18, align 8, !tbaa !173 + %19 = load i32, ptr %18, align 8, !tbaa !174 %20 = and i32 %19, -75 %21 = or disjoint i32 %20, 2 - store i32 %21, ptr %18, align 8, !tbaa !180 + store i32 %21, ptr %18, align 8, !tbaa !181 %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i32 noundef 1776) %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.11, i64 noundef 1) call void @llvm.lifetime.start.p0(ptr nonnull %5) @@ -5614,7 +5614,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit23: ; preds = %_ZN 83: ; preds = %3, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit14 %84 = phi i32 [ %0, %3 ], [ %.pre, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit14 ] - store i8 1, ptr %2, align 1, !tbaa !172 + store i8 1, ptr %2, align 1, !tbaa !173 call void @_ZN15VNUserInUseBase8clearcntEiRjRKb(i32 noundef %84, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) ret void } @@ -5719,7 +5719,7 @@ define linkonce_odr dso_local void @_ZN15VNUserInUseBase8clearcntEiRjRKb(i32 nou %6 = alloca %"class.std::__cxx11::basic_string", align 8 %7 = alloca %"class.std::__cxx11::basic_string", align 8 store i32 %0, ptr %4, align 4, !tbaa !32 - %8 = load i8, ptr %2, align 1, !tbaa !172, !range !142, !noundef !143 + %8 = load i8, ptr %2, align 1, !tbaa !173, !range !142, !noundef !143 %9 = trunc nuw i8 %8 to i1 br i1 %9, label %83, label %10, !prof !168 @@ -5732,10 +5732,10 @@ define linkonce_odr dso_local void @_ZN15VNUserInUseBase8clearcntEiRjRKb(i32 nou %16 = load i64, ptr %15, align 8 %17 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %16 %18 = getelementptr inbounds nuw i8, ptr %17, i64 24 - %19 = load i32, ptr %18, align 8, !tbaa !173 + %19 = load i32, ptr %18, align 8, !tbaa !174 %20 = and i32 %19, -75 %21 = or disjoint i32 %20, 2 - store i32 %21, ptr %18, align 8, !tbaa !180 + store i32 %21, ptr %18, align 8, !tbaa !181 %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i32 noundef 1786) %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.11, i64 noundef 1) call void @llvm.lifetime.start.p0(ptr nonnull %5) @@ -5915,10 +5915,10 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit22: ; preds = %_ZN %92 = load i64, ptr %91, align 8 %93 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %92 %94 = getelementptr inbounds nuw i8, ptr %93, i64 24 - %95 = load i32, ptr %94, align 8, !tbaa !173 + %95 = load i32, ptr %94, align 8, !tbaa !174 %96 = and i32 %95, -75 %97 = or disjoint i32 %96, 2 - store i32 %97, ptr %94, align 8, !tbaa !180 + store i32 %97, ptr %94, align 8, !tbaa !181 %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i32 noundef 1790) %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @.str.11, i64 noundef 1) %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @.str.19, i64 noundef 19) @@ -6013,8 +6013,8 @@ define linkonce_odr dso_local void @_ZN8AstCFuncC2EP8FileLineRKNSt7__cxx1112basi store i8 0, ptr %19, align 8, !tbaa !13 %21 = getelementptr inbounds nuw i8, ptr %0, i64 312 %22 = getelementptr inbounds nuw i8, ptr %0, i64 320 - store i8 2, ptr %21, align 8, !tbaa !181 - store ptr %3, ptr %22, align 8, !tbaa !182 + store i8 2, ptr %21, align 8, !tbaa !182 + store ptr %3, ptr %22, align 8, !tbaa !183 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %2) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_.exit unwind label %29 @@ -6029,9 +6029,9 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_.exit6: ; preds = % store i16 512, ptr %23, align 1 %26 = and i8 %25, -64 store i8 %26, ptr %24, align 1 - %27 = load i32, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1100), align 4, !tbaa !185 + %27 = load i32, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1100), align 4, !tbaa !186 %28 = getelementptr inbounds nuw i8, ptr %0, i64 316 - store i32 %27, ptr %28, align 4, !tbaa !186 + store i32 %27, ptr %28, align 4, !tbaa !187 ret void 29: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_.exit, %5 @@ -6137,9 +6137,9 @@ define linkonce_odr dso_local void @_ZN8AstCExprC2EP8FileLineRKNSt7__cxx1112basi tail call void @_ZN7AstNodeC2E6VNTypeP8FileLine(ptr noundef nonnull align 8 dereferenceable(152) %0, i16 83, ptr noundef %1) store ptr getelementptr inbounds nuw inrange(-16, 352) (i8, ptr @_ZTV8AstCExpr, i64 16), ptr %0, align 8, !tbaa !46 %8 = getelementptr inbounds nuw i8, ptr %0, i64 152 - store i8 %7, ptr %8, align 8, !tbaa !187 + store i8 %7, ptr %8, align 8, !tbaa !188 %9 = getelementptr inbounds nuw i8, ptr %0, i64 153 - store i8 1, ptr %9, align 1, !tbaa !190 + store i8 1, ptr %9, align 1, !tbaa !191 %10 = tail call noalias noundef nonnull dereferenceable(192) ptr @_Znwm(i64 noundef 192) #22 invoke void @_ZN7AstNodeC2E6VNTypeP8FileLine(ptr noundef nonnull align 8 dereferenceable(192) %10, i16 424, ptr noundef %1) to label %.noexc unwind label %34 @@ -6224,7 +6224,7 @@ _ZN7AstNode18dtypeSetLogicSizedEi8VSigning.exit: ; preds = %31, %.noexc13, %_ZN ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local void @_ZN6VNTypeC2ENS_2enE(ptr noundef nonnull align 2 dereferenceable(2) %0, i16 noundef zeroext %1) unnamed_addr #4 comdat align 2 { - store i16 %1, ptr %0, align 2, !tbaa !191 + store i16 %1, ptr %0, align 2, !tbaa !192 ret void } @@ -6318,7 +6318,7 @@ _ZN8AstCStmt9addExprspEP7AstNode.exit: ; preds = %17, %15, %._crit_ed ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef ptr @_ZNK8AstClass8memberspEv(ptr noundef nonnull align 8 dereferenceable(272) %0) #3 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %3 = load ptr, ptr %2, align 8, !tbaa !192 + %3 = load ptr, ptr %2, align 8, !tbaa !193 ret ptr %3 } @@ -6373,20 +6373,20 @@ define linkonce_odr dso_local noundef ptr @_ZNK8AstClass8extendspEv(ptr noundef ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef ptr @_ZNK8AstClass6stmtspEv(ptr noundef nonnull align 8 dereferenceable(272) %0) #3 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %3 = load ptr, ptr %2, align 8, !tbaa !192 + %3 = load ptr, ptr %2, align 8, !tbaa !193 ret ptr %3 } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef ptr @_ZNK7AstNode4op2pEv(ptr noundef nonnull align 8 dereferenceable(152) %0) #4 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %3 = load ptr, ptr %2, align 8, !tbaa !192 + %3 = load ptr, ptr %2, align 8, !tbaa !193 ret ptr %3 } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZeqRK6VNTypeNS_2enE(ptr noundef nonnull align 2 dereferenceable(2) %0, i16 noundef zeroext %1) #4 comdat { - %3 = load i16, ptr %0, align 2, !tbaa !191 + %3 = load i16, ptr %0, align 2, !tbaa !192 %4 = icmp eq i16 %3, %1 ret i1 %4 } @@ -6430,7 +6430,7 @@ define linkonce_odr dso_local noundef ptr @_ZN7AstNode15unsafePrivateAsI12AstNod ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZeqRK14VBasicDTypeKwdNS_2enE(ptr noundef nonnull align 1 dereferenceable(1) %0, i8 noundef zeroext %1) #4 comdat { - %3 = load i8, ptr %0, align 1, !tbaa !193 + %3 = load i8, ptr %0, align 1, !tbaa !194 %4 = icmp eq i8 %3, %1 ret i1 %4 } @@ -6492,7 +6492,7 @@ define linkonce_odr dso_local noundef ptr @_ZN7AstNode9privateAsI14AstMemberDTyp %.sroa.0.0.copyload.i.i5 = load i16, ptr %3, align 8, !tbaa !14 %8 = zext i16 %.sroa.0.0.copyload.i.i5 to i64 %9 = getelementptr inbounds nuw ptr, ptr @_ZZNK6VNType5asciiEvE5names, i64 %8 - %10 = load ptr, ptr %9, align 8, !tbaa !169 + %10 = load ptr, ptr %9, align 8, !tbaa !170 %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %10) %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str.46) tail call void @_ZNK7AstNode15v3errorEndFatalERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(112) %12) #19 @@ -6520,16 +6520,16 @@ define linkonce_odr dso_local noundef ptr @_ZNK7AstNode8typeNameEv(ptr noundef n %.sroa.0.0.copyload.i = load i16, ptr %2, align 8, !tbaa !14 %3 = zext i16 %.sroa.0.0.copyload.i to i64 %4 = getelementptr inbounds nuw ptr, ptr @_ZZNK6VNType5asciiEvE5names, i64 %3 - %5 = load ptr, ptr %4, align 8, !tbaa !169 + %5 = load ptr, ptr %4, align 8, !tbaa !170 ret ptr %5 } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef ptr @_ZNK6VNType5asciiEv(ptr noundef nonnull align 2 dereferenceable(2) %0) #4 comdat align 2 { - %2 = load i16, ptr %0, align 2, !tbaa !191 + %2 = load i16, ptr %0, align 2, !tbaa !192 %3 = zext i16 %2 to i64 %4 = getelementptr inbounds nuw ptr, ptr @_ZZNK6VNType5asciiEvE5names, i64 %3 - %5 = load ptr, ptr %4, align 8, !tbaa !169 + %5 = load ptr, ptr %4, align 8, !tbaa !170 ret ptr %5 } @@ -6607,7 +6607,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit21: ; preds = %_ZN call void @llvm.lifetime.end.p0(ptr nonnull %4) call void @llvm.lifetime.end.p0(ptr nonnull %3) %30 = call i32 @llvm.umax.i32(i32 %9, i32 %20) - %31 = load i8, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1890), align 2, !tbaa !171, !range !142, !noundef !143 + %31 = load i8, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1890), align 2, !tbaa !172, !range !142, !noundef !143 %32 = trunc nuw i8 %31 to i1 br i1 %32, label %.thread, label %58 @@ -6762,7 +6762,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit21: ; preds = %_ZN call void @llvm.lifetime.end.p0(ptr nonnull %4) call void @llvm.lifetime.end.p0(ptr nonnull %3) %30 = call i32 @llvm.umax.i32(i32 %9, i32 %20) - %31 = load i8, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1890), align 2, !tbaa !171, !range !142, !noundef !143 + %31 = load i8, ptr getelementptr inbounds nuw (i8, ptr @v3Global, i64 1890), align 2, !tbaa !172, !range !142, !noundef !143 %32 = trunc nuw i8 %31 to i1 br i1 %32, label %.thread, label %58 @@ -6854,7 +6854,7 @@ define linkonce_odr dso_local void @_ZN15VNUserInUseBase4freeEiRjRb(i32 noundef %6 = alloca %"class.std::__cxx11::basic_string", align 8 %7 = alloca %"class.std::__cxx11::basic_string", align 8 store i32 %0, ptr %4, align 4, !tbaa !32 - %8 = load i8, ptr %2, align 1, !tbaa !172, !range !142, !noundef !143 + %8 = load i8, ptr %2, align 1, !tbaa !173, !range !142, !noundef !143 %9 = trunc nuw i8 %8 to i1 br i1 %9, label %83, label %10, !prof !168 @@ -6867,10 +6867,10 @@ define linkonce_odr dso_local void @_ZN15VNUserInUseBase4freeEiRjRb(i32 noundef %16 = load i64, ptr %15, align 8 %17 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %16 %18 = getelementptr inbounds nuw i8, ptr %17, i64 24 - %19 = load i32, ptr %18, align 8, !tbaa !173 + %19 = load i32, ptr %18, align 8, !tbaa !174 %20 = and i32 %19, -75 %21 = or disjoint i32 %20, 2 - store i32 %21, ptr %18, align 8, !tbaa !180 + store i32 %21, ptr %18, align 8, !tbaa !181 %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i32 noundef 1781) %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.11, i64 noundef 1) call void @llvm.lifetime.start.p0(ptr nonnull %5) @@ -7038,7 +7038,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit23: ; preds = %_ZN 83: ; preds = %3, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit14 %84 = phi i32 [ %0, %3 ], [ %.pre, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit14 ] call void @_ZN15VNUserInUseBase8clearcntEiRjRKb(i32 noundef %84, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) - store i8 0, ptr %2, align 1, !tbaa !172 + store i8 0, ptr %2, align 1, !tbaa !173 ret void } @@ -7058,7 +7058,7 @@ declare void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) u ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i16 @_ZNK6VNTypecvNS_2enEEv(ptr noundef nonnull align 2 dereferenceable(2) %0) #4 comdat align 2 { - %2 = load i16, ptr %0, align 2, !tbaa !191 + %2 = load i16, ptr %0, align 2, !tbaa !192 ret i16 %2 } @@ -7281,29 +7281,30 @@ attributes #24 = { nounwind willreturn memory(read) } !166 = !{!"_ZTS11AstNodeText", !17, i64 0, !11, i64 152} !167 = !{!17, !18, i64 8} !168 = !{!"branch_weights", !"expected", i32 2000, i32 1} -!169 = !{!6, !6, i64 0} -!170 = distinct !{!170, !130} -!171 = !{!68, !23, i64 1714} -!172 = !{!23, !23, i64 0} -!173 = !{!174, !175, i64 24} -!174 = !{!"_ZTSSt8ios_base", !12, i64 8, !12, i64 16, !175, i64 24, !176, i64 28, !176, i64 32, !177, i64 40, !178, i64 48, !8, i64 64, !24, i64 192, !179, i64 200, !43, i64 208} -!175 = !{!"_ZTSSt13_Ios_Fmtflags", !8, i64 0} -!176 = !{!"_ZTSSt12_Ios_Iostate", !8, i64 0} -!177 = !{!"p1 _ZTSNSt8ios_base14_Callback_listE", !7, i64 0} -!178 = !{!"_ZTSNSt8ios_base6_WordsE", !7, i64 0, !12, i64 8} -!179 = !{!"p1 _ZTSNSt8ios_base6_WordsE", !7, i64 0} -!180 = !{!175, !175, i64 0} -!181 = !{!122, !122, i64 0} -!182 = !{!183, !184, i64 320} -!183 = !{!"_ZTS8AstCFunc", !17, i64 0, !11, i64 152, !11, i64 184, !11, i64 216, !11, i64 248, !11, i64 280, !121, i64 312, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 315, !23, i64 315, !23, i64 315, !23, i64 315, !23, i64 315, !23, i64 315, !24, i64 316, !184, i64 320} -!184 = !{!"p1 _ZTS8AstScope", !7, i64 0} -!185 = !{!68, !24, i64 924} -!186 = !{!183, !24, i64 316} -!187 = !{!188, !23, i64 152} -!188 = !{!"_ZTS8AstCExpr", !189, i64 0, !23, i64 152, !23, i64 153} -!189 = !{!"_ZTS11AstNodeExpr", !17, i64 0} -!190 = !{!188, !23, i64 153} -!191 = !{!21, !15, i64 0} -!192 = !{!17, !18, i64 32} -!193 = !{!194, !127, i64 0} -!194 = !{!"_ZTS14VBasicDTypeKwd", !127, i64 0} +!169 = distinct !{!169, !130} +!170 = !{!6, !6, i64 0} +!171 = distinct !{!171, !130} +!172 = !{!68, !23, i64 1714} +!173 = !{!23, !23, i64 0} +!174 = !{!175, !176, i64 24} +!175 = !{!"_ZTSSt8ios_base", !12, i64 8, !12, i64 16, !176, i64 24, !177, i64 28, !177, i64 32, !178, i64 40, !179, i64 48, !8, i64 64, !24, i64 192, !180, i64 200, !43, i64 208} +!176 = !{!"_ZTSSt13_Ios_Fmtflags", !8, i64 0} +!177 = !{!"_ZTSSt12_Ios_Iostate", !8, i64 0} +!178 = !{!"p1 _ZTSNSt8ios_base14_Callback_listE", !7, i64 0} +!179 = !{!"_ZTSNSt8ios_base6_WordsE", !7, i64 0, !12, i64 8} +!180 = !{!"p1 _ZTSNSt8ios_base6_WordsE", !7, i64 0} +!181 = !{!176, !176, i64 0} +!182 = !{!122, !122, i64 0} +!183 = !{!184, !185, i64 320} +!184 = !{!"_ZTS8AstCFunc", !17, i64 0, !11, i64 152, !11, i64 184, !11, i64 216, !11, i64 248, !11, i64 280, !121, i64 312, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 313, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 314, !23, i64 315, !23, i64 315, !23, i64 315, !23, i64 315, !23, i64 315, !23, i64 315, !24, i64 316, !185, i64 320} +!185 = !{!"p1 _ZTS8AstScope", !7, i64 0} +!186 = !{!68, !24, i64 924} +!187 = !{!184, !24, i64 316} +!188 = !{!189, !23, i64 152} +!189 = !{!"_ZTS8AstCExpr", !190, i64 0, !23, i64 152, !23, i64 153} +!190 = !{!"_ZTS11AstNodeExpr", !17, i64 0} +!191 = !{!189, !23, i64 153} +!192 = !{!21, !15, i64 0} +!193 = !{!17, !18, i64 32} +!194 = !{!195, !127, i64 0} +!195 = !{!"_ZTS14VBasicDTypeKwd", !127, i64 0} diff --git a/bench/wireshark/optimized/addr_resolv.ll b/bench/wireshark/optimized/addr_resolv.ll index f4bda9bd2f3..a1e43db0852 100644 --- a/bench/wireshark/optimized/addr_resolv.ll +++ b/bench/wireshark/optimized/addr_resolv.ll @@ -3838,8 +3838,7 @@ define hidden noalias ptr @get_vlan_name(ptr noundef %0, i16 noundef zeroext %1) 20: ; preds = %14 tail call void @rewind(ptr noundef nonnull %19) - %.pre.i.i = load ptr, ptr @vlan_p, align 8 - br label %set_vlanent.exit.i.i + br label %set_vlanent.exit.split.i.i 21: ; preds = %14 %22 = load ptr, ptr @g_pvlan_path, align 8 @@ -3848,9 +3847,7 @@ define hidden noalias ptr @get_vlan_name(ptr noundef %0, i16 noundef zeroext %1) br label %set_vlanent.exit.i.i set_vlanent.exit.i.i: ; preds = %21, %20 - %24 = phi ptr [ %.pre.i.i, %20 ], [ %23, %21 ] - %25 = icmp eq ptr %24, null - br i1 %25, label %.loopexit.i.thread.i, label %set_vlanent.exit.split.i.i + br label %set_vlanent.exit.i.i set_vlanent.exit.split.i.i: ; preds = %set_vlanent.exit.i.i, %50 call void @llvm.lifetime.start.p0(ptr nonnull %4) @@ -3881,39 +3878,39 @@ fgetline.exit.i.i.i: ; preds = %.preheader.i.i.i, % call void @llvm.lifetime.start.p0(ptr nonnull %3) %35 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %4, i32 noundef 35) #27 %.not.i1.i.i.i = icmp eq ptr %35, null - br i1 %.not.i1.i.i.i, label %37, label %36 + br i1 %.not.i1.i.i.i, label %35, label %36 36: ; preds = %34 store i8 0, ptr %35, align 1 - br label %37 + br label %35 + +35: ; preds = %34, %32 + %36 = call ptr @strtok(ptr noundef nonnull %4, ptr noundef nonnull @.str.74) #28 + %37 = icmp eq ptr %36, null + br i1 %37, label %parse_vlan_line.exit.i.i.i, label %38 -37: ; preds = %36, %34 - %38 = call ptr @strtok(ptr noundef nonnull %4, ptr noundef nonnull @.str.74) #28 - %39 = icmp eq ptr %38, null - br i1 %39, label %parse_vlan_line.exit.i.i.i, label %40 +37: ; preds = %35 + %38 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %36, ptr noundef nonnull @.str.80, ptr noundef nonnull %3) #28 + %39 = icmp eq i32 %38, 1 + br i1 %39, label %41, label %parse_vlan_line.exit.i.i.i 40: ; preds = %37 - %41 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %38, ptr noundef nonnull @.str.80, ptr noundef nonnull %3) #28 - %42 = icmp eq i32 %41, 1 - br i1 %42, label %43, label %parse_vlan_line.exit.i.i.i - -43: ; preds = %40 - %44 = load i16, ptr %3, align 2 - %45 = zext i16 %44 to i32 - store i32 %45, ptr @get_vlanent.vlan, align 4 - %46 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.81) #28 - %47 = icmp eq ptr %46, null - br i1 %47, label %parse_vlan_line.exit.i.i.i, label %50 - -parse_vlan_line.exit.i.i.i: ; preds = %43, %40, %37 + %42 = load i16, ptr %3, align 2 + %43 = zext i16 %42 to i32 + store i32 %43, ptr @get_vlanent.vlan, align 4 + %44 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.81) #28 + %45 = icmp eq ptr %44, null + br i1 %45, label %parse_vlan_line.exit.i.i.i, label %48 + +parse_vlan_line.exit.i.i.i:; preds = %41, %38, %35 call void @llvm.lifetime.end.p0(ptr nonnull %3) %48 = load ptr, ptr @vlan_p, align 8 %49 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 1024, ptr noundef %48) %.not.i.i.i.i = icmp eq ptr %49, null br i1 %.not.i.i.i.i, label %.loopexit.i.i, label %fgetline.exit.i.i.i, !llvm.loop !50 -50: ; preds = %43 - %51 = call i64 @g_strlcpy(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @get_vlanent.vlan, i64 4), ptr noundef nonnull %46, i64 noundef 128) +50: ; preds = %41 + %51 = call i64 @g_strlcpy(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @get_vlanent.vlan, i64 4), ptr noundef nonnull %44, i64 noundef 128) call void @llvm.lifetime.end.p0(ptr nonnull %3) call void @llvm.lifetime.end.p0(ptr nonnull %4) %52 = load i32, ptr @get_vlanent.vlan, align 4 @@ -3931,7 +3928,7 @@ parse_vlan_line.exit.i.i.i: ; preds = %43, %40, %37 store ptr null, ptr @vlan_p, align 8 br label %.loopexit.i.thread.i -.loopexit.i.thread.i: ; preds = %53, %.loopexit.i.i, %.loopexit.i.thread26.i, %set_vlanent.exit.i.i +.loopexit.i.thread.i: ; preds = %53, %.loopexit.i.i, %.loopexit.i.thread26.i %55 = getelementptr inbounds nuw i8, ptr %16, i64 4 %56 = call i32 (ptr, i64, i32, i64, ptr, ...) @__snprintf_chk(ptr noundef nonnull %55, i64 noundef 128, i32 noundef 2, i64 noundef 128, ptr noundef nonnull @.str.79, i32 noundef range(i32 0, 65536) %8) br label %vlan_name_lookup.exit @@ -3942,7 +3939,7 @@ get_vlannamebyid.exit.i: ; preds = %50 br label %vlan_name_lookup.exit vlan_name_lookup.exit: ; preds = %7, %.loopexit.i.thread.i, %get_vlannamebyid.exit.i - %.pn.i = phi ptr [ %12, %7 ], [ %16, %get_vlannamebyid.exit.i ], [ %16, %.loopexit.i.thread.i ] + %.pn.i = phi ptr [ %12, %7 ], [ %16, %get_vlannamebyid.exit.i ], [ %16, %53 ] %.0.i = getelementptr inbounds nuw i8, ptr %.pn.i, i64 4 %59 = call noalias ptr @wmem_strdup(ptr noundef %0, ptr noundef nonnull %.0.i) br label %60 @@ -4676,7 +4673,7 @@ define hidden noundef zeroext i1 @str_to_eth(ptr noundef %0, ptr noundef %1) loc %29 = getelementptr i8, ptr %14, i64 1 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 8 - br i1 %exitcond.not.i, label %parse_ether_address.exit.thread, label %6, !llvm.loop !53 + br i1 %exitcond.not.i, label %parse_ether_address.exit.thread, label %6, !llvm.loop !52 parse_ether_address.exit.thread: ; preds = %27, %26, %12, %6, %17, %28, %21, %23 %.054.i.ph = phi i1 [ false, %21 ], [ true, %23 ], [ true, %28 ], [ false, %27 ], [ false, %26 ], [ false, %12 ], [ false, %6 ], [ false, %17 ] @@ -4853,7 +4850,7 @@ define internal fastcc noundef zeroext i1 @parse_ether_address(ptr noundef %0, p %75 = getelementptr i8, ptr %15, i64 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 8 - br i1 %exitcond.not, label %.loopexit, label %7, !llvm.loop !53 + br i1 %exitcond.not, label %.loopexit, label %7, !llvm.loop !52 .loopexit: ; preds = %74, %73, %72, %13, %7, %.lr.ph89.preheader, %._crit_edge, %62, %68, %69, %66, %67, %64, %42, %36, %30, %23, %22, %65 %.054 = phi i1 [ true, %65 ], [ false, %22 ], [ false, %23 ], [ false, %30 ], [ false, %36 ], [ false, %42 ], [ false, %64 ], [ true, %67 ], [ true, %66 ], [ true, %69 ], [ true, %68 ], [ false, %62 ], [ true, %._crit_edge ], [ true, %.lr.ph89.preheader ], [ true, %74 ], [ false, %73 ], [ false, %72 ], [ false, %13 ], [ false, %7 ] @@ -4979,7 +4976,7 @@ define internal void @c_ares_ghba_cb(ptr noundef %0, i32 noundef %1, i32 %2, ptr %22 = getelementptr i8, ptr %.014, i64 8 %23 = load ptr, ptr %22, align 8 %.not12 = icmp eq ptr %23, null - br i1 %.not12, label %.loopexit, label %14, !llvm.loop !54 + br i1 %.not12, label %.loopexit, label %14, !llvm.loop !53 .loopexit: ; preds = %21, %9, %5 %24 = load ptr, ptr @addr_resolv_scope, align 8 @@ -5038,7 +5035,7 @@ define internal void @c_ares_ghba_sync_cb(ptr noundef %0, i32 noundef %1, i32 %2 %19 = getelementptr i8, ptr %.012, i64 8 %20 = load ptr, ptr %19, align 8 %.not = icmp eq ptr %20, null - br i1 %.not, label %.loopexit, label %11, !llvm.loop !55 + br i1 %.not, label %.loopexit, label %11, !llvm.loop !54 .loopexit: ; preds = %18, %6, %4 %21 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -5099,7 +5096,7 @@ define internal fastcc void @wait_for_sync_resolv(ptr noundef readonly captures( 23: ; preds = %21, %.preheader.preheader %24 = load i8, ptr %0, align 1, !range !16, !noundef !17 %25 = trunc nuw i8 %24 to i1 - br i1 %25, label %.loopexit, label %.preheader.preheader, !llvm.loop !56 + br i1 %25, label %.loopexit, label %.preheader.preheader, !llvm.loop !55 .loopexit: ; preds = %23, %1, %14, %17 call void @llvm.lifetime.end.p0(ptr nonnull %4) @@ -5234,7 +5231,7 @@ wka_name_lookup.exit: ; preds = %._crit_edge28.i %64 = add i32 %62, -1 store i32 %64, ptr %8, align 4 %.not85 = icmp eq i32 %62, 0 - br i1 %.not85, label %.split212, label %.split, !llvm.loop !57 + br i1 %.not85, label %.split212, label %.split, !llvm.loop !56 .split212: ; preds = %60 store i32 7, ptr %8, align 4 @@ -7441,18 +7438,18 @@ attributes #29 = { allocsize(0) } !48 = distinct !{!48, !7} !49 = distinct !{!49, !7} !50 = distinct !{!50, !7} -!51 = distinct !{!51, !7, !52} -!52 = !{!"llvm.loop.unswitch.partial.disable"} +!51 = distinct !{!51, !7} +!52 = distinct !{!52, !7} !53 = distinct !{!53, !7} !54 = distinct !{!54, !7} !55 = distinct !{!55, !7} -!56 = distinct !{!56, !7} -!57 = distinct !{!57, !7, !52} -!58 = distinct !{!58, !7, !52} -!59 = distinct !{!59, !7, !52} -!60 = distinct !{!60, !7, !52} +!56 = distinct !{!56, !7, !57} +!57 = !{!"llvm.loop.unswitch.partial.disable"} +!58 = distinct !{!58, !7, !57} +!59 = distinct !{!59, !7, !57} +!60 = distinct !{!60, !7, !57} !61 = distinct !{!61, !7} -!62 = distinct !{!62, !7, !52} +!62 = distinct !{!62, !7, !57} !63 = distinct !{!63, !7} !64 = distinct !{!64, !7} !65 = distinct !{!65, !7} diff --git a/bench/wireshark/optimized/drange.ll b/bench/wireshark/optimized/drange.ll index b7ba285accd..24aaa42d98a 100644 --- a/bench/wireshark/optimized/drange.ll +++ b/bench/wireshark/optimized/drange.ll @@ -904,7 +904,7 @@ drange_node_tostr.exit: ; preds = %10, %12, %16, %20 br label %g_string_append_c_inline.exit.backedge g_string_append_c_inline.exit.backedge: ; preds = %40, %34 - br label %g_string_append_c_inline.exit + br label %g_string_append_c_inline.exit, !llvm.loop !12 ._crit_edge: ; preds = %drange_node_tostr.exit, %1 %42 = tail call ptr @g_string_free(ptr noundef %2, i32 noundef 0) @@ -974,3 +974,4 @@ attributes #14 = { noreturn } !9 = !{i8 0, i8 2} !10 = !{} !11 = distinct !{!11, !7} +!12 = distinct !{!12, !7} diff --git a/bench/wireshark/optimized/packet-tls-utils.ll b/bench/wireshark/optimized/packet-tls-utils.ll index 7a2f14d2776..373612b103e 100644 --- a/bench/wireshark/optimized/packet-tls-utils.ll +++ b/bench/wireshark/optimized/packet-tls-utils.ll @@ -16755,38 +16755,40 @@ declare i32 @wmem_register_callback(ptr noundef, ptr noundef, ptr noundef) local define internal noundef zeroext i1 @ssl_decoder_destroy_cb(ptr readnone captures(none) %0, i32 %1, ptr noundef captures(none) %2) #1 { %4 = getelementptr inbounds nuw i8, ptr %2, i64 104 %5 = load ptr, ptr %4, align 8 - %magicptr = ptrtoint ptr %5 to i64 - switch i64 %magicptr, label %6 [ - i64 0, label %7 - i64 -1, label %ssl_cipher_cleanup.exit - ] + %.not = icmp eq ptr %5, null + br i1 %.not, label %8, label %6 6: ; preds = %3 - tail call void @gcry_cipher_close(ptr noundef %5) + %.not.i = icmp eq ptr %5, inttoptr (i64 -1 to ptr) + br i1 %.not.i, label %ssl_cipher_cleanup.exit, label %7 + +7: ; preds = %6 + tail call void @gcry_cipher_close(ptr noundef nonnull %5) br label %ssl_cipher_cleanup.exit -ssl_cipher_cleanup.exit: ; preds = %3, %6 +ssl_cipher_cleanup.exit: ; preds = %6, %7 store ptr null, ptr %4, align 8 br label %7 -7: ; preds = %3, %ssl_cipher_cleanup.exit +7: ; preds = %ssl_cipher_cleanup.exit, %3 %8 = getelementptr inbounds nuw i8, ptr %2, i64 96 %9 = load ptr, ptr %8, align 8 - %magicptr12 = ptrtoint ptr %9 to i64 - switch i64 %magicptr12, label %10 [ - i64 0, label %11 - i64 -1, label %ssl_cipher_cleanup.exit11 - ] + %.not8 = icmp eq ptr %9, null + br i1 %.not8, label %13, label %10 10: ; preds = %7 - tail call void @gcry_cipher_close(ptr noundef %9) + %.not.i10 = icmp eq ptr %9, inttoptr (i64 -1 to ptr) + br i1 %.not.i10, label %ssl_cipher_cleanup.exit11, label %12 + +12: ; preds = %11 + tail call void @gcry_cipher_close(ptr noundef nonnull %10) br label %ssl_cipher_cleanup.exit11 -ssl_cipher_cleanup.exit11: ; preds = %7, %10 +ssl_cipher_cleanup.exit11: ; preds = %11, %12 store ptr null, ptr %8, align 8 br label %11 -11: ; preds = %7, %ssl_cipher_cleanup.exit11 +11: ; preds = %ssl_cipher_cleanup.exit11, %8 %12 = getelementptr inbounds nuw i8, ptr %2, i64 112 %13 = load ptr, ptr %12, align 8 %.not9 = icmp eq ptr %13, null diff --git a/bench/wireshark/optimized/proto.ll b/bench/wireshark/optimized/proto.ll index 43e6ae542ce..2c0982344dd 100644 --- a/bench/wireshark/optimized/proto.ll +++ b/bench/wireshark/optimized/proto.ll @@ -25907,7 +25907,7 @@ proto_get_protocol_filter_name.exit: ; preds = %.lr.ph, %13 17: ; preds = %proto_get_protocol_filter_name.exit tail call void @wmem_strbuf_append_c(ptr noundef %7, i8 noundef signext 58) - br label %.lr.ph + br label %.lr.ph, !llvm.loop !47 ._crit_edge: ; preds = %proto_get_protocol_filter_name.exit, %1 %18 = tail call ptr @wmem_strbuf_finalize(ptr noundef %7) @@ -26086,7 +26086,7 @@ define void @proto_disable_all() local_unnamed_addr #24 { %10 = getelementptr inbounds nuw i8, ptr %.07, i64 8 %11 = load ptr, ptr %10, align 8 %.not = icmp eq ptr %11, null - br i1 %.not, label %.loopexit, label %.preheader, !llvm.loop !47 + br i1 %.not, label %.loopexit, label %.preheader, !llvm.loop !48 .loopexit: ; preds = %9, %0 ret void @@ -26127,7 +26127,7 @@ proto_heuristic_dissector_foreach.exit: ; preds = %11, %13 %16 = getelementptr inbounds nuw i8, ptr %.09, i64 8 %17 = load ptr, ptr %16, align 8 %.not = icmp eq ptr %17, null - br i1 %.not, label %.loopexit, label %.preheader, !llvm.loop !48 + br i1 %.not, label %.loopexit, label %.preheader, !llvm.loop !49 .loopexit: ; preds = %proto_heuristic_dissector_foreach.exit, %0 ret void @@ -26190,7 +26190,7 @@ proto_register_field_common.exit.us: ; preds = %.lr.ph.split.us, %. %17 = add nuw nsw i32 %.020.us, 1 %18 = getelementptr i8, ptr %.01519.us, i64 80 %exitcond25.not = icmp eq i32 %17, %2 - br i1 %exitcond25.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !49 + br i1 %exitcond25.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !50 .lr.ph.split: ; preds = %.lr.ph, %proto_register_field_common.exit %.020 = phi i32 [ %27, %proto_register_field_common.exit ], [ 0, %.lr.ph ] @@ -26219,7 +26219,7 @@ proto_register_field_common.exit: ; preds = %.lr.ph.split, %.lr. %27 = add nuw nsw i32 %.020, 1 %28 = getelementptr i8, ptr %.01519, i64 80 %exitcond.not = icmp eq i32 %27, %2 - br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !49 + br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !50 ._crit_edge: ; preds = %proto_register_field_common.exit, %proto_register_field_common.exit.us, %10 ret void @@ -26287,7 +26287,7 @@ define void @proto_deregister_field(i32 noundef %0, i32 noundef %1) local_unname 33: ; preds = %14 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond.not, label %.loopexit, label %14, !llvm.loop !50 + br i1 %exitcond.not, label %.loopexit, label %14, !llvm.loop !51 .loopexit: ; preds = %33, %.preheader, %5, %7, %2, %20 ret void @@ -26354,7 +26354,7 @@ define void @proto_deregister_all_fields_with_prefix(i32 noundef %0, ptr noundef 31: ; preds = %.preheader, %20 %.not22 = icmp eq i32 %indvars, 0 - br i1 %.not22, label %.loopexit, label %.preheader, !llvm.loop !51 + br i1 %.not22, label %.loopexit, label %.preheader, !llvm.loop !52 .loopexit: ; preds = %31, %8, %5, %2 ret void @@ -26458,7 +26458,7 @@ define void @proto_free_field_strings(i32 noundef %0, i32 noundef %1, ptr nounde %25 = getelementptr i8, ptr %.05385, i64 40 %26 = load ptr, ptr %25, align 8 %.not67 = icmp eq ptr %26, null - br i1 %.not67, label %.thread, label %.lr.ph, !llvm.loop !52 + br i1 %.not67, label %.thread, label %.lr.ph, !llvm.loop !53 27: ; preds = %19 %28 = and i32 %1, 512 @@ -26481,7 +26481,7 @@ define void @proto_free_field_strings(i32 noundef %0, i32 noundef %1, ptr nounde %36 = getelementptr i8, ptr %.05587, i64 24 %37 = load ptr, ptr %36, align 8 %.not66 = icmp eq ptr %37, null - br i1 %.not66, label %._crit_edge, label %.lr.ph88, !llvm.loop !53 + br i1 %.not66, label %._crit_edge, label %.lr.ph88, !llvm.loop !54 ._crit_edge: ; preds = %.lr.ph88, %29 tail call void @val64_string_ext_free(ptr noundef nonnull %2) @@ -26505,7 +26505,7 @@ define void @proto_free_field_strings(i32 noundef %0, i32 noundef %1, ptr nounde %44 = getelementptr i8, ptr %.05490, i64 24 %45 = load ptr, ptr %44, align 8 %.not65 = icmp eq ptr %45, null - br i1 %.not65, label %.thread, label %.lr.ph91, !llvm.loop !54 + br i1 %.not65, label %.thread, label %.lr.ph91, !llvm.loop !55 46: ; preds = %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5 %47 = and i32 %1, 4096 @@ -26539,7 +26539,7 @@ define void @proto_free_field_strings(i32 noundef %0, i32 noundef %1, ptr nounde %58 = getelementptr i8, ptr %.05293, i64 40 %59 = load ptr, ptr %58, align 8 %.not73 = icmp eq ptr %59, null - br i1 %.not73, label %.thread, label %.lr.ph94, !llvm.loop !55 + br i1 %.not73, label %.thread, label %.lr.ph94, !llvm.loop !56 60: ; preds = %52 %61 = and i32 %1, 512 @@ -26562,7 +26562,7 @@ define void @proto_free_field_strings(i32 noundef %0, i32 noundef %1, ptr nounde %69 = getelementptr i8, ptr %.05096, i64 24 %70 = load ptr, ptr %69, align 8 %.not72 = icmp eq ptr %70, null - br i1 %.not72, label %._crit_edge99, label %.lr.ph98, !llvm.loop !56 + br i1 %.not72, label %._crit_edge99, label %.lr.ph98, !llvm.loop !57 ._crit_edge99: ; preds = %.lr.ph98, %62 tail call void @value_string_ext_free(ptr noundef nonnull %2) @@ -26586,7 +26586,7 @@ define void @proto_free_field_strings(i32 noundef %0, i32 noundef %1, ptr nounde %77 = getelementptr i8, ptr %.0101, i64 24 %78 = load ptr, ptr %77, align 8 %.not71 = icmp eq ptr %78, null - br i1 %.not71, label %.thread, label %.lr.ph102, !llvm.loop !57 + br i1 %.not71, label %.thread, label %.lr.ph102, !llvm.loop !58 .thread: ; preds = %.lr.ph, %.lr.ph91, %.lr.ph94, %.lr.ph102, %5, %._crit_edge, %._crit_edge99, %.preheader, %.preheader78, %.preheader80, %.preheader82, %6, %9, %15, %48, %38, %71 %.05177 = phi ptr [ null, %71 ], [ null, %38 ], [ %2, %48 ], [ %2, %15 ], [ %2, %9 ], [ %2, %6 ], [ %2, %.preheader82 ], [ %2, %.preheader80 ], [ %2, %.preheader78 ], [ %2, %.preheader ], [ null, %._crit_edge99 ], [ null, %._crit_edge ], [ %2, %5 ], [ %2, %.lr.ph102 ], [ %2, %.lr.ph94 ], [ %2, %.lr.ph91 ], [ %2, %.lr.ph ] @@ -26705,7 +26705,7 @@ define void @proto_register_subtree_array(ptr noundef readonly captures(none) %0 %24 = load i32, ptr @num_tree_types, align 4 %25 = add i32 %24, %1 %26 = icmp slt i32 %23, %25 - br i1 %26, label %.lr.ph, label %.loopexit, !llvm.loop !58 + br i1 %26, label %.lr.ph, label %.loopexit, !llvm.loop !59 .loopexit: ; preds = %.lr.ph, %4, %2 %27 = icmp sgt i32 %1, 0 @@ -26733,7 +26733,7 @@ define void @proto_register_subtree_array(ptr noundef readonly captures(none) %0 %35 = add i32 %32, 1 store i32 %35, ptr @num_tree_types, align 4 %exitcond.not = icmp eq i32 %33, %1 - br i1 %exitcond.not, label %._crit_edge, label %.lr.ph21, !llvm.loop !59 + br i1 %exitcond.not, label %._crit_edge, label %.lr.ph21, !llvm.loop !60 ._crit_edge: ; preds = %31, %.loopexit ret void @@ -28746,7 +28746,7 @@ define internal fastcc noundef zeroext i1 @proto_tree_traverse_pre_order(ptr nou %9 = getelementptr inbounds nuw i8, ptr %.012, i64 16 %10 = load ptr, ptr %9, align 8 %11 = tail call fastcc zeroext i1 @proto_tree_traverse_pre_order(ptr noundef nonnull %.012, ptr noundef %1, ptr noundef %2) - br i1 %11, label %.loopexit, label %7, !llvm.loop !60 + br i1 %11, label %.loopexit, label %7, !llvm.loop !61 .loopexit: ; preds = %7, %8, %3 %.0 = phi i1 [ true, %3 ], [ %.not.not.not, %8 ], [ %.not.not.not, %7 ] @@ -29002,7 +29002,7 @@ define internal noundef zeroext i1 @check_for_undecoded(ptr noundef readonly cap %32 = load i32, ptr %12, align 4 %33 = add i32 %32, %31 %34 = icmp slt i32 %30, %33 - br i1 %34, label %17, label %.critedge, !llvm.loop !61 + br i1 %34, label %17, label %.critedge, !llvm.loop !62 .critedge: ; preds = %20, %17, %9, %5, %2 ret i1 false @@ -29313,7 +29313,7 @@ proto_get_next_protocol.exit: ; preds = %proto_can_toggle_pr %129 = getelementptr inbounds nuw i8, ptr %128, i64 32 %130 = load i32, ptr %129, align 8 %.not = icmp eq i32 %130, -1 - br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !62 + br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !63 ._crit_edge: ; preds = %proto_can_toggle_protocol.exit, %proto_get_next_protocol.exit, %0, %proto_get_first_protocol.exit ret void @@ -29559,7 +29559,7 @@ define void @proto_registrar_dump_values() local_unnamed_addr #0 { %105 = getelementptr inbounds nuw i8, ptr %104, i64 8 %106 = load ptr, ptr %105, align 8 %.not169 = icmp eq ptr %106, null - br i1 %.not169, label %.thread243, label %69, !llvm.loop !63 + br i1 %.not169, label %.thread243, label %69, !llvm.loop !64 107: ; preds = %45 %108 = getelementptr inbounds nuw i8, ptr %31, i64 24 @@ -29591,7 +29591,7 @@ define void @proto_registrar_dump_values() local_unnamed_addr #0 { %122 = getelementptr inbounds nuw i8, ptr %121, i64 8 %123 = load ptr, ptr %122, align 8 %.not166 = icmp eq ptr %123, null - br i1 %.not166, label %.thread243, label %113, !llvm.loop !64 + br i1 %.not166, label %.thread243, label %113, !llvm.loop !65 124: ; preds = %.lr.ph, %124 %125 = phi ptr [ %40, %.lr.ph ], [ %139, %124 ] @@ -29612,7 +29612,7 @@ define void @proto_registrar_dump_values() local_unnamed_addr #0 { %138 = getelementptr inbounds nuw i8, ptr %137, i64 16 %139 = load ptr, ptr %138, align 8 %.not165 = icmp eq ptr %139, null - br i1 %.not165, label %.thread243, label %124, !llvm.loop !65 + br i1 %.not165, label %.thread243, label %124, !llvm.loop !66 140: ; preds = %36, %._crit_edge274 %141 = getelementptr inbounds nuw i8, ptr %7, i64 8 @@ -29637,7 +29637,7 @@ define void @proto_registrar_dump_values() local_unnamed_addr #0 { .thread243: ; preds = %124, %113, %101, %36, %.preheader251, %.preheader, %.thread189.thread, %29, %._crit_edge274, %50, %107, %63, %147, %140, %26, %21, %4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond.not, label %._crit_edge, label %4, !llvm.loop !66 + br i1 %exitcond.not, label %._crit_edge, label %4, !llvm.loop !67 ._crit_edge: ; preds = %.thread243, %0 ret void @@ -29721,7 +29721,7 @@ define zeroext i1 @proto_registrar_dump_fieldcount() local_unnamed_addr #0 { %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %24 = zext i32 %22 to i64 %25 = icmp samesign ult i64 %indvars.iv.next, %24 - br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !67 + br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !68 ._crit_edge: ; preds = %21, %0 %.020.lcssa = phi i32 [ 0, %0 ], [ %.121, %21 ] @@ -29910,7 +29910,7 @@ define void @proto_registrar_dump_elastic(ptr noundef %0) local_unnamed_addr #0 %55 = getelementptr ptr, ptr %.060, i64 %54 %.059 = load ptr, ptr %55, align 8 %.not75.not = icmp eq ptr %.059, null - br i1 %.not75.not, label %.critedge, label %49, !llvm.loop !68 + br i1 %.not75.not, label %.critedge, label %49, !llvm.loop !69 .loopexit: ; preds = %49, %47 %.not77 = icmp eq ptr %.061118, null @@ -29982,7 +29982,7 @@ switch.lookup: ; preds = %66 %82 = zext i32 %81 to i64 %83 = call i64 @strlen(ptr noundef %74) #41 %84 = icmp ugt i64 %83, %82 - br i1 %84, label %.lr.ph.i, label %dot_to_underscore.exit, !llvm.loop !69 + br i1 %84, label %.lr.ph.i, label %dot_to_underscore.exit, !llvm.loop !70 dot_to_underscore.exit: ; preds = %80, %switch.lookup %85 = call i32 @g_strcmp0(ptr noundef %.054120, ptr noundef %74) @@ -30009,7 +30009,7 @@ dot_to_underscore.exit: ; preds = %80, %switch.lookup %88 = load i32, ptr @gpa_hfinfo.0, align 8 %89 = zext i32 %88 to i64 %90 = icmp samesign ult i64 %indvars.iv.next, %89 - br i1 %90, label %10, label %._crit_edge, !llvm.loop !70 + br i1 %90, label %10, label %._crit_edge, !llvm.loop !71 ._crit_edge: ; preds = %.critedge %91 = icmp eq ptr %.162, null @@ -30276,7 +30276,7 @@ define void @proto_registrar_dump_fields() local_unnamed_addr #0 { 85: ; preds = %28, %76, %33, %20, %.lr.ph %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !71 + br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !72 ._crit_edge: ; preds = %85, %0 call void @llvm.lifetime.end.p0(ptr nonnull %1) @@ -30380,7 +30380,7 @@ define zeroext i1 @proto_registrar_dump_field_completions(ptr noundef readonly c %.1 = phi i1 [ %.041, %.lr.ph ], [ %.041, %21 ], [ %.041, %29 ], [ %.041, %34 ], [ %.041, %37 ], [ true, %.sink.split ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !72 + br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !73 ._crit_edge: ; preds = %44, %1 %.0.lcssa = phi i1 [ false, %1 ], [ %.1, %44 ] @@ -30398,7 +30398,7 @@ define void @proto_registrar_dump_ftypes() local_unnamed_addr #0 { %4 = tail call i32 (i32, ptr, ...) @__printf_chk(i32 noundef 2, ptr noundef nonnull @.str.168, ptr noundef %2, ptr noundef %3) %5 = add nuw nsw i32 %.04, 1 %exitcond.not = icmp eq i32 %5, 46 - br i1 %exitcond.not, label %6, label %1, !llvm.loop !73 + br i1 %exitcond.not, label %6, label %1, !llvm.loop !74 6: ; preds = %1 ret void @@ -30589,7 +30589,7 @@ define internal fastcc noundef zeroext i1 @construct_match_selected_string(ptr n %.181 = getelementptr i8, ptr %.080110, i64 %.pn %92 = add nuw nsw i32 %.082109, 1 %exitcond.not = icmp eq i32 %92, %spec.select - br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !74 + br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !75 93: ; preds = %.critedge %.not101 = icmp eq ptr %2, null @@ -31001,7 +31001,7 @@ proto_item_add_subtree.exit: ; preds = %38 %74 = or i64 %69, %.0279470 %.not313.not399 = icmp ult i64 %31, %69 %.not313.not = select i1 %.not306, i1 %.not313.not399, i1 false - br i1 %.not313.not, label %393, label %75, !llvm.loop !75 + br i1 %.not313.not, label %393, label %75, !llvm.loop !76 75: ; preds = %73 %76 = getelementptr inbounds nuw i8, ptr %65, i64 16 @@ -31055,7 +31055,7 @@ proto_item_add_subtree.exit: ; preds = %38 unreachable 92: ; preds = %86, %84, %82, %80, %78 - br i1 %.not314, label %93, label %393, !llvm.loop !75 + br i1 %.not314, label %93, label %393, !llvm.loop !76 93: ; preds = %92 %94 = load i64, ptr %68, align 8 @@ -32964,7 +32964,7 @@ define noundef ptr @proto_tree_add_split_bits_item_ret_val(ptr noundef %0, i32 n %74 = zext nneg i8 %73 to i64 %75 = shl i64 %44, %74 %.not165 = icmp eq i8 %73, 0 - br i1 %.not165, label %._crit_edge, label %.lr.ph, !llvm.loop !76 + br i1 %.not165, label %._crit_edge, label %.lr.ph, !llvm.loop !77 ._crit_edge: ; preds = %68 %76 = add nuw nsw i32 %.1151, 7 @@ -35563,7 +35563,7 @@ proto_item_set_generated.exit153: ; preds = %106, %103, %101, %. %129 = tail call i32 (ptr, i64, i32, i64, ptr, ...) @__snprintf_chk(ptr noundef %123, i64 noundef %124, i32 noundef 2, i64 noundef %125, ptr noundef nonnull @.str.198, i32 noundef %128) %130 = add nuw i64 %.0158, 1 %exitcond.not = icmp eq i64 %130, %8 - br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !77 + br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !78 131: ; preds = %._crit_edge %132 = tail call ptr @expert_get_summary(ptr noundef nonnull %5) @@ -36110,3 +36110,4 @@ attributes #44 = { nounwind memory(none) } !75 = distinct !{!75, !7} !76 = distinct !{!76, !7} !77 = distinct !{!77, !7} +!78 = distinct !{!78, !7} diff --git a/bench/wolfssl/optimized/ssl.ll b/bench/wolfssl/optimized/ssl.ll index 388467ac219..d6f1c75f283 100644 --- a/bench/wolfssl/optimized/ssl.ll +++ b/bench/wolfssl/optimized/ssl.ll @@ -7537,10 +7537,10 @@ ProcessBufferCertHandleDer.exit.i: ; preds = %296, %293, %282 br label %314 314: ; preds = %.thread116, %310, %307 - %315 = phi i1 [ %297, %310 ], [ %297, %307 ], [ true, %.thread116 ] - %.not.i35.i.i = phi i1 [ false, %310 ], [ true, %307 ], [ true, %.thread116 ] - %316 = phi ptr [ %311, %310 ], [ %309, %307 ], [ %301, %.thread116 ] - %.0.i.i.i94 = phi i32 [ %313, %310 ], [ -2, %307 ], [ -2, %.thread116 ] + %315 = phi i1 [ %297, %310 ], [ %297, %307 ], [ true, %.thread117 ] + %.not.i35.i.i = phi i1 [ false, %310 ], [ true, %307 ], [ true, %.thread117 ] + %316 = phi ptr [ %311, %310 ], [ %309, %307 ], [ %301, %.thread117 ] + %.0.i.i.i94 = phi i32 [ %313, %310 ], [ -2, %307 ], [ -2, %.thread117 ] %317 = icmp ne ptr %0, null %318 = icmp eq i32 %.0.i.i.i94, -2 %or.cond.i.i.i95 = select i1 %317, i1 %318, i1 false @@ -7595,7 +7595,7 @@ wolfSSL_CTX_GetDevId.exit.i.i96: ; preds = %319, %314, %.thread br label %346 341: ; preds = %337 - br i1 %.not, label %ProcessBufferCertSetHave.exit.i.i, label %.thread.thread29.i.i.i + br i1 %.not, label %ProcessBufferCertSetHave.exit.thread.i.i, label %.thread.thread29.i.i.i .thread.thread29.i.i.i: ; preds = %341 %342 = getelementptr inbounds nuw i8, ptr %0, i64 169 @@ -7615,7 +7615,7 @@ wolfSSL_CTX_GetDevId.exit.i.i96: ; preds = %319, %314, %.thread br label %.thread26.i.i.i .thread.i.i.i: ; preds = %345 - br i1 %.not, label %ProcessBufferCertSetHave.exit.i.i, label %350 + br i1 %.not, label %ProcessBufferCertSetHave.exit.thread.i.i, label %350 350: ; preds = %.thread.i.i.i, %.thread.thread29.i.i.i %351 = getelementptr inbounds nuw i8, ptr %12, i64 852 @@ -7629,66 +7629,74 @@ wolfSSL_CTX_GetDevId.exit.i.i96: ; preds = %319, %314, %.thread %355 = load i32, ptr %354, align 16, !tbaa !184 switch i32 %355, label %ProcessBufferCertSetHave.exit.i.i [ i32 518, label %356 - i32 645, label %357 - i32 654, label %357 + i32 645, label %361 + i32 654, label %361 ] 356: ; preds = %.thread26.i.i.i - br i1 %.not.i3543.i.i, label %ProcessBufferCertSetHave.exit.sink.split.i.i, label %.thread.i.i + br i1 %.not.i3543.i.i, label %ProcessBufferCertSetHave.exit.thread.sink.split.i.i, label %357 -357: ; preds = %.thread26.i.i.i, %.thread26.i.i.i - br i1 %.not.i3543.i.i, label %ProcessBufferCertSetHave.exit.sink.split.i.i, label %.thread.i.i - -.thread.i.i: ; preds = %357, %356 - %.sink54.i.i = phi i64 [ 16777216, %356 ], [ 8388608, %357 ] +357: ; preds = %356 %358 = getelementptr inbounds nuw i8, ptr %5, i64 1024 %359 = load i64, ptr %358, align 8 - %360 = or i64 %359, %.sink54.i.i + %360 = or i64 %359, 16777216 store i64 %360, ptr %358, align 8 - %361 = and i64 %359, 128 - %.not2650.i.i = icmp eq i64 %361, 0 - br label %373 + br label %ProcessBufferCertSetHave.exit.thread45.i.i + +361:; preds = %.thread26.i.i.i, %.thread26.i.i.i + br i1 %.not.i3543.i.i, label %ProcessBufferCertSetHave.exit.thread.sink.split.i.i, label %362 -ProcessBufferCertSetHave.exit.sink.split.i.i: ; preds = %357, %356 - %.sink57.i.i = phi i16 [ 512, %356 ], [ 256, %357 ] - %362 = getelementptr inbounds nuw i8, ptr %0, i64 169 - %363 = load i16, ptr %362, align 1 - %364 = or i16 %363, %.sink57.i.i - store i16 %364, ptr %362, align 1 - br label %ProcessBufferCertSetHave.exit.i.i +362:; preds = %361 + %362 = getelementptr inbounds nuw i8, ptr %5, i64 1024 + %363 = load i64, ptr %362, align 8 + %364 = or i64 %363, 8388608 + store i64 %364, ptr %362, align 8 + br label %ProcessBufferCertSetHave.exit.thread45.i.i -ProcessBufferCertSetHave.exit.i.i: ; preds = %ProcessBufferCertSetHave.exit.sink.split.i.i, %.thread26.i.i.i, %.thread.i.i.i, %341 - br i1 %37, label %369, label %365 +ProcessBufferCertSetHave.exit.i.i: ; preds = %.thread26.i.i.i + br i1 %.not.i3543.i.i, label %ProcessBufferCertSetHave.exit.thread.i.i, label %365 365: ; preds = %ProcessBufferCertSetHave.exit.i.i %366 = getelementptr inbounds nuw i8, ptr %5, i64 1024 %367 = load i64, ptr %366, align 8 - %368 = and i64 %367, 128 - %.not26.i.i = icmp eq i64 %368, 0 - %brmerge.not.i.i = and i1 %.not.i3543.i.i, %.not26.i.i - br i1 %brmerge.not.i.i, label %369, label %373 - -369: ; preds = %365, %ProcessBufferCertSetHave.exit.i.i - %370 = getelementptr inbounds nuw i8, ptr %0, i64 169 - %371 = load i16, ptr %370, align 1 - %372 = and i16 %371, 2 - %.not27.i.i = icmp eq i16 %372, 0 - br label %373 - -373: ; preds = %369, %365, %.thread.i.i - %.0.in.i.i = phi i1 [ %.not26.i.i, %365 ], [ %.not27.i.i, %369 ], [ %.not2650.i.i, %.thread.i.i ] + br label %ProcessBufferCertSetHave.exit.thread45.i.i + +ProcessBufferCertSetHave.exit.thread45.i.i:; preds = %365, %362, %357 + %366 = phi i64 [ %.pre.i.i100, %ProcessBufferCertSetHave.exit.ProcessBufferCertSetHave.exit.thread45_crit_edge.i.i ], [ %365, %362 ], [ %360, %357 ] + %367 = and i64 %366, 128 + %.not26.i.i = icmp eq i64 %367, 0 + br label %374 + +ProcessBufferCertSetHave.exit.thread.sink.split.i.i:; preds = %361, %356 + %.sink55.i.i = phi i16 [ 512, %356 ], [ 256, %361 ] + %368 = getelementptr inbounds nuw i8, ptr %0, i64 169 + %369 = load i16, ptr %368, align 1 + %370 = or i16 %369, %.sink55.i.i + store i16 %370, ptr %368, align 1 + br label %ProcessBufferCertSetHave.exit.thread.i.i + +ProcessBufferCertSetHave.exit.thread.i.i: ; preds = %ProcessBufferCertSetHave.exit.thread.sink.split.i.i, %ProcessBufferCertSetHave.exit.i.i, %.thread.i.i.i, %341 + %371 = getelementptr inbounds nuw i8, ptr %0, i64 169 + %372 = load i16, ptr %371, align 1 + %373 = and i16 %372, 2 + %.not27.i.i = icmp eq i16 %373, 0 + %.phi.trans.insert47.i.i = getelementptr inbounds nuw i8, ptr %12, i64 32 + %.pre48.i.i = load i32, ptr %.phi.trans.insert47.i.i, align 16, !tbaa !184 + br label %374 + +374: ; preds = %ProcessBufferCertSetHave.exit.thread.i.i, %ProcessBufferCertSetHave.exit.thread45.i.i + %375 = phi i32 [ %.pre48.i.i, %ProcessBufferCertSetHave.exit.thread.i.i ], [ %355, %ProcessBufferCertSetHave.exit.thread45.i.i ] + %.0.in.i.i = phi i1 [ %.not27.i.i, %ProcessBufferCertSetHave.exit.thread.i.i ], [ %.not26.i.i, %ProcessBufferCertSetHave.exit.thread45.i.i ] call void @llvm.lifetime.start.p0(ptr nonnull %10) store i32 0, ptr %10, align 4, !tbaa !3 call void @llvm.lifetime.start.p0(ptr nonnull %11) - %374 = getelementptr inbounds nuw i8, ptr %12, i64 32 - %375 = load i32, ptr %374, align 16, !tbaa !184 switch i32 %375, label %407 [ i32 654, label %376 i32 645, label %376 i32 518, label %393 ] -376: ; preds = %373, %373 +376: ; preds = %374, %374 store i32 0, ptr %11, align 4, !tbaa !3 %377 = load ptr, ptr %12, align 16, !tbaa !208 %378 = getelementptr inbounds nuw i8, ptr %12, i64 8 @@ -7717,7 +7725,7 @@ ProcessBufferCertSetHave.exit.i.i: ; preds = %ProcessBufferCertSe %392 = select i1 %391, i32 -409, i32 0 br label %407 -393: ; preds = %373 +393: ; preds = %374 %394 = getelementptr inbounds nuw i8, ptr %12, i64 852 %395 = load i32, ptr %394, align 4, !tbaa !205 %396 = call i32 @wc_ecc_get_oid(i32 noundef %395, ptr noundef null, ptr noundef null) #22 @@ -7741,9 +7749,9 @@ ProcessBufferCertSetHave.exit.i.i: ; preds = %ProcessBufferCertSe %406 = select i1 %405, i32 -410, i32 0 br label %407 -407: ; preds = %404, %398, %393, %390, %386, %382, %376, %373 - %.027.i.i.i = phi i32 [ 0, %373 ], [ %380, %376 ], [ 0, %393 ], [ -409, %386 ], [ -409, %382 ], [ %392, %390 ], [ -410, %398 ], [ %406, %404 ] - %.0.i31.i.i = phi i8 [ 0, %373 ], [ 1, %376 ], [ 3, %393 ], [ 1, %386 ], [ 1, %382 ], [ 1, %390 ], [ 3, %398 ], [ 3, %404 ] +407: ; preds = %404, %398, %393, %390, %386, %382, %376, %374 + %.027.i.i.i = phi i32 [ 0, %374 ], [ %380, %376 ], [ 0, %393 ], [ -409, %386 ], [ -409, %382 ], [ %392, %390 ], [ -410, %398 ], [ %406, %404 ] + %.0.i31.i.i = phi i8 [ 0, %374 ], [ 1, %376 ], [ 3, %393 ], [ 1, %386 ], [ 1, %382 ], [ 1, %390 ], [ 3, %398 ], [ 3, %404 ] br i1 %.not.i3543.i.i, label %412, label %408 408: ; preds = %407 @@ -7906,7 +7914,7 @@ ProcessBufferResetSuites.exit: ; preds = %150, %419, %421, %4 br label %.thread134 .thread134: ; preds = %ProcessBufferResetSuites.exit, %466, %468, %475, %433, %440, %ProcessBufferCertTypes.exit.thread122, %34, %ProcessBufferPrivateKey.exit, %438, %473 - %496 = phi i32 [ 0, %473 ], [ 0, %438 ], [ -463, %ProcessBufferPrivateKey.exit ], [ %spec.store.select17, %34 ], [ %spec.select144, %ProcessBufferResetSuites.exit ], [ 1, %ProcessBufferCertTypes.exit.thread122 ], [ 1, %440 ], [ 1, %433 ], [ 1, %475 ], [ 1, %468 ], [ 1, %466 ] + %496 = phi i32 [ 0, %473 ], [ 0, %438 ], [ -463, %ProcessBufferPrivateKey.exit ], [ %spec.store.select17, %34 ], [ %spec.select144, %ProcessBufferResetSuites.exit ], [ 1, %ProcessBufferCertTypes.exit.thread123 ], [ 1, %440 ], [ 1, %433 ], [ 1, %475 ], [ 1, %468 ], [ 1, %466 ] call void @llvm.lifetime.end.p0(ptr nonnull %26) call void @llvm.lifetime.end.p0(ptr nonnull %25) call void @llvm.lifetime.end.p0(ptr nonnull %24) diff --git a/bench/yosys/optimized/yosys.ll b/bench/yosys/optimized/yosys.ll index 1cefc71be17..d78669bfd3a 100644 --- a/bench/yosys/optimized/yosys.ll +++ b/bench/yosys/optimized/yosys.ll @@ -32965,7 +32965,7 @@ define void @_ZN5Yosys5shellEPNS_5RTLIL6DesignE(ptr noundef %0) local_unnamed_ad br label %12 12: ; preds = %.lr.ph44, %.backedge - %13 = phi ptr [ %7, %.lr.ph44 ], [ %20, %.backedge ] + %13 = phi ptr [ %7, %.lr.ph45 ], [ %20, %.backedge ] %14 = call i64 @strspn(ptr noundef nonnull %13, ptr noundef nonnull @.str.349) #44 %15 = getelementptr inbounds nuw i8, ptr %13, i64 %14 %16 = load i8, ptr %15, align 1, !tbaa !43 diff --git a/bench/z3/optimized/add_bounds_tactic.ll b/bench/z3/optimized/add_bounds_tactic.ll index 926127fd8f6..591a1d4d040 100644 --- a/bench/z3/optimized/add_bounds_tactic.ll +++ b/bench/z3/optimized/add_bounds_tactic.ll @@ -5754,62 +5754,75 @@ define linkonce_odr hidden noundef ptr @_ZNK7obj_mapI4exprSt4pairI8rationalbEE9f %.not35.i = icmp eq i32 %13, %11 br i1 %.not35.i, label %.preheader.i, label %.lr.ph.i -.preheader.i: ; preds = %25, %2 +.preheader.i: ; preds = %28, %2 %.not2737.i = icmp eq i32 %13, 0 br i1 %.not2737.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %.lr.ph39.i -.lr.ph.i: ; preds = %2, %25 - %.036.i = phi ptr [ %26, %25 ], [ %16, %2 ] +.lr.ph.i: ; preds = %2, %28 + %.036.i = phi ptr [ %29, %28 ], [ %16, %2 ] %19 = load ptr, ptr %.036.i, align 8, !tbaa !196 - %magicptr30.i = ptrtoint ptr %19 to i64 - switch i64 %magicptr30.i, label %20 [ - i64 0, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit - i64 1, label %25 - ] - -20: ; preds = %.lr.ph.i - %21 = getelementptr inbounds nuw i8, ptr %19, i64 12 - %22 = load i32, ptr %21, align 4, !tbaa !191 - %23 = icmp eq i32 %22, %9 - %24 = icmp eq ptr %19, %1 - %or.cond.i = and i1 %24, %23 - br i1 %or.cond.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %25 - -25: ; preds = %20, %.lr.ph.i - %26 = getelementptr inbounds nuw i8, ptr %.036.i, i64 48 - %.not.i = icmp eq ptr %26, %18 + %.not.i.i = icmp ne ptr %19, null + %20 = icmp ne ptr %19, inttoptr (i64 1 to ptr) + %spec.select.i.i = and i1 %.not.i.i, %20 + br i1 %spec.select.i.i, label %21, label %26 + +21: ; preds = %.lr.ph.i + %22 = getelementptr inbounds nuw i8, ptr %19, i64 12 + %23 = load i32, ptr %22, align 4, !tbaa !191 + %24 = icmp eq i32 %23, %9 + %23 = icmp eq ptr %19, %1 + %or.cond.i = and i1 %25, %24 + br i1 %or.cond.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %28 + +26: ; preds = %.lr.ph.i + %27 = icmp eq ptr %19, null + br i1 %27, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %28 + +28: ; preds = %26, %21 + %29 = getelementptr inbounds nuw i8, ptr %.034.i, i64 48 + %.not.i = icmp eq ptr %29, %18 br i1 %.not.i, label %.preheader.i, label %.lr.ph.i, !llvm.loop !198 -.lr.ph39.i: ; preds = %.preheader.i, %33 - %.138.i = phi ptr [ %34, %33 ], [ %14, %.preheader.i ] +.lr.ph39.i: ; preds = %.preheader.i, %.lr.ph37.i.backedge + %.138.i = phi ptr [ %.136.i.be, %.lr.ph37.i.backedge ], [ %14, %.preheader.i ] %27 = load ptr, ptr %.138.i, align 8, !tbaa !196 - %magicptr32.i = ptrtoint ptr %27 to i64 - switch i64 %magicptr32.i, label %28 [ - i64 0, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit - i64 1, label %33 - ] - -28: ; preds = %.lr.ph39.i - %29 = getelementptr inbounds nuw i8, ptr %27, i64 12 - %30 = load i32, ptr %29, align 4, !tbaa !191 - %31 = icmp eq i32 %30, %9 - %32 = icmp eq ptr %27, %1 - %or.cond31.i = and i1 %32, %31 - br i1 %or.cond31.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %33 - -33: ; preds = %28, %.lr.ph39.i + %.not.i28.i = icmp ne ptr %27, null + %31 = icmp ne ptr %30, inttoptr (i64 1 to ptr) + %spec.select.i29.i = and i1 %.not.i28.i, %31 + br i1 %spec.select.i29.i, label %32, label %37 + +32: ; preds = %.lr.ph37.i + %33 = getelementptr inbounds nuw i8, ptr %30, i64 12 + %34 = load i32, ptr %33, align 4, !tbaa !191 + %35 = icmp eq i32 %34, %9 + %31 = icmp eq ptr %30, %1 + %or.cond30.i = and i1 %36, %35 + br i1 %or.cond30.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %40 + +37: ; preds = %.lr.ph37.i + %38 = icmp eq ptr %30, null %34 = getelementptr inbounds nuw i8, ptr %.138.i, i64 48 %.not27.i = icmp eq ptr %34, %16 - br i1 %.not27.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %.lr.ph39.i, !llvm.loop !199 + %or.cond42.i = select i1 %38, i1 true, i1 %.not27.i + br i1 %or.cond42.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %.lr.ph37.i.backedge + +40: ; preds = %32 + %.old.i = getelementptr inbounds nuw i8, ptr %.136.i, i64 48 + %.not27.old.i = icmp eq ptr %.old.i, %16 + br i1 %.not27.old.i, label %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit, label %.lr.ph37.i.backedge + +.lr.ph37.i.backedge: ; preds = %40, %37 + %.136.i.be = phi ptr [ %.old.i, %40 ], [ %39, %37 ] + br label %.lr.ph37.i, !llvm.loop !199 -_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit: ; preds = %20, %.lr.ph.i, %33, %28, %.lr.ph39.i, %.preheader.i - %.026.i = phi ptr [ null, %.preheader.i ], [ null, %.lr.ph39.i ], [ %.138.i, %28 ], [ null, %33 ], [ %.036.i, %20 ], [ null, %.lr.ph.i ] - %35 = load ptr, ptr @_ZN8rational13g_mpq_managerE, align 8, !tbaa !129 - invoke void @_ZN11mpz_managerILb1EE3delEPS0_R3mpz(ptr noundef %35, ptr noundef nonnull align 8 dereferenceable(33) %4) - to label %.noexc.i.i.i unwind label %36 +_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit: ; preds = %26, %21, %40, %37, %32, %.preheader.i + %.026.i = phi ptr [ null, %.preheader.i ], [ %.136.i, %32 ], [ null, %40 ], [ null, %37 ], [ null, %26 ], [ %.034.i, %21 ] + %41 = load ptr, ptr @_ZN8rational13g_mpq_managerE, align 8, !tbaa !129 + invoke void @_ZN11mpz_managerILb1EE3delEPS0_R3mpz(ptr noundef %41, ptr noundef nonnull align 8 dereferenceable(33) %4) + to label %.noexc.i.i.i unwind label %42 .noexc.i.i.i: ; preds = %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit - invoke void @_ZN11mpz_managerILb1EE3delEPS0_R3mpz(ptr noundef %35, ptr noundef nonnull align 8 dereferenceable(16) %5) + invoke void @_ZN11mpz_managerILb1EE3delEPS0_R3mpz(ptr noundef %41, ptr noundef nonnull align 8 dereferenceable(16) %5) to label %_ZN7obj_mapI4exprSt4pairI8rationalbEE8key_dataD2Ev.exit unwind label %36 36: ; preds = %.noexc.i.i.i, %_ZNK14core_hashtableIN7obj_mapI4exprSt4pairI8rationalbEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE9find_coreERKS8_.exit diff --git a/bench/z3/optimized/elim_unconstrained.ll b/bench/z3/optimized/elim_unconstrained.ll index 59fbad2282b..63bcee6ce62 100644 --- a/bench/z3/optimized/elim_unconstrained.ll +++ b/bench/z3/optimized/elim_unconstrained.ll @@ -5936,19 +5936,21 @@ _ZN17scoped_ptr_vectorIN26model_reconstruction_trail5entryEE9push_backEPS1_.exit %.not1.i.i.i.i = icmp eq i32 %45, 0 br i1 %.not1.i.i.i.i, label %_ZNK7obj_mapI4exprPS0_E5beginEv.exit, label %.lr.ph.i.i.i.i -.lr.ph.i.i.i.i: ; preds = %35, %49 - %.sroa.0.0.i.i = phi ptr [ %50, %49 ], [ %43, %35 ] +.lr.ph.i.i.i.i: ; preds = %35, %50 + %.sroa.0.0.i.i = phi ptr [ %51, %50 ], [ %43, %35 ] %48 = load ptr, ptr %.sroa.0.0.i.i, align 8, !tbaa !199 - %switch.i.i.i.i = icmp ult ptr %48, inttoptr (i64 2 to ptr) - br i1 %switch.i.i.i.i, label %49, label %_ZNK7obj_mapI4exprPS0_E5beginEv.exit - -49: ; preds = %.lr.ph.i.i.i.i - %50 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i, i64 16 - %.not.i.i.i.i = icmp eq ptr %50, %47 + %switch.i.i.i.i = icmp ne ptr %48, null + %49 = icmp ne ptr %48, inttoptr (i64 1 to ptr) + %spec.select.i.i.i.i.i = and i1 %.not.i.i.i.i.i, %49 + br i1 %spec.select.i.i.i.i.i, label %_ZNK7obj_mapI4exprPS0_E5beginEv.exit, label %50 + +50:; preds = %.lr.ph.i.i.i.i + %51 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i, i64 16 + %.not.i.i.i.i = icmp eq ptr %51, %47 br i1 %.not.i.i.i.i, label %_ZNK7obj_mapI4exprPS0_E5beginEv.exit, label %.lr.ph.i.i.i.i, !llvm.loop !202 -_ZNK7obj_mapI4exprPS0_E5beginEv.exit: ; preds = %.lr.ph.i.i.i.i, %49, %35 - %.sroa.0.1.i.i = phi ptr [ %43, %35 ], [ %.sroa.0.0.i.i, %.lr.ph.i.i.i.i ], [ %47, %49 ] +_ZNK7obj_mapI4exprPS0_E5beginEv.exit: ; preds = %.lr.ph.i.i.i.i, %50, %35 + %.sroa.0.1.i.i = phi ptr [ %43, %35 ], [ %47, %50 ], [ %.sroa.0.0.i.i, %.lr.ph.i.i.i.i ] %51 = getelementptr inbounds nuw %"class.obj_map::obj_map_entry", ptr %43, i64 %46 %.not19 = icmp eq ptr %.sroa.0.1.i.i, %51 br i1 %.not19, label %._crit_edge, label %.lr.ph @@ -5966,19 +5968,21 @@ _ZNK7obj_mapI4exprPS0_E5beginEv.exit: ; preds = %.lr.ph.i.i.i.i, %49 %.not1.i.i = icmp eq ptr %55, %47 br i1 %.not1.i.i, label %_ZN14core_hashtableIN7obj_mapI4exprPS1_E13obj_map_entryE8obj_hashINS3_8key_dataEE10default_eqIS6_EE8iteratorppEv.exit, label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %.lr.ph, %57 - %.sroa.014.1 = phi ptr [ %58, %57 ], [ %55, %.lr.ph ] +.lr.ph.i.i: ; preds = %.lr.ph, %59 + %.sroa.014.1 = phi ptr [ %60, %59 ], [ %55, %.lr.ph ] %56 = load ptr, ptr %.sroa.014.1, align 8, !tbaa !199 - %switch.i.i = icmp ult ptr %56, inttoptr (i64 2 to ptr) - br i1 %switch.i.i, label %57, label %_ZN14core_hashtableIN7obj_mapI4exprPS1_E13obj_map_entryE8obj_hashINS3_8key_dataEE10default_eqIS6_EE8iteratorppEv.exit - -57: ; preds = %.lr.ph.i.i - %58 = getelementptr inbounds nuw i8, ptr %.sroa.014.1, i64 16 - %.not.i.i = icmp eq ptr %58, %47 + %switch.i.i = icmp ne ptr %56, null + %58 = icmp ne ptr %56, inttoptr (i64 1 to ptr) + %spec.select.i.i.i = and i1 %.not.i.i.i, %58 + br i1 %spec.select.i.i.i, label %_ZN14core_hashtableIN7obj_mapI4exprPS1_E13obj_map_entryE8obj_hashINS3_8key_dataEE10default_eqIS6_EE8iteratorppEv.exit, label %59 + +59:; preds = %.lr.ph.i.i + %60 = getelementptr inbounds nuw i8, ptr %.sroa.014.1, i64 16 + %.not.i.i = icmp eq ptr %60, %47 br i1 %.not.i.i, label %_ZN14core_hashtableIN7obj_mapI4exprPS1_E13obj_map_entryE8obj_hashINS3_8key_dataEE10default_eqIS6_EE8iteratorppEv.exit, label %.lr.ph.i.i, !llvm.loop !202 -_ZN14core_hashtableIN7obj_mapI4exprPS1_E13obj_map_entryE8obj_hashINS3_8key_dataEE10default_eqIS6_EE8iteratorppEv.exit: ; preds = %.lr.ph.i.i, %57, %.lr.ph - %.sroa.014.2 = phi ptr [ %55, %.lr.ph ], [ %.sroa.014.1, %.lr.ph.i.i ], [ %58, %57 ] +_ZN14core_hashtableIN7obj_mapI4exprPS1_E13obj_map_entryE8obj_hashINS3_8key_dataEE10default_eqIS6_EE8iteratorppEv.exit: ; preds = %.lr.ph.i.i, %59, %.lr.ph + %.sroa.014.2 = phi ptr [ %55, %.lr.ph ], [ %60, %59 ], [ %.sroa.014.1, %.lr.ph.i.i ] %.not = icmp eq ptr %.sroa.014.2, %51 br i1 %.not, label %._crit_edge, label %.lr.ph } diff --git a/bench/z3/optimized/macro_finder_tactic.ll b/bench/z3/optimized/macro_finder_tactic.ll index f04604b69b4..38fa4d07cbe 100644 --- a/bench/z3/optimized/macro_finder_tactic.ll +++ b/bench/z3/optimized/macro_finder_tactic.ll @@ -3422,10 +3422,12 @@ define linkonce_odr hidden void @_ZN6recfun4decl6plugin12get_rec_funsEv(ptr dead br i1 %.not1.i.i.i.i, label %.loopexit, label %.lr.ph.i.i.i.i .lr.ph.i.i.i.i: ; preds = %2, %14 - %.sroa.0.0.i.i = phi ptr [ %15, %14 ], [ %8, %2 ] + %.sroa.0.0.i.i = phi ptr [ %15, %15 ], [ %8, %2 ] %13 = load ptr, ptr %.sroa.0.0.i.i, align 8, !tbaa !195 - %switch.i.i.i.i = icmp ult ptr %13, inttoptr (i64 2 to ptr) - br i1 %switch.i.i.i.i, label %14, label %.loopexit + %switch.i.i.i.i = icmp ne ptr %13, null + %14 = icmp ne ptr %13, inttoptr (i64 1 to ptr) + %spec.select.i.i.i.i.i = and i1 %.not.i.i.i.i.i, %14 + br i1 %spec.select.i.i.i.i.i, label %.loopexit, label %15 14: ; preds = %.lr.ph.i.i.i.i %15 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i, i64 16 @@ -3433,7 +3435,7 @@ define linkonce_odr hidden void @_ZN6recfun4decl6plugin12get_rec_funsEv(ptr dead br i1 %.not.i.i.i.i, label %.loopexit, label %.lr.ph.i.i.i.i, !llvm.loop !199 .loopexit: ; preds = %.lr.ph.i.i.i.i, %14, %2 - %.sroa.0.1.i.i = phi ptr [ %8, %2 ], [ %.sroa.0.0.i.i, %.lr.ph.i.i.i.i ], [ %12, %14 ] + %.sroa.0.1.i.i = phi ptr [ %8, %2 ], [ %12, %15 ], [ %.sroa.0.0.i.i, %.lr.ph.i.i.i.i ] %16 = getelementptr inbounds nuw %"class.obj_map::obj_map_entry", ptr %8, i64 %11 %.not16 = icmp eq ptr %.sroa.0.1.i.i, %16 br i1 %.not16, label %._crit_edge, label %.lr.ph @@ -3478,8 +3480,8 @@ _ZN15ref_vector_coreI9func_decl19ref_manager_wrapperIS0_11ast_managerEE7inc_refE br label %31 31: ; preds = %.noexc, %24 - %32 = phi ptr [ %.pre.i.i, %.noexc ], [ %17, %24 ] - %33 = phi i32 [ %.pre2.i.i, %.noexc ], [ %26, %24 ] + %32 = phi ptr [ %.pre.i.i, %.noexc ], [ %17, %25 ] + %33 = phi i32 [ %.pre2.i.i, %.noexc ], [ %26, %25 ] %34 = getelementptr inbounds i8, ptr %32, i64 -4 %35 = zext i32 %33 to i64 %36 = getelementptr inbounds nuw ptr, ptr %32, i64 %35 @@ -3490,19 +3492,21 @@ _ZN15ref_vector_coreI9func_decl19ref_manager_wrapperIS0_11ast_managerEE7inc_refE %.not1.i.i = icmp eq ptr %38, %12 br i1 %.not1.i.i, label %_ZN14core_hashtableIN7obj_mapI9func_declPN6recfun3defEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE8iteratorppEv.exit, label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %31, %40 - %.sroa.013.1 = phi ptr [ %41, %40 ], [ %38, %31 ] +.lr.ph.i.i: ; preds = %31, %42 + %.sroa.013.1 = phi ptr [ %43, %42 ], [ %38, %32 ] %39 = load ptr, ptr %.sroa.013.1, align 8, !tbaa !195 - %switch.i.i = icmp ult ptr %39, inttoptr (i64 2 to ptr) - br i1 %switch.i.i, label %40, label %_ZN14core_hashtableIN7obj_mapI9func_declPN6recfun3defEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE8iteratorppEv.exit - -40: ; preds = %.lr.ph.i.i - %41 = getelementptr inbounds nuw i8, ptr %.sroa.013.1, i64 16 - %.not.i.i = icmp eq ptr %41, %12 + %switch.i.i = icmp ne ptr %39, null + %41 = icmp ne ptr %38, inttoptr (i64 1 to ptr) + %spec.select.i.i.i = and i1 %.not.i.i.i, %41 + br i1 %spec.select.i.i.i, label %_ZN14core_hashtableIN7obj_mapI9func_declPN6recfun3defEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE8iteratorppEv.exit, label %42 + +42:; preds = %.lr.ph.i.i + %43 = getelementptr inbounds nuw i8, ptr %.sroa.013.1, i64 16 + %.not.i.i = icmp eq ptr %43, %12 br i1 %.not.i.i, label %_ZN14core_hashtableIN7obj_mapI9func_declPN6recfun3defEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE8iteratorppEv.exit, label %.lr.ph.i.i, !llvm.loop !199 -_ZN14core_hashtableIN7obj_mapI9func_declPN6recfun3defEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE8iteratorppEv.exit: ; preds = %.lr.ph.i.i, %40, %31 - %.sroa.013.2 = phi ptr [ %38, %31 ], [ %.sroa.013.1, %.lr.ph.i.i ], [ %41, %40 ] +_ZN14core_hashtableIN7obj_mapI9func_declPN6recfun3defEE13obj_map_entryE8obj_hashINS5_8key_dataEE10default_eqIS8_EE8iteratorppEv.exit: ; preds = %.lr.ph.i.i, %42, %31 + %.sroa.013.2 = phi ptr [ %38, %32 ], [ %43, %42 ], [ %.sroa.013.1, %.lr.ph.i.i ] %.not = icmp eq ptr %.sroa.013.2, %16 br i1 %.not, label %._crit_edge, label %.lr.ph diff --git a/bench/zed-rs/optimized/0fzu5iswc3qhp95jt69713e0a.ll b/bench/zed-rs/optimized/0fzu5iswc3qhp95jt69713e0a.ll index 61a5c64d1e7..aaee2409fe3 100644 --- a/bench/zed-rs/optimized/0fzu5iswc3qhp95jt69713e0a.ll +++ b/bench/zed-rs/optimized/0fzu5iswc3qhp95jt69713e0a.ll @@ -19478,72 +19478,74 @@ define internal fastcc void @"_ZN4core3ptr41drop_in_place$LT$client..Subscriptio %3 = landingpad { ptr, i32 } cleanup %4 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr8 = ptrtoint ptr %4 to i64 - switch i64 %magicptr8, label %18 [ - i64 0, label %22 - i64 -1, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6" - ] + %.not = icmp eq ptr %4, null + br i1 %.not, label %26, label %18 5: ; preds = %1 %6 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr = ptrtoint ptr %6 to i64 - switch i64 %magicptr, label %7 [ - i64 0, label %11 - i64 -1, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit" - ] + %.not1 = icmp eq ptr %6, null + br i1 %.not1, label %13, label %7 7: ; preds = %5 - %8 = getelementptr inbounds nuw i8, ptr %6, i64 8 - %9 = atomicrmw sub ptr %8, i64 1 release, align 8 - %10 = icmp eq i64 %9, 1 - br i1 %10, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit" + %8 = icmp eq ptr %6, inttoptr (i64 -1 to ptr) + br i1 %8, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit", label %9 -11: ; preds = %5 - %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %.val2 = load ptr, ptr %12, align 8, !nonnull !4, !noundef !4 - %13 = icmp eq ptr %.val2, inttoptr (i64 -1 to ptr) - br i1 %13, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit", label %14 +11: ; preds = %7 + %12 = getelementptr inbounds nuw i8, ptr %6, i64 8 + %11 = atomicrmw sub ptr %12, i64 1 release, align 8 + %13 = icmp eq i64 %11, 1 + br i1 %13, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit" -14: ; preds = %11 - %15 = getelementptr inbounds nuw i8, ptr %.val2, i64 8 - %16 = atomicrmw sub ptr %15, i64 1 release, align 8 - %17 = icmp eq i64 %16, 1 - br i1 %17, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit" +14: ; preds = %5 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %.val2 = load ptr, ptr %14, align 8, !nonnull !4, !noundef !4 + %17 = icmp eq ptr %.val2, inttoptr (i64 -1 to ptr) + br i1 %17, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split" + +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split": ; preds = %14 + %17 = getelementptr inbounds nuw i8, ptr %.val2, i64 8 + %18 = atomicrmw sub ptr %17, i64 1 release, align 8 + %19 = icmp eq i64 %18, 1 + br i1 %19, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit" -"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split": ; preds = %14, %7 - %.val2.sink = phi ptr [ %6, %7 ], [ %.val2, %14 ] +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split": ; preds = %16, %9 + %.val2.sink = phi ptr [ %6, %9 ], [ %.val2, %16 ] fence acquire tail call void @__rust_dealloc(ptr noundef nonnull %.val2.sink, i64 noundef 312, i64 noundef 8) #25 br label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit" -"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit": ; preds = %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split", %5, %14, %11, %7 +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit": ; preds = %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit.sink.split", %16, %14, %11, %7 ret void 18: ; preds = %2 - %19 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %20 = atomicrmw sub ptr %19, i64 1 release, align 8 - %21 = icmp eq i64 %20, 1 - br i1 %21, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6" + %21 = icmp eq ptr %4, inttoptr (i64 -1 to ptr) + br i1 %21, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6", label %22 -22: ; preds = %2 - %23 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %.val4 = load ptr, ptr %23, align 8, !nonnull !4, !noundef !4 - %24 = icmp eq ptr %.val4, inttoptr (i64 -1 to ptr) - br i1 %24, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6", label %25 +22: ; preds = %20 + %23 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %24 = atomicrmw sub ptr %23, i64 1 release, align 8 + %24 = icmp eq i64 %24, 1 + br i1 %24, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6" -25: ; preds = %22 - %26 = getelementptr inbounds nuw i8, ptr %.val4, i64 8 - %27 = atomicrmw sub ptr %26, i64 1 release, align 8 - %28 = icmp eq i64 %27, 1 - br i1 %28, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6" +25: ; preds = %2 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %.val4 = load ptr, ptr %26, align 8, !nonnull !4, !noundef !4 + %28 = icmp eq ptr %.val4, inttoptr (i64 -1 to ptr) + br i1 %28, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6", label %29 + +29: ; preds = %26 + %30 = getelementptr inbounds nuw i8, ptr %.val4, i64 8 + %31 = atomicrmw sub ptr %30, i64 1 release, align 8 + %32 = icmp eq i64 %31, 1 + br i1 %32, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split", label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6" -"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split": ; preds = %25, %18 - %.val4.sink = phi ptr [ %4, %18 ], [ %.val4, %25 ] +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split": ; preds = %29, %22 + %.val4.sink = phi ptr [ %4, %22 ], [ %.val4, %29 ] fence acquire tail call void @__rust_dealloc(ptr noundef nonnull %.val4.sink, i64 noundef 312, i64 noundef 8) #25 br label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6" -"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6": ; preds = %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split", %2, %25, %22, %18 +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6": ; preds = %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h0e34346e19ce3514E.exit6.sink.split", %29, %25, %22, %18 resume { ptr, i32 } %3 } diff --git a/bench/zed-rs/optimized/3xkvahxsem1hdyf3ef4aq8akj.ll b/bench/zed-rs/optimized/3xkvahxsem1hdyf3ef4aq8akj.ll index 31d93c7d4f8..1c678e1375c 100644 --- a/bench/zed-rs/optimized/3xkvahxsem1hdyf3ef4aq8akj.ll +++ b/bench/zed-rs/optimized/3xkvahxsem1hdyf3ef4aq8akj.ll @@ -68602,11 +68602,10 @@ define hidden void @"_ZN4core3ptr38drop_in_place$LT$lsp..Subscription$GT$17h53ec %16 = getelementptr inbounds nuw i8, ptr %0, i64 8 tail call void @llvm.experimental.noalias.scope.decl(metadata !25396) %17 = load ptr, ptr %16, align 8, !alias.scope !25396, !noundef !4 - %magicptr.i = ptrtoint ptr %17 to i64 - switch i64 %magicptr.i, label %18 [ - i64 0, label %"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h237e258bb3d67450E.llvm.148755494358810581.exit" - i64 -1, label %"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h237e258bb3d67450E.llvm.148755494358810581.exit" - ] + %18 = icmp eq ptr %17, null + %19 = icmp eq ptr %17, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %18, %19 + br i1 %or.cond.i, label %"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h237e258bb3d67450E.llvm.148755494358810581.exit", label %20 18: ; preds = %15 %19 = getelementptr inbounds nuw i8, ptr %17, i64 8 @@ -68619,7 +68618,7 @@ define hidden void @"_ZN4core3ptr38drop_in_place$LT$lsp..Subscription$GT$17h53ec tail call void @__rust_dealloc(ptr noundef nonnull %17, i64 noundef 56, i64 noundef 8) #29, !noalias !25399 br label %"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h237e258bb3d67450E.llvm.148755494358810581.exit" -"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h237e258bb3d67450E.llvm.148755494358810581.exit": ; preds = %22, %18, %15, %15, %14, %11, %7 +"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h237e258bb3d67450E.llvm.148755494358810581.exit": ; preds = %22, %18, %15, %14, %11, %7 ret void 23: ; preds = %2 @@ -70038,13 +70037,12 @@ define hidden void @"_ZN4core3ptr402drop_in_place$LT$async_std..io..copy..copy.. ; Function Attrs: nounwind nonlazybind uwtable define hidden void @"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17hbc29e3a3e2e58b74E.llvm.148755494358810581"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #6 { %2 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr = ptrtoint ptr %2 to i64 - switch i64 %magicptr, label %3 [ - i64 0, label %"_ZN4core3ptr375drop_in_place$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$17hc1cd8177946236beE.llvm.148755494358810581.exit" - i64 -1, label %"_ZN4core3ptr375drop_in_place$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$17hc1cd8177946236beE.llvm.148755494358810581.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %3, %4 + br i1 %or.cond, label %"_ZN4core3ptr375drop_in_place$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$17hc1cd8177946236beE.llvm.148755494358810581.exit", label %5 -"_ZN4core3ptr375drop_in_place$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$17hc1cd8177946236beE.llvm.148755494358810581.exit": ; preds = %1, %1, %7, %3 +"_ZN4core3ptr375drop_in_place$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$17hc1cd8177946236beE.llvm.148755494358810581.exit": ; preds = %9, %5, %1 ret void 3: ; preds = %1 diff --git a/bench/zed-rs/optimized/bqkhvme8kwgfmpydn1hdkle55.ll b/bench/zed-rs/optimized/bqkhvme8kwgfmpydn1hdkle55.ll index 79c7069d563..470fab7dfb5 100644 --- a/bench/zed-rs/optimized/bqkhvme8kwgfmpydn1hdkle55.ll +++ b/bench/zed-rs/optimized/bqkhvme8kwgfmpydn1hdkle55.ll @@ -1133,34 +1133,35 @@ define internal fastcc void @"_ZN4core3ptr62drop_in_place$LT$$u5b$client..Subscr 8: ; preds = %2 %9 = load ptr, ptr %3, align 8, !alias.scope !322, !noundef !12 - %magicptr = ptrtoint ptr %9 to i64 - switch i64 %magicptr, label %10 [ - i64 0, label %14 - i64 -1, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit" - ] + %.not1.i = icmp eq ptr %9, null + br i1 %.not1.i, label %16, label %10 10: ; preds = %8 - %11 = getelementptr inbounds nuw i8, ptr %9, i64 8 - %12 = atomicrmw sub ptr %11, i64 1 release, align 8, !noalias !325 - %13 = icmp eq i64 %12, 1 - br i1 %13, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i", label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit" + %11 = icmp eq ptr %9, inttoptr (i64 -1 to ptr) + br i1 %11, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit", label %12 -14: ; preds = %8 - %15 = getelementptr inbounds nuw i8, ptr %3, i64 8 +14: ; preds = %10 + %15 = getelementptr inbounds nuw i8, ptr %9, i64 8 + %14 = atomicrmw sub ptr %13, i64 1 release, align 8, !noalias !325 + %15 = icmp eq i64 %14, 1 + br i1 %15, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i", label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit" + +16: ; preds = %8 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 8 tail call void @llvm.experimental.noalias.scope.decl(metadata !330) tail call void @llvm.experimental.noalias.scope.decl(metadata !333) - %16 = load ptr, ptr %15, align 8, !alias.scope !336, !nonnull !12, !noundef !12 + %16 = load ptr, ptr %17, align 8, !alias.scope !336, !nonnull !12, !noundef !12 %17 = icmp eq ptr %16, inttoptr (i64 -1 to ptr) br i1 %17, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit", label %18 -18: ; preds = %14 +18: ; preds = %16 %19 = getelementptr inbounds nuw i8, ptr %16, i64 8 %20 = atomicrmw sub ptr %19, i64 1 release, align 8, !noalias !337 %21 = icmp eq i64 %20, 1 br i1 %21, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i", label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit" -"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i": ; preds = %18, %10 - %.sink.in.i = phi ptr [ %3, %10 ], [ %15, %18 ] +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i": ; preds = %18, %12 + %.sink.in.i = phi ptr [ %3, %12 ], [ %17, %20 ] fence acquire %.sink.i = load ptr, ptr %.sink.in.i, align 8, !alias.scope !322, !nonnull !12, !noundef !12 tail call void @__rust_dealloc(ptr noundef nonnull %.sink.i, i64 noundef 312, i64 noundef 8) #41, !noalias !12 @@ -1172,7 +1173,7 @@ define internal fastcc void @"_ZN4core3ptr62drop_in_place$LT$$u5b$client..Subscr tail call void @_ZN4core9panicking16panic_in_cleanup17hfa05ef7d5107e16aE() #49 unreachable -"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit": ; preds = %8, %10, %14, %18, %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i" +"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17hc94d2fdeb06a7ca6E.exit": ; preds = %10, %12, %16, %18, %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17h38724e38c1ff0be4E.llvm.17231173475946515404.exit.sink.split.i" %24 = icmp eq i64 %4, 2 br i1 %24, label %25, label %2 diff --git a/bench/zed-rs/optimized/dmgo8iibk9y4hcmil8p9yl5yt.ll b/bench/zed-rs/optimized/dmgo8iibk9y4hcmil8p9yl5yt.ll index 72f94f1f087..9aa4f782309 100644 --- a/bench/zed-rs/optimized/dmgo8iibk9y4hcmil8p9yl5yt.ll +++ b/bench/zed-rs/optimized/dmgo8iibk9y4hcmil8p9yl5yt.ll @@ -153,7 +153,7 @@ define hidden void @"_ZN44_$LT$C$u20$as$u20$gpui..BorrowAppContext$GT$13update_g cleanup %26 = getelementptr inbounds nuw i8, ptr %2, i64 8 invoke void @"_ZN4core3ptr45drop_in_place$LT$cpal..host..alsa..Stream$GT$17h4f102f01743cf700E.llvm.13778495326778027450"(ptr noalias noundef nonnull align 8 dereferenceable(40) %26) - to label %40 unwind label %27, !noalias !18 + to label %42 unwind label %27, !noalias !18 27: ; preds = %24 %28 = landingpad { ptr, i32 } @@ -171,24 +171,23 @@ define hidden void @"_ZN44_$LT$C$u20$as$u20$gpui..BorrowAppContext$GT$13update_g %30 = getelementptr inbounds nuw i8, ptr %5, i64 48 %31 = load ptr, ptr %30, align 8, !alias.scope !18, !noundef !4 store ptr null, ptr %30, align 8, !alias.scope !18 - %magicptr.i.i = ptrtoint ptr %31 to i64 - switch i64 %magicptr.i.i, label %32 [ - i64 0, label %37 - i64 -1, label %37 - ] - -32: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit.i" - %33 = getelementptr inbounds nuw i8, ptr %31, i64 8 - %34 = atomicrmw sub ptr %33, i64 1 release, align 8, !noalias !31 - %35 = icmp eq i64 %34, 1 - br i1 %35, label %36, label %37 - -36: ; preds = %32 + %32 = icmp eq ptr %31, null + %33 = icmp eq ptr %31, inttoptr (i64 -1 to ptr) + %or.cond.i.i = or i1 %32, %33 + br i1 %or.cond.i.i, label %37, label %34 + +34: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit.i" + %35 = getelementptr inbounds nuw i8, ptr %31, i64 8 + %36 = atomicrmw sub ptr %35, i64 1 release, align 8, !noalias !31 + %37 = icmp eq i64 %36, 1 + br i1 %37, label %38, label %39 + +38: ; preds = %34 fence acquire call void @__rust_dealloc(ptr noundef nonnull %31, i64 noundef 56, i64 noundef 8) #22, !noalias !31 br label %37 -37: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit.i", %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit.i", %32, %36 +37: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit.i", %34, %38 %38 = load ptr, ptr %3, align 8, !nonnull !4, !align !11, !noundef !4 %39 = load ptr, ptr %7, align 8, !nonnull !4, !align !5, !noundef !4 call void @_ZN4gpui3app10AppContext16end_global_lease17h8e8a05f785dfda7dE.llvm.1926931935225978806(ptr noalias noundef nonnull align 8 dereferenceable(1176) %0, ptr noundef nonnull align 1 %38, ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %39) @@ -198,7 +197,7 @@ define hidden void @"_ZN44_$LT$C$u20$as$u20$gpui..BorrowAppContext$GT$13update_g 40: ; preds = %16, %24 %.pn.ph = phi { ptr, i32 } [ %25, %24 ], [ %17, %16 ] invoke void @"_ZN4core3ptr69drop_in_place$LT$gpui..app..GlobalLease$LT$audio..GlobalAudio$GT$$GT$17ha3704f835c766bd1E"(ptr noalias noundef nonnull align 8 dereferenceable(16) %3) #23 - to label %43 unwind label %41 + to label %45 unwind label %41 41: ; preds = %40 %42 = landingpad { ptr, i32 } @@ -368,13 +367,12 @@ define hidden void @"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodi ; Function Attrs: nounwind nonlazybind uwtable define hidden void @"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #3 { %2 = load ptr, ptr %0, align 8, !noundef !4 - %magicptr = ptrtoint ptr %2 to i64 - switch i64 %magicptr, label %3 [ - i64 0, label %"_ZN4core3ptr54drop_in_place$LT$rodio..stream..OutputStreamHandle$GT$17h8545e75a6e256a88E.exit" - i64 -1, label %"_ZN4core3ptr54drop_in_place$LT$rodio..stream..OutputStreamHandle$GT$17h8545e75a6e256a88E.exit" - ] + %3 = icmp eq ptr %2, null + %4 = icmp eq ptr %2, inttoptr (i64 -1 to ptr) + %or.cond = or i1 %3, %4 + br i1 %or.cond, label %"_ZN4core3ptr54drop_in_place$LT$rodio..stream..OutputStreamHandle$GT$17h8545e75a6e256a88E.exit", label %5 -"_ZN4core3ptr54drop_in_place$LT$rodio..stream..OutputStreamHandle$GT$17h8545e75a6e256a88E.exit": ; preds = %1, %1, %7, %3 +"_ZN4core3ptr54drop_in_place$LT$rodio..stream..OutputStreamHandle$GT$17h8545e75a6e256a88E.exit": ; preds = %9, %5, %1 ret void 3: ; preds = %1 @@ -1369,24 +1367,23 @@ define hidden void @"_ZN5audio5Audio8end_call28_$u7b$$u7b$closure$u7d$$u7d$17hde %16 = getelementptr inbounds nuw i8, ptr %0, i64 48 %17 = load ptr, ptr %16, align 8, !noundef !4 store ptr null, ptr %16, align 8 - %magicptr.i = ptrtoint ptr %17 to i64 - switch i64 %magicptr.i, label %18 [ - i64 0, label %"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit" - i64 -1, label %"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit" - ] - -18: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit" - %19 = getelementptr inbounds nuw i8, ptr %17, i64 8 - %20 = atomicrmw sub ptr %19, i64 1 release, align 8, !noalias !350 - %21 = icmp eq i64 %20, 1 - br i1 %21, label %22, label %"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit" - -22: ; preds = %18 + %18 = icmp eq ptr %17, null + %19 = icmp eq ptr %17, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %18, %19 + br i1 %or.cond.i, label %"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit", label %20 + +20: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit" + %21 = getelementptr inbounds nuw i8, ptr %17, i64 8 + %22 = atomicrmw sub ptr %21, i64 1 release, align 8, !noalias !350 + %23 = icmp eq i64 %22, 1 + br i1 %23, label %24, label %"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit" + +24: ; preds = %20 fence acquire call void @__rust_dealloc(ptr noundef nonnull %17, i64 noundef 56, i64 noundef 8) #22, !noalias !350 br label %"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit" -"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit": ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit", %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit", %18, %22 +"_ZN4core3ptr82drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStreamHandle$GT$$GT$17h849a11e6d8f69bb7E.llvm.1926931935225978806.exit": ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$rodio..stream..OutputStream$GT$$GT$17h798fd8a187115bfcE.llvm.1926931935225978806.exit", %20, %24 ret void } diff --git a/bench/zed-rs/optimized/etkkpijil810uxaq6a1xhpkj9.ll b/bench/zed-rs/optimized/etkkpijil810uxaq6a1xhpkj9.ll index d114bb3f2b7..0e14239d4d8 100644 --- a/bench/zed-rs/optimized/etkkpijil810uxaq6a1xhpkj9.ll +++ b/bench/zed-rs/optimized/etkkpijil810uxaq6a1xhpkj9.ll @@ -50533,7 +50533,7 @@ define internal fastcc void @"_ZN4core3ptr69drop_in_place$LT$core..option..Optio %3 = icmp eq i64 %2, 0 br i1 %3, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit", label %4 -"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit": ; preds = %9, %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i", %19, %15, %11, %1 +"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit": ; preds = %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i", %19, %17, %15, %11, %1 ret void 4: ; preds = %1 @@ -50549,38 +50549,39 @@ define internal fastcc void @"_ZN4core3ptr69drop_in_place$LT$core..option..Optio %.idx.i = select i1 %.not.i, i64 8, i64 0 %8 = getelementptr inbounds nuw i8, ptr %5, i64 %.idx.i invoke void @"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590"(ptr noalias noundef nonnull align 8 dereferenceable(8) %8) #54 - to label %25 unwind label %23 + to label %27 unwind label %23 9: ; preds = %4 %10 = load ptr, ptr %5, align 8, !alias.scope !15195, !noundef !4 - %magicptr = ptrtoint ptr %10 to i64 - switch i64 %magicptr, label %11 [ - i64 0, label %15 - i64 -1, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit" - ] + %.not1.i = icmp eq ptr %10, null + br i1 %.not1.i, label %17, label %11 11: ; preds = %9 - %12 = getelementptr inbounds nuw i8, ptr %10, i64 8 - %13 = atomicrmw sub ptr %12, i64 1 release, align 8, !noalias !15198 - %14 = icmp eq i64 %13, 1 - br i1 %14, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i", label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit" + %12 = icmp eq ptr %10, inttoptr (i64 -1 to ptr) + br i1 %12, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit", label %13 -15: ; preds = %9 - %16 = getelementptr inbounds nuw i8, ptr %0, i64 16 +15: ; preds = %11 + %16 = getelementptr inbounds nuw i8, ptr %10, i64 8 + %15 = atomicrmw sub ptr %14, i64 1 release, align 8, !noalias !15198 + %16 = icmp eq i64 %15, 1 + br i1 %16, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i", label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit" + +17: ; preds = %9 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 16 tail call void @llvm.experimental.noalias.scope.decl(metadata !15203) tail call void @llvm.experimental.noalias.scope.decl(metadata !15206) - %17 = load ptr, ptr %16, align 8, !alias.scope !15209, !nonnull !4, !noundef !4 + %17 = load ptr, ptr %18, align 8, !alias.scope !15209, !nonnull !4, !noundef !4 %18 = icmp eq ptr %17, inttoptr (i64 -1 to ptr) br i1 %18, label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit", label %19 -19: ; preds = %15 +19: ; preds = %17 %20 = getelementptr inbounds nuw i8, ptr %17, i64 8 %21 = atomicrmw sub ptr %20, i64 1 release, align 8, !noalias !15210 %22 = icmp eq i64 %21, 1 br i1 %22, label %"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i", label %"_ZN4core3ptr41drop_in_place$LT$client..Subscription$GT$17h3d8b1099706c9194E.exit" -"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i": ; preds = %19, %11 - %.sink.in.i = phi ptr [ %5, %11 ], [ %16, %19 ] +"_ZN4core3ptr60drop_in_place$LT$alloc..sync..Weak$LT$client..Client$GT$$GT$17hc2e869e401f48a88E.llvm.13361645166614471590.exit.sink.split.i": ; preds = %19, %13 + %.sink.in.i = phi ptr [ %5, %13 ], [ %18, %21 ] fence acquire %.sink.i = load ptr, ptr %.sink.in.i, align 8, !alias.scope !15195, !nonnull !4, !noundef !4 tail call void @__rust_dealloc(ptr noundef nonnull %.sink.i, i64 noundef 312, i64 noundef 8) #47, !noalias !4 diff --git a/bench/zed-rs/optimized/etmluiftgqx5jpyivviyferrj.ll b/bench/zed-rs/optimized/etmluiftgqx5jpyivviyferrj.ll index f3b5c7786be..20e07b09c8d 100644 --- a/bench/zed-rs/optimized/etmluiftgqx5jpyivviyferrj.ll +++ b/bench/zed-rs/optimized/etmluiftgqx5jpyivviyferrj.ll @@ -17692,11 +17692,10 @@ define void @_ZN3lsp12Subscription6detach17h4730340805d8729dE(ptr noalias nounde %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 tail call void @llvm.experimental.noalias.scope.decl(metadata !3853) %14 = load ptr, ptr %13, align 8, !alias.scope !3853, !noundef !4 - %magicptr.i = ptrtoint ptr %14 to i64 - switch i64 %magicptr.i, label %15 [ - i64 0, label %"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h0f4620c69942a9eaE.exit" - i64 -1, label %"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h0f4620c69942a9eaE.exit" - ] + %15 = icmp eq ptr %14, null + %16 = icmp eq ptr %14, inttoptr (i64 -1 to ptr) + %or.cond.i = or i1 %15, %16 + br i1 %or.cond.i, label %"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h0f4620c69942a9eaE.exit", label %17 15: ; preds = %12 %16 = getelementptr inbounds nuw i8, ptr %14, i64 8 @@ -17722,7 +17721,7 @@ define void @_ZN3lsp12Subscription6detach17h4730340805d8729dE(ptr noalias nounde 22: ; preds = %"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h0f4620c69942a9eaE.exit", %"_ZN4core3ptr498drop_in_place$LT$core..option..Option$LT$alloc..sync..Arc$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$$RF$str$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$core..option..Option$LT$lsp..RequestId$GT$$C$serde_json..value..Value$C$gpui..app..async_context..AsyncAppContext$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17hd490c65169ec1627E.exit" ret void -"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h0f4620c69942a9eaE.exit": ; preds = %19, %15, %12, %12 +"_ZN4core3ptr403drop_in_place$LT$core..option..Option$LT$alloc..sync..Weak$LT$lock_api..mutex..Mutex$LT$parking_lot..raw_mutex..RawMutex$C$std..collections..hash..map..HashMap$LT$i32$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$lsp..IoKind$C$$RF$str$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$C$core..hash..BuildHasherDefault$LT$rustc_hash..FxHasher$GT$$GT$$GT$$GT$$GT$$GT$17h0f4620c69942a9eaE.exit": ; preds = %19, %15, %12 store ptr null, ptr %13, align 8 br label %22 } diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..f42f8a7ac16 100755 --- a/scripts/setup_pre_commit_patch.sh +++ b/scripts/setup_pre_commit_patch.sh @@ -2,7 +2,7 @@ set -euo pipefail shopt -s inherit_errexit -export GITHUB_PATCH_ID="/llvm-project/commit/" +export GITHUB_PATCH_ID=llvm/llvm-project/pull/159583 export COMPTIME_MODE=0 # Please rebase manually