diff --git a/bench/abc/optimized/cuddZddLin.ll b/bench/abc/optimized/cuddZddLin.ll index 3aa46b8c9ed..a2c0642925a 100644 --- a/bench/abc/optimized/cuddZddLin.ll +++ b/bench/abc/optimized/cuddZddLin.ll @@ -1012,13 +1012,13 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br i1 %exitcond439.not, label %.preheader357, label %.lr.ph381, !llvm.loop !69 .preheader355: ; preds = %.lr.ph385, %.preheader357 - %.0320.lcssa = phi i32 [ %27, %.preheader357 ], [ %107, %.lr.ph385 ] + %.0320.lcssa = phi i32 [ %27, %.preheader357 ], [ %100, %.lr.ph385 ] %.not338399 = icmp eq ptr %.0299.lcssa, null br i1 %.not338399, label %.preheader, label %.lr.ph403 .lr.ph385: ; preds = %.preheader357, %.lr.ph385 %.2315384 = phi ptr [ %69, %.lr.ph385 ], [ %.0.lcssa, %.preheader357 ] - %.0320383 = phi i32 [ %107, %.lr.ph385 ], [ %27, %.preheader357 ] + %.0320383 = phi i32 [ %100, %.lr.ph385 ], [ %27, %.preheader357 ] %68 = getelementptr inbounds nuw i8, ptr %.2315384, i64 8 %69 = load ptr, ptr %68, align 8, !tbaa !48 %70 = getelementptr inbounds nuw i8, ptr %.2315384, i64 16 @@ -1042,29 +1042,24 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, %84 = inttoptr i64 %83 to ptr %85 = getelementptr inbounds nuw i8, ptr %84, i64 32 %86 = load i64, ptr %85, align 8, !tbaa !70 - %87 = shl i64 %86, 1 - %88 = and i64 %82, 1 - %89 = or disjoint i64 %87, %88 - %90 = trunc i64 %89 to i32 - %91 = mul i32 %90, 12582917 - %92 = ptrtoint ptr %78 to i64 - %93 = and i64 %92, -2 - %94 = inttoptr i64 %93 to ptr - %95 = getelementptr inbounds nuw i8, ptr %94, i64 32 - %96 = load i64, ptr %95, align 8, !tbaa !70 - %97 = shl i64 %96, 1 - %98 = and i64 %92, 1 - %99 = or disjoint i64 %97, %98 - %100 = trunc i64 %99 to i32 - %101 = add i32 %91, %100 - %102 = mul i32 %101, 4256249 - %103 = lshr i32 %102, %31 - %104 = sext i32 %103 to i64 - %105 = getelementptr inbounds ptr, ptr %25, i64 %104 - %106 = load ptr, ptr %105, align 8, !tbaa !25 - store ptr %106, ptr %68, align 8, !tbaa !48 - store ptr %.2315384, ptr %105, align 8, !tbaa !25 - %107 = add nsw i32 %.0320383, 1 + %.tr = trunc i64 %86 to i32 + %87 = mul i32 %.tr, 25165834 + %88 = ptrtoint ptr %78 to i64 + %89 = and i64 %88, -2 + %90 = inttoptr i64 %89 to ptr + %91 = getelementptr inbounds nuw i8, ptr %90, i64 32 + %92 = load i64, ptr %91, align 8, !tbaa !70 + %.tr472 = trunc i64 %92 to i32 + %93 = shl i32 %.tr472, 1 + %94 = add i32 %87, %93 + %95 = mul i32 %94, 4256249 + %96 = lshr i32 %95, %31 + %97 = sext i32 %96 to i64 + %98 = getelementptr inbounds ptr, ptr %25, i64 %97 + %99 = load ptr, ptr %98, align 8, !tbaa !25 + store ptr %99, ptr %68, align 8, !tbaa !48 + store ptr %.2315384, ptr %98, align 8, !tbaa !25 + %100 = add nsw i32 %.0320383, 1 %.not = icmp eq ptr %69, null br i1 %.not, label %.preheader355, label %.lr.ph385, !llvm.loop !71 @@ -1085,46 +1080,46 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, %109 = getelementptr inbounds nuw i8, ptr %.3316402, i64 8 %110 = load ptr, ptr %109, align 8, !tbaa !48 %111 = getelementptr inbounds nuw i8, ptr %.3316402, i64 16 + %105 = load ptr, ptr %104, align 8, !tbaa !64 + %106 = load i32, ptr %105, align 8, !tbaa !65 + %107 = icmp eq i32 %106, %23 + %108 = icmp eq i32 %106, %10 + %or.cond347 = select i1 %107, i1 true, i1 %108 + br i1 %or.cond347, label %109, label %113 + +109: ; preds = %.lr.ph403 + %110 = getelementptr inbounds nuw i8, ptr %105, i64 16 + %111 = getelementptr inbounds nuw i8, ptr %105, i64 24 %112 = load ptr, ptr %111, align 8, !tbaa !64 - %113 = load i32, ptr %112, align 8, !tbaa !65 - %114 = icmp eq i32 %113, %23 - %115 = icmp eq i32 %113, %10 - %or.cond347 = select i1 %114, i1 true, i1 %115 - br i1 %or.cond347, label %116, label %120 - -116: ; preds = %.lr.ph403 - %117 = getelementptr inbounds nuw i8, ptr %112, i64 16 - %118 = getelementptr inbounds nuw i8, ptr %112, i64 24 - %119 = load ptr, ptr %118, align 8, !tbaa !64 - br label %120 - -120: ; preds = %.lr.ph403, %116 - %.0312.in = phi ptr [ %117, %116 ], [ @empty, %.lr.ph403 ] - %.0311 = phi ptr [ %119, %116 ], [ %112, %.lr.ph403 ] + br label %113 + +113:; preds = %.lr.ph403, %109 + %.0312.in = phi ptr [ %110, %109 ], [ @empty, %.lr.ph403 ] + %.0311 = phi ptr [ %112, %109 ], [ %105, %.lr.ph403 ] %.0312 = load ptr, ptr %.0312.in, align 8, !tbaa !64 %121 = getelementptr inbounds nuw i8, ptr %.3316402, i64 24 + %115 = load ptr, ptr %114, align 8, !tbaa !64 + %116 = load i32, ptr %115, align 8, !tbaa !65 + %117 = icmp eq i32 %116, %23 + %118 = icmp eq i32 %116, %10 + %or.cond348 = select i1 %117, i1 true, i1 %118 + br i1 %or.cond348, label %119, label %123 + +119: ; preds = %113 + %120 = getelementptr inbounds nuw i8, ptr %115, i64 16 + %121 = getelementptr inbounds nuw i8, ptr %115, i64 24 %122 = load ptr, ptr %121, align 8, !tbaa !64 - %123 = load i32, ptr %122, align 8, !tbaa !65 - %124 = icmp eq i32 %123, %23 - %125 = icmp eq i32 %123, %10 - %or.cond348 = select i1 %124, i1 true, i1 %125 - br i1 %or.cond348, label %126, label %130 - -126: ; preds = %120 - %127 = getelementptr inbounds nuw i8, ptr %122, i64 16 - %128 = getelementptr inbounds nuw i8, ptr %122, i64 24 - %129 = load ptr, ptr %128, align 8, !tbaa !64 - br label %130 - -130: ; preds = %120, %126 - %.0310.in = phi ptr [ %127, %126 ], [ @empty, %120 ] - %.0309 = phi ptr [ %129, %126 ], [ %122, %120 ] + br label %123 + +123:; preds = %113, %119 + %.0310.in = phi ptr [ %120, %119 ], [ @empty, %113 ] + %.0309 = phi ptr [ %122, %119 ], [ %115, %113 ] %.0310 = load ptr, ptr %.0310.in, align 8, !tbaa !64 %131 = load ptr, ptr @empty, align 8, !tbaa !25 %132 = icmp eq ptr %.0310, %131 br i1 %132, label %.loopexit466, label %133 -133: ; preds = %130 +133: ; preds = %123 %134 = ptrtoint ptr %.0310 to i64 %135 = and i64 %134, -2 %136 = inttoptr i64 %135 to ptr @@ -1154,7 +1149,7 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br i1 %cond388, label %._crit_edge392, label %.lr.ph391 .lr.ph391: ; preds = %133, %168 - %.1306389 = phi ptr [ %.1306, %168 ], [ %.1306387, %133 ] + %.1306389 = phi ptr [ %.1306, %161 ], [ %.1306387, %126 ] %158 = getelementptr inbounds nuw i8, ptr %.1306389, i64 16 %159 = load ptr, ptr %158, align 8, !tbaa !64 %160 = icmp eq ptr %159, %.0310 @@ -1201,10 +1196,10 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, store i32 %181, ptr %179, align 4, !tbaa !47 br label %.loopexit466 -.loopexit466: ; preds = %165, %130, %172 - %.1306389.lcssa.sink = phi ptr [ %.0311, %172 ], [ %.0311, %130 ], [ %.1306389, %165 ] - %.2322 = phi i32 [ %176, %172 ], [ %.1321401, %130 ], [ %.1321401, %165 ] - %.0305 = phi ptr [ %170, %172 ], [ %.0311, %130 ], [ %.1306389, %165 ] +.loopexit466: ; preds = %165, %123, %172 + %.1306389.lcssa.sink = phi ptr [ %.0311, %165 ], [ %.0311, %123 ], [ %.1306389, %158 ] + %.2322 = phi i32 [ %176, %165 ], [ %.1321401, %123 ], [ %.1321401, %158 ] + %.0305 = phi ptr [ %170, %165 ], [ %.0311, %123 ], [ %.1306389, %158 ] %182 = getelementptr inbounds nuw i8, ptr %.1306389.lcssa.sink, i64 4 %183 = load i32, ptr %182, align 4, !tbaa !47 %184 = add i32 %183, 1 @@ -1244,7 +1239,7 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br i1 %cond351394, label %._crit_edge398, label %.lr.ph397 .lr.ph397: ; preds = %187, %222 - %.1304395 = phi ptr [ %.1304, %222 ], [ %.1304393, %187 ] + %.1304395 = phi ptr [ %.1304, %215 ], [ %.1304393, %180 ] %212 = getelementptr inbounds nuw i8, ptr %.1304395, i64 16 %213 = load ptr, ptr %212, align 8, !tbaa !64 %214 = icmp eq ptr %213, %.0312 @@ -1292,9 +1287,9 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br label %.loopexit465 .loopexit465: ; preds = %219, %.loopexit466, %226 - %.1304395.lcssa.sink = phi ptr [ %.0309, %226 ], [ %.0309, %.loopexit466 ], [ %.1304395, %219 ] - %.3323 = phi i32 [ %230, %226 ], [ %.2322, %.loopexit466 ], [ %.2322, %219 ] - %.0303 = phi ptr [ %224, %226 ], [ %.0309, %.loopexit466 ], [ %.1304395, %219 ] + %.1304395.lcssa.sink = phi ptr [ %.0309, %219 ], [ %.0309, %.loopexit466 ], [ %.1304395, %212 ] + %.3323 = phi i32 [ %230, %219 ], [ %.2322, %.loopexit466 ], [ %.2322, %212 ] + %.0303 = phi ptr [ %224, %219 ], [ %.0309, %.loopexit466 ], [ %.1304395, %212 ] %236 = getelementptr inbounds nuw i8, ptr %.1304395.lcssa.sink, i64 4 %237 = load i32, ptr %236, align 4, !tbaa !47 %238 = add i32 %237, 1 @@ -1341,10 +1336,10 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br i1 %.not339412, label %._crit_edge419, label %.lr.ph418 .lr.ph418: ; preds = %265, %392 - %.0295416 = phi ptr [ %.1296, %392 ], [ null, %265 ] - %.4415 = phi ptr [ %269, %392 ], [ %267, %265 ] - %.5414 = phi i32 [ %.6, %392 ], [ %.4324423, %265 ] - %.2327413 = phi i32 [ %.3328, %392 ], [ %.1326422, %265 ] + %.0295416 = phi ptr [ %.1296, %381 ], [ null, %258 ] + %.4415 = phi ptr [ %269, %381 ], [ %267, %258 ] + %.5414 = phi i32 [ %.6, %381 ], [ %.4324423, %258 ] + %.2327413 = phi i32 [ %.3328, %381 ], [ %.1326422, %258 ] %268 = getelementptr inbounds nuw i8, ptr %.4415, i64 8 %269 = load ptr, ptr %268, align 8, !tbaa !48 %270 = getelementptr inbounds nuw i8, ptr %.4415, i64 4 @@ -1407,6 +1402,14 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, %303 = add i32 %302, -1 store i32 %303, ptr %301, align 4, !tbaa !47 %304 = ptrtoint ptr %300 to i64 + %298 = and i64 %297, -2 + %299 = inttoptr i64 %298 to ptr + %300 = getelementptr inbounds nuw i8, ptr %299, i64 32 + %301 = load i64, ptr %300, align 8, !tbaa !70 + %.tr473 = trunc i64 %301 to i32 + %302 = mul i32 %.tr473, 25165834 + %303 = load ptr, ptr @empty, align 8, !tbaa !25 + %304 = ptrtoint ptr %303 to i64 %305 = and i64 %304, -2 %306 = inttoptr i64 %305 to ptr %307 = getelementptr inbounds nuw i8, ptr %306, i64 32 @@ -1415,28 +1418,17 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, %310 = and i64 %304, 1 %311 = or disjoint i64 %309, %310 %312 = trunc i64 %311 to i32 - %313 = mul i32 %312, 12582917 - %314 = load ptr, ptr @empty, align 8, !tbaa !25 - %315 = ptrtoint ptr %314 to i64 - %316 = and i64 %315, -2 - %317 = inttoptr i64 %316 to ptr - %318 = getelementptr inbounds nuw i8, ptr %317, i64 32 - %319 = load i64, ptr %318, align 8, !tbaa !70 - %320 = shl i64 %319, 1 - %321 = and i64 %315, 1 - %322 = or disjoint i64 %320, %321 - %323 = trunc i64 %322 to i32 - %324 = add i32 %313, %323 - %325 = mul i32 %324, 4256249 - %326 = lshr i32 %325, %31 - %327 = sext i32 %326 to i64 - %328 = getelementptr inbounds ptr, ptr %25, i64 %327 - %.2307406 = load ptr, ptr %328, align 8, !tbaa !25 + %313 = add i32 %302, %312 + %314 = mul i32 %313, 4256249 + %315 = lshr i32 %314, %31 + %316 = sext i32 %315 to i64 + %317 = getelementptr inbounds ptr, ptr %25, i64 %316 + %.2307406 = load ptr, ptr %317, align 8, !tbaa !25 %cond352407 = icmp eq ptr %.2307406, null br i1 %cond352407, label %._crit_edge411, label %.lr.ph410 .lr.ph410: ; preds = %298, %344 - %.2307408 = phi ptr [ %.2307, %344 ], [ %.2307406, %298 ] + %.2307408 = phi ptr [ %.2307, %333 ], [ %.2307406, %291 ] %329 = getelementptr inbounds nuw i8, ptr %.2307408, i64 16 %330 = load ptr, ptr %329, align 8, !tbaa !64 %331 = icmp eq ptr %330, %300 @@ -1445,7 +1437,7 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, 332: ; preds = %.lr.ph410 %333 = getelementptr inbounds nuw i8, ptr %.2307408, i64 24 %334 = load ptr, ptr %333, align 8, !tbaa !64 - %335 = icmp eq ptr %334, %314 + %335 = icmp eq ptr %334, %303 br i1 %335, label %336, label %344 336: ; preds = %332 @@ -1481,11 +1473,11 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, %351 = load ptr, ptr @empty, align 8, !tbaa !25 %352 = getelementptr inbounds nuw i8, ptr %346, i64 24 store ptr %351, ptr %352, align 8, !tbaa !64 - %353 = load ptr, ptr %328, align 8, !tbaa !25 + %353 = load ptr, ptr %317, align 8, !tbaa !25 %354 = getelementptr inbounds nuw i8, ptr %346, i64 8 store ptr %353, ptr %354, align 8, !tbaa !48 - store ptr %346, ptr %328, align 8, !tbaa !25 - %355 = zext i32 %326 to i64 + store ptr %346, ptr %317, align 8, !tbaa !25 + %355 = zext i32 %315 to i64 %356 = icmp eq i64 %indvars.iv440, %355 %or.cond = and i1 %294, %356 %spec.select = select i1 %or.cond, ptr %346, ptr %.0295416 @@ -1500,9 +1492,9 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br label %363 363: ; preds = %339, %348 - %.7 = phi i32 [ %.5414, %348 ], [ %343, %339 ] - %.3308 = phi ptr [ %346, %348 ], [ %.2307408, %339 ] - %.2297 = phi ptr [ %spec.select, %348 ], [ %.0295416, %339 ] + %.7 = phi i32 [ %.5414, %337 ], [ %343, %328 ] + %.3308 = phi ptr [ %346, %337 ], [ %.2307408, %328 ] + %.2297 = phi ptr [ %spec.select, %337 ], [ %.0295416, %328 ] store ptr %.3308, ptr %299, align 8, !tbaa !64 %364 = getelementptr inbounds nuw i8, ptr %.4415, i64 24 %365 = load ptr, ptr %364, align 8, !tbaa !64 @@ -1537,15 +1529,15 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br label %392 392: ; preds = %290, %363, %287, %288 - %.3328 = phi i32 [ %.2327413, %287 ], [ %.2327413, %288 ], [ %388, %363 ], [ %.2327413, %290 ] - %.6 = phi i32 [ %285, %287 ], [ %285, %288 ], [ %.7, %363 ], [ %.5414, %290 ] - %.1296 = phi ptr [ null, %287 ], [ %.0295416, %288 ], [ %.2297, %363 ], [ %.4415, %290 ] + %.3328 = phi i32 [ %.2327413, %280 ], [ %.2327413, %281 ], [ %388, %352 ], [ %.2327413, %283 ] + %.6 = phi i32 [ %285, %280 ], [ %285, %281 ], [ %.7, %352 ], [ %.5414, %283 ] + %.1296 = phi ptr [ null, %280 ], [ %.0295416, %281 ], [ %.2297, %352 ], [ %.4415, %283 ] %.not339 = icmp eq ptr %269, null br i1 %.not339, label %._crit_edge419, label %.lr.ph418, !llvm.loop !76 ._crit_edge419: ; preds = %392, %265 - %.2327.lcssa = phi i32 [ %.1326422, %265 ], [ %.3328, %392 ] - %.5.lcssa = phi i32 [ %.4324423, %265 ], [ %.6, %392 ] + %.2327.lcssa = phi i32 [ %.1326422, %258 ], [ %.3328, %381 ] + %.5.lcssa = phi i32 [ %.4324423, %258 ], [ %.6, %381 ] %indvars.iv.next441 = add nuw nsw i64 %indvars.iv440, 1 %exitcond444.not = icmp eq i64 %indvars.iv.next441, %wide.trip.count443 br i1 %exitcond444.not, label %._crit_edge426, label %265, !llvm.loop !77 @@ -1558,23 +1550,23 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, %395 = getelementptr inbounds nuw i8, ptr %394, i64 16 store i32 %.1326.lcssa, ptr %395, align 8, !tbaa !31 %396 = getelementptr inbounds %struct.DdSubtable, ptr %393, i64 %21 + %386 = getelementptr inbounds nuw i8, ptr %385, i64 16 + store i32 %.4324.lcssa, ptr %386, align 8, !tbaa !31 + %387 = add i32 %27, %16 + %388 = getelementptr inbounds nuw i8, ptr %0, i64 232 + %389 = load i32, ptr %388, align 8, !tbaa !36 + %390 = sub i32 %.1326.lcssa, %387 + %391 = add i32 %390, %.4324.lcssa + %392 = add i32 %391, %389 + store i32 %392, ptr %388, align 8, !tbaa !36 + %393 = getelementptr inbounds nuw i8, ptr %0, i64 360 + %394 = load ptr, ptr %393, align 8, !tbaa !78 + %395 = getelementptr inbounds ptr, ptr %394, i64 %8 + %396 = load ptr, ptr %395, align 8, !tbaa !25 %397 = getelementptr inbounds nuw i8, ptr %396, i64 16 - store i32 %.4324.lcssa, ptr %397, align 8, !tbaa !31 - %398 = add i32 %27, %16 - %399 = getelementptr inbounds nuw i8, ptr %0, i64 232 - %400 = load i32, ptr %399, align 8, !tbaa !36 - %401 = sub i32 %.1326.lcssa, %398 - %402 = add i32 %401, %.4324.lcssa - %403 = add i32 %402, %400 - store i32 %403, ptr %399, align 8, !tbaa !36 - %404 = getelementptr inbounds nuw i8, ptr %0, i64 360 - %405 = load ptr, ptr %404, align 8, !tbaa !78 - %406 = getelementptr inbounds ptr, ptr %405, i64 %8 - %407 = load ptr, ptr %406, align 8, !tbaa !25 - %408 = getelementptr inbounds nuw i8, ptr %407, i64 16 - %409 = load ptr, ptr %408, align 8, !tbaa !64 - %410 = getelementptr inbounds ptr, ptr %405, i64 %21 - store ptr %409, ptr %410, align 8, !tbaa !25 + %398 = load ptr, ptr %397, align 8, !tbaa !64 + %399 = getelementptr inbounds ptr, ptr %394, i64 %21 + store ptr %398, ptr %399, align 8, !tbaa !25 br label %414 .loopexit: ; preds = %._crit_edge398, %._crit_edge392, %._crit_edge411 @@ -1584,7 +1576,7 @@ define internal fastcc i32 @cuddZddLinearInPlace(ptr noundef %0, i32 noundef %1, br label %414 414: ; preds = %.loopexit, %._crit_edge426 - %.0329 = phi i32 [ 0, %.loopexit ], [ %403, %._crit_edge426 ] + %.0329 = phi i32 [ 0, %.loopexit ], [ %392, %._crit_edge426 ] ret i32 %.0329 } diff --git a/bench/lean4/optimized/AndFlatten.ll b/bench/lean4/optimized/AndFlatten.ll index ab20e4f613b..5555dc308a9 100644 --- a/bench/lean4/optimized/AndFlatten.ll +++ b/bench/lean4/optimized/AndFlatten.ll @@ -13070,56 +13070,44 @@ lean_alloc_closure.exit: ; preds = %7 define ptr @l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_BVDecide_Frontend_Normalize_andFlatteningPass_processGoal___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #1 { %11 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %11, align 8, !tbaa !12 - %12 = ptrtoint ptr %1 to i64 - %13 = and i64 %12, 1 - %.not = icmp eq i64 %13, 0 - br i1 %.not, label %14, label %lean_dec.exit16 + %12 = load i32, ptr %1, align 8, !tbaa !4 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 14: ; preds = %10 - %15 = load i32, ptr %1, align 4, !tbaa !4 - %16 = icmp sgt i32 %15, 1 - br i1 %16, label %17, label %19, !prof !11 - -17: ; preds = %14 - %18 = add nsw i32 %15, -1 - store i32 %18, ptr %1, align 4, !tbaa !4 + %15 = add nsw i32 %12, -1 + store i32 %15, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit16 -19: ; preds = %14 - %.not.i = icmp eq i32 %15, 0 +19: ; preds = %10 + %.not.i = icmp eq i32 %12, 0 br i1 %.not.i, label %lean_dec.exit16, label %20 20: ; preds = %19 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit16 -lean_dec.exit16: ; preds = %20, %19, %17, %10 +lean_dec.exit16: ; preds = %20, %19, %14 %21 = getelementptr i8, ptr %2, i64 8 %.val21 = load i64, ptr %21, align 8, !tbaa !12 - %22 = ptrtoint ptr %2 to i64 - %23 = and i64 %22, 1 - %.not22 = icmp eq i64 %23, 0 - br i1 %.not22, label %24, label %lean_dec.exit15 - -24: ; preds = %lean_dec.exit16 - %25 = load i32, ptr %2, align 4, !tbaa !4 - %26 = icmp sgt i32 %25, 1 - br i1 %26, label %27, label %29, !prof !11 + %19 = load i32, ptr %2, align 8, !tbaa !4 + %20 = icmp sgt i32 %19, 1 + br i1 %20, label %21, label %23, !prof !11 -27: ; preds = %24 - %28 = add nsw i32 %25, -1 +27: ; preds = %lean_dec.exit16 + %28 = add nsw i32 %19, -1 store i32 %28, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit15 -29: ; preds = %24 - %.not.i17 = icmp eq i32 %25, 0 +29: ; preds = %lean_dec.exit16 + %.not.i17 = icmp eq i32 %19, 0 br i1 %.not.i17, label %lean_dec.exit15, label %30 30: ; preds = %29 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit15 -lean_dec.exit15: ; preds = %30, %29, %27, %lean_dec.exit16 +lean_dec.exit15: ; preds = %30, %29, %21 %31 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_BVDecide_Frontend_Normalize_andFlatteningPass_processGoal___spec__1(ptr noundef %0, i64 noundef %.val, i64 noundef %.val21, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) %32 = ptrtoint ptr %0 to i64 %33 = and i64 %32, 1 diff --git a/bench/lean4/optimized/Assumption.ll b/bench/lean4/optimized/Assumption.ll index c905357cc9d..8ce1f9c6902 100644 --- a/bench/lean4/optimized/Assumption.ll +++ b/bench/lean4/optimized/Assumption.ll @@ -6169,30 +6169,24 @@ define ptr @l_Lean_LocalContext_findDeclRevM_x3f___at_Lean_Meta_findLocalDeclWit %8 = getelementptr inbounds nuw i8, ptr %1, i64 16 %9 = load ptr, ptr %8, align 8, !tbaa !11 %10 = tail call ptr @l_Lean_PersistentArray_findSomeRevM_x3f___at_Lean_Meta_findLocalDeclWithType_x3f___spec__2(ptr noundef %0, ptr noundef %9, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) - %11 = ptrtoint ptr %1 to i64 - %12 = and i64 %11, 1 - %.not = icmp eq i64 %12, 0 - br i1 %.not, label %13, label %lean_dec.exit + %11 = load i32, ptr %1, align 8, !tbaa !5 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !10 13: ; preds = %7 - %14 = load i32, ptr %1, align 4, !tbaa !5 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !10 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %1, align 4, !tbaa !5 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %1, align 4, !tbaa !5 br label %lean_dec.exit -18: ; preds = %13 - %.not.i = icmp eq i32 %14, 0 +18: ; preds = %7 + %.not.i = icmp eq i32 %11, 0 br i1 %.not.i, label %lean_dec.exit, label %19 19: ; preds = %18 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %19, %18, %16, %7 +lean_dec.exit: ; preds = %19, %18, %13 ret ptr %10 } diff --git a/bench/lean4/optimized/Attach.ll b/bench/lean4/optimized/Attach.ll index 046da890f73..200ff5c5c01 100644 --- a/bench/lean4/optimized/Attach.ll +++ b/bench/lean4/optimized/Attach.ll @@ -205,56 +205,44 @@ lean_alloc_closure.exit: ; preds = %3 define ptr @l_Array_mapMUnsafe_map___at_Vector_pmap___spec__1___rarg___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 { %5 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !14 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit8 + %6 = load i32, ptr %1, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !9 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !9 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit8 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit8, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit8 -lean_dec.exit8: ; preds = %14, %13, %11, %4 +lean_dec.exit8: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %2, i64 8 %.val11 = load i64, ptr %15, align 8, !tbaa !14 - %16 = ptrtoint ptr %2 to i64 - %17 = and i64 %16, 1 - %.not12 = icmp eq i64 %17, 0 - br i1 %.not12, label %18, label %lean_dec.exit - -18: ; preds = %lean_dec.exit8 - %19 = load i32, ptr %2, align 4, !tbaa !4 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !9 - -21: ; preds = %18 - %22 = add nsw i32 %19, -1 - store i32 %22, ptr %2, align 4, !tbaa !4 + %13 = load i32, ptr %2, align 8, !tbaa !4 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !9 + +15: ; preds = %lean_dec.exit8 + %16 = add nsw i32 %13, -1 + store i32 %16, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit -23: ; preds = %18 - %.not.i9 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit8 + %.not.i9 = icmp eq i32 %13, 0 br i1 %.not.i9, label %lean_dec.exit, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %24, %23, %21, %lean_dec.exit8 +lean_dec.exit: ; preds = %24, %23, %15 %25 = tail call ptr @l_Array_mapMUnsafe_map___at_Vector_pmap___spec__1___rarg(ptr noundef %0, i64 noundef %.val, i64 noundef %.val11, ptr noundef %3) ret ptr %25 } @@ -835,56 +823,44 @@ lean_alloc_closure.exit: ; preds = %3 define ptr @l_Array_mapMUnsafe_map___at___private_Init_Data_Vector_Attach_0__Vector_pmapImpl___spec__1___rarg___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 { %5 = getelementptr i8, ptr %1, i64 8 %.val11 = load i64, ptr %5, align 8, !tbaa !14 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit8 + %6 = load i32, ptr %1, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !9 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !9 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit8 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit8, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit8 -lean_dec.exit8: ; preds = %14, %13, %11, %4 +lean_dec.exit8: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %15, align 8, !tbaa !14 - %16 = ptrtoint ptr %2 to i64 - %17 = and i64 %16, 1 - %.not12 = icmp eq i64 %17, 0 - br i1 %.not12, label %18, label %lean_dec.exit - -18: ; preds = %lean_dec.exit8 - %19 = load i32, ptr %2, align 4, !tbaa !4 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !9 - -21: ; preds = %18 - %22 = add nsw i32 %19, -1 - store i32 %22, ptr %2, align 4, !tbaa !4 + %13 = load i32, ptr %2, align 8, !tbaa !4 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !9 + +15: ; preds = %lean_dec.exit8 + %16 = add nsw i32 %13, -1 + store i32 %16, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit -23: ; preds = %18 - %.not.i9 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit8 + %.not.i9 = icmp eq i32 %13, 0 br i1 %.not.i9, label %lean_dec.exit, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %24, %23, %21, %lean_dec.exit8 +lean_dec.exit: ; preds = %24, %23, %15 %25 = tail call ptr @l_Array_mapMUnsafe_map___at___private_Init_Data_Vector_Attach_0__Vector_pmapImpl___spec__1___rarg(ptr noundef %0, i64 noundef %.val11, i64 noundef %.val, ptr noundef %3) ret ptr %25 } @@ -1120,56 +1096,44 @@ lean_alloc_closure.exit: ; preds = %2 define ptr @l_Array_mapMUnsafe_map___at_Vector_unattach___spec__1___rarg___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val10 = load i64, ptr %4, align 8, !tbaa !14 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !9 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !9 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %14, align 8, !tbaa !14 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !4 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !9 - -20: ; preds = %17 - %21 = add nsw i32 %18, -1 - store i32 %21, ptr %1, align 4, !tbaa !4 + %15 = load i32, ptr %1, align 8, !tbaa !4 + %13 = icmp sgt i32 %15, 1 + br i1 %13, label %14, label %16, !prof !9 + +14: ; preds = %lean_dec.exit7 + %15 = add nsw i32 %12, -1 + store i32 %15, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %14 %24 = tail call ptr @l_Array_mapMUnsafe_map___at_Vector_unattach___spec__1___rarg(i64 noundef %.val10, i64 noundef %.val, ptr noundef %2) ret ptr %24 } diff --git a/bench/lean4/optimized/AutoBound.ll b/bench/lean4/optimized/AutoBound.ll index c961dfdcfe6..5241c6f97ad 100644 --- a/bench/lean4/optimized/AutoBound.ll +++ b/bench/lean4/optimized/AutoBound.ll @@ -774,22 +774,16 @@ lean_inc.exit24: %2 = shl i64 %.val, 1 %3 = add i64 %2, -1 %4 = inttoptr i64 %3 to ptr - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_inc.exit - -7: ; preds = %lean_inc.exit24 - %.val.i35 = load i32, ptr %0, align 4, !tbaa !10 - %8 = icmp sgt i32 %.val.i35, 0 - br i1 %8, label %9, label %11, !prof !14 + %.val.i35 = load i32, ptr %0, align 8, !tbaa !10 + %5 = icmp sgt i32 %.val.i35, 0 + br i1 %5, label %6, label %8, !prof !14 -9: ; preds = %7 +9: ; preds = %lean_inc.exit24 %10 = add nuw i32 %.val.i35, 1 store i32 %10, ptr %0, align 4, !tbaa !10 br label %lean_inc.exit -11: ; preds = %7 +11: ; preds = %lean_inc.exit24 %.not.i36 = icmp eq i32 %.val.i35, 0 br i1 %.not.i36, label %lean_inc.exit, label %12 @@ -797,7 +791,7 @@ lean_inc.exit24: tail call void @lean_inc_ref_cold(ptr noundef nonnull %0) #3 br label %lean_inc.exit -lean_inc.exit: ; preds = %12, %11, %9, %lean_inc.exit24 +lean_inc.exit: ; preds = %12, %11, %9 tail call void @lean_inc_heartbeat() #3 %13 = tail call noalias ptr @mi_malloc_small(i64 noundef 32) #3 %14 = icmp eq ptr %13, null @@ -818,30 +812,24 @@ lean_alloc_ctor.exit: ; preds = %lean_inc.exit %19 = getelementptr inbounds nuw i8, ptr %13, i64 24 store ptr %4, ptr %19, align 8, !tbaa !4 %20 = tail call ptr @l_Substring_nextn(ptr noundef nonnull %13, ptr noundef nonnull inttoptr (i64 3 to ptr), ptr noundef nonnull inttoptr (i64 1 to ptr)) #3 - %21 = ptrtoint ptr %13 to i64 - %22 = and i64 %21, 1 - %.not39 = icmp eq i64 %22, 0 - br i1 %.not39, label %23, label %lean_dec.exit27 - -23: ; preds = %lean_alloc_ctor.exit - %24 = load i32, ptr %13, align 4, !tbaa !10 - %25 = icmp sgt i32 %24, 1 - br i1 %25, label %26, label %28, !prof !14 - -26: ; preds = %23 - %27 = add nsw i32 %24, -1 - store i32 %27, ptr %13, align 4, !tbaa !10 + %18 = load i32, ptr %13, align 8, !tbaa !10 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %20, label %22, !prof !14 + +20: ; preds = %lean_alloc_ctor.exit + %21 = add nsw i32 %18, -1 + store i32 %21, ptr %13, align 4, !tbaa !10 br label %lean_dec.exit27 -28: ; preds = %23 - %.not.i = icmp eq i32 %24, 0 +28: ; preds = %lean_alloc_ctor.exit + %.not.i = icmp eq i32 %18, 0 br i1 %.not.i, label %lean_dec.exit27, label %29 29: ; preds = %28 tail call void @lean_dec_ref_cold(ptr noundef nonnull %13) #3 br label %lean_dec.exit27 -lean_dec.exit27: ; preds = %lean_alloc_ctor.exit, %26, %28, %29 +lean_dec.exit27: ; preds = %20, %28, %29 %30 = ptrtoint ptr %20 to i64 %31 = and i64 %30, 1 %.not40 = icmp eq i64 %31, 0 @@ -867,29 +855,26 @@ lean_dec.exit27: ; preds = %lean_alloc_ctor.exi br label %lean_dec.exit25 lean_dec.exit25: ; preds = %lean_dec.exit27, %36, %38, %39 - %.0.i48 = phi ptr [ %33, %36 ], [ %33, %38 ], [ %33, %39 ], [ %20, %lean_dec.exit27 ] + %.0.i48 = phi ptr [ %33, %30 ], [ %33, %32 ], [ %33, %33 ], [ %20, %lean_dec.exit27 ] %40 = tail call zeroext i8 @l_String_anyAux___at___private_Lean_Elab_AutoBound_0__Lean_Elab_isValidAutoBoundSuffix___spec__1(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef %.0.i48) - br i1 %.not, label %41, label %lean_dec.exit - -41: ; preds = %lean_dec.exit25 - %42 = load i32, ptr %0, align 4, !tbaa !10 - %43 = icmp sgt i32 %42, 1 - br i1 %43, label %44, label %46, !prof !14 + %35 = load i32, ptr %0, align 4, !tbaa !10 + %36 = icmp sgt i32 %35, 1 + br i1 %36, label %37, label %312, !prof !14 -44: ; preds = %41 - %45 = add nsw i32 %42, -1 +44: ; preds = %lean_dec.exit25 + %45 = add nsw i32 %35, -1 store i32 %45, ptr %0, align 4, !tbaa !10 br label %lean_dec.exit -46: ; preds = %41 - %.not.i32 = icmp eq i32 %42, 0 +46: ; preds = %lean_dec.exit25 + %.not.i32 = icmp eq i32 %35, 0 br i1 %.not.i32, label %lean_dec.exit, label %47 47: ; preds = %46 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %47, %46, %44, %lean_dec.exit25 +lean_dec.exit: ; preds = %47, %46, %44 %. = xor i8 %40, 1 ret i8 %. } diff --git a/bench/lean4/optimized/AuxDeclCache.ll b/bench/lean4/optimized/AuxDeclCache.ll index 2e69ceffa0a..55d2d06dc92 100644 --- a/bench/lean4/optimized/AuxDeclCache.ll +++ b/bench/lean4/optimized/AuxDeclCache.ll @@ -5145,30 +5145,24 @@ lean_dec.exit: ; preds = %24, %23, %21, %lean define ptr @l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_AuxDeclCache___hyg_3____spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 { %4 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %1 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %1, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %1, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %1, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %3 +lean_dec.exit: ; preds = %13, %12, %7 %14 = tail call ptr @l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_AuxDeclCache___hyg_3____spec__3(ptr noundef %0, i64 noundef %.val, ptr noundef %2) ret ptr %14 } @@ -5177,30 +5171,24 @@ lean_dec.exit: ; preds = %13, %12, %10, %3 define ptr @l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_AuxDeclCache___hyg_3____spec__7___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef readnone captures(none) %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 { %7 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %0 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit11 + %8 = load i32, ptr %0, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !11 10: ; preds = %6 - %11 = load i32, ptr %0, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !11 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %0, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit11 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit11, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %16, %15, %13, %6 +lean_dec.exit11: ; preds = %16, %15, %13 %17 = tail call ptr @l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_AuxDeclCache___hyg_3____spec__7(i64 noundef %.val, ptr noundef %1, ptr noundef %2, ptr poison, ptr noundef %4, ptr noundef %5) %18 = ptrtoint ptr %2 to i64 %19 = and i64 %18, 1 @@ -5210,7 +5198,7 @@ lean_dec.exit11: ; preds = %16, %15, %13, %6 20: ; preds = %lean_dec.exit11 %21 = load i32, ptr %2, align 4, !tbaa !4 %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !11 + br i1 %112, label %23, label %25, !prof !11 23: ; preds = %20 %24 = add nsw i32 %21, -1 @@ -5234,7 +5222,7 @@ lean_dec.exit10: ; preds = %26, %25, %23, %lean 29: ; preds = %lean_dec.exit10 %30 = load i32, ptr %1, align 4, !tbaa !4 %31 = icmp sgt i32 %30, 1 - br i1 %31, label %32, label %34, !prof !11 + br i1 %31, label %212, label %34, !prof !11 32: ; preds = %29 %33 = add nsw i32 %30, -1 @@ -5257,56 +5245,44 @@ lean_dec.exit: ; preds = %35, %34, %32, %lean define ptr @l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_AuxDeclCache___hyg_3____spec__6___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 { %6 = getelementptr i8, ptr %1, i64 8 %.val12 = load i64, ptr %6, align 8, !tbaa !12 - %7 = ptrtoint ptr %1 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit9 + %7 = load i32, ptr %1, align 8, !tbaa !4 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !11 9: ; preds = %5 - %10 = load i32, ptr %1, align 4, !tbaa !4 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !11 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %1, align 4, !tbaa !4 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit9 -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %5 + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit9, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit9 -lean_dec.exit9: ; preds = %15, %14, %12, %5 +lean_dec.exit9: ; preds = %15, %14, %12 %16 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %16, align 8, !tbaa !12 - %17 = ptrtoint ptr %2 to i64 - %18 = and i64 %17, 1 - %.not13 = icmp eq i64 %18, 0 - br i1 %.not13, label %19, label %lean_dec.exit + %17 = load i32, ptr %2, align 8, !tbaa !4 + %18 = icmp sgt i32 %17, 1 + br i1 %15, label %16, label %18, !prof !11 19: ; preds = %lean_dec.exit9 - %20 = load i32, ptr %2, align 4, !tbaa !4 - %21 = icmp sgt i32 %20, 1 - br i1 %21, label %22, label %24, !prof !11 - -22: ; preds = %19 - %23 = add nsw i32 %20, -1 - store i32 %23, ptr %2, align 4, !tbaa !4 + %17 = add nsw i32 %14, -1 + store i32 %20, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit -24: ; preds = %19 - %.not.i10 = icmp eq i32 %20, 0 - br i1 %.not.i10, label %lean_dec.exit, label %25 +24: ; preds = %lean_dec.exit9 + %.not.i10 = icmp eq i32 %14, 0 + br i1 %.not.i10, label %lean_dec.exit, label %112 -25: ; preds = %24 +112: ; preds = %24 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %25, %24, %22, %lean_dec.exit9 +lean_dec.exit: ; preds = %25, %24, %22 %26 = tail call ptr @l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_AuxDeclCache___hyg_3____spec__6(ptr noundef %0, i64 noundef %.val12, i64 noundef %.val, ptr noundef %3, ptr noundef %4) ret ptr %26 } diff --git a/bench/lean4/optimized/AuxLemma.ll b/bench/lean4/optimized/AuxLemma.ll index e0008246198..fc9b9d4861d 100644 --- a/bench/lean4/optimized/AuxLemma.ll +++ b/bench/lean4/optimized/AuxLemma.ll @@ -9989,30 +9989,24 @@ lean_dec.exit: ; preds = %43, %42, %40, %lean define ptr @l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Meta_mkAuxLemma___spec__4___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef readnone captures(none) %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 { %7 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %0 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit11 + %8 = load i32, ptr %0, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !11 10: ; preds = %6 - %11 = load i32, ptr %0, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !11 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %0, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit11 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit11, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %16, %15, %13, %6 +lean_dec.exit11: ; preds = %16, %15, %13 %17 = tail call ptr @l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Meta_mkAuxLemma___spec__4(i64 noundef %.val, ptr noundef %1, ptr noundef %2, ptr poison, ptr noundef %4, ptr noundef %5) %18 = ptrtoint ptr %2 to i64 %19 = and i64 %18, 1 @@ -10069,56 +10063,44 @@ lean_dec.exit: ; preds = %35, %34, %32, %lean define ptr @l_Lean_PersistentHashMap_insertAux___at_Lean_Meta_mkAuxLemma___spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 { %6 = getelementptr i8, ptr %1, i64 8 %.val12 = load i64, ptr %6, align 8, !tbaa !12 - %7 = ptrtoint ptr %1 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit9 + %7 = load i32, ptr %1, align 8, !tbaa !4 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !11 9: ; preds = %5 - %10 = load i32, ptr %1, align 4, !tbaa !4 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !11 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %1, align 4, !tbaa !4 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit9 -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %5 + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit9, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit9 -lean_dec.exit9: ; preds = %15, %14, %12, %5 +lean_dec.exit9: ; preds = %15, %14, %12 %16 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %16, align 8, !tbaa !12 - %17 = ptrtoint ptr %2 to i64 - %18 = and i64 %17, 1 - %.not13 = icmp eq i64 %18, 0 - br i1 %.not13, label %19, label %lean_dec.exit - -19: ; preds = %lean_dec.exit9 - %20 = load i32, ptr %2, align 4, !tbaa !4 - %21 = icmp sgt i32 %20, 1 - br i1 %21, label %22, label %24, !prof !11 + %17 = load i32, ptr %2, align 8, !tbaa !4 + %18 = icmp sgt i32 %17, 1 + br i1 %15, label %16, label %18, !prof !11 -22: ; preds = %19 - %23 = add nsw i32 %20, -1 +22: ; preds = %lean_dec.exit9 + %23 = add nsw i32 %14, -1 store i32 %23, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit -24: ; preds = %19 - %.not.i10 = icmp eq i32 %20, 0 +24: ; preds = %lean_dec.exit9 + %.not.i10 = icmp eq i32 %14, 0 br i1 %.not.i10, label %lean_dec.exit, label %25 25: ; preds = %24 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %25, %24, %22, %lean_dec.exit9 +lean_dec.exit: ; preds = %25, %24, %22 %26 = tail call ptr @l_Lean_PersistentHashMap_insertAux___at_Lean_Meta_mkAuxLemma___spec__3(ptr noundef %0, i64 noundef %.val12, i64 noundef %.val, ptr noundef %3, ptr noundef %4) ret ptr %26 } @@ -10205,30 +10187,24 @@ lean_dec.exit: ; preds = %33, %32, %30, %lean define ptr @l_Lean_PersistentHashMap_findAux___at_Lean_Meta_mkAuxLemma___spec__7___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 { %4 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %1 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit6 + %5 = load i32, ptr %1, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %1, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %1, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit6 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit6, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit6 -lean_dec.exit6: ; preds = %13, %12, %10, %3 +lean_dec.exit6: ; preds = %13, %12, %7 %14 = tail call ptr @l_Lean_PersistentHashMap_findAux___at_Lean_Meta_mkAuxLemma___spec__7(ptr noundef %0, i64 noundef %.val, ptr noundef %2) %15 = ptrtoint ptr %2 to i64 %16 = and i64 %15, 1 diff --git a/bench/lean4/optimized/ByteArray.ll b/bench/lean4/optimized/ByteArray.ll index 013251bd4f8..398f749d654 100644 --- a/bench/lean4/optimized/ByteArray.ll +++ b/bench/lean4/optimized/ByteArray.ll @@ -729,22 +729,16 @@ define nonnull ptr @l_Std_Internal_Parsec_ByteArray_instInputIteratorUInt8Nat___ %9 = getelementptr inbounds nuw i8, ptr %4, i64 24 %10 = getelementptr inbounds nuw i8, ptr %9, i64 %8 %11 = load i8, ptr %10, align 1, !tbaa !15 - %12 = ptrtoint ptr %0 to i64 - %13 = and i64 %12, 1 - %.not = icmp eq i64 %13, 0 - br i1 %.not, label %14, label %lean_dec.exit + %12 = load i32, ptr %0, align 8, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 14: ; preds = %2 - %15 = load i32, ptr %0, align 4, !tbaa !8 - %16 = icmp sgt i32 %15, 1 - br i1 %16, label %17, label %19, !prof !11 - -17: ; preds = %14 - %18 = add nsw i32 %15, -1 - store i32 %18, ptr %0, align 4, !tbaa !8 + %15 = add nsw i32 %12, -1 + store i32 %15, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit -19: ; preds = %14 +19: ; preds = %2 %.not.i = icmp eq i32 %15, 0 br i1 %.not.i, label %lean_dec.exit, label %20 @@ -752,7 +746,7 @@ define nonnull ptr @l_Std_Internal_Parsec_ByteArray_instInputIteratorUInt8Nat___ tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #6 br label %lean_dec.exit -lean_dec.exit: ; preds = %20, %19, %17, %2 +lean_dec.exit: ; preds = %20, %19, %14 %21 = zext i8 %11 to i64 %22 = shl nuw nsw i64 %21, 1 %23 = or disjoint i64 %22, 1 @@ -2473,56 +2467,44 @@ lean_alloc_ctor.exit54: ; preds = %lean_dec.exit define noalias noundef nonnull ptr @l_ByteArray_forInUnsafe_loop___at_Std_Internal_Parsec_ByteArray_skipBytes___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 { %6 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %6, align 8, !tbaa !13 - %7 = ptrtoint ptr %1 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit11 + %7 = load i32, ptr %1, align 8, !tbaa !8 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !11 9: ; preds = %5 - %10 = load i32, ptr %1, align 4, !tbaa !8 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !11 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %1, align 4, !tbaa !8 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit11 -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %5 + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit11, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #6 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %15, %14, %12, %5 +lean_dec.exit11: ; preds = %15, %14, %9 %16 = getelementptr i8, ptr %2, i64 8 %.val16 = load i64, ptr %16, align 8, !tbaa !13 - %17 = ptrtoint ptr %2 to i64 - %18 = and i64 %17, 1 - %.not17 = icmp eq i64 %18, 0 - br i1 %.not17, label %19, label %lean_dec.exit10 - -19: ; preds = %lean_dec.exit11 - %20 = load i32, ptr %2, align 4, !tbaa !8 - %21 = icmp sgt i32 %20, 1 - br i1 %21, label %22, label %24, !prof !11 + %14 = load i32, ptr %2, align 8, !tbaa !8 + %15 = icmp sgt i32 %14, 1 + br i1 %15, label %16, label %18, !prof !11 -22: ; preds = %19 - %23 = add nsw i32 %20, -1 +22: ; preds = %lean_dec.exit11 + %23 = add nsw i32 %14, -1 store i32 %23, ptr %2, align 4, !tbaa !8 br label %lean_dec.exit10 -24: ; preds = %19 - %.not.i12 = icmp eq i32 %20, 0 - br i1 %.not.i12, label %lean_dec.exit10, label %25 +24: ; preds = %lean_dec.exit11 + %.not.i12 = icmp eq i32 %14, 0 + br i1 %.not.i12, label %lean_dec.exit10, label %22 25: ; preds = %24 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #6 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %25, %24, %22, %lean_dec.exit11 +lean_dec.exit10: ; preds = %22, %24, %22 %26 = tail call ptr @l_ByteArray_forInUnsafe_loop___at_Std_Internal_Parsec_ByteArray_skipBytes___spec__1(ptr noundef %0, i64 noundef %.val, i64 noundef %.val16, ptr noundef %3, ptr noundef %4) %27 = ptrtoint ptr %0 to i64 %28 = and i64 %27, 1 diff --git a/bench/lean4/optimized/CSE.ll b/bench/lean4/optimized/CSE.ll index 9d2ffe7457b..195c4001ab0 100644 --- a/bench/lean4/optimized/CSE.ll +++ b/bench/lean4/optimized/CSE.ll @@ -4839,30 +4839,24 @@ lean_alloc_ctor.exit103: ; preds = %161 define ptr @l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Compiler_LCNF_CSE_addEntry___spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef readnone captures(none) %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 { %7 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %0 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit11 + %8 = load i32, ptr %0, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !11 10: ; preds = %6 - %11 = load i32, ptr %0, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !11 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %0, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit11 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit11, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %16, %15, %13, %6 +lean_dec.exit11: ; preds = %16, %15, %13 %17 = tail call ptr @l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Compiler_LCNF_CSE_addEntry___spec__3(i64 noundef %.val, ptr noundef %1, ptr noundef %2, ptr poison, ptr noundef %4, ptr noundef %5) %18 = ptrtoint ptr %2 to i64 %19 = and i64 %18, 1 @@ -4919,56 +4913,44 @@ lean_dec.exit: ; preds = %35, %34, %32, %lean define ptr @l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_LCNF_CSE_addEntry___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 { %6 = getelementptr i8, ptr %1, i64 8 %.val12 = load i64, ptr %6, align 8, !tbaa !12 - %7 = ptrtoint ptr %1 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit9 + %7 = load i32, ptr %1, align 8, !tbaa !4 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !11 9: ; preds = %5 - %10 = load i32, ptr %1, align 4, !tbaa !4 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !11 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %1, align 4, !tbaa !4 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit9 -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %5 + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit9, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit9 -lean_dec.exit9: ; preds = %15, %14, %12, %5 +lean_dec.exit9: ; preds = %15, %14, %12 %16 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %16, align 8, !tbaa !12 - %17 = ptrtoint ptr %2 to i64 - %18 = and i64 %17, 1 - %.not13 = icmp eq i64 %18, 0 - br i1 %.not13, label %19, label %lean_dec.exit - -19: ; preds = %lean_dec.exit9 - %20 = load i32, ptr %2, align 4, !tbaa !4 - %21 = icmp sgt i32 %20, 1 - br i1 %21, label %22, label %24, !prof !11 + %17 = load i32, ptr %2, align 8, !tbaa !4 + %18 = icmp sgt i32 %17, 1 + br i1 %15, label %16, label %18, !prof !11 -22: ; preds = %19 - %23 = add nsw i32 %20, -1 +22: ; preds = %lean_dec.exit9 + %23 = add nsw i32 %14, -1 store i32 %23, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit -24: ; preds = %19 - %.not.i10 = icmp eq i32 %20, 0 +24: ; preds = %lean_dec.exit9 + %.not.i10 = icmp eq i32 %14, 0 br i1 %.not.i10, label %lean_dec.exit, label %25 25: ; preds = %24 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %25, %24, %22, %lean_dec.exit9 +lean_dec.exit: ; preds = %25, %24, %22 %26 = tail call ptr @l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_LCNF_CSE_addEntry___spec__2(ptr noundef %0, i64 noundef %.val12, i64 noundef %.val, ptr noundef %3, ptr noundef %4) ret ptr %26 } @@ -35747,30 +35729,24 @@ lean_dec.exit: ; preds = %33, %32, %30, %lean define ptr @l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_LCNF_Code_cse_go___spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 { %4 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %1 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit6 + %5 = load i32, ptr %1, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %1, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %1, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit6 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit6, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit6 -lean_dec.exit6: ; preds = %13, %12, %10, %3 +lean_dec.exit6: ; preds = %13, %12, %7 %14 = tail call ptr @l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_LCNF_Code_cse_go___spec__3(ptr noundef %0, i64 noundef %.val, ptr noundef %2) %15 = ptrtoint ptr %2 to i64 %16 = and i64 %15, 1 diff --git a/bench/lean4/optimized/Calc.ll b/bench/lean4/optimized/Calc.ll index 51de904d7f5..e9a27ebe05e 100644 --- a/bench/lean4/optimized/Calc.ll +++ b/bench/lean4/optimized/Calc.ll @@ -3943,18 +3943,9 @@ lean_alloc_closure.exit: ; preds = %lean_alloc_ctor.exi store i16 1, ptr %23, align 2, !tbaa !15 %24 = getelementptr inbounds nuw i8, ptr %17, i64 24 store ptr %1, ptr %24, align 8, !tbaa !4 - %25 = ptrtoint ptr %17 to i64 - %26 = and i64 %25, 1 - %.not = icmp eq i64 %26, 0 - br i1 %.not, label %lean_inc_ref.exit, label %lean_inc.exit - -lean_inc_ref.exit: ; preds = %lean_alloc_closure.exit - store i32 2, ptr %17, align 4, !tbaa !8 - br label %lean_inc.exit - -lean_inc.exit: ; preds = %lean_alloc_closure.exit, %lean_inc_ref.exit - %27 = tail call ptr @l_Lean_Elab_Term_ensureHasTypeWithErrorMsgs(ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull %17, ptr noundef nonnull %17, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #4 - ret ptr %27 + store i32 2, ptr %17, align 8, !tbaa !8 + %25 = tail call ptr @l_Lean_Elab_Term_ensureHasTypeWithErrorMsgs(ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull %17, ptr noundef nonnull %17, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #4 + ret ptr %25 } ; Function Attrs: nounwind uwtable diff --git a/bench/lean4/optimized/CaseValues.ll b/bench/lean4/optimized/CaseValues.ll index c1233cec6b6..fcbc3ecff1a 100644 --- a/bench/lean4/optimized/CaseValues.ll +++ b/bench/lean4/optimized/CaseValues.ll @@ -19209,56 +19209,44 @@ declare ptr @l_Lean_Meta_throwTacticEx___rarg(ptr noundef, ptr noundef, ptr noun define ptr @l_Array_foldlMUnsafe_fold___at_Lean_Meta_caseValues_loop___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #0 { %11 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %11, align 8, !tbaa !16 - %12 = ptrtoint ptr %2 to i64 - %13 = and i64 %12, 1 - %.not = icmp eq i64 %13, 0 - br i1 %.not, label %14, label %lean_dec.exit18 + %12 = load i32, ptr %2, align 8, !tbaa !4 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 14: ; preds = %10 - %15 = load i32, ptr %2, align 4, !tbaa !4 - %16 = icmp sgt i32 %15, 1 - br i1 %16, label %17, label %19, !prof !11 - -17: ; preds = %14 - %18 = add nsw i32 %15, -1 - store i32 %18, ptr %2, align 4, !tbaa !4 + %15 = add nsw i32 %12, -1 + store i32 %15, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit18 -19: ; preds = %14 - %.not.i = icmp eq i32 %15, 0 +19: ; preds = %10 + %.not.i = icmp eq i32 %12, 0 br i1 %.not.i, label %lean_dec.exit18, label %20 20: ; preds = %19 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #5 br label %lean_dec.exit18 -lean_dec.exit18: ; preds = %20, %19, %17, %10 +lean_dec.exit18: ; preds = %20, %19, %14 %21 = getelementptr i8, ptr %3, i64 8 %.val25 = load i64, ptr %21, align 8, !tbaa !16 - %22 = ptrtoint ptr %3 to i64 - %23 = and i64 %22, 1 - %.not26 = icmp eq i64 %23, 0 - br i1 %.not26, label %24, label %lean_dec.exit17 - -24: ; preds = %lean_dec.exit18 - %25 = load i32, ptr %3, align 4, !tbaa !4 - %26 = icmp sgt i32 %25, 1 - br i1 %26, label %27, label %29, !prof !11 - -27: ; preds = %24 - %28 = add nsw i32 %25, -1 - store i32 %28, ptr %3, align 4, !tbaa !4 + %19 = load i32, ptr %3, align 8, !tbaa !4 + %20 = icmp sgt i32 %19, 1 + br i1 %20, label %21, label %23, !prof !11 + +21: ; preds = %lean_dec.exit18 + %22 = add nsw i32 %19, -1 + store i32 %22, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit17 -29: ; preds = %24 - %.not.i19 = icmp eq i32 %25, 0 +29: ; preds = %lean_dec.exit18 + %.not.i19 = icmp eq i32 %19, 0 br i1 %.not.i19, label %lean_dec.exit17, label %30 30: ; preds = %29 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #5 br label %lean_dec.exit17 -lean_dec.exit17: ; preds = %30, %29, %27, %lean_dec.exit18 +lean_dec.exit17: ; preds = %30, %29, %21 %31 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lean_Meta_caseValues_loop___spec__1(ptr noundef %0, ptr noundef %1, i64 noundef %.val, i64 noundef %.val25, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) %32 = ptrtoint ptr %1 to i64 %33 = and i64 %32, 1 diff --git a/bench/lean4/optimized/CheckTactic.ll b/bench/lean4/optimized/CheckTactic.ll index d29a08ca3e8..03a99bfcad3 100644 --- a/bench/lean4/optimized/CheckTactic.ll +++ b/bench/lean4/optimized/CheckTactic.ll @@ -37531,29 +37531,20 @@ lean_alloc_ctor.exit104: ; preds = %lean_inc.exit75 %108 = getelementptr inbounds nuw i8, ptr %102, i64 24 store ptr %95, ptr %108, align 8, !tbaa !4 %109 = load ptr, ptr @l_Lean_Elab_CheckTactic_expandCheckSimp___closed__10, align 8, !tbaa !4 - %110 = ptrtoint ptr %102 to i64 - %111 = and i64 %110, 1 - %.not117 = icmp eq i64 %111, 0 - br i1 %.not117, label %lean_inc_ref.exit107, label %lean_inc.exit74 + store i32 2, ptr %102, align 8, !tbaa !8 + br i1 %.not116, label %110, label %lean_inc.exit73 lean_inc_ref.exit107: ; preds = %lean_alloc_ctor.exit104 - store i32 2, ptr %102, align 4, !tbaa !8 - br label %lean_inc.exit74 - -lean_inc.exit74: ; preds = %lean_alloc_ctor.exit104, %lean_inc_ref.exit107 - br i1 %.not116, label %112, label %lean_inc.exit73 - -112: ; preds = %lean_inc.exit74 %.val.i108 = load i32, ptr %39, align 4, !tbaa !8 %113 = icmp sgt i32 %.val.i108, 0 br i1 %113, label %114, label %116, !prof !15 -114: ; preds = %112 +114: ; preds = %110 %115 = add nuw i32 %.val.i108, 1 store i32 %115, ptr %39, align 4, !tbaa !8 br label %lean_inc.exit73 -116: ; preds = %112 +116: ; preds = %110 %.not.i109 = icmp eq i32 %.val.i108, 0 br i1 %.not.i109, label %lean_inc.exit73, label %117 @@ -37561,22 +37552,19 @@ lean_inc.exit74: ; preds = %lean_alloc_ctor.exi tail call void @lean_inc_ref_cold(ptr noundef nonnull %39) #6 br label %lean_inc.exit73 -lean_inc.exit73: ; preds = %117, %116, %114, %lean_inc.exit74 +lean_inc.exit73: ; preds = %117, %116, %114, %lean_alloc_ctor.exit104 %118 = tail call ptr @l_Lean_Syntax_node1(ptr noundef %39, ptr noundef %109, ptr noundef nonnull %102) #6 %119 = load ptr, ptr @l_Lean_Elab_CheckTactic_expandCheckSimp___closed__8, align 8, !tbaa !4 - br i1 %.not117, label %120, label %lean_inc_n.exit - -120: ; preds = %lean_inc.exit73 %.val.i.i = load i32, ptr %102, align 4, !tbaa !8 %121 = icmp sgt i32 %.val.i.i, 0 br i1 %121, label %122, label %124, !prof !15 -122: ; preds = %120 +122: ; preds = %lean_inc.exit73 %123 = add nuw i32 %.val.i.i, 3 store i32 %123, ptr %102, align 4, !tbaa !8 br label %lean_inc_n.exit -124: ; preds = %120 +124: ; preds = %lean_inc.exit73 %.not.i.i = icmp eq i32 %.val.i.i, 0 br i1 %.not.i.i, label %lean_inc_n.exit, label %125 @@ -37584,7 +37572,7 @@ lean_inc.exit73: ; preds = %117, %116, %114, %l tail call void @lean_inc_ref_n_cold(ptr noundef nonnull %102, i32 noundef 3) #6 br label %lean_inc_n.exit -lean_inc_n.exit: ; preds = %lean_inc.exit73, %122, %124, %125 +lean_inc_n.exit: ; preds = %122, %124, %125 br i1 %.not116, label %126, label %lean_inc.exit 126: ; preds = %lean_inc_n.exit @@ -37941,29 +37929,20 @@ lean_alloc_ctor.exit90: ; preds = %lean_inc.exit66 %95 = getelementptr inbounds nuw i8, ptr %89, i64 24 store ptr %82, ptr %95, align 8, !tbaa !4 %96 = load ptr, ptr @l_Lean_Elab_CheckTactic_expandCheckSimp___closed__10, align 8, !tbaa !4 - %97 = ptrtoint ptr %89 to i64 - %98 = and i64 %97, 1 - %.not104 = icmp eq i64 %98, 0 - br i1 %.not104, label %lean_inc_ref.exit93, label %lean_inc.exit65 + store i32 2, ptr %89, align 8, !tbaa !8 + br i1 %.not103, label %97, label %lean_inc.exit64 lean_inc_ref.exit93: ; preds = %lean_alloc_ctor.exit90 - store i32 2, ptr %89, align 4, !tbaa !8 - br label %lean_inc.exit65 - -lean_inc.exit65: ; preds = %lean_alloc_ctor.exit90, %lean_inc_ref.exit93 - br i1 %.not103, label %99, label %lean_inc.exit64 - -99: ; preds = %lean_inc.exit65 %.val.i94 = load i32, ptr %39, align 4, !tbaa !8 %100 = icmp sgt i32 %.val.i94, 0 br i1 %100, label %101, label %103, !prof !15 -101: ; preds = %99 +101: ; preds = %97 %102 = add nuw i32 %.val.i94, 1 store i32 %102, ptr %39, align 4, !tbaa !8 br label %lean_inc.exit64 -103: ; preds = %99 +103: ; preds = %97 %.not.i95 = icmp eq i32 %.val.i94, 0 br i1 %.not.i95, label %lean_inc.exit64, label %104 @@ -37971,22 +37950,19 @@ lean_inc.exit65: ; preds = %lean_alloc_ctor.exi tail call void @lean_inc_ref_cold(ptr noundef nonnull %39) #6 br label %lean_inc.exit64 -lean_inc.exit64: ; preds = %104, %103, %101, %lean_inc.exit65 +lean_inc.exit64: ; preds = %104, %103, %101, %lean_alloc_ctor.exit90 %105 = tail call ptr @l_Lean_Syntax_node1(ptr noundef %39, ptr noundef %96, ptr noundef nonnull %89) #6 %106 = load ptr, ptr @l_Lean_Elab_CheckTactic_expandCheckSimp___closed__8, align 8, !tbaa !4 - br i1 %.not104, label %107, label %lean_inc_n.exit - -107: ; preds = %lean_inc.exit64 %.val.i.i = load i32, ptr %89, align 4, !tbaa !8 %108 = icmp sgt i32 %.val.i.i, 0 br i1 %108, label %109, label %111, !prof !15 -109: ; preds = %107 +109: ; preds = %lean_inc.exit64 %110 = add nuw i32 %.val.i.i, 3 store i32 %110, ptr %89, align 4, !tbaa !8 br label %lean_inc_n.exit -111: ; preds = %107 +111: ; preds = %lean_inc.exit64 %.not.i.i = icmp eq i32 %.val.i.i, 0 br i1 %.not.i.i, label %lean_inc_n.exit, label %112 @@ -37994,7 +37970,7 @@ lean_inc.exit64: ; preds = %104, %103, %101, %l tail call void @lean_inc_ref_n_cold(ptr noundef nonnull %89, i32 noundef 3) #6 br label %lean_inc_n.exit -lean_inc_n.exit: ; preds = %lean_inc.exit64, %109, %111, %112 +lean_inc_n.exit: ; preds = %109, %111, %112 br i1 %.not103, label %113, label %lean_inc.exit 113: ; preds = %lean_inc_n.exit diff --git a/bench/lean4/optimized/Client.ll b/bench/lean4/optimized/Client.ll index 9e9257836cf..65fb4d1c702 100644 --- a/bench/lean4/optimized/Client.ll +++ b/bench/lean4/optimized/Client.ll @@ -1532,56 +1532,44 @@ lean_alloc_ctor.exit18: ; preds = %lean_alloc_ctor.exi define ptr @l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Client_0__Lean_Lsp_toJsonRegistrationParams____x40_Lean_Data_Lsp_Client___hyg_258____spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val10 = load i64, ptr %14, align 8, !tbaa !12 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !8 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 - -20: ; preds = %17 - %21 = add nsw i32 %18, -1 - store i32 %21, ptr %1, align 4, !tbaa !8 + %12 = load i32, ptr %1, align 8, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 + +14: ; preds = %lean_dec.exit7 + %15 = add nsw i32 %12, -1 + store i32 %15, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %14 %24 = tail call ptr @l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Client_0__Lean_Lsp_toJsonRegistrationParams____x40_Lean_Data_Lsp_Client___hyg_258____spec__2(i64 noundef %.val, i64 noundef %.val10, ptr noundef %2) ret ptr %24 } @@ -2457,56 +2445,44 @@ lean_alloc_ctor.exit47: ; preds = %lean_dec.exit define ptr @l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Client_0__Lean_Lsp_fromJsonRegistrationParams____x40_Lean_Data_Lsp_Client___hyg_296____spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val10 = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %14, align 8, !tbaa !12 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !8 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 - -20: ; preds = %17 - %21 = add nsw i32 %18, -1 - store i32 %21, ptr %1, align 4, !tbaa !8 + %12 = load i32, ptr %1, align 8, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 + +14: ; preds = %lean_dec.exit7 + %15 = add nsw i32 %12, -1 + store i32 %15, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %14 %24 = tail call ptr @l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_Client_0__Lean_Lsp_fromJsonRegistrationParams____x40_Lean_Data_Lsp_Client___hyg_296____spec__3(i64 noundef %.val10, i64 noundef %.val, ptr noundef %2) ret ptr %24 } diff --git a/bench/lean4/optimized/CollectAxioms.ll b/bench/lean4/optimized/CollectAxioms.ll index c91471b5800..2872e79faee 100644 --- a/bench/lean4/optimized/CollectAxioms.ll +++ b/bench/lean4/optimized/CollectAxioms.ll @@ -6003,56 +6003,44 @@ declare ptr @l_Lean_Expr_getUsedConstants(ptr noundef) local_unnamed_addr #2 define noalias nonnull ptr @l_Array_foldlMUnsafe_fold___at_Lean_CollectAxioms_collect___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 { %7 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %1 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit12 + %8 = load i32, ptr %1, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !9 10: ; preds = %6 - %11 = load i32, ptr %1, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !9 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %1, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit12 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit12, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %16, %15, %13, %6 +lean_dec.exit12: ; preds = %16, %15, %10 %17 = getelementptr i8, ptr %2, i64 8 %.val17 = load i64, ptr %17, align 8, !tbaa !12 - %18 = ptrtoint ptr %2 to i64 - %19 = and i64 %18, 1 - %.not18 = icmp eq i64 %19, 0 - br i1 %.not18, label %20, label %lean_dec.exit11 - -20: ; preds = %lean_dec.exit12 - %21 = load i32, ptr %2, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !9 - -23: ; preds = %20 - %24 = add nsw i32 %21, -1 - store i32 %24, ptr %2, align 4, !tbaa !4 + %15 = load i32, ptr %2, align 8, !tbaa !4 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !9 + +17: ; preds = %lean_dec.exit12 + %18 = add nsw i32 %15, -1 + store i32 %18, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit11 -25: ; preds = %20 - %.not.i13 = icmp eq i32 %21, 0 +25: ; preds = %lean_dec.exit12 + %.not.i13 = icmp eq i32 %15, 0 br i1 %.not.i13, label %lean_dec.exit11, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %26, %25, %23, %lean_dec.exit12 +lean_dec.exit11: ; preds = %26, %25, %17 %27 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lean_CollectAxioms_collect___spec__1(ptr noundef %0, i64 noundef %.val, i64 noundef %.val17, ptr noundef %3, ptr noundef %4, ptr noundef %5) %28 = ptrtoint ptr %0 to i64 %29 = and i64 %28, 1 diff --git a/bench/lean4/optimized/CollectFVars.ll b/bench/lean4/optimized/CollectFVars.ll index 6780a85a9cc..bd0d7554343 100644 --- a/bench/lean4/optimized/CollectFVars.ll +++ b/bench/lean4/optimized/CollectFVars.ll @@ -10857,56 +10857,44 @@ lean_dec.exit: ; preds = %21, %20, %18, %lean define ptr @l_Array_foldrMUnsafe_fold___at_Lean_Meta_removeUnused___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 { %10 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %10, align 8, !tbaa !12 - %11 = ptrtoint ptr %1 to i64 - %12 = and i64 %11, 1 - %.not = icmp eq i64 %12, 0 - br i1 %.not, label %13, label %lean_dec.exit15 + %11 = load i32, ptr %1, align 8, !tbaa !4 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !11 13: ; preds = %9 - %14 = load i32, ptr %1, align 4, !tbaa !4 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !11 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %1, align 4, !tbaa !4 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit15 -18: ; preds = %13 - %.not.i = icmp eq i32 %14, 0 +18: ; preds = %9 + %.not.i = icmp eq i32 %11, 0 br i1 %.not.i, label %lean_dec.exit15, label %19 19: ; preds = %18 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit15 -lean_dec.exit15: ; preds = %19, %18, %16, %9 +lean_dec.exit15: ; preds = %19, %18, %13 %20 = getelementptr i8, ptr %2, i64 8 %.val20 = load i64, ptr %20, align 8, !tbaa !12 - %21 = ptrtoint ptr %2 to i64 - %22 = and i64 %21, 1 - %.not21 = icmp eq i64 %22, 0 - br i1 %.not21, label %23, label %lean_dec.exit14 + %18 = load i32, ptr %2, align 8, !tbaa !4 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %26, label %22, !prof !11 -23: ; preds = %lean_dec.exit15 - %24 = load i32, ptr %2, align 4, !tbaa !4 - %25 = icmp sgt i32 %24, 1 - br i1 %25, label %26, label %28, !prof !11 - -26: ; preds = %23 - %27 = add nsw i32 %24, -1 +26: ; preds = %lean_dec.exit15 + %27 = add nsw i32 %18, -1 store i32 %27, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit14 -28: ; preds = %23 - %.not.i16 = icmp eq i32 %24, 0 +28: ; preds = %lean_dec.exit15 + %.not.i16 = icmp eq i32 %18, 0 br i1 %.not.i16, label %lean_dec.exit14, label %29 29: ; preds = %28 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #3 br label %lean_dec.exit14 -lean_dec.exit14: ; preds = %29, %28, %26, %lean_dec.exit15 +lean_dec.exit14: ; preds = %29, %28, %26 %30 = tail call ptr @l_Array_foldrMUnsafe_fold___at_Lean_Meta_removeUnused___spec__2(ptr noundef %0, i64 noundef %.val, i64 noundef %.val20, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) %31 = ptrtoint ptr %0 to i64 %32 = and i64 %31, 1 diff --git a/bench/lean4/optimized/ConstFolding.ll b/bench/lean4/optimized/ConstFolding.ll index 29609c81981..afdaa810b96 100644 --- a/bench/lean4/optimized/ConstFolding.ll +++ b/bench/lean4/optimized/ConstFolding.ll @@ -321,30 +321,24 @@ define nonnull ptr @l_Lean_Compiler_isOfNat___lambda__1___boxed(ptr noundef %0, %3 = getelementptr inbounds nuw i8, ptr %1, i64 24 %4 = load ptr, ptr %3, align 8, !tbaa !4 %5 = tail call zeroext i8 @lean_name_eq(ptr noundef %4, ptr noundef %0) #5 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit5 + %6 = load i32, ptr %1, align 8, !tbaa !8 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %2 - %9 = load i32, ptr %1, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !8 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit5 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %2 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit5, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #5 br label %lean_dec.exit5 -lean_dec.exit5: ; preds = %14, %13, %11, %2 +lean_dec.exit5: ; preds = %14, %13, %8 %15 = ptrtoint ptr %0 to i64 %16 = and i64 %15, 1 %.not8 = icmp eq i64 %16, 0 @@ -451,30 +445,24 @@ define nonnull ptr @l_Lean_Compiler_isToNat___lambda__1___boxed(ptr noundef %0, %3 = getelementptr inbounds nuw i8, ptr %1, i64 32 %4 = load ptr, ptr %3, align 8, !tbaa !4 %5 = tail call zeroext i8 @lean_name_eq(ptr noundef %4, ptr noundef %0) #5 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit5 + %6 = load i32, ptr %1, align 8, !tbaa !8 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %2 - %9 = load i32, ptr %1, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !8 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit5 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %2 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit5, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #5 br label %lean_dec.exit5 -lean_dec.exit5: ; preds = %14, %13, %11, %2 +lean_dec.exit5: ; preds = %14, %13, %8 %15 = ptrtoint ptr %0 to i64 %16 = and i64 %15, 1 %.not8 = icmp eq i64 %16, 0 diff --git a/bench/lean4/optimized/Database.ll b/bench/lean4/optimized/Database.ll index 40a199bb01d..57e35d6e64f 100644 --- a/bench/lean4/optimized/Database.ll +++ b/bench/lean4/optimized/Database.ll @@ -2107,56 +2107,44 @@ declare ptr @l_Std_Time_Database_Windows_getZoneRules(ptr noundef, ptr noundef) define ptr @l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 { %10 = getelementptr i8, ptr %5, i64 8 %.val = load i64, ptr %10, align 8, !tbaa !13 - %11 = ptrtoint ptr %5 to i64 - %12 = and i64 %11, 1 - %.not = icmp eq i64 %12, 0 - br i1 %.not, label %13, label %lean_dec.exit19 + %11 = load i32, ptr %5, align 8, !tbaa !4 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !9 13: ; preds = %9 - %14 = load i32, ptr %5, align 4, !tbaa !4 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !9 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %5, align 4, !tbaa !4 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %5, align 4, !tbaa !4 br label %lean_dec.exit19 -18: ; preds = %13 - %.not.i = icmp eq i32 %14, 0 +18: ; preds = %9 + %.not.i = icmp eq i32 %11, 0 br i1 %.not.i, label %lean_dec.exit19, label %19 19: ; preds = %18 tail call void @lean_dec_ref_cold(ptr noundef nonnull %5) #4 br label %lean_dec.exit19 -lean_dec.exit19: ; preds = %19, %18, %16, %9 +lean_dec.exit19: ; preds = %19, %18, %13 %20 = getelementptr i8, ptr %6, i64 8 %.val28 = load i64, ptr %20, align 8, !tbaa !13 - %21 = ptrtoint ptr %6 to i64 - %22 = and i64 %21, 1 - %.not29 = icmp eq i64 %22, 0 - br i1 %.not29, label %23, label %lean_dec.exit18 - -23: ; preds = %lean_dec.exit19 - %24 = load i32, ptr %6, align 4, !tbaa !4 - %25 = icmp sgt i32 %24, 1 - br i1 %25, label %26, label %28, !prof !9 - -26: ; preds = %23 - %27 = add nsw i32 %24, -1 - store i32 %27, ptr %6, align 4, !tbaa !4 + %18 = load i32, ptr %6, align 8, !tbaa !4 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %20, label %22, !prof !9 + +20: ; preds = %lean_dec.exit19 + %21 = add nsw i32 %18, -1 + store i32 %21, ptr %6, align 4, !tbaa !4 br label %lean_dec.exit18 -28: ; preds = %23 - %.not.i20 = icmp eq i32 %24, 0 +28: ; preds = %lean_dec.exit19 + %.not.i20 = icmp eq i32 %18, 0 br i1 %.not.i20, label %lean_dec.exit18, label %29 29: ; preds = %28 tail call void @lean_dec_ref_cold(ptr noundef nonnull %6) #4 br label %lean_dec.exit18 -lean_dec.exit18: ; preds = %29, %28, %26, %lean_dec.exit19 +lean_dec.exit18: ; preds = %29, %28, %20 %30 = tail call ptr @l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1(ptr noundef %0, ptr poison, ptr poison, ptr noundef %3, ptr noundef %4, i64 noundef %.val, i64 noundef %.val28, ptr noundef %7, ptr noundef %8) %31 = ptrtoint ptr %4 to i64 %32 = and i64 %31, 1 diff --git a/bench/lean4/optimized/Delta.ll b/bench/lean4/optimized/Delta.ll index 6976565abec..68b1a04162c 100644 --- a/bench/lean4/optimized/Delta.ll +++ b/bench/lean4/optimized/Delta.ll @@ -1564,56 +1564,44 @@ declare ptr @l_Lean_Syntax_getArgs(ptr noundef) local_unnamed_addr #1 define ptr @l_Lean_Elab_Tactic_Conv_evalDelta___lambda__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) #0 { %13 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %13, align 8, !tbaa !14 - %14 = ptrtoint ptr %0 to i64 - %15 = and i64 %14, 1 - %.not = icmp eq i64 %15, 0 - br i1 %.not, label %16, label %lean_dec.exit16 + %14 = load i32, ptr %0, align 8, !tbaa !4 + %15 = icmp sgt i32 %14, 1 + br i1 %15, label %16, label %18, !prof !9 16: ; preds = %12 - %17 = load i32, ptr %0, align 4, !tbaa !4 - %18 = icmp sgt i32 %17, 1 - br i1 %18, label %19, label %21, !prof !9 - -19: ; preds = %16 - %20 = add nsw i32 %17, -1 - store i32 %20, ptr %0, align 4, !tbaa !4 + %17 = add nsw i32 %14, -1 + store i32 %17, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit16 -21: ; preds = %16 - %.not.i = icmp eq i32 %17, 0 +21: ; preds = %12 + %.not.i = icmp eq i32 %14, 0 br i1 %.not.i, label %lean_dec.exit16, label %22 22: ; preds = %21 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit16 -lean_dec.exit16: ; preds = %22, %21, %19, %12 +lean_dec.exit16: ; preds = %22, %21, %16 %23 = getelementptr i8, ptr %1, i64 8 %.val19 = load i64, ptr %23, align 8, !tbaa !14 - %24 = ptrtoint ptr %1 to i64 - %25 = and i64 %24, 1 - %.not20 = icmp eq i64 %25, 0 - br i1 %.not20, label %26, label %lean_dec.exit - -26: ; preds = %lean_dec.exit16 - %27 = load i32, ptr %1, align 4, !tbaa !4 - %28 = icmp sgt i32 %27, 1 - br i1 %28, label %29, label %31, !prof !9 - -29: ; preds = %26 - %30 = add nsw i32 %27, -1 - store i32 %30, ptr %1, align 4, !tbaa !4 + %21 = load i32, ptr %1, align 8, !tbaa !4 + %22 = icmp sgt i32 %21, 1 + br i1 %22, label %23, label %25, !prof !9 + +23: ; preds = %lean_dec.exit16 + %24 = add nsw i32 %21, -1 + store i32 %24, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -31: ; preds = %26 - %.not.i17 = icmp eq i32 %27, 0 +31: ; preds = %lean_dec.exit16 + %.not.i17 = icmp eq i32 %21, 0 br i1 %.not.i17, label %lean_dec.exit, label %32 32: ; preds = %31 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %32, %31, %29, %lean_dec.exit16 +lean_dec.exit: ; preds = %32, %31, %23 %33 = tail call ptr @l_Lean_Elab_Tactic_Conv_evalDelta___lambda__1(i64 noundef %.val, i64 noundef %.val19, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) ret ptr %33 } diff --git a/bench/lean4/optimized/EligibleHeaderDecls.ll b/bench/lean4/optimized/EligibleHeaderDecls.ll index a8172459c1c..16d8b113815 100644 --- a/bench/lean4/optimized/EligibleHeaderDecls.ll +++ b/bench/lean4/optimized/EligibleHeaderDecls.ll @@ -3074,56 +3074,44 @@ declare ptr @lean_st_ref_set(ptr noundef, ptr noundef, ptr noundef) local_unname define noalias nonnull ptr @l_Array_foldlMUnsafe_fold___at_Lean_Server_Completion_getEligibleHeaderDecls___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 { %7 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %2 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit12 + %8 = load i32, ptr %2, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !11 10: ; preds = %6 - %11 = load i32, ptr %2, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !11 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %2, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit12 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit12, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #3 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %16, %15, %13, %6 +lean_dec.exit12: ; preds = %16, %15, %10 %17 = getelementptr i8, ptr %3, i64 8 %.val17 = load i64, ptr %17, align 8, !tbaa !12 - %18 = ptrtoint ptr %3 to i64 - %19 = and i64 %18, 1 - %.not18 = icmp eq i64 %19, 0 - br i1 %.not18, label %20, label %lean_dec.exit11 - -20: ; preds = %lean_dec.exit12 - %21 = load i32, ptr %3, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !11 + %15 = load i32, ptr %3, align 8, !tbaa !4 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !11 -23: ; preds = %20 - %24 = add nsw i32 %21, -1 +23: ; preds = %lean_dec.exit12 + %24 = add nsw i32 %15, -1 store i32 %24, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit11 -25: ; preds = %20 - %.not.i13 = icmp eq i32 %21, 0 +25: ; preds = %lean_dec.exit12 + %.not.i13 = icmp eq i32 %15, 0 br i1 %.not.i13, label %lean_dec.exit11, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #3 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %26, %25, %23, %lean_dec.exit12 +lean_dec.exit11: ; preds = %26, %25, %23 %27 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lean_Server_Completion_getEligibleHeaderDecls___spec__2(ptr noundef %0, ptr noundef %1, i64 noundef %.val, i64 noundef %.val17, ptr noundef %4, ptr noundef %5) %28 = ptrtoint ptr %1 to i64 %29 = and i64 %28, 1 @@ -4020,56 +4008,44 @@ lean_dec.exit: ; preds = %132, %131, %129, %l define ptr @l_Array_foldlMUnsafe_fold___at_Lean_Server_Completion_forEligibleDeclsM___spec__4___rarg___lambda__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #0 { %7 = getelementptr i8, ptr %0, i64 8 %.val13 = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %0 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit10 + %8 = load i32, ptr %0, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !11 10: ; preds = %6 - %11 = load i32, ptr %0, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !11 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %0, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit10 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit10, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %16, %15, %13, %6 +lean_dec.exit10: ; preds = %16, %15, %10 %17 = getelementptr i8, ptr %4, i64 8 %.val = load i64, ptr %17, align 8, !tbaa !12 - %18 = ptrtoint ptr %4 to i64 - %19 = and i64 %18, 1 - %.not14 = icmp eq i64 %19, 0 - br i1 %.not14, label %20, label %lean_dec.exit + %15 = load i32, ptr %4, align 8, !tbaa !4 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !11 -20: ; preds = %lean_dec.exit10 - %21 = load i32, ptr %4, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !11 - -23: ; preds = %20 - %24 = add nsw i32 %21, -1 +23: ; preds = %lean_dec.exit10 + %24 = add nsw i32 %15, -1 store i32 %24, ptr %4, align 4, !tbaa !4 br label %lean_dec.exit -25: ; preds = %20 - %.not.i11 = icmp eq i32 %21, 0 +25: ; preds = %lean_dec.exit10 + %.not.i11 = icmp eq i32 %15, 0 br i1 %.not.i11, label %lean_dec.exit, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %4) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %26, %25, %23, %lean_dec.exit10 +lean_dec.exit: ; preds = %26, %25, %23 %27 = add i64 %.val13, 1 %28 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lean_Server_Completion_forEligibleDeclsM___spec__4___rarg(ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %27, i64 noundef %.val, ptr noundef %5) ret ptr %28 @@ -4103,56 +4079,44 @@ lean_alloc_closure.exit: ; preds = %1 define ptr @l_Array_foldlMUnsafe_fold___at_Lean_Server_Completion_forEligibleDeclsM___spec__4___rarg___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #0 { %7 = getelementptr i8, ptr %3, i64 8 %.val13 = load i64, ptr %7, align 8, !tbaa !12 - %8 = ptrtoint ptr %3 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit10 + %8 = load i32, ptr %3, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !11 10: ; preds = %6 - %11 = load i32, ptr %3, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !11 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %3, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit10 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit10, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #3 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %16, %15, %13, %6 +lean_dec.exit10: ; preds = %16, %15, %10 %17 = getelementptr i8, ptr %4, i64 8 %.val = load i64, ptr %17, align 8, !tbaa !12 - %18 = ptrtoint ptr %4 to i64 - %19 = and i64 %18, 1 - %.not14 = icmp eq i64 %19, 0 - br i1 %.not14, label %20, label %lean_dec.exit - -20: ; preds = %lean_dec.exit10 - %21 = load i32, ptr %4, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !11 + %15 = load i32, ptr %4, align 8, !tbaa !4 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !11 -23: ; preds = %20 - %24 = add nsw i32 %21, -1 +23: ; preds = %lean_dec.exit10 + %24 = add nsw i32 %15, -1 store i32 %24, ptr %4, align 4, !tbaa !4 br label %lean_dec.exit -25: ; preds = %20 - %.not.i11 = icmp eq i32 %21, 0 +25: ; preds = %lean_dec.exit10 + %.not.i11 = icmp eq i32 %15, 0 br i1 %.not.i11, label %lean_dec.exit, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %4) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %26, %25, %23, %lean_dec.exit10 +lean_dec.exit: ; preds = %26, %25, %23 %27 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lean_Server_Completion_forEligibleDeclsM___spec__4___rarg(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %.val13, i64 noundef %.val, ptr noundef %5) ret ptr %27 } diff --git a/bench/lean4/optimized/ElimDeadVars.ll b/bench/lean4/optimized/ElimDeadVars.ll index f08957a144d..607ea73ef69 100644 --- a/bench/lean4/optimized/ElimDeadVars.ll +++ b/bench/lean4/optimized/ElimDeadVars.ll @@ -1143,13 +1143,7 @@ lean_alloc_ctor.exit: ; preds = %lean_dec.exit store ptr %57, ptr %107, align 8, !tbaa !4 %108 = getelementptr inbounds nuw i8, ptr %101, i64 32 store ptr %100, ptr %108, align 8, !tbaa !4 - %109 = ptrtoint ptr %101 to i64 - %110 = and i64 %109, 1 - %.not.i80 = icmp eq i64 %110, 0 - br i1 %.not.i80, label %111, label %l_Lean_IR_reshapeWithoutDead.exit - -111: ; preds = %lean_alloc_ctor.exit - store i32 2, ptr %101, align 4, !tbaa !8 + store i32 2, ptr %101, align 8, !tbaa !8 br label %l_Lean_IR_reshapeWithoutDead.exit 112: ; preds = %lean_obj_tag.exit @@ -1170,8 +1164,8 @@ lean_alloc_ctor.exit: ; preds = %lean_dec.exit tail call void @lean_inc_ref_cold(ptr noundef nonnull %14) #3 br label %l_Lean_IR_reshapeWithoutDead.exit -l_Lean_IR_reshapeWithoutDead.exit: ; preds = %117, %116, %114, %lean_obj_tag.exit.thread, %111, %lean_alloc_ctor.exit, %50, %49, %47, %40 - %.sink100 = phi ptr [ %14, %40 ], [ %14, %47 ], [ %14, %49 ], [ %14, %50 ], [ %101, %lean_alloc_ctor.exit ], [ %101, %111 ], [ %14, %lean_obj_tag.exit.thread ], [ %14, %114 ], [ %14, %116 ], [ %14, %117 ] +l_Lean_IR_reshapeWithoutDead.exit: ; preds = %117, %116, %114, %lean_obj_tag.exit.thread, %lean_alloc_ctor.exit, %50, %49, %47, %40 + %.sink100 = phi ptr [ %14, %40 ], [ %14, %47 ], [ %14, %49 ], [ %14, %50 ], [ %101, %lean_alloc_ctor.exit ], [ %14, %lean_obj_tag.exit.thread ], [ %14, %111 ], [ %14, %113 ], [ %14, %114 ] %118 = tail call ptr @l_Lean_IR_FnBody_freeIndices(ptr noundef %.sink100) #3 %119 = tail call ptr @l_Lean_IR_reshapeWithoutDead_reshape(ptr noundef %33, ptr noundef %.sink100, ptr noundef %118) ret ptr %119 @@ -1617,56 +1611,44 @@ declare ptr @l_Lean_IR_FnBody_flatten(ptr noundef) local_unnamed_addr #1 define ptr @l_Array_mapMUnsafe_map___at_Lean_IR_FnBody_elimDead___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !11 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !13 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !13 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val10 = load i64, ptr %14, align 8, !tbaa !11 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !8 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !13 + %12 = load i32, ptr %1, align 8, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !13 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_IR_FnBody_elimDead___spec__1(i64 noundef %.val, i64 noundef %.val10, ptr noundef %2) ret ptr %24 } @@ -1675,56 +1657,44 @@ lean_dec.exit: ; preds = %23, %22, %20, %lean define ptr @l_Array_mapMUnsafe_map___at_Lean_IR_FnBody_elimDead___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val10 = load i64, ptr %4, align 8, !tbaa !11 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !13 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !13 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %14, align 8, !tbaa !11 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !8 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !13 + %12 = load i32, ptr %1, align 8, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !13 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_IR_FnBody_elimDead___spec__2(i64 noundef %.val10, i64 noundef %.val, ptr noundef %2) ret ptr %24 } diff --git a/bench/lean4/optimized/EmbeddedConstraint.ll b/bench/lean4/optimized/EmbeddedConstraint.ll index 6ab461974f9..86fd2c85611 100644 --- a/bench/lean4/optimized/EmbeddedConstraint.ll +++ b/bench/lean4/optimized/EmbeddedConstraint.ll @@ -10546,56 +10546,44 @@ lean_dec.exit: ; preds = %32, %31, %29, %lean define ptr @l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_Tactic_BVDecide_Frontend_Normalize_embeddedConstraintPass___elambda__1___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) local_unnamed_addr #0 { %14 = getelementptr i8, ptr %3, i64 8 %.val = load i64, ptr %14, align 8, !tbaa !12 - %15 = ptrtoint ptr %3 to i64 - %16 = and i64 %15, 1 - %.not = icmp eq i64 %16, 0 - br i1 %.not, label %17, label %lean_dec.exit27 + %15 = load i32, ptr %3, align 8, !tbaa !8 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !11 17: ; preds = %13 - %18 = load i32, ptr %3, align 4, !tbaa !8 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 - -20: ; preds = %17 - %21 = add nsw i32 %18, -1 - store i32 %21, ptr %3, align 4, !tbaa !8 + %18 = add nsw i32 %15, -1 + store i32 %18, ptr %3, align 4, !tbaa !8 br label %lean_dec.exit27 -22: ; preds = %17 - %.not.i = icmp eq i32 %18, 0 +22: ; preds = %13 + %.not.i = icmp eq i32 %15, 0 br i1 %.not.i, label %lean_dec.exit27, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #4 br label %lean_dec.exit27 -lean_dec.exit27: ; preds = %23, %22, %20, %13 +lean_dec.exit27: ; preds = %23, %22, %17 %24 = getelementptr i8, ptr %4, i64 8 %.val40 = load i64, ptr %24, align 8, !tbaa !12 - %25 = ptrtoint ptr %4 to i64 - %26 = and i64 %25, 1 - %.not41 = icmp eq i64 %26, 0 - br i1 %.not41, label %27, label %lean_dec.exit26 - -27: ; preds = %lean_dec.exit27 - %28 = load i32, ptr %4, align 4, !tbaa !8 - %29 = icmp sgt i32 %28, 1 - br i1 %29, label %30, label %32, !prof !11 + %22 = load i32, ptr %4, align 8, !tbaa !8 + %23 = icmp sgt i32 %22, 1 + br i1 %23, label %24, label %26, !prof !11 -30: ; preds = %27 - %31 = add nsw i32 %28, -1 +30: ; preds = %lean_dec.exit27 + %31 = add nsw i32 %22, -1 store i32 %31, ptr %4, align 4, !tbaa !8 br label %lean_dec.exit26 -32: ; preds = %27 - %.not.i28 = icmp eq i32 %28, 0 +32: ; preds = %lean_dec.exit27 + %.not.i28 = icmp eq i32 %22, 0 br i1 %.not.i28, label %lean_dec.exit26, label %33 33: ; preds = %32 tail call void @lean_dec_ref_cold(ptr noundef nonnull %4) #4 br label %lean_dec.exit26 -lean_dec.exit26: ; preds = %33, %32, %30, %lean_dec.exit27 +lean_dec.exit26: ; preds = %33, %32, %30 %34 = tail call ptr @l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_Tactic_BVDecide_Frontend_Normalize_embeddedConstraintPass___elambda__1___spec__1(ptr poison, ptr poison, ptr noundef %2, i64 noundef %.val, i64 noundef %.val40, ptr noundef %5, ptr poison, ptr poison, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) %35 = ptrtoint ptr %7 to i64 %36 = and i64 %35, 1 diff --git a/bench/lean4/optimized/Encode.ll b/bench/lean4/optimized/Encode.ll index 8c2f4898abd..5c8c491a7b2 100644 --- a/bench/lean4/optimized/Encode.ll +++ b/bench/lean4/optimized/Encode.ll @@ -204,30 +204,24 @@ lean_alloc_ctor.exit: ; preds = %1 define noalias nonnull ptr @l_Lake_instToTomlFloat___boxed(ptr noundef %0) local_unnamed_addr #0 { %2 = getelementptr i8, ptr %0, i64 8 %.val = load double, ptr %2, align 8, !tbaa !12 - %3 = ptrtoint ptr %0 to i64 - %4 = and i64 %3, 1 - %.not = icmp eq i64 %4, 0 - br i1 %.not, label %5, label %lean_dec.exit + %3 = load i32, ptr %0, align 8, !tbaa !4 + %4 = icmp sgt i32 %3, 1 + br i1 %4, label %5, label %10, !prof !11 5: ; preds = %1 - %6 = load i32, ptr %0, align 4, !tbaa !4 - %7 = icmp sgt i32 %6, 1 - br i1 %7, label %8, label %10, !prof !11 - -8: ; preds = %5 - %9 = add nsw i32 %6, -1 - store i32 %9, ptr %0, align 4, !tbaa !4 + %6 = add nsw i32 %3, -1 + store i32 %6, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit -10: ; preds = %5 - %.not.i = icmp eq i32 %6, 0 +10: ; preds = %1 + %.not.i = icmp eq i32 %3, 0 br i1 %.not.i, label %lean_dec.exit, label %11 11: ; preds = %10 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %11, %10, %8, %1 +lean_dec.exit: ; preds = %11, %10, %5 tail call void @lean_inc_heartbeat() #4 %12 = tail call noalias ptr @mi_malloc_small(i64 noundef 24) #4 %13 = icmp eq ptr %12, null @@ -520,56 +514,44 @@ lean_alloc_closure.exit: ; preds = %1 define ptr @l_Array_mapMUnsafe_map___at_Lake_instToTomlArray___spec__1___rarg___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 { %5 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !14 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit8 + %6 = load i32, ptr %1, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit8 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit8, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit8 -lean_dec.exit8: ; preds = %14, %13, %11, %4 +lean_dec.exit8: ; preds = %14, %13, %11 %15 = getelementptr i8, ptr %2, i64 8 %.val11 = load i64, ptr %15, align 8, !tbaa !14 - %16 = ptrtoint ptr %2 to i64 - %17 = and i64 %16, 1 - %.not12 = icmp eq i64 %17, 0 - br i1 %.not12, label %18, label %lean_dec.exit + %16 = load i32, ptr %2, align 8, !tbaa !4 + %17 = icmp sgt i32 %16, 1 + br i1 %14, label %15, label %17, !prof !11 18: ; preds = %lean_dec.exit8 - %19 = load i32, ptr %2, align 4, !tbaa !4 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !11 - -21: ; preds = %18 - %22 = add nsw i32 %19, -1 - store i32 %22, ptr %2, align 4, !tbaa !4 + %16 = add nsw i32 %13, -1 + store i32 %16, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit -23: ; preds = %18 - %.not.i9 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit8 + %.not.i9 = icmp eq i32 %13, 0 br i1 %.not.i9, label %lean_dec.exit, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %24, %23, %21, %lean_dec.exit8 +lean_dec.exit: ; preds = %24, %23, %18 %25 = tail call ptr @l_Array_mapMUnsafe_map___at_Lake_instToTomlArray___spec__1___rarg(ptr noundef %0, i64 noundef %.val, i64 noundef %.val11, ptr noundef %3) ret ptr %25 } @@ -1030,22 +1012,16 @@ lean_alloc_closure.exit: ; preds = %1 define ptr @l_Array_foldlMUnsafe_fold___at_Lake_Toml_encodeArray_x3f___spec__1___rarg___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 { %6 = getelementptr i8, ptr %2, i64 8 %.val16 = load i64, ptr %6, align 8, !tbaa !14 - %7 = ptrtoint ptr %2 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit11 + %7 = load i32, ptr %2, align 8, !tbaa !4 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !11 9: ; preds = %5 - %10 = load i32, ptr %2, align 4, !tbaa !4 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !11 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %2, align 4, !tbaa !4 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit11 -14: ; preds = %9 +14: ; preds = %5 %.not.i = icmp eq i32 %10, 0 br i1 %.not.i, label %lean_dec.exit11, label %15 @@ -1053,33 +1029,27 @@ define ptr @l_Array_foldlMUnsafe_fold___at_Lake_Toml_encodeArray_x3f___spec__1__ tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %15, %14, %12, %5 +lean_dec.exit11: ; preds = %15, %14, %12 %16 = getelementptr i8, ptr %3, i64 8 %.val = load i64, ptr %16, align 8, !tbaa !14 - %17 = ptrtoint ptr %3 to i64 - %18 = and i64 %17, 1 - %.not17 = icmp eq i64 %18, 0 - br i1 %.not17, label %19, label %lean_dec.exit10 - -19: ; preds = %lean_dec.exit11 - %20 = load i32, ptr %3, align 4, !tbaa !4 - %21 = icmp sgt i32 %20, 1 - br i1 %21, label %22, label %24, !prof !11 + %17 = load i32, ptr %3, align 8, !tbaa !4 + %15 = icmp sgt i32 %17, 1 + br i1 %15, label %16, label %18, !prof !11 -22: ; preds = %19 - %23 = add nsw i32 %20, -1 +22: ; preds = %lean_dec.exit11 + %23 = add nsw i32 %14, -1 store i32 %23, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit10 -24: ; preds = %19 - %.not.i12 = icmp eq i32 %20, 0 +24: ; preds = %lean_dec.exit11 + %.not.i12 = icmp eq i32 %14, 0 br i1 %.not.i12, label %lean_dec.exit10, label %25 25: ; preds = %24 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #4 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %25, %24, %22, %lean_dec.exit11 +lean_dec.exit10: ; preds = %25, %24, %22 %26 = tail call ptr @l_Array_foldlMUnsafe_fold___at_Lake_Toml_encodeArray_x3f___spec__1___rarg(ptr noundef %0, ptr noundef %1, i64 noundef %.val16, i64 noundef %.val, ptr noundef %4) %27 = ptrtoint ptr %1 to i64 %28 = and i64 %27, 1 diff --git a/bench/lean4/optimized/ExportAttr.ll b/bench/lean4/optimized/ExportAttr.ll index 9eb82b706f6..75b4d9d78d1 100644 --- a/bench/lean4/optimized/ExportAttr.ll +++ b/bench/lean4/optimized/ExportAttr.ll @@ -341,22 +341,16 @@ lean_inc.exit: ; preds = %13, %26 %39 = shl i64 %.val, 1 %40 = add i64 %39, -1 %41 = inttoptr i64 %40 to ptr - %42 = ptrtoint ptr %0 to i64 - %43 = and i64 %42, 1 - %.not104 = icmp eq i64 %43, 0 - br i1 %.not104, label %44, label %lean_inc.exit80 - -44: ; preds = %lean_inc.exit - %.val.i98 = load i32, ptr %0, align 4, !tbaa !5 - %45 = icmp sgt i32 %.val.i98, 0 - br i1 %45, label %46, label %48, !prof !10 - -46: ; preds = %44 - %47 = add nuw i32 %.val.i98, 1 - store i32 %47, ptr %0, align 4, !tbaa !5 + %.val.i98 = load i32, ptr %0, align 8, !tbaa !5 + %42 = icmp sgt i32 %.val.i98, 0 + br i1 %42, label %43, label %45, !prof !10 + +43: ; preds = %lean_inc.exit + %44 = add nuw i32 %.val.i98, 1 + store i32 %44, ptr %0, align 4, !tbaa !5 br label %lean_inc.exit80 -48: ; preds = %44 +48: ; preds = %lean_inc.exit %.not.i99 = icmp eq i32 %.val.i98, 0 br i1 %.not.i99, label %lean_inc.exit80, label %49 @@ -364,7 +358,7 @@ lean_inc.exit: ; preds = %13, %26 tail call void @lean_inc_ref_cold(ptr noundef nonnull %0) #3 br label %lean_inc.exit80 -lean_inc.exit80: ; preds = %49, %48, %46, %lean_inc.exit +lean_inc.exit80: ; preds = %49, %48, %43 tail call void @lean_inc_heartbeat() #3 %50 = tail call noalias ptr @mi_malloc_small(i64 noundef 32) #3 %51 = icmp eq ptr %50, null @@ -385,79 +379,70 @@ lean_alloc_ctor.exit: ; preds = %lean_inc.exit80 %56 = getelementptr inbounds nuw i8, ptr %50, i64 24 store ptr %41, ptr %56, align 8, !tbaa !13 %57 = tail call ptr @l_Substring_nextn(ptr noundef nonnull %50, ptr noundef nonnull inttoptr (i64 3 to ptr), ptr noundef nonnull inttoptr (i64 1 to ptr)) #3 - %58 = ptrtoint ptr %50 to i64 - %59 = and i64 %58, 1 - %.not105 = icmp eq i64 %59, 0 - br i1 %.not105, label %60, label %lean_dec.exit74 - -60: ; preds = %lean_alloc_ctor.exit - %61 = load i32, ptr %50, align 4, !tbaa !5 - %62 = icmp sgt i32 %61, 1 - br i1 %62, label %63, label %65, !prof !10 - -63: ; preds = %60 - %64 = add nsw i32 %61, -1 - store i32 %64, ptr %50, align 4, !tbaa !5 + %55 = load i32, ptr %50, align 8, !tbaa !5 + %56 = icmp sgt i32 %55, 1 + br i1 %56, label %57, label %59, !prof !10 + +57: ; preds = %lean_alloc_ctor.exit + %58 = add nsw i32 %55, -1 + store i32 %58, ptr %50, align 4, !tbaa !5 br label %lean_dec.exit74 -65: ; preds = %60 - %.not.i89 = icmp eq i32 %61, 0 +65: ; preds = %lean_alloc_ctor.exit + %.not.i89 = icmp eq i32 %55, 0 br i1 %.not.i89, label %lean_dec.exit74, label %66 66: ; preds = %65 tail call void @lean_dec_ref_cold(ptr noundef nonnull %50) #3 br label %lean_dec.exit74 -lean_dec.exit74: ; preds = %lean_alloc_ctor.exit, %63, %65, %66 +lean_dec.exit74: ; preds = %57, %65, %66 %67 = ptrtoint ptr %57 to i64 %68 = and i64 %67, 1 %.not106 = icmp eq i64 %68, 0 - br i1 %.not106, label %69, label %lean_dec.exit72, !prof !4 + br i1 %.not106, label %63, label %lean_dec.exit72, !prof !4 -69: ; preds = %lean_dec.exit74 - %70 = tail call ptr @lean_nat_big_add(ptr noundef nonnull inttoptr (i64 1 to ptr), ptr noundef %57) #3 - %71 = load i32, ptr %57, align 4, !tbaa !5 - %72 = icmp sgt i32 %71, 1 - br i1 %72, label %73, label %75, !prof !10 +75: ; preds = %lean_dec.exit74 + %64 = tail call ptr @lean_nat_big_add(ptr noundef nonnull inttoptr (i64 1 to ptr), ptr noundef %54) #3 + %65 = load i32, ptr %57, align 4, !tbaa !5 + %66 = icmp sgt i32 %65, 1 + br i1 %66, label %67, label %69, !prof !10 -73: ; preds = %69 - %74 = add nsw i32 %71, -1 - store i32 %74, ptr %57, align 4, !tbaa !5 +76: ; preds = %75 + %68 = add nsw i32 %65, -1 + store i32 %68, ptr %54, align 4, !tbaa !5 br label %lean_dec.exit72 -75: ; preds = %69 - %.not.i91 = icmp eq i32 %71, 0 - br i1 %.not.i91, label %lean_dec.exit72, label %76 +lean_dec.exit72: ; preds = %75 + %.not.i91 = icmp eq i32 %65, 0 + br i1 %.not.i91, label %lean_dec.exit72, label %70 -76: ; preds = %75 - tail call void @lean_dec_ref_cold(ptr noundef nonnull %57) #3 +70: ; preds = %69 + tail call void @lean_dec_ref_cold(ptr noundef nonnull %54) #3 br label %lean_dec.exit72 -lean_dec.exit72: ; preds = %lean_dec.exit74, %73, %75, %76 - %.0.i122 = phi ptr [ %70, %73 ], [ %70, %75 ], [ %70, %76 ], [ %57, %lean_dec.exit74 ] - %77 = tail call zeroext i8 @l_String_anyAux___at___private_Lean_Compiler_ExportAttr_0__Lean_isValidCppId___spec__1(ptr noundef nonnull %0, ptr noundef nonnull %41, ptr noundef %.0.i122) - br i1 %.not104, label %78, label %lean_dec.exit - -78: ; preds = %lean_dec.exit72 - %79 = load i32, ptr %0, align 4, !tbaa !5 - %80 = icmp sgt i32 %79, 1 - br i1 %80, label %81, label %83, !prof !10 +78: ; preds = %lean_dec.exit74, %67, %69, %70 + %.0.i122 = phi ptr [ %64, %67 ], [ %64, %69 ], [ %64, %70 ], [ %54, %lean_dec.exit74 ] + %71 = tail call zeroext i8 @l_String_anyAux___at___private_Lean_Compiler_ExportAttr_0__Lean_isValidCppId___spec__1(ptr noundef nonnull %0, ptr noundef nonnull %41, ptr noundef %.0.i122) + %72 = load i32, ptr %0, align 4, !tbaa !5 + %73 = icmp sgt i32 %72, 1 + br i1 %73, label %74, label %76, !prof !10 81: ; preds = %78 - %82 = add nsw i32 %79, -1 + %82 = add nsw i32 %72, -1 store i32 %82, ptr %0, align 4, !tbaa !5 br label %lean_dec.exit 83: ; preds = %78 - %.not.i95 = icmp eq i32 %79, 0 + %.not.i95 = icmp eq i32 %72, 0 br i1 %.not.i95, label %lean_dec.exit, label %84 84: ; preds = %83 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %84, %83, %81, %lean_dec.exit72 - %. = xor i8 %77, 1 +lean_dec.exit: ; preds = %84, %83, %81 + %. = xor i8 %71, 1 br label %lean_dec.exit79 lean_dec.exit79: ; preds = %28, %34, %36, %37, %.critedge71, %22, %24, %25, %.critedge, %9, %11, %12, %lean_dec.exit diff --git a/bench/lean4/optimized/External.ll b/bench/lean4/optimized/External.ll index a5461d3b221..b680ba398fc 100644 --- a/bench/lean4/optimized/External.ll +++ b/bench/lean4/optimized/External.ll @@ -6676,56 +6676,44 @@ lean_dec.exit: ; preds = %15, %14, %12, %2 define ptr @l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_BVDecide_External_ModelParser_parsePartialAssignment___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val10 = load i64, ptr %14, align 8, !tbaa !12 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !8 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 + %12 = load i32, ptr %1, align 8, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_BVDecide_External_ModelParser_parsePartialAssignment___spec__2(i64 noundef %.val, i64 noundef %.val10, ptr noundef %2) ret ptr %24 } diff --git a/bench/lean4/optimized/FVarSubset.ll b/bench/lean4/optimized/FVarSubset.ll index c2f4d3d8f36..a500638e77d 100644 --- a/bench/lean4/optimized/FVarSubset.ll +++ b/bench/lean4/optimized/FVarSubset.ll @@ -319,30 +319,24 @@ lean_alloc_closure.exit: ; preds = %28 %38 = getelementptr inbounds nuw i8, ptr %31, i64 24 store ptr %30, ptr %38, align 8, !tbaa !4 %39 = tail call ptr @lean_find_ext_expr(ptr noundef nonnull %31, ptr noundef %0) #3 - %40 = ptrtoint ptr %31 to i64 - %41 = and i64 %40, 1 - %.not = icmp eq i64 %41, 0 - br i1 %.not, label %42, label %lean_dec.exit19 + %40 = load i32, ptr %31, align 8, !tbaa !8 + %41 = icmp sgt i32 %40, 1 + br i1 %41, label %42, label %44, !prof !11 42: ; preds = %lean_alloc_closure.exit - %43 = load i32, ptr %31, align 4, !tbaa !8 - %44 = icmp sgt i32 %43, 1 - br i1 %44, label %45, label %47, !prof !11 - -45: ; preds = %42 - %46 = add nsw i32 %43, -1 - store i32 %46, ptr %31, align 4, !tbaa !8 + %43 = add nsw i32 %40, -1 + store i32 %43, ptr %31, align 4, !tbaa !8 br label %lean_dec.exit19 -47: ; preds = %42 - %.not.i24 = icmp eq i32 %43, 0 +47: ; preds = %lean_alloc_closure.exit + %.not.i24 = icmp eq i32 %40, 0 br i1 %.not.i24, label %lean_dec.exit19, label %48 48: ; preds = %47 tail call void @lean_dec_ref_cold(ptr noundef nonnull %31) #3 br label %lean_dec.exit19 -lean_dec.exit19: ; preds = %48, %47, %45, %lean_alloc_closure.exit +lean_dec.exit19: ; preds = %48, %47, %42 %49 = ptrtoint ptr %39 to i64 %50 = and i64 %49, 1 %.not.i28 = icmp eq i64 %50, 0 @@ -379,7 +373,7 @@ lean_obj_tag.exit.thread: ; preds = %lean_dec.exit19 br label %lean_dec.exit21 lean_dec.exit21: ; preds = %lean_obj_tag.exit, %57, %59, %60, %lean_obj_tag.exit.thread, %18, %24, %26, %27, %5, %11, %13, %14 - %.0 = phi i8 [ 1, %14 ], [ 1, %13 ], [ 1, %11 ], [ 1, %5 ], [ 0, %27 ], [ 0, %26 ], [ 0, %24 ], [ 0, %18 ], [ 1, %lean_obj_tag.exit.thread ], [ 0, %60 ], [ 0, %59 ], [ 0, %57 ], [ %spec.select, %lean_obj_tag.exit ] + %.0 = phi i8 [ 1, %14 ], [ 1, %13 ], [ 1, %11 ], [ 1, %5 ], [ 0, %27 ], [ 0, %26 ], [ 0, %24 ], [ 0, %18 ], [ 1, %lean_obj_tag.exit.thread ], [ 0, %57 ], [ 0, %56 ], [ 0, %54 ], [ %spec.select, %lean_obj_tag.exit ] ret i8 %.0 } diff --git a/bench/lean4/optimized/FVarSubst.ll b/bench/lean4/optimized/FVarSubst.ll index 4d610c97790..b743d72aa72 100644 --- a/bench/lean4/optimized/FVarSubst.ll +++ b/bench/lean4/optimized/FVarSubst.ll @@ -1529,23 +1529,17 @@ lean_alloc_closure.exit: ; preds = %26 %34 = getelementptr inbounds nuw i8, ptr %27, i64 24 store ptr %0, ptr %34, align 8, !tbaa !10 %35 = tail call ptr @lean_replace_expr(ptr noundef nonnull %27, ptr noundef %1) #3 - %36 = ptrtoint ptr %27 to i64 - %37 = and i64 %36, 1 - %.not28 = icmp eq i64 %37, 0 - br i1 %.not28, label %38, label %lean_inc.exit18 + %36 = load i32, ptr %27, align 8, !tbaa !4 + %37 = icmp sgt i32 %36, 1 + br i1 %37, label %38, label %40, !prof !9 38: ; preds = %lean_alloc_closure.exit - %39 = load i32, ptr %27, align 4, !tbaa !4 - %40 = icmp sgt i32 %39, 1 - br i1 %40, label %41, label %43, !prof !9 - -41: ; preds = %38 - %42 = add nsw i32 %39, -1 - store i32 %42, ptr %27, align 4, !tbaa !4 + %39 = add nsw i32 %36, -1 + store i32 %39, ptr %27, align 4, !tbaa !4 br label %lean_inc.exit18 -43: ; preds = %38 - %.not.i19 = icmp eq i32 %39, 0 +43: ; preds = %lean_alloc_closure.exit + %.not.i19 = icmp eq i32 %36, 0 br i1 %.not.i19, label %lean_inc.exit18, label %44 44: ; preds = %43 @@ -1600,8 +1594,8 @@ lean_dec.exit: ; preds = %54, %53, %51, %45 tail call void @lean_inc_ref_cold(ptr noundef nonnull %1) #3 br label %lean_inc.exit18 -lean_inc.exit18: ; preds = %lean_dec.exit, %59, %61, %62, %lean_alloc_closure.exit, %41, %43, %44, %lean_dec.exit17, %22, %24, %25 - %.1 = phi ptr [ %1, %25 ], [ %1, %24 ], [ %1, %22 ], [ %1, %lean_dec.exit17 ], [ %35, %44 ], [ %35, %43 ], [ %35, %41 ], [ %35, %lean_alloc_closure.exit ], [ %1, %62 ], [ %1, %61 ], [ %1, %59 ], [ %1, %lean_dec.exit ] +lean_inc.exit18: ; preds = %lean_dec.exit, %59, %61, %62, %38, %43, %44, %lean_dec.exit17, %22, %24, %25 + %.1 = phi ptr [ %1, %25 ], [ %1, %24 ], [ %1, %22 ], [ %1, %lean_dec.exit17 ], [ %35, %41 ], [ %35, %40 ], [ %35, %38 ], [ %1, %59 ], [ %1, %58 ], [ %1, %56 ], [ %1, %lean_dec.exit ] ret ptr %.1 } diff --git a/bench/lean4/optimized/FilePath.ll b/bench/lean4/optimized/FilePath.ll index a6a759d10d2..b5424a96454 100644 --- a/bench/lean4/optimized/FilePath.ll +++ b/bench/lean4/optimized/FilePath.ll @@ -767,30 +767,24 @@ lean_inc.exit: %4 = add i64 %3, -1 %5 = inttoptr i64 %4 to ptr %6 = tail call ptr @l_Lake_modOfFilePath_removeExts(ptr noundef %1, ptr noundef nonnull %5, ptr noundef nonnull %5) - %7 = ptrtoint ptr %1 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit + %7 = load i32, ptr %1, align 8, !tbaa !8 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !11 9: ; preds = %lean_inc.exit - %10 = load i32, ptr %1, align 4, !tbaa !8 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !11 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %1, align 4, !tbaa !8 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %lean_inc.exit + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %15, %14, %12, %lean_inc.exit +lean_dec.exit: ; preds = %15, %14, %9 %16 = load ptr, ptr @l_Lake_joinRelative___closed__3, align 8, !tbaa !13 %17 = tail call ptr @l_String_stripSuffix(ptr noundef %6, ptr noundef %16) #3 %18 = tail call ptr @l_System_FilePath_components(ptr noundef %17) #3 diff --git a/bench/lean4/optimized/FindLevelMVar.ll b/bench/lean4/optimized/FindLevelMVar.ll index 8ee7631e28b..814e2d204d9 100644 --- a/bench/lean4/optimized/FindLevelMVar.ll +++ b/bench/lean4/optimized/FindLevelMVar.ll @@ -2246,56 +2246,44 @@ lean_dec.exit45: ; preds = %lean_dec.exit39, %3 define ptr @l_Array_foldrMUnsafe_fold___at_Lean_FindLevelMVar_main___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 { %7 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %7, align 8, !tbaa !14 - %8 = ptrtoint ptr %2 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit12 + %8 = load i32, ptr %2, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !9 10: ; preds = %6 - %11 = load i32, ptr %2, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !9 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %2, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit12 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit12, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #3 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %16, %15, %13, %6 +lean_dec.exit12: ; preds = %16, %15, %10 %17 = getelementptr i8, ptr %3, i64 8 %.val17 = load i64, ptr %17, align 8, !tbaa !14 - %18 = ptrtoint ptr %3 to i64 - %19 = and i64 %18, 1 - %.not18 = icmp eq i64 %19, 0 - br i1 %.not18, label %20, label %lean_dec.exit11 - -20: ; preds = %lean_dec.exit12 - %21 = load i32, ptr %3, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !9 - -23: ; preds = %20 - %24 = add nsw i32 %21, -1 - store i32 %24, ptr %3, align 4, !tbaa !4 + %15 = load i32, ptr %3, align 8, !tbaa !4 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !9 + +17: ; preds = %lean_dec.exit12 + %18 = add nsw i32 %15, -1 + store i32 %18, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit11 -25: ; preds = %20 - %.not.i13 = icmp eq i32 %21, 0 +25: ; preds = %lean_dec.exit12 + %.not.i13 = icmp eq i32 %15, 0 br i1 %.not.i13, label %lean_dec.exit11, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #3 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %26, %25, %23, %lean_dec.exit12 +lean_dec.exit11: ; preds = %26, %25, %17 %27 = tail call ptr @l_Array_foldrMUnsafe_fold___at_Lean_FindLevelMVar_main___spec__2(ptr noundef %0, ptr noundef %1, i64 noundef %.val, i64 noundef %.val17, ptr noundef %4, ptr noundef %5) %28 = ptrtoint ptr %1 to i64 %29 = and i64 %28, 1 @@ -2328,56 +2316,44 @@ lean_dec.exit: ; preds = %36, %35, %33, %lean define ptr @l_Array_foldrMUnsafe_fold___at_Lean_FindLevelMVar_main___spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 { %7 = getelementptr i8, ptr %2, i64 8 %.val17 = load i64, ptr %7, align 8, !tbaa !14 - %8 = ptrtoint ptr %2 to i64 - %9 = and i64 %8, 1 - %.not = icmp eq i64 %9, 0 - br i1 %.not, label %10, label %lean_dec.exit12 + %8 = load i32, ptr %2, align 8, !tbaa !4 + %9 = icmp sgt i32 %8, 1 + br i1 %9, label %10, label %12, !prof !9 10: ; preds = %6 - %11 = load i32, ptr %2, align 4, !tbaa !4 - %12 = icmp sgt i32 %11, 1 - br i1 %12, label %13, label %15, !prof !9 - -13: ; preds = %10 - %14 = add nsw i32 %11, -1 - store i32 %14, ptr %2, align 4, !tbaa !4 + %11 = add nsw i32 %8, -1 + store i32 %11, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit12 -15: ; preds = %10 - %.not.i = icmp eq i32 %11, 0 +15: ; preds = %6 + %.not.i = icmp eq i32 %8, 0 br i1 %.not.i, label %lean_dec.exit12, label %16 16: ; preds = %15 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #3 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %16, %15, %13, %6 +lean_dec.exit12: ; preds = %16, %15, %10 %17 = getelementptr i8, ptr %3, i64 8 %.val = load i64, ptr %17, align 8, !tbaa !14 - %18 = ptrtoint ptr %3 to i64 - %19 = and i64 %18, 1 - %.not18 = icmp eq i64 %19, 0 - br i1 %.not18, label %20, label %lean_dec.exit11 - -20: ; preds = %lean_dec.exit12 - %21 = load i32, ptr %3, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !9 - -23: ; preds = %20 - %24 = add nsw i32 %21, -1 - store i32 %24, ptr %3, align 4, !tbaa !4 + %15 = load i32, ptr %3, align 8, !tbaa !4 + %16 = icmp sgt i32 %15, 1 + br i1 %16, label %17, label %19, !prof !9 + +17: ; preds = %lean_dec.exit12 + %18 = add nsw i32 %15, -1 + store i32 %18, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit11 -25: ; preds = %20 - %.not.i13 = icmp eq i32 %21, 0 +25: ; preds = %lean_dec.exit12 + %.not.i13 = icmp eq i32 %15, 0 br i1 %.not.i13, label %lean_dec.exit11, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #3 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %26, %25, %23, %lean_dec.exit12 +lean_dec.exit11: ; preds = %26, %25, %17 %27 = tail call ptr @l_Array_foldrMUnsafe_fold___at_Lean_FindLevelMVar_main___spec__3(ptr noundef %0, ptr noundef %1, i64 noundef %.val17, i64 noundef %.val, ptr noundef %4, ptr noundef %5) %28 = ptrtoint ptr %1 to i64 %29 = and i64 %28, 1 diff --git a/bench/lean4/optimized/ForEachExprWhere.ll b/bench/lean4/optimized/ForEachExprWhere.ll index 941ae5dc21a..a68a80c580a 100644 --- a/bench/lean4/optimized/ForEachExprWhere.ll +++ b/bench/lean4/optimized/ForEachExprWhere.ll @@ -675,30 +675,24 @@ lean_dec.exit: ; preds = %134, %133, %131, %l define noalias noundef nonnull ptr @l_Lean_ForEachExprWhere_visited___rarg___lambda__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !13 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %3 +lean_dec.exit: ; preds = %13, %12, %7 %14 = tail call ptr @l_Lean_ForEachExprWhere_visited___rarg___lambda__1(i64 noundef %.val, ptr noundef %1, ptr noundef %2) ret ptr %14 } @@ -3582,58 +3576,46 @@ lean_dec.exit: ; preds = %161, %160, %158, %l define noalias noundef nonnull ptr @l_Lean_ForEachExprWhere_checked___rarg___lambda__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 { %5 = getelementptr i8, ptr %0, i64 8 %.val11 = load i64, ptr %5, align 8, !tbaa !13 - %6 = ptrtoint ptr %0 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit8 + %6 = load i32, ptr %0, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %4 - %9 = load i32, ptr %0, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %0, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit8 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit8, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit8 -lean_dec.exit8: ; preds = %14, %13, %11, %4 +lean_dec.exit8: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %15, align 8, !tbaa !13 - %16 = ptrtoint ptr %1 to i64 - %17 = and i64 %16, 1 - %.not12 = icmp eq i64 %17, 0 - br i1 %.not12, label %18, label %lean_dec.exit - -18: ; preds = %lean_dec.exit8 - %19 = load i32, ptr %1, align 4, !tbaa !4 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !11 + %13 = load i32, ptr %1, align 8, !tbaa !4 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !11 -21: ; preds = %18 - %22 = add nsw i32 %19, -1 +21: ; preds = %lean_dec.exit8 + %22 = add nsw i32 %13, -1 store i32 %22, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -23: ; preds = %18 - %.not.i9 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit8 + %.not.i9 = icmp eq i32 %13, 0 br i1 %.not.i9, label %lean_dec.exit, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %24, %23, %21, %lean_dec.exit8 +lean_dec.exit: ; preds = %24, %23, %21 %25 = tail call ptr @l_Lean_ForEachExprWhere_checked___rarg___lambda__1(i64 noundef %.val11, i64 noundef %.val, ptr noundef %2, ptr noundef %3) - ret ptr %25 + ret ptr %112 } ; Function Attrs: nounwind uwtable diff --git a/bench/lean4/optimized/GeneralizeTelescope.ll b/bench/lean4/optimized/GeneralizeTelescope.ll index ccc89cf2394..dd40718305b 100644 --- a/bench/lean4/optimized/GeneralizeTelescope.ll +++ b/bench/lean4/optimized/GeneralizeTelescope.ll @@ -5586,56 +5586,44 @@ lean_alloc_closure.exit: ; preds = %1 define ptr @l_Array_mapMUnsafe_map___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !4 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !9 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !12 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !9 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !12 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !9 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !12 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val10 = load i64, ptr %14, align 8, !tbaa !4 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !9 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !12 + %12 = load i32, ptr %1, align 8, !tbaa !9 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !12 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !9 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_Meta_GeneralizeTelescope_generalizeTelescopeAux___spec__1(i64 noundef %.val, i64 noundef %.val10, ptr noundef %2) ret ptr %24 } @@ -6883,22 +6871,16 @@ lean_alloc_closure.exit: ; preds = %1 define ptr @l_Array_mapMUnsafe_map___at_Lean_Meta_generalizeTelescope___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #0 { %9 = getelementptr i8, ptr %0, i64 8 %.val15 = load i64, ptr %9, align 8, !tbaa !4 - %10 = ptrtoint ptr %0 to i64 - %11 = and i64 %10, 1 - %.not = icmp eq i64 %11, 0 - br i1 %.not, label %12, label %lean_dec.exit12 + %10 = load i32, ptr %0, align 8, !tbaa !9 + %11 = icmp sgt i32 %10, 1 + br i1 %11, label %12, label %20, !prof !12 12: ; preds = %8 - %13 = load i32, ptr %0, align 4, !tbaa !9 - %14 = icmp sgt i32 %13, 1 - br i1 %14, label %15, label %17, !prof !12 - -15: ; preds = %12 - %16 = add nsw i32 %13, -1 - store i32 %16, ptr %0, align 4, !tbaa !9 + %13 = add nsw i32 %10, -1 + store i32 %13, ptr %0, align 4, !tbaa !12 br label %lean_dec.exit12 -17: ; preds = %12 +17: ; preds = %8 %.not.i = icmp eq i32 %13, 0 br i1 %.not.i, label %lean_dec.exit12, label %18 @@ -6906,25 +6888,19 @@ define ptr @l_Array_mapMUnsafe_map___at_Lean_Meta_generalizeTelescope___spec__1_ tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %18, %17, %15, %8 +lean_dec.exit12: ; preds = %18, %17, %12 %19 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %19, align 8, !tbaa !4 - %20 = ptrtoint ptr %1 to i64 - %21 = and i64 %20, 1 - %.not16 = icmp eq i64 %21, 0 - br i1 %.not16, label %22, label %lean_dec.exit - -22: ; preds = %lean_dec.exit12 - %23 = load i32, ptr %1, align 4, !tbaa !9 - %24 = icmp sgt i32 %23, 1 - br i1 %24, label %25, label %27, !prof !12 - -25: ; preds = %22 - %26 = add nsw i32 %23, -1 - store i32 %26, ptr %1, align 4, !tbaa !9 + %17 = load i32, ptr %1, align 8, !tbaa !9 + %18 = icmp sgt i32 %23, 1 + br i1 %18, label %19, label %21, !prof !12 + +19: ; preds = %lean_dec.exit12 + %20 = add nsw i32 %17, -1 + store i32 %20, ptr %1, align 4, !tbaa !9 br label %lean_dec.exit -27: ; preds = %22 +27: ; preds = %lean_dec.exit12 %.not.i13 = icmp eq i32 %23, 0 br i1 %.not.i13, label %lean_dec.exit, label %28 @@ -6932,7 +6908,7 @@ lean_dec.exit12: ; preds = %18, %17, %15, %8 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %28, %27, %25, %lean_dec.exit12 +lean_dec.exit: ; preds = %28, %27, %112 %29 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_Meta_generalizeTelescope___spec__1(i64 noundef %.val15, i64 noundef %.val, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) ret ptr %29 } diff --git a/bench/lean4/optimized/HasConstCache.ll b/bench/lean4/optimized/HasConstCache.ll index 6fbdc860109..1ccebf3001b 100644 --- a/bench/lean4/optimized/HasConstCache.ll +++ b/bench/lean4/optimized/HasConstCache.ll @@ -5000,56 +5000,44 @@ lean_alloc_ctor.exit610: ; preds = %lean_dec.exit define noundef nonnull ptr @l_Array_anyMUnsafe_any___at_Lean_HasConstCache_containsUnsafe___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 { %5 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !11 - %6 = ptrtoint ptr %2 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit13 + %6 = load i32, ptr %2, align 8, !tbaa !8 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !13 8: ; preds = %4 - %9 = load i32, ptr %2, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !13 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %2, align 4, !tbaa !8 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %2, align 4, !tbaa !8 br label %lean_dec.exit13 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit13, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit13 -lean_dec.exit13: ; preds = %14, %13, %11, %4 +lean_dec.exit13: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %3, i64 8 %.val20 = load i64, ptr %15, align 8, !tbaa !11 - %16 = ptrtoint ptr %3 to i64 - %17 = and i64 %16, 1 - %.not22 = icmp eq i64 %17, 0 - br i1 %.not22, label %18, label %lean_dec.exit12 - -18: ; preds = %lean_dec.exit13 - %19 = load i32, ptr %3, align 4, !tbaa !8 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !13 - -21: ; preds = %18 - %22 = add nsw i32 %19, -1 - store i32 %22, ptr %3, align 4, !tbaa !8 + %13 = load i32, ptr %3, align 8, !tbaa !8 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !13 + +15: ; preds = %lean_dec.exit13 + %16 = add nsw i32 %13, -1 + store i32 %16, ptr %3, align 4, !tbaa !8 br label %lean_dec.exit12 -23: ; preds = %18 - %.not.i14 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit13 + %.not.i14 = icmp eq i32 %13, 0 br i1 %.not.i14, label %lean_dec.exit12, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #4 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %24, %23, %21, %lean_dec.exit13 +lean_dec.exit12: ; preds = %24, %23, %15 %.not25.i = icmp eq i64 %.val, %.val20 br i1 %.not25.i, label %l_Array_anyMUnsafe_any___at_Lean_HasConstCache_containsUnsafe___spec__2.exit, label %.lr.ph.i @@ -5063,7 +5051,7 @@ lean_dec.exit12: ; preds = %24, %23, %21, %lean br i1 %.not.i21, label %l_Array_anyMUnsafe_any___at_Lean_HasConstCache_containsUnsafe___spec__2.exit, label %28 28: ; preds = %26, %.lr.ph.i - %.01526.i = phi i64 [ %.val, %.lr.ph.i ], [ %27, %26 ] + %.01526.i = phi i64 [ %.val, %.lr.ph.i ], [ %27, %20 ] %29 = getelementptr inbounds nuw ptr, ptr %25, i64 %.01526.i %30 = load ptr, ptr %29, align 8, !tbaa !4 %31 = ptrtoint ptr %30 to i64 @@ -5113,12 +5101,12 @@ lean_array_uget.exit.i: ; preds = %28 br label %lean_dec.exit.i lean_dec.exit.i: ; preds = %47, %46, %44, %lean_array_uget.exit.i - %48 = phi i8 [ %39, %lean_array_uget.exit.i ], [ %41, %44 ], [ %41, %46 ], [ %41, %47 ] + %48 = phi i8 [ %39, %lean_array_uget.exit.i ], [ %41, %38 ], [ %41, %40 ], [ %41, %41 ] %49 = icmp eq i8 %48, 0 br i1 %49, label %26, label %l_Array_anyMUnsafe_any___at_Lean_HasConstCache_containsUnsafe___spec__2.exit l_Array_anyMUnsafe_any___at_Lean_HasConstCache_containsUnsafe___spec__2.exit: ; preds = %26, %lean_dec.exit.i, %lean_dec.exit12 - %.2.ph.i = phi i64 [ 1, %lean_dec.exit12 ], [ 1, %26 ], [ 3, %lean_dec.exit.i ] + %.2.ph.i = phi i64 [ 1, %lean_dec.exit12 ], [ 1, %20 ], [ 3, %lean_dec.exit.i ] %50 = ptrtoint ptr %1 to i64 %51 = and i64 %50, 1 %.not23 = icmp eq i64 %51, 0 diff --git a/bench/lean4/optimized/IndGroupInfo.ll b/bench/lean4/optimized/IndGroupInfo.ll index c00e7e89859..aa08291790d 100644 --- a/bench/lean4/optimized/IndGroupInfo.ll +++ b/bench/lean4/optimized/IndGroupInfo.ll @@ -5415,56 +5415,44 @@ lean_alloc_ctor.exit: ; preds = %lean_dec.exit define ptr @l_Array_anyMUnsafe_any___at_Lean_Elab_Structural_IndGroupInst_isDefEq___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #0 { %9 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %9, align 8, !tbaa !13 - %10 = ptrtoint ptr %1 to i64 - %11 = and i64 %10, 1 - %.not = icmp eq i64 %11, 0 - br i1 %.not, label %12, label %lean_dec.exit14 + %10 = load i32, ptr %1, align 8, !tbaa !5 + %11 = icmp sgt i32 %10, 1 + br i1 %11, label %12, label %14, !prof !10 12: ; preds = %8 - %13 = load i32, ptr %1, align 4, !tbaa !5 - %14 = icmp sgt i32 %13, 1 - br i1 %14, label %15, label %17, !prof !10 - -15: ; preds = %12 - %16 = add nsw i32 %13, -1 - store i32 %16, ptr %1, align 4, !tbaa !5 + %13 = add nsw i32 %10, -1 + store i32 %13, ptr %1, align 4, !tbaa !5 br label %lean_dec.exit14 -17: ; preds = %12 - %.not.i = icmp eq i32 %13, 0 +17: ; preds = %8 + %.not.i = icmp eq i32 %10, 0 br i1 %.not.i, label %lean_dec.exit14, label %18 18: ; preds = %17 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit14 -lean_dec.exit14: ; preds = %18, %17, %15, %8 +lean_dec.exit14: ; preds = %18, %17, %15 %19 = getelementptr i8, ptr %2, i64 8 %.val19 = load i64, ptr %19, align 8, !tbaa !13 - %20 = ptrtoint ptr %2 to i64 - %21 = and i64 %20, 1 - %.not20 = icmp eq i64 %21, 0 - br i1 %.not20, label %22, label %lean_dec.exit13 - -22: ; preds = %lean_dec.exit14 - %23 = load i32, ptr %2, align 4, !tbaa !5 - %24 = icmp sgt i32 %23, 1 - br i1 %24, label %25, label %27, !prof !10 + %17 = load i32, ptr %2, align 8, !tbaa !5 + %18 = icmp sgt i32 %17, 1 + br i1 %18, label %19, label %21, !prof !10 -25: ; preds = %22 - %26 = add nsw i32 %23, -1 +25: ; preds = %lean_dec.exit14 + %26 = add nsw i32 %17, -1 store i32 %26, ptr %2, align 4, !tbaa !5 br label %lean_dec.exit13 -27: ; preds = %22 - %.not.i15 = icmp eq i32 %23, 0 +27: ; preds = %lean_dec.exit14 + %.not.i15 = icmp eq i32 %17, 0 br i1 %.not.i15, label %lean_dec.exit13, label %28 28: ; preds = %27 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit13 -lean_dec.exit13: ; preds = %28, %27, %25, %lean_dec.exit14 +lean_dec.exit13: ; preds = %28, %27, %25 %29 = tail call ptr @l_Array_anyMUnsafe_any___at_Lean_Elab_Structural_IndGroupInst_isDefEq___spec__1(ptr noundef %0, i64 noundef %.val, i64 noundef %.val19, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) %30 = ptrtoint ptr %0 to i64 %31 = and i64 %30, 1 @@ -5798,30 +5786,24 @@ define nonnull ptr @l_Lean_Elab_Structural_IndGroupInst_isDefEq___lambda__4___bo %4 = getelementptr inbounds nuw i8, ptr %0, i64 16 %5 = load ptr, ptr %4, align 8, !tbaa !11 %6 = tail call zeroext i8 @l_Lean_Level_isEquiv(ptr noundef %3, ptr noundef %5) #4 - %7 = ptrtoint ptr %0 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit + %7 = load i32, ptr %0, align 8, !tbaa !5 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !10 9: ; preds = %1 - %10 = load i32, ptr %0, align 4, !tbaa !5 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !10 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %0, align 4, !tbaa !5 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %0, align 4, !tbaa !5 br label %lean_dec.exit -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %1 + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %15, %14, %12, %1 +lean_dec.exit: ; preds = %15, %14, %9 %16 = zext i8 %6 to i64 %17 = shl nuw nsw i64 %16, 1 %18 = or disjoint i64 %17, 1 @@ -9595,56 +9577,44 @@ lean_dec.exit: ; preds = %17, %16, %14, %7 define ptr @l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_IndGroupInst_nestedTypeFormers___spec__5___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #0 { %9 = getelementptr i8, ptr %0, i64 8 %.val15 = load i64, ptr %9, align 8, !tbaa !13 - %10 = ptrtoint ptr %0 to i64 - %11 = and i64 %10, 1 - %.not = icmp eq i64 %11, 0 - br i1 %.not, label %12, label %lean_dec.exit12 + %10 = load i32, ptr %0, align 8, !tbaa !5 + %11 = icmp sgt i32 %10, 1 + br i1 %11, label %12, label %14, !prof !10 12: ; preds = %8 - %13 = load i32, ptr %0, align 4, !tbaa !5 - %14 = icmp sgt i32 %13, 1 - br i1 %14, label %15, label %17, !prof !10 - -15: ; preds = %12 - %16 = add nsw i32 %13, -1 - store i32 %16, ptr %0, align 4, !tbaa !5 + %13 = add nsw i32 %10, -1 + store i32 %13, ptr %0, align 4, !tbaa !5 br label %lean_dec.exit12 -17: ; preds = %12 - %.not.i = icmp eq i32 %13, 0 +17: ; preds = %8 + %.not.i = icmp eq i32 %10, 0 br i1 %.not.i, label %lean_dec.exit12, label %18 18: ; preds = %17 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #4 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %18, %17, %15, %8 +lean_dec.exit12: ; preds = %18, %17, %15 %19 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %19, align 8, !tbaa !13 - %20 = ptrtoint ptr %1 to i64 - %21 = and i64 %20, 1 - %.not16 = icmp eq i64 %21, 0 - br i1 %.not16, label %22, label %lean_dec.exit - -22: ; preds = %lean_dec.exit12 - %23 = load i32, ptr %1, align 4, !tbaa !5 - %24 = icmp sgt i32 %23, 1 - br i1 %24, label %25, label %27, !prof !10 + %17 = load i32, ptr %1, align 8, !tbaa !5 + %18 = icmp sgt i32 %17, 1 + br i1 %18, label %19, label %21, !prof !10 -25: ; preds = %22 - %26 = add nsw i32 %23, -1 +25: ; preds = %lean_dec.exit12 + %26 = add nsw i32 %17, -1 store i32 %26, ptr %1, align 4, !tbaa !5 br label %lean_dec.exit -27: ; preds = %22 - %.not.i13 = icmp eq i32 %23, 0 +27: ; preds = %lean_dec.exit12 + %.not.i13 = icmp eq i32 %17, 0 br i1 %.not.i13, label %lean_dec.exit, label %28 28: ; preds = %27 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %28, %27, %25, %lean_dec.exit12 +lean_dec.exit: ; preds = %28, %27, %25 %29 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_IndGroupInst_nestedTypeFormers___spec__5(i64 noundef %.val15, i64 noundef %.val, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) ret ptr %29 } diff --git a/bench/lean4/optimized/InitShutdown.ll b/bench/lean4/optimized/InitShutdown.ll index 9a75cf29c63..b62090bc4d2 100644 --- a/bench/lean4/optimized/InitShutdown.ll +++ b/bench/lean4/optimized/InitShutdown.ll @@ -3287,56 +3287,44 @@ declare ptr @l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonClientCapa define ptr @l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_523____spec__5___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #6 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val10 = load i64, ptr %14, align 8, !tbaa !12 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !4 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 + %12 = load i32, ptr %1, align 8, !tbaa !4 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #6 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_523____spec__5(i64 noundef %.val, i64 noundef %.val10, ptr noundef %2) ret ptr %24 } @@ -11731,56 +11719,44 @@ lean_dec.exit: ; preds = %12, %11, %9, %2 define ptr @l_Array_mapMUnsafe_map___at_Lean_Lsp_instFromJsonInitializeParams___spec__8___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val10 = load i64, ptr %4, align 8, !tbaa !12 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #6 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %14, align 8, !tbaa !12 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !4 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 + %12 = load i32, ptr %1, align 8, !tbaa !4 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !11 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #6 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at_Lean_Lsp_instFromJsonInitializeParams___spec__8(i64 noundef %.val10, i64 noundef %.val, ptr noundef %2) ret ptr %24 } diff --git a/bench/lean4/optimized/InlineCandidate.ll b/bench/lean4/optimized/InlineCandidate.ll index ee2f949eb36..68486ab152a 100644 --- a/bench/lean4/optimized/InlineCandidate.ll +++ b/bench/lean4/optimized/InlineCandidate.ll @@ -62,30 +62,24 @@ define nonnull ptr @l_Lean_Compiler_LCNF_Simp_InlineCandidateInfo_arity___boxed( %3 = load ptr, ptr %2, align 8, !tbaa !4 %4 = getelementptr i8, ptr %3, i64 8 %.val.i = load i64, ptr %4, align 8, !tbaa !8 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !10 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !13 7: ; preds = %1 - %8 = load i32, ptr %0, align 4, !tbaa !10 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !13 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !10 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !10 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %1 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %1 +lean_dec.exit: ; preds = %13, %12, %7 %14 = shl i64 %.val.i, 1 %15 = or disjoint i64 %14, 1 %16 = inttoptr i64 %15 to ptr diff --git a/bench/lean4/optimized/InputFileConfig.ll b/bench/lean4/optimized/InputFileConfig.ll index 828b7c8223c..813976d602a 100644 --- a/bench/lean4/optimized/InputFileConfig.ll +++ b/bench/lean4/optimized/InputFileConfig.ll @@ -1449,56 +1449,44 @@ declare ptr @l_Lean_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(ptr define ptr @l_Array_foldlMUnsafe_fold___at_Lake_InputFileConfig_instConfigMeta___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 { %5 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !13 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit10 + %6 = load i32, ptr %1, align 8, !tbaa !8 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !12 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !12 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !8 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !8 br label %lean_dec.exit10 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit10, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #7 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %14, %13, %11, %4 +lean_dec.exit10: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %2, i64 8 %.val15 = load i64, ptr %15, align 8, !tbaa !13 - %16 = ptrtoint ptr %2 to i64 - %17 = and i64 %16, 1 - %.not17 = icmp eq i64 %17, 0 - br i1 %.not17, label %18, label %lean_dec.exit9 + %13 = load i32, ptr %2, align 8, !tbaa !8 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !12 -18: ; preds = %lean_dec.exit10 - %19 = load i32, ptr %2, align 4, !tbaa !8 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !12 - -21: ; preds = %18 - %22 = add nsw i32 %19, -1 +21: ; preds = %lean_dec.exit10 + %22 = add nsw i32 %13, -1 store i32 %22, ptr %2, align 4, !tbaa !8 br label %lean_dec.exit9 -23: ; preds = %18 - %.not.i11 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit10 + %.not.i11 = icmp eq i32 %13, 0 br i1 %.not.i11, label %lean_dec.exit9, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #7 br label %lean_dec.exit9 -lean_dec.exit9: ; preds = %24, %23, %21, %lean_dec.exit10 +lean_dec.exit9: ; preds = %24, %23, %21 %.not28.i = icmp eq i64 %.val, %.val15 br i1 %.not28.i, label %l_Array_foldlMUnsafe_fold___at_Lake_InputFileConfig_instConfigMeta___spec__1.exit, label %.lr.ph.i @@ -1507,8 +1495,8 @@ lean_dec.exit9: ; preds = %24, %23, %21, %lean br label %26 26: ; preds = %47, %.lr.ph.i - %.01730.i = phi i64 [ %.val, %.lr.ph.i ], [ %49, %47 ] - %.01929.i = phi ptr [ %3, %.lr.ph.i ], [ %48, %47 ] + %.01730.i = phi i64 [ %.val, %.lr.ph.i ], [ %49, %41 ] + %.01929.i = phi ptr [ %3, %.lr.ph.i ], [ %48, %41 ] %27 = getelementptr inbounds nuw ptr, ptr %25, i64 %.01730.i %28 = load ptr, ptr %27, align 8, !tbaa !4 %29 = ptrtoint ptr %28 to i64 @@ -1567,7 +1555,7 @@ lean_array_uget.exit.i: ; preds = %36, %35, %33, %26 br i1 %.not.i16, label %l_Array_foldlMUnsafe_fold___at_Lake_InputFileConfig_instConfigMeta___spec__1.exit, label %26 l_Array_foldlMUnsafe_fold___at_Lake_InputFileConfig_instConfigMeta___spec__1.exit: ; preds = %47, %lean_dec.exit9 - %.019.lcssa.i = phi ptr [ %3, %lean_dec.exit9 ], [ %48, %47 ] + %.019.lcssa.i = phi ptr [ %3, %lean_dec.exit9 ], [ %48, %41 ] %50 = ptrtoint ptr %0 to i64 %51 = and i64 %50, 1 %.not18 = icmp eq i64 %51, 0 diff --git a/bench/lean4/optimized/InternalExceptionId.ll b/bench/lean4/optimized/InternalExceptionId.ll index eeb157ba0c3..547265d81d3 100644 --- a/bench/lean4/optimized/InternalExceptionId.ll +++ b/bench/lean4/optimized/InternalExceptionId.ll @@ -1041,56 +1041,44 @@ declare ptr @lean_string_append(ptr noundef, ptr noundef) local_unnamed_addr #1 define noundef nonnull ptr @l_Array_anyMUnsafe_any___at_Lean_registerInternalExceptionId___spec__2___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %2, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !13 - %6 = ptrtoint ptr %2 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit13 + %6 = load i32, ptr %2, align 8, !tbaa !5 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !10 8: ; preds = %4 - %9 = load i32, ptr %2, align 4, !tbaa !5 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !10 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %2, align 4, !tbaa !5 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %2, align 4, !tbaa !5 br label %lean_dec.exit13 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit13, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #4 br label %lean_dec.exit13 -lean_dec.exit13: ; preds = %14, %13, %11, %4 +lean_dec.exit13: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %3, i64 8 %.val20 = load i64, ptr %15, align 8, !tbaa !13 - %16 = ptrtoint ptr %3 to i64 - %17 = and i64 %16, 1 - %.not22 = icmp eq i64 %17, 0 - br i1 %.not22, label %18, label %lean_dec.exit12 - -18: ; preds = %lean_dec.exit13 - %19 = load i32, ptr %3, align 4, !tbaa !5 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !10 + %13 = load i32, ptr %3, align 8, !tbaa !5 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !10 -21: ; preds = %18 - %22 = add nsw i32 %19, -1 +21: ; preds = %lean_dec.exit13 + %22 = add nsw i32 %13, -1 store i32 %22, ptr %3, align 4, !tbaa !5 br label %lean_dec.exit12 -23: ; preds = %18 - %.not.i14 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit13 + %.not.i14 = icmp eq i32 %13, 0 br i1 %.not.i14, label %lean_dec.exit12, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #4 br label %lean_dec.exit12 -lean_dec.exit12: ; preds = %24, %23, %21, %lean_dec.exit13 +lean_dec.exit12: ; preds = %24, %23, %21 %.not25.i = icmp eq i64 %.val, %.val20 br i1 %.not25.i, label %l_Array_anyMUnsafe_any___at_Lean_registerInternalExceptionId___spec__2.exit, label %.lr.ph.i @@ -1104,29 +1092,29 @@ lean_dec.exit12: ; preds = %24, %23, %21, %lean br i1 %.not.i21, label %l_Array_anyMUnsafe_any___at_Lean_registerInternalExceptionId___spec__2.exit, label %28 28: ; preds = %26, %.lr.ph.i - %.01526.i = phi i64 [ %.val, %.lr.ph.i ], [ %27, %26 ] + %.01526.i = phi i64 [ %.val, %.lr.ph.i ], [ %27, %20 ] %29 = getelementptr inbounds nuw ptr, ptr %25, i64 %.01526.i %30 = load ptr, ptr %29, align 8, !tbaa !11 %31 = ptrtoint ptr %30 to i64 %32 = and i64 %31, 1 %.not.i20.i = icmp eq i64 %32, 0 - br i1 %.not.i20.i, label %33, label %lean_array_uget.exit.i + br i1 %.not.i20.i, label %27, label %lean_array_uget.exit.i -33: ; preds = %28 - %.val.i.i.i = load i32, ptr %30, align 4, !tbaa !5 - %34 = icmp sgt i32 %.val.i.i.i, 0 - br i1 %34, label %35, label %37, !prof !10 +27: ; preds = %22 + %.val.i.i.i = load i32, ptr %24, align 4, !tbaa !5 + %28 = icmp sgt i32 %.val.i.i.i, 0 + br i1 %28, label %29, label %31, !prof !10 -35: ; preds = %33 - %36 = add nuw i32 %.val.i.i.i, 1 - store i32 %36, ptr %30, align 4, !tbaa !5 - br label %40 +29: ; preds = %27 + %30 = add nuw i32 %.val.i.i.i, 1 + store i32 %30, ptr %24, align 4, !tbaa !5 + br label %34 -37: ; preds = %33 +33: ; preds = %27 %.not.i.i.i = icmp eq i32 %.val.i.i.i, 0 br i1 %.not.i.i.i, label %40, label %38 -38: ; preds = %37 +38: ; preds = %31 tail call void @lean_inc_ref_cold(ptr noundef nonnull %30) #4 br label %40 @@ -1134,7 +1122,7 @@ lean_array_uget.exit.i: ; preds = %28 %39 = tail call zeroext i8 @lean_name_eq(ptr noundef %0, ptr noundef %30) #4 br label %lean_dec.exit.i -40: ; preds = %38, %37, %35 +40: ; preds = %38, %31, %29 %41 = tail call zeroext i8 @lean_name_eq(ptr noundef %0, ptr noundef nonnull %30) #4 %42 = load i32, ptr %30, align 4, !tbaa !5 %43 = icmp sgt i32 %42, 1 @@ -1154,12 +1142,12 @@ lean_array_uget.exit.i: ; preds = %28 br label %lean_dec.exit.i lean_dec.exit.i: ; preds = %47, %46, %44, %lean_array_uget.exit.i - %48 = phi i8 [ %39, %lean_array_uget.exit.i ], [ %41, %44 ], [ %41, %46 ], [ %41, %47 ] + %48 = phi i8 [ %39, %lean_array_uget.exit.i ], [ %41, %38 ], [ %41, %40 ], [ %41, %41 ] %49 = icmp eq i8 %48, 0 br i1 %49, label %26, label %l_Array_anyMUnsafe_any___at_Lean_registerInternalExceptionId___spec__2.exit l_Array_anyMUnsafe_any___at_Lean_registerInternalExceptionId___spec__2.exit: ; preds = %26, %lean_dec.exit.i, %lean_dec.exit12 - %.2.ph.i = phi i64 [ 1, %lean_dec.exit12 ], [ 1, %26 ], [ 3, %lean_dec.exit.i ] + %.2.ph.i = phi i64 [ 1, %lean_dec.exit12 ], [ 1, %20 ], [ 3, %lean_dec.exit.i ] %50 = ptrtoint ptr %1 to i64 %51 = and i64 %50, 1 %.not23 = icmp eq i64 %51, 0 diff --git a/bench/lean4/optimized/Links.ll b/bench/lean4/optimized/Links.ll index 35aea76f649..03f73e20103 100644 --- a/bench/lean4/optimized/Links.ll +++ b/bench/lean4/optimized/Links.ll @@ -84,22 +84,16 @@ lean_inc.exit: %3 = shl i64 %.val, 1 %4 = add i64 %3, -1 %5 = inttoptr i64 %4 to ptr - %6 = ptrtoint ptr %0 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_inc.exit41 - -8: ; preds = %lean_inc.exit - %.val.i47 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %.val.i47, 0 - br i1 %9, label %10, label %12, !prof !11 + %.val.i47 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %.val.i47, 0 + br i1 %6, label %7, label %9, !prof !11 -10: ; preds = %8 +10: ; preds = %lean_inc.exit %11 = add nuw i32 %.val.i47, 1 store i32 %11, ptr %0, align 4, !tbaa !8 br label %lean_inc.exit41 -12: ; preds = %8 +12: ; preds = %lean_inc.exit %.not.i48 = icmp eq i32 %.val.i47, 0 br i1 %.not.i48, label %lean_inc.exit41, label %13 @@ -107,7 +101,7 @@ lean_inc.exit: tail call void @lean_inc_ref_cold(ptr noundef nonnull %0) #4 br label %lean_inc.exit41 -lean_inc.exit41: ; preds = %13, %12, %10, %lean_inc.exit +lean_inc.exit41: ; preds = %13, %12, %10 tail call void @lean_inc_heartbeat() #4 %14 = tail call noalias ptr @mi_malloc_small(i64 noundef 32) #4 %15 = icmp eq ptr %14, null @@ -126,62 +120,53 @@ lean_nat_sub.exit: ; preds = %lean_inc.exit41 %19 = getelementptr inbounds nuw i8, ptr %14, i64 16 store ptr inttoptr (i64 1 to ptr), ptr %19, align 8, !tbaa !12 %20 = getelementptr inbounds nuw i8, ptr %14, i64 24 - store ptr %5, ptr %20, align 8, !tbaa !12 + store ptr %5, ptr %110, align 8, !tbaa !12 %21 = load ptr, ptr @l_Lean_manualRoot___lambda__1___closed__2, align 8, !tbaa !12 %22 = tail call ptr @l_Substring_prevn(ptr noundef nonnull %14, ptr noundef %21, ptr noundef nonnull %5) #4 - %23 = ptrtoint ptr %14 to i64 - %24 = and i64 %23, 1 - %.not57 = icmp eq i64 %24, 0 - br i1 %.not57, label %25, label %lean_dec.exit - -25: ; preds = %lean_nat_sub.exit - %26 = load i32, ptr %14, align 4, !tbaa !8 - %27 = icmp sgt i32 %26, 1 - br i1 %27, label %28, label %30, !prof !11 + %20 = load i32, ptr %14, align 8, !tbaa !8 + %21 = icmp sgt i32 %20, 1 + br i1 %21, label %22, label %24, !prof !11 -28: ; preds = %25 - %29 = add nsw i32 %26, -1 +28: ; preds = %lean_nat_sub.exit + %29 = add nsw i32 %20, -1 store i32 %29, ptr %14, align 4, !tbaa !8 br label %lean_dec.exit -30: ; preds = %25 - %.not.i44 = icmp eq i32 %26, 0 +30: ; preds = %lean_nat_sub.exit + %.not.i44 = icmp eq i32 %20, 0 br i1 %.not.i44, label %lean_dec.exit, label %31 31: ; preds = %30 tail call void @lean_dec_ref_cold(ptr noundef nonnull %14) #4 br label %lean_dec.exit -lean_dec.exit: ; preds = %lean_nat_sub.exit, %28, %30, %31 +lean_dec.exit: ; preds = %28, %30, %31 %32 = ptrtoint ptr %22 to i64 %33 = and i64 %32, 1 %.not58 = icmp eq i64 %33, 0 - br i1 %.not58, label %34, label %lean_dec.exit43, !prof !14 + br i1 %.not58, label %40, label %lean_dec.exit43, !prof !14 -34: ; preds = %lean_dec.exit - %35 = tail call ptr @lean_nat_big_add(ptr noundef nonnull inttoptr (i64 1 to ptr), ptr noundef %22) #4 - %36 = load i32, ptr %22, align 4, !tbaa !8 - %37 = icmp sgt i32 %36, 1 - br i1 %37, label %38, label %40, !prof !11 +40: ; preds = %lean_dec.exit + %29 = tail call ptr @lean_nat_big_add(ptr noundef nonnull inttoptr (i64 1 to ptr), ptr noundef %19) #4 + %30 = load i32, ptr %19, align 4, !tbaa !8 + %31 = icmp sgt i32 %30, 1 + br i1 %31, label %32, label %34, !prof !11 -38: ; preds = %34 - %39 = add nsw i32 %36, -1 - store i32 %39, ptr %22, align 4, !tbaa !8 +41: ; preds = %40 + %33 = add nsw i32 %30, -1 + store i32 %33, ptr %19, align 4, !tbaa !8 br label %lean_dec.exit43 -40: ; preds = %34 - %.not.i = icmp eq i32 %36, 0 - br i1 %.not.i, label %lean_dec.exit43, label %41 +lean_dec.exit43: ; preds = %40 + %.not.i = icmp eq i32 %30, 0 + br i1 %.not.i, label %42, label %35 -41: ; preds = %40 - tail call void @lean_dec_ref_cold(ptr noundef nonnull %22) #4 +35: ; preds = %34 + tail call void @lean_dec_ref_cold(ptr noundef nonnull %19) #4 br label %lean_dec.exit43 -lean_dec.exit43: ; preds = %lean_dec.exit, %41, %40, %38 - %.0.i68 = phi ptr [ %35, %41 ], [ %35, %40 ], [ %35, %38 ], [ %22, %lean_dec.exit ] - br i1 %.not, label %42, label %lean_inc.exit42 - -42: ; preds = %lean_dec.exit43 +42: ; preds = %32, %34, %35, %lean_dec.exit + %.0.i68 = phi ptr [ %29, %35 ], [ %29, %34 ], [ %29, %32 ], [ %19, %lean_dec.exit ] %.val.i51 = load i32, ptr %0, align 4, !tbaa !8 %43 = icmp sgt i32 %.val.i51, 0 br i1 %43, label %44, label %46, !prof !11 @@ -199,7 +184,7 @@ lean_dec.exit43: ; preds = %lean_dec.exit, %41, tail call void @lean_inc_ref_cold(ptr noundef nonnull %0) #4 br label %lean_inc.exit42 -lean_inc.exit42: ; preds = %47, %46, %44, %lean_dec.exit43 +lean_inc.exit42: ; preds = %47, %46, %44 tail call void @lean_inc_heartbeat() #4 %48 = tail call noalias ptr @mi_malloc_small(i64 noundef 32) #4 %49 = icmp eq ptr %48, null @@ -247,8 +232,8 @@ lean_alloc_ctor.exit54: ; preds = %lean_inc.exit42 unreachable lean_alloc_ctor.exit55: ; preds = %64, %58 - %.sink75 = phi ptr [ %61, %58 ], [ %65, %64 ] - %.sink = phi ptr [ %60, %58 ], [ %0, %64 ] + %.sink75 = phi ptr [ %61, %51 ], [ %65, %57 ] + %.sink = phi ptr [ %60, %51 ], [ %0, %57 ] %68 = getelementptr inbounds nuw i8, ptr %.sink75, i64 4 store i32 1, ptr %.sink75, align 4, !tbaa !8 store i32 131096, ptr %68, align 4 diff --git a/bench/lean4/optimized/MVarRenaming.ll b/bench/lean4/optimized/MVarRenaming.ll index 54972ea8243..24aa3f45eb7 100644 --- a/bench/lean4/optimized/MVarRenaming.ll +++ b/bench/lean4/optimized/MVarRenaming.ll @@ -859,31 +859,25 @@ lean_alloc_closure.exit: ; preds = %40 %48 = getelementptr inbounds nuw i8, ptr %41, i64 24 store ptr %0, ptr %48, align 8, !tbaa !10 %49 = tail call ptr @lean_replace_expr(ptr noundef nonnull %41, ptr noundef %1) #4 - %50 = ptrtoint ptr %41 to i64 - %51 = and i64 %50, 1 - %.not = icmp eq i64 %51, 0 - br i1 %.not, label %52, label %lean_inc.exit15 + %50 = load i32, ptr %41, align 8, !tbaa !4 + %51 = icmp sgt i32 %50, 1 + br i1 %51, label %52, label %54, !prof !9 52: ; preds = %lean_alloc_closure.exit - %53 = load i32, ptr %41, align 4, !tbaa !4 - %54 = icmp sgt i32 %53, 1 - br i1 %54, label %55, label %57, !prof !9 - -55: ; preds = %52 - %56 = add nsw i32 %53, -1 - store i32 %56, ptr %41, align 4, !tbaa !4 + %53 = add nsw i32 %50, -1 + store i32 %53, ptr %41, align 4, !tbaa !4 br label %lean_inc.exit15 -57: ; preds = %52 - %.not.i16 = icmp eq i32 %53, 0 +57: ; preds = %lean_alloc_closure.exit + %.not.i16 = icmp eq i32 %50, 0 br i1 %.not.i16, label %lean_inc.exit15, label %58 58: ; preds = %57 tail call void @lean_dec_ref_cold(ptr noundef nonnull %41) #4 br label %lean_inc.exit15 -lean_inc.exit15: ; preds = %lean_alloc_closure.exit, %55, %57, %58, %31, %36, %38, %39, %lean_dec.exit14, %19, %21, %22 - %.0 = phi ptr [ %1, %22 ], [ %1, %21 ], [ %1, %19 ], [ %1, %lean_dec.exit14 ], [ %1, %39 ], [ %1, %38 ], [ %1, %36 ], [ %1, %31 ], [ %49, %58 ], [ %49, %57 ], [ %49, %55 ], [ %49, %lean_alloc_closure.exit ] +lean_inc.exit15: ; preds = %52, %57, %58, %31, %36, %38, %39, %lean_dec.exit14, %19, %21, %22 + %.0 = phi ptr [ %1, %22 ], [ %1, %21 ], [ %1, %19 ], [ %1, %lean_dec.exit14 ], [ %1, %39 ], [ %1, %38 ], [ %1, %36 ], [ %1, %31 ], [ %49, %55 ], [ %49, %54 ], [ %49, %52 ] ret ptr %.0 } diff --git a/bench/lean4/optimized/PlainDateTime.ll b/bench/lean4/optimized/PlainDateTime.ll index b89c1666e37..c1d130c0c47 100644 --- a/bench/lean4/optimized/PlainDateTime.ll +++ b/bench/lean4/optimized/PlainDateTime.ll @@ -31691,30 +31691,24 @@ define nonnull ptr @l_Std_Time_PlainDateTime_era___boxed(ptr noundef %0) local_u %4 = getelementptr inbounds nuw i8, ptr %3, i64 8 %5 = load ptr, ptr %4, align 8, !tbaa !5 %6 = tail call zeroext i8 @l_Std_Time_Year_Offset_era(ptr noundef %5) #5 - %7 = ptrtoint ptr %0 to i64 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - br i1 %.not, label %9, label %lean_dec.exit + %7 = load i32, ptr %0, align 8, !tbaa !9 + %8 = icmp sgt i32 %7, 1 + br i1 %8, label %9, label %11, !prof !12 9: ; preds = %1 - %10 = load i32, ptr %0, align 4, !tbaa !9 - %11 = icmp sgt i32 %10, 1 - br i1 %11, label %12, label %14, !prof !12 - -12: ; preds = %9 - %13 = add nsw i32 %10, -1 - store i32 %13, ptr %0, align 4, !tbaa !9 + %10 = add nsw i32 %7, -1 + store i32 %10, ptr %0, align 4, !tbaa !12 br label %lean_dec.exit -14: ; preds = %9 - %.not.i = icmp eq i32 %10, 0 +14: ; preds = %1 + %.not.i = icmp eq i32 %7, 0 br i1 %.not.i, label %lean_dec.exit, label %15 15: ; preds = %14 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %15, %14, %12, %1 +lean_dec.exit: ; preds = %15, %14, %12 %16 = zext i8 %6 to i64 %17 = shl nuw nsw i64 %16, 1 %18 = or disjoint i64 %17, 1 @@ -32061,30 +32055,24 @@ define ptr @l_Std_Time_PlainDateTime_weekOfMonth___boxed(ptr noundef %0) local_u %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load ptr, ptr %2, align 8, !tbaa !5 %4 = tail call ptr @l_Std_Time_PlainDate_weekOfMonth(ptr noundef %3) #5 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !9 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !12 7: ; preds = %1 - %8 = load i32, ptr %0, align 4, !tbaa !9 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !12 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !9 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !12 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %1 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %1 +lean_dec.exit: ; preds = %13, %12, %7 ret ptr %4 } @@ -32593,30 +32581,24 @@ define ptr @l_Std_Time_PlainDateTime_quarter___boxed(ptr noundef %0) local_unnam %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load ptr, ptr %2, align 8, !tbaa !5 %4 = tail call ptr @l_Std_Time_PlainDate_quarter(ptr noundef %3) #5 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !9 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !12 7: ; preds = %1 - %8 = load i32, ptr %0, align 4, !tbaa !9 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !12 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !9 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !12 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %1 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %1 +lean_dec.exit: ; preds = %13, %12, %7 ret ptr %4 } diff --git a/bench/lean4/optimized/Position.ll b/bench/lean4/optimized/Position.ll index f5fc89caa95..1f899406a5b 100644 --- a/bench/lean4/optimized/Position.ll +++ b/bench/lean4/optimized/Position.ll @@ -2711,30 +2711,24 @@ define nonnull ptr @l_Lean_FileMap_getLastLine___boxed(ptr noundef %0) local_unn %3 = load ptr, ptr %2, align 8, !tbaa !4 %4 = getelementptr i8, ptr %3, i64 8 %.val.i = load i64, ptr %4, align 8, !tbaa !13 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !9 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !12 7: ; preds = %1 - %8 = load i32, ptr %0, align 4, !tbaa !9 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !12 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !9 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !12 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %1 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #6 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %1 +lean_dec.exit: ; preds = %13, %12, %7 %14 = and i64 %.val.i, 9223372036854775807 %15 = icmp eq i64 %14, 0 %16 = shl i64 %.val.i, 1 diff --git a/bench/lean4/optimized/PrettyPrinter.ll b/bench/lean4/optimized/PrettyPrinter.ll index d67b3ca8e41..6f14e441ec3 100644 --- a/bench/lean4/optimized/PrettyPrinter.ll +++ b/bench/lean4/optimized/PrettyPrinter.ll @@ -23616,56 +23616,44 @@ lean_alloc_ctor.exit210: ; preds = %lean_dec.exit define ptr @l_Array_mapMUnsafe_map___at___private_Lean_PrettyPrinter_0__Lean_PrettyPrinter_noContext___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 { %4 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %4, align 8, !tbaa !13 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit7 + %5 = load i32, ptr %0, align 8, !tbaa !4 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %3 - %8 = load i32, ptr %0, align 4, !tbaa !4 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !4 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit7 -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %3 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit7, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #6 br label %lean_dec.exit7 -lean_dec.exit7: ; preds = %13, %12, %10, %3 +lean_dec.exit7: ; preds = %13, %12, %7 %14 = getelementptr i8, ptr %1, i64 8 %.val10 = load i64, ptr %14, align 8, !tbaa !13 - %15 = ptrtoint ptr %1 to i64 - %16 = and i64 %15, 1 - %.not11 = icmp eq i64 %16, 0 - br i1 %.not11, label %17, label %lean_dec.exit - -17: ; preds = %lean_dec.exit7 - %18 = load i32, ptr %1, align 4, !tbaa !4 - %19 = icmp sgt i32 %18, 1 - br i1 %19, label %20, label %22, !prof !11 + %15 = load i32, ptr %1, align 8, !tbaa !4 + %13 = icmp sgt i32 %15, 1 + br i1 %13, label %14, label %16, !prof !11 -20: ; preds = %17 - %21 = add nsw i32 %18, -1 +20: ; preds = %lean_dec.exit7 + %21 = add nsw i32 %12, -1 store i32 %21, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -22: ; preds = %17 - %.not.i8 = icmp eq i32 %18, 0 +22: ; preds = %lean_dec.exit7 + %.not.i8 = icmp eq i32 %12, 0 br i1 %.not.i8, label %lean_dec.exit, label %23 23: ; preds = %22 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #6 br label %lean_dec.exit -lean_dec.exit: ; preds = %23, %22, %20, %lean_dec.exit7 +lean_dec.exit: ; preds = %23, %22, %20 %24 = tail call ptr @l_Array_mapMUnsafe_map___at___private_Lean_PrettyPrinter_0__Lean_PrettyPrinter_noContext___spec__1(i64 noundef %.val, i64 noundef %.val10, ptr noundef %2) ret ptr %24 } @@ -26993,56 +26981,44 @@ lean_dec.exit: ; preds = %25, %24, %22, %l_Le define nonnull ptr @l_Array_anyMUnsafe_any___at_Lean_MessageData_ofLazyM___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %2, i64 8 %.val16 = load i64, ptr %5, align 8, !tbaa !13 - %6 = ptrtoint ptr %2 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit11 + %6 = load i32, ptr %2, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %4 - %9 = load i32, ptr %2, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %2, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit11 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit11, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #6 br label %lean_dec.exit11 -lean_dec.exit11: ; preds = %14, %13, %11, %4 +lean_dec.exit11: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %3, i64 8 %.val = load i64, ptr %15, align 8, !tbaa !13 - %16 = ptrtoint ptr %3 to i64 - %17 = and i64 %16, 1 - %.not17 = icmp eq i64 %17, 0 - br i1 %.not17, label %18, label %lean_dec.exit10 - -18: ; preds = %lean_dec.exit11 - %19 = load i32, ptr %3, align 4, !tbaa !4 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !11 + %13 = load i32, ptr %3, align 8, !tbaa !4 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !11 -21: ; preds = %18 - %22 = add nsw i32 %19, -1 +21: ; preds = %lean_dec.exit11 + %22 = add nsw i32 %13, -1 store i32 %22, ptr %3, align 4, !tbaa !4 br label %lean_dec.exit10 -23: ; preds = %18 - %.not.i12 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit11 + %.not.i12 = icmp eq i32 %13, 0 br i1 %.not.i12, label %lean_dec.exit10, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #6 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %24, %23, %21, %lean_dec.exit11 +lean_dec.exit10: ; preds = %24, %23, %21 %25 = tail call zeroext i8 @l_Array_anyMUnsafe_any___at_Lean_MessageData_ofLazyM___spec__1(ptr noundef %0, ptr noundef %1, i64 noundef %.val16, i64 noundef %.val) %26 = ptrtoint ptr %1 to i64 %27 = and i64 %26, 1 @@ -27068,7 +27044,7 @@ lean_dec.exit10: ; preds = %24, %23, %21, %lean br label %lean_dec.exit lean_dec.exit: ; preds = %34, %33, %31, %lean_dec.exit10 - %35 = shl nuw nsw i8 %25, 1 + %35 = shl nuw nsw i8 %112, 1 %36 = or disjoint i8 %35, 1 %37 = zext nneg i8 %36 to i64 %38 = inttoptr i64 %37 to ptr diff --git a/bench/lean4/optimized/Propagate.ll b/bench/lean4/optimized/Propagate.ll index 309da0be281..13a236309ed 100644 --- a/bench/lean4/optimized/Propagate.ll +++ b/bench/lean4/optimized/Propagate.ll @@ -62052,56 +62052,44 @@ lean_alloc_ctor.exit1219: ; preds = %lean_dec.exit define ptr @l_Array_forIn_x27Unsafe_loop___at_Lean_Meta_Grind_propagateEqDown___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15) local_unnamed_addr #0 { %17 = getelementptr i8, ptr %4, i64 8 %.val = load i64, ptr %17, align 8, !tbaa !16 - %18 = ptrtoint ptr %4 to i64 - %19 = and i64 %18, 1 - %.not = icmp eq i64 %19, 0 - br i1 %.not, label %20, label %lean_dec.exit26 + %18 = load i32, ptr %4, align 8, !tbaa !4 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %20, label %22, !prof !9 20: ; preds = %16 - %21 = load i32, ptr %4, align 4, !tbaa !4 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !9 - -23: ; preds = %20 - %24 = add nsw i32 %21, -1 - store i32 %24, ptr %4, align 4, !tbaa !4 + %21 = add nsw i32 %18, -1 + store i32 %21, ptr %4, align 4, !tbaa !4 br label %lean_dec.exit26 -25: ; preds = %20 - %.not.i = icmp eq i32 %21, 0 +25: ; preds = %16 + %.not.i = icmp eq i32 %18, 0 br i1 %.not.i, label %lean_dec.exit26, label %26 26: ; preds = %25 tail call void @lean_dec_ref_cold(ptr noundef nonnull %4) #4 br label %lean_dec.exit26 -lean_dec.exit26: ; preds = %26, %25, %23, %16 +lean_dec.exit26: ; preds = %26, %25, %20 %27 = getelementptr i8, ptr %5, i64 8 %.val35 = load i64, ptr %27, align 8, !tbaa !16 - %28 = ptrtoint ptr %5 to i64 - %29 = and i64 %28, 1 - %.not36 = icmp eq i64 %29, 0 - br i1 %.not36, label %30, label %lean_dec.exit25 - -30: ; preds = %lean_dec.exit26 - %31 = load i32, ptr %5, align 4, !tbaa !4 - %32 = icmp sgt i32 %31, 1 - br i1 %32, label %33, label %35, !prof !9 + %25 = load i32, ptr %5, align 8, !tbaa !4 + %26 = icmp sgt i32 %25, 1 + br i1 %26, label %27, label %29, !prof !9 -33: ; preds = %30 - %34 = add nsw i32 %31, -1 +33: ; preds = %lean_dec.exit26 + %34 = add nsw i32 %25, -1 store i32 %34, ptr %5, align 4, !tbaa !4 br label %lean_dec.exit25 -35: ; preds = %30 - %.not.i27 = icmp eq i32 %31, 0 +35: ; preds = %lean_dec.exit26 + %.not.i27 = icmp eq i32 %25, 0 br i1 %.not.i27, label %lean_dec.exit25, label %36 36: ; preds = %35 tail call void @lean_dec_ref_cold(ptr noundef nonnull %5) #4 br label %lean_dec.exit25 -lean_dec.exit25: ; preds = %36, %35, %33, %lean_dec.exit26 +lean_dec.exit25: ; preds = %36, %35, %33 %37 = tail call ptr @l_Array_forIn_x27Unsafe_loop___at_Lean_Meta_Grind_propagateEqDown___spec__1(ptr noundef %0, ptr poison, ptr poison, ptr noundef %3, i64 noundef %.val, i64 noundef %.val35, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15) %38 = ptrtoint ptr %3 to i64 %39 = and i64 %38, 1 diff --git a/bench/lean4/optimized/ReplaceLevel.ll b/bench/lean4/optimized/ReplaceLevel.ll index dded5bb9cef..135ea05b531 100644 --- a/bench/lean4/optimized/ReplaceLevel.ll +++ b/bench/lean4/optimized/ReplaceLevel.ll @@ -702,30 +702,24 @@ lean_alloc_ctor.exit36: ; preds = %lean_alloc_ctor.exi define noalias nonnull ptr @l_Lean_Expr_ReplaceLevelImpl_cache___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %0, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !12 - %6 = ptrtoint ptr %0 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit + %6 = load i32, ptr %0, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !9 8: ; preds = %4 - %9 = load i32, ptr %0, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !9 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %0, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %0, align 4, !tbaa !4 br label %lean_dec.exit -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %14, %13, %11, %4 +lean_dec.exit: ; preds = %14, %13, %8 %15 = tail call ptr @l_Lean_Expr_ReplaceLevelImpl_cache(i64 noundef %.val, ptr noundef %1, ptr noundef %2, ptr noundef %3) ret ptr %15 } @@ -4438,30 +4432,24 @@ declare ptr @l_Lean_Expr_proj___override(ptr noundef, ptr noundef, ptr noundef) define noalias nonnull ptr @l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM_visit___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !12 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit + %6 = load i32, ptr %1, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !9 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !9 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %14, %13, %11, %4 +lean_dec.exit: ; preds = %14, %13, %8 %15 = tail call ptr @l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM_visit(ptr noundef %0, i64 noundef %.val, ptr noundef %2, ptr noundef %3) ret ptr %15 } @@ -4476,30 +4464,24 @@ define noalias nonnull ptr @l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM(ptr noun define noalias nonnull ptr @l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !12 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit + %6 = load i32, ptr %1, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !9 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !9 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #3 br label %lean_dec.exit -lean_dec.exit: ; preds = %14, %13, %11, %4 +lean_dec.exit: ; preds = %14, %13, %8 %15 = tail call noalias nonnull ptr @l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM_visit(ptr noundef %0, i64 noundef %.val, ptr noundef %2, ptr noundef %3) ret ptr %15 } diff --git a/bench/lean4/optimized/RequestCancellation.ll b/bench/lean4/optimized/RequestCancellation.ll index 3db35ae675a..e319b03c1b7 100644 --- a/bench/lean4/optimized/RequestCancellation.ll +++ b/bench/lean4/optimized/RequestCancellation.ll @@ -1413,30 +1413,24 @@ define ptr @l_Lean_Server_RequestCancellationToken_requestCancellationTask___box %2 = getelementptr inbounds nuw i8, ptr %0, i64 24 %3 = load ptr, ptr %2, align 8, !tbaa !4 %4 = tail call ptr @l_IO_Promise_result_x21___rarg(ptr noundef %3) #5 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %1 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %1 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %1 +lean_dec.exit: ; preds = %13, %12, %7 ret ptr %4 } @@ -1453,30 +1447,24 @@ define ptr @l_Lean_Server_RequestCancellationToken_editCancellationTask___boxed( %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load ptr, ptr %2, align 8, !tbaa !4 %4 = tail call ptr @l_IO_Promise_result_x21___rarg(ptr noundef %3) #5 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 1 - %.not = icmp eq i64 %6, 0 - br i1 %.not, label %7, label %lean_dec.exit + %5 = load i32, ptr %0, align 8, !tbaa !8 + %6 = icmp sgt i32 %5, 1 + br i1 %6, label %7, label %9, !prof !11 7: ; preds = %1 - %8 = load i32, ptr %0, align 4, !tbaa !8 - %9 = icmp sgt i32 %8, 1 - br i1 %9, label %10, label %12, !prof !11 - -10: ; preds = %7 - %11 = add nsw i32 %8, -1 - store i32 %11, ptr %0, align 4, !tbaa !8 + %8 = add nsw i32 %5, -1 + store i32 %8, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit -12: ; preds = %7 - %.not.i = icmp eq i32 %8, 0 +12: ; preds = %1 + %.not.i = icmp eq i32 %5, 0 br i1 %.not.i, label %lean_dec.exit, label %13 13: ; preds = %12 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %13, %12, %10, %1 +lean_dec.exit: ; preds = %13, %12, %7 ret ptr %4 } @@ -1570,30 +1558,24 @@ define ptr @l_Lean_Server_RequestCancellationToken_wasCancelledByCancelRequest__ %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load ptr, ptr %3, align 8, !tbaa !4 %5 = tail call ptr @lean_st_ref_get(ptr noundef %4, ptr noundef %1) #5 - %6 = ptrtoint ptr %0 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit + %6 = load i32, ptr %0, align 8, !tbaa !8 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %2 - %9 = load i32, ptr %0, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %0, align 4, !tbaa !8 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %2 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %14, %13, %11, %2 +lean_dec.exit: ; preds = %14, %13, %8 ret ptr %5 } @@ -1610,30 +1592,24 @@ define ptr @l_Lean_Server_RequestCancellationToken_wasCancelledByEdit___boxed(pt %3 = getelementptr inbounds nuw i8, ptr %0, i64 16 %4 = load ptr, ptr %3, align 8, !tbaa !4 %5 = tail call ptr @lean_st_ref_get(ptr noundef %4, ptr noundef %1) #5 - %6 = ptrtoint ptr %0 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit + %6 = load i32, ptr %0, align 8, !tbaa !8 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !11 8: ; preds = %2 - %9 = load i32, ptr %0, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !11 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %0, align 4, !tbaa !8 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %2 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %0) #5 br label %lean_dec.exit -lean_dec.exit: ; preds = %14, %13, %11, %2 +lean_dec.exit: ; preds = %14, %13, %8 ret ptr %5 } diff --git a/bench/lean4/optimized/Simp.ll b/bench/lean4/optimized/Simp.ll index e1c4b6eafa4..ed452f92713 100644 --- a/bench/lean4/optimized/Simp.ll +++ b/bench/lean4/optimized/Simp.ll @@ -9410,23 +9410,17 @@ lean_alloc_ctor.exit: ; preds = %lean_dec.exit84 %275 = getelementptr inbounds nuw i8, ptr %271, i64 8 store ptr %261, ptr %275, align 8, !tbaa !4 %276 = tail call ptr @l_Lean_Elab_Tactic_Conv_evalSimpTrace___lambda__1(ptr noundef %1, ptr noundef %2, ptr noundef %5, ptr noundef %3, ptr nonnull poison, ptr noundef nonnull %271, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14) - %277 = ptrtoint ptr %271 to i64 - %278 = and i64 %277, 1 - %.not171 = icmp eq i64 %278, 0 - br i1 %.not171, label %279, label %lean_dec.exit83 + %277 = load i32, ptr %271, align 8, !tbaa !8 + %278 = icmp sgt i32 %277, 1 + br i1 %278, label %279, label %281, !prof !11 279: ; preds = %lean_alloc_ctor.exit - %280 = load i32, ptr %271, align 4, !tbaa !8 - %281 = icmp sgt i32 %280, 1 - br i1 %281, label %282, label %284, !prof !11 - -282: ; preds = %279 - %283 = add nsw i32 %280, -1 - store i32 %283, ptr %271, align 4, !tbaa !8 + %280 = add nsw i32 %277, -1 + store i32 %280, ptr %271, align 4, !tbaa !8 br label %lean_dec.exit83 -284: ; preds = %279 - %.not.i157 = icmp eq i32 %280, 0 +284: ; preds = %lean_alloc_ctor.exit + %.not.i157 = icmp eq i32 %277, 0 br i1 %.not.i157, label %lean_dec.exit83, label %285 285: ; preds = %284 @@ -9458,8 +9452,8 @@ lean_dec.exit: ; preds = %293, %292, %290, %2 %294 = tail call ptr @l_Lean_Elab_Tactic_Conv_evalSimpTrace___lambda__1(ptr noundef %1, ptr noundef %2, ptr noundef %5, ptr noundef %3, ptr nonnull poison, ptr noundef nonnull inttoptr (i64 1 to ptr), ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14) br label %lean_dec.exit83 -lean_dec.exit83: ; preds = %lean_alloc_ctor.exit, %282, %284, %285, %lean_dec.exit98, %lean_dec.exit86, %lean_dec.exit - %.2 = phi ptr [ %294, %lean_dec.exit ], [ %130, %lean_dec.exit98 ], [ %251, %lean_dec.exit86 ], [ %276, %285 ], [ %276, %284 ], [ %276, %282 ], [ %276, %lean_alloc_ctor.exit ] +lean_dec.exit83: ; preds = %279, %284, %285, %lean_dec.exit98, %lean_dec.exit86, %lean_dec.exit + %.2 = phi ptr [ %294, %lean_dec.exit ], [ %130, %lean_dec.exit98 ], [ %251, %lean_dec.exit86 ], [ %276, %282 ], [ %276, %281 ], [ %276, %279 ] ret ptr %.2 } @@ -18845,23 +18839,17 @@ lean_alloc_ctor.exit: ; preds = %lean_dec.exit82 %274 = getelementptr inbounds nuw i8, ptr %270, i64 8 store ptr %260, ptr %274, align 8, !tbaa !4 %275 = tail call ptr @l_Lean_Elab_Tactic_Conv_evalDSimpTrace___lambda__1(ptr noundef %1, ptr noundef %4, ptr noundef %2, ptr nonnull poison, ptr noundef nonnull %270, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13) - %276 = ptrtoint ptr %270 to i64 - %277 = and i64 %276, 1 - %.not169 = icmp eq i64 %277, 0 - br i1 %.not169, label %278, label %lean_dec.exit81 + %276 = load i32, ptr %270, align 8, !tbaa !8 + %277 = icmp sgt i32 %276, 1 + br i1 %277, label %278, label %280, !prof !11 278: ; preds = %lean_alloc_ctor.exit - %279 = load i32, ptr %270, align 4, !tbaa !8 - %280 = icmp sgt i32 %279, 1 - br i1 %280, label %281, label %283, !prof !11 - -281: ; preds = %278 - %282 = add nsw i32 %279, -1 - store i32 %282, ptr %270, align 4, !tbaa !8 + %279 = add nsw i32 %276, -1 + store i32 %279, ptr %270, align 4, !tbaa !8 br label %lean_dec.exit81 -283: ; preds = %278 - %.not.i155 = icmp eq i32 %279, 0 +283: ; preds = %lean_alloc_ctor.exit + %.not.i155 = icmp eq i32 %276, 0 br i1 %.not.i155, label %lean_dec.exit81, label %284 284: ; preds = %283 @@ -18893,8 +18881,8 @@ lean_dec.exit: ; preds = %292, %291, %289, %2 %293 = tail call ptr @l_Lean_Elab_Tactic_Conv_evalDSimpTrace___lambda__1(ptr noundef %1, ptr noundef %4, ptr noundef %2, ptr nonnull poison, ptr noundef nonnull inttoptr (i64 1 to ptr), ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13) br label %lean_dec.exit81 -lean_dec.exit81: ; preds = %lean_alloc_ctor.exit, %281, %283, %284, %lean_dec.exit96, %lean_dec.exit84, %lean_dec.exit - %.2 = phi ptr [ %293, %lean_dec.exit ], [ %129, %lean_dec.exit96 ], [ %250, %lean_dec.exit84 ], [ %275, %284 ], [ %275, %283 ], [ %275, %281 ], [ %275, %lean_alloc_ctor.exit ] +lean_dec.exit81: ; preds = %278, %283, %284, %lean_dec.exit96, %lean_dec.exit84, %lean_dec.exit + %.2 = phi ptr [ %293, %lean_dec.exit ], [ %129, %lean_dec.exit96 ], [ %250, %lean_dec.exit84 ], [ %275, %281 ], [ %275, %280 ], [ %275, %278 ] ret ptr %.2 } diff --git a/bench/lean4/optimized/TZdb.ll b/bench/lean4/optimized/TZdb.ll index 956e2f3887c..440da13d0ee 100644 --- a/bench/lean4/optimized/TZdb.ll +++ b/bench/lean4/optimized/TZdb.ll @@ -4020,56 +4020,44 @@ lean_dec.exit: ; preds = %21, %20, %18, %lean define ptr @l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 { %10 = getelementptr i8, ptr %5, i64 8 %.val = load i64, ptr %10, align 8, !tbaa !12 - %11 = ptrtoint ptr %5 to i64 - %12 = and i64 %11, 1 - %.not = icmp eq i64 %12, 0 - br i1 %.not, label %13, label %lean_dec.exit19 + %11 = load i32, ptr %5, align 8, !tbaa !8 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !11 13: ; preds = %9 - %14 = load i32, ptr %5, align 4, !tbaa !8 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !11 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %5, align 4, !tbaa !8 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %5, align 4, !tbaa !8 br label %lean_dec.exit19 -18: ; preds = %13 - %.not.i = icmp eq i32 %14, 0 +18: ; preds = %9 + %.not.i = icmp eq i32 %11, 0 br i1 %.not.i, label %lean_dec.exit19, label %19 19: ; preds = %18 tail call void @lean_dec_ref_cold(ptr noundef nonnull %5) #3 br label %lean_dec.exit19 -lean_dec.exit19: ; preds = %19, %18, %16, %9 +lean_dec.exit19: ; preds = %19, %18, %13 %20 = getelementptr i8, ptr %6, i64 8 %.val28 = load i64, ptr %20, align 8, !tbaa !12 - %21 = ptrtoint ptr %6 to i64 - %22 = and i64 %21, 1 - %.not29 = icmp eq i64 %22, 0 - br i1 %.not29, label %23, label %lean_dec.exit18 - -23: ; preds = %lean_dec.exit19 - %24 = load i32, ptr %6, align 4, !tbaa !8 - %25 = icmp sgt i32 %24, 1 - br i1 %25, label %26, label %28, !prof !11 - -26: ; preds = %23 - %27 = add nsw i32 %24, -1 - store i32 %27, ptr %6, align 4, !tbaa !8 + %18 = load i32, ptr %6, align 8, !tbaa !8 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %20, label %22, !prof !11 + +20: ; preds = %lean_dec.exit19 + %21 = add nsw i32 %18, -1 + store i32 %21, ptr %6, align 4, !tbaa !8 br label %lean_dec.exit18 -28: ; preds = %23 - %.not.i20 = icmp eq i32 %24, 0 +28: ; preds = %lean_dec.exit19 + %.not.i20 = icmp eq i32 %18, 0 br i1 %.not.i20, label %lean_dec.exit18, label %29 29: ; preds = %28 tail call void @lean_dec_ref_cold(ptr noundef nonnull %6) #3 br label %lean_dec.exit18 -lean_dec.exit18: ; preds = %29, %28, %26, %lean_dec.exit19 +lean_dec.exit18: ; preds = %29, %28, %20 %30 = tail call ptr @l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__1(ptr noundef %0, ptr poison, ptr poison, ptr noundef %3, ptr noundef %4, i64 noundef %.val, i64 noundef %.val28, ptr noundef %7, ptr noundef %8) %31 = ptrtoint ptr %4 to i64 %32 = and i64 %31, 1 diff --git a/bench/lean4/optimized/Topological.ll b/bench/lean4/optimized/Topological.ll index c36be0a7629..e880a8551d9 100644 --- a/bench/lean4/optimized/Topological.ll +++ b/bench/lean4/optimized/Topological.ll @@ -987,26 +987,17 @@ lean_alloc_closure.exit: ; preds = %6 store ptr %4, ptr %17, align 8, !tbaa !10 %18 = getelementptr inbounds nuw i8, ptr %7, i64 56 store ptr %0, ptr %18, align 8, !tbaa !10 - %19 = ptrtoint ptr %7 to i64 - %20 = and i64 %19, 1 - %.not.i = icmp eq i64 %20, 0 - br i1 %.not.i, label %21, label %lean_inc.exit.i - -21: ; preds = %lean_alloc_closure.exit - store i32 2, ptr %7, align 4, !tbaa !4 - br label %lean_inc.exit.i - -lean_inc.exit.i: ; preds = %21, %lean_alloc_closure.exit + store i32 2, ptr %7, align 8, !tbaa !4 tail call void @lean_inc_heartbeat() #3 %22 = tail call noalias ptr @mi_malloc_small(i64 noundef 32) #3 %23 = icmp eq ptr %22, null br i1 %23, label %24, label %l_Lake_recFetch___rarg.exit -24: ; preds = %lean_inc.exit.i +24: ; preds = %lean_alloc_closure.exit tail call void @lean_internal_panic_out_of_memory() #4 unreachable -l_Lake_recFetch___rarg.exit: ; preds = %lean_inc.exit.i +l_Lake_recFetch___rarg.exit: ; preds = %lean_alloc_closure.exit %25 = getelementptr inbounds nuw i8, ptr %22, i64 4 store i32 1, ptr %22, align 4, !tbaa !4 store i32 -184549344, ptr %25, align 4 @@ -2061,26 +2052,17 @@ lean_alloc_closure.exit: ; preds = %7 store ptr %3, ptr %19, align 8, !tbaa !10 %20 = getelementptr inbounds nuw i8, ptr %8, i64 64 store ptr %0, ptr %20, align 8, !tbaa !10 - %21 = ptrtoint ptr %8 to i64 - %22 = and i64 %21, 1 - %.not.i = icmp eq i64 %22, 0 - br i1 %.not.i, label %23, label %lean_inc.exit.i - -23: ; preds = %lean_alloc_closure.exit - store i32 2, ptr %8, align 4, !tbaa !4 - br label %lean_inc.exit.i - -lean_inc.exit.i: ; preds = %23, %lean_alloc_closure.exit + store i32 2, ptr %8, align 8, !tbaa !4 tail call void @lean_inc_heartbeat() #3 %24 = tail call noalias ptr @mi_malloc_small(i64 noundef 32) #3 %25 = icmp eq ptr %24, null br i1 %25, label %26, label %l_Lake_recFetch___rarg.exit -26: ; preds = %lean_inc.exit.i +26: ; preds = %lean_alloc_closure.exit tail call void @lean_internal_panic_out_of_memory() #4 unreachable -l_Lake_recFetch___rarg.exit: ; preds = %lean_inc.exit.i +l_Lake_recFetch___rarg.exit: ; preds = %lean_alloc_closure.exit %27 = getelementptr inbounds nuw i8, ptr %24, i64 4 store i32 1, ptr %24, align 4, !tbaa !4 store i32 -184549344, ptr %27, align 4 diff --git a/bench/lean4/optimized/TypeName.ll b/bench/lean4/optimized/TypeName.ll index 80fc6deca17..8637a84afac 100644 --- a/bench/lean4/optimized/TypeName.ll +++ b/bench/lean4/optimized/TypeName.ll @@ -14220,56 +14220,44 @@ lean_dec.exit: ; preds = %15, %14, %12, %5 define ptr @l_Array_forIn_x27Unsafe_loop___at___private_Lean_Elab_Deriving_TypeName_0__Lean_Elab_deriveTypeNameInstance___spec__3___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 { %10 = getelementptr i8, ptr %3, i64 8 %.val = load i64, ptr %10, align 8, !tbaa !15 - %11 = ptrtoint ptr %3 to i64 - %12 = and i64 %11, 1 - %.not = icmp eq i64 %12, 0 - br i1 %.not, label %13, label %lean_dec.exit19 + %11 = load i32, ptr %3, align 8, !tbaa !8 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !11 13: ; preds = %9 - %14 = load i32, ptr %3, align 4, !tbaa !8 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !11 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %3, align 4, !tbaa !8 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %3, align 4, !tbaa !8 br label %lean_dec.exit19 -18: ; preds = %13 - %.not.i = icmp eq i32 %14, 0 +18: ; preds = %9 + %.not.i = icmp eq i32 %11, 0 br i1 %.not.i, label %lean_dec.exit19, label %19 19: ; preds = %18 tail call void @lean_dec_ref_cold(ptr noundef nonnull %3) #4 br label %lean_dec.exit19 -lean_dec.exit19: ; preds = %19, %18, %16, %9 +lean_dec.exit19: ; preds = %19, %18, %13 %20 = getelementptr i8, ptr %4, i64 8 %.val28 = load i64, ptr %20, align 8, !tbaa !15 - %21 = ptrtoint ptr %4 to i64 - %22 = and i64 %21, 1 - %.not29 = icmp eq i64 %22, 0 - br i1 %.not29, label %23, label %lean_dec.exit18 - -23: ; preds = %lean_dec.exit19 - %24 = load i32, ptr %4, align 4, !tbaa !8 - %25 = icmp sgt i32 %24, 1 - br i1 %25, label %26, label %28, !prof !11 + %18 = load i32, ptr %4, align 8, !tbaa !8 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %26, label %22, !prof !11 -26: ; preds = %23 - %27 = add nsw i32 %24, -1 +26: ; preds = %lean_dec.exit19 + %27 = add nsw i32 %18, -1 store i32 %27, ptr %4, align 4, !tbaa !8 br label %lean_dec.exit18 -28: ; preds = %23 - %.not.i20 = icmp eq i32 %24, 0 +28: ; preds = %lean_dec.exit19 + %.not.i20 = icmp eq i32 %18, 0 br i1 %.not.i20, label %lean_dec.exit18, label %29 29: ; preds = %28 tail call void @lean_dec_ref_cold(ptr noundef nonnull %4) #4 br label %lean_dec.exit18 -lean_dec.exit18: ; preds = %29, %28, %26, %lean_dec.exit19 +lean_dec.exit18: ; preds = %29, %28, %26 %30 = tail call ptr @l_Array_forIn_x27Unsafe_loop___at___private_Lean_Elab_Deriving_TypeName_0__Lean_Elab_deriveTypeNameInstance___spec__3(ptr poison, ptr poison, ptr noundef %2, i64 noundef %.val, i64 noundef %.val28, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) %31 = ptrtoint ptr %2 to i64 %32 = and i64 %31, 1 diff --git a/bench/lean4/optimized/WorkspaceConfig.ll b/bench/lean4/optimized/WorkspaceConfig.ll index 6a1ed338d3c..c514fdf8b7b 100644 --- a/bench/lean4/optimized/WorkspaceConfig.ll +++ b/bench/lean4/optimized/WorkspaceConfig.ll @@ -581,93 +581,81 @@ declare ptr @l_Lean_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(ptr define ptr @l_Array_foldlMUnsafe_fold___at_Lake_WorkspaceConfig_instConfigMeta___spec__1___boxed(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %1, i64 8 %.val = load i64, ptr %5, align 8, !tbaa !11 - %6 = ptrtoint ptr %1 to i64 - %7 = and i64 %6, 1 - %.not = icmp eq i64 %7, 0 - br i1 %.not, label %8, label %lean_dec.exit10 + %6 = load i32, ptr %1, align 8, !tbaa !4 + %7 = icmp sgt i32 %6, 1 + br i1 %7, label %8, label %10, !prof !13 8: ; preds = %4 - %9 = load i32, ptr %1, align 4, !tbaa !4 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !13 - -11: ; preds = %8 - %12 = add nsw i32 %9, -1 - store i32 %12, ptr %1, align 4, !tbaa !4 + %9 = add nsw i32 %6, -1 + store i32 %9, ptr %1, align 4, !tbaa !4 br label %lean_dec.exit10 -13: ; preds = %8 - %.not.i = icmp eq i32 %9, 0 +13: ; preds = %4 + %.not.i = icmp eq i32 %6, 0 br i1 %.not.i, label %lean_dec.exit10, label %14 14: ; preds = %13 tail call void @lean_dec_ref_cold(ptr noundef nonnull %1) #5 br label %lean_dec.exit10 -lean_dec.exit10: ; preds = %14, %13, %11, %4 +lean_dec.exit10: ; preds = %14, %13, %8 %15 = getelementptr i8, ptr %2, i64 8 %.val15 = load i64, ptr %15, align 8, !tbaa !11 - %16 = ptrtoint ptr %2 to i64 - %17 = and i64 %16, 1 - %.not17 = icmp eq i64 %17, 0 - br i1 %.not17, label %18, label %lean_dec.exit9 - -18: ; preds = %lean_dec.exit10 - %19 = load i32, ptr %2, align 4, !tbaa !4 - %20 = icmp sgt i32 %19, 1 - br i1 %20, label %21, label %23, !prof !13 - -21: ; preds = %18 - %22 = add nsw i32 %19, -1 - store i32 %22, ptr %2, align 4, !tbaa !4 + %13 = load i32, ptr %2, align 8, !tbaa !4 + %14 = icmp sgt i32 %13, 1 + br i1 %14, label %15, label %17, !prof !13 + +15: ; preds = %lean_dec.exit10 + %16 = add nsw i32 %13, -1 + store i32 %16, ptr %2, align 4, !tbaa !4 br label %lean_dec.exit9 -23: ; preds = %18 - %.not.i11 = icmp eq i32 %19, 0 +23: ; preds = %lean_dec.exit10 + %.not.i11 = icmp eq i32 %13, 0 br i1 %.not.i11, label %lean_dec.exit9, label %24 24: ; preds = %23 tail call void @lean_dec_ref_cold(ptr noundef nonnull %2) #5 br label %lean_dec.exit9 -lean_dec.exit9: ; preds = %24, %23, %21, %lean_dec.exit10 +lean_dec.exit9: ; preds = %24, %23, %15 %.not28.i = icmp eq i64 %.val, %.val15 br i1 %.not28.i, label %l_Array_foldlMUnsafe_fold___at_Lake_WorkspaceConfig_instConfigMeta___spec__1.exit, label %.lr.ph.i .lr.ph.i: ; preds = %lean_dec.exit9 %25 = getelementptr inbounds nuw i8, ptr %0, i64 24 - br label %26 + br label %20 + +20: ; preds = %40, %.lr.ph.i + %.01730.i = phi i64 [ %.val, %.lr.ph.i ], [ %42, %40 ] + %.01929.i = phi ptr [ %3, %.lr.ph.i ], [ %41, %40 ] + %21 = getelementptr inbounds nuw ptr, ptr %19, i64 %.01730.i + %22 = load ptr, ptr %21, align 8, !tbaa !9 + %23 = ptrtoint ptr %22 to i64 + %24 = and i64 %23, 1 + %.not.i.i = icmp eq i64 %24, 0 + br i1 %.not.i.i, label %25, label %lean_array_uget.exit.i -26: ; preds = %46, %.lr.ph.i - %.01730.i = phi i64 [ %.val, %.lr.ph.i ], [ %48, %46 ] - %.01929.i = phi ptr [ %3, %.lr.ph.i ], [ %47, %46 ] - %27 = getelementptr inbounds nuw ptr, ptr %25, i64 %.01730.i - %28 = load ptr, ptr %27, align 8, !tbaa !9 - %29 = ptrtoint ptr %28 to i64 - %30 = and i64 %29, 1 - %.not.i.i = icmp eq i64 %30, 0 - br i1 %.not.i.i, label %31, label %lean_array_uget.exit.i - -31: ; preds = %26 - %.val.i.i.i = load i32, ptr %28, align 4, !tbaa !4 - %32 = icmp sgt i32 %.val.i.i.i, 0 - br i1 %32, label %33, label %35, !prof !13 - -33: ; preds = %31 - %34 = add nuw i32 %.val.i.i.i, 1 - store i32 %34, ptr %28, align 4, !tbaa !4 +25: ; preds = %20 + %.val.i.i.i = load i32, ptr %22, align 4, !tbaa !4 + %26 = icmp sgt i32 %.val.i.i.i, 0 + br i1 %26, label %27, label %29, !prof !13 + +26: ; preds = %25 + %28 = add nuw i32 %.val.i.i.i, 1 + store i32 %28, ptr %22, align 4, !tbaa !4 br label %lean_array_uget.exit.i -35: ; preds = %31 +35: ; preds = %25 %.not.i.i.i = icmp eq i32 %.val.i.i.i, 0 br i1 %.not.i.i.i, label %lean_array_uget.exit.i, label %36 36: ; preds = %35 - tail call void @lean_inc_ref_cold(ptr noundef nonnull %28) #5 + tail call void @lean_inc_ref_cold(ptr noundef nonnull %22) #5 br label %lean_array_uget.exit.i -lean_array_uget.exit.i: ; preds = %36, %35, %33, %26 - %37 = getelementptr i8, ptr %28, i64 8 +lean_array_uget.exit.i: ; preds = %36, %35, %26, %20 + %37 = getelementptr i8, ptr %22, i64 8 %.val.i = load ptr, ptr %37, align 8, !tbaa !9 %38 = ptrtoint ptr %.val.i to i64 %39 = and i64 %38, 1 @@ -693,13 +681,13 @@ lean_array_uget.exit.i: ; preds = %36, %35, %33, %26 br label %46 46: ; preds = %45, %44, %42, %lean_array_uget.exit.i - %47 = tail call ptr @l_Lean_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(ptr noundef %.01929.i, ptr noundef %.val.i, ptr noundef nonnull %28) #5 + %47 = tail call ptr @l_Lean_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(ptr noundef %.01929.i, ptr noundef %.val.i, ptr noundef nonnull %22) #5 %48 = add i64 %.01730.i, 1 %.not.i16 = icmp eq i64 %48, %.val15 - br i1 %.not.i16, label %l_Array_foldlMUnsafe_fold___at_Lake_WorkspaceConfig_instConfigMeta___spec__1.exit, label %26 + br i1 %.not.i16, label %l_Array_foldlMUnsafe_fold___at_Lake_WorkspaceConfig_instConfigMeta___spec__1.exit, label %20 l_Array_foldlMUnsafe_fold___at_Lake_WorkspaceConfig_instConfigMeta___spec__1.exit: ; preds = %46, %lean_dec.exit9 - %.019.lcssa.i = phi ptr [ %3, %lean_dec.exit9 ], [ %47, %46 ] + %.019.lcssa.i = phi ptr [ %3, %lean_dec.exit9 ], [ %47, %40 ] %49 = ptrtoint ptr %0 to i64 %50 = and i64 %49, 1 %.not18 = icmp eq i64 %50, 0 diff --git a/bench/lean4/optimized/expr.ll b/bench/lean4/optimized/expr.ll index 7643fc495b9..630b8b0d585 100644 --- a/bench/lean4/optimized/expr.ll +++ b/bench/lean4/optimized/expr.ll @@ -3289,22 +3289,16 @@ define hidden void @_ZN4lean14update_bindingERKNS_4exprES2_S2_(ptr dead_on_unwin %16 = getelementptr i8, ptr %5, i64 4 %.val.i.i.i = load i32, ptr %16, align 4 %17 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %18 = ptrtoint ptr %5 to i64 - %19 = and i64 %18, 1 - %.not.i.i.i = icmp eq i64 %19, 0 - br i1 %.not.i.i.i, label %20, label %_ZN4lean12binding_infoERKNS_4exprE.exit - -20: ; preds = %15 %.val.i.i.i.i = load i32, ptr %5, align 4, !tbaa !21 %21 = icmp sgt i32 %.val.i.i.i.i, 0 br i1 %21, label %22, label %24, !prof !24 -22: ; preds = %20 +22: ; preds = %15 %23 = add nuw nsw i32 %.val.i.i.i.i, 1 store i32 %23, ptr %5, align 4, !tbaa !21 br label %_ZN4lean12binding_infoERKNS_4exprE.exit -24: ; preds = %20 +24: ; preds = %15 %.not.i.i.i.i = icmp eq i32 %.val.i.i.i.i, 0 br i1 %.not.i.i.i.i, label %_ZN4lean12binding_infoERKNS_4exprE.exit, label %25 @@ -3313,8 +3307,8 @@ define hidden void @_ZN4lean14update_bindingERKNS_4exprES2_S2_(ptr dead_on_unwin %.pre.i.i = load ptr, ptr %1, align 8, !tbaa !10 br label %_ZN4lean12binding_infoERKNS_4exprE.exit -_ZN4lean12binding_infoERKNS_4exprE.exit: ; preds = %15, %22, %24, %25 - %26 = phi ptr [ %5, %15 ], [ %5, %22 ], [ %5, %24 ], [ %.pre.i.i, %25 ] +_ZN4lean12binding_infoERKNS_4exprE.exit: ; preds = %22, %24, %25 + %26 = phi ptr [ %5, %19 ], [ %5, %21 ], [ %.pre.i.i, %22 ] %27 = tail call zeroext i8 @lean_expr_binder_info(ptr noundef %26) %28 = zext i8 %27 to i32 %.mask = and i32 %.val.i.i.i, -16777216 diff --git a/bench/lean4/optimized/inductive.ll b/bench/lean4/optimized/inductive.ll index 3a4bcecf7a1..e1146681b1a 100644 --- a/bench/lean4/optimized/inductive.ll +++ b/bench/lean4/optimized/inductive.ll @@ -780,23 +780,17 @@ define hidden noundef zeroext i1 @_ZN4lean12is_inductiveERKNS_11environmentERKNS %.val.i.i.i = load i32, ptr %9, align 4 %.mask.i = and i32 %.val.i.i.i, -16777216 %10 = icmp eq i32 %.mask.i, 83886080 - %11 = ptrtoint ptr %8 to i64 - %12 = and i64 %11, 1 - %.not.i.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i.i, label %13, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit + %11 = load i32, ptr %8, align 4, !tbaa !8 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !11 13: ; preds = %6 - %14 = load i32, ptr %8, align 4, !tbaa !8 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !11 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %8, align 4, !tbaa !8 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %8, align 4, !tbaa !8 br label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit -18: ; preds = %13 - %.not.i.i.i.i = icmp eq i32 %14, 0 +18: ; preds = %6 + %.not.i.i.i.i = icmp eq i32 %11, 0 br i1 %.not.i.i.i.i, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit, label %19 19: ; preds = %18 @@ -810,8 +804,8 @@ define hidden noundef zeroext i1 @_ZN4lean12is_inductiveERKNS_11environmentERKNS call void @__clang_call_terminate(ptr %22) #15 unreachable -_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %2, %6, %16, %18, %19 - %spec.select = phi i1 [ %10, %6 ], [ %10, %16 ], [ %10, %18 ], [ %10, %19 ], [ false, %2 ] +_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %2, %13, %18, %19 + %spec.select = phi i1 [ %10, %13 ], [ %10, %15 ], [ %10, %16 ], [ false, %2 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) ret i1 %spec.select } @@ -877,23 +871,17 @@ define hidden noundef zeroext i1 @_ZN4lean14is_constructorERKNS_11environmentERK %.val.i.i.i = load i32, ptr %9, align 4 %.mask.i = and i32 %.val.i.i.i, -16777216 %10 = icmp eq i32 %.mask.i, 100663296 - %11 = ptrtoint ptr %8 to i64 - %12 = and i64 %11, 1 - %.not.i.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i.i, label %13, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit + %11 = load i32, ptr %8, align 4, !tbaa !8 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !11 13: ; preds = %6 - %14 = load i32, ptr %8, align 4, !tbaa !8 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !11 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %8, align 4, !tbaa !8 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %8, align 4, !tbaa !8 br label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit -18: ; preds = %13 - %.not.i.i.i.i = icmp eq i32 %14, 0 +18: ; preds = %6 + %.not.i.i.i.i = icmp eq i32 %11, 0 br i1 %.not.i.i.i.i, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit, label %19 19: ; preds = %18 @@ -907,8 +895,8 @@ define hidden noundef zeroext i1 @_ZN4lean14is_constructorERKNS_11environmentERK call void @__clang_call_terminate(ptr %22) #15 unreachable -_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %2, %6, %16, %18, %19 - %spec.select = phi i1 [ %10, %6 ], [ %10, %16 ], [ %10, %18 ], [ %10, %19 ], [ false, %2 ] +_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %2, %13, %18, %19 + %spec.select = phi i1 [ %10, %13 ], [ %10, %15 ], [ %10, %16 ], [ false, %2 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) ret i1 %spec.select } @@ -929,23 +917,17 @@ define hidden noundef zeroext i1 @_ZN4lean11is_recursorERKNS_11environmentERKNS_ %.val.i.i.i = load i32, ptr %9, align 4 %.mask.i = and i32 %.val.i.i.i, -16777216 %10 = icmp eq i32 %.mask.i, 117440512 - %11 = ptrtoint ptr %8 to i64 - %12 = and i64 %11, 1 - %.not.i.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i.i, label %13, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit + %11 = load i32, ptr %8, align 4, !tbaa !8 + %12 = icmp sgt i32 %11, 1 + br i1 %12, label %13, label %15, !prof !11 13: ; preds = %6 - %14 = load i32, ptr %8, align 4, !tbaa !8 - %15 = icmp sgt i32 %14, 1 - br i1 %15, label %16, label %18, !prof !11 - -16: ; preds = %13 - %17 = add nsw i32 %14, -1 - store i32 %17, ptr %8, align 4, !tbaa !8 + %14 = add nsw i32 %11, -1 + store i32 %14, ptr %8, align 4, !tbaa !8 br label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit -18: ; preds = %13 - %.not.i.i.i.i = icmp eq i32 %14, 0 +18: ; preds = %6 + %.not.i.i.i.i = icmp eq i32 %11, 0 br i1 %.not.i.i.i.i, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit, label %19 19: ; preds = %18 @@ -959,8 +941,8 @@ define hidden noundef zeroext i1 @_ZN4lean11is_recursorERKNS_11environmentERKNS_ call void @__clang_call_terminate(ptr %22) #15 unreachable -_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %2, %6, %16, %18, %19 - %spec.select = phi i1 [ %10, %6 ], [ %10, %16 ], [ %10, %18 ], [ %10, %19 ], [ false, %2 ] +_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %2, %13, %18, %19 + %spec.select = phi i1 [ %10, %13 ], [ %10, %15 ], [ %10, %16 ], [ false, %2 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) ret i1 %spec.select } @@ -995,23 +977,17 @@ _ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit.thread: ; preds = % %.val.i.i.i.i = load i32, ptr %16, align 4 %.mask.i.i5 = and i32 %.val.i.i.i.i, -16777216 %17 = icmp eq i32 %.mask.i.i5, 100663296 - %18 = ptrtoint ptr %15 to i64 - %19 = and i64 %18, 1 - %.not.i.i.i.i = icmp eq i64 %19, 0 - br i1 %.not.i.i.i.i, label %20, label %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit + %18 = load i32, ptr %15, align 4, !tbaa !8 + %19 = icmp sgt i32 %18, 1 + br i1 %19, label %20, label %22, !prof !11 20: ; preds = %13 - %21 = load i32, ptr %15, align 4, !tbaa !8 - %22 = icmp sgt i32 %21, 1 - br i1 %22, label %23, label %25, !prof !11 - -23: ; preds = %20 - %24 = add nsw i32 %21, -1 - store i32 %24, ptr %15, align 4, !tbaa !8 + %21 = add nsw i32 %18, -1 + store i32 %21, ptr %15, align 4, !tbaa !8 call void @llvm.lifetime.end.p0(ptr nonnull %4) br i1 %17, label %30, label %43 -25: ; preds = %20 +25: ; preds = %13 %.not.i.i.i.i.i = icmp eq i32 %21, 0 br i1 %.not.i.i.i.i.i, label %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit, label %26 @@ -1026,11 +1002,11 @@ _ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit.thread: ; preds = % call void @__clang_call_terminate(ptr %29) #15 unreachable -_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit: ; preds = %13, %25, %26 +_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit: ; preds = %25, %26 call void @llvm.lifetime.end.p0(ptr nonnull %4) br i1 %17, label %30, label %43 -30: ; preds = %23, %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit +30: ; preds = %20, %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit %31 = load ptr, ptr %5, align 8, !tbaa !3 %32 = getelementptr inbounds nuw i8, ptr %31, i64 8 store i8 1, ptr %0, align 8, !tbaa !20 @@ -1060,7 +1036,7 @@ _ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit: ; preds = %13, %25 call void @lean_inc_ref_cold(ptr noundef nonnull %34) br label %_ZN4lean8optionalINS_4nameEEC2ERKS1_.exit -43: ; preds = %23, %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit.thread, %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit, %3 +43: ; preds = %20, %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit.thread, %_ZN4lean14is_constructorERKNS_11environmentERKNS_4nameE.exit, %3 store i8 0, ptr %0, align 8, !tbaa !20 br label %_ZN4lean8optionalINS_4nameEEC2ERKS1_.exit diff --git a/bench/lean4/optimized/lcnf.ll b/bench/lean4/optimized/lcnf.ll index 574a767165d..b52b7dad1bf 100644 --- a/bench/lean4/optimized/lcnf.ll +++ b/bench/lean4/optimized/lcnf.ll @@ -15106,23 +15106,17 @@ _ZNK4lean16elab_environment4findERKNS_4nameE.exit: ; preds = %5, %12, %14, %15 %.val.i.i.i = load i32, ptr %26, align 4 %.mask.i = and i32 %.val.i.i.i, -16777216 %27 = icmp eq i32 %.mask.i, 67108864 - %28 = ptrtoint ptr %25 to i64 - %29 = and i64 %28, 1 - %.not.i.i.i3 = icmp eq i64 %29, 0 - br i1 %.not.i.i.i3, label %30, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit + %28 = load i32, ptr %25, align 4, !tbaa !8 + %29 = icmp sgt i32 %28, 1 + br i1 %29, label %30, label %32, !prof !11 30: ; preds = %23 - %31 = load i32, ptr %25, align 4, !tbaa !8 - %32 = icmp sgt i32 %31, 1 - br i1 %32, label %33, label %35, !prof !11 - -33: ; preds = %30 - %34 = add nsw i32 %31, -1 - store i32 %34, ptr %25, align 4, !tbaa !8 + %31 = add nsw i32 %28, -1 + store i32 %31, ptr %25, align 4, !tbaa !8 br label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit -35: ; preds = %30 - %.not.i.i.i.i4 = icmp eq i32 %31, 0 +35: ; preds = %23 + %.not.i.i.i.i4 = icmp eq i32 %28, 0 br i1 %.not.i.i.i.i4, label %_ZN4lean8optionalINS_13constant_infoEED2Ev.exit, label %36 36: ; preds = %35 @@ -15136,8 +15130,8 @@ _ZNK4lean16elab_environment4findERKNS_4nameE.exit: ; preds = %5, %12, %14, %15 call void @__clang_call_terminate(ptr %39) #16 unreachable -_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %_ZNK4lean16elab_environment4findERKNS_4nameE.exit, %23, %33, %35, %36 - %40 = phi i1 [ %27, %23 ], [ %27, %33 ], [ %27, %35 ], [ %27, %36 ], [ false, %_ZNK4lean16elab_environment4findERKNS_4nameE.exit ] +_ZN4lean8optionalINS_13constant_infoEED2Ev.exit: ; preds = %_ZNK4lean16elab_environment4findERKNS_4nameE.exit, %30, %35, %36 + %40 = phi i1 [ %27, %30 ], [ %27, %32 ], [ %27, %33 ], [ false, %_ZNK4lean16elab_environment4findERKNS_4nameE.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %4) ret i1 %40 } @@ -16854,23 +16848,17 @@ define linkonce_odr hidden noundef i32 @_ZN4lean10to_lcnf_fn23get_constructor_nf %24 = load ptr, ptr %23, align 8, !tbaa !3 %25 = getelementptr inbounds nuw i8, ptr %24, i64 40 %26 = load ptr, ptr %25, align 8, !tbaa !3 - %27 = ptrtoint ptr %22 to i64 - %28 = and i64 %27, 1 - %.not.i.i = icmp eq i64 %28, 0 - br i1 %.not.i.i, label %29, label %_ZN4lean10object_refD2Ev.exit + %27 = load i32, ptr %22, align 8, !tbaa !8 + %28 = icmp sgt i32 %27, 1 + br i1 %28, label %29, label %31, !prof !11 29: ; preds = %21 - %30 = load i32, ptr %22, align 4, !tbaa !8 - %31 = icmp sgt i32 %30, 1 - br i1 %31, label %32, label %34, !prof !11 - -32: ; preds = %29 - %33 = add nsw i32 %30, -1 - store i32 %33, ptr %22, align 4, !tbaa !8 + %30 = add nsw i32 %27, -1 + store i32 %30, ptr %22, align 4, !tbaa !8 br label %_ZN4lean10object_refD2Ev.exit -34: ; preds = %29 - %.not.i.i.i3 = icmp eq i32 %30, 0 +34: ; preds = %21 + %.not.i.i.i3 = icmp eq i32 %27, 0 br i1 %.not.i.i.i3, label %_ZN4lean10object_refD2Ev.exit, label %35 35: ; preds = %34 @@ -16884,7 +16872,7 @@ define linkonce_odr hidden noundef i32 @_ZN4lean10to_lcnf_fn23get_constructor_nf call void @__clang_call_terminate(ptr %38) #16 unreachable -_ZN4lean10object_refD2Ev.exit: ; preds = %21, %32, %34, %35 +_ZN4lean10object_refD2Ev.exit: ; preds = %29, %34, %35 %39 = ptrtoint ptr %26 to i64 %40 = lshr i64 %39, 1 %41 = trunc i64 %40 to i32 diff --git a/bench/lean4/optimized/local_ctx.ll b/bench/lean4/optimized/local_ctx.ll index d8be5956596..d081abd3c22 100644 --- a/bench/lean4/optimized/local_ctx.ll +++ b/bench/lean4/optimized/local_ctx.ll @@ -390,22 +390,16 @@ define hidden void @_ZN4lean10local_declC2ERKS0_RKNS_4exprE(ptr noundef nonnull %4 = load ptr, ptr %1, align 8, !tbaa !8 %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 %6 = load ptr, ptr %5, align 8, !tbaa !8 - %7 = ptrtoint ptr %4 to i64 - %8 = and i64 %7, 1 - %.not.i.i.i = icmp eq i64 %8, 0 - br i1 %.not.i.i.i, label %9, label %_ZNK4lean10local_decl8get_infoEv.exit - -9: ; preds = %3 - %.val.i.i.i.i = load i32, ptr %4, align 4, !tbaa !10 - %10 = icmp sgt i32 %.val.i.i.i.i, 0 - br i1 %10, label %11, label %13, !prof !13 + %.val.i.i.i.i = load i32, ptr %4, align 8, !tbaa !10 + %7 = icmp sgt i32 %.val.i.i.i.i, 0 + br i1 %7, label %8, label %10, !prof !13 -11: ; preds = %9 +11: ; preds = %3 %12 = add nuw nsw i32 %.val.i.i.i.i, 1 store i32 %12, ptr %4, align 4, !tbaa !10 br label %_ZNK4lean10local_decl8get_infoEv.exit -13: ; preds = %9 +13: ; preds = %3 %.not.i.i.i.i = icmp eq i32 %.val.i.i.i.i, 0 br i1 %.not.i.i.i.i, label %_ZNK4lean10local_decl8get_infoEv.exit, label %14 @@ -414,8 +408,8 @@ define hidden void @_ZN4lean10local_declC2ERKS0_RKNS_4exprE(ptr noundef nonnull %.pre.i.i = load ptr, ptr %1, align 8, !tbaa !8 br label %_ZNK4lean10local_decl8get_infoEv.exit -_ZNK4lean10local_decl8get_infoEv.exit: ; preds = %3, %11, %13, %14 - %15 = phi ptr [ %4, %3 ], [ %4, %11 ], [ %4, %13 ], [ %.pre.i.i, %14 ] +_ZNK4lean10local_decl8get_infoEv.exit: ; preds = %11, %13, %14 + %15 = phi ptr [ %4, %8 ], [ %4, %10 ], [ %.pre.i.i, %11 ] %16 = getelementptr inbounds nuw i8, ptr %4, i64 24 %17 = getelementptr inbounds nuw i8, ptr %4, i64 16 %18 = ptrtoint ptr %6 to i64 diff --git a/bench/lean4/optimized/sharecommon.ll b/bench/lean4/optimized/sharecommon.ll index 2d8fe9a13d6..b6f5fe36b6e 100644 --- a/bench/lean4/optimized/sharecommon.ll +++ b/bench/lean4/optimized/sharecommon.ll @@ -2547,30 +2547,24 @@ _ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__ 74: ; preds = %72 %75 = getelementptr inbounds nuw i8, ptr %73, i64 8 %76 = load ptr, ptr %75, align 8, !tbaa !3 - %77 = ptrtoint ptr %73 to i64 - %78 = and i64 %77, 1 - %.not = icmp eq i64 %78, 0 - br i1 %.not, label %79, label %_ZL8lean_decP11lean_object.exit + %77 = load i32, ptr %73, align 8, !tbaa !13 + %78 = icmp sgt i32 %77, 1 + br i1 %78, label %79, label %81, !prof !16 79: ; preds = %74 - %80 = load i32, ptr %73, align 4, !tbaa !13 - %81 = icmp sgt i32 %80, 1 - br i1 %81, label %82, label %84, !prof !16 - -82: ; preds = %79 - %83 = add nsw i32 %80, -1 - store i32 %83, ptr %73, align 4, !tbaa !13 + %80 = add nsw i32 %77, -1 + store i32 %80, ptr %73, align 4, !tbaa !13 br label %_ZL8lean_decP11lean_object.exit -84: ; preds = %79 - %.not.i.i = icmp eq i32 %80, 0 +84: ; preds = %74 + %.not.i.i = icmp eq i32 %77, 0 br i1 %.not.i.i, label %_ZL8lean_decP11lean_object.exit, label %85 85: ; preds = %84 tail call void @lean_dec_ref_cold(ptr noundef nonnull %73) br label %_ZL8lean_decP11lean_object.exit -_ZL8lean_decP11lean_object.exit: ; preds = %82, %84, %85, %74 +_ZL8lean_decP11lean_object.exit: ; preds = %79, %84, %85 %86 = getelementptr inbounds nuw i8, ptr %0, i64 48 %87 = getelementptr inbounds nuw i8, ptr %0, i64 56 %88 = load ptr, ptr %87, align 8, !tbaa !73 @@ -2699,7 +2693,7 @@ _ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__ br label %_ZNSt6vectorIP11lean_objectSaIS1_EE9push_backERKS1_.exit _ZNSt6vectorIP11lean_objectSaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i29, %120, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i21, %91, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i13, %49, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i, %11 - %.0 = phi i1 [ true, %11 ], [ true, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i ], [ true, %49 ], [ true, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i13 ], [ true, %91 ], [ true, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i21 ], [ false, %120 ], [ false, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i29 ] + %.0 = phi i1 [ true, %11 ], [ true, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i ], [ true, %49 ], [ true, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i13 ], [ true, %88 ], [ true, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i21 ], [ false, %117 ], [ false, %_ZNSt6vectorIP11lean_objectSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i29 ] ret i1 %.0 } diff --git a/bench/lean4/optimized/tcp.ll b/bench/lean4/optimized/tcp.ll index ab511bc0e5a..277e84fe128 100644 --- a/bench/lean4/optimized/tcp.ll +++ b/bench/lean4/optimized/tcp.ll @@ -266,22 +266,16 @@ define noalias noundef nonnull ptr @lean_uv_tcp_connect(ptr noundef %0, ptr noun %9 = getelementptr inbounds nuw i8, ptr %8, i64 8 store ptr %0, ptr %9, align 8, !tbaa !47 store ptr %8, ptr %7, align 8, !tbaa !48 - %10 = ptrtoint ptr %0 to i64 - %11 = and i64 %10, 1 - %.not = icmp eq i64 %11, 0 - br i1 %.not, label %12, label %_ZL8lean_incP11lean_object.exit - -12: ; preds = %3 - %.val.i = load i32, ptr %0, align 4, !tbaa !40 - %13 = icmp sgt i32 %.val.i, 0 - br i1 %13, label %14, label %16, !prof !9 + %.val.i = load i32, ptr %0, align 8, !tbaa !40 + %10 = icmp sgt i32 %.val.i, 0 + br i1 %10, label %11, label %13, !prof !9 -14: ; preds = %12 +14: ; preds = %3 %15 = add nuw nsw i32 %.val.i, 1 store i32 %15, ptr %0, align 4, !tbaa !40 br label %_ZL8lean_incP11lean_object.exit -16: ; preds = %12 +16: ; preds = %3 %.not.i29 = icmp eq i32 %.val.i, 0 br i1 %.not.i29, label %_ZL8lean_incP11lean_object.exit, label %17 @@ -289,7 +283,7 @@ define noalias noundef nonnull ptr @lean_uv_tcp_connect(ptr noundef %0, ptr noun call void @lean_inc_ref_cold(ptr noundef nonnull %0) br label %_ZL8lean_incP11lean_object.exit -_ZL8lean_incP11lean_object.exit: ; preds = %17, %16, %14, %3 +_ZL8lean_incP11lean_object.exit: ; preds = %17, %16, %14 %18 = ptrtoint ptr %6 to i64 %19 = and i64 %18, 1 %.not35 = icmp eq i64 %19, 0 @@ -344,7 +338,7 @@ _ZL8lean_incP11lean_object.exit22: ; preds = %25, %24, %22, %_ZL8 br label %37 37: ; preds = %36, %33 - %38 = phi i32 [ %.pr, %36 ], [ %34, %33 ] + %38 = phi i32 [ %.pr, %33 ], [ %34, %30 ] %39 = icmp sgt i32 %38, 1 br i1 %39, label %40, label %42, !prof !52 @@ -361,28 +355,25 @@ _ZL8lean_incP11lean_object.exit22: ; preds = %25, %24, %22, %_ZL8 call void @lean_dec_ref_cold(ptr noundef nonnull %6) br label %_ZL8lean_decP11lean_object.exit23 -_ZL8lean_decP11lean_object.exit23: ; preds = %35, %43, %42, %40, %29 - br i1 %.not, label %44, label %_ZL8lean_decP11lean_object.exit24 - -44: ; preds = %_ZL8lean_decP11lean_object.exit23 - %45 = load i32, ptr %0, align 4, !tbaa !40 - %46 = icmp sgt i32 %45, 1 - br i1 %46, label %47, label %49, !prof !9 +_ZL8lean_decP11lean_object.exit23: ; preds = %26, %37, %42, %40, %32 + %41 = load i32, ptr %0, align 4, !tbaa !40 + %42 = icmp sgt i32 %41, 1 + br i1 %42, label %43, label %45, !prof !9 -47: ; preds = %44 - %48 = add nsw i32 %45, -1 +47: ; preds = %_ZL8lean_decP11lean_object.exit23 + %48 = add nsw i32 %41, -1 store i32 %48, ptr %0, align 4, !tbaa !40 br label %_ZL8lean_decP11lean_object.exit24 -49: ; preds = %44 - %.not.i = icmp eq i32 %45, 0 +49: ; preds = %_ZL8lean_decP11lean_object.exit23 + %.not.i = icmp eq i32 %41, 0 br i1 %.not.i, label %_ZL8lean_decP11lean_object.exit24, label %50 50: ; preds = %49 call void @lean_dec_ref_cold(ptr noundef nonnull %0) br label %_ZL8lean_decP11lean_object.exit24 -_ZL8lean_decP11lean_object.exit24: ; preds = %50, %49, %47, %_ZL8lean_decP11lean_object.exit23 +_ZL8lean_decP11lean_object.exit24: ; preds = %50, %49, %43 %51 = load ptr, ptr %7, align 8, !tbaa !48 call void @free(ptr noundef %51) #15 call void @free(ptr noundef nonnull %7) #15 @@ -407,9 +398,9 @@ _ZL8lean_decP11lean_object.exit24: ; preds = %50, %49, %47, %_ZL8 unreachable _ZL23lean_io_result_mk_errorP11lean_object.exit: ; preds = %56, %_ZL8lean_decP11lean_object.exit24 - %.sink50 = phi ptr [ %53, %_ZL8lean_decP11lean_object.exit24 ], [ %57, %56 ] - %.sink47 = phi i32 [ 16908312, %_ZL8lean_decP11lean_object.exit24 ], [ 131096, %56 ] - %.sink = phi ptr [ %52, %_ZL8lean_decP11lean_object.exit24 ], [ %6, %56 ] + %.sink50 = phi ptr [ %53, %_ZL8lean_decP11lean_object.exit24 ], [ %57, %52 ] + %.sink47 = phi i32 [ 16908312, %_ZL8lean_decP11lean_object.exit24 ], [ 131096, %52 ] + %.sink = phi ptr [ %52, %_ZL8lean_decP11lean_object.exit24 ], [ %6, %52 ] %60 = getelementptr inbounds nuw i8, ptr %.sink50, i64 4 store i32 1, ptr %.sink50, align 4, !tbaa !40 store i32 %.sink47, ptr %60, align 4 diff --git a/bench/libigl/optimized/unproject.ll b/bench/libigl/optimized/unproject.ll index d73523b0805..e4f675f0dd4 100644 --- a/bench/libigl/optimized/unproject.ll +++ b/bench/libigl/optimized/unproject.ll @@ -190,46 +190,46 @@ define weak_odr dso_local void @_ZN3igl9unprojectIdEEN5Eigen6MatrixIT_Li3ELi1ELi %27 = fmul <2 x double> %.sroa.0.i.i.sroa.7.24.vec.insert, splat (double 2.000000e+00) %28 = fadd <2 x double> %27, splat (double -1.000000e+00) %29 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> - %30 = getelementptr inbounds nuw i8, ptr %6, i64 96 + %30 = getelementptr inbounds nuw i8, ptr %6, i64 112 %31 = load <2 x double>, ptr %30, align 16, !tbaa !14 %32 = fmul <2 x double> %29, %31 - %33 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer - %34 = getelementptr inbounds nuw i8, ptr %6, i64 64 + %33 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer + %34 = getelementptr inbounds nuw i8, ptr %6, i64 16 %35 = load <2 x double>, ptr %34, align 16, !tbaa !14 %36 = fmul <2 x double> %33, %35 - %37 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer - %38 = load <2 x double>, ptr %6, align 16, !tbaa !14 - %39 = fmul <2 x double> %37, %38 - %40 = getelementptr inbounds nuw i8, ptr %6, i64 32 - %41 = load <2 x double>, ptr %40, align 16, !tbaa !14 %.sroa.0.i.i.sroa.0.8.vec.extract = extractelement <2 x double> %26, i64 1 %42 = bitcast double %.sroa.0.i.i.sroa.0.8.vec.extract to <1 x double> %43 = shufflevector <1 x double> %42, <1 x double> poison, <2 x i32> zeroinitializer - %44 = fmul <2 x double> %41, %43 - %45 = fadd <2 x double> %39, %44 - %46 = fadd <2 x double> %36, %45 - %47 = fadd <2 x double> %32, %46 - %48 = getelementptr inbounds nuw i8, ptr %6, i64 112 - %49 = load <2 x double>, ptr %48, align 16, !tbaa !14 - %50 = fmul <2 x double> %29, %49 - %51 = getelementptr inbounds nuw i8, ptr %6, i64 16 + %39 = getelementptr inbounds nuw i8, ptr %6, i64 48 + %40 = load <2 x double>, ptr %39, align 16, !tbaa !14 + %41 = fmul <2 x double> %38, %40 + %47 = fadd <2 x double> %36, %41 + %43 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer + %44 = getelementptr inbounds nuw i8, ptr %6, i64 80 + %45 = load <2 x double>, ptr %44, align 16, !tbaa !14 + %46 = fmul <2 x double> %43, %45 + %47 = fadd <2 x double> %42, %46 + %48 = fadd <2 x double> %32, %47 + %49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> + %50 = fdiv <2 x double> %48, %49 + %51 = getelementptr inbounds nuw i8, ptr %6, i64 96 %52 = load <2 x double>, ptr %51, align 16, !tbaa !14 - %53 = fmul <2 x double> %37, %52 - %54 = getelementptr inbounds nuw i8, ptr %6, i64 48 + %53 = fmul <2 x double> %29, %52 + %54 = getelementptr inbounds nuw i8, ptr %6, i64 64 %55 = load <2 x double>, ptr %54, align 16, !tbaa !14 %56 = fmul <2 x double> %43, %55 - %57 = fadd <2 x double> %53, %56 - %58 = getelementptr inbounds nuw i8, ptr %6, i64 80 - %59 = load <2 x double>, ptr %58, align 16, !tbaa !14 - %60 = fmul <2 x double> %33, %59 - %61 = fadd <2 x double> %57, %60 - %62 = fadd <2 x double> %50, %61 - %63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> - %64 = fdiv <2 x double> %47, %63 - %65 = fdiv <2 x double> %62, %63 - %66 = extractelement <2 x double> %65, i64 0 + %57 = load <2 x double>, ptr %6, align 16, !tbaa !14 + %58 = fmul <2 x double> %33, %57 + %59 = getelementptr inbounds nuw i8, ptr %6, i64 32 + %60 = load <2 x double>, ptr %59, align 16, !tbaa !14 + %61 = fmul <2 x double> %60, %38 + %62 = fadd <2 x double> %58, %61 + %63 = fadd <2 x double> %56, %62 + %64 = fadd <2 x double> %53, %63 + %65 = fdiv <2 x double> %64, %49 + %66 = extractelement <2 x double> %50, i64 0 call void @llvm.lifetime.end.p0(ptr nonnull %6) - store <2 x double> %64, ptr %0, align 8, !tbaa !14 + store <2 x double> %65, ptr %0, align 8, !tbaa !14 %67 = getelementptr inbounds nuw i8, ptr %0, i64 16 store double %66, ptr %67, align 8, !tbaa !18 ret void diff --git a/bench/libigl/optimized/vertex_triangle_adjacency.ll b/bench/libigl/optimized/vertex_triangle_adjacency.ll index ab5994f2ab9..19a164ed71a 100644 --- a/bench/libigl/optimized/vertex_triangle_adjacency.ll +++ b/bench/libigl/optimized/vertex_triangle_adjacency.ll @@ -2937,25 +2937,16 @@ _ZN5Eigen8internal23check_size_for_overflowIiEEvm.exit.i.i.i.i.i: ; preds = %32 %45 = getelementptr inbounds nuw i8, ptr %.sroa.0.0, i64 4 %46 = load ptr, ptr %3, align 8, !tbaa !108 %47 = ptrtoint ptr %45 to i64 - %48 = and i64 %47, 3 - %.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %48, 0 - br i1 %.not.i.i.i.i.i.i.i.i.i.i.i.i, label %49, label %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - -49: ; preds = %42 - %50 = lshr exact i64 %47, 2 - %51 = sub nsw i64 0, %50 - %52 = and i64 %51, 3 - %53 = call i64 @llvm.smin.i64(i64 %52, i64 %44) - br label %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - -_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i: ; preds = %49, %42 - %.0.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %53, %49 ], [ %44, %42 ] - %54 = sub nsw i64 %44, %.0.i.i.i.i.i.i.i.i.i.i.i.i - %55 = sdiv i64 %54, 4 - %56 = shl nsw i64 %55, 2 - %57 = add nsw i64 %56, %.0.i.i.i.i.i.i.i.i.i.i.i.i - %58 = icmp sgt i64 %.0.i.i.i.i.i.i.i.i.i.i.i.i, 0 - br i1 %58, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i + %47 = lshr exact i64 %47, 2 + %48 = sub nsw i64 0, %47 + %49 = and i64 %48, 3 + %50 = call i64 @llvm.smin.i64(i64 %49, i64 %43) + %51 = sub nsw i64 %43, %50 + %52 = sdiv i64 %51, 4 + %53 = shl nsw i64 %52, 2 + %54 = add nsw i64 %53, %50 + %55 = icmp sgt i64 %50, 0 + br i1 %55, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i %.05.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %62, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i ], [ 0, %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i ] @@ -2964,19 +2955,19 @@ _ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i. %61 = load i32, ptr %60, align 4, !tbaa !19 store i32 %61, ptr %59, align 4, !tbaa !19 %62 = add nuw nsw i64 %.05.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %62, %.0.i.i.i.i.i.i.i.i.i.i.i.i + %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %62, %50 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !114 _ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - %63 = icmp sgt i64 %54, 3 + %63 = icmp sgt i64 %51, 3 br i1 %63, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ._crit_edge.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i - %64 = icmp slt i64 %57, %44 + %64 = icmp slt i64 %54, %44 br i1 %64, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit .lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i: ; preds = %._crit_edge.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i - %.05.i18.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %68, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i ], [ %57, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ] + %.05.i18.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %68, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i ], [ %54, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ] %65 = getelementptr inbounds i32, ptr %45, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i %66 = getelementptr inbounds i32, ptr %46, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i %67 = load i32, ptr %66, align 4, !tbaa !19 @@ -2986,13 +2977,13 @@ _ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dens br i1 %exitcond.not.i19.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !114 .lr.ph.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i - %.021.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %72, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i ], [ %.0.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i ] + %.021.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %72, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i ], [ %50, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i ] %69 = getelementptr inbounds i32, ptr %45, i64 %.021.i.i.i.i.i.i.i.i.i.i.i %70 = getelementptr inbounds i32, ptr %46, i64 %.021.i.i.i.i.i.i.i.i.i.i.i %71 = load <2 x i64>, ptr %70, align 1, !tbaa !115 store <2 x i64> %71, ptr %69, align 16, !tbaa !115 %72 = add nsw i64 %.021.i.i.i.i.i.i.i.i.i.i.i, 4 - %73 = icmp slt i64 %72, %57 + %73 = icmp slt i64 %72, %54 br i1 %73, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !116 _ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit: ; preds = %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i @@ -3031,7 +3022,7 @@ thread-pre-split.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen16CommaIni br i1 %exitcond.not.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEaSERKS3_.exit, label %.lr.ph.i.i.i.i.i.i.i.i.i, !llvm.loop !117 .lr.ph.i.i.i.i.i.i.i.i: ; preds = %74, %.lr.ph.i.i.i.i.i.i.i.i - %.011.i.i.i.i.i.i.i.i = phi i64 [ %88, %.lr.ph.i.i.i.i.i.i.i.i ], [ 0, %74 ] + %.011.i.i.i.i.i.i.i.i = phi i64 [ %88, %.lr.ph.i.i.i.i.i.i.i.i ], [ 0, %71 ] %85 = getelementptr inbounds nuw i32, ptr %75, i64 %.011.i.i.i.i.i.i.i.i %86 = getelementptr inbounds nuw i32, ptr %.sroa.0.0, i64 %.011.i.i.i.i.i.i.i.i %87 = load <2 x i64>, ptr %86, align 16, !tbaa !115 @@ -3079,7 +3070,7 @@ thread-pre-split.i.i.i.i.i.i.i44: ; preds = %_ZN5Eigen15PlainObj br i1 %exitcond.not.i.i.i.i.i.i.i.i.i49, label %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEaSIS1_EERS1_RKNS_9DenseBaseIT_EE.exit, label %.lr.ph.i.i.i.i.i.i.i.i.i47, !llvm.loop !117 .lr.ph.i.i.i.i.i.i.i.i50: ; preds = %93, %.lr.ph.i.i.i.i.i.i.i.i50 - %.011.i.i.i.i.i.i.i.i51 = phi i64 [ %107, %.lr.ph.i.i.i.i.i.i.i.i50 ], [ 0, %93 ] + %.011.i.i.i.i.i.i.i.i51 = phi i64 [ %107, %.lr.ph.i.i.i.i.i.i.i.i50 ], [ 0, %90 ] %104 = getelementptr inbounds nuw i32, ptr %95, i64 %.011.i.i.i.i.i.i.i.i51 %105 = getelementptr inbounds nuw i32, ptr %90, i64 %.011.i.i.i.i.i.i.i.i51 %106 = load <2 x i64>, ptr %105, align 16, !tbaa !115 @@ -3128,7 +3119,7 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %_ZN5E br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %129 - %indvars.iv89 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next90, %129 ] + %indvars.iv89 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next90, %126 ] %123 = getelementptr i32, ptr %121, i64 %indvars.iv89 %124 = trunc nuw nsw i64 %indvars.iv89 to i32 br label %130 @@ -3155,28 +3146,28 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %_ZN5E br i1 %exitcond92.not, label %._crit_edge75, label %.preheader, !llvm.loop !120 130: ; preds = %.preheader, %130 - %indvars.iv85 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next86, %130 ] + %indvars.iv85 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next86, %127 ] %131 = mul nuw nsw i64 %119, %indvars.iv85 %132 = getelementptr i32, ptr %123, i64 %131 + %130 = load i32, ptr %129, align 4, !tbaa !19 + %131 = sext i32 %130 to i64 + %132 = getelementptr inbounds i32, ptr %.pre93, i64 %131 %133 = load i32, ptr %132, align 4, !tbaa !19 %134 = sext i32 %133 to i64 - %135 = getelementptr inbounds i32, ptr %.pre93, i64 %134 - %136 = load i32, ptr %135, align 4, !tbaa !19 + %135 = getelementptr inbounds i32, ptr %119, i64 %134 + store i32 %121, ptr %135, align 4, !tbaa !19 + %136 = load i32, ptr %129, align 4, !tbaa !19 %137 = sext i32 %136 to i64 - %138 = getelementptr inbounds i32, ptr %122, i64 %137 - store i32 %124, ptr %138, align 4, !tbaa !19 - %139 = load i32, ptr %132, align 4, !tbaa !19 - %140 = sext i32 %139 to i64 - %141 = getelementptr inbounds i32, ptr %.pre93, i64 %140 - %142 = load i32, ptr %141, align 4, !tbaa !19 - %143 = add nsw i32 %142, 1 - store i32 %143, ptr %141, align 4, !tbaa !19 + %138 = getelementptr inbounds i32, ptr %.pre93, i64 %137 + %139 = load i32, ptr %138, align 4, !tbaa !19 + %140 = add nsw i32 %139, 1 + store i32 %140, ptr %138, align 4, !tbaa !19 %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %exitcond88.not = icmp eq i64 %indvars.iv.next86, 3 br i1 %exitcond88.not, label %129, label %130, !llvm.loop !121 .body: ; preds = %127, %40, %.body53, %125 - %.pn41 = phi { ptr, i32 } [ %111, %.body53 ], [ %126, %125 ], [ %128, %127 ], [ %41, %40 ] + %.pn41 = phi { ptr, i32 } [ %111, %.body53 ], [ %126, %122 ], [ %128, %124 ], [ %41, %40 ] %144 = load ptr, ptr %5, align 8, !tbaa !108 call void @free(ptr noundef %144) #18 call void @llvm.lifetime.end.p0(ptr nonnull %5) @@ -3304,25 +3295,16 @@ _ZN5Eigen8internal23check_size_for_overflowIiEEvm.exit.i.i.i.i.i: ; preds = %32 %45 = getelementptr inbounds nuw i8, ptr %.sroa.0.0, i64 4 %46 = load ptr, ptr %3, align 8, !tbaa !108 %47 = ptrtoint ptr %45 to i64 - %48 = and i64 %47, 3 - %.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %48, 0 - br i1 %.not.i.i.i.i.i.i.i.i.i.i.i.i, label %49, label %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - -49: ; preds = %42 - %50 = lshr exact i64 %47, 2 - %51 = sub nsw i64 0, %50 - %52 = and i64 %51, 3 - %53 = call i64 @llvm.smin.i64(i64 %52, i64 %44) - br label %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - -_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i: ; preds = %49, %42 - %.0.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %53, %49 ], [ %44, %42 ] - %54 = sub nsw i64 %44, %.0.i.i.i.i.i.i.i.i.i.i.i.i - %55 = sdiv i64 %54, 4 - %56 = shl nsw i64 %55, 2 - %57 = add nsw i64 %56, %.0.i.i.i.i.i.i.i.i.i.i.i.i - %58 = icmp sgt i64 %.0.i.i.i.i.i.i.i.i.i.i.i.i, 0 - br i1 %58, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i + %47 = lshr exact i64 %47, 2 + %48 = sub nsw i64 0, %47 + %49 = and i64 %48, 3 + %50 = call i64 @llvm.smin.i64(i64 %49, i64 %43) + %51 = sub nsw i64 %43, %50 + %52 = sdiv i64 %51, 4 + %53 = shl nsw i64 %52, 2 + %54 = add nsw i64 %53, %50 + %55 = icmp sgt i64 %50, 0 + br i1 %55, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i %.05.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %62, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i ], [ 0, %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i ] @@ -3331,19 +3313,19 @@ _ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i. %61 = load i32, ptr %60, align 4, !tbaa !19 store i32 %61, ptr %59, align 4, !tbaa !19 %62 = add nuw nsw i64 %.05.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %62, %.0.i.i.i.i.i.i.i.i.i.i.i.i + %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %62, %50 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !114 _ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - %63 = icmp sgt i64 %54, 3 + %63 = icmp sgt i64 %51, 3 br i1 %63, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ._crit_edge.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i - %64 = icmp slt i64 %57, %44 + %64 = icmp slt i64 %54, %44 br i1 %64, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit .lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i: ; preds = %._crit_edge.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i - %.05.i18.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %68, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i ], [ %57, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ] + %.05.i18.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %68, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i ], [ %54, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ] %65 = getelementptr inbounds i32, ptr %45, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i %66 = getelementptr inbounds i32, ptr %46, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i %67 = load i32, ptr %66, align 4, !tbaa !19 @@ -3353,13 +3335,13 @@ _ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dens br i1 %exitcond.not.i19.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !114 .lr.ph.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i - %.021.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %72, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i ], [ %.0.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i ] + %.021.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %72, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i ], [ %50, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i ] %69 = getelementptr inbounds i32, ptr %45, i64 %.021.i.i.i.i.i.i.i.i.i.i.i %70 = getelementptr inbounds i32, ptr %46, i64 %.021.i.i.i.i.i.i.i.i.i.i.i %71 = load <2 x i64>, ptr %70, align 1, !tbaa !115 store <2 x i64> %71, ptr %69, align 16, !tbaa !115 %72 = add nsw i64 %.021.i.i.i.i.i.i.i.i.i.i.i, 4 - %73 = icmp slt i64 %72, %57 + %73 = icmp slt i64 %72, %54 br i1 %73, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !116 _ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit: ; preds = %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i @@ -3398,7 +3380,7 @@ thread-pre-split.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen16CommaIni br i1 %exitcond.not.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEaSERKS3_.exit, label %.lr.ph.i.i.i.i.i.i.i.i.i, !llvm.loop !117 .lr.ph.i.i.i.i.i.i.i.i: ; preds = %74, %.lr.ph.i.i.i.i.i.i.i.i - %.011.i.i.i.i.i.i.i.i = phi i64 [ %88, %.lr.ph.i.i.i.i.i.i.i.i ], [ 0, %74 ] + %.011.i.i.i.i.i.i.i.i = phi i64 [ %88, %.lr.ph.i.i.i.i.i.i.i.i ], [ 0, %71 ] %85 = getelementptr inbounds nuw i32, ptr %75, i64 %.011.i.i.i.i.i.i.i.i %86 = getelementptr inbounds nuw i32, ptr %.sroa.0.0, i64 %.011.i.i.i.i.i.i.i.i %87 = load <2 x i64>, ptr %86, align 16, !tbaa !115 @@ -3446,7 +3428,7 @@ thread-pre-split.i.i.i.i.i.i.i44: ; preds = %_ZN5Eigen15PlainObj br i1 %exitcond.not.i.i.i.i.i.i.i.i.i49, label %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEaSIS1_EERS1_RKNS_9DenseBaseIT_EE.exit, label %.lr.ph.i.i.i.i.i.i.i.i.i47, !llvm.loop !117 .lr.ph.i.i.i.i.i.i.i.i50: ; preds = %93, %.lr.ph.i.i.i.i.i.i.i.i50 - %.011.i.i.i.i.i.i.i.i51 = phi i64 [ %107, %.lr.ph.i.i.i.i.i.i.i.i50 ], [ 0, %93 ] + %.011.i.i.i.i.i.i.i.i51 = phi i64 [ %107, %.lr.ph.i.i.i.i.i.i.i.i50 ], [ 0, %90 ] %104 = getelementptr inbounds nuw i32, ptr %95, i64 %.011.i.i.i.i.i.i.i.i51 %105 = getelementptr inbounds nuw i32, ptr %90, i64 %.011.i.i.i.i.i.i.i.i51 %106 = load <2 x i64>, ptr %105, align 16, !tbaa !115 @@ -3495,7 +3477,7 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %_ZN5E br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %129 - %indvars.iv89 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next90, %129 ] + %indvars.iv89 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next90, %126 ] %123 = getelementptr i32, ptr %121, i64 %indvars.iv89 %124 = trunc nuw nsw i64 %indvars.iv89 to i32 br label %130 @@ -3522,28 +3504,28 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %_ZN5E br i1 %exitcond92.not, label %._crit_edge75, label %.preheader, !llvm.loop !127 130: ; preds = %.preheader, %130 - %indvars.iv85 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next86, %130 ] + %indvars.iv85 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next86, %127 ] %131 = mul nuw nsw i64 %119, %indvars.iv85 %132 = getelementptr i32, ptr %123, i64 %131 + %130 = load i32, ptr %129, align 4, !tbaa !19 + %131 = sext i32 %130 to i64 + %132 = getelementptr inbounds i32, ptr %.pre93, i64 %131 %133 = load i32, ptr %132, align 4, !tbaa !19 %134 = sext i32 %133 to i64 - %135 = getelementptr inbounds i32, ptr %.pre93, i64 %134 - %136 = load i32, ptr %135, align 4, !tbaa !19 + %135 = getelementptr inbounds i32, ptr %119, i64 %134 + store i32 %121, ptr %135, align 4, !tbaa !19 + %136 = load i32, ptr %129, align 4, !tbaa !19 %137 = sext i32 %136 to i64 - %138 = getelementptr inbounds i32, ptr %122, i64 %137 - store i32 %124, ptr %138, align 4, !tbaa !19 - %139 = load i32, ptr %132, align 4, !tbaa !19 - %140 = sext i32 %139 to i64 - %141 = getelementptr inbounds i32, ptr %.pre93, i64 %140 - %142 = load i32, ptr %141, align 4, !tbaa !19 - %143 = add nsw i32 %142, 1 - store i32 %143, ptr %141, align 4, !tbaa !19 + %138 = getelementptr inbounds i32, ptr %.pre93, i64 %137 + %139 = load i32, ptr %138, align 4, !tbaa !19 + %140 = add nsw i32 %139, 1 + store i32 %140, ptr %138, align 4, !tbaa !19 %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %exitcond88.not = icmp eq i64 %indvars.iv.next86, 3 br i1 %exitcond88.not, label %129, label %130, !llvm.loop !128 .body: ; preds = %127, %40, %.body53, %125 - %.pn41 = phi { ptr, i32 } [ %111, %.body53 ], [ %126, %125 ], [ %128, %127 ], [ %41, %40 ] + %.pn41 = phi { ptr, i32 } [ %111, %.body53 ], [ %126, %122 ], [ %128, %124 ], [ %41, %40 ] %144 = load ptr, ptr %5, align 8, !tbaa !108 call void @free(ptr noundef %144) #18 call void @llvm.lifetime.end.p0(ptr nonnull %5) diff --git a/bench/linux/optimized/af_netlink.ll b/bench/linux/optimized/af_netlink.ll index 5f51e263b6f..3c0840d7668 100644 --- a/bench/linux/optimized/af_netlink.ll +++ b/bench/linux/optimized/af_netlink.ll @@ -2569,7 +2569,7 @@ define internal fastcc range(i32 -16, -17) i32 @netlink_insert(ptr noundef %0, i 93: ; preds = %89, %87 %94 = phi ptr [ %88, %87 ], [ %92, %89 ] %95 = icmp eq ptr %94, null - br i1 %95, label %211, label %96 + br i1 %95, label %207, label %96 96: ; preds = %93 call void @llvm.lifetime.start.p0(ptr nonnull %4) @@ -2728,57 +2728,53 @@ define internal fastcc range(i32 -16, -17) i32 @netlink_insert(ptr noundef %0, i %181 = inttoptr i64 %138 to ptr store volatile ptr %181, ptr %34, align 8 call void asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; incl $0", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %166, ptr nonnull elementtype(i32) %166) #23, !srcloc !29 - %182 = ptrtoint ptr %34 to i64 - %183 = and i64 %182, 1 - %184 = icmp eq i64 %183, 0 - %185 = select i1 %184, ptr %34, ptr null call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #23, !srcloc !76 - store volatile ptr %185, ptr %94, align 8 + store volatile ptr %34, ptr %94, align 8 call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #23, !srcloc !77 %186 = call i8 asm sideeffect "decl %gs:$0\0A\09/* output condition code e*/\0A", "=*m,={@cce},*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8), ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #23, !srcloc !19 %187 = icmp ult i8 %186, 2 call void @llvm.assume(i1 %187) %188 = icmp eq i8 %186, 0 - br i1 %188, label %192, label %189, !prof !9 + br i1 %188, label %188, label %189, !prof !9 189: ; preds = %180 %190 = call i64 @llvm.read_register.i64(metadata !0) %191 = call i64 asm sideeffect "call __SCT__preempt_schedule", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %190) #23, !srcloc !78 call void @llvm.write_register.i64(metadata !0, i64 %191) - br label %192 + br label %188 -192: ; preds = %189, %180 - %193 = and i64 %97, 512 - %194 = icmp eq i64 %193, 0 - br i1 %194, label %196, label %195 +188: ; preds = %185, %180 + %189 = and i64 %97, 512 + %190 = icmp eq i64 %189, 0 + br i1 %190, label %192, label %191 -195: ; preds = %192 +191: ; preds = %188 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #23, !srcloc !74 - br label %196 - -196: ; preds = %195, %192 - %197 = load volatile i32, ptr %166, align 4 - %198 = load i32, ptr %40, align 64 - %199 = lshr i32 %198, 2 - %200 = mul nuw i32 %199, 3 - %201 = icmp ugt i32 %197, %200 - br i1 %201, label %202, label %211 - -202: ; preds = %196 - %203 = getelementptr inbounds nuw i8, ptr %18, i64 24 - %204 = load i32, ptr %203, align 8 - %205 = add i32 %204, -1 - %206 = icmp ult i32 %205, %198 - br i1 %206, label %211, label %207 - -207: ; preds = %202 - %208 = getelementptr inbounds nuw i8, ptr %18, i64 64 - %209 = load ptr, ptr @system_wq, align 8 - %210 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %209, ptr noundef nonnull %208) #23 - br label %211 - -211: ; preds = %223, %220, %207, %202, %196, %93 - %212 = phi ptr [ inttoptr (i64 -12 to ptr), %93 ], [ null, %207 ], [ null, %202 ], [ null, %196 ], [ %213, %220 ], [ %213, %223 ] + br label %192 + +192: ; preds = %191, %188 + %193 = load volatile i32, ptr %166, align 4 + %194 = load i32, ptr %40, align 64 + %195 = lshr i32 %194, 2 + %196 = mul nuw i32 %195, 3 + %197 = icmp ugt i32 %193, %196 + br i1 %197, label %198, label %207 + +198: ; preds = %192 + %199 = getelementptr inbounds nuw i8, ptr %18, i64 24 + %200 = load i32, ptr %199, align 8 + %201 = add i32 %200, -1 + %202 = icmp ult i32 %201, %194 + br i1 %202, label %207, label %203 + +203: ; preds = %198 + %204 = getelementptr inbounds nuw i8, ptr %18, i64 64 + %205 = load ptr, ptr @system_wq, align 8 + %206 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %205, ptr noundef nonnull %204) #23 + br label %207 + +195: ; preds = %219, %216, %203, %198, %192, %93 + %208 = phi ptr [ inttoptr (i64 -12 to ptr), %93 ], [ null, %203 ], [ null, %198 ], [ null, %192 ], [ %213, %216 ], [ %209, %219 ] call void @__rcu_read_unlock() #23 br label %224 @@ -2802,14 +2798,14 @@ define internal fastcc range(i32 -16, -17) i32 @netlink_insert(ptr noundef %0, i 220: ; preds = %217, %.loopexit %221 = and i64 %97, 512 %222 = icmp eq i64 %221, 0 - br i1 %222, label %211, label %223 + br i1 %222, label %207, label %223 223: ; preds = %220 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #23, !srcloc !74 - br label %211 + br label %207 -224: ; preds = %211, %129 - %225 = phi ptr [ %130, %129 ], [ %212, %211 ] +224: ; preds = %207, %129 + %225 = phi ptr [ %130, %129 ], [ %208, %207 ] %226 = icmp ugt ptr %225, inttoptr (i64 -4096 to ptr) %227 = ptrtoint ptr %225 to i64 %228 = trunc i64 %227 to i32 @@ -2830,7 +2826,7 @@ define internal fastcc range(i32 -16, -17) i32 @netlink_insert(ptr noundef %0, i br label %.thread5 .thread5: ; preds = %224, %.thread5.fold.split, %232 - %233 = phi i32 [ -98, %232 ], [ -75, %224 ], [ %231, %.thread5.fold.split ] + %233 = phi i32 [ -98, %228 ], [ -75, %220 ], [ %231, %.thread5.fold.split ] %234 = call i32 asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; xaddl $0, $1\0A", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %19, i32 -1, ptr nonnull elementtype(i32) %19) #23, !srcloc !30 %235 = icmp eq i32 %234, 1 br i1 %235, label %239, label %236 @@ -2856,7 +2852,7 @@ define internal fastcc range(i32 -16, -17) i32 @netlink_insert(ptr noundef %0, i br label %.thread7 .thread7: ; preds = %236, %238, %240, %239, %2 - %243 = phi i32 [ %12, %2 ], [ 0, %240 ], [ %233, %239 ], [ %233, %238 ], [ %233, %236 ] + %243 = phi i32 [ %12, %2 ], [ 0, %236 ], [ %233, %235 ], [ %233, %234 ], [ %233, %232 ] call void @release_sock(ptr noundef %0) #23 ret i32 %243 } diff --git a/bench/linux/optimized/fatent.ll b/bench/linux/optimized/fatent.ll index 3b20669159e..e138642d2f9 100644 --- a/bench/linux/optimized/fatent.ll +++ b/bench/linux/optimized/fatent.ll @@ -2098,22 +2098,10 @@ define internal range(i32 0, 268435456) i32 @fat32_ent_get(ptr noundef readonly %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load ptr, ptr %2, align 8 %4 = load i32, ptr %3, align 4 - %5 = ptrtoint ptr %3 to i64 - %6 = and i64 %5, 3 - %7 = icmp eq i64 %6, 0 - br i1 %7, label %9, label %8, !prof !31 - -8: ; preds = %1 - tail call void asm sideeffect "427: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 427b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 427) #9, !srcloc !41 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 150, i32 2305, i64 12) #9, !srcloc !42 - tail call void asm sideeffect "428: nop\0A\09.pushsection .discard.instr_end\0A\09.long 428b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 428) #9, !srcloc !43 - br label %9 - -9: ; preds = %8, %1 - %10 = and i32 %4, 268435455 - %11 = icmp samesign ugt i32 %10, 268435446 - %12 = select i1 %11, i32 268435455, i32 %10 - ret i32 %12 + %5 = and i32 %4, 268435455 + %6 = icmp samesign ugt i32 %5, 268435446 + %7 = select i1 %6, i32 268435455, i32 %5 + ret i32 %7 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid @@ -2122,9 +2110,9 @@ define internal void @fat32_ent_put(ptr noundef readonly captures(none) %0, i32 br i1 %3, label %5, label %4, !prof !31 4: ; preds = %2 - tail call void asm sideeffect "429: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 429b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 429) #9, !srcloc !44 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 189, i32 2305, i64 12) #9, !srcloc !45 - tail call void asm sideeffect "430: nop\0A\09.pushsection .discard.instr_end\0A\09.long 430b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 430) #9, !srcloc !46 + tail call void asm sideeffect "429: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 429b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 429) #9, !srcloc !41 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 189, i32 2305, i64 12) #9, !srcloc !42 + tail call void asm sideeffect "430: nop\0A\09.pushsection .discard.instr_end\0A\09.long 430b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 430) #9, !srcloc !43 br label %5 5: ; preds = %4, %2 @@ -2184,9 +2172,9 @@ define internal void @fat16_ent_set_ptr(ptr noundef captures(none) initializes(( br i1 %4, label %6, label %5, !prof !31 5: ; preds = %2 - tail call void asm sideeffect "417: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 417b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 417) #9, !srcloc !47 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 59, i32 2305, i64 12) #9, !srcloc !48 - tail call void asm sideeffect "418: nop\0A\09.pushsection .discard.instr_end\0A\09.long 418b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 418) #9, !srcloc !49 + tail call void asm sideeffect "417: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 417b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 417) #9, !srcloc !44 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 59, i32 2305, i64 12) #9, !srcloc !45 + tail call void asm sideeffect "418: nop\0A\09.pushsection .discard.instr_end\0A\09.long 418b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 418) #9, !srcloc !46 br label %6 6: ; preds = %5, %2 @@ -2206,22 +2194,10 @@ define internal range(i32 0, 268435456) i32 @fat16_ent_get(ptr noundef readonly %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 %3 = load ptr, ptr %2, align 8 %4 = load i16, ptr %3, align 2 - %5 = ptrtoint ptr %3 to i64 - %6 = and i64 %5, 1 - %7 = icmp eq i64 %6, 0 - br i1 %7, label %9, label %8, !prof !31 - -8: ; preds = %1 - tail call void asm sideeffect "425: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 425b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 425) #9, !srcloc !50 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 141, i32 2305, i64 12) #9, !srcloc !51 - tail call void asm sideeffect "426: nop\0A\09.pushsection .discard.instr_end\0A\09.long 426b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 426) #9, !srcloc !52 - br label %9 - -9: ; preds = %8, %1 - %10 = zext i16 %4 to i32 - %11 = icmp ugt i16 %4, -10 - %12 = select i1 %11, i32 268435455, i32 %10 - ret i32 %12 + %5 = zext i16 %4 to i32 + %6 = icmp ugt i16 %4, -10 + %7 = select i1 %6, i32 268435455, i32 %5 + ret i32 %7 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid @@ -2276,9 +2252,9 @@ define internal void @fat12_ent_blocknr(ptr noundef readonly captures(none) %0, br i1 %12, label %14, label %13, !prof !31 13: ; preds = %8, %4 - tail call void asm sideeffect "409: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 409b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 409) #9, !srcloc !53 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 28, i32 2305, i64 12) #9, !srcloc !54 - tail call void asm sideeffect "410: nop\0A\09.pushsection .discard.instr_end\0A\09.long 410b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 410) #9, !srcloc !55 + tail call void asm sideeffect "409: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 409b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 409) #9, !srcloc !47 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 28, i32 2305, i64 12) #9, !srcloc !48 + tail call void asm sideeffect "410: nop\0A\09.pushsection .discard.instr_end\0A\09.long 410b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 410) #9, !srcloc !49 br label %14 14: ; preds = %13, %8 @@ -2321,9 +2297,9 @@ define internal void @fat12_ent_set_ptr(ptr noundef captures(none) initializes(( br i1 %13, label %15, label %14, !prof !31 14: ; preds = %12 - tail call void asm sideeffect "413: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 413b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 413) #9, !srcloc !56 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 47, i32 2305, i64 12) #9, !srcloc !57 - tail call void asm sideeffect "414: nop\0A\09.pushsection .discard.instr_end\0A\09.long 414b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 414) #9, !srcloc !58 + tail call void asm sideeffect "413: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 413b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 413) #9, !srcloc !50 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 47, i32 2305, i64 12) #9, !srcloc !51 + tail call void asm sideeffect "414: nop\0A\09.pushsection .discard.instr_end\0A\09.long 414b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 414) #9, !srcloc !52 %.pre1 = load ptr, ptr %3, align 8 br label %15 @@ -2345,9 +2321,9 @@ define internal void @fat12_ent_set_ptr(ptr noundef captures(none) initializes(( br i1 %26, label %28, label %27, !prof !31 27: ; preds = %25 - tail call void asm sideeffect "415: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 415b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 415) #9, !srcloc !59 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 51, i32 2305, i64 12) #9, !srcloc !60 - tail call void asm sideeffect "416: nop\0A\09.pushsection .discard.instr_end\0A\09.long 416b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 416) #9, !srcloc !61 + tail call void asm sideeffect "415: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 415b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 415) #9, !srcloc !53 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 51, i32 2305, i64 12) #9, !srcloc !54 + tail call void asm sideeffect "416: nop\0A\09.pushsection .discard.instr_end\0A\09.long 416b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 416) #9, !srcloc !55 %.pre = load ptr, ptr %3, align 8 br label %28 @@ -2383,9 +2359,9 @@ define internal noundef range(i32 -5, 1) i32 @fat12_ent_bread(ptr noundef %0, pt br i1 %11, label %12, label %13, !prof !13 12: ; preds = %4 - tail call void asm sideeffect "421: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 421b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 421) #9, !srcloc !62 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 74, i32 2305, i64 12) #9, !srcloc !63 - tail call void asm sideeffect "422: nop\0A\09.pushsection .discard.instr_end\0A\09.long 422b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 422) #9, !srcloc !64 + tail call void asm sideeffect "421: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 421b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 421) #9, !srcloc !56 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 74, i32 2305, i64 12) #9, !srcloc !57 + tail call void asm sideeffect "422: nop\0A\09.pushsection .discard.instr_end\0A\09.long 422b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 422) #9, !srcloc !58 %.pre = load ptr, ptr %6, align 8 br label %13 @@ -2433,9 +2409,9 @@ define internal noundef range(i32 -5, 1) i32 @fat12_ent_bread(ptr noundef %0, pt br i1 %43, label %45, label %44, !prof !31 44: ; preds = %37 - tail call void asm sideeffect "413: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 413b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 413) #9, !srcloc !56 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 47, i32 2305, i64 12) #9, !srcloc !57 - tail call void asm sideeffect "414: nop\0A\09.pushsection .discard.instr_end\0A\09.long 414b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 414) #9, !srcloc !58 + tail call void asm sideeffect "413: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 413b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 413) #9, !srcloc !50 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 47, i32 2305, i64 12) #9, !srcloc !51 + tail call void asm sideeffect "414: nop\0A\09.pushsection .discard.instr_end\0A\09.long 414b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 414) #9, !srcloc !52 %.pre5 = load ptr, ptr %5, align 8 br label %45 @@ -2464,9 +2440,9 @@ define internal noundef range(i32 -5, 1) i32 @fat12_ent_bread(ptr noundef %0, pt br i1 %61, label %63, label %62, !prof !31 62: ; preds = %54 - tail call void asm sideeffect "415: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 415b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 415) #9, !srcloc !59 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 51, i32 2305, i64 12) #9, !srcloc !60 - tail call void asm sideeffect "416: nop\0A\09.pushsection .discard.instr_end\0A\09.long 416b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 416) #9, !srcloc !61 + tail call void asm sideeffect "415: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 415b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 415) #9, !srcloc !53 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 51, i32 2305, i64 12) #9, !srcloc !54 + tail call void asm sideeffect "416: nop\0A\09.pushsection .discard.instr_end\0A\09.long 416b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 416) #9, !srcloc !55 %.pre3 = load ptr, ptr %5, align 8 %.pre4 = load ptr, ptr %35, align 8 br label %63 @@ -2648,9 +2624,9 @@ define internal noundef range(i32 0, 2) i32 @fat12_ent_next(ptr noundef captures br i1 %24, label %25, label %26, !prof !13 25: ; preds = %22 - tail call void asm sideeffect "431: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 431b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 431) #9, !srcloc !65 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 204, i32 2305, i64 12) #9, !srcloc !66 - tail call void asm sideeffect "432: nop\0A\09.pushsection .discard.instr_end\0A\09.long 432b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 432) #9, !srcloc !67 + tail call void asm sideeffect "431: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 431b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 431) #9, !srcloc !59 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 204, i32 2305, i64 12) #9, !srcloc !60 + tail call void asm sideeffect "432: nop\0A\09.pushsection .discard.instr_end\0A\09.long 432b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 432) #9, !srcloc !61 %.pre2 = load ptr, ptr %4, align 8 %.pre3 = load ptr, ptr %3, align 8 %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %.pre3, i64 40 @@ -2669,9 +2645,9 @@ define internal noundef range(i32 0, 2) i32 @fat12_ent_next(ptr noundef captures br i1 %32, label %33, label %34, !prof !13 33: ; preds = %26 - tail call void asm sideeffect "433: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 433b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 433) #9, !srcloc !68 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 206, i32 2305, i64 12) #9, !srcloc !69 - tail call void asm sideeffect "434: nop\0A\09.pushsection .discard.instr_end\0A\09.long 434b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 434) #9, !srcloc !70 + tail call void asm sideeffect "433: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 433b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 433) #9, !srcloc !62 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 206, i32 2305, i64 12) #9, !srcloc !63 + tail call void asm sideeffect "434: nop\0A\09.pushsection .discard.instr_end\0A\09.long 434b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 434) #9, !srcloc !64 %.pre7 = load ptr, ptr %3, align 8 %.phi.trans.insert8 = getelementptr inbounds nuw i8, ptr %.pre7, i64 40 %.pre9 = load ptr, ptr %.phi.trans.insert8, align 8 @@ -2699,9 +2675,9 @@ define internal noundef range(i32 0, 2) i32 @fat12_ent_next(ptr noundef captures br i1 %44, label %46, label %45, !prof !31 45: ; preds = %42 - tail call void asm sideeffect "435: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 435b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 435) #9, !srcloc !71 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 214, i32 2305, i64 12) #9, !srcloc !72 - tail call void asm sideeffect "436: nop\0A\09.pushsection .discard.instr_end\0A\09.long 436b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 436) #9, !srcloc !73 + tail call void asm sideeffect "435: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 435b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 435) #9, !srcloc !65 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 214, i32 2305, i64 12) #9, !srcloc !66 + tail call void asm sideeffect "436: nop\0A\09.pushsection .discard.instr_end\0A\09.long 436b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 436) #9, !srcloc !67 %.pre = load ptr, ptr %4, align 8 br label %46 @@ -2715,9 +2691,9 @@ define internal noundef range(i32 0, 2) i32 @fat12_ent_next(ptr noundef captures br i1 %52, label %54, label %53, !prof !31 53: ; preds = %46 - tail call void asm sideeffect "437: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 437b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 437) #9, !srcloc !74 - tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 215, i32 2305, i64 12) #9, !srcloc !75 - tail call void asm sideeffect "438: nop\0A\09.pushsection .discard.instr_end\0A\09.long 438b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 438) #9, !srcloc !76 + tail call void asm sideeffect "437: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 437b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 437) #9, !srcloc !68 + tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.3, i32 215, i32 2305, i64 12) #9, !srcloc !69 + tail call void asm sideeffect "438: nop\0A\09.pushsection .discard.instr_end\0A\09.long 438b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 438) #9, !srcloc !70 br label %54 54: ; preds = %53, %46 @@ -2866,39 +2842,33 @@ attributes #11 = { nounwind memory(none) } !38 = !{i64 2155580933, i64 2155580742, i64 2155580794, i64 2155580840, i64 2155580868} !39 = !{i64 2155581007, i64 2155581036, i64 2155581082, i64 2155581140, i64 2155581194, i64 2155581248, i64 2155581303, i64 2155581334, i64 2155581642, i64 2155581648, i64 2155581695, i64 2155581718, i64 2155581744} !40 = !{i64 2155582192, i64 2155582003, i64 2155582053, i64 2155582099, i64 2155582127} -!41 = !{i64 2155585977, i64 2155585786, i64 2155585838, i64 2155585884, i64 2155585912} -!42 = !{i64 2155586051, i64 2155586080, i64 2155586126, i64 2155586184, i64 2155586238, i64 2155586292, i64 2155586347, i64 2155586378, i64 2155586686, i64 2155586692, i64 2155586739, i64 2155586762, i64 2155586788} -!43 = !{i64 2155587236, i64 2155587047, i64 2155587097, i64 2155587143, i64 2155587171} -!44 = !{i64 2155588196, i64 2155588005, i64 2155588057, i64 2155588103, i64 2155588131} -!45 = !{i64 2155588270, i64 2155588299, i64 2155588345, i64 2155588403, i64 2155588457, i64 2155588511, i64 2155588566, i64 2155588597, i64 2155588905, i64 2155588911, i64 2155588958, i64 2155588981, i64 2155589007} -!46 = !{i64 2155589455, i64 2155589266, i64 2155589316, i64 2155589362, i64 2155589390} -!47 = !{i64 2155574014, i64 2155573823, i64 2155573875, i64 2155573921, i64 2155573949} -!48 = !{i64 2155574088, i64 2155574117, i64 2155574163, i64 2155574221, i64 2155574275, i64 2155574329, i64 2155574384, i64 2155574415, i64 2155574723, i64 2155574729, i64 2155574776, i64 2155574799, i64 2155574825} -!49 = !{i64 2155575272, i64 2155575083, i64 2155575133, i64 2155575179, i64 2155575207} -!50 = !{i64 2155583780, i64 2155583589, i64 2155583641, i64 2155583687, i64 2155583715} -!51 = !{i64 2155583854, i64 2155583883, i64 2155583929, i64 2155583987, i64 2155584041, i64 2155584095, i64 2155584150, i64 2155584181, i64 2155584489, i64 2155584495, i64 2155584542, i64 2155584565, i64 2155584591} -!52 = !{i64 2155585039, i64 2155584850, i64 2155584900, i64 2155584946, i64 2155584974} -!53 = !{i64 2155565662, i64 2155565471, i64 2155565523, i64 2155565569, i64 2155565597} -!54 = !{i64 2155565736, i64 2155565765, i64 2155565811, i64 2155565869, i64 2155565923, i64 2155565977, i64 2155566032, i64 2155566063, i64 2155566371, i64 2155566377, i64 2155566424, i64 2155566447, i64 2155566473} -!55 = !{i64 2155566920, i64 2155566731, i64 2155566781, i64 2155566827, i64 2155566855} -!56 = !{i64 2155569844, i64 2155569653, i64 2155569705, i64 2155569751, i64 2155569779} -!57 = !{i64 2155569918, i64 2155569947, i64 2155569993, i64 2155570051, i64 2155570105, i64 2155570159, i64 2155570214, i64 2155570245, i64 2155570553, i64 2155570559, i64 2155570606, i64 2155570629, i64 2155570655} -!58 = !{i64 2155571102, i64 2155570913, i64 2155570963, i64 2155571009, i64 2155571037} -!59 = !{i64 2155571936, i64 2155571745, i64 2155571797, i64 2155571843, i64 2155571871} -!60 = !{i64 2155572010, i64 2155572039, i64 2155572085, i64 2155572143, i64 2155572197, i64 2155572251, i64 2155572306, i64 2155572337, i64 2155572645, i64 2155572651, i64 2155572698, i64 2155572721, i64 2155572747} -!61 = !{i64 2155573194, i64 2155573005, i64 2155573055, i64 2155573101, i64 2155573129} -!62 = !{i64 2155578187, i64 2155577996, i64 2155578048, i64 2155578094, i64 2155578122} -!63 = !{i64 2155578261, i64 2155578290, i64 2155578336, i64 2155578394, i64 2155578448, i64 2155578502, i64 2155578557, i64 2155578588, i64 2155578896, i64 2155578902, i64 2155578949, i64 2155578972, i64 2155578998} -!64 = !{i64 2155579445, i64 2155579256, i64 2155579306, i64 2155579352, i64 2155579380} -!65 = !{i64 2155590433, i64 2155590242, i64 2155590294, i64 2155590340, i64 2155590368} -!66 = !{i64 2155590507, i64 2155590536, i64 2155590582, i64 2155590640, i64 2155590694, i64 2155590748, i64 2155590803, i64 2155590834, i64 2155591142, i64 2155591148, i64 2155591195, i64 2155591218, i64 2155591244} -!67 = !{i64 2155591692, i64 2155591503, i64 2155591553, i64 2155591599, i64 2155591627} -!68 = !{i64 2155592561, i64 2155592370, i64 2155592422, i64 2155592468, i64 2155592496} -!69 = !{i64 2155592635, i64 2155592664, i64 2155592710, i64 2155592768, i64 2155592822, i64 2155592876, i64 2155592931, i64 2155592962, i64 2155593270, i64 2155593276, i64 2155593323, i64 2155593346, i64 2155593372} -!70 = !{i64 2155593820, i64 2155593631, i64 2155593681, i64 2155593727, i64 2155593755} -!71 = !{i64 2155594690, i64 2155594499, i64 2155594551, i64 2155594597, i64 2155594625} -!72 = !{i64 2155594764, i64 2155594793, i64 2155594839, i64 2155594897, i64 2155594951, i64 2155595005, i64 2155595060, i64 2155595091, i64 2155595399, i64 2155595405, i64 2155595452, i64 2155595475, i64 2155595501} -!73 = !{i64 2155595949, i64 2155595760, i64 2155595810, i64 2155595856, i64 2155595884} -!74 = !{i64 2155596787, i64 2155596596, i64 2155596648, i64 2155596694, i64 2155596722} -!75 = !{i64 2155596861, i64 2155596890, i64 2155596936, i64 2155596994, i64 2155597048, i64 2155597102, i64 2155597157, i64 2155597188, i64 2155597496, i64 2155597502, i64 2155597549, i64 2155597572, i64 2155597598} -!76 = !{i64 2155598046, i64 2155597857, i64 2155597907, i64 2155597953, i64 2155597981} +!41 = !{i64 2155588196, i64 2155588005, i64 2155588057, i64 2155588103, i64 2155588131} +!42 = !{i64 2155588270, i64 2155588299, i64 2155588345, i64 2155588403, i64 2155588457, i64 2155588511, i64 2155588566, i64 2155588597, i64 2155588905, i64 2155588911, i64 2155588958, i64 2155588981, i64 2155589007} +!43 = !{i64 2155589455, i64 2155589266, i64 2155589316, i64 2155589362, i64 2155589390} +!44 = !{i64 2155574014, i64 2155573823, i64 2155573875, i64 2155573921, i64 2155573949} +!45 = !{i64 2155574088, i64 2155574117, i64 2155574163, i64 2155574221, i64 2155574275, i64 2155574329, i64 2155574384, i64 2155574415, i64 2155574723, i64 2155574729, i64 2155574776, i64 2155574799, i64 2155574825} +!46 = !{i64 2155575272, i64 2155575083, i64 2155575133, i64 2155575179, i64 2155575207} +!47 = !{i64 2155565662, i64 2155565471, i64 2155565523, i64 2155565569, i64 2155565597} +!48 = !{i64 2155565736, i64 2155565765, i64 2155565811, i64 2155565869, i64 2155565923, i64 2155565977, i64 2155566032, i64 2155566063, i64 2155566371, i64 2155566377, i64 2155566424, i64 2155566447, i64 2155566473} +!49 = !{i64 2155566920, i64 2155566731, i64 2155566781, i64 2155566827, i64 2155566855} +!50 = !{i64 2155569844, i64 2155569653, i64 2155569705, i64 2155569751, i64 2155569779} +!51 = !{i64 2155569918, i64 2155569947, i64 2155569993, i64 2155570051, i64 2155570105, i64 2155570159, i64 2155570214, i64 2155570245, i64 2155570553, i64 2155570559, i64 2155570606, i64 2155570629, i64 2155570655} +!52 = !{i64 2155571102, i64 2155570913, i64 2155570963, i64 2155571009, i64 2155571037} +!53 = !{i64 2155571936, i64 2155571745, i64 2155571797, i64 2155571843, i64 2155571871} +!54 = !{i64 2155572010, i64 2155572039, i64 2155572085, i64 2155572143, i64 2155572197, i64 2155572251, i64 2155572306, i64 2155572337, i64 2155572645, i64 2155572651, i64 2155572698, i64 2155572721, i64 2155572747} +!55 = !{i64 2155573194, i64 2155573005, i64 2155573055, i64 2155573101, i64 2155573129} +!56 = !{i64 2155578187, i64 2155577996, i64 2155578048, i64 2155578094, i64 2155578122} +!57 = !{i64 2155578261, i64 2155578290, i64 2155578336, i64 2155578394, i64 2155578448, i64 2155578502, i64 2155578557, i64 2155578588, i64 2155578896, i64 2155578902, i64 2155578949, i64 2155578972, i64 2155578998} +!58 = !{i64 2155579445, i64 2155579256, i64 2155579306, i64 2155579352, i64 2155579380} +!59 = !{i64 2155590433, i64 2155590242, i64 2155590294, i64 2155590340, i64 2155590368} +!60 = !{i64 2155590507, i64 2155590536, i64 2155590582, i64 2155590640, i64 2155590694, i64 2155590748, i64 2155590803, i64 2155590834, i64 2155591142, i64 2155591148, i64 2155591195, i64 2155591218, i64 2155591244} +!61 = !{i64 2155591692, i64 2155591503, i64 2155591553, i64 2155591599, i64 2155591627} +!62 = !{i64 2155592561, i64 2155592370, i64 2155592422, i64 2155592468, i64 2155592496} +!63 = !{i64 2155592635, i64 2155592664, i64 2155592710, i64 2155592768, i64 2155592822, i64 2155592876, i64 2155592931, i64 2155592962, i64 2155593270, i64 2155593276, i64 2155593323, i64 2155593346, i64 2155593372} +!64 = !{i64 2155593820, i64 2155593631, i64 2155593681, i64 2155593727, i64 2155593755} +!65 = !{i64 2155594690, i64 2155594499, i64 2155594551, i64 2155594597, i64 2155594625} +!66 = !{i64 2155594764, i64 2155594793, i64 2155594839, i64 2155594897, i64 2155594951, i64 2155595005, i64 2155595060, i64 2155595091, i64 2155595399, i64 2155595405, i64 2155595452, i64 2155595475, i64 2155595501} +!67 = !{i64 2155595949, i64 2155595760, i64 2155595810, i64 2155595856, i64 2155595884} +!68 = !{i64 2155596787, i64 2155596596, i64 2155596648, i64 2155596694, i64 2155596722} +!69 = !{i64 2155596861, i64 2155596890, i64 2155596936, i64 2155596994, i64 2155597048, i64 2155597102, i64 2155597157, i64 2155597188, i64 2155597496, i64 2155597502, i64 2155597549, i64 2155597572, i64 2155597598} +!70 = !{i64 2155598046, i64 2155597857, i64 2155597907, i64 2155597953, i64 2155597981} diff --git a/bench/linux/optimized/ioam6.ll b/bench/linux/optimized/ioam6.ll index 825b1f0241b..8d626577fdd 100644 --- a/bench/linux/optimized/ioam6.ll +++ b/bench/linux/optimized/ioam6.ll @@ -2004,7 +2004,7 @@ define internal fastcc i32 @rhashtable_lookup_insert_fast(ptr noundef %0, ptr no 70: ; preds = %66, %64 %71 = phi ptr [ %65, %64 ], [ %69, %66 ] %72 = icmp eq ptr %71, null - br i1 %72, label %217, label %73 + br i1 %72, label %213, label %73 73: ; preds = %70 call void @llvm.lifetime.start.p0(ptr nonnull %4) @@ -2215,57 +2215,53 @@ define internal fastcc i32 @rhashtable_lookup_insert_fast(ptr noundef %0, ptr no %187 = inttoptr i64 %186 to ptr store volatile ptr %187, ptr %1, align 8 call void asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; incl $0", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %167, ptr nonnull elementtype(i32) %167) #16, !srcloc !45 - %188 = ptrtoint ptr %1 to i64 - %189 = and i64 %188, 1 - %190 = icmp eq i64 %189, 0 - %191 = select i1 %190, ptr %1, ptr null call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #16, !srcloc !46 - store volatile ptr %191, ptr %71, align 8 + store volatile ptr %1, ptr %71, align 8 call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #16, !srcloc !47 %192 = call i8 asm sideeffect "decl %gs:$0\0A\09/* output condition code e*/\0A", "=*m,={@cce},*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8), ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #16, !srcloc !32 %193 = icmp ult i8 %192, 2 call void @llvm.assume(i1 %193) %194 = icmp eq i8 %192, 0 - br i1 %194, label %198, label %195, !prof !6 + br i1 %194, label %194, label %195, !prof !6 195: ; preds = %181 %196 = call i64 @llvm.read_register.i64(metadata !0) %197 = call i64 asm sideeffect "call __SCT__preempt_schedule", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %196) #16, !srcloc !48 call void @llvm.write_register.i64(metadata !0, i64 %197) - br label %198 + br label %194 -198: ; preds = %195, %181 - %199 = and i64 %74, 512 - %200 = icmp eq i64 %199, 0 - br i1 %200, label %202, label %201 +194: ; preds = %191, %181 + %195 = and i64 %74, 512 + %196 = icmp eq i64 %195, 0 + br i1 %196, label %198, label %197 -201: ; preds = %198 +197: ; preds = %194 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #16, !srcloc !43 - br label %202 - -202: ; preds = %201, %198 - %203 = load volatile i32, ptr %167, align 4 - %204 = load i32, ptr %29, align 64 - %205 = lshr i32 %204, 2 - %206 = mul nuw i32 %205, 3 - %207 = icmp ugt i32 %203, %206 - br i1 %207, label %208, label %217 - -208: ; preds = %202 - %209 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %210 = load i32, ptr %209, align 8 - %211 = add i32 %210, -1 - %212 = icmp ult i32 %211, %204 - br i1 %212, label %217, label %213 - -213: ; preds = %208 - %214 = getelementptr inbounds nuw i8, ptr %0, i64 64 - %215 = load ptr, ptr @system_wq, align 8 - %216 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %215, ptr noundef nonnull %214) #16 - br label %217 - -217: ; preds = %230, %227, %213, %208, %202, %70 - %218 = phi ptr [ inttoptr (i64 -12 to ptr), %70 ], [ null, %213 ], [ null, %208 ], [ null, %202 ], [ %220, %227 ], [ %220, %230 ] + br label %198 + +198: ; preds = %197, %194 + %199 = load volatile i32, ptr %167, align 4 + %200 = load i32, ptr %29, align 64 + %201 = lshr i32 %200, 2 + %202 = mul nuw i32 %201, 3 + %203 = icmp ugt i32 %199, %202 + br i1 %203, label %204, label %213 + +204: ; preds = %198 + %205 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %203 = load i32, ptr %205, align 8 + %207 = add i32 %206, -1 + %208 = icmp ult i32 %207, %200 + br i1 %208, label %213, label %209 + +209:; preds = %204 + %210 = getelementptr inbounds nuw i8, ptr %0, i64 64 + %211 = load ptr, ptr @system_wq, align 8 + %212 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %211, ptr noundef nonnull %210) #16 + br label %213 + +213:; preds = %226, %223, %209, %204, %198, %70 + %214 = phi ptr [ inttoptr (i64 -12 to ptr), %70 ], [ null, %209 ], [ null, %204 ], [ null, %198 ], [ %216, %223 ], [ %216, %226 ] call void @__rcu_read_unlock() #16 br label %231 @@ -2289,14 +2285,14 @@ define internal fastcc i32 @rhashtable_lookup_insert_fast(ptr noundef %0, ptr no 227: ; preds = %224, %219 %228 = and i64 %74, 512 %229 = icmp eq i64 %228, 0 - br i1 %229, label %217, label %230 + br i1 %229, label %213, label %230 230: ; preds = %227 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #16, !srcloc !43 - br label %217 + br label %213 -231: ; preds = %217, %106 - %232 = phi ptr [ %107, %106 ], [ %218, %217 ] +231: ; preds = %213, %106 + %232 = phi ptr [ %107, %106 ], [ %214, %213 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %233 = icmp ugt ptr %232, inttoptr (i64 -4096 to ptr) %234 = ptrtoint ptr %232 to i64 diff --git a/bench/linux/optimized/request.ll b/bench/linux/optimized/request.ll index 7cbd2f92ba2..80293f9ae10 100644 --- a/bench/linux/optimized/request.ll +++ b/bench/linux/optimized/request.ll @@ -454,7 +454,7 @@ define dso_local i32 @handshake_req_submit(ptr noundef readonly captures(address 99: ; preds = %95, %93 %100 = phi ptr [ %94, %93 ], [ %98, %95 ] %101 = icmp eq ptr %100, null - br i1 %101, label %216, label %102 + br i1 %101, label %212, label %102 102: ; preds = %99 call void @llvm.lifetime.start.p0(ptr nonnull %4) @@ -616,53 +616,49 @@ define dso_local i32 @handshake_req_submit(ptr noundef readonly captures(address %188 = inttoptr i64 %144 to ptr store volatile ptr %188, ptr %40, align 8 call void asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; incl $0", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 132), ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 132)) #11, !srcloc !38 - %189 = ptrtoint ptr %40 to i64 - %190 = and i64 %189, 1 - %191 = icmp eq i64 %190, 0 - %192 = select i1 %191, ptr %40, ptr null call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !39 - store volatile ptr %192, ptr %100, align 8 + store volatile ptr %40, ptr %100, align 8 call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !40 %193 = call i8 asm sideeffect "decl %gs:$0\0A\09/* output condition code e*/\0A", "=*m,={@cce},*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8), ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #11, !srcloc !24 %194 = icmp ult i8 %193, 2 call void @llvm.assume(i1 %194) %195 = icmp eq i8 %193, 0 - br i1 %195, label %199, label %196, !prof !6 + br i1 %195, label %195, label %196, !prof !6 196: ; preds = %187 %197 = call i64 @llvm.read_register.i64(metadata !0) %198 = call i64 asm sideeffect "call __SCT__preempt_schedule", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %197) #11, !srcloc !41 call void @llvm.write_register.i64(metadata !0, i64 %198) - br label %199 + br label %195 -199: ; preds = %196, %187 - %200 = and i64 %103, 512 - %201 = icmp eq i64 %200, 0 - br i1 %201, label %203, label %202 +195: ; preds = %192, %187 + %196 = and i64 %103, 512 + %197 = icmp eq i64 %196, 0 + br i1 %197, label %199, label %198 -202: ; preds = %199 +198: ; preds = %195 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !35 - br label %203 - -203: ; preds = %202, %199 - %204 = load volatile i32, ptr getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 132), align 4 - %205 = load i32, ptr %52, align 64 - %206 = lshr i32 %205, 2 - %207 = mul nuw i32 %206, 3 - %208 = icmp ugt i32 %204, %207 - %209 = load i32, ptr getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 24), align 8 - %210 = add i32 %209, -1 - %211 = icmp uge i32 %210, %205 - %212 = select i1 %208, i1 %211, i1 false - br i1 %212, label %213, label %216 - -213: ; preds = %203 - %214 = load ptr, ptr @system_wq, align 8 - %215 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %214, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 64)) #11 - br label %216 - -216: ; preds = %228, %225, %213, %203, %99 - %217 = phi ptr [ inttoptr (i64 -12 to ptr), %99 ], [ null, %213 ], [ null, %203 ], [ %218, %225 ], [ %218, %228 ] + br label %199 + +199: ; preds = %198, %195 + %200 = load volatile i32, ptr getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 132), align 4 + %201 = load i32, ptr %52, align 64 + %202 = lshr i32 %201, 2 + %203 = mul nuw i32 %202, 3 + %204 = icmp ugt i32 %200, %203 + %205 = load i32, ptr getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 24), align 8 + %206 = add i32 %205, -1 + %207 = icmp uge i32 %206, %201 + %208 = select i1 %204, i1 %207, i1 false + br i1 %208, label %209, label %212 + +209:; preds = %199 + %210 = load ptr, ptr @system_wq, align 8 + %211 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %210, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @handshake_rhashtbl, i64 64)) #11 + br label %212 + +212:; preds = %224, %221, %209, %199, %99 + %213 = phi ptr [ inttoptr (i64 -12 to ptr), %99 ], [ null, %209 ], [ null, %199 ], [ %214, %221 ], [ %214, %224 ] call void @__rcu_read_unlock() #11 br label %229 @@ -686,14 +682,14 @@ define dso_local i32 @handshake_req_submit(ptr noundef readonly captures(address 225: ; preds = %222, %.loopexit %226 = and i64 %103, 512 %227 = icmp eq i64 %226, 0 - br i1 %227, label %216, label %228 + br i1 %227, label %212, label %228 228: ; preds = %225 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !35 - br label %216 + br label %212 -229: ; preds = %216, %135 - %230 = phi ptr [ %136, %135 ], [ %217, %216 ] +229: ; preds = %212, %135 + %230 = phi ptr [ %136, %135 ], [ %213, %212 ] %231 = icmp ugt ptr %230, inttoptr (i64 -4096 to ptr) %232 = ptrtoint ptr %230 to i64 %233 = icmp eq ptr %230, null @@ -729,15 +725,15 @@ define dso_local i32 @handshake_req_submit(ptr noundef readonly captures(address br label %277 251: ; preds = %237, %229, %34 - %252 = phi i32 [ -16, %237 ], [ -16, %229 ], [ -95, %34 ] + %252 = phi i32 [ -16, %233 ], [ -16, %225 ], [ -95, %34 ] call void @_raw_spin_unlock(ptr noundef nonnull %26) #11 br label %253 253: ; preds = %251, %244, %28, %19 - %254 = phi i32 [ -11, %28 ], [ %252, %251 ], [ %242, %244 ], [ -95, %19 ] + %254 = phi i32 [ -11, %28 ], [ %252, %247 ], [ %242, %240 ], [ -95, %19 ] %255 = load ptr, ptr %16, align 8 callbr void asm sideeffect "1:jmp ${2:l} # objtool NOPs this \0A\09.pushsection __jump_table, \22aw\22 \0A\09 .balign 8 \0A\09.long 1b - . \0A\09.long ${2:l} - . \0A\09 .quad ${0:c} + ${1:c} - .\0A\09.popsection \0A\09", "i,i,!i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull getelementptr inbounds nuw (i8, ptr @__tracepoint_handshake_submit_err, i64 8), i32 2) #11 - to label %276 [label %256], !srcloc !42 + to label %272 [label %252], !srcloc !42 256: ; preds = %253 %257 = call i32 asm sideeffect "movl %gs:$1, $0", "=r,*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 12)) #11, !srcloc !43 @@ -780,7 +776,7 @@ define dso_local i32 @handshake_req_submit(ptr noundef readonly captures(address br label %277 277: ; preds = %276, %247, %18, %12 - %278 = phi i32 [ %254, %276 ], [ 0, %247 ], [ -22, %18 ], [ -22, %12 ] + %278 = phi i32 [ %254, %272 ], [ 0, %243 ], [ -22, %18 ], [ -22, %12 ] ret i32 %278 } diff --git a/bench/linux/optimized/sta_info.ll b/bench/linux/optimized/sta_info.ll index d8d80b8eca4..e58618d9422 100644 --- a/bench/linux/optimized/sta_info.ll +++ b/bench/linux/optimized/sta_info.ll @@ -8328,12 +8328,8 @@ define internal fastcc i32 @rhltable_insert(ptr noundef %0, ptr noundef %1, ptr %215 = getelementptr inbounds nuw i8, ptr %1, i64 8 store volatile ptr null, ptr %215, align 8 call void asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; incl $0", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %194, ptr nonnull elementtype(i32) %194) #18, !srcloc !299 - %216 = ptrtoint ptr %1 to i64 - %217 = and i64 %216, 1 - %218 = icmp eq i64 %217, 0 - %219 = select i1 %218, ptr %1, ptr null call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #18, !srcloc !288 - store volatile ptr %219, ptr %63, align 8 + store volatile ptr %1, ptr %63, align 8 call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #18, !srcloc !289 %220 = call i8 asm sideeffect "decl %gs:$0\0A\09/* output condition code e*/\0A", "=*m,={@cce},*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8), ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #18, !srcloc !71 %221 = icmp ult i8 %220, 2 @@ -8378,7 +8374,7 @@ define internal fastcc i32 @rhltable_insert(ptr noundef %0, ptr noundef %1, ptr br label %.thread .thread: ; preds = %185, %184, %176, %175, %246, %241, %236, %230, %62 - %245 = phi ptr [ inttoptr (i64 -7 to ptr), %246 ], [ inttoptr (i64 -12 to ptr), %62 ], [ null, %241 ], [ null, %236 ], [ null, %230 ], [ null, %175 ], [ null, %176 ], [ null, %184 ], [ null, %185 ] + %245 = phi ptr [ inttoptr (i64 -7 to ptr), %242 ], [ inttoptr (i64 -12 to ptr), %62 ], [ null, %237 ], [ null, %232 ], [ null, %226 ], [ null, %175 ], [ null, %176 ], [ null, %184 ], [ null, %185 ] call void @__rcu_read_unlock() #18 br label %247 diff --git a/bench/linux/optimized/util.ll b/bench/linux/optimized/util.ll index c7a83760f55..1388b179753 100644 --- a/bench/linux/optimized/util.ll +++ b/bench/linux/optimized/util.ll @@ -299,7 +299,7 @@ define dso_local i32 @ipc_addid(ptr noundef %0, ptr noundef %1, i32 noundef %2) 117: ; preds = %113, %111 %118 = phi ptr [ %112, %111 ], [ %116, %113 ] %119 = icmp eq ptr %118, null - br i1 %119, label %220, label %120 + br i1 %119, label %216, label %120 120: ; preds = %117 call void @llvm.lifetime.start.p0(ptr nonnull %4) @@ -436,66 +436,62 @@ define dso_local i32 @ipc_addid(ptr noundef %0, ptr noundef %1, i32 noundef %2) 190: ; preds = %185, %181 store volatile ptr %163, ptr %72, align 8 call void asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; incl $0", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %176, ptr nonnull elementtype(i32) %176) #15, !srcloc !34 - %191 = ptrtoint ptr %72 to i64 - %192 = and i64 %191, 1 - %193 = icmp eq i64 %192, 0 - %194 = select i1 %193, ptr %72, ptr null call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #15, !srcloc !35 - store volatile ptr %194, ptr %118, align 8 + store volatile ptr %72, ptr %118, align 8 call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #15, !srcloc !36 %195 = call i8 asm sideeffect "decl %gs:$0\0A\09/* output condition code e*/\0A", "=*m,={@cce},*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8), ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #15, !srcloc !9 %196 = icmp ult i8 %195, 2 call void @llvm.assume(i1 %196) %197 = icmp eq i8 %195, 0 - br i1 %197, label %201, label %198, !prof !10 + br i1 %197, label %197, label %198, !prof !10 198: ; preds = %190 %199 = call i64 @llvm.read_register.i64(metadata !0) %200 = call i64 asm sideeffect "call __SCT__preempt_schedule", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %199) #15, !srcloc !37 call void @llvm.write_register.i64(metadata !0, i64 %200) - br label %201 + br label %197 -201: ; preds = %198, %190 - %202 = and i64 %121, 512 - %203 = icmp eq i64 %202, 0 - br i1 %203, label %205, label %204 +197: ; preds = %194, %190 + %198 = and i64 %121, 512 + %199 = icmp eq i64 %198, 0 + br i1 %199, label %201, label %200 -204: ; preds = %201 +200: ; preds = %197 call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #15, !srcloc !32 - br label %205 - -205: ; preds = %204, %201 - %206 = load volatile i32, ptr %176, align 4 - %207 = load i32, ptr %73, align 64 - %208 = lshr i32 %207, 2 - %209 = mul nuw i32 %208, 3 - %210 = icmp ugt i32 %206, %209 - br i1 %210, label %211, label %220 - -211: ; preds = %205 - %212 = getelementptr inbounds nuw i8, ptr %0, i64 104 - %213 = load i32, ptr %212, align 8 - %214 = add i32 %213, -1 - %215 = icmp ult i32 %214, %207 - br i1 %215, label %220, label %216 - -216: ; preds = %211 - %217 = getelementptr inbounds nuw i8, ptr %0, i64 144 - %218 = load ptr, ptr @system_wq, align 8 - %219 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %218, ptr noundef nonnull %217) #15 - br label %220 - -220: ; preds = %222, %216, %211, %205, %117 - %221 = phi ptr [ inttoptr (i64 -7 to ptr), %222 ], [ inttoptr (i64 -12 to ptr), %117 ], [ null, %216 ], [ null, %211 ], [ null, %205 ] + br label %201 + +201: ; preds = %200, %197 + %202 = load volatile i32, ptr %176, align 4 + %203 = load i32, ptr %73, align 64 + %204 = lshr i32 %203, 2 + %205 = mul nuw i32 %204, 3 + %206 = icmp ugt i32 %202, %205 + br i1 %206, label %207, label %216 + +207: ; preds = %201 + %208 = getelementptr inbounds nuw i8, ptr %0, i64 104 + %206 = load i32, ptr %208, align 8 + %210 = add i32 %209, -1 + %211 = icmp ult i32 %210, %203 + br i1 %211, label %216, label %212 + +212:; preds = %207 + %213 = getelementptr inbounds nuw i8, ptr %0, i64 144 + %214 = load ptr, ptr @system_wq, align 8 + %215 = call zeroext i1 @queue_work_on(i32 noundef 64, ptr noundef %214, ptr noundef nonnull %213) #15 + br label %216 + +216:; preds = %222, %212, %207, %201, %117 + %217 = phi ptr [ inttoptr (i64 -7 to ptr), %218 ], [ inttoptr (i64 -12 to ptr), %117 ], [ null, %212 ], [ null, %207 ], [ null, %201 ] call void @__rcu_read_unlock() #15 br label %223 222: ; preds = %175 call fastcc void @rht_unlock(ptr noundef nonnull %118, i64 noundef %121) - br label %220 + br label %216 -223: ; preds = %220, %153 - %224 = phi ptr [ %154, %153 ], [ %221, %220 ] +223: ; preds = %216, %153 + %224 = phi ptr [ %154, %153 ], [ %217, %216 ] %225 = icmp ugt ptr %224, inttoptr (i64 -4096 to ptr) %226 = ptrtoint ptr %224 to i64 %227 = trunc i64 %226 to i32 @@ -511,7 +507,7 @@ define dso_local i32 @ipc_addid(ptr noundef %0, ptr noundef %1, i32 noundef %2) br label %.thread .thread: ; preds = %65, %232 - %235 = phi i32 [ %32, %65 ], [ %230, %232 ] + %235 = phi i32 [ %32, %65 ], [ %230, %228 ] store i8 1, ptr %23, align 4 call void @_raw_spin_unlock(ptr noundef %1) #15 call void @__rcu_read_unlock() #15 @@ -531,7 +527,7 @@ define dso_local i32 @ipc_addid(ptr noundef %0, ptr noundef %1, i32 noundef %2) br label %242 242: ; preds = %241, %.thread6, %.thread, %3 - %243 = phi i32 [ %235, %.thread ], [ -28, %3 ], [ %32, %241 ], [ %32, %.thread6 ] + %243 = phi i32 [ %235, %.thread ], [ -28, %3 ], [ %32, %237 ], [ %32, %.thread6 ] ret i32 %243 } diff --git a/bench/llvm/optimized/Z3CrosscheckVisitor.ll b/bench/llvm/optimized/Z3CrosscheckVisitor.ll index 393e75ef2ee..3db9fe27c47 100644 --- a/bench/llvm/optimized/Z3CrosscheckVisitor.ll +++ b/bench/llvm/optimized/Z3CrosscheckVisitor.ll @@ -163,8 +163,9 @@ $_ZZN5clang4ento17ProgramStateTraitIN4llvm12ImmutableMapIPKNS0_7SymExprENS0_8Ran ; Function Attrs: mustprogress nounwind uwtable define dso_local void @_ZN5clang4ento19Z3CrosscheckVisitorC2ERNS1_8Z3ResultERKNS_15AnalyzerOptionsE(ptr noundef nonnull writeonly align 8 captures(none) dereferenceable(40) initializes((0, 40)) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(488) %2) unnamed_addr #0 align 2 { - %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr null, ptr %4, align 8, !tbaa !3 +_ZN4llvm14ImutAVLFactoryINS_16ImutKeyValueInfoIPKN5clang4ento7SymExprENS3_8RangeSetEEEED2Ev.exit: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr null, ptr %3, align 8, !tbaa !3 store ptr getelementptr inbounds nuw inrange(-16, 48) (i8, ptr @_ZTVN5clang4ento19Z3CrosscheckVisitorE, i64 16), ptr %0, align 8, !tbaa !8 %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 %6 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #19 @@ -181,18 +182,9 @@ define dso_local void @_ZN5clang4ento19Z3CrosscheckVisitorC2ERNS1_8Z3ResultERKNS %13 = getelementptr inbounds nuw i8, ptr %6, i64 88 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 0, i64 16, i1 false) store i64 1, ptr %13, align 8, !tbaa !14 - %14 = ptrtoint ptr %6 to i64 - store ptr null, ptr %5, align 8, !tbaa !27, !alias.scope !30 - %15 = and i64 %14, 1 - %16 = icmp eq i64 %15, 0 - br i1 %16, label %17, label %_ZN4llvm14ImutAVLFactoryINS_16ImutKeyValueInfoIPKN5clang4ento7SymExprENS3_8RangeSetEEEED2Ev.exit - -17: ; preds = %3 - tail call void @_ZN4llvm20BumpPtrAllocatorImplINS_15MallocAllocatorELm4096ELm4096ELm128EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %6) #20 - tail call void @_ZdlPvm(ptr noundef nonnull %6, i64 noundef 96) #21 - br label %_ZN4llvm14ImutAVLFactoryINS_16ImutKeyValueInfoIPKN5clang4ento7SymExprENS3_8RangeSetEEEED2Ev.exit - -_ZN4llvm14ImutAVLFactoryINS_16ImutKeyValueInfoIPKN5clang4ento7SymExprENS3_8RangeSetEEEED2Ev.exit: ; preds = %17, %3 + store ptr null, ptr %6, align 8, !tbaa !27, !alias.scope !30 + tail call void @_ZN4llvm20BumpPtrAllocatorImplINS_15MallocAllocatorELm4096ELm4096ELm128EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %5) #20 + tail call void @_ZdlPvm(ptr noundef nonnull %5, i64 noundef 96) #21 tail call void @_ZN4llvm17deallocate_bufferEPvmm(ptr noundef null, i64 noundef 0, i64 noundef 8) #20 %18 = getelementptr inbounds nuw i8, ptr %0, i64 24 store ptr %1, ptr %18, align 8, !tbaa !33 diff --git a/bench/meshlab/optimized/filter_parametrization.ll b/bench/meshlab/optimized/filter_parametrization.ll index 0109e012fe9..c133fa52f97 100644 --- a/bench/meshlab/optimized/filter_parametrization.ll +++ b/bench/meshlab/optimized/filter_parametrization.ll @@ -7371,25 +7371,16 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2INS_14CwiseNullaryOpINS_8internal18sc %58 = getelementptr inbounds nuw i8, ptr %.sroa.0.0102, i64 4 %59 = load ptr, ptr %3, align 8 %60 = ptrtoint ptr %58 to i64 - %61 = and i64 %60, 3 - %.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %61, 0 - br i1 %.not.i.i.i.i.i.i.i.i.i.i.i.i, label %62, label %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - -62: ; preds = %55 - %63 = lshr exact i64 %60, 2 - %64 = sub nsw i64 0, %63 - %65 = and i64 %64, 3 - %66 = call i64 @llvm.smin.i64(i64 %65, i64 %57) - br label %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - -_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i: ; preds = %62, %55 - %.0.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %66, %62 ], [ %57, %55 ] - %67 = sub nsw i64 %57, %.0.i.i.i.i.i.i.i.i.i.i.i.i - %68 = sdiv i64 %67, 4 - %69 = shl nsw i64 %68, 2 - %70 = add nsw i64 %69, %.0.i.i.i.i.i.i.i.i.i.i.i.i - %71 = icmp sgt i64 %.0.i.i.i.i.i.i.i.i.i.i.i.i, 0 - br i1 %71, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i + %60 = lshr exact i64 %60, 2 + %61 = sub nsw i64 0, %60 + %62 = and i64 %61, 3 + %63 = call i64 @llvm.smin.i64(i64 %62, i64 %56) + %64 = sub nsw i64 %56, %63 + %65 = sdiv i64 %64, 4 + %66 = shl nsw i64 %65, 2 + %67 = add nsw i64 %66, %63 + %68 = icmp sgt i64 %63, 0 + br i1 %68, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i %.05.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %75, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i ], [ 0, %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i ] @@ -7398,29 +7389,29 @@ _ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i. %74 = load i32, ptr %73, align 4 store i32 %74, ptr %72, align 4 %75 = add nuw nsw i64 %.05.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %75, %.0.i.i.i.i.i.i.i.i.i.i.i.i + %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %75, %63 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !105 _ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal13first_alignedILi16EilEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i - %76 = icmp sgt i64 %67, 3 + %76 = icmp sgt i64 %64, 3 br i1 %76, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i - %.021.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %80, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i ], [ %.0.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i ] + %.021.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %80, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i ], [ %63, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i ] %77 = getelementptr inbounds i32, ptr %58, i64 %.021.i.i.i.i.i.i.i.i.i.i.i %78 = getelementptr inbounds i32, ptr %59, i64 %.021.i.i.i.i.i.i.i.i.i.i.i %79 = load <2 x i64>, ptr %78, align 1 store <2 x i64> %79, ptr %77, align 16 %80 = add nsw i64 %.021.i.i.i.i.i.i.i.i.i.i.i, 4 - %81 = icmp slt i64 %80, %70 + %81 = icmp slt i64 %80, %67 br i1 %81, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !106 ._crit_edge.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i, %_ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dense_assignment_kernelINS0_9evaluatorINS_5BlockINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEELin1ELi1ELb0EEEEENS5_IS8_EENS0_9assign_opIiiEELi0EEEEEvRT_ll.exit.i.i.i.i.i.i.i.i.i.i.i - %82 = icmp slt i64 %70, %57 + %82 = icmp slt i64 %67, %57 br i1 %82, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit .lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i: ; preds = %._crit_edge.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i - %.05.i18.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %86, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i ], [ %70, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ] + %.05.i18.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %86, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i ], [ %67, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i ] %83 = getelementptr inbounds i32, ptr %58, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i %84 = getelementptr inbounds i32, ptr %59, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i %85 = load i32, ptr %84, align 4 @@ -7431,7 +7422,7 @@ _ZN5Eigen8internal31unaligned_dense_assignment_loopILb0EE3runINS0_31generic_dens _ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit: ; preds = %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i %.not.i.i.i.i.i.i.i.i = icmp eq i64 %57, %46 - br i1 %.not.i.i.i.i.i.i.i.i, label %87, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i + br i1 %.not.i.i.i.i.i.i.i.i, label %84, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i _ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i: ; preds = %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit invoke void @_ZN5Eigen12DenseStorageIiLin1ELin1ELi1ELi0EE6resizeElll(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %46, i64 noundef %46, i64 noundef 1) @@ -7440,38 +7431,38 @@ _ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit. .noexc: ; preds = %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i %.pr.i.i.i.i.i.i.i = load i64, ptr %56, align 8 %.pre = load ptr, ptr %3, align 8 - br label %87 - -87: ; preds = %.noexc, %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit - %88 = phi ptr [ %.pre, %.noexc ], [ %59, %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit ] - %89 = phi i64 [ %.pr.i.i.i.i.i.i.i, %.noexc ], [ %46, %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit ] - %90 = sdiv i64 %89, 4 - %91 = shl nsw i64 %90, 2 - %92 = icmp sgt i64 %89, 3 - br i1 %92, label %.lr.ph.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i - -.lr.ph.i.i.i.i.i.i.i.i: ; preds = %87, %.lr.ph.i.i.i.i.i.i.i.i - %.011.i.i.i.i.i.i.i.i = phi i64 [ %96, %.lr.ph.i.i.i.i.i.i.i.i ], [ 0, %87 ] - %93 = getelementptr inbounds nuw i32, ptr %88, i64 %.011.i.i.i.i.i.i.i.i - %94 = getelementptr inbounds nuw i32, ptr %.sroa.0.0102, i64 %.011.i.i.i.i.i.i.i.i - %95 = load <2 x i64>, ptr %94, align 16 - store <2 x i64> %95, ptr %93, align 16 - %96 = add nuw nsw i64 %.011.i.i.i.i.i.i.i.i, 4 - %97 = icmp slt i64 %96, %91 - br i1 %97, label %.lr.ph.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i, !llvm.loop !107 + br label %84 -._crit_edge.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i, %87 - %98 = icmp slt i64 %91, %89 - br i1 %98, label %.lr.ph.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEaSERKS3_.exit +._crit_edge.i.i.i.i.i.i.i.i: ; preds = %.noexc, %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit + %85 = phi ptr [ %.pre, %.noexc ], [ %58, %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit ] + %86 = phi i64 [ %.pr.i.i.i.i.i.i.i, %.noexc ], [ %46, %_ZN5Eigen16CommaInitializerINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEcmIS2_EERS3_RKNS_9DenseBaseIT_EE.exit ] + %87 = sdiv i64 %86, 4 + %88 = shl nsw i64 %87, 2 + %89 = icmp sgt i64 %86, 3 + br i1 %89, label %.lr.ph.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i + +.lr.ph.i.i.i.i.i.i.i.i: ; preds = %84, %.lr.ph.i.i.i.i.i.i.i.i + %.011.i.i.i.i.i.i.i.i = phi i64 [ %93, %.lr.ph.i.i.i.i.i.i.i.i ], [ 0, %84 ] + %90 = getelementptr inbounds nuw i32, ptr %85, i64 %.011.i.i.i.i.i.i.i.i + %91 = getelementptr inbounds nuw i32, ptr %.sroa.0.0102, i64 %.011.i.i.i.i.i.i.i.i + %92 = load <2 x i64>, ptr %91, align 16 + store <2 x i64> %92, ptr %90, align 16 + %93 = add nuw nsw i64 %.011.i.i.i.i.i.i.i.i, 4 + %94 = icmp slt i64 %93, %88 + br i1 %94, label %.lr.ph.i.i.i.i.i.i.i.i, label %._crit_edge.i.i.i.i.i.i.i.i, !llvm.loop !107 + +._crit_edge.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.i, %84 + %95 = icmp slt i64 %88, %86 + br i1 %95, label %.lr.ph.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEaSERKS3_.exit .lr.ph.i.i.i.i.i.i.i.i.i: ; preds = %._crit_edge.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i.i - %.05.i.i.i.i.i.i.i.i.i = phi i64 [ %102, %.lr.ph.i.i.i.i.i.i.i.i.i ], [ %91, %._crit_edge.i.i.i.i.i.i.i.i ] - %99 = getelementptr inbounds i32, ptr %88, i64 %.05.i.i.i.i.i.i.i.i.i + %.05.i.i.i.i.i.i.i.i.i = phi i64 [ %102, %.lr.ph.i.i.i.i.i.i.i.i.i ], [ %88, %._crit_edge.i.i.i.i.i.i.i.i ] + %99 = getelementptr inbounds i32, ptr %85, i64 %.05.i.i.i.i.i.i.i.i.i %100 = getelementptr inbounds i32, ptr %.sroa.0.0102, i64 %.05.i.i.i.i.i.i.i.i.i %101 = load i32, ptr %100, align 4 store i32 %101, ptr %99, align 4 %102 = add nsw i64 %.05.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i = icmp eq i64 %102, %89 + %exitcond.not.i.i.i.i.i.i.i.i.i = icmp eq i64 %102, %86 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEaSERKS3_.exit, label %.lr.ph.i.i.i.i.i.i.i.i.i, !llvm.loop !108 _ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEaSERKS3_.exit: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i, %._crit_edge.i.i.i.i.i.i.i.i @@ -7508,7 +7499,7 @@ _ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit. unreachable .noexc50: ; preds = %109, %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i42 - %.sink.i69 = phi ptr [ %111, %109 ], [ null, %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i42 ] + %.sink.i69 = phi ptr [ %111, %106 ], [ null, %_ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit.i.i.i.i.i.i.i.i42 ] store ptr %.sink.i69, ptr %8, align 8 store i64 %104, ptr %10, align 8 br label %114 @@ -7521,7 +7512,7 @@ _ZN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEE6resizeEll.exit. br i1 %118, label %.lr.ph.i.i.i.i.i.i.i.i48, label %._crit_edge.i.i.i.i.i.i.i.i44 .lr.ph.i.i.i.i.i.i.i.i48: ; preds = %114, %.lr.ph.i.i.i.i.i.i.i.i48 - %.011.i.i.i.i.i.i.i.i49 = phi i64 [ %122, %.lr.ph.i.i.i.i.i.i.i.i48 ], [ 0, %114 ] + %.011.i.i.i.i.i.i.i.i49 = phi i64 [ %122, %.lr.ph.i.i.i.i.i.i.i.i48 ], [ 0, %111 ] %119 = getelementptr inbounds nuw i32, ptr %115, i64 %.011.i.i.i.i.i.i.i.i49 %120 = getelementptr inbounds nuw i32, ptr %103, i64 %.011.i.i.i.i.i.i.i.i49 %121 = load <2 x i64>, ptr %120, align 16 @@ -7575,7 +7566,7 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEaSIS1_EERS1_RKNS_9DenseBaseIT_EE.exit: br label %.body _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %134, %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEaSIS1_EERS1_RKNS_9DenseBaseIT_EE.exit - %.sroa.0.0 = phi ptr [ null, %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEaSIS1_EERS1_RKNS_9DenseBaseIT_EE.exit ], [ %136, %134 ] + %.sroa.0.0 = phi ptr [ null, %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEaSIS1_EERS1_RKNS_9DenseBaseIT_EE.exit ], [ %136, %131 ] %141 = load ptr, ptr %2, align 8 store ptr %.sroa.0.0, ptr %2, align 8 %142 = getelementptr inbounds nuw i8, ptr %2, i64 8 @@ -7586,12 +7577,12 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %134, br i1 %144, label %.preheader, label %._crit_edge109 .preheader: ; preds = %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit, %173 - %indvars.iv122 = phi i64 [ %indvars.iv.next123, %173 ], [ 0, %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit ] + %indvars.iv122 = phi i64 [ %indvars.iv.next123, %170 ], [ 0, %_ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit ] %145 = trunc nuw nsw i64 %indvars.iv122 to i32 br label %146 146: ; preds = %.preheader, %146 - %indvars.iv118 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next119, %146 ] + %indvars.iv118 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next119, %143 ] %147 = load ptr, ptr %0, align 8 %148 = load i64, ptr %22, align 8 %149 = mul nsw i64 %148, %indvars.iv118 @@ -7640,7 +7631,7 @@ _ZN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEC2IliEERKT_RKT0_.exit: ; preds = %134, ret void .body: ; preds = %53, %139, %37, %171 - %.pn39 = phi { ptr, i32 } [ %172, %171 ], [ %54, %53 ], [ %38, %37 ], [ %140, %139 ] + %.pn39 = phi { ptr, i32 } [ %172, %168 ], [ %54, %53 ], [ %38, %37 ], [ %140, %136 ] %177 = load ptr, ptr %8, align 8 call void @free(ptr noundef %177) #21 br label %common.resume diff --git a/bench/openjdk/optimized/methodData.ll b/bench/openjdk/optimized/methodData.ll index eb582205d0a..23dacf1de4f 100644 --- a/bench/openjdk/optimized/methodData.ll +++ b/bench/openjdk/optimized/methodData.ll @@ -247,8 +247,6 @@ $_ZTVN16MetaspaceClosure6MSORefI6MethodEE = comdat any @.str.36 = private unnamed_addr constant [20 x i8] c"SpeculativeTrapData\00", align 1 @.str.37 = private unnamed_addr constant [48 x i8] c"unexpected bytecode for var length profile data\00", align 1 @UseTypeSpeculation = external local_unnamed_addr global i8, align 1 -@.str.38 = private unnamed_addr constant [61 x i8] c"guarantee(is_aligned(fs, sizeof(FailedSpeculation*))) failed\00", align 1 -@.str.39 = private unnamed_addr constant [50 x i8] c"FailedSpeculation objects must be pointer aligned\00", align 1 @.str.40 = private unnamed_addr constant [37 x i8] c"guarantee(*cursor != nullptr) failed\00", align 1 @.str.41 = private unnamed_addr constant [48 x i8] c"cursor must point to non-null FailedSpeculation\00", align 1 @SpecTrapLimitExtraEntries = external local_unnamed_addr global i32, align 4 @@ -3782,9 +3780,9 @@ _ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit: ; p br label %26 26: ; preds = %56, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit - %27 = phi ptr [ %.val, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit ], [ %.pre, %56 ] - %.024 = phi ptr [ %1, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit ], [ %57, %56 ] - %.023 = phi ptr [ null, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit ], [ %.232, %56 ] + %27 = phi ptr [ %.val, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit ], [ %.pre, %51 ] + %.024 = phi ptr [ %1, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit ], [ %57, %51 ] + %.023 = phi ptr [ null, %_ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit ], [ %.232, %51 ] %28 = icmp eq ptr %27, null br i1 %28, label %29, label %.thread29 @@ -3803,16 +3801,7 @@ _ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit: ; p store ptr null, ptr %35, align 8 %36 = getelementptr inbounds nuw i8, ptr %32, i64 16 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %36, ptr readonly align 1 %2, i64 %6, i1 false) - %37 = ptrtoint ptr %32 to i64 - %38 = and i64 %37, 7 - %39 = icmp eq i64 %38, 0 - br i1 %39, label %42, label %40 - -40: ; preds = %34 - %41 = load ptr, ptr @g_assert_poison, align 8 - store i8 88, ptr %41, align 1 - tail call void (ptr, i32, ptr, ptr, ...) @_Z15report_vm_errorPKciS0_S0_z(ptr noundef nonnull @.str.5, i32 noundef 848, ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.39) #22 - unreachable + br label %37 42: ; preds = %34, %29 %.1 = phi ptr [ %32, %34 ], [ %.023, %29 ] @@ -3832,8 +3821,8 @@ _ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit: ; p unreachable .thread29: ; preds = %26, %45 - %.232 = phi ptr [ %.1, %45 ], [ %.023, %26 ] - %48 = phi ptr [ %.pr, %45 ], [ %27, %26 ] + %.232 = phi ptr [ %.1, %40 ], [ %.023, %26 ] + %48 = phi ptr [ %.pr, %40 ], [ %27, %26 ] %49 = load i32, ptr %48, align 8 %50 = icmp eq i32 %49, %3 br i1 %50, label %51, label %56 @@ -3858,7 +3847,7 @@ _ZL35guarantee_failed_speculations_aliveP7nmethodPP17FailedSpeculation.exit: ; p br label %26, !llvm.loop !24 .thread: ; preds = %31, %42, %54, %55 - %.0 = phi i1 [ false, %55 ], [ false, %54 ], [ false, %31 ], [ true, %42 ] + %.0 = phi i1 [ false, %50 ], [ false, %49 ], [ false, %31 ], [ true, %37 ] ret i1 %.0 } diff --git a/bench/openjdk/optimized/screencast_pipewire.ll b/bench/openjdk/optimized/screencast_pipewire.ll index 12edb35a81d..e6ef5743c38 100644 --- a/bench/openjdk/optimized/screencast_pipewire.ll +++ b/bench/openjdk/optimized/screencast_pipewire.ll @@ -2603,22 +2603,18 @@ define internal void @onStreamParamChanged(ptr noundef %0, i32 noundef %1, ptr n %26 = getelementptr inbounds nuw i8, ptr %6, i64 24 %27 = getelementptr inbounds nuw i8, ptr %6, i64 16 %.not.i.i.i.i = icmp ult i32 %24, -8 - %28 = ptrtoint ptr %2 to i64 - %29 = and i64 %28, 3 - %30 = icmp eq i64 %29, 0 - %or.cond.i = and i1 %30, %.not.i.i.i.i - br i1 %or.cond.i, label %31, label %spa_format_parse.exit.thread - -31: ; preds = %23 - %32 = zext i32 %25 to i64 - %33 = zext i32 %24 to i64 - %34 = add nsw i64 %33, -1 - %35 = or i64 %34, 7 - %36 = add nsw i64 %35, 9 - %.not13.i.i.i.i = icmp ugt i64 %36, %32 + br i1 %.not.i.i.i.i, label %28, label %spa_format_parse.exit.thread + +28:; preds = %23 + %29 = zext i32 %25 to i64 + %30 = zext i32 %24 to i64 + %31 = add nsw i64 %30, -1 + %32 = or i64 %31, 7 + %33 = add nsw i64 %32, 9 + %.not13.i.i.i.i = icmp ugt i64 %33, %29 br i1 %.not13.i.i.i.i, label %spa_format_parse.exit.thread, label %spa_pod_parser_current.exit.i.i -spa_pod_parser_current.exit.i.i: ; preds = %31 +spa_pod_parser_current.exit.i.i: ; preds = %28 %37 = getelementptr inbounds nuw i8, ptr %2, i64 4 %38 = load i32, ptr %37, align 4 %39 = icmp ne i32 %38, 15 @@ -2632,7 +2628,7 @@ spa_pod_parser_current.exit.i.i: ; preds = %31 %.not16.i.i = icmp eq i32 %43, 262147 br i1 %.not16.i.i, label %spa_format_parse.exit, label %spa_format_parse.exit.thread -spa_format_parse.exit.thread: ; preds = %spa_pod_parser_current.exit.i.i, %31, %23, %41 +spa_format_parse.exit.thread: ; preds = %spa_pod_parser_current.exit.i.i, %28, %23, %41 call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) br label %151 @@ -2695,7 +2691,7 @@ spa_pod_is_object.exit.i.i: ; preds = %52 br i1 %.not.i25.i.i.i, label %spa_pod_find_prop.exit.thread.i, label %.lr.ph.i.i.i .lr.ph.i.i.i: ; preds = %61, %76 - %.026.i.i.i = phi ptr [ %82, %76 ], [ %64, %61 ] + %.026.i.i.i = phi ptr [ %82, %73 ], [ %64, %58 ] %68 = getelementptr inbounds nuw i8, ptr %.026.i.i.i, i64 8 %69 = load i32, ptr %68, align 4 %70 = zext i32 %69 to i64 @@ -2726,7 +2722,7 @@ spa_pod_find_prop.exit.i: ; preds = %73 br label %spa_pod_find_prop.exit.thread.i spa_pod_find_prop.exit.thread.i: ; preds = %76, %.lr.ph.i.i.i, %spa_pod_find_prop.exit.i, %61, %52 - %84 = phi i32 [ %.pre27.i, %52 ], [ %.pre27.i, %61 ], [ %.pre.i, %spa_pod_find_prop.exit.i ], [ %.pre27.i, %.lr.ph.i.i.i ], [ %.pre27.i, %76 ] + %84 = phi i32 [ %.pre27.i, %49 ], [ %.pre27.i, %58 ], [ %.pre.i, %spa_pod_find_prop.exit.i ], [ %.pre27.i, %.lr.ph.i.i.i ], [ %.pre27.i, %73 ] %85 = add i32 %84, 8 store ptr %2, ptr %4, align 8 %.sroa.2.0..sroa_idx.i.i.i24 = getelementptr inbounds nuw i8, ptr %4, i64 8 @@ -2827,7 +2823,7 @@ spa_format_video_raw_parse.exit: ; preds = %101 br label %spa_debug_type_find_name.exit spa_debug_type_find_name.exit: ; preds = %128, %142 - %.0.i33 = phi ptr [ %144, %142 ], [ null, %128 ] + %.0.i33 = phi ptr [ %144, %139 ], [ null, %125 ] %145 = load i32, ptr %106, align 8 %146 = getelementptr inbounds nuw i8, ptr %0, i64 76 %147 = load i32, ptr %146, align 4 @@ -2836,7 +2832,7 @@ spa_debug_type_find_name.exit: ; preds = %128, %142 store i32 1, ptr %148, align 8 %149 = load ptr, ptr @fp_pw_thread_loop_signal, align 8 %150 = load ptr, ptr @pw, align 8 - call void %149(ptr noundef %150, i1 noundef zeroext true) #16 + call void %146(ptr noundef %150, i1 noundef zeroext true) #16 br label %151 151: ; preds = %spa_format_video_raw_parse.exit.thread, %spa_format_parse.exit.thread, %spa_format_video_raw_parse.exit, %47, %spa_format_parse.exit, %3, %spa_debug_type_find_name.exit diff --git a/bench/pingora-rs/optimized/acx590v32pn6eo20biyujqd8g.ll b/bench/pingora-rs/optimized/acx590v32pn6eo20biyujqd8g.ll index 9117a5d1502..3011fbbe614 100644 --- a/bench/pingora-rs/optimized/acx590v32pn6eo20biyujqd8g.ll +++ b/bench/pingora-rs/optimized/acx590v32pn6eo20biyujqd8g.ll @@ -123,9 +123,7 @@ target triple = "x86_64-unknown-linux-gnu" @anon.9683d7273f0e2da39fab36790461676f.134 = private unnamed_addr constant [20 x i8] c"SendPingWhilePending", align 1 @anon.9683d7273f0e2da39fab36790461676f.135 = private unnamed_addr constant [24 x i8] c"SendSettingsWhilePending", align 1 @anon.9683d7273f0e2da39fab36790461676f.136 = private unnamed_addr constant [22 x i8] c"PeerDisabledServerPush", align 1 -@anon.9683d7273f0e2da39fab36790461676f.140 = private unnamed_addr constant [8 x i8] zeroinitializer, align 8 @anon.9683d7273f0e2da39fab36790461676f.141 = private unnamed_addr constant [101 x i8] c"/home/dtcxzyw/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arc-swap-1.7.1/src/debt/helping.rs", align 1 -@anon.9683d7273f0e2da39fab36790461676f.142 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.9683d7273f0e2da39fab36790461676f.141, [16 x i8] c"e\00\00\00\00\00\00\00\10\01\00\00\15\00\00\00" }>, align 8 @anon.9683d7273f0e2da39fab36790461676f.143 = private unnamed_addr constant [64 x i8] c"internal error: entered unreachable code: Invalid control value ", align 1 @anon.9683d7273f0e2da39fab36790461676f.144 = private unnamed_addr constant <{ ptr, [8 x i8] }> <{ ptr @anon.9683d7273f0e2da39fab36790461676f.143, [8 x i8] c"@\00\00\00\00\00\00\00" }>, align 8 @anon.9683d7273f0e2da39fab36790461676f.145 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.9683d7273f0e2da39fab36790461676f.141, [16 x i8] c"e\00\00\00\00\00\00\00+\01\00\00\16\00\00\00" }>, align 8 @@ -6631,23 +6629,21 @@ define hidden void @_ZN8arc_swap4debt7helping5Slots4help17h2d8e69b46d0bf67aE(ptr %6 = alloca [8 x i8], align 8 %7 = alloca [16 x i8], align 8 %8 = alloca [48 x i8], align 8 - %9 = alloca [48 x i8], align 8 + %9 = alloca [8 x i8], align 8 %10 = alloca [8 x i8], align 8 - %11 = alloca [8 x i8], align 8 - %12 = alloca [8 x i8], align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %12) - %13 = load atomic i64, ptr %1 seq_cst, align 8 - store i64 %13, ptr %12, align 8 - %14 = getelementptr inbounds nuw i8, ptr %1, i64 16 - %15 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %.val = load ptr, ptr %15, align 8, !nonnull !3, !align !38 - %16 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 32 - %18 = getelementptr inbounds nuw i8, ptr %0, i64 32 + call void @llvm.lifetime.start.p0(ptr nonnull %10) + %11 = load atomic i64, ptr %1 seq_cst, align 8 + store i64 %11, ptr %10, align 8 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %13 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %.val = load ptr, ptr %13, align 8, !nonnull !3, !align !38 + %15 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %1, i64 32 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 32 br label %.backedge .backedge: ; preds = %.backedge.backedge, %4 - %19 = phi i64 [ %13, %4 ], [ %.be, %.backedge.backedge ] + %19 = phi i64 [ %11, %4 ], [ %.be, %.backedge.backedge ] %20 = and i64 %19, 3 switch i64 %20, label %default.unreachable31 [ i64 0, label %25 @@ -6662,7 +6658,7 @@ default.unreachable31: ; preds = %.backedge .loopexit8: ; preds = %.backedge, %25 call void @llvm.lifetime.start.p0(ptr nonnull %8) call void @llvm.lifetime.start.p0(ptr nonnull %7) - store ptr %12, ptr %7, align 8 + store ptr %10, ptr %7, align 8 %.sroa.44.0..sroa_idx = getelementptr inbounds nuw i8, ptr %7, i64 8 store ptr @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17hdee01be989c5eb83E", ptr %.sroa.44.0..sroa_idx, align 8 store ptr @anon.9683d7273f0e2da39fab36790461676f.144, ptr %8, align 8 @@ -6682,16 +6678,16 @@ default.unreachable31: ; preds = %.backedge br i1 %26, label %.loopexit, label %.loopexit8, !prof !12 .loopexit: ; preds = %46, %.backedge, %25, %67 - call void @llvm.lifetime.end.p0(ptr nonnull %12) + call void @llvm.lifetime.end.p0(ptr nonnull %10) ret void 27: ; preds = %.backedge - %28 = load atomic i64, ptr %14 seq_cst, align 8 + %28 = load atomic i64, ptr %12 seq_cst, align 8 %.not = icmp eq i64 %28, %2 br i1 %.not, label %29, label %46 29: ; preds = %27 - call void @llvm.lifetime.start.p0(ptr nonnull %11) + call void @llvm.lifetime.start.p0(ptr nonnull %9) call void @llvm.lifetime.start.p0(ptr nonnull %6) %30 = load ptr, ptr %.val, align 8, !nonnull !3, !align !38, !noundef !3 store ptr %30, ptr %6, align 8 @@ -6701,13 +6697,13 @@ default.unreachable31: ; preds = %.backedge call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.start.p0(ptr nonnull %5) store ptr %32, ptr %5, align 8 - store ptr null, ptr %16, align 8 + store ptr null, ptr %14, align 8 %.not.i.i = icmp eq ptr %33, null br i1 %.not.i.i, label %"_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17hf7bd4b393d731f3aE.exit", label %34 34: ; preds = %29 %35 = invoke noundef ptr @_ZN8arc_swap7ref_cnt6RefCnt3inc17h6378a83ba566ab00E(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %5) - to label %38 unwind label %36 + to label %36 unwind label %36 36: ; preds = %41, %34 %37 = landingpad { ptr, i32 } @@ -6731,101 +6727,77 @@ default.unreachable31: ; preds = %.backedge call void @_ZN4core9panicking16panic_in_cleanup17hccd47ddd364deb23E() #22 unreachable -common.resume: ; preds = %69, %73, %36 - %common.resume.op = phi { ptr, i32 } [ %37, %36 ], [ %lpad.phi, %73 ], [ %lpad.phi, %69 ] +common.resume: ; preds = %.loopexit9, %73, %36 + %common.resume.op = phi { ptr, i32 } [ %37, %34 ], [ %lpad.loopexit, %65 ], [ %lpad.loopexit, %.loopexit9 ] resume { ptr, i32 } %common.resume.op "_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17hf7bd4b393d731f3aE.exit": ; preds = %29, %38, %41 %44 = load ptr, ptr %5, align 8, !nonnull !3, !noundef !3 call void @llvm.lifetime.end.p0(ptr nonnull %5) - store ptr %44, ptr %11, align 8 - %45 = invoke noundef ptr @"_ZN71_$LT$alloc..sync..Arc$LT$T$GT$$u20$as$u20$arc_swap..ref_cnt..RefCnt$GT$6as_ptr17h0697427cf70d9e9bE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %11) - to label %50 unwind label %.loopexit9 + store ptr %44, ptr %9, align 8 + %45 = invoke noundef ptr @"_ZN71_$LT$alloc..sync..Arc$LT$T$GT$$u20$as$u20$arc_swap..ref_cnt..RefCnt$GT$6as_ptr17h0697427cf70d9e9bE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %9) + to label %48 unwind label %.loopexit9 46: ; preds = %27 %47 = load atomic i64, ptr %1 seq_cst, align 8 - %48 = load i64, ptr %12, align 8, !noundef !3 + %48 = load i64, ptr %10, align 8, !noundef !3 %49 = icmp eq i64 %47, %48 br i1 %49, label %.loopexit, label %76 50: ; preds = %"_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17hf7bd4b393d731f3aE.exit" %51 = ptrtoint ptr %45 to i64 - %52 = load atomic ptr, ptr %17 seq_cst, align 8 - %53 = load atomic ptr, ptr %18 seq_cst, align 8 + %52 = load atomic ptr, ptr %15 seq_cst, align 8 + %53 = load atomic ptr, ptr %16 seq_cst, align 8 store atomic i64 %51, ptr %53 seq_cst, align 8 %54 = ptrtoint ptr %53 to i64 - %55 = and i64 %54, 3 - store i64 %55, ptr %10, align 8 - %56 = icmp eq i64 %55, 0 - br i1 %56, label %58, label %57, !prof !12 - -57: ; preds = %50 - call void @llvm.lifetime.start.p0(ptr nonnull %9) - store ptr null, ptr %9, align 8 - invoke void @_ZN4core9panicking13assert_failed17h77d57c61d0ad0ecdE(i8 noundef 0, ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %10, ptr noalias noundef readonly align 8 dereferenceable(8) @anon.9683d7273f0e2da39fab36790461676f.140, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %9, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.9683d7273f0e2da39fab36790461676f.142) #21 - to label %68 unwind label %.loopexit.split-lp - -58: ; preds = %50 - %59 = or disjoint i64 %54, 1 - %60 = load i64, ptr %12, align 8, !noundef !3 - %61 = cmpxchg ptr %1, i64 %60, i64 %59 seq_cst seq_cst, align 8 - %.sroa.18.0.in.i = extractvalue { i64, i1 } %61, 1 - br i1 %.sroa.18.0.in.i, label %67, label %62 - -62: ; preds = %58 - %.sroa.01.0.i = extractvalue { i64, i1 } %61, 0 - store i64 %.sroa.01.0.i, ptr %12, align 8 + %53 = or disjoint i64 %54, 1 + %54 = load i64, ptr %10, align 8, !noundef !3 + %55 = cmpxchg ptr %1, i64 %54, i64 %53 seq_cst seq_cst, align 8 + %.sroa.18.0.in.i = extractvalue { i64, i1 } %55, 1 + br i1 %.sroa.18.0.in.i, label %61, label %56 + +56: ; preds = %48 + %.sroa.01.0.i = extractvalue { i64, i1 } %55, 0 + store i64 %.sroa.01.0.i, ptr %10, align 8 call void @llvm.experimental.noalias.scope.decl(metadata !278) call void @llvm.experimental.noalias.scope.decl(metadata !281) - %63 = load ptr, ptr %11, align 8, !alias.scope !284, !nonnull !3, !noundef !3 + %63 = load ptr, ptr %9, align 8, !alias.scope !284, !nonnull !3, !noundef !3 %64 = atomicrmw sub ptr %63, i64 1 release, align 8, !noalias !284 %65 = icmp eq i64 %64, 1 br i1 %65, label %66, label %"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit" -66: ; preds = %62 +66: ; preds = %56 fence acquire - call void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17haef3ab0c4601cc40E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %11) + call void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17haef3ab0c4601cc40E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %9) br label %"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit" -"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit": ; preds = %62, %66 - call void @llvm.lifetime.end.p0(ptr nonnull %11) - %.pr = load i64, ptr %12, align 8 +"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit": ; preds = %56, %66 + call void @llvm.lifetime.end.p0(ptr nonnull %9) + %.pr = load i64, ptr %10, align 8 br label %.backedge.backedge .backedge.backedge: ; preds = %"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit", %76 - %.be = phi i64 [ %47, %76 ], [ %.pr, %"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit" ] + %.be = phi i64 [ %47, %68 ], [ %.pr, %"_ZN4core3ptr124drop_in_place$LT$alloc..sync..Arc$LT$alloc..collections..btree..set..BTreeSet$LT$pingora_load_balancing..Backend$GT$$GT$$GT$17h420a8e38ce4e3b45E.exit" ] br label %.backedge -67: ; preds = %58 - store atomic ptr %52, ptr %18 seq_cst, align 8 - call void @llvm.lifetime.end.p0(ptr nonnull %11) +67: ; preds = %48 + store atomic ptr %52, ptr %16 seq_cst, align 8 + call void @llvm.lifetime.end.p0(ptr nonnull %9) br label %.loopexit -68: ; preds = %57 - unreachable - .loopexit9: ; preds = %"_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17hf7bd4b393d731f3aE.exit" %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %69 - -.loopexit.split-lp: ; preds = %57 - %lpad.loopexit.split-lp = landingpad { ptr, i32 } - cleanup - br label %69 - -69: ; preds = %.loopexit.split-lp, %.loopexit9 - %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit9 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @llvm.experimental.noalias.scope.decl(metadata !285) call void @llvm.experimental.noalias.scope.decl(metadata !288) - %70 = load ptr, ptr %11, align 8, !alias.scope !291, !nonnull !3, !noundef !3 + %70 = load ptr, ptr %9, align 8, !alias.scope !291, !nonnull !3, !noundef !3 %71 = atomicrmw sub ptr %70, i64 1 release, align 8, !noalias !291 %72 = icmp eq i64 %71, 1 br i1 %72, label %73, label %common.resume -73: ; preds = %69 +73: ; preds = %.loopexit9 fence acquire - invoke void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17haef3ab0c4601cc40E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %11) + invoke void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17haef3ab0c4601cc40E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %9) to label %common.resume unwind label %74 74: ; preds = %73 @@ -6835,7 +6807,7 @@ common.resume: ; preds = %69, %73, %36 unreachable 76: ; preds = %46 - store i64 %47, ptr %12, align 8 + store i64 %47, ptr %10, align 8 br label %.backedge.backedge } @@ -6845,23 +6817,21 @@ define hidden void @_ZN8arc_swap4debt7helping5Slots4help17h87e00bf7e6d26d9fE(ptr %6 = alloca [8 x i8], align 8 %7 = alloca [16 x i8], align 8 %8 = alloca [48 x i8], align 8 - %9 = alloca [48 x i8], align 8 + %9 = alloca [8 x i8], align 8 %10 = alloca [8 x i8], align 8 - %11 = alloca [8 x i8], align 8 - %12 = alloca [8 x i8], align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %12) - %13 = load atomic i64, ptr %1 seq_cst, align 8 - store i64 %13, ptr %12, align 8 - %14 = getelementptr inbounds nuw i8, ptr %1, i64 16 - %15 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %.val = load ptr, ptr %15, align 8, !nonnull !3, !align !38 - %16 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 32 - %18 = getelementptr inbounds nuw i8, ptr %0, i64 32 + call void @llvm.lifetime.start.p0(ptr nonnull %10) + %11 = load atomic i64, ptr %1 seq_cst, align 8 + store i64 %11, ptr %10, align 8 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %13 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %.val = load ptr, ptr %13, align 8, !nonnull !3, !align !38 + %15 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %1, i64 32 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 32 br label %.backedge .backedge: ; preds = %.backedge.backedge, %4 - %19 = phi i64 [ %13, %4 ], [ %.be, %.backedge.backedge ] + %19 = phi i64 [ %11, %4 ], [ %.be, %.backedge.backedge ] %20 = and i64 %19, 3 switch i64 %20, label %default.unreachable31 [ i64 0, label %25 @@ -6876,7 +6846,7 @@ default.unreachable31: ; preds = %.backedge .loopexit8: ; preds = %.backedge, %25 call void @llvm.lifetime.start.p0(ptr nonnull %8) call void @llvm.lifetime.start.p0(ptr nonnull %7) - store ptr %12, ptr %7, align 8 + store ptr %10, ptr %7, align 8 %.sroa.44.0..sroa_idx = getelementptr inbounds nuw i8, ptr %7, i64 8 store ptr @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17hdee01be989c5eb83E", ptr %.sroa.44.0..sroa_idx, align 8 store ptr @anon.9683d7273f0e2da39fab36790461676f.144, ptr %8, align 8 @@ -6896,16 +6866,16 @@ default.unreachable31: ; preds = %.backedge br i1 %26, label %.loopexit, label %.loopexit8, !prof !12 .loopexit: ; preds = %46, %.backedge, %25, %67 - call void @llvm.lifetime.end.p0(ptr nonnull %12) + call void @llvm.lifetime.end.p0(ptr nonnull %10) ret void 27: ; preds = %.backedge - %28 = load atomic i64, ptr %14 seq_cst, align 8 + %28 = load atomic i64, ptr %12 seq_cst, align 8 %.not = icmp eq i64 %28, %2 br i1 %.not, label %29, label %46 29: ; preds = %27 - call void @llvm.lifetime.start.p0(ptr nonnull %11) + call void @llvm.lifetime.start.p0(ptr nonnull %9) call void @llvm.lifetime.start.p0(ptr nonnull %6) %30 = load ptr, ptr %.val, align 8, !nonnull !3, !align !38, !noundef !3 store ptr %30, ptr %6, align 8 @@ -6915,13 +6885,13 @@ default.unreachable31: ; preds = %.backedge call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.start.p0(ptr nonnull %5) store ptr %32, ptr %5, align 8 - store ptr null, ptr %16, align 8 + store ptr null, ptr %14, align 8 %.not.i.i = icmp eq ptr %33, null br i1 %.not.i.i, label %"_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17h720e2579c38d4928E.exit", label %34 34: ; preds = %29 %35 = invoke noundef ptr @_ZN8arc_swap7ref_cnt6RefCnt3inc17hdf9c7a12f5206704E(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %5) - to label %38 unwind label %36 + to label %36 unwind label %36 36: ; preds = %41, %34 %37 = landingpad { ptr, i32 } @@ -6945,101 +6915,77 @@ default.unreachable31: ; preds = %.backedge call void @_ZN4core9panicking16panic_in_cleanup17hccd47ddd364deb23E() #22 unreachable -common.resume: ; preds = %69, %73, %36 - %common.resume.op = phi { ptr, i32 } [ %37, %36 ], [ %lpad.phi, %73 ], [ %lpad.phi, %69 ] +common.resume: ; preds = %.loopexit9, %73, %36 + %common.resume.op = phi { ptr, i32 } [ %37, %34 ], [ %lpad.loopexit, %65 ], [ %lpad.loopexit, %.loopexit9 ] resume { ptr, i32 } %common.resume.op "_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17h720e2579c38d4928E.exit": ; preds = %29, %38, %41 %44 = load ptr, ptr %5, align 8, !nonnull !3, !noundef !3 call void @llvm.lifetime.end.p0(ptr nonnull %5) - store ptr %44, ptr %11, align 8 - %45 = invoke noundef ptr @"_ZN71_$LT$alloc..sync..Arc$LT$T$GT$$u20$as$u20$arc_swap..ref_cnt..RefCnt$GT$6as_ptr17hcb80942698e02222E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %11) - to label %50 unwind label %.loopexit9 + store ptr %44, ptr %9, align 8 + %45 = invoke noundef ptr @"_ZN71_$LT$alloc..sync..Arc$LT$T$GT$$u20$as$u20$arc_swap..ref_cnt..RefCnt$GT$6as_ptr17hcb80942698e02222E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %9) + to label %48 unwind label %.loopexit9 46: ; preds = %27 %47 = load atomic i64, ptr %1 seq_cst, align 8 - %48 = load i64, ptr %12, align 8, !noundef !3 + %48 = load i64, ptr %10, align 8, !noundef !3 %49 = icmp eq i64 %47, %48 br i1 %49, label %.loopexit, label %76 50: ; preds = %"_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17h720e2579c38d4928E.exit" %51 = ptrtoint ptr %45 to i64 - %52 = load atomic ptr, ptr %17 seq_cst, align 8 - %53 = load atomic ptr, ptr %18 seq_cst, align 8 + %52 = load atomic ptr, ptr %15 seq_cst, align 8 + %53 = load atomic ptr, ptr %16 seq_cst, align 8 store atomic i64 %51, ptr %53 seq_cst, align 8 %54 = ptrtoint ptr %53 to i64 - %55 = and i64 %54, 3 - store i64 %55, ptr %10, align 8 - %56 = icmp eq i64 %55, 0 - br i1 %56, label %58, label %57, !prof !12 - -57: ; preds = %50 - call void @llvm.lifetime.start.p0(ptr nonnull %9) - store ptr null, ptr %9, align 8 - invoke void @_ZN4core9panicking13assert_failed17h77d57c61d0ad0ecdE(i8 noundef 0, ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %10, ptr noalias noundef readonly align 8 dereferenceable(8) @anon.9683d7273f0e2da39fab36790461676f.140, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %9, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.9683d7273f0e2da39fab36790461676f.142) #21 - to label %68 unwind label %.loopexit.split-lp - -58: ; preds = %50 - %59 = or disjoint i64 %54, 1 - %60 = load i64, ptr %12, align 8, !noundef !3 - %61 = cmpxchg ptr %1, i64 %60, i64 %59 seq_cst seq_cst, align 8 - %.sroa.18.0.in.i = extractvalue { i64, i1 } %61, 1 - br i1 %.sroa.18.0.in.i, label %67, label %62 - -62: ; preds = %58 - %.sroa.01.0.i = extractvalue { i64, i1 } %61, 0 - store i64 %.sroa.01.0.i, ptr %12, align 8 + %53 = or disjoint i64 %54, 1 + %54 = load i64, ptr %10, align 8, !noundef !3 + %55 = cmpxchg ptr %1, i64 %54, i64 %53 seq_cst seq_cst, align 8 + %.sroa.18.0.in.i = extractvalue { i64, i1 } %55, 1 + br i1 %.sroa.18.0.in.i, label %61, label %56 + +56: ; preds = %48 + %.sroa.01.0.i = extractvalue { i64, i1 } %55, 0 + store i64 %.sroa.01.0.i, ptr %10, align 8 call void @llvm.experimental.noalias.scope.decl(metadata !292) call void @llvm.experimental.noalias.scope.decl(metadata !295) - %63 = load ptr, ptr %11, align 8, !alias.scope !298, !nonnull !3, !noundef !3 + %63 = load ptr, ptr %9, align 8, !alias.scope !298, !nonnull !3, !noundef !3 %64 = atomicrmw sub ptr %63, i64 1 release, align 8, !noalias !298 %65 = icmp eq i64 %64, 1 br i1 %65, label %66, label %"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit" -66: ; preds = %62 +66: ; preds = %56 fence acquire - call void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h21d657e7e498c192E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %11) + call void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h21d657e7e498c192E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %9) br label %"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit" -"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit": ; preds = %62, %66 - call void @llvm.lifetime.end.p0(ptr nonnull %11) - %.pr = load i64, ptr %12, align 8 +"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit": ; preds = %56, %66 + call void @llvm.lifetime.end.p0(ptr nonnull %9) + %.pr = load i64, ptr %10, align 8 br label %.backedge.backedge .backedge.backedge: ; preds = %"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit", %76 - %.be = phi i64 [ %47, %76 ], [ %.pr, %"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit" ] + %.be = phi i64 [ %47, %68 ], [ %.pr, %"_ZN4core3ptr94drop_in_place$LT$alloc..sync..Arc$LT$pingora_load_balancing..health_check..HealthInner$GT$$GT$17hec6ba6d498df6c8cE.exit" ] br label %.backedge -67: ; preds = %58 - store atomic ptr %52, ptr %18 seq_cst, align 8 - call void @llvm.lifetime.end.p0(ptr nonnull %11) +67: ; preds = %48 + store atomic ptr %52, ptr %16 seq_cst, align 8 + call void @llvm.lifetime.end.p0(ptr nonnull %9) br label %.loopexit -68: ; preds = %57 - unreachable - .loopexit9: ; preds = %"_ZN124_$LT$arc_swap..strategy..hybrid..HybridStrategy$LT$Cfg$GT$$u20$as$u20$arc_swap..strategy..sealed..InnerStrategy$LT$T$GT$$GT$16wait_for_readers28_$u7b$$u7b$closure$u7d$$u7d$17h720e2579c38d4928E.exit" %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %69 - -.loopexit.split-lp: ; preds = %57 - %lpad.loopexit.split-lp = landingpad { ptr, i32 } - cleanup - br label %69 - -69: ; preds = %.loopexit.split-lp, %.loopexit9 - %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit9 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @llvm.experimental.noalias.scope.decl(metadata !299) call void @llvm.experimental.noalias.scope.decl(metadata !302) - %70 = load ptr, ptr %11, align 8, !alias.scope !305, !nonnull !3, !noundef !3 + %70 = load ptr, ptr %9, align 8, !alias.scope !305, !nonnull !3, !noundef !3 %71 = atomicrmw sub ptr %70, i64 1 release, align 8, !noalias !305 %72 = icmp eq i64 %71, 1 br i1 %72, label %73, label %common.resume -73: ; preds = %69 +73: ; preds = %.loopexit9 fence acquire - invoke void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h21d657e7e498c192E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %11) + invoke void @"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h21d657e7e498c192E"(ptr noalias noundef nonnull align 8 dereferenceable(8) %9) to label %common.resume unwind label %74 74: ; preds = %73 @@ -7049,7 +6995,7 @@ common.resume: ; preds = %69, %73, %36 unreachable 76: ; preds = %46 - store i64 %47, ptr %12, align 8 + store i64 %47, ptr %10, align 8 br label %.backedge.backedge } @@ -8199,9 +8145,6 @@ declare hidden void @_ZN8arc_swap4debt4list9LocalNode4with17h84ac9208a69e613bE(p ; Function Attrs: nonlazybind uwtable declare hidden noundef ptr @"_ZN71_$LT$alloc..sync..Arc$LT$T$GT$$u20$as$u20$arc_swap..ref_cnt..RefCnt$GT$6as_ptr17h0697427cf70d9e9bE"(ptr noalias noundef readonly align 8 dereferenceable(8)) unnamed_addr #0 -; Function Attrs: cold minsize noreturn nonlazybind optsize uwtable -declare void @_ZN4core9panicking13assert_failed17h77d57c61d0ad0ecdE(i8 noundef range(i8 0, 3), ptr noalias noundef readonly align 8 dereferenceable(8), ptr noalias noundef readonly align 8 dereferenceable(8), ptr noalias noundef align 8 captures(none) dereferenceable(48), ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #7 - ; Function Attrs: nonlazybind uwtable declare noundef zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17hdee01be989c5eb83E"(ptr noalias noundef readonly align 8 dereferenceable(8), ptr noalias noundef align 8 dereferenceable(24)) unnamed_addr #0 diff --git a/bench/postgres/optimized/jsonfuncs.ll b/bench/postgres/optimized/jsonfuncs.ll index ade1a52bb29..f9a0796d771 100644 --- a/bench/postgres/optimized/jsonfuncs.ll +++ b/bench/postgres/optimized/jsonfuncs.ll @@ -9346,12 +9346,8 @@ define internal fastcc ptr @populate_record(ptr noundef %0, ptr noundef captures %37 = getelementptr inbounds nuw i8, ptr %34, i64 8 store i32 %10, ptr %37, align 8 %38 = getelementptr inbounds nuw i8, ptr %34, i64 16 - %39 = ptrtoint ptr %38 to i64 - %40 = and i64 %39, 7 - %41 = icmp eq i64 %40, 0 - %42 = icmp ult i64 %32, 1025 - %or.cond.i = and i1 %42, %41 - br i1 %or.cond.i, label %43, label %allocate_record_info.exit.sink.split + %39 = icmp ult i64 %32, 1025 + br i1 %39, label %40, label %allocate_record_info.exit.sink.split 43: ; preds = %30 %.not.i = icmp eq i32 %10, 0 @@ -9380,23 +9376,23 @@ allocate_record_info.exit: ; preds = %allocate_record_inf %.093 = phi ptr [ %34, %allocate_record_info.exit ], [ %9, %27 ] %50 = load i32, ptr %.093, align 8 %51 = getelementptr inbounds nuw i8, ptr %0, i64 4 + %49 = load i32, ptr %48, align 4 + %.not102 = icmp eq i32 %47, %49 + br i1 %.not102, label %50, label %55 + +50: ; preds = %46 + %51 = getelementptr inbounds nuw i8, ptr %.093, i64 4 %52 = load i32, ptr %51, align 4 - %.not102 = icmp eq i32 %50, %52 - br i1 %.not102, label %53, label %58 - -53: ; preds = %49 - %54 = getelementptr inbounds nuw i8, ptr %.093, i64 4 - %55 = load i32, ptr %54, align 4 - %56 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %57 = load i32, ptr %56, align 8 - %.not103 = icmp eq i32 %55, %57 - br i1 %.not103, label %._crit_edge118, label %58 - -._crit_edge118: ; preds = %53 + %53 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %54 = load i32, ptr %53, align 8 + %.not103 = icmp eq i32 %52, %54 + br i1 %.not103, label %._crit_edge118, label %55 + +._crit_edge118:; preds = %50 %.pre = sext i32 %10 to i64 br label %80 -58: ; preds = %49, %53 +58: ; preds = %49, %50 %59 = sext i32 %10 to i64 %60 = mul nsw i64 %59, 104 %61 = add nsw i64 %60, 16 @@ -9493,7 +9489,7 @@ allocate_record_info.exit: ; preds = %allocate_record_inf br label %99 99: ; preds = %.lr.ph110, %153 - %indvars.iv113 = phi i64 [ 0, %.lr.ph110 ], [ %indvars.iv.next114, %153 ] + %indvars.iv113 = phi i64 [ 0, %.lr.ph110 ], [ %indvars.iv.next114, %150 ] %100 = load i32, ptr %0, align 8 %101 = sext i32 %100 to i64 %102 = shl nsw i64 %101, 4 @@ -9542,7 +9538,7 @@ allocate_record_info.exit: ; preds = %allocate_record_inf br label %126 126: ; preds = %123, %119, %.thread.i - %127 = phi ptr [ %125, %123 ], [ null, %119 ], [ null, %.thread.i ] + %127 = phi ptr [ %125, %120 ], [ null, %116 ], [ null, %.thread.i ] store ptr %127, ptr %95, align 8 %.not23.i = icmp ne ptr %127, null %128 = sext i1 %.not23.i to i32 @@ -9560,13 +9556,13 @@ allocate_record_info.exit: ; preds = %allocate_record_inf br label %134 134: ; preds = %130, %129 - %135 = phi ptr [ %133, %130 ], [ null, %129 ] + %135 = phi ptr [ %133, %127 ], [ null, %126 ] store ptr %135, ptr %95, align 8 %136 = icmp ne ptr %135, null br label %JsObjectGetField.exit JsObjectGetField.exit: ; preds = %126, %134 - %.0.i = phi i1 [ %118, %126 ], [ %136, %134 ] + %.0.i = phi i1 [ %118, %123 ], [ %136, %131 ] %or.cond5 = select i1 %.not, i1 true, i1 %.0.i br i1 %or.cond5, label %137, label %153 @@ -9587,7 +9583,7 @@ JsObjectGetField.exit: ; preds = %126, %134 br label %149 149: ; preds = %137, %146 - %150 = phi i64 [ %148, %146 ], [ 0, %137 ] + %150 = phi i64 [ %148, %143 ], [ 0, %134 ] %151 = call fastcc i64 @populate_record_field(ptr noundef nonnull %138, i32 noundef %140, i32 noundef %142, ptr noundef nonnull %106, ptr noundef %3, i64 noundef %150, ptr noundef %8, ptr noundef nonnull %143, ptr noundef %5, i1 noundef zeroext false) %152 = getelementptr inbounds nuw i64, ptr %82, i64 %indvars.iv113 store i64 %151, ptr %152, align 8 diff --git a/bench/ruby/optimized/compile.ll b/bench/ruby/optimized/compile.ll index 494b035c28e..20c1059f3a1 100644 --- a/bench/ruby/optimized/compile.ll +++ b/bench/ruby/optimized/compile.ll @@ -60841,41 +60841,33 @@ ci_flag_set.exit: ; preds = %236, %vm_ci_new_.ex %237 = load ptr, ptr %43, align 8, !tbaa !72 store i64 %.pre-phi, ptr %237, align 8, !tbaa !34 %238 = ptrtoint ptr %.0140 to i64 - %239 = and i64 %238, 7 - %.not56 = icmp eq i64 %239, 0 - br i1 %.not56, label %240, label %nd_line.exit224 - -240: ; preds = %ci_flag_set.exit tail call void @rb_gc_writebarrier(i64 noundef %.pre, i64 noundef %238) #40 - br label %nd_line.exit224 - -nd_line.exit224: ; preds = %ci_flag_set.exit, %240 - %241 = load i64, ptr %4, align 8, !tbaa !169 - %242 = lshr i64 %241, 15 - %243 = trunc i64 %242 to i32 - %244 = getelementptr inbounds nuw i8, ptr %4, i64 24 - %245 = load i32, ptr %244, align 8, !tbaa !259 - br i1 %.not16117, label %246, label %ELEM_INSERT_PREV.exit231 - -246: ; preds = %nd_line.exit224 - %247 = tail call fastcc noundef ptr @new_insn_core(ptr noundef %0, i32 noundef %243, i32 noundef %245, i32 noundef 42, i32 noundef 0, ptr noundef null) - %248 = load ptr, ptr %40, align 8, !tbaa !32 - %249 = getelementptr inbounds nuw i8, ptr %247, i64 16 - store ptr %248, ptr %249, align 8, !tbaa !32 - %250 = getelementptr inbounds nuw i8, ptr %247, i64 8 - store ptr %.0140, ptr %250, align 8, !tbaa !33 - store ptr %247, ptr %40, align 8, !tbaa !32 - %251 = load ptr, ptr %249, align 8, !tbaa !32 - %.not.i226 = icmp eq ptr %251, null - br i1 %.not.i226, label %ELEM_INSERT_PREV.exit, label %252 - -252: ; preds = %246 - %253 = getelementptr inbounds nuw i8, ptr %251, i64 8 - store ptr %247, ptr %253, align 8, !tbaa !33 + %239 = load i64, ptr %4, align 8, !tbaa !169 + %240 = lshr i64 %239, 15 + %241 = trunc i64 %240 to i32 + %242 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %243 = load i32, ptr %242, align 8, !tbaa !259 + br i1 %.not16117, label %244, label %ELEM_INSERT_PREV.exit231 + +244:; preds = %ci_flag_set.exit + %245 = tail call fastcc noundef ptr @new_insn_core(ptr noundef %0, i32 noundef %241, i32 noundef %243, i32 noundef 42, i32 noundef 0, ptr noundef null) + %246 = load ptr, ptr %40, align 8, !tbaa !32 + %247 = getelementptr inbounds nuw i8, ptr %245, i64 16 + store ptr %246, ptr %247, align 8, !tbaa !32 + %248 = getelementptr inbounds nuw i8, ptr %245, i64 8 + store ptr %.0140, ptr %248, align 8, !tbaa !33 + store ptr %245, ptr %40, align 8, !tbaa !32 + %249 = load ptr, ptr %247, align 8, !tbaa !32 + %.not.i226 = icmp eq ptr %249, null + br i1 %.not.i226, label %ELEM_INSERT_PREV.exit, label %250 + +250:; preds = %244 + %251 = getelementptr inbounds nuw i8, ptr %249, i64 8 + store ptr %245, ptr %251, align 8, !tbaa !33 br label %ELEM_INSERT_PREV.exit -ELEM_INSERT_PREV.exit: ; preds = %246, %252 - %254 = tail call ptr (ptr, i32, i32, i32, i32, ...) @new_insn_body(ptr noundef %0, i32 noundef %243, i32 noundef %245, i32 noundef 35, i32 noundef 1, i64 noundef 20) +ELEM_INSERT_PREV.exit: ; preds = %244, %250 + %254 = tail call ptr (ptr, i32, i32, i32, i32, ...) @new_insn_body(ptr noundef %0, i32 noundef %241, i32 noundef %243, i32 noundef 35, i32 noundef 1, i64 noundef 20) %255 = load ptr, ptr %40, align 8, !tbaa !32 %256 = getelementptr inbounds nuw i8, ptr %254, i64 16 store ptr %255, ptr %256, align 8, !tbaa !32 @@ -60892,7 +60884,7 @@ ELEM_INSERT_PREV.exit: ; preds = %246, %252 br label %ELEM_INSERT_PREV.exit228 ELEM_INSERT_PREV.exit228: ; preds = %ELEM_INSERT_PREV.exit, %259 - %261 = tail call fastcc noundef ptr @new_insn_core(ptr noundef %0, i32 noundef %243, i32 noundef %245, i32 noundef 42, i32 noundef 0, ptr noundef null) + %261 = tail call fastcc noundef ptr @new_insn_core(ptr noundef %0, i32 noundef %241, i32 noundef %243, i32 noundef 42, i32 noundef 0, ptr noundef null) %262 = load ptr, ptr %40, align 8, !tbaa !32 %263 = getelementptr inbounds nuw i8, ptr %261, i64 16 store ptr %262, ptr %263, align 8, !tbaa !32 @@ -60908,8 +60900,8 @@ ELEM_INSERT_PREV.exit228: ; preds = %ELEM_INSERT_PREV.ex store ptr %261, ptr %267, align 8, !tbaa !33 br label %ELEM_INSERT_PREV.exit231 -ELEM_INSERT_PREV.exit231: ; preds = %266, %ELEM_INSERT_PREV.exit228, %nd_line.exit224 - %268 = tail call ptr (ptr, i32, i32, i32, i32, ...) @new_insn_body(ptr noundef %0, i32 noundef %243, i32 noundef %245, i32 noundef 34, i32 noundef 1, i64 noundef 3) +ELEM_INSERT_PREV.exit231: ; preds = %266, %ELEM_INSERT_PREV.exit228, %ci_flag_set.exit + %268 = tail call ptr (ptr, i32, i32, i32, i32, ...) @new_insn_body(ptr noundef %0, i32 noundef %241, i32 noundef %243, i32 noundef 34, i32 noundef 1, i64 noundef 3) %269 = load ptr, ptr %40, align 8, !tbaa !32 %270 = getelementptr inbounds nuw i8, ptr %268, i64 16 store ptr %269, ptr %270, align 8, !tbaa !32 @@ -61068,7 +61060,7 @@ iseq_compile_each.exit250: ; preds = %333 br label %339 339: ; preds = %340, %337 - %.pn.i251 = phi ptr [ %.val171, %337 ], [ %.0.i253, %340 ] + %.pn.i251 = phi ptr [ %.val171, %335 ], [ %.0.i253, %338 ] %.0.in.i252 = getelementptr inbounds nuw i8, ptr %.pn.i251, i64 16 %.0.i253 = load ptr, ptr %.0.in.i252, align 8, !tbaa !32 %.not.i254 = icmp eq ptr %.0.i253, null @@ -61084,7 +61076,7 @@ get_prev_insn.exit256.preheader: ; preds = %339, %340 br label %get_prev_insn.exit256 get_prev_insn.exit256: ; preds = %get_prev_insn.exit256.preheader, %343 - %.pn.i257 = phi ptr [ %.0.i259, %343 ], [ %.0.i253, %get_prev_insn.exit256.preheader ] + %.pn.i257 = phi ptr [ %.0.i259, %341 ], [ %.0.i253, %get_prev_insn.exit256.preheader ] %.0.in.i258 = getelementptr inbounds nuw i8, ptr %.pn.i257, i64 16 %.0.i259 = load ptr, ptr %.0.in.i258, align 8, !tbaa !32 %.not.i260 = icmp eq ptr %.0.i259, null @@ -61115,7 +61107,7 @@ ELEM_REMOVE.exit264.preheader: ; preds = %get_prev_insn.exit2 br label %ELEM_REMOVE.exit264 ELEM_REMOVE.exit264: ; preds = %ELEM_REMOVE.exit264.preheader, %353 - %.pn.i265 = phi ptr [ %.0.i267, %353 ], [ %.val171, %ELEM_REMOVE.exit264.preheader ] + %.pn.i265 = phi ptr [ %.0.i267, %351 ], [ %.val171, %ELEM_REMOVE.exit264.preheader ] %.0.in.i266 = getelementptr inbounds nuw i8, ptr %.pn.i265, i64 16 %.0.i267 = load ptr, ptr %.0.in.i266, align 8, !tbaa !32 %.not.i268 = icmp eq ptr %.0.i267, null @@ -61279,7 +61271,7 @@ APPEND_LIST.exit289: ; preds = %iseq_compile_each.e br label %.thread23 .thread23: ; preds = %nd_line.exit244, %292, %375, %iseq_compile_each.exit250, %127, %101, %iseq_compile_each.exit, %APPEND_LIST.exit248.thread, %392, %APPEND_LIST.exit289.thread, %APPEND_LIST.exit289, %APPEND_LIST.exit248 - %.2 = phi i32 [ 0, %APPEND_LIST.exit289 ], [ 0, %APPEND_LIST.exit248 ], [ 1, %APPEND_LIST.exit289.thread ], [ 1, %392 ], [ 1, %APPEND_LIST.exit248.thread ], [ 0, %iseq_compile_each.exit ], [ 0, %101 ], [ 0, %127 ], [ 0, %iseq_compile_each.exit250 ], [ 0, %375 ], [ 1, %292 ], [ 1, %nd_line.exit244 ] + %.2 = phi i32 [ 0, %APPEND_LIST.exit289 ], [ 0, %APPEND_LIST.exit248 ], [ 1, %APPEND_LIST.exit289.thread ], [ 1, %390 ], [ 1, %APPEND_LIST.exit248.thread ], [ 0, %iseq_compile_each.exit ], [ 0, %101 ], [ 0, %127 ], [ 0, %iseq_compile_each.exit250 ], [ 0, %373 ], [ 1, %290 ], [ 1, %nd_line.exit244 ] ret i32 %.2 } diff --git a/bench/ruby/optimized/vm.ll b/bench/ruby/optimized/vm.ll index 2f7e2b2cf51..b6962ee11bc 100644 --- a/bench/ruby/optimized/vm.ll +++ b/bench/ruby/optimized/vm.ll @@ -19716,15 +19716,10 @@ negative_cme.exit: ; preds = %72, %75 %96 = ptrtoint ptr %90 to i64 %97 = call i32 @rb_id_table_insert(ptr noundef %.0.i28, i64 noundef %1, i64 noundef %96) #20 %98 = ptrtoint ptr %.1 to i64 - %99 = and i64 %98, 7 - %.not.i.i29 = icmp eq i64 %99, 0 - br i1 %.not.i.i29, label %100, label %cache_callable_method_entry.exit - -100: ; preds = %89 call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %98) #20 br label %cache_callable_method_entry.exit -cache_callable_method_entry.exit: ; preds = %87, %89, %100 +cache_callable_method_entry.exit: ; preds = %87, %89 call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %101 @@ -31222,15 +31217,12 @@ vm_proc_iseq.exit: ; preds = %tailrecurse.i.i %27 = getelementptr inbounds nuw i8, ptr %26, i64 16 %28 = load ptr, ptr %27, align 8, !tbaa !433 store ptr %28, ptr %24, align 8, !tbaa !26 - %29 = ptrtoint ptr %26 to i64 - %30 = icmp eq ptr %26, null - %31 = and i64 %29, 7 - %32 = icmp ne i64 %31, 0 - %33 = or i1 %30, %32 - br i1 %33, label %proc_isolate_env.exit, label %34 + %29 = icmp eq ptr %26, null + br i1 %29, label %proc_isolate_env.exit, label %30 34: ; preds = %23 - tail call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %29) #20 + %31 = ptrtoint ptr %26 to i64 + tail call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %31) #20 br label %proc_isolate_env.exit proc_isolate_env.exit: ; preds = %23, %34 @@ -31459,15 +31451,12 @@ rb_ractor_shareable_p.exit.thread: ; preds = %21, %vm_block_self. %38 = getelementptr inbounds nuw i8, ptr %37, i64 16 %39 = load ptr, ptr %38, align 8, !tbaa !433 store ptr %39, ptr %35, align 8, !tbaa !26 - %40 = ptrtoint ptr %37 to i64 - %41 = icmp eq ptr %37, null - %42 = and i64 %40, 7 - %43 = icmp ne i64 %42, 0 - %44 = or i1 %41, %43 - br i1 %44, label %proc_isolate_env.exit, label %45 + %40 = icmp eq ptr %37, null + br i1 %40, label %proc_isolate_env.exit, label %45 45: ; preds = %34 - tail call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %40) #20 + %42 = ptrtoint ptr %40 to i64 + tail call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %42) #20 br label %proc_isolate_env.exit proc_isolate_env.exit: ; preds = %34, %45 @@ -38351,30 +38340,23 @@ declare i32 @rb_id_table_delete(ptr noundef, i64 noundef) local_unnamed_addr #3 ; Function Attrs: nounwind sspstrong uwtable define internal fastcc noundef nonnull ptr @vm_ccs_create(i64 noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) unnamed_addr #2 { - %5 = tail call noalias nonnull dereferenceable(24) ptr @ruby_xmalloc(i64 noundef 24) #65 - store i32 0, ptr %5, align 8, !tbaa !180 - %6 = getelementptr inbounds nuw i8, ptr %5, i64 4 - store i32 0, ptr %6, align 4, !tbaa !162 - %7 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %3, ptr %7, align 8, !tbaa !166 - %8 = load i64, ptr %3, align 8, !tbaa !167 - %9 = or i64 %8, 1048576 - store i64 %9, ptr %3, align 8, !tbaa !167 - %10 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store ptr null, ptr %10, align 8, !tbaa !170 - %11 = ptrtoint ptr %5 to i64 - %12 = tail call i32 @rb_id_table_insert(ptr noundef %1, i64 noundef %2, i64 noundef %11) #20 - %13 = ptrtoint ptr %3 to i64 - %14 = and i64 %13, 7 - %.not = icmp eq i64 %14, 0 - br i1 %.not, label %15, label %rb_obj_written.exit - -15: ; preds = %4 - tail call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %13) #20 - br label %rb_obj_written.exit - -rb_obj_written.exit: ; preds = %4, %15 - ret ptr %5 +rb_obj_written.exit: + %4 = tail call noalias nonnull dereferenceable(24) ptr @ruby_xmalloc(i64 noundef 24) #65 + store i32 0, ptr %4, align 8, !tbaa !180 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 4 + store i32 0, ptr %5, align 4, !tbaa !162 + %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 + store ptr %3, ptr %6, align 8, !tbaa !166 + %7 = load i64, ptr %3, align 8, !tbaa !167 + %8 = or i64 %7, 1048576 + store i64 %8, ptr %3, align 8, !tbaa !167 + %9 = getelementptr inbounds nuw i8, ptr %4, i64 16 + store ptr null, ptr %9, align 8, !tbaa !170 + %10 = ptrtoint ptr %4 to i64 + %11 = tail call i32 @rb_id_table_insert(ptr noundef %1, i64 noundef %2, i64 noundef %10) #20 + %12 = ptrtoint ptr %3 to i64 + tail call void @rb_gc_writebarrier(i64 noundef %0, i64 noundef %12) #20 + ret ptr %4 } ; Function Attrs: allocsize(0,1) @@ -60624,18 +60606,15 @@ rb_obj_write.exit67: ; preds = %.thread69, %.thread %111 = or i64 %110, 1 %112 = getelementptr i8, ptr %12, i64 -8 store i64 %111, ptr %112, align 8, !tbaa !7 - %113 = ptrtoint ptr %107 to i64 - %114 = icmp eq ptr %107, null - %115 = and i64 %113, 7 - %116 = icmp ne i64 %115, 0 - %117 = or i1 %114, %116 - br i1 %117, label %rb_obj_written.exit, label %118 - -118: ; preds = %101 - tail call void @rb_gc_writebarrier(i64 noundef %16, i64 noundef %113) #20 + %113 = icmp eq ptr %107, null + br i1 %113, label %rb_obj_written.exit, label %114 + +114:; preds = %101 + %115 = ptrtoint ptr %107 to i64 + tail call void @rb_gc_writebarrier(i64 noundef %16, i64 noundef %115) #20 br label %rb_obj_written.exit -rb_obj_written.exit: ; preds = %101, %118 +rb_obj_written.exit: ; preds = %101, %114 %119 = load i64, ptr %12, align 8, !tbaa !7 %120 = and i64 %119, -3 store i64 %120, ptr %12, align 8, !tbaa !7 diff --git a/bench/wolfssl/optimized/sha.ll b/bench/wolfssl/optimized/sha.ll index 056d8a631ea..e1850d96dd6 100644 --- a/bench/wolfssl/optimized/sha.ll +++ b/bench/wolfssl/optimized/sha.ll @@ -1279,18 +1279,24 @@ define range(i32 -192, 1) i32 @wc_ShaFinal(ptr noundef %0, ptr noundef writeonly %12 = getelementptr inbounds nuw i8, ptr %6, i64 %11 store i8 -128, ptr %12, align 1, !tbaa !17 %13 = icmp samesign ugt i32 %7, 55 - br i1 %13, label %14, label %._crit_edge + br i1 %13, label %19, label %._crit_edge ._crit_edge: ; preds = %9 %.pre = ptrtoint ptr %6 to i64 %.pre78 = and i64 %.pre, 3 - br label %29 - -14: ; preds = %9 + %14 = icmp eq i64 %.pre78, 0 + %15 = zext nneg i32 %10 to i64 + %16 = getelementptr inbounds nuw i8, ptr %6, i64 %15 + %17 = sub nuw nsw i32 55, %7 + %18 = zext nneg i32 %17 to i64 + tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %16, i8 0, i64 %18, i1 false) + br i1 %14, label %.lr.ph26.i55.preheader, label %.lr.ph.i50 + +19: ; preds = %9 %.not = icmp eq i32 %7, 63 br i1 %.not, label %20, label %15 -15: ; preds = %14 +15: ; preds = %19 %16 = zext nneg i32 %10 to i64 %17 = getelementptr inbounds nuw i8, ptr %6, i64 %16 %18 = sub nuw nsw i32 63, %7 @@ -1298,61 +1304,41 @@ define range(i32 -192, 1) i32 @wc_ShaFinal(ptr noundef %0, ptr noundef writeonly tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %17, i8 0, i64 %19, i1 false) br label %20 -20: ; preds = %15, %14 +20: ; preds = %15, %19 store i32 64, ptr %0, align 8, !tbaa !10 - %21 = ptrtoint ptr %6 to i64 - %22 = and i64 %21, 3 - %or.cond.i = icmp eq i64 %22, 0 - br i1 %or.cond.i, label %.lr.ph26.i, label %.lr.ph.i - -.lr.ph26.i: ; preds = %20, %.lr.ph26.i - %indvars.iv30.i = phi i64 [ %indvars.iv.next31.i, %.lr.ph26.i ], [ 0, %20 ] - %23 = getelementptr inbounds nuw i32, ptr %6, i64 %indvars.iv30.i - %24 = load i32, ptr %23, align 4, !tbaa !9 - %25 = tail call noundef i32 @llvm.bswap.i32(i32 %24) - store i32 %25, ptr %23, align 4, !tbaa !9 + br label %.lr.ph26.i + +.lr.ph26.i:; preds = %20, %.lr.ph26.i + %indvars.iv30.i = phi i64 [ %indvars.iv.next31.i, %.lr.ph26.i ], [ 0, %.lr.ph26.i.preheader ] + %25 = getelementptr inbounds nuw i32, ptr %6, i64 %indvars.iv30.i + %26 = load i32, ptr %25, align 4, !tbaa !9 + %27 = tail call noundef i32 @llvm.bswap.i32(i32 %26) + store i32 %27, ptr %25, align 4, !tbaa !9 %indvars.iv.next31.i = add nuw nsw i64 %indvars.iv30.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next31.i, 16 br i1 %exitcond.not.i, label %ByteReverseWords.exit, label %.lr.ph26.i, !llvm.loop !13 -.lr.ph.i: ; preds = %20, %.lr.ph.i - %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %.lr.ph.i ], [ 0, %20 ] - %26 = getelementptr inbounds nuw i8, ptr %6, i64 %indvars.iv.i - %.0.copyload.i = load i32, ptr %26, align 1 - %27 = tail call noundef i32 @llvm.bswap.i32(i32 %.0.copyload.i) - store i32 %27, ptr %26, align 1 - %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 4 - %28 = icmp samesign ult i64 %indvars.iv.i, 60 - br i1 %28, label %.lr.ph.i, label %ByteReverseWords.exit, !llvm.loop !15 - -ByteReverseWords.exit: ; preds = %.lr.ph.i, %.lr.ph26.i +.lr.ph.i: ; preds = %.lr.ph26.i tail call fastcc void @Transform(ptr noundef %0, ptr noundef %6) store i32 0, ptr %0, align 8, !tbaa !10 - br label %29 - -29: ; preds = %._crit_edge, %ByteReverseWords.exit - %.pre-phi79 = phi i64 [ %.pre78, %._crit_edge ], [ %22, %ByteReverseWords.exit ] - %30 = phi i32 [ %10, %._crit_edge ], [ 0, %ByteReverseWords.exit ] - %31 = zext nneg i32 %30 to i64 - %32 = getelementptr inbounds nuw i8, ptr %6, i64 %31 - %33 = sub nuw nsw i32 56, %30 - %34 = zext nneg i32 %33 to i64 - tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %32, i8 0, i64 %34, i1 false) - %or.cond.i48 = icmp eq i64 %.pre-phi79, 0 - br i1 %or.cond.i48, label %.lr.ph26.i55, label %.lr.ph.i50 - -.lr.ph26.i55: ; preds = %29, %.lr.ph26.i55 - %indvars.iv30.i56 = phi i64 [ %indvars.iv.next31.i57, %.lr.ph26.i55 ], [ 0, %29 ] - %35 = getelementptr inbounds nuw i32, ptr %6, i64 %indvars.iv30.i56 - %36 = load i32, ptr %35, align 4, !tbaa !9 - %37 = tail call noundef i32 @llvm.bswap.i32(i32 %36) - store i32 %37, ptr %35, align 4, !tbaa !9 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(56) %6, i8 0, i64 56, i1 false) + br label %.lr.ph26.i55.preheader + +.lr.ph26.i55.preheader: ; preds = %ByteReverseWords.exit, %._crit_edge + br label %.lr.ph26.i55 + +.lr.ph26.i55:; preds = %.lr.ph26.i55.preheader, %.lr.ph26.i55 + %indvars.iv30.i56 = phi i64 [ %indvars.iv.next31.i57, %.lr.ph26.i55 ], [ 0, %.lr.ph26.i55.preheader ] + %28 = getelementptr inbounds nuw i32, ptr %6, i64 %indvars.iv30.i56 + %29 = load i32, ptr %28, align 4, !tbaa !9 + %30 = tail call noundef i32 @llvm.bswap.i32(i32 %29) + store i32 %30, ptr %28, align 4, !tbaa !9 %indvars.iv.next31.i57 = add nuw nsw i64 %indvars.iv30.i56, 1 %exitcond.not.i58 = icmp eq i64 %indvars.iv.next31.i57, 16 br i1 %exitcond.not.i58, label %ByteReverseWords.exit59, label %.lr.ph26.i55, !llvm.loop !13 -.lr.ph.i50: ; preds = %29, %.lr.ph.i50 - %indvars.iv.i51 = phi i64 [ %indvars.iv.next.i53, %.lr.ph.i50 ], [ 0, %29 ] +.lr.ph.i50: ; preds = %._crit_edge, %.lr.ph.i50 + %indvars.iv.i51 = phi i64 [ %indvars.iv.next.i53, %.lr.ph.i50 ], [ 0, %._crit_edge ] %38 = getelementptr inbounds nuw i8, ptr %6, i64 %indvars.iv.i51 %.0.copyload.i52 = load i32, ptr %38, align 1 %39 = tail call noundef i32 @llvm.bswap.i32(i32 %.0.copyload.i52) @@ -1376,10 +1362,7 @@ ByteReverseWords.exit59: ; preds = %.lr.ph.i50, %.lr.ph store i32 %46, ptr %48, align 8 tail call fastcc void @Transform(ptr noundef %0, ptr noundef %6) %49 = getelementptr inbounds nuw i8, ptr %0, i64 76 - %50 = ptrtoint ptr %49 to i64 - %51 = and i64 %50, 3 - %or.cond.i60 = icmp eq i64 %51, 0 - br i1 %or.cond.i60, label %.lr.ph26.i67, label %.lr.ph.i62 + br label %.lr.ph26.i67 .lr.ph26.i67: ; preds = %ByteReverseWords.exit59, %.lr.ph26.i67 %indvars.iv30.i68 = phi i64 [ %indvars.iv.next31.i69, %.lr.ph26.i67 ], [ 0, %ByteReverseWords.exit59 ] @@ -1391,27 +1374,17 @@ ByteReverseWords.exit59: ; preds = %.lr.ph.i50, %.lr.ph %exitcond.not.i70 = icmp eq i64 %indvars.iv.next31.i69, 5 br i1 %exitcond.not.i70, label %ByteReverseWords.exit71, label %.lr.ph26.i67, !llvm.loop !13 -.lr.ph.i62: ; preds = %ByteReverseWords.exit59, %.lr.ph.i62 - %indvars.iv.i63 = phi i64 [ %indvars.iv.next.i65, %.lr.ph.i62 ], [ 0, %ByteReverseWords.exit59 ] - %55 = getelementptr inbounds nuw i8, ptr %49, i64 %indvars.iv.i63 - %.0.copyload.i64 = load i32, ptr %55, align 1 - %56 = tail call noundef i32 @llvm.bswap.i32(i32 %.0.copyload.i64) - store i32 %56, ptr %55, align 1 - %indvars.iv.next.i65 = add nuw nsw i64 %indvars.iv.i63, 4 - %57 = icmp samesign ult i64 %indvars.iv.i63, 16 - br i1 %57, label %.lr.ph.i62, label %ByteReverseWords.exit71, !llvm.loop !15 - -ByteReverseWords.exit71: ; preds = %.lr.ph.i62, %.lr.ph26.i67 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %1, ptr noundef nonnull align 4 dereferenceable(20) %49, i64 20, i1 false) +.lr.ph.i62: ; preds = %.lr.ph26.i67 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %1, ptr noundef nonnull align 4 dereferenceable(20) %42, i64 15, i1 false) store i32 1732584193, ptr %49, align 4, !tbaa !9 - %58 = getelementptr inbounds nuw i8, ptr %0, i64 80 - store i32 -271733879, ptr %58, align 4, !tbaa !9 - %59 = getelementptr inbounds nuw i8, ptr %0, i64 84 - store i32 -1732584194, ptr %59, align 4, !tbaa !9 - %60 = getelementptr inbounds nuw i8, ptr %0, i64 88 - store i32 271733878, ptr %60, align 4, !tbaa !9 - %61 = getelementptr inbounds nuw i8, ptr %0, i64 92 - store i32 -1009589776, ptr %61, align 4, !tbaa !9 + %46 = getelementptr inbounds nuw i8, ptr %0, i64 80 + store i32 -271733879, ptr %46, align 4, !tbaa !9 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 84 + store i32 -1732584194, ptr %47, align 4, !tbaa !9 + %48 = getelementptr inbounds nuw i8, ptr %0, i64 88 + store i32 271733878, ptr %48, align 4, !tbaa !9 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 92 + store i32 -1009589776, ptr %49, align 4, !tbaa !9 store i32 0, ptr %0, align 8, !tbaa !10 store i32 0, ptr %41, align 4, !tbaa !11 store i32 0, ptr %43, align 8, !tbaa !12 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c8d0fce0bf7..d217a05c9df 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/166935 export COMPTIME_MODE=0 export STAT_MODE=0 export STAT_NAME=""