diff --git a/bench/abc/optimized/abc.ll b/bench/abc/optimized/abc.ll index 1cc53723a01..35cec80e037 100644 --- a/bench/abc/optimized/abc.ll +++ b/bench/abc/optimized/abc.ll @@ -54288,7 +54288,7 @@ define internal range(i32 0, 2) i32 @Abc_CommandAbc9Pms(ptr noundef readonly cap %.val34 = phi ptr [ %.val34.pre, %.lr.ph.preheader ], [ %.val37, %37 ] %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %37 ] %.val3144 = phi ptr [ %.val3140, %.lr.ph.preheader ], [ %.val31, %37 ] - %.043 = phi i32 [ 0, %.lr.ph.preheader ], [ %70, %37 ] + %.043 = phi i32 [ 0, %.lr.ph.preheader ], [ %68, %37 ] %21 = getelementptr i8, ptr %.val3144, i64 8 %.val35.val = load ptr, ptr %21, align 8, !tbaa !38 %22 = getelementptr inbounds nuw i32, ptr %.val35.val, i64 %indvars.iv @@ -54331,33 +54331,31 @@ define internal range(i32 0, 2) i32 @Abc_CommandAbc9Pms(ptr noundef readonly cap %47 = sub nsw i32 %44, %46 %48 = lshr i32 %45, 29 %49 = and i32 %48, 1 - %50 = shl nsw i32 %47, 1 - %51 = or disjoint i32 %50, %49 - %52 = icmp eq i32 %51, 0 - %53 = select i1 %52, ptr @.str.3298, ptr @.str.262 - %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3297, ptr noundef nonnull %53) - %55 = load ptr, ptr %6, align 8, !tbaa !60 - %56 = getelementptr i8, ptr %55, i64 32 - %.val37 = load ptr, ptr %56, align 8, !tbaa !855 - %57 = ptrtoint ptr %.val37 to i64 - %58 = sub i64 %40, %57 - %59 = sdiv exact i64 %58, 12 - %60 = trunc i64 %59 to i32 + %50 = or i32 %47, %49 + %51 = icmp eq i32 %50, 0 + %52 = select i1 %51, ptr @.str.3298, ptr @.str.262 + %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3297, ptr noundef nonnull %52) + %54 = load ptr, ptr %6, align 8, !tbaa !60 + %55 = getelementptr i8, ptr %54, i64 32 + %.val37 = load ptr, ptr %55, align 8, !tbaa !855 + %56 = ptrtoint ptr %.val37 to i64 + %57 = sub i64 %40, %56 + %58 = sdiv exact i64 %57, 12 + %59 = trunc i64 %58 to i32 %.val3.i.i38 = load i64, ptr %25, align 4 %61 = trunc i64 %.val3.i.i38 to i32 %62 = and i32 %61, 536870911 - %63 = sub nsw i32 %60, %62 + %63 = sub nsw i32 %59, %62 %64 = lshr i32 %61, 29 %65 = and i32 %64, 1 - %66 = shl nsw i32 %63, 1 - %67 = or disjoint i32 %66, %65 - %68 = icmp ne i32 %67, 0 - %69 = zext i1 %68 to i32 - %70 = add nuw nsw i32 %.043, %69 + %65 = or i32 %63, %64 + %66 = icmp ne i32 %65, 0 + %67 = zext i1 %66 to i32 + %68 = add nuw nsw i32 %.043, %67 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %71 = getelementptr i8, ptr %55, i64 16 + %71 = getelementptr i8, ptr %54, i64 16 %.val30 = load i32, ptr %71, align 8, !tbaa !47 - %72 = getelementptr i8, ptr %55, i64 72 + %72 = getelementptr i8, ptr %54, i64 72 %.val31 = load ptr, ptr %72, align 8, !tbaa !59 %73 = getelementptr i8, ptr %.val31, i64 4 %.val31.val = load i32, ptr %73, align 4, !tbaa !42 @@ -54367,7 +54365,7 @@ define internal range(i32 0, 2) i32 @Abc_CommandAbc9Pms(ptr noundef readonly cap br i1 %76, label %.lr.ph, label %.critedge, !llvm.loop !856 .critedge: ; preds = %.lr.ph, %37, %10 - %.0.lcssa = phi i32 [ 0, %10 ], [ %70, %37 ], [ %.043, %.lr.ph ] + %.0.lcssa = phi i32 [ 0, %10 ], [ %68, %37 ], [ %.043, %.lr.ph ] %putchar = tail call i32 @putchar(i32 10) %77 = load ptr, ptr %6, align 8, !tbaa !60 %78 = getelementptr i8, ptr %77, i64 16 @@ -54388,7 +54386,7 @@ define internal range(i32 0, 2) i32 @Abc_CommandAbc9Pms(ptr noundef readonly cap br label %85 85: ; preds = %84, %.critedge, %9 - %.022 = phi i32 [ 1, %84 ], [ 1, %9 ], [ 0, %.critedge ] + %.022 = phi i32 [ 1, %82 ], [ 1, %9 ], [ 0, %.critedge ] ret i32 %.022 } diff --git a/bench/abc/optimized/bmcMulti.ll b/bench/abc/optimized/bmcMulti.ll index a7680990b8e..dd060cd17e4 100644 --- a/bench/abc/optimized/bmcMulti.ll +++ b/bench/abc/optimized/bmcMulti.ll @@ -196,7 +196,7 @@ define i32 @Gia_ManCountConst0PosGia(ptr noundef readonly captures(none) %0) loc 9: ; preds = %.lr.ph.split, %9 %indvars.iv = phi i64 [ 0, %.lr.ph.split ], [ %indvars.iv.next, %9 ] - %.015 = phi i32 [ 0, %.lr.ph.split ], [ %23, %9 ] + %.015 = phi i32 [ 0, %.lr.ph.split ], [ %22, %9 ] %10 = getelementptr inbounds nuw i32, ptr %.val12.val, i64 %indvars.iv %11 = load i32, ptr %10, align 4, !tbaa !14 %12 = sext i32 %11 to i64 @@ -207,17 +207,16 @@ define i32 @Gia_ManCountConst0PosGia(ptr noundef readonly captures(none) %0) loc %16 = sub nsw i32 %11, %15 %17 = lshr i32 %14, 29 %18 = and i32 %17, 1 - %19 = shl nsw i32 %16, 1 - %20 = or disjoint i32 %19, %18 - %21 = icmp eq i32 %20, 0 - %22 = zext i1 %21 to i32 - %23 = add nuw nsw i32 %.015, %22 + %19 = or i32 %16, %18 + %20 = icmp eq i32 %19, 0 + %21 = zext i1 %20 to i32 + %22 = add nuw nsw i32 %.015, %21 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %.critedge, label %9, !llvm.loop !40 .critedge: ; preds = %9, %.lr.ph, %1 - %.0.lcssa = phi i32 [ 0, %1 ], [ 0, %.lr.ph ], [ %23, %9 ] + %.0.lcssa = phi i32 [ 0, %1 ], [ 0, %.lr.ph ], [ %22, %9 ] ret i32 %.0.lcssa } diff --git a/bench/abc/optimized/cecSatG2.ll b/bench/abc/optimized/cecSatG2.ll index 085fc211572..3cf2c278f5b 100644 --- a/bench/abc/optimized/cecSatG2.ll +++ b/bench/abc/optimized/cecSatG2.ll @@ -9981,62 +9981,61 @@ Abc_TtIsConst0.exit: ; preds = %.lr.ph.i, %Abc_TtIs %89 = sub nsw i32 %84, %88 %90 = lshr i32 %87, 29 %91 = and i32 %90, 1 - %92 = shl nsw i32 %89, 1 - %93 = or disjoint i32 %92, %91 - %94 = icmp eq i32 %93, 0 - br i1 %94, label %149, label %.lr.ph.i91.us - -.lr.ph.i91.us: ; preds = %.lr.ph149, %148 - %indvars.iv.i92.us = phi i64 [ %indvars.iv.next.i94.us, %148 ], [ 0, %.lr.ph149 ] - %95 = getelementptr inbounds nuw i64, ptr %76, i64 %indvars.iv.i92.us - %96 = load i64, ptr %95, align 8, !tbaa !12 - %.not.i93.us = icmp eq i64 %96, 0 - br i1 %.not.i93.us, label %148, label %.lr.ph.i99.us - -.lr.ph.i99.us: ; preds = %.lr.ph.i91.us, %125 - %indvars.iv.i100.us = phi i64 [ %indvars.iv.next.i102.us, %125 ], [ 0, %.lr.ph.i91.us ] - %97 = getelementptr inbounds nuw i64, ptr %76, i64 %indvars.iv.i100.us - %98 = load i64, ptr %97, align 8, !tbaa !12 - %.not.i101.us = icmp eq i64 %98, 0 - br i1 %.not.i101.us, label %125, label %99 - -99: ; preds = %.lr.ph.i99.us - %100 = trunc nuw nsw i64 %indvars.iv.i100.us to i32 - %101 = shl nsw i32 %100, 6 - %102 = and i64 %98, 4294967295 - %103 = icmp eq i64 %102, 0 - %104 = lshr exact i64 %98, 32 - %.020.i.i.us = select i1 %103, i64 %104, i64 %98 - %.0.i.i.us = select i1 %103, i32 32, i32 0 - %105 = and i64 %.020.i.i.us, 65535 - %106 = icmp eq i64 %105, 0 - %107 = or disjoint i32 %.0.i.i.us, 16 - %108 = lshr exact i64 %.020.i.i.us, 16 - %.121.i.i.us = select i1 %106, i64 %108, i64 %.020.i.i.us - %.1.i.i.us = select i1 %106, i32 %107, i32 %.0.i.i.us - %109 = and i64 %.121.i.i.us, 255 - %110 = icmp eq i64 %109, 0 - %111 = or disjoint i32 %.1.i.i.us, 8 - %112 = lshr exact i64 %.121.i.i.us, 8 - %.222.i.i.us = select i1 %110, i64 %112, i64 %.121.i.i.us - %.2.i.i.us = select i1 %110, i32 %111, i32 %.1.i.i.us - %113 = and i64 %.222.i.i.us, 15 - %114 = icmp eq i64 %113, 0 - %115 = or disjoint i32 %.2.i.i.us, 4 - %116 = lshr exact i64 %.222.i.i.us, 4 - %.323.i.i.us = select i1 %114, i64 %116, i64 %.222.i.i.us - %.3.i.i.us = select i1 %114, i32 %115, i32 %.2.i.i.us - %117 = and i64 %.323.i.i.us, 3 - %118 = icmp eq i64 %117, 0 - %119 = add nuw nsw i32 %.3.i.i.us, 2 - %120 = lshr exact i64 %.323.i.i.us, 2 - %.424.i.i.us = select i1 %118, i64 %120, i64 %.323.i.i.us - %.4.i.i.us = select i1 %118, i32 %119, i32 %.3.i.i.us - %121 = trunc i64 %.424.i.i.us to i32 - %122 = and i32 %121, 1 - %123 = xor i32 %122, 1 - %.5.i.i.us = add i32 %.4.i.i.us, %101 - %124 = add i32 %.5.i.i.us, %123 + %92 = or i32 %89, %91 + %93 = icmp eq i32 %92, 0 + br i1 %93, label %148, label %.lr.ph.i91.us + +.lr.ph.i91.us: ; preds = %.lr.ph149, %147 + %indvars.iv.i92.us = phi i64 [ %indvars.iv.next.i94.us, %147 ], [ 0, %.lr.ph149 ] + %94 = getelementptr inbounds nuw i64, ptr %76, i64 %indvars.iv.i92.us + %95 = load i64, ptr %94, align 8, !tbaa !12 + %.not.i93.us = icmp eq i64 %95, 0 + br i1 %.not.i93.us, label %147, label %.lr.ph.i99.us + +.lr.ph.i99.us: ; preds = %.lr.ph.i91.us, %124 + %indvars.iv.i100.us = phi i64 [ %indvars.iv.next.i102.us, %124 ], [ 0, %.lr.ph.i91.us ] + %96 = getelementptr inbounds nuw i64, ptr %76, i64 %indvars.iv.i100.us + %97 = load i64, ptr %96, align 8, !tbaa !12 + %.not.i101.us = icmp eq i64 %97, 0 + br i1 %.not.i101.us, label %124, label %98 + +98: ; preds = %.lr.ph.i99.us + %99 = trunc nuw nsw i64 %indvars.iv.i100.us to i32 + %100 = shl nsw i32 %99, 6 + %101 = and i64 %97, 4294967295 + %102 = icmp eq i64 %101, 0 + %103 = lshr exact i64 %97, 32 + %.020.i.i.us = select i1 %102, i64 %103, i64 %97 + %.020.i.i.us = select i1 %102, i32 32, i32 0 + %104 = and i64 %.020.i.i.us, 65535 + %105 = icmp eq i64 %104, 0 + %106 = or disjoint i32 %.0.i.i.us, 16 + %107 = lshr exact i64 %.020.i.i.us, 16 + %.121.i.i.us = select i1 %105, i64 %107, i64 %.020.i.i.us + %.121.i.i.us = select i1 %105, i32 %106, i32 %.020.i.i.us + %108 = and i64 %.121.i.i.us, 255 + %109 = icmp eq i64 %108, 0 + %110 = or disjoint i32 %.1.i.i.us, 8 + %111 = lshr exact i64 %.121.i.i.us, 8 + %.222.i.i.us = select i1 %109, i64 %111, i64 %.121.i.i.us + %.222.i.i.us = select i1 %109, i32 %110, i32 %.121.i.i.us + %112 = and i64 %.222.i.i.us, 15 + %113 = icmp eq i64 %112, 0 + %114 = or disjoint i32 %.2.i.i.us, 4 + %115 = lshr exact i64 %.222.i.i.us, 4 + %.323.i.i.us = select i1 %113, i64 %115, i64 %.222.i.i.us + %.323.i.i.us = select i1 %113, i32 %114, i32 %.222.i.i.us + %116 = and i64 %.323.i.i.us, 3 + %117 = icmp eq i64 %116, 0 + %118 = add nuw nsw i32 %.3.i.i.us, 2 + %119 = lshr exact i64 %.323.i.i.us, 2 + %.424.i.i.us = select i1 %117, i64 %119, i64 %.323.i.i.us + %.424.i.i.us = select i1 %117, i32 %118, i32 %.323.i.i.us + %120 = trunc i64 %.424.i.i.us to i32 + %121 = and i32 %120, 1 + %122 = xor i32 %121, 1 + %.5.i.i.us = add i32 %.424.i.i.us, %100 + %.5.i.i.us = add i32 %.5.i.i.us, %122 br label %Abc_TtFindFirstBit2.exit.us 125: ; preds = %.lr.ph.i99.us @@ -10044,8 +10043,8 @@ Abc_TtIsConst0.exit: ; preds = %.lr.ph.i, %Abc_TtIs %exitcond.not.i103.us = icmp eq i64 %indvars.iv.next.i102.us, %wide.trip.count.i90 br i1 %exitcond.not.i103.us, label %Abc_TtFindFirstBit2.exit.us, label %.lr.ph.i99.us, !llvm.loop !166 -Abc_TtFindFirstBit2.exit.us: ; preds = %125, %99 - %.08.i.us = phi i32 [ %124, %99 ], [ -1, %125 ] +Abc_TtFindFirstBit2.exit.us: ; preds = %125, %98 + %.08.i.us = phi i32 [ %123, %98 ], [ -1, %124 ] %126 = load ptr, ptr %2, align 8, !tbaa !69 %127 = getelementptr i8, ptr %126, i64 16 %.val78116.us = load i32, ptr %127, align 8, !tbaa !125 @@ -10061,7 +10060,7 @@ Abc_TtFindFirstBit2.exit.us: ; preds = %125, %99 br label %151 132: ; preds = %.lr.ph.us, %132 - %indvars.iv160 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next161, %132 ] + %indvars.iv160 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next161, %131 ] %133 = mul nuw nsw i64 %indvars.iv160, %wide.trip.count.i90 %.059.val.us = load ptr, ptr %71, align 8, !tbaa !10 %134 = getelementptr inbounds nuw i64, ptr %.059.val.us, i64 %133 @@ -10094,8 +10093,8 @@ Abc_TtFindFirstBit2.exit.us: ; preds = %125, %99 br label %151 151: ; preds = %149, %.loopexit.us, %._crit_edge.us - %.sroa.7.1.us = phi i32 [ %.sroa.7.0121.us148, %149 ], [ %.sroa.7.0121.us148, %.loopexit.us ], [ %131, %._crit_edge.us ] - %.sroa.0.1.us = phi i32 [ %150, %149 ], [ %.sroa.0.0122.us147, %.loopexit.us ], [ %.sroa.0.0122.us147, %._crit_edge.us ] + %.sroa.7.1.us = phi i32 [ %.sroa.7.0121.us148, %148 ], [ %.sroa.7.0121.us148, %.loopexit.us ], [ %131, %._crit_edge.us ] + %.sroa.0.1.us = phi i32 [ %150, %148 ], [ %.sroa.0.0122.us147, %.loopexit.us ], [ %.sroa.0.0122.us147, %._crit_edge.us ] %fputc63.us = tail call i32 @fputc(i32 10, ptr nonnull %9) %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1 %152 = load ptr, ptr %2, align 8, !tbaa !69 @@ -10128,8 +10127,8 @@ Abc_TtFindFirstBit2.exit.us: ; preds = %125, %99 br i1 %.not61, label %.critedge, label %.lr.ph, !llvm.loop !220 .lr.ph: ; preds = %.lr.ph125.split, %162 - %indvars.iv = phi i64 [ %indvars.iv.next, %162 ], [ 0, %.lr.ph125.split ] - %.sroa.0.0122140 = phi i32 [ %.sroa.0.1, %162 ], [ 0, %.lr.ph125.split ] + %indvars.iv = phi i64 [ %indvars.iv.next, %161 ], [ 0, %.lr.ph125.split ] + %.sroa.0.0122140 = phi i32 [ %.sroa.0.1, %161 ], [ 0, %.lr.ph125.split ] %164 = trunc nuw nsw i64 %indvars.iv to i32 %165 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str, i32 noundef %164) #31 %166 = load ptr, ptr %69, align 8, !tbaa !131 @@ -10149,21 +10148,20 @@ Abc_TtFindFirstBit2.exit.us: ; preds = %125, %99 %176 = sub nsw i32 %171, %175 %177 = lshr i32 %174, 29 %178 = and i32 %177, 1 - %179 = shl nsw i32 %176, 1 - %180 = or disjoint i32 %179, %178 - %181 = icmp eq i32 %180, 0 - br i1 %181, label %182, label %184 + %178 = or i32 %176, %177 + %179 = icmp eq i32 %178, 0 + br i1 %179, label %180, label %182 -182: ; preds = %.lr.ph - %183 = add nsw i32 %.sroa.0.0122140, 1 - br label %185 +180: ; preds = %.lr.ph + %181 = add nsw i32 %.sroa.0.0122140, 1 + br label %183 -184: ; preds = %.lr.ph +182: ; preds = %.lr.ph %fputc = tail call i32 @fputc(i32 45, ptr nonnull %9) br label %185 -185: ; preds = %184, %182 - %.sroa.0.1 = phi i32 [ %183, %182 ], [ %.sroa.0.0122140, %184 ] +185: ; preds = %182, %180 + %.sroa.0.1 = phi i32 [ %181, %180 ], [ %.sroa.0.0122140, %182 ] %fputc63 = tail call i32 @fputc(i32 10, ptr nonnull %9) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %186 = load ptr, ptr %2, align 8, !tbaa !69 @@ -10176,9 +10174,9 @@ Abc_TtFindFirstBit2.exit.us: ; preds = %125, %99 br i1 %191, label %162, label %.critedge, !llvm.loop !220 .critedge: ; preds = %162, %185, %73, %151, %.lr.ph125.split.us, %.lr.ph125.split, %Abc_TtIsConst0.exit - %.sroa.7.0.lcssa = phi i32 [ 0, %Abc_TtIsConst0.exit ], [ 0, %.lr.ph125.split.us ], [ 0, %.lr.ph125.split ], [ %.sroa.7.1.us, %151 ], [ %.sroa.7.1.us, %73 ], [ 0, %185 ], [ 0, %162 ] - %.sroa.0.0.lcssa = phi i32 [ 0, %Abc_TtIsConst0.exit ], [ 0, %.lr.ph125.split.us ], [ 0, %.lr.ph125.split ], [ %.sroa.0.1.us, %151 ], [ %.sroa.0.1.us, %73 ], [ %.sroa.0.1, %185 ], [ %.sroa.0.1, %162 ] - %.val.lcssa = phi i32 [ %.val120, %Abc_TtIsConst0.exit ], [ %.val120, %.lr.ph125.split.us ], [ %.val120, %.lr.ph125.split ], [ %.val.us, %151 ], [ %.val.us, %73 ], [ %.val, %185 ], [ %.val, %162 ] + %.sroa.7.0.lcssa = phi i32 [ 0, %Abc_TtIsConst0.exit ], [ 0, %.lr.ph125.split.us ], [ 0, %.lr.ph125.split ], [ %.sroa.7.1.us, %150 ], [ %.sroa.7.1.us, %73 ], [ 0, %183 ], [ 0, %161 ] + %.sroa.0.0.lcssa = phi i32 [ 0, %Abc_TtIsConst0.exit ], [ 0, %.lr.ph125.split.us ], [ 0, %.lr.ph125.split ], [ %.sroa.0.1.us, %150 ], [ %.sroa.0.1.us, %73 ], [ %.sroa.0.1, %183 ], [ %.sroa.0.1, %161 ] + %.val.lcssa = phi i32 [ %.val120, %Abc_TtIsConst0.exit ], [ %.val120, %.lr.ph125.split.us ], [ %.val120, %.lr.ph125.split ], [ %.val.us, %150 ], [ %.val.us, %73 ], [ %.val, %183 ], [ %.val, %161 ] %192 = add i32 %.sroa.0.0.lcssa, %.sroa.7.0.lcssa %193 = sub i32 %.val.lcssa, %192 %194 = load ptr, ptr %0, align 8, !tbaa !68 diff --git a/bench/abc/optimized/giaCof.ll b/bench/abc/optimized/giaCof.ll index 26f42563607..0dc0e02c761 100644 --- a/bench/abc/optimized/giaCof.ll +++ b/bench/abc/optimized/giaCof.ll @@ -4358,9 +4358,9 @@ define void @Gia_ManPrintDsdMatrix(ptr noundef %0, i32 noundef %1) local_unnamed br i1 %27, label %.lr.ph52.split.us, label %._crit_edge53, !llvm.loop !113 .lr.ph52.split: ; preds = %.lr.ph52, %49 - %.151 = phi i32 [ %.2, %49 ], [ %.02557, %.lr.ph52 ] - %.not50 = phi i1 [ true, %49 ], [ false, %.lr.ph52 ] - %.13049 = phi i32 [ %51, %49 ], [ 0, %.lr.ph52 ] + %.151 = phi i32 [ %.2, %48 ], [ %.02557, %.lr.ph52 ] + %.not50 = phi i1 [ true, %48 ], [ false, %.lr.ph52 ] + %.13049 = phi i32 [ %51, %48 ], [ 0, %.lr.ph52 ] br i1 %.not50, label %30, label %28 28: ; preds = %.lr.ph52.split @@ -4390,11 +4390,10 @@ define void @Gia_ManPrintDsdMatrix(ptr noundef %0, i32 noundef %1) local_unnamed %43 = sub nsw i32 %38, %42 %44 = lshr i32 %41, 29 %45 = and i32 %44, 1 - %46 = shl nsw i32 %43, 1 - %47 = or disjoint i32 %46, %45 - %48 = icmp eq i32 %47, 0 - %. = select i1 %48, i32 46, i32 43 - br label %49 + %46 = or i32 %43, %45 + %47 = icmp eq i32 %46, 0 + %. = select i1 %47, i32 46, i32 43 + br label %48 49: ; preds = %33, %30 %.sink = phi i32 [ 32, %30 ], [ %., %33 ] @@ -4410,7 +4409,7 @@ define void @Gia_ManPrintDsdMatrix(ptr noundef %0, i32 noundef %1) local_unnamed br i1 %54, label %.lr.ph52.split, label %._crit_edge53, !llvm.loop !113 ._crit_edge53: ; preds = %49, %23, %.preheader - %.1.lcssa = phi i32 [ %.02557, %.preheader ], [ %.02557, %23 ], [ %.2, %49 ] + %.1.lcssa = phi i32 [ %.02557, %.preheader ], [ %.02557, %23 ], [ %.2, %48 ] %55 = add nuw nsw i32 %.058, 1 %putchar32 = tail call i32 @putchar(i32 10) %.val34 = load i32, ptr %6, align 8, !tbaa !98 diff --git a/bench/abc/optimized/giaEquiv.ll b/bench/abc/optimized/giaEquiv.ll index 514ccf1f58d..2b322a72dd7 100644 --- a/bench/abc/optimized/giaEquiv.ll +++ b/bench/abc/optimized/giaEquiv.ll @@ -7622,11 +7622,11 @@ Gia_ManEquivCountLitsAll.exit.thread: ; preds = %4, %Gia_ManEquivCou br label %128 45: ; preds = %.lr.ph129, %78 - %.val75144 = phi i32 [ %.val75124, %.lr.ph129 ], [ %.val75, %78 ] - %indvars.iv138 = phi i64 [ 0, %.lr.ph129 ], [ %indvars.iv.next139, %78 ] - %.1128 = phi i32 [ 0, %.lr.ph129 ], [ %.2, %78 ] - %.058127 = phi i32 [ 0, %.lr.ph129 ], [ %.159, %78 ] - %.064126 = phi i32 [ 0, %.lr.ph129 ], [ %.165, %78 ] + %.val75144 = phi i32 [ %.val75124, %.lr.ph129 ], [ %.val75, %77 ] + %indvars.iv138 = phi i64 [ 0, %.lr.ph129 ], [ %indvars.iv.next139, %77 ] + %.1128 = phi i32 [ 0, %.lr.ph129 ], [ %.2, %77 ] + %.058127 = phi i32 [ 0, %.lr.ph129 ], [ %.159, %77 ] + %.064126 = phi i32 [ 0, %.lr.ph129 ], [ %.165, %77 ] %.val80 = load ptr, ptr %7, align 8, !tbaa !49 %46 = getelementptr inbounds nuw %struct.Gia_Rpr_t_, ptr %.val80, i64 %indvars.iv138 %47 = load i32, ptr %46, align 4 @@ -7666,30 +7666,29 @@ Gia_ManEquivCountLitsAll.exit.thread: ; preds = %4, %Gia_ManEquivCou %69 = sub nsw i32 %64, %68 %70 = lshr i32 %67, 29 %71 = and i32 %70, 1 - %72 = shl nsw i32 %69, 1 - %73 = or disjoint i32 %72, %71 - %74 = icmp eq i32 %73, 0 - br i1 %74, label %75, label %78 - -75: ; preds = %56 - %76 = or i32 %47, 268435456 - store i32 %76, ptr %46, align 4 - %77 = add nsw i32 %.1128, 1 + %72 = or i32 %69, %71 + %73 = icmp eq i32 %72, 0 + br i1 %73, label %74, label %77 + +74: ; preds = %56 + %75 = or i32 %47, 268435456 + store i32 %75, ptr %46, align 4 + %76 = add nsw i32 %.1128, 1 %.val75.pre = load i32, ptr %5, align 8, !tbaa !12 br label %78 -78: ; preds = %56, %75, %50, %45 - %.val75 = phi i32 [ %.val75144, %45 ], [ %.val75144, %50 ], [ %.val75.pre, %75 ], [ %.val75144, %56 ] - %.165 = phi i32 [ %.064126, %45 ], [ %.064126, %50 ], [ %58, %75 ], [ %58, %56 ] - %.159 = phi i32 [ %.058127, %45 ], [ %51, %50 ], [ %51, %75 ], [ %51, %56 ] - %.2 = phi i32 [ %.1128, %45 ], [ %.1128, %50 ], [ %77, %75 ], [ %.1128, %56 ] +78: ; preds = %56, %74, %50, %45 + %.val75 = phi i32 [ %.val75144, %45 ], [ %.val75144, %50 ], [ %.val75.pre, %74 ], [ %.val75144, %56 ] + %.165 = phi i32 [ %.064126, %45 ], [ %.064126, %50 ], [ %58, %74 ], [ %58, %56 ] + %.159 = phi i32 [ %.058127, %45 ], [ %51, %50 ], [ %51, %74 ], [ %51, %56 ] + %.2 = phi i32 [ %.1128, %45 ], [ %.1128, %50 ], [ %76, %74 ], [ %.1128, %56 ] %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1 %79 = sext i32 %.val75 to i64 %80 = icmp slt i64 %indvars.iv.next139, %79 br i1 %80, label %45, label %._crit_edge, !llvm.loop !144 ._crit_edge: ; preds = %78, %.preheader121 - %.1.lcssa = phi i32 [ 0, %.preheader121 ], [ %.2, %78 ] + %.1.lcssa = phi i32 [ 0, %.preheader121 ], [ %.2, %77 ] %81 = load ptr, ptr %25, align 8, !tbaa !8 %.not.i109 = icmp eq ptr %81, null br i1 %.not.i109, label %82, label %.thread.i110 @@ -7736,10 +7735,10 @@ Gia_ManEquivCountLitsAll.exit.thread: ; preds = %4, %Gia_ManEquivCou br label %128 96: ; preds = %.lr.ph135, %123 - %.val146 = phi i32 [ %.val131, %.lr.ph135 ], [ %.val, %123 ] - %indvars.iv141 = phi i64 [ 0, %.lr.ph135 ], [ %indvars.iv.next142, %123 ] - %.4134 = phi i32 [ 0, %.lr.ph135 ], [ %.5, %123 ] - %.260133 = phi i32 [ 0, %.lr.ph135 ], [ %.361, %123 ] + %.val146 = phi i32 [ %.val131, %.lr.ph135 ], [ %.val, %121 ] + %indvars.iv141 = phi i64 [ 0, %.lr.ph135 ], [ %indvars.iv.next142, %121 ] + %.4134 = phi i32 [ 0, %.lr.ph135 ], [ %.5, %121 ] + %.260133 = phi i32 [ 0, %.lr.ph135 ], [ %.361, %121 ] %.val79 = load ptr, ptr %7, align 8, !tbaa !49 %97 = getelementptr inbounds nuw %struct.Gia_Rpr_t_, ptr %.val79, i64 %indvars.iv141 %98 = load i32, ptr %97, align 4 @@ -7770,29 +7769,28 @@ Gia_ManEquivCountLitsAll.exit.thread: ; preds = %4, %Gia_ManEquivCou %114 = sub nsw i32 %109, %113 %115 = lshr i32 %112, 29 %116 = and i32 %115, 1 - %117 = shl nsw i32 %114, 1 - %118 = or disjoint i32 %117, %116 - %119 = icmp eq i32 %118, 0 - br i1 %119, label %120, label %123 - -120: ; preds = %101 - %121 = or i32 %98, 268435456 - store i32 %121, ptr %97, align 4 - %122 = add nsw i32 %.4134, 1 + %116 = or i32 %114, %115 + %117 = icmp eq i32 %116, 0 + br i1 %117, label %118, label %121 + +118: ; preds = %100 + %119 = or i32 %97, 268435456 + store i32 %119, ptr %96, align 4 + %120 = add nsw i32 %.4134, 1 %.val.pre = load i32, ptr %5, align 8, !tbaa !12 br label %123 -123: ; preds = %101, %120, %96 - %.val = phi i32 [ %.val146, %96 ], [ %.val.pre, %120 ], [ %.val146, %101 ] - %.361 = phi i32 [ %.260133, %96 ], [ %103, %120 ], [ %103, %101 ] - %.5 = phi i32 [ %.4134, %96 ], [ %122, %120 ], [ %.4134, %101 ] +123: ; preds = %101, %118, %96 + %.val = phi i32 [ %.val146, %95 ], [ %.val.pre, %118 ], [ %.val146, %100 ] + %.361 = phi i32 [ %.260133, %95 ], [ %103, %118 ], [ %103, %100 ] + %.5 = phi i32 [ %.4134, %95 ], [ %120, %118 ], [ %.4134, %100 ] %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1 %124 = sext i32 %.val to i64 %125 = icmp slt i64 %indvars.iv.next142, %124 br i1 %125, label %96, label %.loopexit, !llvm.loop !145 .loopexit: ; preds = %123, %.preheader, %82 - %.3 = phi i32 [ %.1.lcssa, %82 ], [ 0, %.preheader ], [ %.5, %123 ] + %.3 = phi i32 [ %.1.lcssa, %81 ], [ 0, %.preheader ], [ %.5, %121 ] %.not73 = icmp eq i32 %3, 0 br i1 %.not73, label %127, label %126 diff --git a/bench/abc/optimized/giaPat2.ll b/bench/abc/optimized/giaPat2.ll index 946a23f21dd..ca7b6e9b9df 100644 --- a/bench/abc/optimized/giaPat2.ll +++ b/bench/abc/optimized/giaPat2.ll @@ -8722,11 +8722,11 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br label %.lr.ph.split.us .lr.ph.split.us: ; preds = %.lr.ph.split.us.preheader, %38 - %indvars.iv199 = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %indvars.iv.next200, %38 ] - %.val84.us162.us = phi ptr [ %.val84.us156, %.lr.ph.split.us.preheader ], [ %.val84.us.us, %38 ] - %.sroa.0.0108.us161.us = phi i32 [ 0, %.lr.ph.split.us.preheader ], [ %.sroa.0.1.us.us, %38 ] - %.sroa.7.0109.us160.us = phi i32 [ 0, %.lr.ph.split.us.preheader ], [ %.sroa.7.1.us.us, %38 ] - %24 = phi ptr [ %.val87, %.lr.ph.split.us.preheader ], [ %64, %38 ] + %indvars.iv199 = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %indvars.iv.next200, %37 ] + %.val84.us162.us = phi ptr [ %.val84.us156, %.lr.ph.split.us.preheader ], [ %.val84.us.us, %37 ] + %.sroa.0.0108.us161.us = phi i32 [ 0, %.lr.ph.split.us.preheader ], [ %.sroa.0.1.us.us, %37 ] + %.sroa.7.0109.us160.us = phi i32 [ 0, %.lr.ph.split.us.preheader ], [ %.sroa.7.1.us.us, %37 ] + %24 = phi ptr [ %.val87, %.lr.ph.split.us.preheader ], [ %64, %37 ] %25 = getelementptr i8, ptr %24, i64 8 %.val85.val.us.us = load ptr, ptr %25, align 8, !tbaa !32 %26 = getelementptr inbounds nuw i32, ptr %.val85.val.us.us, i64 %indvars.iv199 @@ -8739,10 +8739,9 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %32 = sub nsw i32 %27, %31 %33 = lshr i32 %30, 29 %34 = and i32 %33, 1 - %35 = shl nsw i32 %32, 1 - %36 = or disjoint i32 %35, %34 - %37 = icmp eq i32 %36, 0 - br i1 %37, label %59, label %.preheader94.us.us + %35 = or i32 %32, %34 + %36 = icmp eq i32 %35, 0 + br i1 %36, label %58, label %.preheader94.us.us 38: ; preds = %63 %.val84.us.us = load ptr, ptr %19, align 8, !tbaa !3 @@ -8776,7 +8775,7 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br i1 %exitcond198.not, label %._crit_edge106.us.us, label %41, !llvm.loop !178 49: ; preds = %.lr.ph103.us.us, %49 - %indvars.iv191 = phi i64 [ 0, %.lr.ph103.us.us ], [ %indvars.iv.next192, %49 ] + %indvars.iv191 = phi i64 [ 0, %.lr.ph103.us.us ], [ %indvars.iv.next192, %48 ] %.val80.us.us = load ptr, ptr %68, align 8, !tbaa !32 %50 = getelementptr inbounds nuw i32, ptr %.val80.us.us, i64 %indvars.iv191 %51 = load i32, ptr %50, align 4, !tbaa !35 @@ -8800,8 +8799,8 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br label %63 63: ; preds = %59, %._crit_edge106.us.us - %.sroa.0.1.us.us = phi i32 [ %62, %59 ], [ %.sroa.0.0108.us161.us, %._crit_edge106.us.us ] - %.sroa.7.1.us.us = phi i32 [ %.sroa.7.0109.us160.us, %59 ], [ %69, %._crit_edge106.us.us ] + %.sroa.0.1.us.us = phi i32 [ %62, %58 ], [ %.sroa.0.0108.us161.us, %._crit_edge106.us.us ] + %.sroa.7.1.us.us = phi i32 [ %.sroa.7.0109.us160.us, %58 ], [ %69, %._crit_edge106.us.us ] %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1 %64 = load ptr, ptr %16, align 8, !tbaa !43 %65 = getelementptr i8, ptr %64, i64 4 @@ -8824,11 +8823,11 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br i1 %.not.us, label %.critedge, label %.lr.ph.split, !llvm.loop !177 .lr.ph.split: ; preds = %.lr.ph, %70 - %71 = phi ptr [ %91, %70 ], [ %.val87, %.lr.ph ] - %indvars.iv188 = phi i64 [ %indvars.iv.next189, %70 ], [ 0, %.lr.ph ] - %.val84.us162 = phi ptr [ %.val84.us, %70 ], [ %.val84.us156, %.lr.ph ] - %.sroa.0.0108.us161 = phi i32 [ %.sroa.0.1.us, %70 ], [ 0, %.lr.ph ] - %.sroa.7.0109.us160 = phi i32 [ %.sroa.7.1.us, %70 ], [ 0, %.lr.ph ] + %71 = phi ptr [ %91, %69 ], [ %.val87, %.lr.ph ] + %indvars.iv188 = phi i64 [ %indvars.iv.next189, %69 ], [ 0, %.lr.ph ] + %.val84.us162 = phi ptr [ %.val84.us, %69 ], [ %.val84.us156, %.lr.ph ] + %.sroa.0.0108.us161 = phi i32 [ %.sroa.0.1.us, %69 ], [ 0, %.lr.ph ] + %.sroa.7.0109.us160 = phi i32 [ %.sroa.7.1.us, %69 ], [ 0, %.lr.ph ] %72 = getelementptr i8, ptr %71, i64 8 %.val85.val.us = load ptr, ptr %72, align 8, !tbaa !32 %73 = getelementptr inbounds nuw i32, ptr %.val85.val.us, i64 %indvars.iv188 @@ -8841,10 +8840,9 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %79 = sub nsw i32 %74, %78 %80 = lshr i32 %77, 29 %81 = and i32 %80, 1 - %82 = shl nsw i32 %79, 1 - %83 = or disjoint i32 %82, %81 - %84 = icmp eq i32 %83, 0 - br i1 %84, label %86, label %.preheader94.us + %81 = or i32 %79, %81 + %82 = icmp eq i32 %81, 0 + br i1 %82, label %84, label %.preheader94.us .preheader94.us: ; preds = %.lr.ph.split %85 = add nsw i32 %.sroa.7.0109.us160, 1 @@ -8858,9 +8856,9 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br label %90 90: ; preds = %86, %.preheader94.us - %91 = phi ptr [ %.pre202, %86 ], [ %71, %.preheader94.us ] - %.sroa.0.1.us = phi i32 [ %89, %86 ], [ %.sroa.0.0108.us161, %.preheader94.us ] - %.sroa.7.1.us = phi i32 [ %.sroa.7.0109.us160, %86 ], [ %85, %.preheader94.us ] + %91 = phi ptr [ %.pre202, %84 ], [ %71, %.preheader94.us ] + %.sroa.0.1.us = phi i32 [ %89, %84 ], [ %.sroa.0.0108.us161, %.preheader94.us ] + %.sroa.7.1.us = phi i32 [ %.sroa.7.0109.us160, %84 ], [ %85, %.preheader94.us ] %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1 %92 = getelementptr i8, ptr %91, i64 4 %.val79.us = load i32, ptr %92, align 4, !tbaa !30 @@ -8878,12 +8876,12 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %95 = zext nneg i32 %.fr173 to i64 br label %.lr.ph132.split.us -.lr.ph132.split.us: ; preds = %.lr.ph132.split.us.preheader, %110 - %indvars.iv185 = phi i64 [ 0, %.lr.ph132.split.us.preheader ], [ %indvars.iv.next186, %110 ] - %.val84131.us = phi ptr [ %.val84.us156, %.lr.ph132.split.us.preheader ], [ %.val84.us142, %110 ] - %.sroa.0.0108130.us = phi i32 [ 0, %.lr.ph132.split.us.preheader ], [ %.sroa.0.1.us144, %110 ] - %.sroa.7.0109129.us = phi i32 [ 0, %.lr.ph132.split.us.preheader ], [ %.sroa.7.1.us145, %110 ] - %96 = phi ptr [ %.val87, %.lr.ph132.split.us.preheader ], [ %132, %110 ] +.lr.ph132.split.us: ; preds = %.lr.ph132.split.us.preheader, %107 + %indvars.iv185 = phi i64 [ 0, %.lr.ph132.split.us.preheader ], [ %indvars.iv.next186, %107 ] + %.val84131.us = phi ptr [ %.val84.us156, %.lr.ph132.split.us.preheader ], [ %.val84.us142, %107 ] + %.sroa.0.0108130.us = phi i32 [ 0, %.lr.ph132.split.us.preheader ], [ %.sroa.0.1.us144, %107 ] + %.sroa.7.0109129.us = phi i32 [ 0, %.lr.ph132.split.us.preheader ], [ %.sroa.7.1.us145, %107 ] + %96 = phi ptr [ %.val87, %.lr.ph132.split.us.preheader ], [ %132, %107 ] %97 = getelementptr i8, ptr %96, i64 8 %.val85.val.us136 = load ptr, ptr %97, align 8, !tbaa !32 %98 = getelementptr inbounds nuw i32, ptr %.val85.val.us136, i64 %indvars.iv185 @@ -8896,12 +8894,11 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %104 = sub nsw i32 %99, %103 %105 = lshr i32 %102, 29 %106 = and i32 %105, 1 - %107 = shl nsw i32 %104, 1 - %108 = or disjoint i32 %107, %106 - %109 = icmp eq i32 %108, 0 - br i1 %109, label %127, label %.preheader95.us + %105 = or i32 %104, %104 + %106 = icmp eq i32 %105, 0 + br i1 %106, label %124, label %.preheader95.us -110: ; preds = %131 +107: ; preds = %128 %.val84.us142 = load ptr, ptr %19, align 8, !tbaa !3 %.not.us143 = icmp eq ptr %.val84.us142, null br i1 %.not.us143, label %.critedge, label %.lr.ph132.split.us, !llvm.loop !177 @@ -8923,7 +8920,7 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br i1 %118, label %125, label %.preheader.us 119: ; preds = %.lr.ph.us, %119 - %indvars.iv179 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next180, %119 ] + %indvars.iv179 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next180, %116 ] %.val81.us = load ptr, ptr %137, align 8, !tbaa !32 %120 = getelementptr inbounds nuw i32, ptr %.val81.us, i64 %indvars.iv179 %121 = load i32, ptr %120, align 4, !tbaa !35 @@ -8951,15 +8948,15 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br label %131 131: ; preds = %127, %._crit_edge.us - %.sroa.0.1.us144 = phi i32 [ %130, %127 ], [ %.sroa.0.0108130.us, %._crit_edge.us ] - %.sroa.7.1.us145 = phi i32 [ %.sroa.7.0109129.us, %127 ], [ %138, %._crit_edge.us ] + %.sroa.0.1.us144 = phi i32 [ %130, %124 ], [ %.sroa.0.0108130.us, %._crit_edge.us ] + %.sroa.7.1.us145 = phi i32 [ %.sroa.7.0109129.us, %124 ], [ %138, %._crit_edge.us ] %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1 %132 = load ptr, ptr %16, align 8, !tbaa !43 %133 = getelementptr i8, ptr %132, i64 4 %.val79.us146 = load i32, ptr %133, align 4, !tbaa !30 %134 = sext i32 %.val79.us146 to i64 %135 = icmp slt i64 %indvars.iv.next186, %134 - br i1 %135, label %110, label %.critedge, !llvm.loop !177 + br i1 %135, label %107, label %.critedge, !llvm.loop !177 .preheader.us: ; preds = %113 %136 = icmp sgt i32 %.val78.us, 0 @@ -8979,11 +8976,11 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt br i1 %.not, label %.critedge, label %.lr.ph132.split, !llvm.loop !177 .lr.ph132.split: ; preds = %.lr.ph132, %139 - %140 = phi ptr [ %160, %139 ], [ %.val87, %.lr.ph132 ] - %indvars.iv = phi i64 [ %indvars.iv.next, %139 ], [ 0, %.lr.ph132 ] - %.val84131 = phi ptr [ %.val84, %139 ], [ %.val84.us156, %.lr.ph132 ] - %.sroa.0.0108130 = phi i32 [ %.sroa.0.1, %139 ], [ 0, %.lr.ph132 ] - %.sroa.7.0109129 = phi i32 [ %.sroa.7.1, %139 ], [ 0, %.lr.ph132 ] + %140 = phi ptr [ %160, %136 ], [ %.val87, %.lr.ph132 ] + %indvars.iv = phi i64 [ %indvars.iv.next, %136 ], [ 0, %.lr.ph132 ] + %.val84131 = phi ptr [ %.val84, %136 ], [ %.val84.us156, %.lr.ph132 ] + %.sroa.0.0108130 = phi i32 [ %.sroa.0.1, %136 ], [ 0, %.lr.ph132 ] + %.sroa.7.0109129 = phi i32 [ %.sroa.7.1, %136 ], [ 0, %.lr.ph132 ] %141 = getelementptr i8, ptr %140, i64 8 %.val85.val = load ptr, ptr %141, align 8, !tbaa !32 %142 = getelementptr inbounds nuw i32, ptr %.val85.val, i64 %indvars.iv @@ -8996,15 +8993,14 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %148 = sub nsw i32 %143, %147 %149 = lshr i32 %146, 29 %150 = and i32 %149, 1 - %151 = shl nsw i32 %148, 1 - %152 = or disjoint i32 %151, %150 - %153 = icmp eq i32 %152, 0 - br i1 %153, label %154, label %.preheader95 - -154: ; preds = %.lr.ph132.split - %155 = trunc nuw nsw i64 %indvars.iv to i32 - %156 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.49, i32 noundef %155) #27 - %157 = add nsw i32 %.sroa.0.0108130, 1 + %148 = or i32 %148, %147 + %149 = icmp eq i32 %148, 0 + br i1 %149, label %150, label %.preheader95 + +150: ; preds = %.lr.ph132.split + %151 = trunc nuw nsw i64 %indvars.iv to i32 + %152 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.49, i32 noundef %151) #27 + %153 = add nsw i32 %.sroa.0.0108130, 1 %.pre = load ptr, ptr %16, align 8, !tbaa !43 br label %159 @@ -9012,10 +9008,10 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %158 = add nsw i32 %.sroa.7.0109129, 1 br label %159 -159: ; preds = %154, %.preheader95 - %160 = phi ptr [ %.pre, %154 ], [ %140, %.preheader95 ] - %.sroa.0.1 = phi i32 [ %157, %154 ], [ %.sroa.0.0108130, %.preheader95 ] - %.sroa.7.1 = phi i32 [ %.sroa.7.0109129, %154 ], [ %158, %.preheader95 ] +159: ; preds = %150, %.preheader95 + %160 = phi ptr [ %.pre, %150 ], [ %140, %.preheader95 ] + %.sroa.0.1 = phi i32 [ %153, %150 ], [ %.sroa.0.0108130, %.preheader95 ] + %.sroa.7.1 = phi i32 [ %.sroa.7.0109129, %150 ], [ %158, %.preheader95 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %161 = getelementptr i8, ptr %160, i64 4 %.val79 = load i32, ptr %161, align 4, !tbaa !30 @@ -9023,10 +9019,10 @@ define void @Gia_GenerateCexesDumpFile(ptr noundef %0, ptr noundef readonly capt %163 = icmp slt i64 %indvars.iv.next, %162 br i1 %163, label %139, label %.critedge, !llvm.loop !177 -.critedge: ; preds = %139, %159, %110, %131, %70, %90, %38, %63, %.lr.ph113.split.us, %.lr.ph113.split, %9 - %.sroa.0.0.lcssa = phi i32 [ 0, %9 ], [ 0, %.lr.ph113.split.us ], [ 0, %.lr.ph113.split ], [ %.sroa.0.1.us.us, %63 ], [ %.sroa.0.1.us.us, %38 ], [ %.sroa.0.1.us, %90 ], [ %.sroa.0.1.us, %70 ], [ %.sroa.0.1.us144, %131 ], [ %.sroa.0.1.us144, %110 ], [ %.sroa.0.1, %159 ], [ %.sroa.0.1, %139 ] - %.sroa.7.0.lcssa = phi i32 [ 0, %9 ], [ 0, %.lr.ph113.split.us ], [ 0, %.lr.ph113.split ], [ %.sroa.7.1.us.us, %63 ], [ %.sroa.7.1.us.us, %38 ], [ %.sroa.7.1.us, %90 ], [ %.sroa.7.1.us, %70 ], [ %.sroa.7.1.us145, %131 ], [ %.sroa.7.1.us145, %110 ], [ %.sroa.7.1, %159 ], [ %.sroa.7.1, %139 ] - %.val79.lcssa = phi i32 [ %.val87.val, %9 ], [ %.val87.val, %.lr.ph113.split.us ], [ %.val87.val, %.lr.ph113.split ], [ %.val79.us.us, %63 ], [ %.val79.us.us, %38 ], [ %.val79.us, %90 ], [ %.val79.us, %70 ], [ %.val79.us146, %131 ], [ %.val79.us146, %110 ], [ %.val79, %159 ], [ %.val79, %139 ] +.critedge: ; preds = %139, %159, %107, %131, %70, %90, %38, %63, %.lr.ph113.split.us, %.lr.ph113.split, %9 + %.sroa.0.0.lcssa = phi i32 [ 0, %9 ], [ 0, %.lr.ph113.split.us ], [ 0, %.lr.ph113.split ], [ %.sroa.0.1.us.us, %62 ], [ %.sroa.0.1.us.us, %37 ], [ %.sroa.0.1.us, %88 ], [ %.sroa.0.1.us, %69 ], [ %.sroa.0.1.us144, %128 ], [ %.sroa.0.1.us144, %107 ], [ %.sroa.0.1, %155 ], [ %.sroa.0.1, %136 ] + %.sroa.7.0.lcssa = phi i32 [ 0, %9 ], [ 0, %.lr.ph113.split.us ], [ 0, %.lr.ph113.split ], [ %.sroa.7.1.us.us, %62 ], [ %.sroa.7.1.us.us, %37 ], [ %.sroa.7.1.us, %88 ], [ %.sroa.7.1.us, %69 ], [ %.sroa.7.1.us145, %128 ], [ %.sroa.7.1.us145, %107 ], [ %.sroa.7.1, %155 ], [ %.sroa.7.1, %136 ] + %.val79.lcssa = phi i32 [ %.val87.val, %9 ], [ %.val87.val, %.lr.ph113.split.us ], [ %.val87.val, %.lr.ph113.split ], [ %.val79.us.us, %62 ], [ %.val79.us.us, %37 ], [ %.val79.us, %88 ], [ %.val79.us, %69 ], [ %.val79.us146, %128 ], [ %.val79.us146, %107 ], [ %.val79, %155 ], [ %.val79, %136 ] %164 = add i32 %.sroa.7.0.lcssa, %.sroa.0.0.lcssa %165 = sub i32 %.val79.lcssa, %164 %166 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54, i32 noundef %.sroa.7.0.lcssa, i32 noundef %.sroa.0.0.lcssa, i32 noundef %165, ptr noundef %0) diff --git a/bench/abseil-cpp/optimized/float_conversion.ll b/bench/abseil-cpp/optimized/float_conversion.ll index aae90f7994b..57e87a8ae3f 100644 --- a/bench/abseil-cpp/optimized/float_conversion.ll +++ b/bench/abseil-cpp/optimized/float_conversion.ll @@ -150,7 +150,7 @@ _ZN4absl19str_format_internal12_GLOBAL__N_123ConvertNonNumericFloatsIeEEbcT_RKNS call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %10) #19 %60 = load i8, ptr %1, align 4, !tbaa !13 %61 = and i8 %60, -2 - switch i8 %61, label %385 [ + switch i8 %61, label %388 [ i8 8, label %62 i8 10, label %151 i8 12, label %197 @@ -662,9 +662,9 @@ _ZN4absl19str_format_internal12_GLOBAL__N_113PrintExponentEicPNS1_6BufferE.exit: br label %.lr.ph.i.i.i .lr.ph.i.i.i: ; preds = %291, %.lr.ph.i.preheader.i.i - %.199.i.i = phi i32 [ %292, %291 ], [ %283, %.lr.ph.i.preheader.i.i ] - %.sroa.16.2.i.i = phi i64 [ %.sroa.2.0.extract.trunc.i.i37.i.i.i, %291 ], [ %.sroa.2.0.copyload.i, %.lr.ph.i.preheader.i.i ] - %.sroa.082.2.i.i = phi i64 [ %.sroa.0.0.extract.trunc.i.i35.i.i.i, %291 ], [ %.sroa.0.0.copyload.i, %.lr.ph.i.preheader.i.i ] + %.199.i.i = phi i32 [ %292, %292 ], [ %283, %.lr.ph.i.preheader.i.i ] + %.sroa.16.2.i.i = phi i64 [ %.sroa.2.0.extract.trunc.i.i37.i.i.i, %292 ], [ %.sroa.2.0.copyload.i, %.lr.ph.i.preheader.i.i ] + %.sroa.082.2.i.i = phi i64 [ %.sroa.0.0.extract.trunc.i.i35.i.i.i, %292 ], [ %.sroa.0.0.copyload.i, %.lr.ph.i.preheader.i.i ] %.sroa.24.0.insert.ext.i.i.i.i = zext i64 %.sroa.16.2.i.i to i128 %.sroa.24.0.insert.shift.i.i.i.i = shl nuw i128 %.sroa.24.0.insert.ext.i.i.i.i, 64 %.sroa.03.0.insert.ext.i.i.i.i = zext i64 %.sroa.082.2.i.i to i128 @@ -696,9 +696,9 @@ _ZN4absl19str_format_internal12_GLOBAL__N_113PrintExponentEicPNS1_6BufferE.exit: br i1 %294, label %.lr.ph.i.i.i, label %.critedge.i.i.i, !llvm.loop !44 .critedge.i.i.i: ; preds = %291, %.lr.ph.i.i.i, %276 - %.098.i.i = phi i32 [ %283, %276 ], [ %.199.i.i, %.lr.ph.i.i.i ], [ %292, %291 ] - %.sroa.16.1.i.i = phi i64 [ 0, %276 ], [ %.sroa.16.2.i.i, %.lr.ph.i.i.i ], [ 0, %291 ] - %.sroa.082.1.i.i = phi i64 [ 0, %276 ], [ %.sroa.082.2.i.i, %.lr.ph.i.i.i ], [ 0, %291 ] + %.098.i.i = phi i32 [ %283, %276 ], [ %.199.i.i, %.lr.ph.i.i.i ], [ %292, %292 ] + %.sroa.16.1.i.i = phi i64 [ 0, %276 ], [ %.sroa.16.2.i.i, %.lr.ph.i.i.i ], [ 0, %292 ] + %.sroa.082.1.i.i = phi i64 [ 0, %276 ], [ %.sroa.082.2.i.i, %.lr.ph.i.i.i ], [ 0, %292 ] %.sroa.22.0.insert.ext.i.i.i69.i = zext i64 %.sroa.16.1.i.i to i128 %.sroa.22.0.insert.shift.i.i.i70.i = shl nuw i128 %.sroa.22.0.insert.ext.i.i.i69.i, 64 %.sroa.01.0.insert.ext.i.i.i71.i = zext i64 %.sroa.082.1.i.i to i128 @@ -715,10 +715,10 @@ _ZN4absl19str_format_internal12_GLOBAL__N_113PrintExponentEicPNS1_6BufferE.exit: br label %_ZN4absl19str_format_internal12_GLOBAL__N_116FormatANormalizeINS_7uint128EEEvNS1_18HexFloatTypeParamsEPhPT_Pi.exit.i.i _ZN4absl19str_format_internal12_GLOBAL__N_116FormatANormalizeINS_7uint128EEEvNS1_18HexFloatTypeParamsEPhPT_Pi.exit.i.i: ; preds = %.critedge.i.i.i, %287 - %.sink59.off0 = phi i64 [ %extract.t60, %.critedge.i.i.i ], [ %extract.t61, %287 ] - %.sink59.off64 = phi i64 [ %extract.t63, %.critedge.i.i.i ], [ %extract.t65, %287 ] - %.0100.i.i = phi i8 [ %296, %.critedge.i.i.i ], [ 0, %287 ] - %.2.i.i = phi i32 [ %298, %.critedge.i.i.i ], [ -16382, %287 ] + %.sink59.off0 = phi i64 [ %extract.t60, %.critedge.i.i.i ], [ %extract.t61, %288 ] + %.sink59.off64 = phi i64 [ %extract.t63, %.critedge.i.i.i ], [ %extract.t65, %288 ] + %.0100.i.i = phi i8 [ %296, %.critedge.i.i.i ], [ 0, %288 ] + %.2.i.i = phi i32 [ %298, %.critedge.i.i.i ], [ -16382, %288 ] br i1 %282, label %_ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_11FormatStateEPhPT_Pi.exit.i.i, label %300 300: ; preds = %_ZN4absl19str_format_internal12_GLOBAL__N_116FormatANormalizeINS_7uint128EEEvNS1_18HexFloatTypeParamsEPhPT_Pi.exit.i.i @@ -767,23 +767,23 @@ _ZN4absl19str_format_internal12_GLOBAL__N_116FormatANormalizeINS_7uint128EEEvNS1 br label %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i _ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i: ; preds = %318, %316 - %324 = phi i8 [ %323, %318 ], [ %.0100.i.i, %316 ] + %324 = phi i8 [ %323, %319 ], [ %.0100.i.i, %317 ] %325 = and i8 %324, 1 %.not.i44.i.i = icmp eq i8 %325, 0 br i1 %.not.i44.i.i, label %._crit_edge.i.i.i, label %326 326: ; preds = %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i, %314 + %328 = icmp samesign ugt i64 %302, 31 + %329 = zext nneg i32 %306 to i128 + %330 = shl nuw nsw i128 1, %329 + %.sroa.0.0.extract.trunc.i14.i.i.i.i = trunc i128 %330 to i64 + %.sroa.2.0.extract.shift.i15.i.i.i.i = lshr i128 %330, 64 + %.sroa.2.0.extract.trunc.i16.i.i.i.i = trunc nuw nsw i128 %.sroa.2.0.extract.shift.i15.i.i.i.i to i64 + %.sroa.028.0.i.i.i.i = select i1 %328, i64 0, i64 %.sroa.0.0.extract.trunc.i14.i.i.i.i + %.sroa.3.0.i.i.i.i = select i1 %328, i64 0, i64 %.sroa.2.0.extract.trunc.i16.i.i.i.i %.sroa.01.0.insert.ext.i.i.i.i.i = zext i64 %.sink59.off0 to i128 %.sroa.01.0.insert.insert.i.i.i.i.i = or disjoint i128 %.sroa.24.0.insert.shift.i.i.i.i.i, %.sroa.01.0.insert.ext.i.i.i.i.i - %327 = icmp samesign ugt i64 %301, 31 - %328 = zext nneg i32 %305 to i128 - %329 = shl nuw nsw i128 1, %328 - %.sroa.0.0.extract.trunc.i14.i.i.i.i = trunc i128 %329 to i64 - %.sroa.2.0.extract.shift.i15.i.i.i.i = lshr i128 %329, 64 - %.sroa.2.0.extract.trunc.i16.i.i.i.i = trunc nuw nsw i128 %.sroa.2.0.extract.shift.i15.i.i.i.i to i64 - %.sroa.029.0.i.i.i.i = select i1 %327, i64 0, i64 %.sroa.0.0.extract.trunc.i14.i.i.i.i - %.sroa.3.0.i.i.i.i = select i1 %327, i64 0, i64 %.sroa.2.0.extract.trunc.i16.i.i.i.i - %.sroa.01.0.insert.ext.i.i.i20.i.i.i = zext nneg i64 %.sroa.029.0.i.i.i.i to i128 + %.sroa.01.0.insert.ext.i.i.i20.i.i.i = zext nneg i64 %.sroa.028.0.i.i.i.i to i128 %.sroa.03.0.insert.insert.i.i.i.i.i.i = add i128 %.sroa.01.0.insert.insert.i.i.i.i.i, %.sroa.01.0.insert.ext.i.i.i20.i.i.i %.sroa.0.0.extract.trunc.i.i.i.i.i.i = trunc i128 %.sroa.03.0.insert.insert.i.i.i.i.i.i to i64 %330 = lshr i128 %.sroa.03.0.insert.insert.i.i.i.i.i.i, 64 @@ -792,7 +792,7 @@ _ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEE %.not.i.i.i.i77.i = icmp slt i64 %.sink59.off64, 0 %.not.i28.i.i.i.i = icmp sgt i64 %.narrow.i.i.i.i.i.i, -1 %or.cond.i.i.i.i = select i1 %.not.i.i.i.i77.i, i1 %.not.i28.i.i.i.i, i1 false - %spec.select.i.i.i.i = or i1 %327, %or.cond.i.i.i.i + %spec.select.i.i.i.i = or i1 %328, %or.cond.i.i.i.i %331 = zext i1 %spec.select.i.i.i.i to i8 %332 = add nuw nsw i8 %.0100.i.i, %331 %333 = icmp samesign ugt i8 %332, 15 @@ -803,22 +803,22 @@ _ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEE br label %._crit_edge.i.i.i ._crit_edge.i.i.i: ; preds = %334, %326, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i, %314 - %.1101.i.i = phi i8 [ %.0100.i.i, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ 1, %334 ], [ %.0100.i.i, %314 ], [ %332, %326 ] - %.3.i.i = phi i32 [ %.2.i.i, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ %335, %334 ], [ %.2.i.i, %314 ], [ %.2.i.i, %326 ] - %.sroa.22.0.copyload.i.pre.i.i.i = phi i64 [ %.sink59.off64, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ 0, %334 ], [ %.sink59.off64, %314 ], [ %.narrow.i.i.i.i.i.i, %326 ] - %.sroa.01.0.copyload.i.pre.i.i.i = phi i64 [ %.sink59.off0, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ 0, %334 ], [ %.sink59.off0, %314 ], [ %.sroa.0.0.extract.trunc.i.i.i.i.i.i, %326 ] + %.1101.i.i = phi i8 [ %.0100.i.i, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ 1, %336 ], [ %.0100.i.i, %315 ], [ %332, %327 ] + %.3.i.i = phi i32 [ %.2.i.i, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ %335, %336 ], [ %.2.i.i, %315 ], [ %.2.i.i, %327 ] + %.sroa.22.0.copyload.i.pre.i.i.i = phi i64 [ %.sink59.off64, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ 0, %336 ], [ %.sink59.off64, %315 ], [ %.narrow.i.i.i.i.i.i, %327 ] + %.sroa.01.0.copyload.i.pre.i.i.i = phi i64 [ %.sink59.off0, %_ZN4absl19str_format_internal12_GLOBAL__N_120HexFloatNeedsRoundUpINS_7uint128EEEbT_mh.exit.i.i.i ], [ 0, %336 ], [ %.sink59.off0, %315 ], [ %.sroa.0.0.extract.trunc.i.i.i.i.i.i, %327 ] %.sroa.2.0.extract.shift.i.i.i.i.i.i = lshr i128 18446744073709551615, %307 %.sroa.2.0.extract.trunc.i.i.i.i.i.i = trunc nuw i128 %.sroa.2.0.extract.shift.i.i.i.i.i.i to i64 %336 = xor i64 %310, -1 br label %_ZN4absl19str_format_internal12_GLOBAL__N_123MaskUpToNibbleExclusiveINS_7uint128EEET_m.exit.i.i.i _ZN4absl19str_format_internal12_GLOBAL__N_123MaskUpToNibbleExclusiveINS_7uint128EEET_m.exit.i.i.i: ; preds = %._crit_edge.i.i.i, %300 - %.2102.i.i = phi i8 [ %.0100.i.i, %300 ], [ %.1101.i.i, %._crit_edge.i.i.i ] - %.4.i.i = phi i32 [ %.2.i.i, %300 ], [ %.3.i.i, %._crit_edge.i.i.i ] - %.sroa.22.0.copyload.i.i.i.i = phi i64 [ %.sink59.off64, %300 ], [ %.sroa.22.0.copyload.i.pre.i.i.i, %._crit_edge.i.i.i ] - %.sroa.01.0.copyload.i.i.i.i = phi i64 [ %.sink59.off0, %300 ], [ %.sroa.01.0.copyload.i.pre.i.i.i, %._crit_edge.i.i.i ] - %.sroa.3.0.i23.i.i.i = phi i64 [ 0, %300 ], [ %.sroa.2.0.extract.trunc.i.i.i.i.i.i, %._crit_edge.i.i.i ] - %.sroa.0.0.i.i.i.i = phi i64 [ -1, %300 ], [ %336, %._crit_edge.i.i.i ] + %.2102.i.i = phi i8 [ %.0100.i.i, %301 ], [ %.1101.i.i, %._crit_edge.i.i.i ] + %.4.i.i = phi i32 [ %.2.i.i, %301 ], [ %.3.i.i, %._crit_edge.i.i.i ] + %.sroa.22.0.copyload.i.i.i.i = phi i64 [ %.sink59.off64, %301 ], [ %.sroa.22.0.copyload.i.pre.i.i.i, %._crit_edge.i.i.i ] + %.sroa.01.0.copyload.i.i.i.i = phi i64 [ %.sink59.off0, %301 ], [ %.sroa.01.0.copyload.i.pre.i.i.i, %._crit_edge.i.i.i ] + %.sroa.3.0.i23.i.i.i = phi i64 [ 0, %301 ], [ %.sroa.2.0.extract.trunc.i.i.i.i.i.i, %._crit_edge.i.i.i ] + %.sroa.0.0.i.i.i.i = phi i64 [ -1, %301 ], [ %336, %._crit_edge.i.i.i ] %.sroa.22.0.insert.ext.i.i42.i.i = zext i64 %.sroa.3.0.i23.i.i.i to i128 %337 = xor i128 %.sroa.22.0.insert.ext.i.i42.i.i, -1 %.sroa.2.0.extract.shift.i.i.i73.i = shl i128 %337, 64 @@ -854,33 +854,28 @@ _ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_ store i8 %346, ptr %343, align 2, !tbaa !12 %.not.i74.i = icmp eq i32 %narrow.i, 0 %or.cond.i.i = select i1 %282, i1 true, i1 %.not.i74.i - br i1 %or.cond.i.i, label %348, label %354 + br i1 %or.cond.i.i, label %348, label %357 348: ; preds = %_ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_11FormatStateEPhPT_Pi.exit.i.i - br i1 %282, label %349, label %350 - -349: ; preds = %348 - %.sroa.2.0.insert.ext.i.i.i.i = zext i64 %.sroa.16.4.i.i to i128 - %.sroa.2.0.insert.shift.i.i.i.i = shl nuw i128 %.sroa.2.0.insert.ext.i.i.i.i, 64 - %.sroa.0.0.insert.ext.i.i.i.i = zext i64 %.sroa.082.4.i.i to i128 - %.sroa.0.0.insert.insert.i.i.i.i = or disjoint i128 %.sroa.2.0.insert.shift.i.i.i.i, %.sroa.0.0.insert.ext.i.i.i.i - %.not104.i.i = icmp eq i128 %.sroa.0.0.insert.insert.i.i.i.i, 0 - br i1 %.not104.i.i, label %350, label %354 - -350: ; preds = %349, %348 - %351 = getelementptr inbounds nuw i8, ptr %1, i64 1 - %352 = load i8, ptr %351, align 1, !tbaa !4 - %353 = and i8 %352, 8 - %.not105.i.i = icmp eq i8 %353, 0 - br i1 %.not105.i.i, label %356, label %354 - -354: ; preds = %350, %349, %_ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_11FormatStateEPhPT_Pi.exit.i.i - %355 = getelementptr inbounds nuw i8, ptr %4, i64 4 - store i8 46, ptr %347, align 1, !tbaa !12 - br label %356 - -356: ; preds = %354, %350 - %.0.i75.i = phi ptr [ %355, %354 ], [ %347, %350 ] + %351 = or i64 %.sroa.082.4.i.i, %.sroa.16.4.i.i + %352 = icmp ne i64 %351, 0 + %or.cond127.not.i.i = select i1 %282, i1 %352, i1 false + br i1 %or.cond127.not.i.i, label %357, label %353 + +353:; preds = %348 + %354 = getelementptr inbounds nuw i8, ptr %1, i64 1 + %355 = load i8, ptr %354, align 1, !tbaa !4 + %356 = and i8 %355, 8 + %.not105.i.i = icmp eq i8 %356, 0 + br i1 %.not105.i.i, label %359, label %357 + +357: ; preds = %353, %350, %_ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_11FormatStateEPhPT_Pi.exit.i.i + %358 = getelementptr inbounds nuw i8, ptr %4, i64 4 + store i8 46, ptr %349, align 1, !tbaa !12 + br label %354 + +354: ; preds = %357, %353 + %.0.i75.i = phi ptr [ %358, %357 ], [ %349, %353 ] %.sroa.2.0.insert.ext.i.i53109.i.i = zext i64 %.sroa.16.4.i.i to i128 %.sroa.2.0.insert.shift.i.i54110.i.i = shl nuw i128 %.sroa.2.0.insert.ext.i.i53109.i.i, 64 %.sroa.0.0.insert.ext.i.i55111.i.i = zext i64 %.sroa.082.4.i.i to i128 @@ -888,11 +883,11 @@ _ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_ %.not106113.i.i = icmp eq i128 %.sroa.0.0.insert.insert.i.i56112.i.i, 0 br i1 %.not106113.i.i, label %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i, label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %356, %.lr.ph.i.i - %.sroa.0.0.insert.insert.i.i56117.i.i = phi i128 [ %361, %.lr.ph.i.i ], [ %.sroa.0.0.insert.insert.i.i56112.i.i, %356 ] - %.1116.i.i = phi ptr [ %360, %.lr.ph.i.i ], [ %.0.i75.i, %356 ] - %.034115.i.i = phi i64 [ %362, %.lr.ph.i.i ], [ 0, %356 ] - %.sroa.16.0114.i.i = phi i64 [ %.sroa.2.0.extract.trunc.i.i.i76.i, %.lr.ph.i.i ], [ %.sroa.16.4.i.i, %356 ] +.lr.ph.i.i: ; preds = %359, %.lr.ph.i.i + %.sroa.0.0.insert.insert.i.i56117.i.i = phi i128 [ %361, %.lr.ph.i.i ], [ %.sroa.0.0.insert.insert.i.i56112.i.i, %359 ] + %.1116.i.i = phi ptr [ %360, %.lr.ph.i.i ], [ %.0.i75.i, %359 ] + %.034115.i.i = phi i64 [ %362, %.lr.ph.i.i ], [ 0, %359 ] + %.sroa.16.0114.i.i = phi i64 [ %.sroa.2.0.extract.trunc.i.i.i76.i, %.lr.ph.i.i ], [ %.sroa.16.4.i.i, %359 ] %357 = lshr i64 %.sroa.16.0114.i.i, 60 %358 = getelementptr inbounds nuw i8, ptr %340, i64 %357 %359 = load i8, ptr %358, align 1, !tbaa !12 @@ -905,9 +900,9 @@ _ZN4absl19str_format_internal12_GLOBAL__N_112FormatARoundINS_7uint128EEEvbRKNS1_ %.not106.i.i = icmp eq i128 %361, 0 br i1 %.not106.i.i, label %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i, label %.lr.ph.i.i, !llvm.loop !45 -_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i: ; preds = %.lr.ph.i.i, %356 - %.034.lcssa.i.i = phi i64 [ 0, %356 ], [ %362, %.lr.ph.i.i ] - %.1.lcssa.i.i = phi ptr [ %.0.i75.i, %356 ], [ %360, %.lr.ph.i.i ] +_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i: ; preds = %.lr.ph.i.i, %359 + %.034.lcssa.i.i = phi i64 [ 0, %359 ], [ %362, %.lr.ph.i.i ] + %.1.lcssa.i.i = phi ptr [ %.0.i75.i, %359 ], [ %360, %.lr.ph.i.i ] %363 = sub i64 %spec.select.i, %.034.lcssa.i.i %.035.i.i = select i1 %282, i64 0, i64 %363 %364 = ptrtoint ptr %.1.lcssa.i.i to i64 @@ -946,14 +941,14 @@ _ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloa br label %385 385: ; preds = %375, %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i, %201, %153, %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatFINS_7uint128EEEvT_iRKNS1_11FormatStateE.exit.i, %50 - %.1.i = phi i1 [ true, %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatFINS_7uint128EEEvT_iRKNS1_11FormatStateE.exit.i ], [ true, %375 ], [ %154, %153 ], [ %202, %201 ], [ true, %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i ], [ false, %50 ] + %.1.i = phi i1 [ true, %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatFINS_7uint128EEEvT_iRKNS1_11FormatStateE.exit.i ], [ true, %378 ], [ %154, %153 ], [ %202, %201 ], [ true, %_ZN4absl19str_format_internal12_GLOBAL__N_17FormatAINS_7uint128EEEvNS1_18HexFloatTypeParamsET_ibRKNS1_11FormatStateE.exit.i ], [ false, %50 ] call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %10) #19 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #19 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #19 br label %_ZN4absl19str_format_internal12_GLOBAL__N_111FloatToSinkIeEEbT_RKNS0_24FormatConversionSpecImplEPNS0_14FormatSinkImplE.exit _ZN4absl19str_format_internal12_GLOBAL__N_111FloatToSinkIeEEbT_RKNS0_24FormatConversionSpecImplEPNS0_14FormatSinkImplE.exit: ; preds = %_ZN4absl19str_format_internal12_GLOBAL__N_123ConvertNonNumericFloatsIeEEbcT_RKNS0_24FormatConversionSpecImplEPNS0_14FormatSinkImplE.exit.i, %385 - %.0.i = phi i1 [ %.1.i, %385 ], [ true, %_ZN4absl19str_format_internal12_GLOBAL__N_123ConvertNonNumericFloatsIeEEbcT_RKNS0_24FormatConversionSpecImplEPNS0_14FormatSinkImplE.exit.i ] + %.0.i = phi i1 [ %.1.i, %388 ], [ true, %_ZN4absl19str_format_internal12_GLOBAL__N_123ConvertNonNumericFloatsIeEEbcT_RKNS0_24FormatConversionSpecImplEPNS0_14FormatSinkImplE.exit.i ] ret i1 %.0.i } diff --git a/bench/abseil-cpp/optimized/gtest-all.ll b/bench/abseil-cpp/optimized/gtest-all.ll index 63b34f483a0..d5aae231f25 100644 --- a/bench/abseil-cpp/optimized/gtest-all.ll +++ b/bench/abseil-cpp/optimized/gtest-all.ll @@ -24979,12 +24979,9 @@ _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E.exit: ; ; Function Attrs: mustprogress uwtable define dso_local void @_ZN7testing8internal7PrintToEoPSo(i64 noundef %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #3 { %4 = alloca [40 x i8], align 16 - %.sroa.2.0.insert.ext = zext i64 %1 to i128 - %.sroa.2.0.insert.shift = shl nuw i128 %.sroa.2.0.insert.ext, 64 - %.sroa.0.0.insert.ext = zext i64 %0 to i128 - %.sroa.0.0.insert.insert = or disjoint i128 %.sroa.2.0.insert.shift, %.sroa.0.0.insert.ext - %5 = icmp eq i128 %.sroa.0.0.insert.insert, 0 - br i1 %5, label %6, label %8 + %5 = or i64 %1, %0 + %6 = icmp eq i64 %5, 0 + br i1 %6, label %7, label %8 6: ; preds = %3 %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.76, i64 noundef 1) @@ -24994,14 +24991,12 @@ define dso_local void @_ZN7testing8internal7PrintToEoPSo(i64 noundef %0, i64 nou call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #59 %9 = getelementptr inbounds nuw i8, ptr %4, i64 39 store i8 0, ptr %9, align 1, !tbaa !28 - %10 = or i64 %1, %0 - %.not = icmp eq i64 %10, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph + br label %.lr.ph .lr.ph: ; preds = %8, %.lr.ph - %.024 = phi ptr [ %23, %.lr.ph ], [ %9, %8 ] - %.01823 = phi i64 [ %12, %.lr.ph ], [ %1, %8 ] - %.01922 = phi i64 [ %20, %.lr.ph ], [ %0, %8 ] + %.024 = phi ptr [ %23, %.lr.ph ], [ %9, %.lr.ph.preheader ] + %.01823 = phi i64 [ %12, %.lr.ph ], [ %1, %.lr.ph.preheader ] + %.01922 = phi i64 [ %20, %.lr.ph ], [ %0, %.lr.ph.preheader ] %11 = urem i64 %.01823, 10 %12 = udiv i64 %.01823, 10 %13 = mul nuw nsw i64 %11, 6 @@ -25023,10 +25018,9 @@ define dso_local void @_ZN7testing8internal7PrintToEoPSo(i64 noundef %0, i64 nou %26 = select i1 %24, i1 true, i1 %25 br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !516 -._crit_edge: ; preds = %.lr.ph, %8 - %.0.lcssa = phi ptr [ %9, %8 ], [ %23, %.lr.ph ] - %27 = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %.0.lcssa) #59 - %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %.0.lcssa, i64 noundef %27) +._crit_edge: ; preds = %.lr.ph + %26 = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %23) #59 + %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %22, i64 noundef %26) call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #59 br label %29 @@ -25050,17 +25044,14 @@ define dso_local void @_ZN7testing8internal7PrintToEnPSo(i64 noundef %0, i64 nou %extract.t = trunc i128 %8 to i64 %extract = lshr i128 %8, 64 %extract.t8 = trunc nuw i128 %extract to i64 - %.pre11 = and i128 %8, -18446744073709551616 br label %9 9: ; preds = %6, %3 - %.sroa.2.0.insert.shift.i.pre-phi = phi i128 [ %.pre11, %6 ], [ %.sroa.26.0.insert.shift, %3 ] %.0.off0 = phi i64 [ %extract.t, %6 ], [ %0, %3 ] %.0.off64 = phi i64 [ %extract.t8, %6 ], [ %1, %3 ] - %.sroa.0.0.insert.ext.i = zext i64 %.0.off0 to i128 - %.sroa.0.0.insert.insert.i = or disjoint i128 %.sroa.2.0.insert.shift.i.pre-phi, %.sroa.0.0.insert.ext.i - %10 = icmp eq i128 %.sroa.0.0.insert.insert.i, 0 - br i1 %10, label %11, label %13 + %10 = or i64 %.0.off64, %.0.off0 + %11 = icmp eq i64 %10, 0 + br i1 %11, label %12, label %.lr.ph.preheader.i 11: ; preds = %9 %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.76, i64 noundef 1) @@ -25070,39 +25061,36 @@ define dso_local void @_ZN7testing8internal7PrintToEnPSo(i64 noundef %0, i64 nou call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #59 %14 = getelementptr inbounds nuw i8, ptr %4, i64 39 store i8 0, ptr %14, align 1, !tbaa !28 - %15 = or i64 %.0.off64, %.0.off0 - %.not.i = icmp eq i64 %15, 0 - br i1 %.not.i, label %._crit_edge.i, label %.lr.ph.i - -.lr.ph.i: ; preds = %13, %.lr.ph.i - %.024.i = phi ptr [ %28, %.lr.ph.i ], [ %14, %13 ] - %.01823.i = phi i64 [ %17, %.lr.ph.i ], [ %.0.off64, %13 ] - %.01922.i = phi i64 [ %25, %.lr.ph.i ], [ %.0.off0, %13 ] - %16 = urem i64 %.01823.i, 10 - %17 = udiv i64 %.01823.i, 10 - %18 = mul nuw nsw i64 %16, 6 - %19 = urem i64 %.01922.i, 10 - %20 = add nuw nsw i64 %18, %19 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %.lr.ph.i, %13 + %.024.i = phi ptr [ %27, %.lr.ph.i ], [ %14, %.lr.ph.preheader.i ] + %.01823.i = phi i64 [ %16, %.lr.ph.i ], [ %.0.off64, %.lr.ph.preheader.i ] + %.024.i = phi i64 [ %24, %.lr.ph.i ], [ %.0.off0, %.lr.ph.preheader.i ] + %15 = urem i64 %.01823.i, 10 + %16 = udiv i64 %.01823.i, 10 + %17 = mul nuw nsw i64 %15, 6 + %18 = urem i64 %.01922.i, 10 + %19 = add nuw nsw i64 %16, %18 %21 = udiv i64 %.01922.i, 10 - %22 = mul nuw i64 %16, 1844674407370955161 - %23 = add nuw i64 %22, %21 - %.lhs.trunc.i = trunc nuw nsw i64 %20 to i8 - %24 = udiv i8 %.lhs.trunc.i, 10 - %.zext.i = zext nneg i8 %24 to i64 - %25 = add i64 %23, %.zext.i - %26 = urem i8 %.lhs.trunc.i, 10 - %27 = or disjoint i8 %26, 48 - %28 = getelementptr inbounds i8, ptr %.024.i, i64 -1 - store i8 %27, ptr %28, align 1, !tbaa !28 - %29 = icmp ugt i64 %.01823.i, 9 - %30 = icmp ne i64 %25, 0 - %31 = select i1 %29, i1 true, i1 %30 - br i1 %31, label %.lr.ph.i, label %._crit_edge.i, !llvm.loop !516 - -._crit_edge.i: ; preds = %.lr.ph.i, %13 - %.0.lcssa.i = phi ptr [ %14, %13 ], [ %28, %.lr.ph.i ] - %32 = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %.0.lcssa.i) #59 - %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %.0.lcssa.i, i64 noundef %32) + %21 = mul nuw i64 %15, 1844674407370955161 + %22 = add nuw i64 %22, %20 + %.lhs.trunc.i = trunc nuw nsw i64 %19 to i8 + %23 = udiv i8 %.lhs.trunc.i, 10 + %.zext.i = zext nneg i8 %23 to i64 + %24 = add i64 %22, %.zext.i + %25 = urem i8 %.lhs.trunc.i, 10 + %26 = or disjoint i8 %25, 48 + %27 = getelementptr inbounds i8, ptr %.024.i, i64 -1 + store i8 %26, ptr %27, align 1, !tbaa !28 + %28 = icmp ugt i64 %.01823.i, 9 + %29 = icmp ne i64 %24, 0 + %30 = select i1 %28, i1 true, i1 %29 + br i1 %30, label %.lr.ph.i, label %._crit_edge.i, !llvm.loop !516 + +._crit_edge.i:; preds = %.lr.ph.i + %31 = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %27) #59 + %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %27, i64 noundef %31) call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #59 br label %_ZN7testing8internal7PrintToEoPSo.exit diff --git a/bench/abseil-cpp/optimized/int128.ll b/bench/abseil-cpp/optimized/int128.ll index 8bb067ad652..b838f464be3 100644 --- a/bench/abseil-cpp/optimized/int128.ll +++ b/bench/abseil-cpp/optimized/int128.ll @@ -578,7 +578,7 @@ define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4absllsERSoN %21 = sub nuw i64 %16, %18 %22 = trunc i32 %10 to i8 %trunc = and i8 %22, -80 - switch i8 %trunc, label %74 [ + switch i8 %trunc, label %75 [ i8 32, label %23 i8 16, label %47 ] @@ -648,32 +648,27 @@ _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i: ; preds = %.noexc27._ZNKSt 47: ; preds = %20 %48 = and i32 %10, 586 - %or.cond = icmp eq i32 %48, 520 - br i1 %or.cond, label %49, label %74 + %or.cond = icmp ne i32 %48, 520 + %49 = or i64 %2, %1 + %50 = icmp eq i64 %49, 0 + %or.cond68 = select i1 %or.cond, i1 true, i1 %50 + br i1 %or.cond68, label %75, label %51 + +51: ; preds = %47 + %52 = load i64, ptr %12, align 8 + %53 = getelementptr inbounds i8, ptr %0, i64 %52 + %54 = getelementptr inbounds nuw i8, ptr %53, i64 225 + %55 = load i8, ptr %54, align 1, !tbaa !25, !range !33, !noundef !34 + %56 = trunc nuw i8 %55 to i1 + br i1 %56, label %._crit_edge.i35, label %57 -49: ; preds = %47 - %.sroa.22.0.insert.ext.i.i = zext i64 %2 to i128 - %.sroa.22.0.insert.shift.i.i = shl nuw i128 %.sroa.22.0.insert.ext.i.i, 64 - %.sroa.01.0.insert.ext.i.i = zext i64 %1 to i128 - %.sroa.01.0.insert.insert.i.i = or disjoint i128 %.sroa.22.0.insert.shift.i.i, %.sroa.01.0.insert.ext.i.i - %.not = icmp eq i128 %.sroa.01.0.insert.insert.i.i, 0 - br i1 %.not, label %74, label %50 - -50: ; preds = %49 - %51 = load i64, ptr %12, align 8 - %52 = getelementptr inbounds i8, ptr %0, i64 %51 - %53 = getelementptr inbounds nuw i8, ptr %52, i64 225 - %54 = load i8, ptr %53, align 1, !tbaa !25, !range !33, !noundef !34 - %55 = trunc nuw i8 %54 to i1 - br i1 %55, label %._crit_edge.i35, label %56 - -._crit_edge.i35: ; preds = %50 - %.phi.trans.insert.i36 = getelementptr inbounds nuw i8, ptr %52, i64 224 +49: ; preds = %51 + %.phi.trans.insert.i36 = getelementptr inbounds nuw i8, ptr %53, i64 224 %.pre.i37 = load i8, ptr %.phi.trans.insert.i36, align 8, !tbaa !42 br label %_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit41 -56: ; preds = %50 - %57 = getelementptr inbounds nuw i8, ptr %52, i64 240 +56: ; preds = %51 + %57 = getelementptr inbounds nuw i8, ptr %53, i64 240 %58 = load ptr, ptr %57, align 8, !tbaa !35 %.not.i.i.i30 = icmp eq ptr %58, null br i1 %.not.i.i.i30, label %.invoke, label %_ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i31 @@ -697,7 +692,7 @@ _ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i31: ; preds = %56 %65 = load ptr, ptr %58, align 8, !tbaa !10 %66 = getelementptr inbounds nuw i8, ptr %65, i64 48 %67 = load ptr, ptr %66, align 8 - %68 = invoke noundef signext i8 %67(ptr noundef nonnull align 8 dereferenceable(570) %58, i8 noundef signext 32) + %68 = invoke noundef signext i8 %68(ptr noundef nonnull align 8 dereferenceable(570) %58, i8 noundef signext 32) to label %.noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge unwind label %45 .noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge: ; preds = %.noexc39 @@ -705,11 +700,11 @@ _ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i31: ; preds = %56 br label %_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33 _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33: ; preds = %.noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge, %61 - %.pre = phi i64 [ %18, %61 ], [ %.pre.pre, %.noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge ] - %.0.i.i.i34 = phi i8 [ %63, %61 ], [ %68, %.noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge ] - %69 = getelementptr inbounds nuw i8, ptr %52, i64 224 + %.pre = phi i64 [ %18, %62 ], [ %.pre.pre, %.noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge ] + %.0.i.i.i34 = phi i8 [ %63, %62 ], [ %68, %.noexc39._ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33_crit_edge ] + %69 = getelementptr inbounds nuw i8, ptr %53, i64 224 store i8 %.0.i.i.i34, ptr %69, align 8, !tbaa !42 - store i8 1, ptr %53, align 1, !tbaa !25 + store i8 1, ptr %54, align 1, !tbaa !25 br label %_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit41 _ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit41: ; preds = %_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i33, %._crit_edge.i35 @@ -725,7 +720,7 @@ _ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit41: ; preds = %_ZNKSt9basic_ios .noexc42: ; preds = %73 unreachable -74: ; preds = %20, %49, %47 +74: ; preds = %20, %47 %75 = load i64, ptr %12, align 8 %76 = getelementptr inbounds i8, ptr %0, i64 %75 %77 = getelementptr inbounds nuw i8, ptr %76, i64 225 @@ -770,11 +765,11 @@ _ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i45: ; preds = %80 %89 = load ptr, ptr %82, align 8, !tbaa !10 %90 = getelementptr inbounds nuw i8, ptr %89, i64 48 %91 = load ptr, ptr %90, align 8 - %92 = invoke noundef signext i8 %91(ptr noundef nonnull align 8 dereferenceable(570) %82, i8 noundef signext 32) + %92 = invoke noundef signext i8 %92(ptr noundef nonnull align 8 dereferenceable(570) %82, i8 noundef signext 32) to label %_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i47 unwind label %45 _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i47: ; preds = %.noexc53, %85 - %.0.i.i.i48 = phi i8 [ %87, %85 ], [ %92, %.noexc53 ] + %.0.i.i.i48 = phi i8 [ %87, %86 ], [ %92, %.noexc53 ] %93 = getelementptr inbounds nuw i8, ptr %76, i64 224 store i8 %.0.i.i.i48, ptr %93, align 8, !tbaa !42 store i8 1, ptr %77, align 1, !tbaa !25 @@ -1123,7 +1118,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS %59 = sub nuw i64 %55, %56 %60 = trunc i32 %11 to i8 %trunc = and i8 %60, -80 - switch i8 %trunc, label %153 [ + switch i8 %trunc, label %152 [ i8 32, label %76 i8 16, label %96 ] @@ -1163,7 +1158,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit52: ; preds = %_ZN cleanup br label %185 -74: ; preds = %.invoke, %_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit97.invoke, %.noexc95, %167, %.noexc80, %147, %123, %.noexc66, %114, %.noexc54, %90, %131, %127 +74: ; preds = %.invoke, %_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit97.invoke, %.noexc95, %167, %.noexc80, %147, %123, %.noexc66, %114, %.noexc54, %90, %131, %130 %75 = landingpad { ptr, i32 } cleanup br label %185 @@ -1300,42 +1295,35 @@ _ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit68: ; preds = %_ZNKSt9basic_ios 124: ; preds = %97, %96 %125 = and i32 %11, 586 - %or.cond.not = icmp eq i32 %125, 520 - br i1 %or.cond.not, label %126, label %133 - -126: ; preds = %124 - %.sroa.22.0.insert.ext.i = zext i64 %2 to i128 - %.sroa.22.0.insert.shift.i = shl nuw i128 %.sroa.22.0.insert.ext.i, 64 - %.sroa.01.0.insert.ext.i = zext i64 %1 to i128 - %.sroa.01.0.insert.insert.i = or disjoint i128 %.sroa.22.0.insert.shift.i, %.sroa.01.0.insert.ext.i - %.not110 = icmp eq i128 %.sroa.01.0.insert.insert.i, 0 - br i1 %.not110, label %133, label %127 - -127: ; preds = %126 + %or.cond.not = icmp ne i32 %125, 520 + %126 = or i64 %2, %1 + %127 = icmp eq i64 %126, 0 + %or.cond = select i1 %or.cond.not, i1 true, i1 %127 %128 = load i64, ptr %51, align 8 %129 = getelementptr inbounds i8, ptr %0, i64 %128 - %130 = invoke noundef signext i8 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv(ptr noundef nonnull align 8 dereferenceable(264) %129) - to label %131 unwind label %74 + br i1 %or.cond, label %134, label %130 + +130: ; preds = %124 + %131 = invoke noundef signext i8 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv(ptr noundef nonnull align 8 dereferenceable(264) %129) + to label %132 unwind label %74 -131: ; preds = %127 - %132 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmmc(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 2, i64 noundef %59, i8 noundef signext %130) +131: ; preds = %130 + %132 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmmc(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 2, i64 noundef %59, i8 noundef signext %131) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEmc.exit unwind label %74 -133: ; preds = %126, %124 - %134 = load i64, ptr %51, align 8 - %135 = getelementptr inbounds i8, ptr %0, i64 %134 - %136 = getelementptr inbounds nuw i8, ptr %135, i64 225 - %137 = load i8, ptr %136, align 1, !tbaa !25, !range !33, !noundef !34 - %138 = trunc nuw i8 %137 to i1 - br i1 %138, label %._crit_edge.i76, label %139 +133: ; preds = %124 + %135 = getelementptr inbounds nuw i8, ptr %129, i64 225 + %136 = load i8, ptr %135, align 1, !tbaa !25, !range !33, !noundef !34 + %137 = trunc nuw i8 %136 to i1 + br i1 %137, label %._crit_edge.i76, label %138 ._crit_edge.i76: ; preds = %133 - %.phi.trans.insert.i77 = getelementptr inbounds nuw i8, ptr %135, i64 224 + %.phi.trans.insert.i77 = getelementptr inbounds nuw i8, ptr %129, i64 224 %.pre.i78 = load i8, ptr %.phi.trans.insert.i77, align 8, !tbaa !42 br label %_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit97.invoke 139: ; preds = %133 - %140 = getelementptr inbounds nuw i8, ptr %135, i64 240 + %140 = getelementptr inbounds nuw i8, ptr %129, i64 240 %141 = load ptr, ptr %140, align 8, !tbaa !35 %.not.i.i.i71 = icmp eq ptr %141, null br i1 %.not.i.i.i71, label %.invoke, label %_ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i72 @@ -1359,14 +1347,14 @@ _ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i72: ; preds = %139 %148 = load ptr, ptr %141, align 8, !tbaa !10 %149 = getelementptr inbounds nuw i8, ptr %148, i64 48 %150 = load ptr, ptr %149, align 8 - %151 = invoke noundef signext i8 %150(ptr noundef nonnull align 8 dereferenceable(570) %141, i8 noundef signext 32) + %151 = invoke noundef signext i8 %149(ptr noundef nonnull align 8 dereferenceable(570) %141, i8 noundef signext 32) to label %_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i74 unwind label %74 _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i74: ; preds = %.noexc80, %144 - %.0.i.i.i75 = phi i8 [ %146, %144 ], [ %151, %.noexc80 ] - %152 = getelementptr inbounds nuw i8, ptr %135, i64 224 + %.0.i.i.i75 = phi i8 [ %146, %143 ], [ %151, %.noexc80 ] + %152 = getelementptr inbounds nuw i8, ptr %129, i64 224 store i8 %.0.i.i.i75, ptr %152, align 8, !tbaa !42 - store i8 1, ptr %136, align 1, !tbaa !25 + store i8 1, ptr %135, align 1, !tbaa !25 br label %_ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv.exit97.invoke 153: ; preds = %58 @@ -1414,11 +1402,11 @@ _ZSt13__check_facetISt5ctypeIcEERKT_PS3_.exit.i.i87: ; preds = %159 %168 = load ptr, ptr %161, align 8, !tbaa !10 %169 = getelementptr inbounds nuw i8, ptr %168, i64 48 %170 = load ptr, ptr %169, align 8 - %171 = invoke noundef signext i8 %170(ptr noundef nonnull align 8 dereferenceable(570) %161, i8 noundef signext 32) + %171 = invoke noundef signext i8 %169(ptr noundef nonnull align 8 dereferenceable(570) %161, i8 noundef signext 32) to label %_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i89 unwind label %74 _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i89: ; preds = %.noexc95, %164 - %.0.i.i.i90 = phi i8 [ %166, %164 ], [ %171, %.noexc95 ] + %.0.i.i.i90 = phi i8 [ %166, %163 ], [ %171, %.noexc95 ] %172 = getelementptr inbounds nuw i8, ptr %155, i64 224 store i8 %.0.i.i.i90, ptr %172, align 8, !tbaa !42 store i8 1, ptr %156, align 1, !tbaa !25 diff --git a/bench/fmt/optimized/format-impl-test.ll b/bench/fmt/optimized/format-impl-test.ll index 1876345d70f..c13ee527825 100644 --- a/bench/fmt/optimized/format-impl-test.ll +++ b/bench/fmt/optimized/format-impl-test.ll @@ -10122,16 +10122,15 @@ declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_st ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef nonnull align 8 dereferenceable(172) ptr @_ZN3fmt3v116detail6bigintmLIoEERS2_T_(ptr noundef nonnull align 8 dereferenceable(172) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #5 comdat align 2 personality ptr @__gxx_personality_v0 { %.sroa.23.0.insert.ext = zext i64 %2 to i128 - %.sroa.23.0.insert.shift = shl nuw i128 %.sroa.23.0.insert.ext, 64 %.sroa.02.0.insert.ext = zext i64 %1 to i128 - %.sroa.02.0.insert.insert = or disjoint i128 %.sroa.23.0.insert.shift, %.sroa.02.0.insert.ext + %.sroa.02.0.insert.insert = or i128 %.sroa.23.0.insert.ext, %.sroa.02.0.insert.ext %.not = icmp eq i128 %.sroa.02.0.insert.insert, 0 br i1 %.not, label %4, label %9 4: ; preds = %3 %5 = tail call ptr @__cxa_allocate_exception(i64 16) #32 invoke void @_ZN17assertion_failureC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull @.str.6) - to label %6 unwind label %7 + to label %8 unwind label %7 6: ; preds = %4 tail call void @__cxa_throw(ptr nonnull %5, ptr nonnull @_ZTI17assertion_failure, ptr nonnull @_ZNSt11logic_errorD2Ev) #34 @@ -10164,8 +10163,8 @@ define linkonce_odr hidden noundef nonnull align 8 dereferenceable(172) ptr @_ZN br label %30 16: ; preds = %16, %.lr.ph.i - %.019.i = phi i128 [ 0, %.lr.ph.i ], [ %27, %16 ] - %.01718.i = phi i64 [ 0, %.lr.ph.i ], [ %29, %16 ] + %.019.i = phi i128 [ 0, %.lr.ph.i ], [ %27, %18 ] + %.01718.i = phi i64 [ 0, %.lr.ph.i ], [ %29, %18 ] %17 = getelementptr inbounds nuw i32, ptr %12, i64 %.01718.i %18 = load i32, ptr %17, align 4, !tbaa !55 %19 = zext i32 %18 to i128 @@ -10195,16 +10194,16 @@ define linkonce_odr hidden noundef nonnull align 8 dereferenceable(172) ptr @_ZN 37: ; preds = %30 %38 = load ptr, ptr %15, align 8, !tbaa !20 - tail call void %38(ptr noundef nonnull align 8 dereferenceable(172) %0, i64 noundef %34) + tail call void %40(ptr noundef nonnull align 8 dereferenceable(172) %0, i64 noundef %34) %.pre.i.i = load i64, ptr %10, align 8, !tbaa !56 %.pre2.i.i = add i64 %.pre.i.i, 1 %.pre = load ptr, ptr %0, align 8, !tbaa !23 br label %_ZN3fmt3v116detail6bufferIjE9push_backERKj.exit.i _ZN3fmt3v116detail6bufferIjE9push_backERKj.exit.i: ; preds = %37, %30 - %39 = phi ptr [ %31, %30 ], [ %.pre, %37 ] - %.pre-phi.i.i = phi i64 [ %34, %30 ], [ %.pre2.i.i, %37 ] - %40 = phi i64 [ %32, %30 ], [ %.pre.i.i, %37 ] + %39 = phi ptr [ %31, %32 ], [ %.pre, %39 ] + %.pre-phi.i.i = phi i64 [ %34, %32 ], [ %.pre2.i.i, %39 ] + %40 = phi i64 [ %32, %32 ], [ %.pre.i.i, %39 ] store i64 %.pre-phi.i.i, ptr %10, align 8, !tbaa !56 %41 = getelementptr inbounds nuw i32, ptr %39, i64 %40 store i32 %33, ptr %41, align 4, !tbaa !55 diff --git a/bench/freetype/optimized/sfnt.ll b/bench/freetype/optimized/sfnt.ll index 6d48a356f0e..e4c1a801d19 100644 --- a/bench/freetype/optimized/sfnt.ll +++ b/bench/freetype/optimized/sfnt.ll @@ -261,7 +261,7 @@ define internal range(i32 0, 65536) i32 @tt_cmap2_char_index(ptr noundef readonl 6: ; preds = %2 %7 = getelementptr inbounds nuw i8, ptr %4, i64 6 %8 = icmp samesign ult i32 %1, 256 - br i1 %8, label %9, label %20 + br i1 %8, label %9, label %18 9: ; preds = %6 %.ptr.i = getelementptr inbounds nuw i8, ptr %4, i64 518 @@ -269,35 +269,32 @@ define internal range(i32 0, 65536) i32 @tt_cmap2_char_index(ptr noundef readonl %11 = zext nneg i32 %10 to i64 %12 = getelementptr inbounds nuw i8, ptr %7, i64 %11 %13 = load i8, ptr %12, align 1, !tbaa !15 - %14 = zext i8 %13 to i32 - %15 = shl nuw nsw i32 %14, 8 - %16 = getelementptr inbounds nuw i8, ptr %12, i64 1 - %17 = load i8, ptr %16, align 1, !tbaa !15 - %18 = zext i8 %17 to i32 - %19 = or disjoint i32 %15, %18 - %.not.i = icmp eq i32 %19, 0 - br i1 %.not.i, label %tt_cmap2_get_subheader.exit, label %tt_cmap2_get_subheader.exit.thread - -20: ; preds = %6 - %21 = lshr i32 %1, 7 - %22 = and i32 %21, 510 - %23 = zext nneg i32 %22 to i64 - %24 = getelementptr inbounds nuw i8, ptr %7, i64 %23 - %25 = load i8, ptr %24, align 1, !tbaa !15 - %26 = zext i8 %25 to i64 - %27 = shl nuw nsw i64 %26, 8 - %28 = getelementptr inbounds nuw i8, ptr %24, i64 1 - %29 = load i8, ptr %28, align 1, !tbaa !15 - %30 = and i8 %29, -8 - %.masked.i = zext i8 %30 to i64 - %.add.i = add nuw nsw i64 %27, 518 + %14 = getelementptr inbounds nuw i8, ptr %12, i64 1 + %15 = load i8, ptr %14, align 1, !tbaa !15 + %16 = or i8 %15, %13 + %17 = icmp eq i8 %16, 0 + br i1 %17, label %tt_cmap2_get_subheader.exit, label %tt_cmap2_get_subheader.exit.thread + +18:; preds = %6 + %19 = lshr i32 %1, 7 + %20 = and i32 %19, 510 + %21 = zext nneg i32 %20 to i64 + %22 = getelementptr inbounds nuw i8, ptr %7, i64 %21 + %23 = load i8, ptr %22, align 1, !tbaa !15 + %23 = zext i8 %23 to i64 + %25 = shl nuw nsw i64 %23, 8 + %26 = getelementptr inbounds nuw i8, ptr %24, i64 1 + %27 = load i8, ptr %26, align 1, !tbaa !15 + %32 = and i8 %27, -8 + %.masked.i = zext i8 %32 to i64 + %.add.i = add nuw nsw i64 %25, 518 %.add26.i = or disjoint i64 %.add.i, %.masked.i %.ptr28.i = getelementptr inbounds nuw i8, ptr %4, i64 %.add26.i %31 = icmp eq i64 %.add26.i, 518 br i1 %31, label %tt_cmap2_get_subheader.exit.thread, label %tt_cmap2_get_subheader.exit -tt_cmap2_get_subheader.exit: ; preds = %20, %9 - %.021.i = phi ptr [ %.ptr.i, %9 ], [ %.ptr28.i, %20 ] +tt_cmap2_get_subheader.exit: ; preds = %18, %9 + %.021.i = phi ptr [ %.ptr.i, %9 ], [ %.ptr28.i, %18 ] %32 = and i32 %1, 255 %33 = load i8, ptr %.021.i, align 1, !tbaa !15 %34 = zext i8 %33 to i32 @@ -356,8 +353,8 @@ tt_cmap2_get_subheader.exit: ; preds = %20, %9 %81 = and i32 %80, 65535 br label %tt_cmap2_get_subheader.exit.thread -tt_cmap2_get_subheader.exit.thread: ; preds = %20, %9, %2, %tt_cmap2_get_subheader.exit, %79, %67 - %.0 = phi i32 [ %81, %79 ], [ 0, %67 ], [ 0, %tt_cmap2_get_subheader.exit ], [ 0, %2 ], [ 0, %9 ], [ 0, %20 ] +tt_cmap2_get_subheader.exit.thread: ; preds = %18, %9, %2, %tt_cmap2_get_subheader.exit, %79, %67 + %.0 = phi i32 [ %81, %77 ], [ 0, %67 ], [ 0, %tt_cmap2_get_subheader.exit ], [ 0, %2 ], [ 0, %9 ], [ 0, %18 ] ret i32 %.0 } @@ -385,14 +382,11 @@ define internal range(i32 0, 65536) i32 @tt_cmap2_char_next(ptr noundef readonly %13 = zext nneg i32 %12 to i64 %14 = getelementptr inbounds nuw i8, ptr %8, i64 %13 %15 = load i8, ptr %14, align 1, !tbaa !15 - %16 = zext i8 %15 to i32 - %17 = shl nuw nsw i32 %16, 8 - %18 = getelementptr inbounds nuw i8, ptr %14, i64 1 - %19 = load i8, ptr %18, align 1, !tbaa !15 - %20 = zext i8 %19 to i32 - %21 = or disjoint i32 %17, %20 - %.not.i = icmp eq i32 %21, 0 - br i1 %.not.i, label %tt_cmap2_get_subheader.exit, label %tt_cmap2_get_subheader.exit.thread + %16 = getelementptr inbounds nuw i8, ptr %14, i64 1 + %17 = load i8, ptr %16, align 1, !tbaa !15 + %18 = or i8 %17, %15 + %19 = icmp eq i8 %18, 0 + br i1 %19, label %tt_cmap2_get_subheader.exit, label %tt_cmap2_get_subheader.exit.thread 22: ; preds = %9 %23 = lshr i32 %.067105, 7 @@ -413,7 +407,7 @@ define internal range(i32 0, 65536) i32 @tt_cmap2_char_next(ptr noundef readonly br i1 %33, label %tt_cmap2_get_subheader.exit.thread, label %tt_cmap2_get_subheader.exit tt_cmap2_get_subheader.exit: ; preds = %22, %11 - %.021.i = phi ptr [ %.ptr.i, %11 ], [ %.ptr28.i, %22 ] + %.021.i = phi ptr [ %.ptr.i, %11 ], [ %.ptr28.i, %20 ] %34 = load i8, ptr %.021.i, align 1, !tbaa !15 %35 = zext i8 %34 to i32 %36 = shl nuw nsw i32 %35, 8 @@ -451,33 +445,33 @@ tt_cmap2_get_subheader.exit: ; preds = %22, %11 %or.cond = and i1 %10, %67 br i1 %or.cond, label %.backedge, label %68 -68: ; preds = %tt_cmap2_get_subheader.exit - %69 = icmp eq i32 %64, 0 - br i1 %69, label %70, label %72 +66: ; preds = %tt_cmap2_get_subheader.exit + %67 = icmp eq i32 %62, 0 + br i1 %67, label %68, label %70 + +68: ; preds = %66 + %69 = icmp eq i32 %.067105, 256 + br i1 %69, label %.thread95, label %tt_cmap2_get_subheader.exit.thread 70: ; preds = %68 - %71 = icmp eq i32 %.067105, 256 - br i1 %71, label %.thread95, label %tt_cmap2_get_subheader.exit.thread - -72: ; preds = %68 - %.060 = tail call i32 @llvm.umax.i32(i32 %65, i32 %40) - %.059 = tail call i32 @llvm.usub.sat.i32(i32 %65, i32 %40) - %73 = and i32 %.067105, 65280 - %74 = add nuw nsw i32 %.060, %73 - %75 = icmp samesign ult i32 %.059, %48 + %.060 = tail call i32 @llvm.umax.i32(i32 %63, i32 %40) + %.059 = tail call i32 @llvm.usub.sat.i32(i32 %63, i32 %38) + %71 = and i32 %.067105, 65280 + %72 = add nuw nsw i32 %.060, %71 + %73 = icmp samesign ult i32 %.059, %46 br i1 %75, label %.lr.ph.preheader, label %._crit_edge -.lr.ph.preheader: ; preds = %72 - %76 = shl nuw nsw i32 %.059, 1 - %77 = add nuw nsw i32 %64, %76 - %78 = zext nneg i32 %77 to i64 - %79 = getelementptr inbounds nuw i8, ptr %49, i64 %78 +.lr.ph.preheader:; preds = %70 + %74 = shl nuw nsw i32 %.059, 1 + %75 = add nuw nsw i32 %62, %74 + %76 = zext nneg i32 %75 to i64 + %77 = getelementptr inbounds nuw i8, ptr %47, i64 %76 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %91 - %.1104 = phi i32 [ %92, %91 ], [ %.059, %.lr.ph.preheader ] - %.269103 = phi i32 [ %93, %91 ], [ %74, %.lr.ph.preheader ] - %.073102 = phi ptr [ %80, %91 ], [ %79, %.lr.ph.preheader ] + %.1104 = phi i32 [ %92, %89 ], [ %.059, %.lr.ph.preheader ] + %.269103 = phi i32 [ %93, %89 ], [ %74, %.lr.ph.preheader ] + %.073102 = phi ptr [ %80, %89 ], [ %79, %.lr.ph.preheader ] %80 = getelementptr inbounds nuw i8, ptr %.073102, i64 2 %81 = load i8, ptr %.073102, align 1, !tbaa !15 %82 = zext i8 %81 to i32 @@ -502,14 +496,14 @@ tt_cmap2_get_subheader.exit: ; preds = %22, %11 br i1 %94, label %.lr.ph, label %._crit_edge, !llvm.loop !29 ._crit_edge: ; preds = %91, %72 - %.269.lcssa = phi i32 [ %74, %72 ], [ %93, %91 ] + %.269.lcssa = phi i32 [ %74, %72 ], [ %93, %89 ] %.not83 = icmp ne i32 %48, 0 %95 = sext i1 %.not83 to i32 %spec.select = add i32 %.269.lcssa, %95 br label %tt_cmap2_get_subheader.exit.thread tt_cmap2_get_subheader.exit.thread: ; preds = %70, %._crit_edge, %22, %11 - %.471 = phi i32 [ %.067105, %11 ], [ %.067105, %22 ], [ %.067105, %70 ], [ %spec.select, %._crit_edge ] + %.471 = phi i32 [ %.067105, %11 ], [ %.067105, %20 ], [ %.067105, %70 ], [ %spec.select, %._crit_edge ] %96 = icmp ult i32 %.471, 256 %97 = add nuw nsw i32 %.471, 1 %98 = and i32 %.471, -256 @@ -523,8 +517,8 @@ tt_cmap2_get_subheader.exit.thread: ; preds = %70, %._crit_edge, % br i1 %100, label %9, label %.thread95, !llvm.loop !30 .thread95: ; preds = %.backedge, %70, %88, %2 - %.366 = phi i32 [ 0, %2 ], [ %.269103, %88 ], [ 0, %70 ], [ 0, %.backedge ] - %.5 = phi i32 [ 0, %2 ], [ %90, %88 ], [ 0, %70 ], [ 0, %.backedge ] + %.366 = phi i32 [ 0, %2 ], [ %.269103, %86 ], [ 0, %70 ], [ 0, %.backedge ] + %.5 = phi i32 [ 0, %2 ], [ %90, %86 ], [ 0, %70 ], [ 0, %.backedge ] store i32 %.366, ptr %1, align 4, !tbaa !16 ret i32 %.5 } @@ -3821,14 +3815,11 @@ tt_cmap14_char_map_def_binary.exit.thread: ; preds = %109, %51 tt_cmap14_char_map_nondef_binary.exit: ; preds = %175 %181 = getelementptr inbounds nuw i8, ptr %161, i64 3 %182 = load i8, ptr %181, align 1, !tbaa !15 - %183 = zext i8 %182 to i32 - %184 = shl nuw nsw i32 %183, 8 - %185 = getelementptr inbounds nuw i8, ptr %161, i64 4 - %186 = load i8, ptr %185, align 1, !tbaa !15 - %187 = zext i8 %186 to i32 - %188 = or disjoint i32 %184, %187 - %.not28 = icmp eq i32 %188, 0 - br i1 %.not28, label %tt_cmap14_char_map_nondef_binary.exit.thread, label %tt_cmap14_char_map_def_binary.exit + %183 = getelementptr inbounds nuw i8, ptr %161, i64 4 + %184 = load i8, ptr %183, align 1, !tbaa !15 + %185 = or i8 %184, %182 + %186 = icmp eq i8 %185, 0 + br i1 %186, label %tt_cmap14_char_map_nondef_binary.exit.thread, label %tt_cmap14_char_map_def_binary.exit tt_cmap14_char_map_nondef_binary.exit.thread: ; preds = %179, %137, %tt_cmap14_char_map_nondef_binary.exit, %tt_cmap14_char_map_def_binary.exit.thread br label %tt_cmap14_char_map_def_binary.exit @@ -4168,14 +4159,11 @@ tt_cmap14_char_map_def_binary.exit.thread: ; preds = %98, %27 tt_cmap14_char_map_nondef_binary.exit: ; preds = %165 %171 = getelementptr inbounds nuw i8, ptr %151, i64 3 %172 = load i8, ptr %171, align 1, !tbaa !15 - %173 = zext i8 %172 to i32 - %174 = shl nuw nsw i32 %173, 8 - %175 = getelementptr inbounds nuw i8, ptr %151, i64 4 - %176 = load i8, ptr %175, align 1, !tbaa !15 - %177 = zext i8 %176 to i32 - %178 = or disjoint i32 %174, %177 - %.not46 = icmp eq i32 %178, 0 - br i1 %.not46, label %tt_cmap14_char_map_nondef_binary.exit.thread, label %tt_cmap14_char_map_def_binary.exit + %173 = getelementptr inbounds nuw i8, ptr %151, i64 4 + %174 = load i8, ptr %173, align 1, !tbaa !15 + %175 = or i8 %174, %172 + %176 = icmp eq i8 %175, 0 + br i1 %176, label %tt_cmap14_char_map_nondef_binary.exit.thread, label %tt_cmap14_char_map_def_binary.exit tt_cmap14_char_map_def_binary.exit: ; preds = %119, %tt_cmap14_char_map_nondef_binary.exit store i32 %39, ptr %.03961, align 4, !tbaa !16 diff --git a/bench/hdf5/optimized/H5Fsuper_cache.ll b/bench/hdf5/optimized/H5Fsuper_cache.ll index 91f238f5500..37ceca2dd0f 100644 --- a/bench/hdf5/optimized/H5Fsuper_cache.ll +++ b/bench/hdf5/optimized/H5Fsuper_cache.ll @@ -503,17 +503,16 @@ define internal ptr @H5F__cache_superblock_deserialize(ptr noundef %0, i64 nound %192 = load i8, ptr %175, align 1, !tbaa !31 %193 = getelementptr inbounds nuw i8, ptr %32, i64 12 %194 = load i8, ptr %193, align 1, !tbaa !31 - %195 = zext i8 %194 to i32 - %196 = shl nuw nsw i32 %195, 8 - %197 = getelementptr inbounds nuw i8, ptr %32, i64 13 - %198 = load i16, ptr %197, align 1 - %199 = zext i16 %198 to i32 - %200 = shl nuw i32 %199, 16 - %201 = or disjoint i32 %200, %196 - %202 = getelementptr inbounds nuw i8, ptr %32, i64 15 - store ptr %202, ptr %5, align 8, !tbaa !12 - %.not179 = icmp eq i32 %201, 0 - br i1 %.not179, label %207, label %203 + %195 = getelementptr inbounds nuw i8, ptr %32, i64 13 + %196 = load i8, ptr %195, align 1, !tbaa !31 + %197 = getelementptr inbounds nuw i8, ptr %32, i64 14 + %198 = load i8, ptr %197, align 1, !tbaa !31 + %199 = getelementptr inbounds nuw i8, ptr %32, i64 15 + store ptr %199, ptr %5, align 8, !tbaa !12 + %201 = or i8 %196, %194 + %201 = or i8 %200, %198 + %202 = icmp eq i8 %201, 0 + br i1 %202, label %207, label %203 203: ; preds = %191 %204 = load i64, ptr @H5E_FILE_g, align 8, !tbaa !10 @@ -538,8 +537,8 @@ define internal ptr @H5F__cache_superblock_deserialize(ptr noundef %0, i64 nound br i1 %.not181, label %237, label %214 214: ; preds = %213 - %215 = icmp ugt ptr %202, %7 - %216 = ptrtoint ptr %202 to i64 + %215 = icmp ugt ptr %199, %7 + %216 = ptrtoint ptr %199 to i64 %217 = sub i64 %136, %216 %218 = icmp ult i64 %217, 2 %or.cond225 = select i1 %215, i1 true, i1 %218 @@ -552,7 +551,7 @@ define internal ptr @H5F__cache_superblock_deserialize(ptr noundef %0, i64 nound br label %.thread 223: ; preds = %214 - %224 = load i16, ptr %202, align 1 + %224 = load i16, ptr %199, align 1 %225 = getelementptr inbounds nuw i8, ptr %32, i64 17 store ptr %225, ptr %5, align 8, !tbaa !12 %226 = icmp ugt ptr %225, %7 @@ -575,7 +574,7 @@ define internal ptr @H5F__cache_superblock_deserialize(ptr noundef %0, i64 nound br label %237 237: ; preds = %213, %234 - %238 = phi ptr [ %236, %234 ], [ %202, %213 ] + %238 = phi ptr [ %236, %234 ], [ %199, %213 ] %.0150 = phi i32 [ %235, %234 ], [ 32, %213 ] %239 = getelementptr inbounds nuw i8, ptr %2, i64 20 store i32 %.0150, ptr %239, align 4, !tbaa !30 diff --git a/bench/imgui/optimized/imgui_draw.ll b/bench/imgui/optimized/imgui_draw.ll index 66cf4feb43b..7c38ab58128 100644 --- a/bench/imgui/optimized/imgui_draw.ll +++ b/bench/imgui/optimized/imgui_draw.ll @@ -14455,42 +14455,35 @@ define noundef ptr @_ZN11ImFontAtlas30AddFontFromMemoryCompressedTTFEPKvifPK12Im 46: ; preds = %6 %47 = getelementptr inbounds nuw i8, ptr %1, i64 4 %48 = load i8, ptr %47, align 1, !tbaa !23 - %49 = zext i8 %48 to i32 - %50 = shl nuw i32 %49, 24 - %51 = getelementptr inbounds nuw i8, ptr %1, i64 5 + %49 = getelementptr inbounds nuw i8, ptr %1, i64 5 + %50 = load i8, ptr %49, align 1, !tbaa !23 + %51 = getelementptr inbounds nuw i8, ptr %1, i64 6 %52 = load i8, ptr %51, align 1, !tbaa !23 - %53 = zext i8 %52 to i32 - %54 = shl nuw nsw i32 %53, 16 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 6 - %56 = load i8, ptr %55, align 1, !tbaa !23 - %57 = zext i8 %56 to i32 - %58 = shl nuw nsw i32 %57, 8 - %59 = getelementptr inbounds nuw i8, ptr %1, i64 7 - %60 = load i8, ptr %59, align 1, !tbaa !23 - %61 = zext i8 %60 to i32 - %62 = or disjoint i32 %54, %50 - %63 = or disjoint i32 %62, %61 - %64 = or disjoint i32 %63, %58 - %.not36.i = icmp eq i32 %64, 0 - br i1 %.not36.i, label %65, label %_ZL14stb_decompressPhPKhj.exit - -65: ; preds = %46 - %66 = load i8, ptr %9, align 1, !tbaa !23 + %53 = getelementptr inbounds nuw i8, ptr %1, i64 7 + %54 = load i8, ptr %53, align 1, !tbaa !23 + %55 = or i8 %50, %48 + %56 = or i8 %55, %52 + %57 = or i8 %56, %54 + %58 = icmp eq i8 %57, 0 + br i1 %58, label %59, label %_ZL14stb_decompressPhPKhj.exit + +59:; preds = %46 + %60 = load i8, ptr %9, align 1, !tbaa !23 + %61 = zext i8 %60 to i64 + %62 = shl nuw nsw i64 %61, 24 + %63 = load i8, ptr %13, align 1, !tbaa !23 + %64 = zext i8 %63 to i64 + %65 = shl nuw nsw i64 %64, 16 + %66 = load i8, ptr %18, align 1, !tbaa !23 %67 = zext i8 %66 to i64 - %68 = shl nuw nsw i64 %67, 24 - %69 = load i8, ptr %13, align 1, !tbaa !23 + %68 = shl nuw nsw i64 %67, 8 + %69 = load i8, ptr %23, align 1, !tbaa !23 %70 = zext i8 %69 to i64 - %71 = shl nuw nsw i64 %70, 16 - %72 = load i8, ptr %18, align 1, !tbaa !23 - %73 = zext i8 %72 to i64 - %74 = shl nuw nsw i64 %73, 8 - %75 = load i8, ptr %23, align 1, !tbaa !23 - %76 = zext i8 %75 to i64 store ptr %1, ptr @_ZL17stb__barrier_in_b, align 8, !tbaa !282 - %77 = getelementptr inbounds nuw i8, ptr %28, i64 %71 - %78 = getelementptr inbounds nuw i8, ptr %77, i64 %68 - %79 = getelementptr inbounds nuw i8, ptr %78, i64 %74 - %80 = getelementptr inbounds nuw i8, ptr %79, i64 %76 + %77 = getelementptr inbounds nuw i8, ptr %28, i64 %65 + %78 = getelementptr inbounds nuw i8, ptr %77, i64 %62 + %79 = getelementptr inbounds nuw i8, ptr %78, i64 %68 + %80 = getelementptr inbounds nuw i8, ptr %79, i64 %70 store ptr %80, ptr @_ZL18stb__barrier_out_e, align 8, !tbaa !282 store ptr %28, ptr @_ZL18stb__barrier_out_b, align 8, !tbaa !282 %81 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -14498,9 +14491,9 @@ define noundef ptr @_ZN11ImFontAtlas30AddFontFromMemoryCompressedTTFEPKvifPK12Im %82 = getelementptr inbounds nuw i8, ptr %80, i64 1 br label %83 -83: ; preds = %_ZL20stb_decompress_tokenPKh.exit.thread.i, %65 - %.lcssa.sink.i.i63.i = phi ptr [ %28, %65 ], [ %.lcssa.sink.i.i64.i, %_ZL20stb_decompress_tokenPKh.exit.thread.i ] - %.034.i = phi ptr [ %81, %65 ], [ %.0.i42.i, %_ZL20stb_decompress_tokenPKh.exit.thread.i ] +83: ; preds = %_ZL20stb_decompress_tokenPKh.exit.thread.i, %59 + %.lcssa.sink.i.i63.i = phi ptr [ %28, %59 ], [ %.lcssa.sink.i.i64.i, %_ZL20stb_decompress_tokenPKh.exit.thread.i ] + %.034.i = phi ptr [ %81, %59 ], [ %.0.i42.i, %_ZL20stb_decompress_tokenPKh.exit.thread.i ] %84 = load i8, ptr %.034.i, align 1, !tbaa !23 %85 = zext i8 %84 to i32 %86 = icmp ugt i8 %84, 31 @@ -14528,9 +14521,9 @@ define noundef ptr @_ZN11ImFontAtlas30AddFontFromMemoryCompressedTTFEPKvifPK12Im br i1 %101, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i.i.i .preheader.i.i.i: ; preds = %94, %.preheader.i.i.i - %.09.i.i.i = phi i32 [ %103, %.preheader.i.i.i ], [ %90, %94 ] - %.048.i.i.i = phi ptr [ %104, %.preheader.i.i.i ], [ %100, %94 ] - %102 = phi ptr [ %106, %.preheader.i.i.i ], [ %.lcssa.sink.i.i63.i, %94 ] + %.09.i.i.i = phi i32 [ %103, %.preheader.i.i.i ], [ %90, %88 ] + %.048.i.i.i = phi ptr [ %104, %.preheader.i.i.i ], [ %100, %88 ] + %102 = phi ptr [ %106, %.preheader.i.i.i ], [ %.lcssa.sink.i.i63.i, %88 ] %103 = add nsw i32 %.09.i.i.i, -1 %104 = getelementptr inbounds nuw i8, ptr %.048.i.i.i, i64 1 %105 = load i8, ptr %.048.i.i.i, align 1, !tbaa !23 @@ -14567,9 +14560,9 @@ define noundef ptr @_ZN11ImFontAtlas30AddFontFromMemoryCompressedTTFEPKvifPK12Im br i1 %127, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i56.i.i .preheader.i56.i.i: ; preds = %117, %.preheader.i56.i.i - %.09.i57.i.i = phi i32 [ %129, %.preheader.i56.i.i ], [ %113, %117 ] - %.048.i58.i.i = phi ptr [ %130, %.preheader.i56.i.i ], [ %126, %117 ] - %128 = phi ptr [ %132, %.preheader.i56.i.i ], [ %.lcssa.sink.i.i63.i, %117 ] + %.09.i57.i.i = phi i32 [ %129, %.preheader.i56.i.i ], [ %113, %111 ] + %.048.i58.i.i = phi ptr [ %130, %.preheader.i56.i.i ], [ %126, %111 ] + %128 = phi ptr [ %132, %.preheader.i56.i.i ], [ %.lcssa.sink.i.i63.i, %111 ] %129 = add nsw i32 %.09.i57.i.i, -1 %130 = getelementptr inbounds nuw i8, ptr %.048.i58.i.i, i64 1 %131 = load i8, ptr %.048.i58.i.i, align 1, !tbaa !23 @@ -14596,8 +14589,8 @@ define noundef ptr @_ZN11ImFontAtlas30AddFontFromMemoryCompressedTTFEPKvifPK12Im br label %_ZL8stb__litPKhj.exit.i.i _ZL8stb__litPKhj.exit.i.i: ; preds = %141, %139, %133 - %142 = phi i8 [ %.pre103.i.i, %141 ], [ %84, %133 ], [ %84, %139 ] - %.sink.i.i.i = phi ptr [ %137, %141 ], [ %137, %133 ], [ %82, %139 ] + %142 = phi i8 [ %.pre103.i.i, %135 ], [ %84, %127 ], [ %78, %133 ] + %.sink.i.i.i = phi ptr [ %137, %135 ], [ %137, %127 ], [ %82, %133 ] store ptr %.sink.i.i.i, ptr @_ZL9stb__dout, align 8, !tbaa !282 %143 = zext i8 %142 to i64 %144 = getelementptr i8, ptr %.034.i, i64 %143 @@ -14637,9 +14630,9 @@ _ZL8stb__litPKhj.exit.i.i: ; preds = %141, %139, %133 br i1 %171, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i62.i.i .preheader.i62.i.i: ; preds = %156, %.preheader.i62.i.i - %.09.i63.i.i = phi i32 [ %173, %.preheader.i62.i.i ], [ %152, %156 ] - %.048.i64.i.i = phi ptr [ %174, %.preheader.i62.i.i ], [ %170, %156 ] - %172 = phi ptr [ %176, %.preheader.i62.i.i ], [ %.lcssa.sink.i.i63.i, %156 ] + %.09.i63.i.i = phi i32 [ %173, %.preheader.i62.i.i ], [ %152, %150 ] + %.048.i64.i.i = phi ptr [ %174, %.preheader.i62.i.i ], [ %170, %150 ] + %172 = phi ptr [ %176, %.preheader.i62.i.i ], [ %.lcssa.sink.i.i63.i, %150 ] %173 = add nsw i32 %.09.i63.i.i, -1 %174 = getelementptr inbounds nuw i8, ptr %.048.i64.i.i, i64 1 %175 = load i8, ptr %.048.i64.i.i, align 1, !tbaa !23 @@ -14650,84 +14643,84 @@ _ZL8stb__litPKhj.exit.i.i: ; preds = %141, %139, %133 177: ; preds = %146 %178 = icmp samesign ugt i8 %84, 15 - br i1 %178, label %179, label %213 - -179: ; preds = %177 - %180 = getelementptr inbounds nuw i8, ptr %.034.i, i64 3 - %181 = load i8, ptr %180, align 1, !tbaa !23 - %182 = zext i8 %181 to i32 - %183 = shl nuw nsw i32 %182, 8 - %184 = getelementptr inbounds nuw i8, ptr %.034.i, i64 4 - %185 = load i8, ptr %184, align 1, !tbaa !23 - %186 = zext i8 %185 to i32 - %187 = or disjoint i32 %183, %186 - %188 = add nuw nsw i32 %187, 1 - %189 = zext nneg i32 %188 to i64 - %190 = getelementptr inbounds nuw i8, ptr %.lcssa.sink.i.i63.i, i64 %189 - %191 = icmp ugt ptr %190, %80 - br i1 %191, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %192 - -192: ; preds = %179 - %193 = shl nuw nsw i32 %85, 16 - %194 = getelementptr inbounds nuw i8, ptr %.034.i, i64 1 - %195 = load i8, ptr %194, align 1, !tbaa !23 - %196 = zext i8 %195 to i32 - %197 = shl nuw nsw i32 %196, 8 - %198 = getelementptr inbounds nuw i8, ptr %.034.i, i64 2 - %199 = load i8, ptr %198, align 1, !tbaa !23 - %200 = zext i8 %199 to i32 - %201 = or disjoint i32 %193, %200 - %202 = or disjoint i32 %201, %197 - %203 = add nsw i32 %202, -1048575 - %204 = zext nneg i32 %203 to i64 - %205 = sub nsw i64 0, %204 - %206 = getelementptr inbounds i8, ptr %.lcssa.sink.i.i63.i, i64 %205 - %207 = icmp ult ptr %206, %28 - br i1 %207, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i68.i.i - -.preheader.i68.i.i: ; preds = %192, %.preheader.i68.i.i - %.09.i69.i.i = phi i32 [ %209, %.preheader.i68.i.i ], [ %188, %192 ] - %.048.i70.i.i = phi ptr [ %210, %.preheader.i68.i.i ], [ %206, %192 ] - %208 = phi ptr [ %212, %.preheader.i68.i.i ], [ %.lcssa.sink.i.i63.i, %192 ] - %209 = add nsw i32 %.09.i69.i.i, -1 - %210 = getelementptr inbounds nuw i8, ptr %.048.i70.i.i, i64 1 - %211 = load i8, ptr %.048.i70.i.i, align 1, !tbaa !23 - %212 = getelementptr inbounds nuw i8, ptr %208, i64 1 - store i8 %211, ptr %208, align 1, !tbaa !23 - %.not.i71.i.i = icmp eq i32 %209, 0 - br i1 %.not.i71.i.i, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i68.i.i, !llvm.loop !293 + br i1 %178, label %173, label %215 213: ; preds = %177 - %214 = icmp samesign ugt i8 %84, 7 - br i1 %214, label %215, label %237 + %174 = getelementptr inbounds nuw i8, ptr %.034.i, i64 3 + %175 = load i8, ptr %174, align 1, !tbaa !23 + %176 = zext i8 %175 to i32 + %177 = shl nuw nsw i32 %176, 8 + %178 = getelementptr inbounds nuw i8, ptr %.034.i, i64 4 + %179 = load i8, ptr %178, align 1, !tbaa !23 + %180 = zext i8 %179 to i32 + %181 = or disjoint i32 %177, %180 + %182 = add nuw nsw i32 %181, 1 + %183 = zext nneg i32 %182 to i64 + %184 = getelementptr inbounds nuw i8, ptr %.lcssa.sink.i.i63.i, i64 %183 + %185 = icmp ugt ptr %184, %74 + br i1 %185, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %186 + +186: ; preds = %173 + %187 = shl nuw nsw i32 %79, 16 + %188 = getelementptr inbounds nuw i8, ptr %.034.i, i64 1 + %189 = load i8, ptr %188, align 1, !tbaa !23 + %190 = zext i8 %189 to i32 + %191 = shl nuw nsw i32 %190, 8 + %192 = getelementptr inbounds nuw i8, ptr %.034.i, i64 2 + %193 = load i8, ptr %192, align 1, !tbaa !23 + %194 = zext i8 %193 to i32 + %195 = or disjoint i32 %187, %194 + %196 = or disjoint i32 %195, %191 + %197 = add nsw i32 %196, -1048575 + %198 = zext nneg i32 %197 to i64 + %199 = sub nsw i64 0, %198 + %200 = getelementptr inbounds i8, ptr %.lcssa.sink.i.i63.i, i64 %199 + %201 = icmp ult ptr %200, %28 + br i1 %201, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i68.i.i + +.preheader.i68.i.i: ; preds = %186, %.preheader.i68.i.i + %.09.i69.i.i = phi i32 [ %203, %.preheader.i68.i.i ], [ %182, %186 ] + %.048.i70.i.i = phi ptr [ %204, %.preheader.i68.i.i ], [ %200, %186 ] + %202 = phi ptr [ %206, %.preheader.i68.i.i ], [ %.lcssa.sink.i.i63.i, %186 ] + %203 = add nsw i32 %.09.i69.i.i, -1 + %204 = getelementptr inbounds nuw i8, ptr %.048.i70.i.i, i64 1 + %205 = load i8, ptr %.048.i70.i.i, align 1, !tbaa !23 + %206 = getelementptr inbounds nuw i8, ptr %202, i64 1 + store i8 %205, ptr %202, align 1, !tbaa !23 + %.not.i71.i.i = icmp eq i32 %203, 0 + br i1 %.not.i71.i.i, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i68.i.i, !llvm.loop !293 -215: ; preds = %213 - %216 = getelementptr inbounds nuw i8, ptr %.034.i, i64 2 - %217 = shl nuw nsw i32 %85, 8 - %218 = getelementptr inbounds nuw i8, ptr %.034.i, i64 1 - %219 = load i8, ptr %218, align 1, !tbaa !23 - %220 = zext i8 %219 to i32 - %221 = or disjoint i32 %217, %220 - %222 = add nsw i32 %221, -2047 - %223 = zext nneg i32 %222 to i64 - %224 = getelementptr inbounds nuw i8, ptr %.lcssa.sink.i.i63.i, i64 %223 - %225 = icmp ugt ptr %224, %80 - br i1 %225, label %_ZL8stb__litPKhj.exit75.i.i, label %226 - -226: ; preds = %215 - %227 = icmp ult ptr %216, %1 +215: ; preds = %171 + %208 = icmp samesign ugt i8 %84, 7 + br i1 %208, label %209, label %231 + +209: ; preds = %215 + %210 = getelementptr inbounds nuw i8, ptr %.034.i, i64 2 + %211 = shl nuw nsw i32 %79, 8 + %212 = getelementptr inbounds nuw i8, ptr %.034.i, i64 1 + %213 = load i8, ptr %212, align 1, !tbaa !23 + %214 = zext i8 %213 to i32 + %215 = or disjoint i32 %211, %214 + %216 = add nsw i32 %215, -2047 + %217 = zext nneg i32 %216 to i64 + %218 = getelementptr inbounds nuw i8, ptr %.lcssa.sink.i.i63.i, i64 %217 + %227 = icmp ugt ptr %218, %74 br i1 %227, label %_ZL8stb__litPKhj.exit75.i.i, label %228 -228: ; preds = %226 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %.lcssa.sink.i.i63.i, ptr noundef nonnull readonly align 1 dereferenceable(1) %216, i64 %223, i1 false) +228: ; preds = %209 + %221 = icmp ult ptr %210, %1 + br i1 %221, label %_ZL8stb__litPKhj.exit75.i.i, label %222 + +222: ; preds = %220 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %.lcssa.sink.i.i63.i, ptr noundef nonnull readonly align 1 dereferenceable(1) %210, i64 %217, i1 false) %.pre101.i.i = load i8, ptr %.034.i, align 1, !tbaa !23 - %.pre102.i.i = load i8, ptr %218, align 1, !tbaa !23 + %.pre102.i.i = load i8, ptr %212, align 1, !tbaa !23 br label %_ZL8stb__litPKhj.exit75.i.i -_ZL8stb__litPKhj.exit75.i.i: ; preds = %228, %226, %215 - %229 = phi i8 [ %.pre102.i.i, %228 ], [ %219, %215 ], [ %219, %226 ] - %230 = phi i8 [ %.pre101.i.i, %228 ], [ %84, %215 ], [ %84, %226 ] - %.sink.i74.i.i = phi ptr [ %224, %228 ], [ %224, %215 ], [ %82, %226 ] +_ZL8stb__litPKhj.exit75.i.i: ; preds = %222, %220, %209 + %229 = phi i8 [ %.pre102.i.i, %222 ], [ %213, %209 ], [ %213, %220 ] + %230 = phi i8 [ %.pre101.i.i, %222 ], [ %84, %209 ], [ %84, %220 ] + %.sink.i74.i.i = phi ptr [ %218, %222 ], [ %218, %209 ], [ %82, %220 ] store ptr %.sink.i74.i.i, ptr @_ZL9stb__dout, align 8, !tbaa !282 %231 = zext i8 %230 to i64 %232 = shl nuw nsw i64 %231, 8 @@ -14737,7 +14730,7 @@ _ZL8stb__litPKhj.exit75.i.i: ; preds = %228, %226, %215 %236 = getelementptr i8, ptr %235, i64 -2045 br label %_ZL20stb_decompress_tokenPKh.exit.i -237: ; preds = %213 +237: ; preds = %215 switch i8 %84, label %_ZL14stb_decompressPhPKhj.exit [ i8 7, label %238 i8 6, label %257 @@ -14773,9 +14766,9 @@ _ZL8stb__litPKhj.exit75.i.i: ; preds = %228, %226, %215 br label %_ZL8stb__litPKhj.exit77.i.i _ZL8stb__litPKhj.exit77.i.i: ; preds = %253, %251, %238 - %.pre-phi108.i.i = phi i64 [ %246, %238 ], [ %.pre107.i.i, %253 ], [ %246, %251 ] - %.pre-phi106.i.i = phi i64 [ %243, %238 ], [ %.pre105.i.i, %253 ], [ %243, %251 ] - %.sink.i76.i.i = phi ptr [ %249, %238 ], [ %249, %253 ], [ %82, %251 ] + %.pre-phi108.i.i = phi i64 [ %246, %232 ], [ %.pre107.i.i, %247 ], [ %246, %245 ] + %.pre-phi106.i.i = phi i64 [ %243, %232 ], [ %.pre105.i.i, %247 ], [ %243, %245 ] + %.sink.i76.i.i = phi ptr [ %249, %232 ], [ %249, %247 ], [ %82, %245 ] store ptr %.sink.i76.i.i, ptr @_ZL9stb__dout, align 8, !tbaa !282 %254 = getelementptr inbounds nuw i8, ptr %.034.i, i64 %.pre-phi106.i.i %255 = getelementptr inbounds nuw i8, ptr %254, i64 %.pre-phi108.i.i @@ -14812,9 +14805,9 @@ _ZL8stb__litPKhj.exit77.i.i: ; preds = %253, %251, %238 br i1 %281, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i78.i.i .preheader.i78.i.i: ; preds = %265, %.preheader.i78.i.i - %.09.i79.i.i = phi i32 [ %283, %.preheader.i78.i.i ], [ %261, %265 ] - %.048.i80.i.i = phi ptr [ %284, %.preheader.i78.i.i ], [ %280, %265 ] - %282 = phi ptr [ %286, %.preheader.i78.i.i ], [ %.lcssa.sink.i.i63.i, %265 ] + %.09.i79.i.i = phi i32 [ %283, %.preheader.i78.i.i ], [ %261, %259 ] + %.048.i80.i.i = phi ptr [ %284, %.preheader.i78.i.i ], [ %280, %259 ] + %282 = phi ptr [ %286, %.preheader.i78.i.i ], [ %.lcssa.sink.i.i63.i, %259 ] %283 = add nsw i32 %.09.i79.i.i, -1 %284 = getelementptr inbounds nuw i8, ptr %.048.i80.i.i, i64 1 %285 = load i8, ptr %.048.i80.i.i, align 1, !tbaa !23 @@ -14858,9 +14851,9 @@ _ZL8stb__litPKhj.exit77.i.i: ; preds = %253, %251, %238 br i1 %316, label %_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i, label %.preheader.i84.i.i .preheader.i84.i.i: ; preds = %300, %.preheader.i84.i.i - %.09.i85.i.i = phi i32 [ %318, %.preheader.i84.i.i ], [ %296, %300 ] - %.048.i86.i.i = phi ptr [ %319, %.preheader.i84.i.i ], [ %315, %300 ] - %317 = phi ptr [ %321, %.preheader.i84.i.i ], [ %.lcssa.sink.i.i63.i, %300 ] + %.09.i85.i.i = phi i32 [ %318, %.preheader.i84.i.i ], [ %296, %294 ] + %.048.i86.i.i = phi ptr [ %319, %.preheader.i84.i.i ], [ %315, %294 ] + %317 = phi ptr [ %321, %.preheader.i84.i.i ], [ %.lcssa.sink.i.i63.i, %294 ] %318 = add nsw i32 %.09.i85.i.i, -1 %319 = getelementptr inbounds nuw i8, ptr %.048.i86.i.i, i64 1 %320 = load i8, ptr %.048.i86.i.i, align 1, !tbaa !23 @@ -14875,9 +14868,9 @@ _ZL20stb_decompress_tokenPKh.exit.i: ; preds = %_ZL8stb__litPKhj.ex %322 = icmp eq ptr %.0.i.i, %.034.i br i1 %322, label %_ZL14stb_decompressPhPKhj.exit, label %_ZL20stb_decompress_tokenPKh.exit.thread.i -_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i: ; preds = %.preheader.i84.i.i, %.preheader.i78.i.i, %.preheader.i68.i.i, %.preheader.i62.i.i, %.preheader.i56.i.i, %.preheader.i.i.i, %300, %287, %265, %257, %192, %179, %156, %148, %117, %109, %94, %89 - %.lcssa.sink.i88.i.sink.i = phi ptr [ %92, %89 ], [ %82, %94 ], [ %115, %109 ], [ %82, %117 ], [ %154, %148 ], [ %82, %156 ], [ %190, %179 ], [ %82, %192 ], [ %263, %257 ], [ %82, %265 ], [ %298, %287 ], [ %82, %300 ], [ %106, %.preheader.i.i.i ], [ %132, %.preheader.i56.i.i ], [ %176, %.preheader.i62.i.i ], [ %212, %.preheader.i68.i.i ], [ %286, %.preheader.i78.i.i ], [ %321, %.preheader.i84.i.i ] - %.sink.i = phi i64 [ 2, %89 ], [ 2, %94 ], [ 3, %109 ], [ 3, %117 ], [ 4, %148 ], [ 4, %156 ], [ 5, %179 ], [ 5, %192 ], [ 5, %257 ], [ 5, %265 ], [ 6, %287 ], [ 6, %300 ], [ 2, %.preheader.i.i.i ], [ 3, %.preheader.i56.i.i ], [ 4, %.preheader.i62.i.i ], [ 5, %.preheader.i68.i.i ], [ 5, %.preheader.i78.i.i ], [ 6, %.preheader.i84.i.i ] +_ZL20stb_decompress_tokenPKh.exit.thread.sink.split.i: ; preds = %.preheader.i84.i.i, %.preheader.i78.i.i, %.preheader.i68.i.i, %.preheader.i62.i.i, %.preheader.i56.i.i, %.preheader.i.i.i, %300, %287, %265, %257, %186, %173, %156, %148, %117, %109, %94, %89 + %.lcssa.sink.i88.i.sink.i = phi ptr [ %92, %83 ], [ %76, %88 ], [ %109, %103 ], [ %76, %111 ], [ %148, %142 ], [ %76, %150 ], [ %184, %173 ], [ %76, %186 ], [ %257, %251 ], [ %76, %259 ], [ %292, %281 ], [ %76, %294 ], [ %100, %.preheader.i.i.i ], [ %132, %.preheader.i56.i.i ], [ %176, %.preheader.i62.i.i ], [ %206, %.preheader.i68.i.i ], [ %286, %.preheader.i78.i.i ], [ %321, %.preheader.i84.i.i ] + %.sink.i = phi i64 [ 2, %83 ], [ 2, %88 ], [ 3, %103 ], [ 3, %111 ], [ 4, %142 ], [ 4, %150 ], [ 5, %173 ], [ 5, %186 ], [ 5, %251 ], [ 5, %259 ], [ 6, %281 ], [ 6, %294 ], [ 2, %.preheader.i.i.i ], [ 3, %.preheader.i56.i.i ], [ 4, %.preheader.i62.i.i ], [ 5, %.preheader.i68.i.i ], [ 5, %.preheader.i78.i.i ], [ 6, %.preheader.i84.i.i ] store ptr %.lcssa.sink.i88.i.sink.i, ptr @_ZL9stb__dout, align 8, !tbaa !282 %323 = getelementptr inbounds nuw i8, ptr %.034.i, i64 %.sink.i br label %_ZL20stb_decompress_tokenPKh.exit.thread.i diff --git a/bench/linux/optimized/tree.ll b/bench/linux/optimized/tree.ll index 9e70f2e9cf9..6e09e2c2777 100644 --- a/bench/linux/optimized/tree.ll +++ b/bench/linux/optimized/tree.ll @@ -9151,15 +9151,11 @@ define internal fastcc void @rcu_preempt_deferred_qs_irqrestore(ptr noundef %0, %8 = load i16, ptr %7, align 2 %9 = tail call i64 asm "add %gs:$1, $0", "=r,*m,0,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i64) @this_cpu_off, ptr nonnull @rcu_data) #28, !srcloc !358 %10 = inttoptr i64 %9 to ptr - %11 = zext i16 %8 to i32 - %12 = shl nuw i32 %11, 16 - %13 = zext i8 %6 to i32 - %14 = shl nuw nsw i32 %13, 8 - %15 = zext i8 %4 to i32 - %16 = or disjoint i32 %14, %15 - %17 = or disjoint i32 %16, %12 - %18 = icmp eq i32 %17, 0 - br i1 %18, label %19, label %27 + %11 = or i8 %6, %4 + %12 = zext i8 %11 to i16 + %13 = or i16 %8, %12 + %14 = icmp eq i16 %13, 0 + br i1 %14, label %19, label %23 19: ; preds = %2 %20 = getelementptr inbounds nuw i8, ptr %10, i64 17 @@ -9191,7 +9187,7 @@ define internal fastcc void @rcu_preempt_deferred_qs_irqrestore(ptr noundef %0, %34 = tail call i64 asm "movq %gs:$1, $0", "=r,*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i64) @rcu_data) #28, !srcloc !7 %35 = load ptr, ptr @rcu_qs.___tp_str.246, 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_rcu_grace_period, i64 8), i32 2) #29 - to label %56 [label %36], !srcloc !8 + to label %52 [label %32], !srcloc !8 36: ; preds = %32 %37 = tail 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)) #29, !srcloc !9 @@ -9200,7 +9196,7 @@ define internal fastcc void @rcu_preempt_deferred_qs_irqrestore(ptr noundef %0, %40 = icmp ult i8 %39, 2 tail call void @llvm.assume(i1 %40) %41 = icmp eq i8 %39, 0 - br i1 %41, label %56, label %42 + br i1 %41, label %52, label %42 42: ; preds = %36 tail call void asm "incl %gs:$0", "=*m,*m,~{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)) #29, !srcloc !11 @@ -9221,15 +9217,15 @@ define internal fastcc void @rcu_preempt_deferred_qs_irqrestore(ptr noundef %0, %51 = icmp ult i8 %50, 2 tail call void @llvm.assume(i1 %51) %52 = icmp eq i8 %50, 0 - br i1 %52, label %56, label %53, !prof !15 + br i1 %52, label %52, label %56, !prof !15 -53: ; preds = %49 - %54 = tail call i64 @llvm.read_register.i64(metadata !0) - %55 = tail call i64 asm sideeffect "call __SCT__preempt_schedule_notrace", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %54) #29, !srcloc !16 - tail call void @llvm.write_register.i64(metadata !0, i64 %55) - br label %56 +56: ; preds = %49 + %50 = tail call i64 @llvm.read_register.i64(metadata !0) + %51 = tail call i64 asm sideeffect "call __SCT__preempt_schedule_notrace", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %50) #29, !srcloc !16 + tail call void @llvm.write_register.i64(metadata !0, i64 %51) + br label %52 -56: ; preds = %53, %49, %36, %32 +52: ; preds = %49, %45, %32, %28 tail call void asm "movb $1, %gs:$0", "=*m,qi,*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i8) getelementptr inbounds nuw (i8, ptr @rcu_data, i64 16), i8 0, ptr nonnull elementtype(i8) getelementptr inbounds nuw (i8, ptr @rcu_data, i64 16)) #29, !srcloc !17 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #29, !srcloc !18 %57 = tail call i64 asm "movq %gs:${1:P}, $0", "=r,p,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @pcpu_hot) #30, !srcloc !19 @@ -9238,7 +9234,7 @@ define internal fastcc void @rcu_preempt_deferred_qs_irqrestore(ptr noundef %0, store volatile i8 0, ptr %59, align 1 br label %rcu_qs.exit -rcu_qs.exit: ; preds = %56, %29, %27 +rcu_qs.exit: ; preds = %52, %29, %27 %60 = getelementptr inbounds nuw i8, ptr %10, i64 17 %61 = load i8, ptr %60, align 1 %62 = icmp eq i8 %61, 0 @@ -9255,7 +9251,7 @@ rcu_qs.exit: ; preds = %56, %29, %27 68: ; preds = %63, %rcu_qs.exit %69 = icmp eq i8 %4, 0 - br i1 %69, label %237, label %70 + br i1 %69, label %233, label %70 70: ; preds = %68 %71 = getelementptr inbounds nuw i8, ptr %0, i64 1040 @@ -9278,42 +9274,42 @@ rcu_qs.exit: ; preds = %56, %29, %27 %80 = load i32, ptr @rcu_num_lvls, align 4 %81 = add i32 %80, -1 %82 = icmp eq i32 %81, %79 - br i1 %82, label %84, label %83, !prof !15 + br i1 %82, label %80, label %83, !prof !15 83: ; preds = %76 tail call void asm sideeffect "1424: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 1424b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 1424) #29, !srcloc !362 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.44, i32 520, i32 2307, i64 12) #29, !srcloc !363 tail call void asm sideeffect "1425: nop\0A\09.pushsection .discard.instr_end\0A\09.long 1425b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 1425) #29, !srcloc !364 - br label %84 - -84: ; preds = %83, %76 - %85 = getelementptr inbounds nuw i8, ptr %72, i64 152 - %86 = load volatile ptr, ptr %85, align 8 - %87 = icmp ne ptr %86, null - %88 = getelementptr inbounds nuw i8, ptr %72, i64 24 - %89 = load i64, ptr %88, align 8 - %90 = getelementptr inbounds nuw i8, ptr %72, i64 8 - %91 = load i64, ptr %90, align 8 - %92 = icmp ne i64 %89, %91 - %93 = select i1 %92, i1 true, i1 %87 - br i1 %93, label %97, label %94 - -94: ; preds = %84 - %95 = getelementptr inbounds nuw i8, ptr %72, i64 32 - %96 = load i64, ptr %95, align 32 - %.not = icmp eq i64 %96, 0 - br i1 %.not, label %99, label %98, !prof !15 - -97: ; preds = %84 - br i1 %92, label %99, label %98, !prof !15 + br label %80 -98: ; preds = %94, %97 +98: ; preds = %79, %72 + %81 = getelementptr inbounds nuw i8, ptr %68, i64 152 + %82 = load volatile ptr, ptr %81, align 8 + %83 = icmp ne ptr %82, null + %84 = getelementptr inbounds nuw i8, ptr %68, i64 24 + %85 = load i64, ptr %84, align 8 + %86 = getelementptr inbounds nuw i8, ptr %68, i64 8 + %87 = load i64, ptr %86, align 8 + %88 = icmp ne i64 %85, %87 + %89 = select i1 %88, i1 true, i1 %83 + br i1 %89, label %93, label %90 + +90: ; preds = %80 + %91 = getelementptr inbounds nuw i8, ptr %68, i64 32 + %92 = load i64, ptr %91, align 32 + %.not = icmp eq i64 %92, 0 + br i1 %.not, label %95, label %94, !prof !15 + +93: ; preds = %80 + br i1 %88, label %95, label %94, !prof !15 + +94: ; preds = %90, %93 tail call void asm sideeffect "1426: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 1426b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 1426) #29, !srcloc !365 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.44, i32 523, i32 2307, i64 12) #29, !srcloc !366 tail call void asm sideeffect "1427: nop\0A\09.pushsection .discard.instr_end\0A\09.long 1427b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 1427) #29, !srcloc !367 br label %99 -99: ; preds = %94, %98, %97 +99: ; preds = %90, %94, %93 %100 = getelementptr inbounds nuw i8, ptr %72, i64 160 %101 = load volatile ptr, ptr %100, align 32 %102 = icmp eq ptr %101, null @@ -9326,7 +9322,7 @@ rcu_qs.exit: ; preds = %56, %29, %27 br label %107 107: ; preds = %103, %99 - %108 = phi i1 [ false, %99 ], [ %106, %103 ] + %108 = phi i1 [ false, %95 ], [ %106, %99 ] tail call void asm sideeffect "lock; addl $$0,-4(%rsp)", "~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"() #29, !srcloc !368 %109 = getelementptr inbounds nuw i8, ptr %0, i64 1024 %110 = load ptr, ptr %109, align 64 @@ -9342,11 +9338,11 @@ rcu_qs.exit: ; preds = %56, %29, %27 store volatile ptr %109, ptr %114, align 8 store ptr null, ptr %71, align 16 %117 = load ptr, ptr @rcu_preempt_deferred_qs_irqrestore.___tp_str, align 8 - %118 = load i64, ptr %90, align 8 + %118 = load i64, ptr %86, align 8 %119 = getelementptr inbounds nuw i8, ptr %0, i64 1320 %120 = load i32, ptr %119, 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_rcu_unlock_preempted_task, i64 8), i32 2) #29 - to label %141 [label %121], !srcloc !8 + to label %137 [label %117], !srcloc !8 121: ; preds = %107 %122 = tail 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)) #29, !srcloc !369 @@ -9355,7 +9351,7 @@ rcu_qs.exit: ; preds = %56, %29, %27 %125 = icmp ult i8 %124, 2 tail call void @llvm.assume(i1 %125) %126 = icmp eq i8 %124, 0 - br i1 %126, label %141, label %127 + br i1 %126, label %137, label %127 127: ; preds = %121 tail call void asm "incl %gs:$0", "=*m,*m,~{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)) #29, !srcloc !11 @@ -9376,67 +9372,67 @@ rcu_qs.exit: ; preds = %56, %29, %27 %136 = icmp ult i8 %135, 2 tail call void @llvm.assume(i1 %136) %137 = icmp eq i8 %135, 0 - br i1 %137, label %141, label %138, !prof !15 + br i1 %137, label %137, label %138, !prof !15 138: ; preds = %134 %139 = tail call i64 @llvm.read_register.i64(metadata !0) %140 = tail call i64 asm sideeffect "call __SCT__preempt_schedule_notrace", "={rsp},{rsp},~{dirflag},~{fpsr},~{flags}"(i64 %139) #29, !srcloc !372 tail call void @llvm.write_register.i64(metadata !0, i64 %140) + br label %137 + +137: ; preds = %134, %130, %117, %103 + %138 = load ptr, ptr %81, align 8 + %139 = icmp eq ptr %105, %138 + br i1 %139, label %140, label %141 + +140: ; preds = %137 + store volatile ptr %109, ptr %81, align 8 br label %141 -141: ; preds = %138, %134, %121, %107 - %142 = load ptr, ptr %85, align 8 +141: ; preds = %140, %137 + %142 = load ptr, ptr %96, align 32 %143 = icmp eq ptr %109, %142 br i1 %143, label %144, label %145 144: ; preds = %141 - store volatile ptr %113, ptr %85, align 8 + store volatile ptr %113, ptr %96, align 32 br label %145 145: ; preds = %144, %141 - %146 = load ptr, ptr %100, align 32 - %147 = icmp eq ptr %109, %146 - br i1 %147, label %148, label %149 + %146 = load volatile ptr, ptr %100, align 32 + %147 = icmp eq ptr %146, null + br i1 %147, label %148, label %152 148: ; preds = %145 - store volatile ptr %113, ptr %100, align 32 - br label %149 - -149: ; preds = %148, %145 - %150 = load volatile ptr, ptr %100, align 32 - %151 = icmp eq ptr %150, null - br i1 %151, label %152, label %156 - -152: ; preds = %149 - %153 = getelementptr inbounds nuw i8, ptr %72, i64 64 - %154 = load volatile i64, ptr %153, align 64 - %155 = icmp ne i64 %154, 0 - br label %156 - -156: ; preds = %152, %149 - %157 = phi i1 [ true, %149 ], [ %155, %152 ] - br i1 %87, label %158, label %232 - -158: ; preds = %156 - %159 = load volatile ptr, ptr %85, align 8 - %160 = icmp ne ptr %159, null - %161 = zext i1 %160 to i32 - br i1 %160, label %232, label %162 - -162: ; preds = %158 - %163 = load ptr, ptr @rcu_preempt_deferred_qs_irqrestore.___tp_str.248, align 8 - %164 = load i64, ptr %90, align 8 - %165 = getelementptr inbounds nuw i8, ptr %72, i64 32 - %166 = load i64, ptr %165, align 32 - %167 = load i8, ptr %77, align 1 - %168 = getelementptr inbounds nuw i8, ptr %72, i64 112 - %169 = load i32, ptr %168, align 16 - %170 = getelementptr inbounds nuw i8, ptr %72, i64 116 - %171 = load i32, ptr %170, align 4 + %149 = getelementptr inbounds nuw i8, ptr %68, i64 64 + %150 = load volatile i64, ptr %149, align 64 + %151 = icmp ne i64 %150, 0 + br label %152 + +152:; preds = %148, %145 + %153 = phi i1 [ true, %145 ], [ %151, %148 ] + br i1 %83, label %154, label %228 + +154: ; preds = %152 + %154 = load volatile ptr, ptr %81, align 8 + %155 = icmp ne ptr %154, null + %157 = zext i1 %156 to i32 + br i1 %156, label %228, label %158 + +158: ; preds = %154 + %159 = load ptr, ptr @rcu_preempt_deferred_qs_irqrestore.___tp_str.248, align 8 + %160 = load i64, ptr %86, align 8 + %161 = getelementptr inbounds nuw i8, ptr %68, i64 32 + %159 = load i64, ptr %161, align 32 + %163 = load i8, ptr %73, align 1 + %164 = getelementptr inbounds nuw i8, ptr %68, i64 112 + %165 = load i32, ptr %164, align 16 + %166 = getelementptr inbounds nuw i8, ptr %68, i64 116 + %167 = load i32, ptr %166, align 4 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_rcu_quiescent_state_report, i64 8), i32 2) #29 - to label %192 [label %172], !srcloc !8 + to label %188 [label %168], !srcloc !8 -172: ; preds = %162 +172: ; preds = %158 %173 = tail 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)) #29, !srcloc !193 %174 = zext i32 %173 to i64 %175 = tail call i8 asm sideeffect " btq $2,$1\0A\09/* output condition code c*/\0A", "={@ccc},*m,Ir,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i64) @__cpu_online_mask, i64 %174) #29, !srcloc !10 @@ -9455,7 +9451,7 @@ rcu_qs.exit: ; preds = %56, %29, %27 181: ; preds = %178 %182 = getelementptr inbounds nuw i8, ptr %179, i64 8 %183 = load ptr, ptr %182, align 8 - %184 = tail call i32 @__SCT__tp_func_rcu_quiescent_state_report(ptr noundef %183, ptr noundef %163, i64 noundef %164, i64 noundef 0, i64 noundef %166, i8 noundef zeroext %167, i32 noundef %169, i32 noundef %171, i32 noundef %161) #29 + %184 = tail call i32 @__SCT__tp_func_rcu_quiescent_state_report(ptr noundef %183, ptr noundef %163, i64 noundef %160, i64 noundef 0, i64 noundef %162, i8 noundef zeroext %163, i32 noundef %165, i32 noundef %167, i32 noundef %157) #29 br label %185 185: ; preds = %181, %178 @@ -9472,10 +9468,10 @@ rcu_qs.exit: ; preds = %56, %29, %27 tail call void @llvm.write_register.i64(metadata !0, i64 %191) br label %192 -192: ; preds = %189, %185, %172, %162 - %193 = load volatile ptr, ptr %85, align 8 +192: ; preds = %189, %185, %172, %158 + %193 = load volatile ptr, ptr %81, align 8 %194 = icmp eq ptr %193, null - br i1 %194, label %196, label %195, !prof !15 + br i1 %194, label %192, label %195, !prof !15 195: ; preds = %192 tail call void asm sideeffect "974: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 974b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 974) #29, !srcloc !373 @@ -9483,36 +9479,36 @@ rcu_qs.exit: ; preds = %56, %29, %27 tail call void asm sideeffect "975: nop\0A\09.pushsection .discard.instr_end\0A\09.long 975b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 975) #29, !srcloc !375 br label %199 +192: ; preds = %188 + %193 = load i64, ptr %161, align 32 + %194 = icmp eq i64 %193, 0 + br i1 %194, label %196, label %195 + +195: ; preds = %192, %191 + tail call void @_raw_spin_unlock_irqrestore(ptr noundef %68, i64 noundef %1) #29 + br label %229 + 196: ; preds = %192 - %197 = load i64, ptr %165, align 32 - %198 = icmp eq i64 %197, 0 - br i1 %198, label %200, label %199 + %197 = load i64, ptr %86, align 8 + store i64 %197, ptr %84, align 8 + %198 = getelementptr inbounds nuw i8, ptr %68, i64 128 + %199 = load ptr, ptr %198, align 64 + %200 = icmp eq ptr %199, null + br i1 %200, label %201, label %225 -199: ; preds = %196, %195 - tail call void @_raw_spin_unlock_irqrestore(ptr noundef %72, i64 noundef %1) #29 - br label %233 +199: ; preds = %196 + %202 = load volatile i64, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3264), align 64 + %203 = and i64 %202, 3 + %204 = icmp eq i64 %203, 0 + br i1 %204, label %205, label %206, !prof !29 -200: ; preds = %196 - %201 = load i64, ptr %90, align 8 - store i64 %201, ptr %88, align 8 - %202 = getelementptr inbounds nuw i8, ptr %72, i64 128 - %203 = load ptr, ptr %202, align 64 - %204 = icmp eq ptr %203, null - br i1 %204, label %205, label %229 - -205: ; preds = %200 - %206 = load volatile i64, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3264), align 64 - %207 = and i64 %206, 3 - %208 = icmp eq i64 %207, 0 - br i1 %208, label %209, label %210, !prof !29 - -209: ; preds = %205 +200: ; preds = %199 tail call void asm sideeffect "962: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 962b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 962) #29, !srcloc !198 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, i32 1884, i32 2307, i64 12) #29, !srcloc !199 tail call void asm sideeffect "963: nop\0A\09.pushsection .discard.instr_end\0A\09.long 963b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 963) #29, !srcloc !200 br label %210 -210: ; preds = %209, %205 +210: ; preds = %205, %201 %211 = load volatile i16, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3312), align 16 %212 = or i16 %211, 2 store volatile i16 %212, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3312), align 16 @@ -9521,60 +9517,60 @@ rcu_qs.exit: ; preds = %56, %29, %27 %214 = tail call i64 asm "movq %gs:${1:P}, $0", "=r,p,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @pcpu_hot) #30, !srcloc !19 %215 = inttoptr i64 %214 to ptr %216 = icmp eq ptr %213, %215 - br i1 %216, label %217, label %221 - -217: ; preds = %210 - %218 = tail call i32 asm "movl %gs:$1, $0", "=r,*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #28, !srcloc !64 - %219 = and i32 %218, 983296 - %220 = icmp eq i32 %219, 0 - br i1 %220, label %233, label %221 - -221: ; preds = %217, %210 - %222 = load volatile i16, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3312), align 16 - %223 = icmp ne i16 %222, 0 - %224 = icmp ne ptr %213, null - %225 = select i1 %223, i1 %224, i1 false - br i1 %225, label %226, label %233 - -226: ; preds = %221 - %227 = load volatile i64, ptr @jiffies, align 64 - store volatile i64 %227, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3320), align 8 - %228 = load volatile i64, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3264), align 64 - store volatile i64 %228, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3328), align 64 - tail call fastcc void @swake_up_one_online(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3288)) - br label %233 + br i1 %216, label %213, label %217 -229: ; preds = %200 - %230 = getelementptr inbounds nuw i8, ptr %72, i64 104 - %231 = load i64, ptr %230, align 8 - tail call void @_raw_spin_unlock(ptr noundef %72) #29 - tail call void @_raw_spin_lock(ptr noundef nonnull %203) #29 - tail call fastcc void @rcu_report_qs_rnp(i64 noundef %231, ptr noundef nonnull %203, i64 noundef %201, i64 noundef %1) - br label %233 - -232: ; preds = %158, %156 - tail call void @_raw_spin_unlock_irqrestore(ptr noundef %72, i64 noundef %1) #29 - br label %233 - -233: ; preds = %232, %229, %226, %221, %217, %199 - %234 = select i1 %108, i1 true, i1 %157 - br i1 %234, label %241, label %235 - -235: ; preds = %233 - %236 = tail call i64 @_raw_spin_lock_irqsave(ptr noundef %72) #29 - tail call fastcc void @__rcu_report_exp_rnp(ptr noundef %72, i1 noundef zeroext true, i64 noundef %236) - br label %241 - -237: ; preds = %68 - %238 = and i64 %1, 512 - %239 = icmp eq i64 %238, 0 - br i1 %239, label %241, label %240 - -240: ; preds = %237 +237: ; preds = %206 + %214 = tail call i32 asm "movl %gs:$1, $0", "=r,*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) getelementptr inbounds nuw (i8, ptr @pcpu_hot, i64 8)) #28, !srcloc !64 + %215 = and i32 %214, 983296 + %216 = icmp eq i32 %215, 0 + br i1 %216, label %229, label %217 + +217: ; preds = %213, %206 + %218 = load volatile i16, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3312), align 16 + %219 = icmp ne i16 %218, 0 + %220 = icmp ne ptr %209, null + %221 = select i1 %219, i1 %220, i1 false + br i1 %221, label %222, label %229 + +222: ; preds = %217 + %223 = load volatile i64, ptr @jiffies, align 64 + store volatile i64 %223, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3320), align 8 + %224 = load volatile i64, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3264), align 64 + store volatile i64 %224, ptr getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3328), align 64 + tail call fastcc void @swake_up_one_online(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @rcu_state, i64 3288)) + br label %229 + +225: ; preds = %196 + %226 = getelementptr inbounds nuw i8, ptr %68, i64 104 + %227 = load i64, ptr %226, align 8 + tail call void @_raw_spin_unlock(ptr noundef %68) #29 + tail call void @_raw_spin_lock(ptr noundef nonnull %199) #29 + tail call fastcc void @rcu_report_qs_rnp(i64 noundef %227, ptr noundef nonnull %199, i64 noundef %197, i64 noundef %1) + br label %229 + +228: ; preds = %154, %152 + tail call void @_raw_spin_unlock_irqrestore(ptr noundef %68, i64 noundef %1) #29 + br label %229 + +229: ; preds = %228, %225, %222, %217, %213, %195 + %230 = select i1 %104, i1 true, i1 %153 + br i1 %230, label %237, label %231 + +231: ; preds = %229 + %232 = tail call i64 @_raw_spin_lock_irqsave(ptr noundef %68) #29 + tail call fastcc void @__rcu_report_exp_rnp(ptr noundef %68, i1 noundef zeroext true, i64 noundef %232) + br label %237 + +233: ; preds = %64 + %234 = and i64 %1, 512 + %235 = icmp eq i64 %234, 0 + br i1 %235, label %237, label %236 + +240: ; preds = %233 tail call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"() #29, !srcloc !80 br label %241 -241: ; preds = %240, %237, %235, %233, %26, %23 +241: ; preds = %240, %233, %231, %229, %26, %23 ret void } diff --git a/bench/llvm/optimized/RISCVMergeBaseOffset.ll b/bench/llvm/optimized/RISCVMergeBaseOffset.ll index 6e5154147db..7371fcffdba 100644 --- a/bench/llvm/optimized/RISCVMergeBaseOffset.ll +++ b/bench/llvm/optimized/RISCVMergeBaseOffset.ll @@ -325,13 +325,12 @@ define internal noundef zeroext i1 @_ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt20 %46 = getelementptr inbounds nuw i8, ptr %35, i64 56 %47 = load i32, ptr %46, align 8, !tbaa !175 %48 = sext i32 %47 to i64 - %49 = shl nsw i64 %48, 32 - %50 = getelementptr inbounds nuw i8, ptr %35, i64 36 - %51 = load i32, ptr %50, align 4, !tbaa !175 - %52 = zext i32 %51 to i64 - %53 = or disjoint i64 %49, %52 - %.not39.i = icmp eq i64 %53, 0 - br i1 %.not39.i, label %54, label %_ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit.thread + %49 = getelementptr inbounds nuw i8, ptr %35, i64 36 + %50 = load i32, ptr %49, align 4, !tbaa !175 + %51 = zext i32 %50 to i64 + %52 = or i64 %51, %48 + %53 = icmp eq i64 %52, 0 + br i1 %53, label %54, label %_ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit.thread 54: ; preds = %45 %55 = icmp eq i16 %32, 425 @@ -449,13 +448,12 @@ _ZNK4llvm19MachineRegisterInfo15use_instr_beginENS_8RegisterE.exit.i: ; preds = %97 = getelementptr inbounds nuw i8, ptr %90, i64 24 %98 = load i32, ptr %97, align 8, !tbaa !175 %99 = sext i32 %98 to i64 - %100 = shl nsw i64 %99, 32 - %101 = getelementptr inbounds nuw i8, ptr %90, i64 4 - %102 = load i32, ptr %101, align 4, !tbaa !175 - %103 = zext i32 %102 to i64 - %104 = or disjoint i64 %100, %103 - %.not44.i = icmp eq i64 %104, 0 - br i1 %.not44.i, label %._ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit_crit_edge, label %_ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit.thread + %100 = getelementptr inbounds nuw i8, ptr %90, i64 4 + %101 = load i32, ptr %100, align 4, !tbaa !175 + %102 = zext i32 %101 to i64 + %103 = or i64 %102, %99 + %104 = icmp eq i64 %103, 0 + br i1 %104, label %._ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit_crit_edge, label %_ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit.thread ._ZN12_GLOBAL__N_123RISCVMergeBaseOffsetOpt14detectFoldableERN4llvm12MachineInstrERPS2_.exit_crit_edge: ; preds = %96 %.phi.trans.insert201 = getelementptr inbounds nuw i8, ptr %.val, i64 48 @@ -633,7 +631,7 @@ _ZNK4llvm19MachineRegisterInfo15use_instr_beginENS_8RegisterE.exit68.i: ; preds %167 = load i64, ptr %166, align 8, !tbaa !175 %168 = add nsw i64 %167, %139 %169 = trunc i64 %168 to i32 - store i32 %169, ptr %50, align 4, !tbaa !175 + store i32 %169, ptr %49, align 4, !tbaa !175 %170 = lshr i64 %168, 32 %171 = trunc nuw i64 %170 to i32 store i32 %171, ptr %46, align 8, !tbaa !175 @@ -679,7 +677,7 @@ _ZNK4llvm19MachineRegisterInfo15use_instr_beginENS_8RegisterE.exit68.i: ; preds _ZNK4llvm19MachineRegisterInfo9hasOneUseENS_8RegisterE.exit56.thread.i: ; preds = %.preheader.i.i.i.i42.i, %154, %_ZNK4llvm19MachineRegisterInfo15use_instr_beginENS_8RegisterE.exit68.i, %135 %199 = trunc i64 %139 to i32 - store i32 %199, ptr %50, align 4, !tbaa !175 + store i32 %199, ptr %49, align 4, !tbaa !175 %200 = lshr i64 %139, 32 %201 = trunc nuw i64 %200 to i32 store i32 %201, ptr %46, align 8, !tbaa !175 diff --git a/bench/llvm/optimized/blake3.ll b/bench/llvm/optimized/blake3.ll index f9ad42e52c9..37c40203e7f 100644 --- a/bench/llvm/optimized/blake3.ll +++ b/bench/llvm/optimized/blake3.ll @@ -2053,14 +2053,11 @@ output_root_bytes.exit: ; preds = %35 call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %9) #10 %45 = getelementptr inbounds nuw i8, ptr %0, i64 137 %46 = load i8, ptr %45, align 1, !tbaa !11 - %47 = zext i8 %46 to i64 - %48 = shl nuw nsw i64 %47, 6 - %49 = getelementptr inbounds nuw i8, ptr %0, i64 136 - %50 = load i8, ptr %49, align 8, !tbaa !12 - %51 = zext i8 %50 to i64 - %52 = or i64 %48, %51 - %.not = icmp eq i64 %52, 0 - br i1 %.not, label %66, label %.thread + %47 = getelementptr inbounds nuw i8, ptr %0, i64 136 + %48 = load i8, ptr %47, align 8, !tbaa !12 + %49 = or i8 %48, %46 + %50 = icmp eq i8 %49, 0 + br i1 %50, label %64, label %.thread .thread: ; preds = %44 %53 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -2080,7 +2077,7 @@ output_root_bytes.exit: ; preds = %35 %63 = getelementptr inbounds nuw i8, ptr %9, i64 32 store i64 %62, ptr %63, align 8, !tbaa !69 %64 = getelementptr inbounds nuw i8, ptr %9, i64 104 - store i8 %50, ptr %64, align 8, !tbaa !9 + store i8 %48, ptr %64, align 8, !tbaa !9 %65 = getelementptr inbounds nuw i8, ptr %9, i64 105 store i8 %59, ptr %65, align 1, !tbaa !9 br label %.lr.ph @@ -2107,13 +2104,13 @@ output_root_bytes.exit: ; preds = %35 br i1 %.not2350, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %.thread, %66 - %78 = phi ptr [ %65, %.thread ], [ %77, %66 ] - %79 = phi ptr [ %64, %.thread ], [ %76, %66 ] - %80 = phi ptr [ %63, %.thread ], [ %75, %66 ] - %.070 = phi i64 [ %54, %.thread ], [ %68, %66 ] - %.sink69 = phi i8 [ %59, %.thread ], [ %74, %66 ] - %.sink6068 = phi i8 [ %50, %.thread ], [ 64, %66 ] - %.sink6167 = phi i64 [ %62, %.thread ], [ 0, %66 ] + %78 = phi ptr [ %65, %.thread ], [ %77, %64 ] + %79 = phi ptr [ %64, %.thread ], [ %76, %64 ] + %80 = phi ptr [ %63, %.thread ], [ %75, %64 ] + %.070 = phi i64 [ %54, %.thread ], [ %68, %64 ] + %.sink69 = phi i8 [ %59, %.thread ], [ %74, %64 ] + %.sink6068 = phi i8 [ %48, %.thread ], [ 64, %64 ] + %.sink6167 = phi i64 [ %62, %.thread ], [ 0, %64 ] %81 = getelementptr inbounds nuw i8, ptr %0, i64 145 %82 = getelementptr inbounds nuw i8, ptr %9, i64 40 %83 = getelementptr inbounds nuw i8, ptr %7, i64 4 @@ -2159,10 +2156,10 @@ output_root_bytes.exit: ; preds = %35 br label %91 91: ; preds = %.lr.ph, %91 - %92 = phi i8 [ %.sink69, %.lr.ph ], [ %163, %91 ] - %93 = phi i64 [ %.sink6167, %.lr.ph ], [ 0, %91 ] - %94 = phi i8 [ %.sink6068, %.lr.ph ], [ 64, %91 ] - %.151 = phi i64 [ %.070, %.lr.ph ], [ %95, %91 ] + %92 = phi i8 [ %.sink69, %.lr.ph ], [ %163, %89 ] + %93 = phi i64 [ %.sink6167, %.lr.ph ], [ 0, %89 ] + %94 = phi i8 [ %.sink6068, %.lr.ph ], [ 64, %89 ] + %.151 = phi i64 [ %.070, %.lr.ph ], [ %95, %89 ] %95 = add i64 %.151, -1 %96 = shl i64 %95, 5 %97 = getelementptr inbounds nuw [1760 x i8], ptr %81, i64 0, i64 %96 @@ -2172,107 +2169,107 @@ output_root_bytes.exit: ; preds = %35 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, i64 32, i1 false) call void @llvm_blake3_compress_in_place(ptr noundef nonnull %7, ptr noundef nonnull %82, i8 noundef zeroext %94, i64 noundef %93, i8 noundef zeroext %92) #10 %98 = load i32, ptr %7, align 16, !tbaa !26 + %97 = trunc i32 %96 to i8 + %98 = lshr i32 %96, 8 %99 = trunc i32 %98 to i8 - %100 = lshr i32 %98, 8 + %100 = lshr i32 %98, 16 %101 = trunc i32 %100 to i8 - %102 = lshr i32 %98, 16 - %103 = trunc i32 %102 to i8 - %104 = lshr i32 %98, 24 - %105 = trunc nuw i32 %104 to i8 - %106 = load i32, ptr %83, align 4, !tbaa !26 + %102 = lshr i32 %98, 24 + %103 = trunc nuw i32 %102 to i8 + %104 = load i32, ptr %81, align 4, !tbaa !26 + %105 = trunc i32 %104 to i8 + %106 = lshr i32 %104, 8 %107 = trunc i32 %106 to i8 - %108 = lshr i32 %106, 8 + %108 = lshr i32 %104, 16 %109 = trunc i32 %108 to i8 - %110 = lshr i32 %106, 16 - %111 = trunc i32 %110 to i8 - %112 = lshr i32 %106, 24 - %113 = trunc nuw i32 %112 to i8 - %114 = load i32, ptr %84, align 8, !tbaa !26 + %110 = lshr i32 %104, 24 + %111 = trunc nuw i32 %110 to i8 + %112 = load i32, ptr %82, align 8, !tbaa !26 + %113 = trunc i32 %112 to i8 + %114 = lshr i32 %112, 8 %115 = trunc i32 %114 to i8 - %116 = lshr i32 %114, 8 + %116 = lshr i32 %112, 16 %117 = trunc i32 %116 to i8 - %118 = lshr i32 %114, 16 - %119 = trunc i32 %118 to i8 - %120 = lshr i32 %114, 24 - %121 = trunc nuw i32 %120 to i8 - %122 = load i32, ptr %85, align 4, !tbaa !26 + %118 = lshr i32 %112, 24 + %119 = trunc nuw i32 %118 to i8 + %120 = load i32, ptr %83, align 4, !tbaa !26 + %121 = trunc i32 %120 to i8 + %122 = lshr i32 %120, 8 %123 = trunc i32 %122 to i8 - %124 = lshr i32 %122, 8 + %124 = lshr i32 %120, 16 %125 = trunc i32 %124 to i8 - %126 = lshr i32 %122, 16 - %127 = trunc i32 %126 to i8 - %128 = lshr i32 %122, 24 - %129 = trunc nuw i32 %128 to i8 - %130 = load i32, ptr %86, align 16, !tbaa !26 + %126 = lshr i32 %120, 24 + %127 = trunc nuw i32 %126 to i8 + %128 = load i32, ptr %84, align 16, !tbaa !26 + %129 = trunc i32 %128 to i8 + %130 = lshr i32 %128, 8 %131 = trunc i32 %130 to i8 - %132 = lshr i32 %130, 8 + %132 = lshr i32 %128, 16 %133 = trunc i32 %132 to i8 - %134 = lshr i32 %130, 16 - %135 = trunc i32 %134 to i8 - %136 = lshr i32 %130, 24 - %137 = trunc nuw i32 %136 to i8 - %138 = load i32, ptr %87, align 4, !tbaa !26 + %134 = lshr i32 %128, 24 + %135 = trunc nuw i32 %134 to i8 + %136 = load i32, ptr %85, align 4, !tbaa !26 + %137 = trunc i32 %136 to i8 + %138 = lshr i32 %136, 8 %139 = trunc i32 %138 to i8 - %140 = lshr i32 %138, 8 + %140 = lshr i32 %136, 16 %141 = trunc i32 %140 to i8 - %142 = lshr i32 %138, 16 - %143 = trunc i32 %142 to i8 - %144 = lshr i32 %138, 24 - %145 = trunc nuw i32 %144 to i8 - %146 = load i32, ptr %88, align 8, !tbaa !26 + %142 = lshr i32 %136, 24 + %143 = trunc nuw i32 %142 to i8 + %144 = load i32, ptr %86, align 8, !tbaa !26 + %145 = trunc i32 %144 to i8 + %146 = lshr i32 %144, 8 %147 = trunc i32 %146 to i8 - %148 = lshr i32 %146, 8 + %148 = lshr i32 %144, 16 %149 = trunc i32 %148 to i8 - %150 = lshr i32 %146, 16 - %151 = trunc i32 %150 to i8 - %152 = lshr i32 %146, 24 - %153 = trunc nuw i32 %152 to i8 - %154 = load i32, ptr %89, align 4, !tbaa !26 + %150 = lshr i32 %144, 24 + %151 = trunc nuw i32 %150 to i8 + %152 = load i32, ptr %87, align 4, !tbaa !26 + %153 = trunc i32 %152 to i8 + %154 = lshr i32 %152, 8 %155 = trunc i32 %154 to i8 - %156 = lshr i32 %154, 8 + %156 = lshr i32 %152, 16 %157 = trunc i32 %156 to i8 - %158 = lshr i32 %154, 16 - %159 = trunc i32 %158 to i8 - %160 = lshr i32 %154, 24 - %161 = trunc nuw i32 %160 to i8 + %158 = lshr i32 %152, 24 + %159 = trunc nuw i32 %158 to i8 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10 %162 = load i8, ptr %90, align 2, !tbaa !29 %163 = or i8 %162, 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 4 dereferenceable(32) %0, i64 32, i1 false) store i64 0, ptr %80, align 8, !tbaa !69 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %82, ptr noundef nonnull align 16 dereferenceable(32) %.sroa.5.sroa.0, i64 32, i1 false), !tbaa.struct !70 - store i8 %99, ptr %.sroa.5.sroa.4.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %101, ptr %.sroa.5.sroa.5.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %103, ptr %.sroa.5.sroa.6.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %105, ptr %.sroa.5.sroa.7.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %107, ptr %.sroa.5.sroa.8.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %109, ptr %.sroa.5.sroa.9.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %111, ptr %.sroa.5.sroa.10.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %113, ptr %.sroa.5.sroa.11.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %115, ptr %.sroa.5.sroa.12.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %117, ptr %.sroa.5.sroa.13.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %119, ptr %.sroa.5.sroa.14.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %121, ptr %.sroa.5.sroa.15.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %123, ptr %.sroa.5.sroa.16.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %125, ptr %.sroa.5.sroa.17.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %127, ptr %.sroa.5.sroa.18.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %129, ptr %.sroa.5.sroa.19.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %131, ptr %.sroa.5.sroa.20.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %133, ptr %.sroa.5.sroa.21.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %135, ptr %.sroa.5.sroa.22.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %137, ptr %.sroa.5.sroa.23.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %139, ptr %.sroa.5.sroa.24.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %141, ptr %.sroa.5.sroa.25.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %143, ptr %.sroa.5.sroa.26.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %145, ptr %.sroa.5.sroa.27.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %147, ptr %.sroa.5.sroa.28.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %149, ptr %.sroa.5.sroa.29.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %151, ptr %.sroa.5.sroa.30.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %153, ptr %.sroa.5.sroa.31.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %155, ptr %.sroa.5.sroa.32.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %157, ptr %.sroa.5.sroa.33.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %159, ptr %.sroa.5.sroa.34.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %161, ptr %.sroa.5.sroa.35.0..sroa.5.0..sroa_idx.sroa_idx, align 1, !tbaa !9 + store i8 %97, ptr %.sroa.5.sroa.4.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %99, ptr %.sroa.5.sroa.5.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %101, ptr %.sroa.5.sroa.6.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %103, ptr %.sroa.5.sroa.7.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %105, ptr %.sroa.5.sroa.8.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %107, ptr %.sroa.5.sroa.9.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %109, ptr %.sroa.5.sroa.10.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %111, ptr %.sroa.5.sroa.11.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %113, ptr %.sroa.5.sroa.12.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %115, ptr %.sroa.5.sroa.13.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %117, ptr %.sroa.5.sroa.14.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %119, ptr %.sroa.5.sroa.15.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %121, ptr %.sroa.5.sroa.16.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %123, ptr %.sroa.5.sroa.17.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %125, ptr %.sroa.5.sroa.18.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %127, ptr %.sroa.5.sroa.19.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %129, ptr %.sroa.5.sroa.20.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %131, ptr %.sroa.5.sroa.21.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %133, ptr %.sroa.5.sroa.22.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %135, ptr %.sroa.5.sroa.23.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %137, ptr %.sroa.5.sroa.24.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %139, ptr %.sroa.5.sroa.25.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %141, ptr %.sroa.5.sroa.26.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %143, ptr %.sroa.5.sroa.27.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %145, ptr %.sroa.5.sroa.28.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %147, ptr %.sroa.5.sroa.29.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %149, ptr %.sroa.5.sroa.30.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %151, ptr %.sroa.5.sroa.31.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %153, ptr %.sroa.5.sroa.32.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %155, ptr %.sroa.5.sroa.33.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %157, ptr %.sroa.5.sroa.34.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %159, ptr %.sroa.5.sroa.35.0..sroa.5.0..sroa_idx.sroa_idx, align 1, !tbaa !9 store i8 64, ptr %79, align 8, !tbaa !9 store i8 %163, ptr %78, align 1, !tbaa !9 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %.sroa.5.sroa.0) @@ -2280,8 +2277,8 @@ output_root_bytes.exit: ; preds = %35 br i1 %.not23, label %._crit_edge, label %91, !llvm.loop !71 ._crit_edge: ; preds = %91, %66 - %164 = phi ptr [ %77, %66 ], [ %78, %91 ] - %165 = phi ptr [ %76, %66 ], [ %79, %91 ] + %164 = phi ptr [ %77, %64 ], [ %78, %89 ] + %165 = phi ptr [ %76, %64 ], [ %79, %89 ] %166 = lshr i64 %1, 6 %167 = and i64 %1, 63 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #10 @@ -2289,10 +2286,10 @@ output_root_bytes.exit: ; preds = %35 br label %169 169: ; preds = %._crit_edge, %169 - %.020.i2755 = phi ptr [ %2, %._crit_edge ], [ %175, %169 ] - %.021.i2654 = phi i64 [ %167, %._crit_edge ], [ 0, %169 ] - %.022.i2553 = phi i64 [ %166, %._crit_edge ], [ %177, %169 ] - %.023.i2452 = phi i64 [ %3, %._crit_edge ], [ %176, %169 ] + %.020.i2755 = phi ptr [ %2, %._crit_edge ], [ %175, %167 ] + %.021.i2654 = phi i64 [ %167, %._crit_edge ], [ 0, %167 ] + %.022.i2553 = phi i64 [ %166, %._crit_edge ], [ %177, %167 ] + %.023.i2452 = phi i64 [ %3, %._crit_edge ], [ %176, %167 ] %170 = load i8, ptr %165, align 8, !tbaa !19 %171 = load i8, ptr %164, align 1, !tbaa !25 %172 = or i8 %171, 8 diff --git a/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll b/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll index bc8fe741b8f..a398554a7e8 100644 --- a/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll +++ b/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll @@ -1547,11 +1547,11 @@ define hidden void @"_ZN105_$LT$meilisearch_types..settings..MinWordSizeTyposSet call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 32, i1 false) invoke void @"_ZN132_$LT$meilisearch_types..deserr..DeserrError$LT$meilisearch_types..deserr..DeserrJson$C$C$GT$$u20$as$u20$deserr..DeserializeError$GT$5error17hff368a789edfaba3E"(ptr noalias noundef nonnull sret([40 x i8]) align 8 captures(none) dereferenceable(40) %26, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %25, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(88) %24, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %23) - to label %224 unwind label %102 + to label %222 unwind label %100 .body: ; preds = %87, %50, %79 - %.sroa.045.1 = phi i1 [ %.sroa.045.4, %79 ], [ %.sroa.045.0, %50 ], [ true, %87 ] - %.pn68 = phi { ptr, i32 } [ %.pn64, %79 ], [ %51, %50 ], [ %88, %87 ] + %.sroa.045.1 = phi i1 [ %.sroa.045.4, %79 ], [ %.sroa.045.0, %50 ], [ true, %83 ] + %.pn68 = phi { ptr, i32 } [ %.pn64, %79 ], [ %51, %50 ], [ %88, %83 ] %49 = load i64, ptr %41, align 8, !range !6 %.not = icmp ne i64 %49, -9223372036854775808 %or.cond.not = select i1 %.sroa.045.1, i1 %.not, i1 false @@ -1609,13 +1609,13 @@ define hidden void @"_ZN105_$LT$meilisearch_types..settings..MinWordSizeTyposSet br label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i" "_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i": ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph", %199 - %76 = phi ptr [ %56, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %201, %199 ] - %.sroa.020.0520 = phi i8 [ 2, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.020.1425, %199 ] - %.sroa.522.0519 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.522.1424, %199 ] - %.sroa.023.0518 = phi i8 [ 2, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.023.1423, %199 ] - %.sroa.525.0517 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.525.1422, %199 ] - %.sroa.11152.0516 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.11152.1421, %199 ] - %.sroa.11237.0515 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.11237.1418, %199 ] + %76 = phi ptr [ %56, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %201, %197 ] + %.sroa.020.0520 = phi i8 [ 2, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.020.1425, %197 ] + %.sroa.522.0519 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.522.1424, %197 ] + %.sroa.023.0518 = phi i8 [ 2, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.023.1423, %197 ] + %.sroa.525.0517 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.525.1422, %197 ] + %.sroa.11152.0516 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.11152.1421, %197 ] + %.sroa.11237.0515 = phi i8 [ undef, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i.lr.ph" ], [ %.sroa.11237.1418, %197 ] call void @llvm.experimental.noalias.scope.decl(metadata !133) call void @llvm.experimental.noalias.scope.decl(metadata !135) call void @llvm.experimental.noalias.scope.decl(metadata !137) @@ -1643,31 +1643,20 @@ define hidden void @"_ZN105_$LT$meilisearch_types..settings..MinWordSizeTyposSet ._crit_edge.loopexit.split.loop.exit545: ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i" %80 = getelementptr inbounds nuw i8, ptr %76, i64 104 - br label %._crit_edge.loopexit - -._crit_edge.loopexit: ; preds = %199, %._crit_edge.loopexit.split.loop.exit545 - %81 = phi ptr [ %80, %._crit_edge.loopexit.split.loop.exit545 ], [ %201, %199 ] - %.sroa.525.0.lcssa.ph = phi i8 [ %.sroa.525.0517, %._crit_edge.loopexit.split.loop.exit545 ], [ %.sroa.525.1422, %199 ] - %.sroa.023.0.lcssa.ph = phi i8 [ %.sroa.023.0518, %._crit_edge.loopexit.split.loop.exit545 ], [ %.sroa.023.1423, %199 ] - %.sroa.522.0.lcssa.ph = phi i8 [ %.sroa.522.0519, %._crit_edge.loopexit.split.loop.exit545 ], [ %.sroa.522.1424, %199 ] - %.sroa.020.0.lcssa.ph = phi i8 [ %.sroa.020.0520, %._crit_edge.loopexit.split.loop.exit545 ], [ %.sroa.020.1425, %199 ] - %82 = zext nneg i8 %.sroa.023.0.lcssa.ph to i32 - %83 = shl nuw nsw i32 %82, 16 - %84 = zext nneg i8 %.sroa.020.0.lcssa.ph to i32 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %52 - %85 = phi ptr [ %56, %52 ], [ %81, %._crit_edge.loopexit ] - %.sroa.525.0.lcssa = phi i8 [ undef, %52 ], [ %.sroa.525.0.lcssa.ph, %._crit_edge.loopexit ] - %.sroa.023.0.lcssa = phi i32 [ 131072, %52 ], [ %83, %._crit_edge.loopexit ] - %.sroa.522.0.lcssa = phi i8 [ undef, %52 ], [ %.sroa.522.0.lcssa.ph, %._crit_edge.loopexit ] - %.sroa.020.0.lcssa = phi i32 [ 2, %52 ], [ %84, %._crit_edge.loopexit ] +._crit_edge: ; preds = %197, %._crit_edge.loopexit.split.loop.exit542, %52 + %85 = phi ptr [ %56, %52 ], [ %80, %._crit_edge.loopexit.split.loop.exit542 ], [ %199, %197 ] + %.sroa.525.0.lcssa = phi i8 [ undef, %52 ], [ %.sroa.525.0517, %._crit_edge.loopexit.split.loop.exit542 ], [ %.sroa.525.1422, %197 ] + %.sroa.023.0.lcssa = phi i8 [ 2, %52 ], [ %.sroa.023.0518, %._crit_edge.loopexit.split.loop.exit542 ], [ %.sroa.023.1423, %197 ] + %.sroa.522.0.lcssa = phi i8 [ undef, %52 ], [ %.sroa.522.0519, %._crit_edge.loopexit.split.loop.exit542 ], [ %.sroa.522.1424, %197 ] + %.sroa.020.0.lcssa = phi i8 [ 2, %52 ], [ %.sroa.020.0520, %._crit_edge.loopexit.split.loop.exit542 ], [ %.sroa.020.1425, %197 ] call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %.sroa.7) call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %.sroa.8146) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21), !noalias !141 store ptr %39, ptr %21, align 8, !noalias !141 %86 = invoke noundef i64 @_ZN4core4iter6traits10exact_size17ExactSizeIterator3len17hde05e5919f9ad533E.llvm.3021571406010367114(ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %39) - to label %89 unwind label %87 + to label %85 unwind label %87 87: ; preds = %89, %._crit_edge %88 = landingpad { ptr, i32 } @@ -1687,7 +1676,7 @@ define hidden void @"_ZN105_$LT$meilisearch_types..settings..MinWordSizeTyposSet "_ZN4core3ptr106drop_in_place$LT$indexmap..map..iter..IntoIter$LT$alloc..string..String$C$serde_json..value..Value$GT$$GT$17h38b9c4ced7951fc3E.llvm.4616129397091597767.exit.i": ; preds = %89 invoke void @"_ZN157_$LT$$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$..drop..DropGuard$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hd25fe6a53bb16c8bE.llvm.4616129397091597767"(ptr noalias noundef nonnull align 8 dereferenceable(8) %21) - to label %96 unwind label %50 + to label %92 unwind label %50 92: ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i" %.sroa.6.0..sroa_idx2.i.i = getelementptr inbounds nuw i8, ptr %76, i64 8 @@ -1730,25 +1719,25 @@ define hidden void @"_ZN105_$LT$meilisearch_types..settings..MinWordSizeTyposSet br label %114 "_ZN6deserr19FieldState$LT$T$GT$6unwrap17h080d3852bc07cf2dE.exit102": ; preds = %96 - %.sroa.018.0.insert.insert = or disjoint i32 %.sroa.023.0.lcssa, %.sroa.020.0.lcssa call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %41) call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %.sroa.11331.sroa.0) call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 32, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) - %or.cond.i = icmp eq i32 %.sroa.018.0.insert.insert, 0 - br i1 %or.cond.i, label %105, label %.thread387 - -.body105: ; preds = %215, %111, %102, %223, %.body - %.sroa.042.1 = phi i1 [ false, %223 ], [ false, %.body ], [ %104, %102 ], [ false, %111 ], [ false, %215 ] - %.pn70 = phi { ptr, i32 } [ %.pn68, %223 ], [ %.pn68, %.body ], [ %103, %102 ], [ %lpad.thr_comm.i, %111 ], [ %216, %215 ] - %100 = load i64, ptr %1, align 8, !range !4 - %101 = icmp sgt i64 %100, -9223372036854775802 - %or.cond95 = select i1 %.sroa.042.1, i1 true, i1 %101 - br i1 %or.cond95, label %226, label %227 - -102: ; preds = %_ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i, %46 - %103 = landingpad { ptr, i32 } + %96 = or i8 %.sroa.020.0.lcssa, %.sroa.023.0.lcssa + %97 = icmp eq i8 %96, 0 + br i1 %97, label %103, label %.thread387 + +.body105:; preds = %213, %109, %100, %223, %.body + %.pn70 = phi i1 [ false, %221 ], [ false, %.body ], [ %102, %100 ], [ false, %109 ], [ false, %213 ] + %.pn70 = phi { ptr, i32 } [ %.pn68, %221 ], [ %.pn68, %.body ], [ %101, %100 ], [ %lpad.thr_comm.i, %109 ], [ %214, %213 ] + %98 = load i64, ptr %1, align 8, !range !4 + %99 = icmp sgt i64 %98, -9223372036854775802 + %or.cond95 = select i1 %.pn70, i1 true, i1 %99 + br i1 %or.cond95, label %224, label %225 + +100:; preds = %_ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i, %46 + %101 = landingpad { ptr, i32 } cleanup %104 = xor i1 %44, true br label %.body105 @@ -1799,7 +1788,7 @@ _ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i: ; preds = %108 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %110, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !noalias !160 store i64 -9223372036854775800, ptr %16, align 8, !noalias !160 invoke void @"_ZN132_$LT$meilisearch_types..deserr..DeserrError$LT$meilisearch_types..deserr..DeserrJson$C$C$GT$$u20$as$u20$deserr..DeserializeError$GT$5error17hb59743492ab65b8bE"(ptr noalias noundef nonnull sret([40 x i8]) align 8 captures(none) dereferenceable(40) %18, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %17, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(40) %16, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %22) - to label %117 unwind label %102 + to label %115 unwind label %100 111: ; preds = %108 %lpad.thr_comm.i = landingpad { ptr, i32 } @@ -1814,8 +1803,8 @@ _ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i: ; preds = %108 unreachable 114: ; preds = %99, %224 - %.sroa.9.2 = phi i32 [ %.sroa.2.0.copyload, %99 ], [ %.sroa.528.0.copyload30, %224 ] - %.sroa.07.1 = phi i64 [ %97, %99 ], [ %.sroa.026.0.copyload27, %224 ] + %.sroa.9.2 = phi i32 [ %.sroa.2.0.copyload, %95 ], [ %.sroa.528.0.copyload30, %222 ] + %.sroa.07.1 = phi i64 [ %97, %95 ], [ %.sroa.026.0.copyload27, %222 ] store i64 %.sroa.07.1, ptr %0, align 8 %.sroa.254.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %.sroa.9.2, ptr %.sroa.254.0..sroa_idx, align 8 @@ -1829,7 +1818,7 @@ _ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i: ; preds = %108 .thread387: ; preds = %107, %"_ZN6deserr19FieldState$LT$T$GT$6unwrap17h080d3852bc07cf2dE.exit102" call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) - br label %120 + br label %118 117: ; preds = %_ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16), !noalias !160 @@ -1843,6 +1832,13 @@ _ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i: ; preds = %108 %.sroa.6374.0..sroa_idx = getelementptr inbounds nuw i8, ptr %18, i64 32 %.sroa.6374.0.copyload = load i8, ptr %.sroa.6374.0..sroa_idx, align 8, !noalias !160 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18), !noalias !160 + %.sroa.6328.sroa.0.0.extract.trunc = trunc i32 %.sroa.4372.0.copyload to i8 + %.sroa.6328.sroa.6.0.extract.shift = lshr i32 %.sroa.4372.0.copyload, 8 + %.sroa.6328.sroa.6.0.extract.trunc = trunc i32 %.sroa.6328.sroa.6.0.extract.shift to i8 + %.sroa.6328.sroa.7.0.extract.shift = lshr i32 %.sroa.4372.0.copyload, 16 + %.sroa.6328.sroa.7.0.extract.trunc = trunc i32 %.sroa.6328.sroa.7.0.extract.shift to i8 + %.sroa.6328.sroa.8.0.extract.shift = lshr i32 %.sroa.4372.0.copyload, 24 + %.sroa.6328.sroa.8.0.extract.trunc = trunc nuw i32 %.sroa.6328.sroa.8.0.extract.shift to i8 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19), !noalias !160 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20), !noalias !160 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) @@ -1850,33 +1846,27 @@ _ZN5alloc3fmt6format17h7fed6a266585da9dE.exit.i: ; preds = %108 %119 = icmp eq i64 %.sroa.0371.0.copyload, -9223372036854775808 br i1 %119, label %._crit_edge537, label %125 -._crit_edge537: ; preds = %117 - %.sroa.6328.sroa.8.0.extract.shift = lshr i32 %.sroa.4372.0.copyload, 24 - %.sroa.6328.sroa.8.0.extract.trunc = trunc nuw i32 %.sroa.6328.sroa.8.0.extract.shift to i8 - %.sroa.6328.sroa.6.0.extract.shift = lshr i32 %.sroa.4372.0.copyload, 8 - %.sroa.6328.sroa.6.0.extract.trunc = trunc i32 %.sroa.6328.sroa.6.0.extract.shift to i8 - %.pre = and i32 %.sroa.4372.0.copyload, 16711680 - %.pre539 = and i32 %.sroa.4372.0.copyload, 255 - br label %120 - -120: ; preds = %._crit_edge537, %.thread387 - %.sroa.6328.sroa.0.0.insert.ext333.pre-phi = phi i32 [ %.pre539, %._crit_edge537 ], [ %.sroa.020.0.lcssa, %.thread387 ] - %.sroa.6328.sroa.7.0.insert.shift341.pre-phi = phi i32 [ %.pre, %._crit_edge537 ], [ %.sroa.023.0.lcssa, %.thread387 ] - %.sroa.6328.sroa.8.0397 = phi i8 [ %.sroa.6328.sroa.8.0.extract.trunc, %._crit_edge537 ], [ %.sroa.525.0.lcssa, %.thread387 ] - %.sroa.6328.sroa.6.0395 = phi i8 [ %.sroa.6328.sroa.6.0.extract.trunc, %._crit_edge537 ], [ %.sroa.522.0.lcssa, %.thread387 ] +._crit_edge537: ; preds = %.thread387, %117 + %.sroa.6328.sroa.8.0397 = phi i8 [ %.sroa.525.0.lcssa, %.thread387 ], [ %.sroa.6328.sroa.8.0.extract.trunc, %115 ] + %.sroa.6328.sroa.7.0396 = phi i8 [ %.sroa.023.0.lcssa, %.thread387 ], [ %.sroa.6328.sroa.7.0.extract.trunc, %115 ] + %.sroa.6328.sroa.6.0395 = phi i8 [ %.sroa.522.0.lcssa, %.thread387 ], [ %.sroa.6328.sroa.6.0.extract.trunc, %115 ] + %.sroa.6328.sroa.0.0394 = phi i8 [ %.sroa.020.0.lcssa, %.thread387 ], [ %.sroa.6328.sroa.0.0.extract.trunc, %115 ] %.sroa.6328.sroa.8.0.insert.ext344 = zext i8 %.sroa.6328.sroa.8.0397 to i32 %.sroa.6328.sroa.8.0.insert.shift345 = shl nuw i32 %.sroa.6328.sroa.8.0.insert.ext344, 24 - %.sroa.6328.sroa.7.0.insert.insert343 = or disjoint i32 %.sroa.6328.sroa.7.0.insert.shift341.pre-phi, %.sroa.6328.sroa.8.0.insert.shift345 + %.sroa.6328.sroa.7.0.insert.ext340 = zext i8 %.sroa.6328.sroa.7.0396 to i32 + %.sroa.6328.sroa.7.0.insert.shift341 = shl nuw nsw i32 %.sroa.6328.sroa.7.0.insert.ext340, 16 + %.sroa.6328.sroa.7.0.insert.insert343 = or disjoint i32 %.sroa.6328.sroa.7.0.insert.shift341, %.sroa.6328.sroa.8.0.insert.shift345 %.sroa.6328.sroa.6.0.insert.ext336 = zext i8 %.sroa.6328.sroa.6.0395 to i32 %.sroa.6328.sroa.6.0.insert.shift337 = shl nuw nsw i32 %.sroa.6328.sroa.6.0.insert.ext336, 8 %.sroa.6328.sroa.6.0.insert.insert339 = or disjoint i32 %.sroa.6328.sroa.7.0.insert.insert343, %.sroa.6328.sroa.6.0.insert.shift337 - %.sroa.6328.sroa.0.0.insert.insert335 = or disjoint i32 %.sroa.6328.sroa.6.0.insert.insert339, %.sroa.6328.sroa.0.0.insert.ext333.pre-phi - %121 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i32 %.sroa.6328.sroa.0.0.insert.insert335, ptr %121, align 8 + %.sroa.6328.sroa.0.0.insert.ext333 = zext i8 %.sroa.6328.sroa.0.0394 to i32 + %.sroa.6328.sroa.0.0.insert.insert335 = or disjoint i32 %.sroa.6328.sroa.6.0.insert.insert339, %.sroa.6328.sroa.0.0.insert.ext333 + %119 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i32 %.sroa.6328.sroa.0.0.insert.insert335, ptr %119, align 8 store i64 -9223372036854775808, ptr %0, align 8 br label %122 -122: ; preds = %125, %120 +122: ; preds = %125, %118 call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %.sroa.11331.sroa.0) %123 = load i64, ptr %1, align 8, !range !4, !noundef !5 %124 = icmp sgt i64 %123, -9223372036854775802 @@ -1983,7 +1973,7 @@ default.unreachable: ; preds = %136, %128 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 32, i1 false) invoke void @"_ZN132_$LT$meilisearch_types..deserr..DeserrError$LT$meilisearch_types..deserr..DeserrJson$C$C$GT$$u20$as$u20$deserr..DeserializeError$GT$5error17hff368a789edfaba3E"(ptr noalias noundef nonnull sret([40 x i8]) align 8 captures(none) dereferenceable(40) %30, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %29, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(88) %28, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %27) - to label %143 unwind label %220 + to label %141 unwind label %220 136: ; preds = %"_ZN73_$LT$$u5b$A$u5d$$u20$as$u20$core..slice..cmp..SlicePartialEq$LT$B$GT$$GT$5equal17h4dd919777ea29ee7E.exit111" call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %33) @@ -2048,7 +2038,7 @@ default.unreachable: ; preds = %136, %128 to label %.critedge unwind label %.loopexit.split-lp "_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit122.thread": ; preds = %142, %141, %140, %139 - %.sink = phi i64 [ -9223372036854775802, %142 ], [ -9223372036854775803, %141 ], [ %switch.select11.i120, %140 ], [ -9223372036854775807, %139 ] + %.sink = phi i64 [ -9223372036854775802, %140 ], [ -9223372036854775803, %139 ], [ %switch.select11.i120, %138 ], [ -9223372036854775807, %137 ] store i64 %.sink, ptr %33, align 8, !alias.scope !194, !noalias !191 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) store ptr %94, ptr %59, align 8 @@ -2073,7 +2063,7 @@ default.unreachable: ; preds = %136, %128 147: ; preds = %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit122.thread540", %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit122" invoke void @"_ZN4core3ptr73drop_in_place$LT$deserr..value..Value$LT$serde_json..value..Value$GT$$GT$17h42e8fd0d158193feE.llvm.1929265744411185926"(ptr noalias noundef nonnull align 8 dereferenceable(72) %33) - to label %166 unwind label %.thread399.loopexit + to label %164 unwind label %.thread399.loopexit 148: ; preds = %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit122.thread", %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit122" call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12), !noalias !197 @@ -2139,8 +2129,8 @@ default.unreachable: ; preds = %136, %128 br label %167 166: ; preds = %147, %152 - %.sroa.8234.0.ph = phi i8 [ 1, %147 ], [ 0, %152 ] - %.sroa.11237.2.ph = phi i8 [ %.sroa.11237.0515, %147 ], [ %151, %152 ] + %.sroa.8234.0.ph = phi i8 [ 1, %145 ], [ 0, %150 ] + %.sroa.11237.2.ph = phi i8 [ %.sroa.11237.0515, %145 ], [ %151, %150 ] call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %33) br label %.thread408 @@ -2160,7 +2150,7 @@ default.unreachable: ; preds = %136, %128 br label %.critedge "_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit.thread": ; preds = %134, %133, %132, %131 - %.sink552 = phi i64 [ -9223372036854775802, %134 ], [ -9223372036854775803, %133 ], [ %switch.select11.i, %132 ], [ -9223372036854775807, %131 ] + %.sink552 = phi i64 [ -9223372036854775802, %132 ], [ -9223372036854775803, %131 ], [ %switch.select11.i, %130 ], [ -9223372036854775807, %129 ] store i64 %.sink552, ptr %36, align 8, !alias.scope !184, !noalias !181 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %35) store ptr %94, ptr %63, align 8 @@ -2185,7 +2175,7 @@ default.unreachable: ; preds = %136, %128 169: ; preds = %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit.thread541", %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit" invoke void @"_ZN4core3ptr73drop_in_place$LT$deserr..value..Value$LT$serde_json..value..Value$GT$$GT$17h42e8fd0d158193feE.llvm.1929265744411185926"(ptr noalias noundef nonnull align 8 dereferenceable(72) %36) - to label %188 unwind label %.thread399.loopexit + to label %186 unwind label %.thread399.loopexit 170: ; preds = %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit.thread", %"_ZN6deserr10serde_json79_$LT$impl$u20$deserr..value..IntoValue$u20$for$u20$serde_json..value..Value$GT$10into_value17hbd07734994dbc5d2E.exit" call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9), !noalias !225 @@ -2251,8 +2241,8 @@ default.unreachable: ; preds = %136, %128 br label %189 188: ; preds = %169, %174 - %.sroa.11152.2.ph = phi i8 [ %.sroa.11152.0516, %169 ], [ %173, %174 ] - %.sroa.8149.0.ph = phi i8 [ 1, %169 ], [ 0, %174 ] + %.sroa.11152.2.ph = phi i8 [ %.sroa.11152.0516, %167 ], [ %173, %172 ] + %.sroa.8149.0.ph = phi i8 [ 1, %167 ], [ 0, %172 ] call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %36) br label %.thread408 @@ -2272,12 +2262,12 @@ default.unreachable: ; preds = %136, %128 br label %.critedge .thread408: ; preds = %166, %188, %197 - %.sroa.020.1425 = phi i8 [ %.sroa.020.0520, %197 ], [ %.sroa.020.0520, %166 ], [ %.sroa.8149.0.ph, %188 ] - %.sroa.522.1424 = phi i8 [ %.sroa.522.0519, %197 ], [ %.sroa.522.0519, %166 ], [ %.sroa.11152.2.ph, %188 ] - %.sroa.023.1423 = phi i8 [ %.sroa.023.0518, %197 ], [ %.sroa.8234.0.ph, %166 ], [ %.sroa.023.0518, %188 ] - %.sroa.525.1422 = phi i8 [ %.sroa.525.0517, %197 ], [ %.sroa.11237.2.ph, %166 ], [ %.sroa.525.0517, %188 ] - %.sroa.11152.1421 = phi i8 [ %.sroa.11152.0516, %197 ], [ %.sroa.11152.0516, %166 ], [ %.sroa.11152.2.ph, %188 ] - %.sroa.11237.1418 = phi i8 [ %.sroa.11237.0515, %197 ], [ %.sroa.11237.2.ph, %166 ], [ %.sroa.11237.0515, %188 ] + %.sroa.020.1425 = phi i8 [ %.sroa.020.0520, %195 ], [ %.sroa.020.0520, %164 ], [ %.sroa.8149.0.ph, %186 ] + %.sroa.522.1424 = phi i8 [ %.sroa.522.0519, %195 ], [ %.sroa.522.0519, %164 ], [ %.sroa.11152.2.ph, %186 ] + %.sroa.023.1423 = phi i8 [ %.sroa.023.0518, %195 ], [ %.sroa.8234.0.ph, %164 ], [ %.sroa.023.0518, %186 ] + %.sroa.525.1422 = phi i8 [ %.sroa.525.0517, %195 ], [ %.sroa.11237.2.ph, %164 ], [ %.sroa.525.0517, %186 ] + %.sroa.11152.1421 = phi i8 [ %.sroa.11152.0516, %195 ], [ %.sroa.11152.0516, %164 ], [ %.sroa.11152.2.ph, %186 ] + %.sroa.11237.1418 = phi i8 [ %.sroa.11237.0515, %195 ], [ %.sroa.11237.2.ph, %164 ], [ %.sroa.11237.0515, %186 ] call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %37) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !253 invoke void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h0aaf48f80649e9ddE.llvm.4616129397091597767"(ptr noalias noundef nonnull sret([24 x i8]) align 8 captures(none) dereferenceable(24) %6, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %38) @@ -2285,7 +2275,7 @@ default.unreachable: ; preds = %136, %128 .noexc136: ; preds = %.thread408 %190 = load i64, ptr %72, align 8, !range !6, !noalias !253, !noundef !5 - %191 = icmp eq i64 %190, 0 + %191 = icmp eq i64 %192, 0 br i1 %191, label %199, label %192 192: ; preds = %.noexc136 @@ -2295,7 +2285,7 @@ default.unreachable: ; preds = %136, %128 195: ; preds = %192 %196 = load ptr, ptr %6, align 8, !noalias !253, !nonnull !5, !noundef !5 - call void @__rust_dealloc(ptr noundef nonnull %196, i64 noundef %193, i64 noundef %190) #43 + call void @__rust_dealloc(ptr noundef nonnull %196, i64 noundef %193, i64 noundef %192) #43 br label %199 197: ; preds = %143 @@ -2305,8 +2295,8 @@ default.unreachable: ; preds = %136, %128 to label %.thread408 unwind label %.loopexit .thread399: ; preds = %.thread399.loopexit, %.thread399.loopexit.split-lp, %220, %198 - %.sroa.045.8 = phi i1 [ %.sroa.045.13, %198 ], [ false, %220 ], [ true, %.thread399.loopexit ], [ false, %.thread399.loopexit.split-lp ] - %.pn = phi { ptr, i32 } [ %lpad.phi460, %198 ], [ %lpad.thr_comm.split-lp, %220 ], [ %lpad.loopexit, %.thread399.loopexit ], [ %lpad.loopexit.split-lp, %.thread399.loopexit.split-lp ] + %.sroa.045.8 = phi i1 [ %.sroa.045.13, %196 ], [ false, %218 ], [ true, %.thread399.loopexit ], [ false, %.thread399.loopexit.split-lp ] + %.pn = phi { ptr, i32 } [ %lpad.phi460, %196 ], [ %lpad.thr_comm.split-lp, %218 ], [ %lpad.loopexit, %.thread399.loopexit ], [ %lpad.loopexit.split-lp, %.thread399.loopexit.split-lp ] invoke void @"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17h3912e219446a661dE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %38) #41 to label %79 unwind label %221 @@ -2335,7 +2325,7 @@ default.unreachable: ; preds = %136, %128 %200 = load ptr, ptr %53, align 8, !alias.scope !262, !noalias !129, !nonnull !5, !noundef !5 %201 = load ptr, ptr %54, align 8, !alias.scope !262, !noalias !129, !nonnull !5, !noundef !5 %202 = icmp eq ptr %201, %200 - br i1 %202, label %._crit_edge.loopexit, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i" + br i1 %202, label %._crit_edge, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd46226d103d79187E.llvm.331090089658796353.exit.i.i" .critedge: ; preds = %189, %167, %145 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %37) @@ -2373,7 +2363,7 @@ default.unreachable: ; preds = %136, %128 store ptr %39, ptr %4, align 8, !noalias !151 %213 = load ptr, ptr %54, align 8, !alias.scope !279, !nonnull !5, !noundef !5 %214 = invoke noundef i64 @_ZN4core4iter6traits10exact_size17ExactSizeIterator3len17hde05e5919f9ad533E.llvm.3021571406010367114(ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %39) - to label %217 unwind label %215 + to label %215 unwind label %215 215: ; preds = %217, %212 %216 = landingpad { ptr, i32 } @@ -2429,7 +2419,7 @@ default.unreachable: ; preds = %136, %128 227: ; preds = %.body105 invoke void @"_ZN4core3ptr73drop_in_place$LT$deserr..value..Value$LT$serde_json..value..Value$GT$$GT$17h42e8fd0d158193feE.llvm.784653754634180241"(ptr noalias noundef nonnull align 8 dereferenceable(72) %1) #41 - to label %226 unwind label %221 + to label %224 unwind label %221 } ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable diff --git a/bench/meshlab/optimized/gltf_loader.ll b/bench/meshlab/optimized/gltf_loader.ll index 27630f16ece..c0ce179711d 100644 --- a/bench/meshlab/optimized/gltf_loader.ll +++ b/bench/meshlab/optimized/gltf_loader.ll @@ -14370,12 +14370,9 @@ _ZL13stbi__get16leP13stbi__context.exit: ; preds = %190, %193, %_ZL19st %213 = phi ptr [ %187, %190 ], [ %.sink.i.i5.i, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i ], [ %187, %193 ] %214 = phi ptr [ %191, %190 ], [ %212, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i ], [ %188, %193 ] %.0.i6.i = phi i8 [ %192, %190 ], [ %211, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i ], [ 0, %193 ] - %215 = zext i8 %.0.i.i to i32 - %216 = zext i8 %.0.i6.i to i32 - %217 = shl nuw nsw i32 %216, 8 - %218 = or disjoint i32 %217, %215 - %219 = icmp eq i32 %218, 0 - br i1 %219, label %_ZL10stbi__get8P13stbi__context.exit79.thread, label %220 + %215 = or i8 %.0.i6.i, %.0.i.i + %216 = icmp eq i8 %215, 0 + br i1 %216, label %_ZL10stbi__get8P13stbi__context.exit79.thread, label %217 220: ; preds = %_ZL13stbi__get16leP13stbi__context.exit %221 = icmp ult ptr %214, %213 @@ -14401,7 +14398,7 @@ _ZL13stbi__get16leP13stbi__context.exit: ; preds = %190, %193, %_ZL19st %233 = getelementptr inbounds nuw i8, ptr %0, i64 56 %234 = getelementptr inbounds nuw i8, ptr %0, i64 52 %235 = load i32, ptr %234, align 4 - %236 = tail call noundef i32 %230(ptr noundef %232, ptr noundef nonnull %233, i32 noundef %235) + %236 = tail call noundef i32 %227(ptr noundef %232, ptr noundef nonnull %233, i32 noundef %235) %237 = icmp eq i32 %236, 0 br i1 %237, label %238, label %240 @@ -14418,17 +14415,17 @@ _ZL13stbi__get16leP13stbi__context.exit: ; preds = %190, %193, %_ZL19st br label %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 _ZL19stbi__refill_bufferP13stbi__context.exit.i.i92: ; preds = %240, %238 - %243 = phi i8 [ 0, %238 ], [ %.pre.i.i91, %240 ] - %.sink.i.i.i93 = phi ptr [ %239, %238 ], [ %242, %240 ] + %243 = phi i8 [ 0, %235 ], [ %.pre.i.i91, %237 ] + %.sink.i.i.i93 = phi ptr [ %239, %235 ], [ %242, %237 ] store ptr %.sink.i.i.i93, ptr %4, align 8 %244 = getelementptr inbounds nuw i8, ptr %0, i64 57 store ptr %244, ptr %2, align 8 br label %_ZL10stbi__get8P13stbi__context.exit.i94 _ZL10stbi__get8P13stbi__context.exit.i94: ; preds = %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92, %225, %222 - %245 = phi ptr [ %213, %222 ], [ %.sink.i.i.i93, %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 ], [ %213, %225 ] - %246 = phi ptr [ %223, %222 ], [ %244, %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 ], [ %214, %225 ] - %.0.i.i95 = phi i8 [ %224, %222 ], [ %243, %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 ], [ 0, %225 ] + %245 = phi ptr [ %213, %219 ], [ %.sink.i.i.i93, %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 ], [ %213, %222 ] + %246 = phi ptr [ %223, %219 ], [ %244, %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 ], [ %214, %222 ] + %.0.i.i95 = phi i8 [ %224, %219 ], [ %243, %_ZL19stbi__refill_bufferP13stbi__context.exit.i.i92 ], [ 0, %222 ] %247 = icmp ult ptr %246, %245 br i1 %247, label %248, label %251 @@ -14452,7 +14449,7 @@ _ZL10stbi__get8P13stbi__context.exit.i94: ; preds = %_ZL19stbi__refill_b %259 = getelementptr inbounds nuw i8, ptr %0, i64 56 %260 = getelementptr inbounds nuw i8, ptr %0, i64 52 %261 = load i32, ptr %260, align 4 - %262 = tail call noundef i32 %256(ptr noundef %258, ptr noundef nonnull %259, i32 noundef %261) + %262 = tail call noundef i32 %253(ptr noundef %258, ptr noundef nonnull %259, i32 noundef %261) %263 = icmp eq i32 %262, 0 br i1 %263, label %264, label %266 @@ -14469,74 +14466,71 @@ _ZL10stbi__get8P13stbi__context.exit.i94: ; preds = %_ZL19stbi__refill_b br label %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 _ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98: ; preds = %266, %264 - %269 = phi i8 [ 0, %264 ], [ %.pre.i3.i97, %266 ] - %.sink.i.i5.i99 = phi ptr [ %265, %264 ], [ %268, %266 ] + %269 = phi i8 [ 0, %261 ], [ %.pre.i3.i97, %263 ] + %.sink.i.i5.i99 = phi ptr [ %265, %261 ], [ %268, %263 ] store ptr %.sink.i.i5.i99, ptr %4, align 8 %270 = getelementptr inbounds nuw i8, ptr %0, i64 57 store ptr %270, ptr %2, align 8 br label %_ZL13stbi__get16leP13stbi__context.exit101 _ZL13stbi__get16leP13stbi__context.exit101: ; preds = %248, %251, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 - %271 = phi ptr [ %245, %248 ], [ %.sink.i.i5.i99, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 ], [ %245, %251 ] - %272 = phi ptr [ %249, %248 ], [ %270, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 ], [ %246, %251 ] - %.0.i6.i100 = phi i8 [ %250, %248 ], [ %269, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 ], [ 0, %251 ] - %273 = zext i8 %.0.i.i95 to i32 - %274 = zext i8 %.0.i6.i100 to i32 - %275 = shl nuw nsw i32 %274, 8 - %276 = or disjoint i32 %275, %273 - %277 = icmp eq i32 %276, 0 - br i1 %277, label %_ZL10stbi__get8P13stbi__context.exit79.thread, label %278 - -278: ; preds = %_ZL13stbi__get16leP13stbi__context.exit101 - %279 = icmp ult ptr %272, %271 - br i1 %279, label %280, label %283 - -280: ; preds = %278 - %281 = getelementptr inbounds nuw i8, ptr %272, i64 1 - store ptr %281, ptr %2, align 8 - %282 = load i8, ptr %272, align 1 + %271 = phi ptr [ %245, %245 ], [ %.sink.i.i5.i99, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 ], [ %245, %248 ] + %272 = phi ptr [ %249, %245 ], [ %270, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 ], [ %246, %248 ] + %.0.i6.i100 = phi i8 [ %250, %245 ], [ %269, %_ZL19stbi__refill_bufferP13stbi__context.exit.i4.i98 ], [ 0, %248 ] + %270 = or i8 %.0.i6.i100, %.0.i.i95 + %271 = icmp eq i8 %270, 0 + br i1 %271, label %_ZL10stbi__get8P13stbi__context.exit79.thread, label %272 + +272:; preds = %_ZL13stbi__get16leP13stbi__context.exit101 + %273 = icmp ult ptr %269, %271 + br i1 %273, label %274, label %277 + +274: ; preds = %272 + %275 = getelementptr inbounds nuw i8, ptr %269, i64 1 + store ptr %275, ptr %2, align 8 + %276 = load i8, ptr %269, align 1 br label %_ZL10stbi__get8P13stbi__context.exit107 -283: ; preds = %278 +283: ; preds = %272 %284 = getelementptr inbounds nuw i8, ptr %0, i64 48 %285 = load i32, ptr %284, align 8 %.not.i102 = icmp eq i32 %285, 0 - br i1 %.not.i102, label %_ZL10stbi__get8P13stbi__context.exit107, label %286 + br i1 %.not.i102, label %_ZL10stbi__get8P13stbi__context.exit107, label %280 -286: ; preds = %283 - %287 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %288 = load ptr, ptr %287, align 8 - %289 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %290 = load ptr, ptr %289, align 8 - %291 = getelementptr inbounds nuw i8, ptr %0, i64 56 - %292 = getelementptr inbounds nuw i8, ptr %0, i64 52 - %293 = load i32, ptr %292, align 4 - %294 = tail call noundef i32 %288(ptr noundef %290, ptr noundef nonnull %291, i32 noundef %293) - %295 = icmp eq i32 %294, 0 - br i1 %295, label %296, label %298 - -296: ; preds = %286 - store i32 0, ptr %284, align 8 - %297 = getelementptr inbounds nuw i8, ptr %0, i64 57 - store i8 0, ptr %291, align 1 +296: ; preds = %283 + %281 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %282 = load ptr, ptr %281, align 8 + %283 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %284 = load ptr, ptr %283, align 8 + %285 = getelementptr inbounds nuw i8, ptr %0, i64 56 + %286 = getelementptr inbounds nuw i8, ptr %0, i64 52 + %287 = load i32, ptr %286, align 4 + %288 = tail call noundef i32 %282(ptr noundef %284, ptr noundef nonnull %285, i32 noundef %287) + %289 = icmp eq i32 %288, 0 + br i1 %289, label %290, label %292 + +290: ; preds = %280 + store i32 0, ptr %278, align 8 + %291 = getelementptr inbounds nuw i8, ptr %0, i64 57 + store i8 0, ptr %285, align 1 br label %_ZL19stbi__refill_bufferP13stbi__context.exit.i104 -298: ; preds = %286 - %299 = sext i32 %294 to i64 - %300 = getelementptr inbounds i8, ptr %291, i64 %299 - %.pre.i103 = load i8, ptr %291, align 1 +298: ; preds = %280 + %299 = sext i32 %288 to i64 + %300 = getelementptr inbounds i8, ptr %285, i64 %299 + %.pre.i103 = load i8, ptr %285, align 1 br label %_ZL19stbi__refill_bufferP13stbi__context.exit.i104 -_ZL19stbi__refill_bufferP13stbi__context.exit.i104: ; preds = %298, %296 - %301 = phi i8 [ 0, %296 ], [ %.pre.i103, %298 ] - %.sink.i.i105 = phi ptr [ %297, %296 ], [ %300, %298 ] +_ZL19stbi__refill_bufferP13stbi__context.exit.i104: ; preds = %298, %290 + %301 = phi i8 [ 0, %290 ], [ %.pre.i103, %292 ] + %.sink.i.i105 = phi ptr [ %291, %290 ], [ %300, %292 ] store ptr %.sink.i.i105, ptr %4, align 8 %302 = getelementptr inbounds nuw i8, ptr %0, i64 57 store ptr %302, ptr %2, align 8 br label %_ZL10stbi__get8P13stbi__context.exit107 -_ZL10stbi__get8P13stbi__context.exit107: ; preds = %280, %283, %_ZL19stbi__refill_bufferP13stbi__context.exit.i104 - %.0.i106 = phi i8 [ %282, %280 ], [ %301, %_ZL19stbi__refill_bufferP13stbi__context.exit.i104 ], [ 0, %283 ] +_ZL10stbi__get8P13stbi__context.exit107: ; preds = %274, %283, %_ZL19stbi__refill_bufferP13stbi__context.exit.i104 + %.0.i106 = phi i8 [ %276, %274 ], [ %301, %_ZL19stbi__refill_bufferP13stbi__context.exit.i104 ], [ 0, %277 ] br i1 %.not, label %305, label %switch.early.test switch.early.test: ; preds = %_ZL10stbi__get8P13stbi__context.exit107 @@ -14559,7 +14553,7 @@ switch.early.test: ; preds = %_ZL10stbi__get8P13s br label %_ZL10stbi__get8P13stbi__context.exit79.thread _ZL10stbi__get8P13stbi__context.exit79.thread: ; preds = %108, %switch.early.test, %305, %_ZL10stbi__get8P13stbi__context.exit79, %_ZL13stbi__get16leP13stbi__context.exit101, %_ZL13stbi__get16leP13stbi__context.exit, %143, %84, %_ZL10stbi__get8P13stbi__context.exit65, %306 - %.0 = phi i32 [ 0, %_ZL10stbi__get8P13stbi__context.exit65 ], [ 0, %84 ], [ 0, %_ZL10stbi__get8P13stbi__context.exit79 ], [ 0, %_ZL13stbi__get16leP13stbi__context.exit ], [ 0, %_ZL13stbi__get16leP13stbi__context.exit101 ], [ 0, %305 ], [ 1, %306 ], [ 0, %143 ], [ %304, %switch.early.test ], [ 0, %108 ] + %.0 = phi i32 [ 0, %_ZL10stbi__get8P13stbi__context.exit65 ], [ 0, %84 ], [ 0, %_ZL10stbi__get8P13stbi__context.exit79 ], [ 0, %_ZL13stbi__get16leP13stbi__context.exit ], [ 0, %_ZL13stbi__get16leP13stbi__context.exit101 ], [ 0, %299 ], [ 1, %300 ], [ 0, %143 ], [ %304, %switch.early.test ], [ 0, %108 ] %307 = getelementptr inbounds nuw i8, ptr %0, i64 200 %308 = load ptr, ptr %307, align 8 store ptr %308, ptr %2, align 8 diff --git a/bench/mold/optimized/arch-m68k.ll b/bench/mold/optimized/arch-m68k.ll index 01b95d3255b..28ae74ac246 100644 --- a/bench/mold/optimized/arch-m68k.ll +++ b/bench/mold/optimized/arch-m68k.ll @@ -2335,54 +2335,58 @@ define linkonce_odr dso_local { ptr, i64 } @_ZN4mold12InputSectionINS_4M68KEE12g %24 = load i8, ptr %23, align 1, !tbaa !258 %25 = zext i8 %24 to i16 %26 = or disjoint i16 %22, %25 - switch i16 %26, label %52 [ - i16 -15, label %184 - i16 -14, label %184 - i16 0, label %184 - i16 -1, label %27 - ] + %.off = add i16 %26, 15 + %switch = icmp ult i16 %.off, 2 + %27 = or i8 %24, %20 + %28 = icmp eq i8 %27, 0 + %or.cond = or i1 %28, %switch + br i1 %or.cond, label %188, label %29 27: ; preds = %3 - %28 = getelementptr inbounds nuw i8, ptr %4, i64 696 - %29 = ptrtoint ptr %18 to i64 - %30 = ptrtoint ptr %15 to i64 - %31 = sub i64 %29, %30 - %32 = load ptr, ptr %28, align 8, !tbaa !378 - %33 = ashr exact i64 %31, 2 - %34 = getelementptr inbounds nuw i8, ptr %32, i64 %33 - %35 = load i8, ptr %34, align 1, !tbaa !258 - %36 = zext i8 %35 to i64 - %37 = shl nuw nsw i64 %36, 24 - %38 = getelementptr inbounds nuw i8, ptr %34, i64 1 + %30 = icmp eq i16 %26, -1 + br i1 %30, label %31, label %56 + +31:; preds = %29 + %32 = getelementptr inbounds nuw i8, ptr %4, i64 696 + %33 = ptrtoint ptr %18 to i64 + %34 = ptrtoint ptr %15 to i64 + %35 = sub i64 %33, %34 + %36 = load ptr, ptr %32, align 8, !tbaa !378 + %37 = ashr exact i64 %35, 2 + %38 = getelementptr inbounds nuw i8, ptr %36, i64 %37 %39 = load i8, ptr %38, align 1, !tbaa !258 %40 = zext i8 %39 to i64 - %41 = shl nuw nsw i64 %40, 16 - %42 = or disjoint i64 %41, %37 - %43 = getelementptr inbounds nuw i8, ptr %34, i64 2 - %44 = load i8, ptr %43, align 1, !tbaa !258 - %45 = zext i8 %44 to i64 - %46 = shl nuw nsw i64 %45, 8 - %47 = or disjoint i64 %42, %46 - %48 = getelementptr inbounds nuw i8, ptr %34, i64 3 - %49 = load i8, ptr %48, align 1, !tbaa !258 - %50 = zext i8 %49 to i64 - %51 = or disjoint i64 %47, %50 + %41 = shl nuw nsw i64 %40, 24 + %42 = getelementptr inbounds nuw i8, ptr %38, i64 1 + %43 = load i8, ptr %42, align 1, !tbaa !258 + %44 = zext i8 %43 to i64 + %45 = shl nuw nsw i64 %44, 16 + %46 = or disjoint i64 %45, %41 + %47 = getelementptr inbounds nuw i8, ptr %38, i64 2 + %48 = load i8, ptr %47, align 1, !tbaa !258 + %49 = zext i8 %48 to i64 + %50 = shl nuw nsw i64 %49, 8 + %51 = or disjoint i64 %46, %50 + %52 = getelementptr inbounds nuw i8, ptr %38, i64 3 + %53 = load i8, ptr %52, align 1, !tbaa !258 + %54 = zext i8 %53 to i64 + %55 = or disjoint i64 %51, %54 br label %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit -52: ; preds = %3 +52: ; preds = %29 %53 = icmp eq i8 %20, -1 %54 = zext i16 %26 to i64 %spec.select.i = select i1 %53, i64 0, i64 %54 br label %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit -_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit: ; preds = %27, %52 - %.0.i = phi i64 [ %51, %27 ], [ %spec.select.i, %52 ] +_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit: ; preds = %31, %52 + %.0.i = phi i64 [ %55, %31 ], [ %spec.select.i, %56 ] %55 = getelementptr inbounds nuw i8, ptr %4, i64 352 %56 = load ptr, ptr %55, align 8, !tbaa !381 %57 = getelementptr inbounds nuw %"class.std::unique_ptr.327", ptr %56, i64 %.0.i %58 = load ptr, ptr %57, align 8, !tbaa !384 %.not = icmp eq ptr %58, null - br i1 %.not, label %184, label %59 + br i1 %.not, label %188, label %59 59: ; preds = %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit %60 = getelementptr inbounds nuw i8, ptr %18, i64 12 @@ -2390,156 +2394,156 @@ _ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit: ; preds = %27 %62 = and i8 %61, 15 %63 = icmp eq i8 %62, 3 %64 = getelementptr inbounds nuw i8, ptr %18, i64 4 - %65 = load i8, ptr %64, align 1, !tbaa !258 - %66 = zext i8 %65 to i64 - %67 = shl nuw nsw i64 %66, 24 - %68 = getelementptr inbounds nuw i8, ptr %18, i64 5 %69 = load i8, ptr %68, align 1, !tbaa !258 %70 = zext i8 %69 to i64 - %71 = shl nuw nsw i64 %70, 16 - %72 = or disjoint i64 %71, %67 - %73 = getelementptr inbounds nuw i8, ptr %18, i64 6 - %74 = load i8, ptr %73, align 1, !tbaa !258 - %75 = zext i8 %74 to i64 - %76 = shl nuw nsw i64 %75, 8 - %77 = or disjoint i64 %72, %76 - %78 = getelementptr inbounds nuw i8, ptr %18, i64 7 - %79 = load i8, ptr %78, align 1, !tbaa !258 - %80 = zext i8 %79 to i64 - %81 = or disjoint i64 %77, %80 - br i1 %63, label %82, label %133 - -82: ; preds = %59 - %83 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %84 = load i8, ptr %83, align 1, !tbaa !258 - %85 = zext i8 %84 to i32 - %86 = shl nuw i32 %85, 24 - %87 = getelementptr inbounds nuw i8, ptr %2, i64 9 + %71 = shl nuw nsw i64 %70, 24 + %72 = getelementptr inbounds nuw i8, ptr %18, i64 5 + %73 = load i8, ptr %72, align 1, !tbaa !258 + %74 = zext i8 %73 to i64 + %75 = shl nuw nsw i64 %74, 16 + %76 = or disjoint i64 %75, %71 + %77 = getelementptr inbounds nuw i8, ptr %18, i64 6 + %78 = load i8, ptr %77, align 1, !tbaa !258 + %79 = zext i8 %78 to i64 + %80 = shl nuw nsw i64 %79, 8 + %81 = or disjoint i64 %76, %80 + %82 = getelementptr inbounds nuw i8, ptr %18, i64 7 + %83 = load i8, ptr %82, align 1, !tbaa !258 + %84 = zext i8 %83 to i64 + %85 = or disjoint i64 %81, %84 + br i1 %67, label %86, label %137 + +86:; preds = %59 + %87 = getelementptr inbounds nuw i8, ptr %2, i64 8 %88 = load i8, ptr %87, align 1, !tbaa !258 %89 = zext i8 %88 to i32 - %90 = shl nuw nsw i32 %89, 16 - %91 = or disjoint i32 %90, %86 - %92 = getelementptr inbounds nuw i8, ptr %2, i64 10 - %93 = load i8, ptr %92, align 1, !tbaa !258 - %94 = zext i8 %93 to i32 - %95 = shl nuw nsw i32 %94, 8 - %96 = or disjoint i32 %91, %95 - %97 = getelementptr inbounds nuw i8, ptr %2, i64 11 - %98 = load i8, ptr %97, align 1, !tbaa !258 - %99 = zext i8 %98 to i32 - %100 = or disjoint i32 %96, %99 - %101 = sext i32 %100 to i64 - %102 = add nsw i64 %81, %101 - %103 = getelementptr inbounds nuw i8, ptr %58, i64 48 - %104 = load ptr, ptr %103, align 8, !tbaa !386 - %105 = getelementptr inbounds nuw i8, ptr %58, i64 56 - %106 = load ptr, ptr %105, align 8, !tbaa !388 - %107 = ptrtoint ptr %104 to i64 - %108 = ptrtoint ptr %106 to i64 - %109 = sub i64 %108, %107 - %110 = ashr exact i64 %109, 2 - %111 = icmp sgt i64 %110, 0 - br i1 %111, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit - -_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i: ; preds = %82, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i - %.013.i.i.i = phi i64 [ %.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %110, %82 ] - %.sroa.011.012.i.i.i = phi ptr [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %104, %82 ] - %112 = lshr i64 %.013.i.i.i, 1 - %113 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i, i64 %112 - %114 = load i32, ptr %113, align 4, !tbaa !389 - %115 = zext i32 %114 to i64 - %116 = icmp slt i64 %102, %115 - %117 = getelementptr inbounds nuw i8, ptr %113, i64 4 - %118 = xor i64 %112, -1 - %119 = add nsw i64 %.013.i.i.i, %118 - %.sroa.011.1.i.i.i = select i1 %116, ptr %.sroa.011.012.i.i.i, ptr %117 - %.1.i.i.i = select i1 %116, i64 %112, i64 %119 - %120 = icmp sgt i64 %.1.i.i.i, 0 - br i1 %120, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit, !llvm.loop !390 - -_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, %82 - %.sroa.011.0.lcssa.i.i.i = phi ptr [ %104, %82 ], [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ] - %121 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i, i64 -4 - %122 = ptrtoint ptr %121 to i64 - %123 = sub i64 %122, %107 - %124 = ashr exact i64 %123, 2 - %125 = getelementptr inbounds nuw i8, ptr %58, i64 8 - %126 = load ptr, ptr %125, align 8, !tbaa !391 - %127 = getelementptr inbounds nuw ptr, ptr %126, i64 %124 - %128 = getelementptr inbounds nuw i8, ptr %104, i64 %123 - %129 = load i32, ptr %128, align 4, !tbaa !389 - %130 = zext i32 %129 to i64 - %131 = sub nsw i64 %102, %130 - %132 = load ptr, ptr %127, align 8, !tbaa !394 - br label %184 - -133: ; preds = %59 - %134 = getelementptr inbounds nuw i8, ptr %58, i64 48 - %135 = load ptr, ptr %134, align 8, !tbaa !386 - %136 = getelementptr inbounds nuw i8, ptr %58, i64 56 - %137 = load ptr, ptr %136, align 8, !tbaa !388 - %138 = ptrtoint ptr %135 to i64 - %139 = ptrtoint ptr %137 to i64 - %140 = sub i64 %139, %138 - %141 = ashr exact i64 %140, 2 - %142 = icmp sgt i64 %141, 0 - br i1 %142, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 - -_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17: ; preds = %133, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 - %.013.i.i.i18 = phi i64 [ %.1.i.i.i23, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %141, %133 ] - %.sroa.011.012.i.i.i19 = phi ptr [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %135, %133 ] - %143 = lshr i64 %.013.i.i.i18, 1 - %144 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i19, i64 %143 - %145 = load i32, ptr %144, align 4, !tbaa !389 - %146 = zext i32 %145 to i64 - %147 = icmp samesign ult i64 %81, %146 - %148 = getelementptr inbounds nuw i8, ptr %144, i64 4 - %149 = xor i64 %143, -1 - %150 = add nsw i64 %.013.i.i.i18, %149 - %.sroa.011.1.i.i.i22 = select i1 %147, ptr %.sroa.011.012.i.i.i19, ptr %148 - %.1.i.i.i23 = select i1 %147, i64 %143, i64 %150 - %151 = icmp sgt i64 %.1.i.i.i23, 0 - br i1 %151, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24, !llvm.loop !390 - -_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, %133 - %.sroa.011.0.lcssa.i.i.i14 = phi ptr [ %135, %133 ], [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ] - %152 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i14, i64 -4 - %153 = ptrtoint ptr %152 to i64 - %154 = sub i64 %153, %138 - %155 = ashr exact i64 %154, 2 - %156 = getelementptr inbounds nuw i8, ptr %58, i64 8 - %157 = load ptr, ptr %156, align 8, !tbaa !391 - %158 = getelementptr inbounds nuw ptr, ptr %157, i64 %155 - %159 = getelementptr inbounds nuw i8, ptr %135, i64 %154 - %160 = load i32, ptr %159, align 4, !tbaa !389 - %161 = zext i32 %160 to i64 - %162 = sub nsw i64 %81, %161 - %163 = load ptr, ptr %158, align 8, !tbaa !394 - %164 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %165 = load i8, ptr %164, align 1, !tbaa !258 - %166 = zext i8 %165 to i32 - %167 = shl nuw i32 %166, 24 - %168 = getelementptr inbounds nuw i8, ptr %2, i64 9 + %90 = shl nuw i32 %89, 24 + %91 = getelementptr inbounds nuw i8, ptr %2, i64 9 + %92 = load i8, ptr %91, align 1, !tbaa !258 + %93 = zext i8 %92 to i32 + %94 = shl nuw nsw i32 %93, 16 + %95 = or disjoint i32 %94, %90 + %96 = getelementptr inbounds nuw i8, ptr %2, i64 10 + %97 = load i8, ptr %96, align 1, !tbaa !258 + %98 = zext i8 %97 to i32 + %99 = shl nuw nsw i32 %98, 8 + %100 = or disjoint i32 %95, %99 + %101 = getelementptr inbounds nuw i8, ptr %2, i64 11 + %102 = load i8, ptr %101, align 1, !tbaa !258 + %103 = zext i8 %102 to i32 + %104 = or disjoint i32 %100, %103 + %105 = sext i32 %104 to i64 + %106 = add nsw i64 %85, %105 + %107 = getelementptr inbounds nuw i8, ptr %62, i64 48 + %108 = load ptr, ptr %107, align 8, !tbaa !386 + %109 = getelementptr inbounds nuw i8, ptr %62, i64 56 + %110 = load ptr, ptr %109, align 8, !tbaa !388 + %111 = ptrtoint ptr %108 to i64 + %112 = ptrtoint ptr %110 to i64 + %113 = sub i64 %112, %111 + %114 = ashr exact i64 %113, 2 + %115 = icmp sgt i64 %114, 0 + br i1 %115, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit + +_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i:; preds = %86, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i + %.013.i.i.i = phi i64 [ %.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %114, %86 ] + %.sroa.011.012.i.i.i = phi ptr [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %108, %86 ] + %116 = lshr i64 %.013.i.i.i, 1 + %117 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i, i64 %116 + %118 = load i32, ptr %117, align 4, !tbaa !389 + %119 = zext i32 %118 to i64 + %120 = icmp slt i64 %106, %119 + %121 = getelementptr inbounds nuw i8, ptr %117, i64 4 + %122 = xor i64 %116, -1 + %123 = add nsw i64 %.013.i.i.i, %122 + %.sroa.011.1.i.i.i = select i1 %120, ptr %.sroa.011.012.i.i.i, ptr %121 + %.1.i.i.i = select i1 %120, i64 %116, i64 %123 + %124 = icmp sgt i64 %.1.i.i.i, 0 + br i1 %124, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit, !llvm.loop !390 + +_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit:; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, %86 + %.sroa.011.0.lcssa.i.i.i = phi ptr [ %108, %86 ], [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ] + %125 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i, i64 -4 + %126 = ptrtoint ptr %125 to i64 + %127 = sub i64 %126, %111 + %128 = ashr exact i64 %127, 2 + %129 = getelementptr inbounds nuw i8, ptr %62, i64 8 + %130 = load ptr, ptr %129, align 8, !tbaa !391 + %131 = getelementptr inbounds nuw ptr, ptr %130, i64 %128 + %132 = getelementptr inbounds nuw i8, ptr %108, i64 %127 + %133 = load i32, ptr %132, align 4, !tbaa !389 + %134 = zext i32 %133 to i64 + %135 = sub nsw i64 %106, %134 + %136 = load ptr, ptr %131, align 8, !tbaa !394 + br label %188 + +137:; preds = %63 + %138 = getelementptr inbounds nuw i8, ptr %58, i64 48 + %139 = load ptr, ptr %138, align 8, !tbaa !386 + %140 = getelementptr inbounds nuw i8, ptr %62, i64 56 + %141 = load ptr, ptr %140, align 8, !tbaa !388 + %142 = ptrtoint ptr %139 to i64 + %143 = ptrtoint ptr %141 to i64 + %144 = sub i64 %143, %142 + %145 = ashr exact i64 %144, 2 + %146 = icmp sgt i64 %145, 0 + br i1 %146, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 + +_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17:; preds = %137, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 + %.013.i.i.i18 = phi i64 [ %.1.i.i.i23, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %145, %137 ] + %.sroa.011.012.i.i.i19 = phi ptr [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %139, %137 ] + %147 = lshr i64 %.013.i.i.i18, 1 + %148 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i19, i64 %147 + %149 = load i32, ptr %148, align 4, !tbaa !389 + %150 = zext i32 %149 to i64 + %151 = icmp samesign ult i64 %85, %150 + %152 = getelementptr inbounds nuw i8, ptr %148, i64 4 + %153 = xor i64 %147, -1 + %154 = add nsw i64 %.013.i.i.i18, %153 + %.sroa.011.1.i.i.i22 = select i1 %151, ptr %.sroa.011.012.i.i.i19, ptr %152 + %.1.i.i.i23 = select i1 %151, i64 %147, i64 %154 + %155 = icmp sgt i64 %.1.i.i.i23, 0 + br i1 %155, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24, !llvm.loop !390 + +_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24:; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, %137 + %.sroa.011.0.lcssa.i.i.i14 = phi ptr [ %139, %137 ], [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ] + %156 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i14, i64 -4 + %157 = ptrtoint ptr %156 to i64 + %158 = sub i64 %157, %142 + %159 = ashr exact i64 %158, 2 + %160 = getelementptr inbounds nuw i8, ptr %58, i64 8 + %161 = load ptr, ptr %160, align 8, !tbaa !391 + %162 = getelementptr inbounds nuw ptr, ptr %161, i64 %159 + %163 = getelementptr inbounds nuw i8, ptr %139, i64 %158 + %164 = load i32, ptr %163, align 4, !tbaa !389 + %165 = zext i32 %164 to i64 + %166 = sub nsw i64 %85, %165 + %167 = load ptr, ptr %162, align 8, !tbaa !394 + %168 = getelementptr inbounds nuw i8, ptr %2, i64 8 %169 = load i8, ptr %168, align 1, !tbaa !258 %170 = zext i8 %169 to i32 - %171 = shl nuw nsw i32 %170, 16 - %172 = or disjoint i32 %171, %167 - %173 = getelementptr inbounds nuw i8, ptr %2, i64 10 - %174 = load i8, ptr %173, align 1, !tbaa !258 - %175 = zext i8 %174 to i32 - %176 = shl nuw nsw i32 %175, 8 - %177 = or disjoint i32 %172, %176 - %178 = getelementptr inbounds nuw i8, ptr %2, i64 11 - %179 = load i8, ptr %178, align 1, !tbaa !258 - %180 = zext i8 %179 to i32 - %181 = or disjoint i32 %177, %180 - %182 = sext i32 %181 to i64 - %183 = add nsw i64 %162, %182 - br label %184 - -184: ; preds = %3, %3, %3, %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 - %.sroa.027.0 = phi ptr [ %132, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit ], [ %163, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 ], [ null, %3 ], [ null, %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ null, %3 ], [ null, %3 ] - %.sroa.5.0 = phi i64 [ %131, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit ], [ %183, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 ], [ 0, %3 ], [ 0, %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ 0, %3 ], [ 0, %3 ] + %171 = shl nuw i32 %170, 24 + %172 = getelementptr inbounds nuw i8, ptr %2, i64 9 + %173 = load i8, ptr %172, align 1, !tbaa !258 + %174 = zext i8 %173 to i32 + %175 = shl nuw nsw i32 %174, 16 + %176 = or disjoint i32 %175, %171 + %177 = getelementptr inbounds nuw i8, ptr %2, i64 10 + %178 = load i8, ptr %177, align 1, !tbaa !258 + %179 = zext i8 %178 to i32 + %180 = shl nuw nsw i32 %179, 8 + %181 = or disjoint i32 %176, %180 + %182 = getelementptr inbounds nuw i8, ptr %2, i64 11 + %183 = load i8, ptr %182, align 1, !tbaa !258 + %184 = zext i8 %183 to i32 + %185 = or disjoint i32 %181, %184 + %186 = sext i32 %185 to i64 + %187 = add nsw i64 %166, %186 + br label %188 + +188: ; preds = %3, %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 + %.sroa.027.0 = phi ptr [ %136, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit ], [ %167, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 ], [ null, %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ null, %3 ] + %.sroa.5.0 = phi i64 [ %135, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit ], [ %187, %_ZN4mold16MergeableSectionINS_4M68KEE12get_fragmentEl.exit24 ], [ 0, %_ZN4mold10ObjectFileINS_4M68KEE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ 0, %3 ] %.fca.0.insert = insertvalue { ptr, i64 } poison, ptr %.sroa.027.0, 0 %.fca.1.insert = insertvalue { ptr, i64 } %.fca.0.insert, i64 %.sroa.5.0, 1 ret { ptr, i64 } %.fca.1.insert diff --git a/bench/mold/optimized/arch-sparc64.ll b/bench/mold/optimized/arch-sparc64.ll index 9649330b127..f915fdfbcb7 100644 --- a/bench/mold/optimized/arch-sparc64.ll +++ b/bench/mold/optimized/arch-sparc64.ll @@ -4554,54 +4554,58 @@ define linkonce_odr dso_local { ptr, i64 } @_ZN4mold12InputSectionINS_7SPARC64EE %28 = load i8, ptr %27, align 1, !tbaa !259 %29 = zext i8 %28 to i16 %30 = or disjoint i16 %26, %29 - switch i16 %30, label %56 [ - i16 -15, label %246 - i16 -14, label %246 - i16 0, label %246 - i16 -1, label %31 - ] + %.off = add i16 %30, 15 + %switch = icmp ult i16 %.off, 2 + %31 = or i8 %28, %24 + %32 = icmp eq i8 %31, 0 + %or.cond = or i1 %32, %switch + br i1 %or.cond, label %250, label %33 31: ; preds = %3 - %32 = getelementptr inbounds nuw i8, ptr %4, i64 696 - %33 = ptrtoint ptr %22 to i64 - %34 = ptrtoint ptr %18 to i64 - %35 = sub i64 %33, %34 - %36 = load ptr, ptr %32, align 8, !tbaa !388 - %37 = sdiv exact i64 %35, 6 - %38 = getelementptr inbounds nuw i8, ptr %36, i64 %37 - %39 = load i8, ptr %38, align 1, !tbaa !259 - %40 = zext i8 %39 to i64 - %41 = shl nuw nsw i64 %40, 24 - %42 = getelementptr inbounds nuw i8, ptr %38, i64 1 + %34 = icmp eq i16 %30, -1 + br i1 %34, label %35, label %60 + +35:; preds = %33 + %36 = getelementptr inbounds nuw i8, ptr %4, i64 696 + %37 = ptrtoint ptr %22 to i64 + %38 = ptrtoint ptr %18 to i64 + %39 = sub i64 %37, %38 + %40 = load ptr, ptr %36, align 8, !tbaa !388 + %41 = sdiv exact i64 %39, 6 + %42 = getelementptr inbounds nuw i8, ptr %40, i64 %41 %43 = load i8, ptr %42, align 1, !tbaa !259 %44 = zext i8 %43 to i64 - %45 = shl nuw nsw i64 %44, 16 - %46 = or disjoint i64 %45, %41 - %47 = getelementptr inbounds nuw i8, ptr %38, i64 2 - %48 = load i8, ptr %47, align 1, !tbaa !259 - %49 = zext i8 %48 to i64 - %50 = shl nuw nsw i64 %49, 8 - %51 = or disjoint i64 %46, %50 - %52 = getelementptr inbounds nuw i8, ptr %38, i64 3 - %53 = load i8, ptr %52, align 1, !tbaa !259 - %54 = zext i8 %53 to i64 - %55 = or disjoint i64 %51, %54 + %45 = shl nuw nsw i64 %44, 24 + %46 = getelementptr inbounds nuw i8, ptr %42, i64 1 + %47 = load i8, ptr %46, align 1, !tbaa !259 + %48 = zext i8 %47 to i64 + %49 = shl nuw nsw i64 %48, 16 + %50 = or disjoint i64 %49, %45 + %51 = getelementptr inbounds nuw i8, ptr %42, i64 2 + %52 = load i8, ptr %51, align 1, !tbaa !259 + %53 = zext i8 %52 to i64 + %54 = shl nuw nsw i64 %53, 8 + %55 = or disjoint i64 %50, %54 + %56 = getelementptr inbounds nuw i8, ptr %42, i64 3 + %57 = load i8, ptr %56, align 1, !tbaa !259 + %58 = zext i8 %57 to i64 + %59 = or disjoint i64 %55, %58 br label %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit -56: ; preds = %3 +56: ; preds = %33 %57 = icmp eq i8 %24, -1 %58 = zext i16 %30 to i64 %spec.select.i = select i1 %57, i64 0, i64 %58 br label %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit -_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit: ; preds = %31, %56 - %.0.i = phi i64 [ %55, %31 ], [ %spec.select.i, %56 ] +_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit: ; preds = %35, %56 + %.0.i = phi i64 [ %59, %35 ], [ %spec.select.i, %60 ] %59 = getelementptr inbounds nuw i8, ptr %4, i64 352 %60 = load ptr, ptr %59, align 8, !tbaa !391 %61 = getelementptr inbounds nuw %"class.std::unique_ptr.327", ptr %60, i64 %.0.i %62 = load ptr, ptr %61, align 8, !tbaa !394 %.not = icmp eq ptr %62, null - br i1 %.not, label %246, label %63 + br i1 %.not, label %250, label %63 63: ; preds = %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit %64 = getelementptr inbounds nuw i8, ptr %22, i64 4 @@ -4609,214 +4613,214 @@ _ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit: ; preds = %66 = and i8 %65, 15 %67 = icmp eq i8 %66, 3 %68 = getelementptr inbounds nuw i8, ptr %22, i64 8 - %69 = load i8, ptr %68, align 1, !tbaa !259 - %70 = zext i8 %69 to i64 - %71 = shl nuw i64 %70, 56 - %72 = getelementptr inbounds nuw i8, ptr %22, i64 9 %73 = load i8, ptr %72, align 1, !tbaa !259 %74 = zext i8 %73 to i64 - %75 = shl nuw nsw i64 %74, 48 - %76 = or disjoint i64 %75, %71 - %77 = getelementptr inbounds nuw i8, ptr %22, i64 10 - %78 = load i8, ptr %77, align 1, !tbaa !259 - %79 = zext i8 %78 to i64 - %80 = shl nuw nsw i64 %79, 40 - %81 = or disjoint i64 %76, %80 - %82 = getelementptr inbounds nuw i8, ptr %22, i64 11 - %83 = load i8, ptr %82, align 1, !tbaa !259 - %84 = zext i8 %83 to i64 - %85 = shl nuw nsw i64 %84, 32 - %86 = or disjoint i64 %81, %85 - %87 = getelementptr inbounds nuw i8, ptr %22, i64 12 - %88 = load i8, ptr %87, align 1, !tbaa !259 - %89 = zext i8 %88 to i64 - %90 = shl nuw nsw i64 %89, 24 - %91 = or disjoint i64 %86, %90 - %92 = getelementptr inbounds nuw i8, ptr %22, i64 13 - %93 = load i8, ptr %92, align 1, !tbaa !259 - %94 = zext i8 %93 to i64 - %95 = shl nuw nsw i64 %94, 16 - %96 = or disjoint i64 %91, %95 - %97 = getelementptr inbounds nuw i8, ptr %22, i64 14 - %98 = load i8, ptr %97, align 1, !tbaa !259 - %99 = zext i8 %98 to i64 - %100 = shl nuw nsw i64 %99, 8 - %101 = or i64 %96, %100 - %102 = getelementptr inbounds nuw i8, ptr %22, i64 15 - %103 = load i8, ptr %102, align 1, !tbaa !259 - %104 = zext i8 %103 to i64 - %105 = or i64 %101, %104 - br i1 %67, label %106, label %176 - -106: ; preds = %63 - %107 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %108 = load i8, ptr %107, align 1, !tbaa !259 - %109 = zext i8 %108 to i64 - %110 = shl nuw i64 %109, 56 - %111 = getelementptr inbounds nuw i8, ptr %2, i64 17 + %75 = shl nuw i64 %74, 56 + %76 = getelementptr inbounds nuw i8, ptr %22, i64 9 + %77 = load i8, ptr %76, align 1, !tbaa !259 + %78 = zext i8 %77 to i64 + %79 = shl nuw nsw i64 %78, 48 + %80 = or disjoint i64 %79, %75 + %81 = getelementptr inbounds nuw i8, ptr %22, i64 10 + %82 = load i8, ptr %81, align 1, !tbaa !259 + %83 = zext i8 %82 to i64 + %84 = shl nuw nsw i64 %83, 40 + %85 = or disjoint i64 %80, %84 + %86 = getelementptr inbounds nuw i8, ptr %22, i64 11 + %87 = load i8, ptr %86, align 1, !tbaa !259 + %88 = zext i8 %87 to i64 + %89 = shl nuw nsw i64 %88, 32 + %90 = or disjoint i64 %85, %89 + %91 = getelementptr inbounds nuw i8, ptr %22, i64 12 + %92 = load i8, ptr %91, align 1, !tbaa !259 + %93 = zext i8 %92 to i64 + %94 = shl nuw nsw i64 %93, 24 + %95 = or disjoint i64 %90, %94 + %96 = getelementptr inbounds nuw i8, ptr %22, i64 13 + %97 = load i8, ptr %96, align 1, !tbaa !259 + %98 = zext i8 %97 to i64 + %99 = shl nuw nsw i64 %98, 16 + %100 = or disjoint i64 %95, %99 + %101 = getelementptr inbounds nuw i8, ptr %22, i64 14 + %102 = load i8, ptr %101, align 1, !tbaa !259 + %103 = zext i8 %102 to i64 + %104 = shl nuw nsw i64 %103, 8 + %105 = or i64 %100, %104 + %106 = getelementptr inbounds nuw i8, ptr %22, i64 15 + %107 = load i8, ptr %106, align 1, !tbaa !259 + %108 = zext i8 %107 to i64 + %109 = or i64 %105, %108 + br i1 %67, label %110, label %180 + +110:; preds = %67 + %111 = getelementptr inbounds nuw i8, ptr %2, i64 16 %112 = load i8, ptr %111, align 1, !tbaa !259 %113 = zext i8 %112 to i64 - %114 = shl nuw nsw i64 %113, 48 - %115 = or disjoint i64 %114, %110 - %116 = getelementptr inbounds nuw i8, ptr %2, i64 18 - %117 = load i8, ptr %116, align 1, !tbaa !259 - %118 = zext i8 %117 to i64 - %119 = shl nuw nsw i64 %118, 40 - %120 = or disjoint i64 %115, %119 - %121 = getelementptr inbounds nuw i8, ptr %2, i64 19 - %122 = load i8, ptr %121, align 1, !tbaa !259 - %123 = zext i8 %122 to i64 - %124 = shl nuw nsw i64 %123, 32 - %125 = or disjoint i64 %120, %124 - %126 = getelementptr inbounds nuw i8, ptr %2, i64 20 - %127 = load i8, ptr %126, align 1, !tbaa !259 - %128 = zext i8 %127 to i64 - %129 = shl nuw nsw i64 %128, 24 - %130 = or disjoint i64 %125, %129 - %131 = getelementptr inbounds nuw i8, ptr %2, i64 21 - %132 = load i8, ptr %131, align 1, !tbaa !259 - %133 = zext i8 %132 to i64 - %134 = shl nuw nsw i64 %133, 16 - %135 = or disjoint i64 %130, %134 - %136 = getelementptr inbounds nuw i8, ptr %2, i64 22 - %137 = load i8, ptr %136, align 1, !tbaa !259 - %138 = zext i8 %137 to i64 - %139 = shl nuw nsw i64 %138, 8 - %140 = or i64 %135, %139 - %141 = getelementptr inbounds nuw i8, ptr %2, i64 23 - %142 = load i8, ptr %141, align 1, !tbaa !259 - %143 = zext i8 %142 to i64 - %144 = or i64 %140, %143 - %145 = add i64 %144, %105 - %146 = getelementptr inbounds nuw i8, ptr %62, i64 48 - %147 = load ptr, ptr %146, align 8, !tbaa !396 - %148 = getelementptr inbounds nuw i8, ptr %62, i64 56 - %149 = load ptr, ptr %148, align 8, !tbaa !398 - %150 = ptrtoint ptr %147 to i64 - %151 = ptrtoint ptr %149 to i64 - %152 = sub i64 %151, %150 - %153 = ashr exact i64 %152, 2 - %154 = icmp sgt i64 %153, 0 - br i1 %154, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit - -_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i: ; preds = %106, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i - %.013.i.i.i = phi i64 [ %.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %153, %106 ] - %.sroa.011.012.i.i.i = phi ptr [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %147, %106 ] - %155 = lshr i64 %.013.i.i.i, 1 - %156 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i, i64 %155 - %157 = load i32, ptr %156, align 4, !tbaa !399 - %158 = zext i32 %157 to i64 - %159 = icmp slt i64 %145, %158 - %160 = getelementptr inbounds nuw i8, ptr %156, i64 4 - %161 = xor i64 %155, -1 - %162 = add nsw i64 %.013.i.i.i, %161 - %.sroa.011.1.i.i.i = select i1 %159, ptr %.sroa.011.012.i.i.i, ptr %160 - %.1.i.i.i = select i1 %159, i64 %155, i64 %162 - %163 = icmp sgt i64 %.1.i.i.i, 0 - br i1 %163, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit, !llvm.loop !400 - -_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, %106 - %.sroa.011.0.lcssa.i.i.i = phi ptr [ %147, %106 ], [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ] - %164 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i, i64 -4 - %165 = ptrtoint ptr %164 to i64 - %166 = sub i64 %165, %150 - %167 = ashr exact i64 %166, 2 - %168 = getelementptr inbounds nuw i8, ptr %62, i64 8 - %169 = load ptr, ptr %168, align 8, !tbaa !401 - %170 = getelementptr inbounds nuw ptr, ptr %169, i64 %167 - %171 = getelementptr inbounds nuw i8, ptr %147, i64 %166 - %172 = load i32, ptr %171, align 4, !tbaa !399 - %173 = zext i32 %172 to i64 - %174 = sub nsw i64 %145, %173 - %175 = load ptr, ptr %170, align 8, !tbaa !404 - br label %246 - -176: ; preds = %63 - %177 = getelementptr inbounds nuw i8, ptr %62, i64 48 - %178 = load ptr, ptr %177, align 8, !tbaa !396 - %179 = getelementptr inbounds nuw i8, ptr %62, i64 56 - %180 = load ptr, ptr %179, align 8, !tbaa !398 - %181 = ptrtoint ptr %178 to i64 - %182 = ptrtoint ptr %180 to i64 - %183 = sub i64 %182, %181 - %184 = ashr exact i64 %183, 2 - %185 = icmp sgt i64 %184, 0 - br i1 %185, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 - -_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17: ; preds = %176, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 - %.013.i.i.i18 = phi i64 [ %.1.i.i.i23, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %184, %176 ] - %.sroa.011.012.i.i.i19 = phi ptr [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %178, %176 ] - %186 = lshr i64 %.013.i.i.i18, 1 - %187 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i19, i64 %186 - %188 = load i32, ptr %187, align 4, !tbaa !399 - %189 = zext i32 %188 to i64 - %190 = icmp slt i64 %105, %189 - %191 = getelementptr inbounds nuw i8, ptr %187, i64 4 - %192 = xor i64 %186, -1 - %193 = add nsw i64 %.013.i.i.i18, %192 - %.sroa.011.1.i.i.i22 = select i1 %190, ptr %.sroa.011.012.i.i.i19, ptr %191 - %.1.i.i.i23 = select i1 %190, i64 %186, i64 %193 - %194 = icmp sgt i64 %.1.i.i.i23, 0 - br i1 %194, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24, !llvm.loop !400 - -_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, %176 - %.sroa.011.0.lcssa.i.i.i14 = phi ptr [ %178, %176 ], [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ] - %195 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i14, i64 -4 - %196 = ptrtoint ptr %195 to i64 - %197 = sub i64 %196, %181 - %198 = ashr exact i64 %197, 2 - %199 = getelementptr inbounds nuw i8, ptr %62, i64 8 - %200 = load ptr, ptr %199, align 8, !tbaa !401 - %201 = getelementptr inbounds nuw ptr, ptr %200, i64 %198 - %202 = getelementptr inbounds nuw i8, ptr %178, i64 %197 - %203 = load i32, ptr %202, align 4, !tbaa !399 - %204 = zext i32 %203 to i64 - %205 = sub i64 %105, %204 - %206 = load ptr, ptr %201, align 8, !tbaa !404 - %207 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %208 = load i8, ptr %207, align 1, !tbaa !259 - %209 = zext i8 %208 to i64 - %210 = shl nuw i64 %209, 56 - %211 = getelementptr inbounds nuw i8, ptr %2, i64 17 + %114 = shl nuw i64 %113, 56 + %115 = getelementptr inbounds nuw i8, ptr %2, i64 17 + %116 = load i8, ptr %115, align 1, !tbaa !259 + %117 = zext i8 %116 to i64 + %118 = shl nuw nsw i64 %117, 48 + %119 = or disjoint i64 %118, %114 + %120 = getelementptr inbounds nuw i8, ptr %2, i64 18 + %121 = load i8, ptr %120, align 1, !tbaa !259 + %122 = zext i8 %121 to i64 + %123 = shl nuw nsw i64 %122, 40 + %124 = or disjoint i64 %119, %123 + %125 = getelementptr inbounds nuw i8, ptr %2, i64 19 + %126 = load i8, ptr %125, align 1, !tbaa !259 + %127 = zext i8 %126 to i64 + %128 = shl nuw nsw i64 %127, 32 + %129 = or disjoint i64 %124, %128 + %130 = getelementptr inbounds nuw i8, ptr %2, i64 20 + %131 = load i8, ptr %130, align 1, !tbaa !259 + %132 = zext i8 %131 to i64 + %133 = shl nuw nsw i64 %132, 24 + %134 = or disjoint i64 %129, %133 + %135 = getelementptr inbounds nuw i8, ptr %2, i64 21 + %136 = load i8, ptr %135, align 1, !tbaa !259 + %137 = zext i8 %136 to i64 + %138 = shl nuw nsw i64 %137, 16 + %139 = or disjoint i64 %134, %138 + %140 = getelementptr inbounds nuw i8, ptr %2, i64 22 + %141 = load i8, ptr %140, align 1, !tbaa !259 + %142 = zext i8 %141 to i64 + %143 = shl nuw nsw i64 %142, 8 + %144 = or i64 %139, %143 + %145 = getelementptr inbounds nuw i8, ptr %2, i64 23 + %146 = load i8, ptr %145, align 1, !tbaa !259 + %147 = zext i8 %146 to i64 + %148 = or i64 %144, %147 + %149 = add i64 %148, %109 + %150 = getelementptr inbounds nuw i8, ptr %66, i64 48 + %151 = load ptr, ptr %150, align 8, !tbaa !396 + %152 = getelementptr inbounds nuw i8, ptr %66, i64 56 + %153 = load ptr, ptr %152, align 8, !tbaa !398 + %154 = ptrtoint ptr %151 to i64 + %155 = ptrtoint ptr %153 to i64 + %156 = sub i64 %155, %154 + %157 = ashr exact i64 %156, 2 + %158 = icmp sgt i64 %157, 0 + br i1 %158, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit + +_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i:; preds = %110, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i + %.013.i.i.i = phi i64 [ %.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %157, %110 ] + %.sroa.011.012.i.i.i = phi ptr [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ], [ %151, %110 ] + %159 = lshr i64 %.013.i.i.i, 1 + %160 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i, i64 %159 + %161 = load i32, ptr %156, align 4, !tbaa !399 + %162 = zext i32 %161 to i64 + %163 = icmp slt i64 %149, %162 + %164 = getelementptr inbounds nuw i8, ptr %156, i64 4 + %165 = xor i64 %159, -1 + %166 = add nsw i64 %.013.i.i.i, %165 + %.sroa.011.1.i.i.i = select i1 %163, ptr %.sroa.011.012.i.i.i, ptr %164 + %.1.i.i.i = select i1 %163, i64 %159, i64 %166 + %167 = icmp sgt i64 %.1.i.i.i, 0 + br i1 %167, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit, !llvm.loop !400 + +_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit:; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i, %110 + %.sroa.011.0.lcssa.i.i.i = phi ptr [ %151, %110 ], [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i ] + %168 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i, i64 -4 + %169 = ptrtoint ptr %168 to i64 + %170 = sub i64 %169, %154 + %171 = ashr exact i64 %170, 2 + %172 = getelementptr inbounds nuw i8, ptr %66, i64 8 + %173 = load ptr, ptr %172, align 8, !tbaa !401 + %174 = getelementptr inbounds nuw ptr, ptr %173, i64 %171 + %175 = getelementptr inbounds nuw i8, ptr %151, i64 %170 + %176 = load i32, ptr %175, align 4, !tbaa !399 + %177 = zext i32 %176 to i64 + %178 = sub nsw i64 %149, %177 + %179 = load ptr, ptr %174, align 8, !tbaa !404 + br label %250 + +180:; preds = %67 + %181 = getelementptr inbounds nuw i8, ptr %66, i64 48 + %182 = load ptr, ptr %181, align 8, !tbaa !396 + %183 = getelementptr inbounds nuw i8, ptr %66, i64 56 + %184 = load ptr, ptr %183, align 8, !tbaa !398 + %185 = ptrtoint ptr %182 to i64 + %186 = ptrtoint ptr %184 to i64 + %187 = sub i64 %186, %185 + %188 = ashr exact i64 %187, 2 + %189 = icmp sgt i64 %188, 0 + br i1 %189, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 + +_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17:; preds = %180, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 + %.013.i.i.i18 = phi i64 [ %.1.i.i.i23, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %188, %180 ] + %.sroa.011.012.i.i.i19 = phi ptr [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ], [ %182, %180 ] + %190 = lshr i64 %.013.i.i.i18, 1 + %191 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i.i.i19, i64 %190 + %192 = load i32, ptr %191, align 4, !tbaa !399 + %193 = zext i32 %192 to i64 + %194 = icmp slt i64 %109, %193 + %195 = getelementptr inbounds nuw i8, ptr %191, i64 4 + %196 = xor i64 %190, -1 + %197 = add nsw i64 %.013.i.i.i18, %196 + %.sroa.011.1.i.i.i22 = select i1 %194, ptr %.sroa.011.012.i.i.i19, ptr %195 + %.1.i.i.i23 = select i1 %194, i64 %190, i64 %197 + %198 = icmp sgt i64 %.1.i.i.i23, 0 + br i1 %198, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, label %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24, !llvm.loop !400 + +_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24:; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17, %180 + %.sroa.011.0.lcssa.i.i.i14 = phi ptr [ %182, %180 ], [ %.sroa.011.1.i.i.i22, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPjSt4spanIjLm18446744073709551615EEEElEvRT_T0_.exit.i.i.i17 ] + %199 = getelementptr inbounds i8, ptr %.sroa.011.0.lcssa.i.i.i14, i64 -4 + %200 = ptrtoint ptr %199 to i64 + %201 = sub i64 %200, %185 + %202 = ashr exact i64 %201, 2 + %203 = getelementptr inbounds nuw i8, ptr %62, i64 8 + %204 = load ptr, ptr %203, align 8, !tbaa !401 + %205 = getelementptr inbounds nuw ptr, ptr %204, i64 %202 + %206 = getelementptr inbounds nuw i8, ptr %182, i64 %201 + %207 = load i32, ptr %206, align 4, !tbaa !399 + %208 = zext i32 %207 to i64 + %209 = sub i64 %109, %208 + %210 = load ptr, ptr %205, align 8, !tbaa !404 + %211 = getelementptr inbounds nuw i8, ptr %2, i64 16 %212 = load i8, ptr %211, align 1, !tbaa !259 %213 = zext i8 %212 to i64 - %214 = shl nuw nsw i64 %213, 48 - %215 = or disjoint i64 %214, %210 - %216 = getelementptr inbounds nuw i8, ptr %2, i64 18 - %217 = load i8, ptr %216, align 1, !tbaa !259 - %218 = zext i8 %217 to i64 - %219 = shl nuw nsw i64 %218, 40 - %220 = or disjoint i64 %215, %219 - %221 = getelementptr inbounds nuw i8, ptr %2, i64 19 - %222 = load i8, ptr %221, align 1, !tbaa !259 - %223 = zext i8 %222 to i64 - %224 = shl nuw nsw i64 %223, 32 - %225 = or disjoint i64 %220, %224 - %226 = getelementptr inbounds nuw i8, ptr %2, i64 20 - %227 = load i8, ptr %226, align 1, !tbaa !259 - %228 = zext i8 %227 to i64 - %229 = shl nuw nsw i64 %228, 24 - %230 = or disjoint i64 %225, %229 - %231 = getelementptr inbounds nuw i8, ptr %2, i64 21 - %232 = load i8, ptr %231, align 1, !tbaa !259 - %233 = zext i8 %232 to i64 - %234 = shl nuw nsw i64 %233, 16 - %235 = or disjoint i64 %230, %234 - %236 = getelementptr inbounds nuw i8, ptr %2, i64 22 - %237 = load i8, ptr %236, align 1, !tbaa !259 - %238 = zext i8 %237 to i64 - %239 = shl nuw nsw i64 %238, 8 - %240 = or i64 %235, %239 - %241 = getelementptr inbounds nuw i8, ptr %2, i64 23 - %242 = load i8, ptr %241, align 1, !tbaa !259 - %243 = zext i8 %242 to i64 - %244 = or i64 %240, %243 - %245 = add nsw i64 %205, %244 - br label %246 - -246: ; preds = %3, %3, %3, %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 - %.sroa.027.0 = phi ptr [ %175, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit ], [ %206, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 ], [ null, %3 ], [ null, %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ null, %3 ], [ null, %3 ] - %.sroa.5.0 = phi i64 [ %174, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit ], [ %245, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 ], [ 0, %3 ], [ 0, %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ 0, %3 ], [ 0, %3 ] + %214 = shl nuw i64 %213, 56 + %215 = getelementptr inbounds nuw i8, ptr %2, i64 17 + %216 = load i8, ptr %215, align 1, !tbaa !259 + %217 = zext i8 %216 to i64 + %218 = shl nuw nsw i64 %217, 48 + %219 = or disjoint i64 %218, %214 + %220 = getelementptr inbounds nuw i8, ptr %2, i64 18 + %221 = load i8, ptr %220, align 1, !tbaa !259 + %222 = zext i8 %221 to i64 + %223 = shl nuw nsw i64 %222, 40 + %224 = or disjoint i64 %219, %223 + %225 = getelementptr inbounds nuw i8, ptr %2, i64 19 + %226 = load i8, ptr %225, align 1, !tbaa !259 + %227 = zext i8 %226 to i64 + %228 = shl nuw nsw i64 %227, 32 + %229 = or disjoint i64 %224, %228 + %230 = getelementptr inbounds nuw i8, ptr %2, i64 20 + %231 = load i8, ptr %230, align 1, !tbaa !259 + %232 = zext i8 %231 to i64 + %233 = shl nuw nsw i64 %232, 24 + %234 = or disjoint i64 %229, %231 + %235 = getelementptr inbounds nuw i8, ptr %2, i64 21 + %236 = load i8, ptr %235, align 1, !tbaa !259 + %237 = zext i8 %236 to i64 + %238 = shl nuw nsw i64 %237, 16 + %239 = or disjoint i64 %234, %238 + %240 = getelementptr inbounds nuw i8, ptr %2, i64 22 + %241 = load i8, ptr %240, align 1, !tbaa !259 + %242 = zext i8 %241 to i64 + %243 = shl nuw nsw i64 %242, 8 + %244 = or i64 %239, %243 + %245 = getelementptr inbounds nuw i8, ptr %2, i64 23 + %246 = load i8, ptr %245, align 1, !tbaa !259 + %247 = zext i8 %246 to i64 + %248 = or i64 %244, %247 + %249 = add nsw i64 %209, %248 + br label %250 + +250: ; preds = %3, %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 + %.sroa.027.0 = phi ptr [ %179, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit ], [ %210, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 ], [ null, %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ null, %3 ] + %.sroa.5.0 = phi i64 [ %178, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit ], [ %249, %_ZN4mold16MergeableSectionINS_7SPARC64EE12get_fragmentEl.exit24 ], [ 0, %_ZN4mold10ObjectFileINS_7SPARC64EE9get_shndxERKNS_6ElfSymIS1_EE.exit ], [ 0, %3 ] %.fca.0.insert = insertvalue { ptr, i64 } poison, ptr %.sroa.027.0, 0 %.fca.1.insert = insertvalue { ptr, i64 } %.fca.0.insert, i64 %.sroa.5.0, 1 ret { ptr, i64 } %.fca.1.insert diff --git a/bench/mold/optimized/blake3.ll b/bench/mold/optimized/blake3.ll index 015f1a26a7d..5d25262da8a 100644 --- a/bench/mold/optimized/blake3.ll +++ b/bench/mold/optimized/blake3.ll @@ -2074,14 +2074,11 @@ output_root_bytes.exit: ; preds = %49, %51 call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %9) #10 %59 = getelementptr inbounds nuw i8, ptr %0, i64 137 %60 = load i8, ptr %59, align 1, !tbaa !12 - %61 = zext i8 %60 to i64 - %62 = shl nuw nsw i64 %61, 6 - %63 = getelementptr inbounds nuw i8, ptr %0, i64 136 - %64 = load i8, ptr %63, align 8, !tbaa !13 - %65 = zext i8 %64 to i64 - %66 = or i64 %62, %65 - %.not = icmp eq i64 %66, 0 - br i1 %.not, label %80, label %.thread + %61 = getelementptr inbounds nuw i8, ptr %0, i64 136 + %62 = load i8, ptr %61, align 8, !tbaa !13 + %63 = or i8 %62, %60 + %64 = icmp eq i8 %63, 0 + br i1 %64, label %78, label %.thread .thread: ; preds = %58 %67 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -2101,7 +2098,7 @@ output_root_bytes.exit: ; preds = %49, %51 %77 = getelementptr inbounds nuw i8, ptr %9, i64 32 store i64 %76, ptr %77, align 8, !tbaa !69 %78 = getelementptr inbounds nuw i8, ptr %9, i64 104 - store i8 %64, ptr %78, align 8, !tbaa !10 + store i8 %62, ptr %78, align 8, !tbaa !10 %79 = getelementptr inbounds nuw i8, ptr %9, i64 105 store i8 %73, ptr %79, align 1, !tbaa !10 br label %.lr.ph @@ -2128,13 +2125,13 @@ output_root_bytes.exit: ; preds = %49, %51 br i1 %.not2350, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %.thread, %80 - %92 = phi ptr [ %79, %.thread ], [ %91, %80 ] - %93 = phi ptr [ %78, %.thread ], [ %90, %80 ] - %94 = phi ptr [ %77, %.thread ], [ %89, %80 ] - %.062 = phi i64 [ %68, %.thread ], [ %82, %80 ] - %.sink61 = phi i8 [ %73, %.thread ], [ %88, %80 ] - %.sink5260 = phi i8 [ %64, %.thread ], [ 64, %80 ] - %.sink5359 = phi i64 [ %76, %.thread ], [ 0, %80 ] + %92 = phi ptr [ %79, %.thread ], [ %91, %78 ] + %93 = phi ptr [ %78, %.thread ], [ %90, %78 ] + %94 = phi ptr [ %77, %.thread ], [ %89, %78 ] + %.062 = phi i64 [ %68, %.thread ], [ %82, %78 ] + %.sink61 = phi i8 [ %73, %.thread ], [ %88, %78 ] + %.sink5260 = phi i8 [ %62, %.thread ], [ 64, %78 ] + %.sink5359 = phi i64 [ %76, %.thread ], [ 0, %78 ] %95 = getelementptr inbounds nuw i8, ptr %0, i64 145 %96 = getelementptr inbounds nuw i8, ptr %9, i64 40 %97 = getelementptr inbounds nuw i8, ptr %7, i64 4 @@ -2180,10 +2177,10 @@ output_root_bytes.exit: ; preds = %49, %51 br label %105 105: ; preds = %.lr.ph, %105 - %106 = phi i8 [ %.sink61, %.lr.ph ], [ %177, %105 ] - %107 = phi i64 [ %.sink5359, %.lr.ph ], [ 0, %105 ] - %108 = phi i8 [ %.sink5260, %.lr.ph ], [ 64, %105 ] - %.151 = phi i64 [ %.062, %.lr.ph ], [ %109, %105 ] + %106 = phi i8 [ %.sink61, %.lr.ph ], [ %177, %103 ] + %107 = phi i64 [ %.sink5359, %.lr.ph ], [ 0, %103 ] + %108 = phi i8 [ %.sink5260, %.lr.ph ], [ 64, %103 ] + %.151 = phi i64 [ %.062, %.lr.ph ], [ %109, %103 ] %109 = add i64 %.151, -1 %110 = shl i64 %109, 5 %111 = getelementptr inbounds nuw [1760 x i8], ptr %95, i64 0, i64 %110 @@ -2193,107 +2190,107 @@ output_root_bytes.exit: ; preds = %49, %51 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, i64 32, i1 false) call void @blake3_compress_in_place(ptr noundef nonnull %7, ptr noundef nonnull %96, i8 noundef zeroext %108, i64 noundef %107, i8 noundef zeroext %106) #10 %112 = load i32, ptr %7, align 16, !tbaa !27 + %111 = trunc i32 %110 to i8 + %112 = lshr i32 %110, 8 %113 = trunc i32 %112 to i8 - %114 = lshr i32 %112, 8 + %114 = lshr i32 %112, 16 %115 = trunc i32 %114 to i8 - %116 = lshr i32 %112, 16 - %117 = trunc i32 %116 to i8 - %118 = lshr i32 %112, 24 - %119 = trunc nuw i32 %118 to i8 - %120 = load i32, ptr %97, align 4, !tbaa !27 + %116 = lshr i32 %112, 24 + %117 = trunc nuw i32 %116 to i8 + %118 = load i32, ptr %95, align 4, !tbaa !27 + %119 = trunc i32 %118 to i8 + %120 = lshr i32 %118, 8 %121 = trunc i32 %120 to i8 - %122 = lshr i32 %120, 8 + %122 = lshr i32 %118, 16 %123 = trunc i32 %122 to i8 - %124 = lshr i32 %120, 16 - %125 = trunc i32 %124 to i8 - %126 = lshr i32 %120, 24 - %127 = trunc nuw i32 %126 to i8 - %128 = load i32, ptr %98, align 8, !tbaa !27 + %124 = lshr i32 %118, 24 + %125 = trunc nuw i32 %124 to i8 + %126 = load i32, ptr %96, align 8, !tbaa !27 + %127 = trunc i32 %126 to i8 + %128 = lshr i32 %126, 8 %129 = trunc i32 %128 to i8 - %130 = lshr i32 %128, 8 + %130 = lshr i32 %126, 16 %131 = trunc i32 %130 to i8 - %132 = lshr i32 %128, 16 - %133 = trunc i32 %132 to i8 - %134 = lshr i32 %128, 24 - %135 = trunc nuw i32 %134 to i8 - %136 = load i32, ptr %99, align 4, !tbaa !27 + %132 = lshr i32 %126, 24 + %133 = trunc nuw i32 %132 to i8 + %134 = load i32, ptr %97, align 4, !tbaa !27 + %135 = trunc i32 %134 to i8 + %136 = lshr i32 %134, 8 %137 = trunc i32 %136 to i8 - %138 = lshr i32 %136, 8 + %138 = lshr i32 %134, 16 %139 = trunc i32 %138 to i8 - %140 = lshr i32 %136, 16 - %141 = trunc i32 %140 to i8 - %142 = lshr i32 %136, 24 - %143 = trunc nuw i32 %142 to i8 - %144 = load i32, ptr %100, align 16, !tbaa !27 + %140 = lshr i32 %134, 24 + %141 = trunc nuw i32 %140 to i8 + %142 = load i32, ptr %98, align 16, !tbaa !27 + %143 = trunc i32 %142 to i8 + %144 = lshr i32 %142, 8 %145 = trunc i32 %144 to i8 - %146 = lshr i32 %144, 8 + %146 = lshr i32 %142, 16 %147 = trunc i32 %146 to i8 - %148 = lshr i32 %144, 16 - %149 = trunc i32 %148 to i8 - %150 = lshr i32 %144, 24 - %151 = trunc nuw i32 %150 to i8 - %152 = load i32, ptr %101, align 4, !tbaa !27 + %148 = lshr i32 %142, 24 + %149 = trunc nuw i32 %148 to i8 + %150 = load i32, ptr %101, align 4, !tbaa !27 + %151 = trunc i32 %150 to i8 + %152 = lshr i32 %150, 8 %153 = trunc i32 %152 to i8 - %154 = lshr i32 %152, 8 + %154 = lshr i32 %150, 16 %155 = trunc i32 %154 to i8 - %156 = lshr i32 %152, 16 - %157 = trunc i32 %156 to i8 - %158 = lshr i32 %152, 24 - %159 = trunc nuw i32 %158 to i8 - %160 = load i32, ptr %102, align 8, !tbaa !27 + %156 = lshr i32 %150, 24 + %157 = trunc nuw i32 %156 to i8 + %158 = load i32, ptr %102, align 8, !tbaa !27 + %159 = trunc i32 %158 to i8 + %160 = lshr i32 %158, 8 %161 = trunc i32 %160 to i8 - %162 = lshr i32 %160, 8 + %162 = lshr i32 %158, 16 %163 = trunc i32 %162 to i8 - %164 = lshr i32 %160, 16 - %165 = trunc i32 %164 to i8 - %166 = lshr i32 %160, 24 - %167 = trunc nuw i32 %166 to i8 - %168 = load i32, ptr %103, align 4, !tbaa !27 + %164 = lshr i32 %158, 24 + %165 = trunc nuw i32 %164 to i8 + %166 = load i32, ptr %101, align 4, !tbaa !27 + %167 = trunc i32 %166 to i8 + %168 = lshr i32 %166, 8 %169 = trunc i32 %168 to i8 - %170 = lshr i32 %168, 8 + %170 = lshr i32 %166, 16 %171 = trunc i32 %170 to i8 - %172 = lshr i32 %168, 16 - %173 = trunc i32 %172 to i8 - %174 = lshr i32 %168, 24 - %175 = trunc nuw i32 %174 to i8 + %172 = lshr i32 %166, 24 + %173 = trunc nuw i32 %172 to i8 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10 %176 = load i8, ptr %104, align 2, !tbaa !30 %177 = or i8 %176, 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 4 dereferenceable(32) %0, i64 32, i1 false) store i64 0, ptr %94, align 8, !tbaa !69 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %96, ptr noundef nonnull align 16 dereferenceable(32) %.sroa.5.sroa.0, i64 32, i1 false), !tbaa.struct !70 - store i8 %113, ptr %.sroa.5.sroa.4.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %115, ptr %.sroa.5.sroa.5.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %117, ptr %.sroa.5.sroa.6.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %119, ptr %.sroa.5.sroa.7.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %121, ptr %.sroa.5.sroa.8.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %123, ptr %.sroa.5.sroa.9.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %125, ptr %.sroa.5.sroa.10.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %127, ptr %.sroa.5.sroa.11.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %129, ptr %.sroa.5.sroa.12.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %131, ptr %.sroa.5.sroa.13.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %133, ptr %.sroa.5.sroa.14.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %135, ptr %.sroa.5.sroa.15.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %137, ptr %.sroa.5.sroa.16.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %139, ptr %.sroa.5.sroa.17.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %141, ptr %.sroa.5.sroa.18.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %143, ptr %.sroa.5.sroa.19.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %145, ptr %.sroa.5.sroa.20.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %147, ptr %.sroa.5.sroa.21.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %149, ptr %.sroa.5.sroa.22.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %151, ptr %.sroa.5.sroa.23.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %153, ptr %.sroa.5.sroa.24.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %155, ptr %.sroa.5.sroa.25.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %157, ptr %.sroa.5.sroa.26.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %159, ptr %.sroa.5.sroa.27.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %161, ptr %.sroa.5.sroa.28.0..sroa.5.0..sroa_idx.sroa_idx, align 8 - store i8 %163, ptr %.sroa.5.sroa.29.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %165, ptr %.sroa.5.sroa.30.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %167, ptr %.sroa.5.sroa.31.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %169, ptr %.sroa.5.sroa.32.0..sroa.5.0..sroa_idx.sroa_idx, align 4 - store i8 %171, ptr %.sroa.5.sroa.33.0..sroa.5.0..sroa_idx.sroa_idx, align 1 - store i8 %173, ptr %.sroa.5.sroa.34.0..sroa.5.0..sroa_idx.sroa_idx, align 2 - store i8 %175, ptr %.sroa.5.sroa.35.0..sroa.5.0..sroa_idx.sroa_idx, align 1, !tbaa !10 + store i8 %111, ptr %.sroa.5.sroa.4.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %113, ptr %.sroa.5.sroa.5.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %115, ptr %.sroa.5.sroa.6.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %117, ptr %.sroa.5.sroa.7.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %119, ptr %.sroa.5.sroa.8.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %121, ptr %.sroa.5.sroa.9.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %123, ptr %.sroa.5.sroa.10.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %125, ptr %.sroa.5.sroa.11.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %127, ptr %.sroa.5.sroa.12.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %129, ptr %.sroa.5.sroa.13.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %131, ptr %.sroa.5.sroa.14.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %133, ptr %.sroa.5.sroa.15.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %135, ptr %.sroa.5.sroa.16.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %137, ptr %.sroa.5.sroa.17.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %139, ptr %.sroa.5.sroa.18.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %141, ptr %.sroa.5.sroa.19.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %143, ptr %.sroa.5.sroa.20.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %145, ptr %.sroa.5.sroa.21.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %147, ptr %.sroa.5.sroa.22.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %149, ptr %.sroa.5.sroa.23.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %151, ptr %.sroa.5.sroa.24.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %153, ptr %.sroa.5.sroa.25.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %155, ptr %.sroa.5.sroa.26.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %157, ptr %.sroa.5.sroa.27.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %159, ptr %.sroa.5.sroa.28.0..sroa.5.0..sroa_idx.sroa_idx, align 8 + store i8 %161, ptr %.sroa.5.sroa.29.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %163, ptr %.sroa.5.sroa.30.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %165, ptr %.sroa.5.sroa.31.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %167, ptr %.sroa.5.sroa.32.0..sroa.5.0..sroa_idx.sroa_idx, align 4 + store i8 %169, ptr %.sroa.5.sroa.33.0..sroa.5.0..sroa_idx.sroa_idx, align 1 + store i8 %171, ptr %.sroa.5.sroa.34.0..sroa.5.0..sroa_idx.sroa_idx, align 2 + store i8 %173, ptr %.sroa.5.sroa.35.0..sroa.5.0..sroa_idx.sroa_idx, align 1, !tbaa !10 store i8 64, ptr %93, align 8, !tbaa !10 store i8 %177, ptr %92, align 1, !tbaa !10 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %.sroa.5.sroa.0) @@ -2301,9 +2298,9 @@ output_root_bytes.exit: ; preds = %49, %51 br i1 %.not23, label %._crit_edge, label %105, !llvm.loop !71 ._crit_edge: ; preds = %105, %80 - %178 = phi ptr [ %91, %80 ], [ %92, %105 ] - %179 = phi ptr [ %90, %80 ], [ %93, %105 ] - %180 = phi i8 [ %88, %80 ], [ %177, %105 ] + %178 = phi ptr [ %91, %78 ], [ %92, %103 ] + %179 = phi ptr [ %90, %78 ], [ %93, %103 ] + %180 = phi i8 [ %88, %78 ], [ %177, %103 ] %181 = lshr i64 %1, 6 %182 = and i64 %1, 63 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #10 @@ -2324,9 +2321,9 @@ output_root_bytes.exit: ; preds = %49, %51 br label %192 192: ; preds = %183, %._crit_edge - %.044.i25 = phi i64 [ %191, %183 ], [ %181, %._crit_edge ] - %.043.i26 = phi i64 [ %190, %183 ], [ %3, %._crit_edge ] - %.0.i27 = phi ptr [ %189, %183 ], [ %2, %._crit_edge ] + %.044.i25 = phi i64 [ %191, %181 ], [ %181, %._crit_edge ] + %.043.i26 = phi i64 [ %190, %181 ], [ %3, %._crit_edge ] + %.0.i27 = phi ptr [ %189, %181 ], [ %2, %._crit_edge ] %193 = lshr i64 %.043.i26, 6 %.not49.i28 = icmp ult i64 %.043.i26, 64 br i1 %.not49.i28, label %199, label %194 diff --git a/bench/openjdk/optimized/hb-ot-name.ll b/bench/openjdk/optimized/hb-ot-name.ll index 01c1fee9722..e5d46535dc9 100644 --- a/bench/openjdk/optimized/hb-ot-name.ll +++ b/bench/openjdk/optimized/hb-ot-name.ll @@ -2125,77 +2125,70 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK3AAT4ltag8sanitizeEP21hb_sani 13: ; preds = %2 %14 = load i8, ptr %0, align 1 - %15 = zext i8 %14 to i32 - %16 = shl nuw i32 %15, 24 - %17 = getelementptr inbounds nuw i8, ptr %0, i64 1 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 1 + %16 = load i8, ptr %15, align 1 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 2 %18 = load i8, ptr %17, align 1 - %19 = zext i8 %18 to i32 - %20 = shl nuw nsw i32 %19, 16 - %21 = or disjoint i32 %20, %16 - %22 = getelementptr inbounds nuw i8, ptr %0, i64 2 - %23 = load i8, ptr %22, align 1 - %24 = zext i8 %23 to i32 - %25 = shl nuw nsw i32 %24, 8 - %26 = or disjoint i32 %21, %25 - %27 = getelementptr inbounds nuw i8, ptr %0, i64 3 - %28 = load i8, ptr %27, align 1 - %29 = zext i8 %28 to i32 - %30 = or disjoint i32 %26, %29 - %.not21 = icmp eq i32 %30, 0 - br i1 %.not21, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread, label %31 - -31: ; preds = %13 - %32 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %33 = load i8, ptr %32, align 1 - %34 = zext i8 %33 to i32 - %35 = shl nuw i32 %34, 24 - %36 = getelementptr inbounds nuw i8, ptr %0, i64 9 + %19 = getelementptr inbounds nuw i8, ptr %0, i64 3 + %20 = load i8, ptr %19, align 1 + %21 = or i8 %16, %14 + %22 = or i8 %21, %18 + %23 = or i8 %22, %20 + %24 = icmp eq i8 %23, 0 + br i1 %24, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread, label %25 + +25: ; preds = %13 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %27 = load i8, ptr %26, align 1 + %28 = zext i8 %27 to i32 + %29 = shl nuw i32 %28, 24 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 9 + %31 = load i8, ptr %30, align 1 + %32 = zext i8 %31 to i32 + %33 = shl nuw nsw i32 %32, 16 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 10 + %35 = load i8, ptr %34, align 1 + %36 = zext i8 %35 to i32 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 11 %37 = load i8, ptr %36, align 1 %38 = zext i8 %37 to i32 - %39 = shl nuw nsw i32 %38, 16 - %40 = getelementptr inbounds nuw i8, ptr %0, i64 10 - %41 = load i8, ptr %40, align 1 - %42 = zext i8 %41 to i32 - %43 = getelementptr inbounds nuw i8, ptr %0, i64 11 - %44 = load i8, ptr %43, align 1 - %45 = zext i8 %44 to i32 - %46 = or disjoint i32 %39, %35 - %47 = or disjoint i32 %46, %45 - %48 = shl nuw nsw i32 %42, 10 - %49 = shl i32 %47, 2 - %50 = or disjoint i32 %49, %48 - %51 = icmp ugt i8 %33, 63 - br i1 %51, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread, label %52 - -52: ; preds = %31 - %53 = load ptr, ptr %12, align 8 - %54 = ptrtoint ptr %53 to i64 - %55 = sub i64 %54, %6 - %56 = trunc i64 %55 to i32 - %.not20.i = icmp ugt i32 %50, %56 + %40 = or disjoint i32 %33, %29 + %41 = or disjoint i32 %40, %39 + %42 = shl nuw nsw i32 %36, 10 + %43 = shl i32 %41, 2 + %44 = or disjoint i32 %43, %42 + %45 = icmp ugt i8 %27, 63 + br i1 %45, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread, label %46 + +46:; preds = %25 + %47 = load ptr, ptr %12, align 8 + %48 = ptrtoint ptr %47 to i64 + %49 = sub i64 %48, %6 + %50 = trunc i64 %49 to i32 + %.not20.i = icmp ugt i32 %44, %50 br i1 %.not20.i, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit -_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit: ; preds = %52 +_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit: ; preds = %46 %57 = getelementptr inbounds nuw i8, ptr %1, i64 28 %58 = load i32, ptr %57, align 4 - %59 = sub i32 %58, %50 + %59 = sub i32 %58, %44 store i32 %59, ptr %57, align 4 %60 = icmp sgt i32 %59, 0 br i1 %60, label %61, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread 61: ; preds = %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit - %62 = load i8, ptr %32, align 1 + %62 = load i8, ptr %26, align 1 %63 = zext i8 %62 to i32 %64 = shl nuw i32 %63, 24 - %65 = load i8, ptr %36, align 1 + %65 = load i8, ptr %30, align 1 %66 = zext i8 %65 to i32 %67 = shl nuw nsw i32 %66, 16 %68 = or disjoint i32 %67, %64 - %69 = load i8, ptr %40, align 1 + %69 = load i8, ptr %34, align 1 %70 = zext i8 %69 to i32 %71 = shl nuw nsw i32 %70, 8 %72 = or disjoint i32 %68, %71 - %73 = load i8, ptr %43, align 1 + %73 = load i8, ptr %37, align 1 %74 = zext i8 %73 to i32 %75 = or disjoint i32 %72, %74 %.not33 = icmp eq i32 %75, 0 @@ -2211,8 +2204,8 @@ _ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21h br i1 %exitcond.not, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread, label %.lr.ph, !llvm.loop !15 .lr.ph: ; preds = %.lr.ph.preheader, %76 - %77 = phi i32 [ %59, %.lr.ph.preheader ], [ %103, %76 ] - %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %76 ] + %77 = phi i32 [ %59, %.lr.ph.preheader ], [ %103, %70 ] + %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %70 ] %78 = getelementptr inbounds nuw [1 x %"struct.AAT::FTStringRange"], ptr %3, i64 0, i64 %indvars.iv %79 = getelementptr inbounds nuw i8, ptr %78, i64 4 %80 = ptrtoint ptr %79 to i64 @@ -2240,7 +2233,7 @@ _ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21h %99 = ptrtoint ptr %90 to i64 %100 = sub i64 %99, %7 %.not.i.i.i.i.i.i = icmp ugt i64 %100, %11 - %101 = sub i64 %54, %99 + %101 = sub i64 %48, %99 %102 = trunc i64 %101 to i32 %.not16.i.i.i.i.i.i = icmp ugt i32 %98, %102 %or.cond = select i1 %.not.i.i.i.i.i.i, i1 true, i1 %.not16.i.i.i.i.i.i @@ -2252,8 +2245,8 @@ _ZN21hb_sanitize_context_t8dispatchIN3AAT13FTStringRangeEJPKNS1_4ltagEEEEDTcl9_d %104 = icmp sgt i32 %103, 0 br i1 %104, label %76, label %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread -_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread: ; preds = %82, %.lr.ph, %76, %_ZN21hb_sanitize_context_t8dispatchIN3AAT13FTStringRangeEJPKNS1_4ltagEEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS8_.exit, %61, %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit, %31, %52, %13, %2 - %105 = phi i1 [ false, %13 ], [ false, %2 ], [ false, %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit ], [ false, %31 ], [ false, %52 ], [ true, %61 ], [ false, %82 ], [ false, %.lr.ph ], [ true, %76 ], [ false, %_ZN21hb_sanitize_context_t8dispatchIN3AAT13FTStringRangeEJPKNS1_4ltagEEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS8_.exit ] +_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit.thread: ; preds = %82, %.lr.ph, %76, %_ZN21hb_sanitize_context_t8dispatchIN3AAT13FTStringRangeEJPKNS1_4ltagEEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS8_.exit, %61, %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit, %25, %46, %13, %2 + %105 = phi i1 [ false, %13 ], [ false, %2 ], [ false, %_ZNK2OT7ArrayOfIN3AAT13FTStringRangeENS_7IntTypeIjLj4EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit ], [ false, %25 ], [ false, %46 ], [ true, %55 ], [ false, %76 ], [ false, %.lr.ph ], [ true, %70 ], [ false, %_ZN21hb_sanitize_context_t8dispatchIN3AAT13FTStringRangeEJPKNS1_4ltagEEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS8_.exit ] ret i1 %105 } diff --git a/bench/openjdk/optimized/utf8.ll b/bench/openjdk/optimized/utf8.ll index bc4c9932b6d..4a8455b7065 100644 --- a/bench/openjdk/optimized/utf8.ll +++ b/bench/openjdk/optimized/utf8.ll @@ -931,7 +931,7 @@ define hidden noundef zeroext i1 @_ZN4UTF813is_legal_utf8EPKhib(ptr noundef read br i1 %.not, label %.lr.ph90, label %._crit_edge91 .lr.ph90: ; preds = %._crit_edge, %99 - %.188 = phi i32 [ %100, %99 ], [ %.075.lcssa, %._crit_edge ] + %.188 = phi i32 [ %100, %98 ], [ %.075.lcssa, %._crit_edge ] %30 = sext i32 %.188 to i64 %31 = getelementptr inbounds i8, ptr %0, i64 %30 %32 = load i8, ptr %31, align 1 @@ -997,28 +997,27 @@ _ZN4UTF826is_supplementary_characterEPKh.exit.thread: ; preds = %36 62: ; preds = %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread %63 = and i8 %32, 31 %64 = zext nneg i8 %63 to i32 - %65 = shl nuw nsw i32 %64, 6 - %66 = add nsw i32 %.188, 1 - %67 = icmp slt i32 %66, %1 - br i1 %67, label %68, label %._crit_edge91 - -68: ; preds = %62 - %69 = sext i32 %66 to i64 - %70 = getelementptr inbounds i8, ptr %0, i64 %69 - %71 = load i8, ptr %70, align 1 - %72 = zext i8 %71 to i32 - %73 = and i32 %72, 192 - %74 = icmp eq i32 %73, 128 - br i1 %74, label %75, label %._crit_edge91 - -75: ; preds = %68 - %76 = and i32 %72, 63 - %77 = or disjoint i32 %76, %65 - %78 = icmp eq i32 %77, 0 - %or.cond = select i1 %2, i1 true, i1 %78 - %79 = icmp samesign ugt i8 %63, 1 - %or.cond5 = select i1 %or.cond, i1 true, i1 %79 - br i1 %or.cond5, label %99, label %._crit_edge91 + %65 = add nsw i32 %.188, 1 + %66 = icmp slt i32 %65, %1 + br i1 %66, label %67, label %._crit_edge91 + +67: ; preds = %62 + %68 = sext i32 %65 to i64 + %69 = getelementptr inbounds i8, ptr %0, i64 %68 + %70 = load i8, ptr %69, align 1 + %71 = zext i8 %70 to i32 + %72 = and i32 %71, 192 + %73 = icmp eq i32 %72, 128 + br i1 %73, label %74, label %._crit_edge91 + +74: ; preds = %67 + %75 = and i32 %71, 63 + %76 = or i32 %75, %64 + %77 = icmp eq i32 %76, 0 + %or.cond = select i1 %2, i1 true, i1 %77 + %78 = icmp samesign ugt i8 %63, 1 + %or.cond5 = select i1 %or.cond, i1 true, i1 %78 + br i1 %or.cond5, label %98, label %._crit_edge91 .thread: ; preds = %53, %49, %45, %40, %_ZN4UTF826is_supplementary_characterEPKh.exit, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread %.tr = zext i8 %32 to i32 @@ -1054,14 +1053,14 @@ _ZN4UTF826is_supplementary_characterEPKh.exit.thread: ; preds = %36 default.unreachable: ; preds = %_ZN4UTF826is_supplementary_characterEPKh.exit.thread unreachable -99: ; preds = %_ZN4UTF826is_supplementary_characterEPKh.exit, %75, %94, %34 - %.2 = phi i32 [ %.188, %34 ], [ %81, %94 ], [ %66, %75 ], [ %37, %_ZN4UTF826is_supplementary_characterEPKh.exit ] +99: ; preds = %_ZN4UTF826is_supplementary_characterEPKh.exit, %74, %94, %34 + %.2 = phi i32 [ %.188, %34 ], [ %81, %93 ], [ %65, %74 ], [ %37, %_ZN4UTF826is_supplementary_characterEPKh.exit ] %100 = add nsw i32 %.2, 1 %.not117 = icmp slt i32 %100, %1 br i1 %.not117, label %.lr.ph90, label %._crit_edge91, !llvm.loop !17 -._crit_edge91: ; preds = %.lr.ph90, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %75, %68, %62, %94, %89, %83, %.thread, %99, %._crit_edge - %.lcssa = phi i1 [ true, %._crit_edge ], [ true, %99 ], [ false, %.thread ], [ false, %83 ], [ false, %89 ], [ false, %94 ], [ false, %62 ], [ false, %68 ], [ false, %75 ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %.lr.ph90 ] +._crit_edge91: ; preds = %.lr.ph90, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread, %74, %67, %62, %93, %88, %82, %.thread, %99, %._crit_edge + %.lcssa = phi i1 [ true, %._crit_edge ], [ true, %98 ], [ false, %.thread ], [ false, %82 ], [ false, %88 ], [ false, %93 ], [ false, %62 ], [ false, %67 ], [ false, %74 ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %_ZN4UTF826is_supplementary_characterEPKh.exit.thread ], [ false, %.lr.ph90 ] ret i1 %.lcssa } diff --git a/bench/openssl/optimized/d1_lib.ll b/bench/openssl/optimized/d1_lib.ll index 884a28d37b1..d9382699c92 100644 --- a/bench/openssl/optimized/d1_lib.ll +++ b/bench/openssl/optimized/d1_lib.ll @@ -1036,7 +1036,7 @@ define range(i32 -1, 2) i32 @DTLSv1_listen(ptr noundef %0, ptr noundef %1) local br label %322 68: ; preds = %.lr.ph, %294 - %69 = phi i32 [ %37, %.lr.ph ], [ %295, %294 ] + %69 = phi i32 [ %37, %.lr.ph ], [ %295, %290 ] %70 = icmp samesign ult i32 %69, 13 br i1 %70, label %71, label %72 @@ -1151,41 +1151,34 @@ PACKET_copy_bytes.exit.thread: ; preds = %88 127: ; preds = %118 %128 = load i8, ptr %52, align 1, !tbaa !109 - %129 = zext i8 %128 to i64 - %130 = shl nuw nsw i64 %129, 16 - %131 = load i8, ptr %53, align 1, !tbaa !109 - %132 = zext i8 %131 to i64 - %133 = shl nuw nsw i64 %132, 8 - %134 = or disjoint i64 %133, %130 - %135 = load i8, ptr %54, align 1, !tbaa !109 - %136 = zext i8 %135 to i64 - %137 = or disjoint i64 %134, %136 - %138 = add nsw i64 %95, -9 - %139 = icmp samesign ult i64 %138, 3 - br i1 %139, label %PACKET_get_1.exit185.thread, label %140 - -140: ; preds = %127 - %141 = load i8, ptr %55, align 1, !tbaa !109 + %129 = load i8, ptr %53, align 1, !tbaa !109 + %130 = load i8, ptr %54, align 1, !tbaa !109 + %131 = add nsw i64 %95, -9 + %132 = icmp samesign ult i64 %131, 3 + br i1 %132, label %PACKET_get_1.exit185.thread, label %133 + +133:; preds = %127 + %134 = load i8, ptr %55, align 1, !tbaa !109 + %135 = zext i8 %134 to i64 + %136 = shl nuw nsw i64 %135, 16 + %137 = load i8, ptr %56, align 1, !tbaa !109 + %138 = zext i8 %137 to i64 + %139 = shl nuw nsw i64 %138, 8 + %140 = or disjoint i64 %139, %136 + %141 = load i8, ptr %57, align 1, !tbaa !109 %142 = zext i8 %141 to i64 - %143 = shl nuw nsw i64 %142, 16 - %144 = load i8, ptr %56, align 1, !tbaa !109 - %145 = zext i8 %144 to i64 - %146 = shl nuw nsw i64 %145, 8 - %147 = or disjoint i64 %146, %143 - %148 = load i8, ptr %57, align 1, !tbaa !109 - %149 = zext i8 %148 to i64 - %150 = or disjoint i64 %147, %149 - %151 = add nsw i64 %95, -12 - %.not131 = icmp eq i64 %151, %150 - br i1 %.not131, label %152, label %PACKET_get_1.exit185.thread - -PACKET_get_1.exit185.thread: ; preds = %140, %127, %118, %105, %102, %101 + %143 = or disjoint i64 %140, %142 + %144 = add nsw i64 %95, -12 + %.not131 = icmp eq i64 %144, %143 + br i1 %.not131, label %145, label %PACKET_get_1.exit185.thread + +PACKET_get_1.exit185.thread:; preds = %133, %127, %118, %105, %102, %101 call void @ERR_new() #9 call void @ERR_set_debug(ptr noundef nonnull @.str.2, i32 noundef 566, ptr noundef nonnull @__func__.DTLSv1_listen) #9 call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 20, i32 noundef 159, ptr noundef null) #9 br label %322 -152: ; preds = %140 +152: ; preds = %133 %.not132 = icmp eq i8 %103, 1 br i1 %.not132, label %154, label %153 @@ -1206,10 +1199,12 @@ PACKET_get_1.exit185.thread: ; preds = %140, %127, %118, %1 br label %322 157: ; preds = %154 - %.not133 = icmp ne i64 %137, 0 - %158 = icmp samesign ugt i64 %150, %115 - %or.cond342 = select i1 %.not133, i1 true, i1 %158 - br i1 %or.cond342, label %159, label %160 + %151 = or i8 %129, %128 + %152 = or i8 %151, %130 + %153 = icmp ne i8 %152, 0 + %154 = icmp samesign ugt i64 %143, %115 + %or.cond342 = select i1 %153, i1 true, i1 %154 + br i1 %or.cond342, label %155, label %156 159: ; preds = %157 call void @ERR_new() #9 @@ -1224,13 +1219,13 @@ PACKET_get_1.exit185.thread: ; preds = %140, %127, %118, %1 162: ; preds = %160 %163 = load i32, ptr %26, align 8, !tbaa !99 - %164 = add nuw nsw i64 %150, 12 + %164 = add nuw nsw i64 %143, 12 %165 = load ptr, ptr %43, align 8, !tbaa !111 - call void %161(i32 noundef 0, i32 noundef %163, i32 noundef 22, ptr noundef nonnull %46, i64 noundef %164, ptr noundef nonnull %0, ptr noundef %165) #9 + call void %157(i32 noundef 0, i32 noundef %163, i32 noundef 22, ptr noundef nonnull %46, i64 noundef %164, ptr noundef nonnull %0, ptr noundef %165) #9 br label %166 166: ; preds = %162, %160 - %167 = icmp samesign ult i64 %150, 2 + %167 = icmp samesign ult i64 %143, 2 br i1 %167, label %168, label %169 168: ; preds = %166 @@ -1246,31 +1241,31 @@ PACKET_get_1.exit185.thread: ; preds = %140, %127, %118, %1 %173 = load i8, ptr %59, align 1, !tbaa !109 %174 = zext i8 %173 to i32 %175 = or disjoint i32 %172, %174 + %172 = icmp eq i32 %171, 256 + %173 = select i1 %172, i32 65280, i32 %171 + %174 = load ptr, ptr %60, align 8, !tbaa !78 + %175 = load i32, ptr %174, align 8, !tbaa !98 %176 = icmp eq i32 %175, 256 %177 = select i1 %176, i32 65280, i32 %175 - %178 = load ptr, ptr %60, align 8, !tbaa !78 - %179 = load i32, ptr %178, align 8, !tbaa !98 - %180 = icmp eq i32 %179, 256 - %spec.select162 = select i1 %180, i32 65280, i32 %179 - %181 = icmp ule i32 %177, %spec.select162 - %.not136 = icmp eq i32 %179, 131071 - %or.cond343 = or i1 %.not136, %181 - br i1 %or.cond343, label %183, label %182 - -182: ; preds = %169 + %177 = icmp ule i32 %173, %177 + %.not136 = icmp eq i32 %175, 131071 + %or.cond343 = or i1 %.not136, %177 + br i1 %or.cond343, label %183, label %178 + +178:; preds = %173 call void @ERR_new() #9 call void @ERR_set_debug(ptr noundef nonnull @.str.2, i32 noundef 609, ptr noundef nonnull @__func__.DTLSv1_listen) #9 call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 20, i32 noundef 267, ptr noundef null) #9 br label %322 183: ; preds = %169 - %184 = add nsw i64 %150, -2 + %184 = add nsw i64 %143, -2 %or.cond344 = icmp samesign ult i64 %184, 33 br i1 %or.cond344, label %PACKET_forward.exit.thread, label %185 185: ; preds = %183 %186 = load i8, ptr %61, align 1, !tbaa !109 - %187 = add nsw i64 %150, -35 + %187 = add nsw i64 %143, -35 %188 = zext i8 %186 to i64 %189 = icmp samesign ult i64 %187, %188 br i1 %189, label %PACKET_forward.exit.thread, label %190 @@ -1314,7 +1309,7 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 207: ; preds = %201 %208 = zext i8 %193 to i32 - %209 = call i32 %204(ptr noundef nonnull %0, ptr noundef nonnull %199, i32 noundef %208) #9 + %209 = call i32 %200(ptr noundef nonnull %0, ptr noundef nonnull %199, i32 noundef %208) #9 %210 = icmp eq i32 %209, 0 br i1 %210, label %.thread332, label %297 @@ -1328,7 +1323,7 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 br i1 %214, label %220, label %215 215: ; preds = %.thread332 - %216 = call i32 %213(ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull %5) #9 + %216 = call i32 %209(ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef nonnull %5) #9 %217 = icmp eq i32 %216, 0 %218 = load i32, ptr %5, align 4 %219 = icmp ugt i32 %218, 255 @@ -1353,94 +1348,94 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 br label %228 228: ; preds = %221, %225 - %229 = phi i64 [ %227, %225 ], [ 65279, %221 ] + %229 = phi i64 [ %227, %221 ], [ 65279, %217 ] %230 = call i32 @ssl_get_max_send_fragment(ptr noundef nonnull %0) #9 %231 = add i32 %230, 13 %232 = zext i32 %231 to i64 %233 = call i32 @WPACKET_init_static_len(ptr noundef nonnull %6, ptr noundef nonnull %34, i64 noundef %232, i64 noundef 0) #9 %.not140 = icmp eq i32 %233, 0 - br i1 %.not140, label %264, label %234 + br i1 %.not140, label %260, label %234 234: ; preds = %228 %235 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 22, i64 noundef 1) #9 %.not141 = icmp eq i32 %235, 0 - br i1 %.not141, label %264, label %236 + br i1 %.not141, label %260, label %232 + +232: ; preds = %230 + %233 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef %225, i64 noundef 2) #9 + %.not142 = icmp eq i32 %233, 0 + br i1 %.not142, label %260, label %234 + +234: ; preds = %232 + %235 = call i32 @WPACKET_memcpy(ptr noundef nonnull %6, ptr noundef nonnull %4, i64 noundef 8) #9 + %.not143 = icmp eq i32 %235, 0 + br i1 %.not143, label %260, label %236 236: ; preds = %234 - %237 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef %229, i64 noundef 2) #9 + %237 = call i32 @WPACKET_start_sub_packet_len__(ptr noundef nonnull %6, i64 noundef 2) #9 %.not142 = icmp eq i32 %237, 0 - br i1 %.not142, label %264, label %238 + br i1 %.not142, label %260, label %238 238: ; preds = %236 - %239 = call i32 @WPACKET_memcpy(ptr noundef nonnull %6, ptr noundef nonnull %4, i64 noundef 8) #9 + %239 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 3, i64 noundef 1) #9 %.not143 = icmp eq i32 %239, 0 - br i1 %.not143, label %264, label %240 + br i1 %.not143, label %260, label %240 240: ; preds = %238 - %241 = call i32 @WPACKET_start_sub_packet_len__(ptr noundef nonnull %6, i64 noundef 2) #9 + %241 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3) #9 %.not144 = icmp eq i32 %241, 0 - br i1 %.not144, label %264, label %242 + br i1 %.not144, label %260, label %242 242: ; preds = %240 - %243 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 3, i64 noundef 1) #9 + %243 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 2) #9 %.not145 = icmp eq i32 %243, 0 - br i1 %.not145, label %264, label %244 + br i1 %.not145, label %260, label %244 244: ; preds = %242 %245 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3) #9 %.not146 = icmp eq i32 %245, 0 - br i1 %.not146, label %264, label %246 + br i1 %.not146, label %260, label %246 246: ; preds = %244 - %247 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 2) #9 + %247 = call i32 @WPACKET_start_sub_packet_len__(ptr noundef nonnull %6, i64 noundef 3) #9 %.not147 = icmp eq i32 %247, 0 - br i1 %.not147, label %264, label %248 + br i1 %.not147, label %260, label %248 248: ; preds = %246 - %249 = call i32 @WPACKET_put_bytes__(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3) #9 - %.not148 = icmp eq i32 %249, 0 - br i1 %.not148, label %264, label %250 - -250: ; preds = %248 - %251 = call i32 @WPACKET_start_sub_packet_len__(ptr noundef nonnull %6, i64 noundef 3) #9 - %.not149 = icmp eq i32 %251, 0 - br i1 %.not149, label %264, label %252 - -252: ; preds = %250 - %253 = load i32, ptr %5, align 4, !tbaa !108 - %254 = zext i32 %253 to i64 - %255 = call i32 @dtls_raw_hello_verify_request(ptr noundef nonnull %6, ptr noundef nonnull %3, i64 noundef %254) #9 + %249 = load i32, ptr %5, align 4, !tbaa !108 + %250 = zext i32 %249 to i64 + %251 = call i32 @dtls_raw_hello_verify_request(ptr noundef nonnull %6, ptr noundef nonnull %3, i64 noundef %250) #9 + %.not150 = icmp eq i32 %251, 0 + br i1 %.not150, label %260, label %252 + +252:; preds = %248 + %253 = call i32 @WPACKET_close(ptr noundef nonnull %6) #9 + %.not151 = icmp eq i32 %253, 0 + br i1 %.not151, label %260, label %254 + +254:; preds = %252 + %255 = call i32 @WPACKET_close(ptr noundef nonnull %6) #9 %.not150 = icmp eq i32 %255, 0 - br i1 %.not150, label %264, label %256 + br i1 %.not150, label %260, label %256 -256: ; preds = %252 - %257 = call i32 @WPACKET_close(ptr noundef nonnull %6) #9 +256: ; preds = %254 + %257 = call i32 @WPACKET_get_total_written(ptr noundef nonnull %6, ptr noundef nonnull %7) #9 %.not151 = icmp eq i32 %257, 0 - br i1 %.not151, label %264, label %258 + br i1 %.not151, label %260, label %258 258: ; preds = %256 - %259 = call i32 @WPACKET_close(ptr noundef nonnull %6) #9 + %259 = call i32 @WPACKET_finish(ptr noundef nonnull %6) #9 %.not152 = icmp eq i32 %259, 0 - br i1 %.not152, label %264, label %260 + br i1 %.not152, label %260, label %261 -260: ; preds = %258 - %261 = call i32 @WPACKET_get_total_written(ptr noundef nonnull %6, ptr noundef nonnull %7) #9 - %.not153 = icmp eq i32 %261, 0 - br i1 %.not153, label %264, label %262 - -262: ; preds = %260 - %263 = call i32 @WPACKET_finish(ptr noundef nonnull %6) #9 - %.not154 = icmp eq i32 %263, 0 - br i1 %.not154, label %264, label %265 - -264: ; preds = %262, %260, %258, %256, %252, %250, %248, %246, %244, %242, %240, %238, %236, %234, %228 +262: ; preds = %258, %256, %254, %252, %248, %246, %244, %242, %240, %238, %236, %234, %232, %230, %224 call void @ERR_new() #9 call void @ERR_set_debug(ptr noundef nonnull @.str.2, i32 noundef 732, ptr noundef nonnull @__func__.DTLSv1_listen) #9 call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 20, i32 noundef 786691, ptr noundef null) #9 call void @WPACKET_cleanup(ptr noundef nonnull %6) #9 br label %.thread337 -265: ; preds = %262 +265: ; preds = %258 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %64, ptr noundef nonnull align 1 dereferenceable(3) %65, i64 3, i1 false) %266 = load ptr, ptr %41, align 8, !tbaa !110 %.not155 = icmp eq ptr %266, null @@ -1448,13 +1443,13 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 267: ; preds = %265 %268 = load ptr, ptr %43, align 8, !tbaa !111 - call void %266(i32 noundef 1, i32 noundef 0, i32 noundef 256, ptr noundef nonnull %31, i64 noundef 13, ptr noundef nonnull %0, ptr noundef %268) #9 + call void %262(i32 noundef 1, i32 noundef 0, i32 noundef 256, ptr noundef nonnull %31, i64 noundef 13, ptr noundef nonnull %0, ptr noundef %268) #9 br label %269 269: ; preds = %267, %265 %270 = call ptr @BIO_ADDR_new() #9 %271 = icmp eq ptr %270, null - br i1 %271, label %272, label %273 + br i1 %271, label %272, label %269 272: ; preds = %269 call void @ERR_new() #9 @@ -1462,33 +1457,33 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 20, i32 noundef 524320, ptr noundef null) #9 br label %.thread337 +269: ; preds = %265 + %270 = call i64 @BIO_ctrl(ptr noundef nonnull %20, i32 noundef 46, i64 noundef 0, ptr noundef nonnull %266) #9 + %271 = trunc i64 %270 to i32 + %272 = icmp sgt i32 %271, 0 + br i1 %272, label %273, label %275 + 273: ; preds = %269 - %274 = call i64 @BIO_ctrl(ptr noundef nonnull %20, i32 noundef 46, i64 noundef 0, ptr noundef nonnull %270) #9 - %275 = trunc i64 %274 to i32 - %276 = icmp sgt i32 %275, 0 - br i1 %276, label %277, label %279 - -277: ; preds = %273 - %278 = call i64 @BIO_ctrl(ptr noundef nonnull %21, i32 noundef 44, i64 noundef 0, ptr noundef nonnull %270) #9 - br label %279 - -279: ; preds = %277, %273 - call void @BIO_ADDR_free(ptr noundef nonnull %270) #9 - %280 = load i64, ptr %7, align 8, !tbaa !102 - %281 = trunc i64 %280 to i32 - %282 = call i32 @BIO_write(ptr noundef nonnull %21, ptr noundef nonnull %34, i32 noundef %281) #9 - %283 = load i64, ptr %7, align 8, !tbaa !102 - %284 = trunc i64 %283 to i32 - %285 = icmp slt i32 %282, %284 - br i1 %285, label %286, label %288 - -286: ; preds = %279 - %287 = call i32 @BIO_test_flags(ptr noundef nonnull %21, i32 noundef 8) #9 - %.not157 = icmp eq i32 %287, 0 + %274 = call i64 @BIO_ctrl(ptr noundef nonnull %21, i32 noundef 44, i64 noundef 0, ptr noundef nonnull %270) #9 + br label %275 + +275:; preds = %273, %269 + call void @BIO_ADDR_free(ptr noundef nonnull %266) #9 + %276 = load i64, ptr %7, align 8, !tbaa !102 + %277 = trunc i64 %276 to i32 + %278 = call i32 @BIO_write(ptr noundef nonnull %21, ptr noundef nonnull %34, i32 noundef %277) #9 + %279 = load i64, ptr %7, align 8, !tbaa !102 + %280 = trunc i64 %279 to i32 + %281 = icmp slt i32 %278, %280 + br i1 %281, label %282, label %284 + +282:; preds = %275 + %283 = call i32 @BIO_test_flags(ptr noundef nonnull %21, i32 noundef 8) #9 + %.not157 = icmp eq i32 %283, 0 %..096 = sext i1 %.not157 to i32 br label %.thread337 -288: ; preds = %279 +288: ; preds = %275 %289 = call i64 @BIO_ctrl(ptr noundef nonnull %21, i32 noundef 11, i64 noundef 0, ptr noundef null) #9 %290 = trunc i64 %289 to i32 %291 = icmp slt i32 %290, 1 @@ -1500,8 +1495,8 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 %..096164 = sext i1 %.not156 to i32 br label %.thread337 -.thread337: ; preds = %220, %272, %264, %286, %292 - %.298.ph = phi i32 [ %..096164, %292 ], [ %..096, %286 ], [ -1, %264 ], [ 0, %272 ], [ -1, %220 ] +.thread337: ; preds = %220, %272, %260, %282, %292 + %.298.ph = phi i32 [ %..096164, %288 ], [ %..096, %282 ], [ -1, %260 ], [ 0, %268 ], [ -1, %216 ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #9 br label %322 @@ -1529,7 +1524,7 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 %306 = load ptr, ptr %305, align 8, !tbaa !134 %307 = getelementptr inbounds nuw i8, ptr %0, i64 3208 %308 = load ptr, ptr %307, align 8, !tbaa !90 - %309 = call i32 %306(ptr noundef %308) #9 + %309 = call i32 %302(ptr noundef %308) #9 %310 = call i64 @SSL_set_options(ptr noundef nonnull %0, i64 noundef 8192) #9 call void @ossl_statem_set_hello_verify_done(ptr noundef nonnull %0) #9 %311 = call i64 @BIO_ctrl(ptr noundef nonnull %20, i32 noundef 46, i64 noundef 0, ptr noundef %1) #9 @@ -1560,15 +1555,15 @@ PACKET_forward.exit.thread: ; preds = %192, %190, %185, %1 %.166 = select i1 %.not160, i32 -1, i32 1 br label %322 -322: ; preds = %.thread337, %._crit_edge, %320, %319, %206, %PACKET_forward.exit.thread, %182, %168, %159, %156, %153, %PACKET_get_1.exit185.thread, %100, %PACKET_copy_bytes.exit.thread, %87, %85, %71 - %.197 = phi i32 [ 0, %71 ], [ 0, %85 ], [ 0, %87 ], [ 0, %100 ], [ 0, %PACKET_get_1.exit185.thread ], [ 0, %153 ], [ 0, %156 ], [ 0, %159 ], [ 0, %182 ], [ -1, %319 ], [ -1, %206 ], [ 0, %PACKET_forward.exit.thread ], [ 0, %168 ], [ 0, %PACKET_copy_bytes.exit.thread ], [ %spec.select, %._crit_edge ], [ %.166, %320 ], [ %.298.ph, %.thread337 ] +322: ; preds = %.thread337, %._crit_edge, %320, %319, %206, %PACKET_forward.exit.thread, %178, %168, %159, %156, %153, %PACKET_get_1.exit185.thread, %100, %PACKET_copy_bytes.exit.thread, %87, %85, %71 + %.197 = phi i32 [ 0, %71 ], [ 0, %85 ], [ 0, %87 ], [ 0, %100 ], [ 0, %PACKET_get_1.exit185.thread ], [ 0, %146 ], [ 0, %149 ], [ 0, %155 ], [ 0, %178 ], [ -1, %315 ], [ -1, %202 ], [ 0, %PACKET_forward.exit.thread ], [ 0, %164 ], [ 0, %PACKET_copy_bytes.exit.thread ], [ %spec.select, %._crit_edge ], [ %.166, %316 ], [ %.298.ph, %.thread337 ] call void @BIO_ADDR_free(ptr noundef null) #9 call void @CRYPTO_free(ptr noundef nonnull %31, ptr noundef nonnull @.str.2, i32 noundef 848) #9 call void @CRYPTO_free(ptr noundef nonnull %34, ptr noundef nonnull @.str.2, i32 noundef 849) #9 br label %.thread .thread: ; preds = %2, %9, %30, %17, %322, %66, %29, %24 - %.0 = phi i32 [ -1, %29 ], [ -1, %66 ], [ %.197, %322 ], [ -1, %24 ], [ -1, %17 ], [ -1, %30 ], [ -1, %9 ], [ -1, %2 ] + %.0 = phi i32 [ -1, %29 ], [ -1, %66 ], [ %.197, %318 ], [ -1, %24 ], [ -1, %17 ], [ -1, %30 ], [ -1, %9 ], [ -1, %2 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9 call void @llvm.lifetime.end.p0(i64 255, ptr nonnull %3) #9 diff --git a/bench/openssl/optimized/statem_srvr.ll b/bench/openssl/optimized/statem_srvr.ll index 4abe507d445..045e9a5bdfa 100644 --- a/bench/openssl/optimized/statem_srvr.ll +++ b/bench/openssl/optimized/statem_srvr.ll @@ -8139,66 +8139,63 @@ define internal fastcc void @ssl_check_for_safari(ptr noundef %0, ptr noundef re %.sroa.0.0.copyload = load ptr, ptr %4, align 8, !tbaa !162 %5 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 2 %6 = load i8, ptr %5, align 1, !tbaa !193 - %7 = zext i8 %6 to i32 - %8 = shl nuw nsw i32 %7, 8 - %9 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 3 - %10 = load i8, ptr %9, align 1, !tbaa !193 - %11 = zext i8 %10 to i32 - %12 = or disjoint i32 %8, %11 - %13 = and i64 %.sroa.10.0.copyload, -2 - %14 = icmp eq i64 %13, 4 - br i1 %14, label %PACKET_forward.exit.thread, label %15 - -15: ; preds = %3 - %16 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 4 + %7 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 3 + %8 = load i8, ptr %7, align 1, !tbaa !193 + %9 = and i64 %.sroa.10.0.copyload, -2 + %10 = icmp eq i64 %9, 4 + br i1 %10, label %PACKET_forward.exit.thread, label %11 + +11:; preds = %3 + %12 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 4 + %13 = load i8, ptr %12, align 1, !tbaa !193 + %14 = zext i8 %13 to i64 + %15 = shl nuw nsw i64 %14, 8 + %16 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 5 %17 = load i8, ptr %16, align 1, !tbaa !193 %18 = zext i8 %17 to i64 - %19 = shl nuw nsw i64 %18, 8 - %20 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 5 - %21 = load i8, ptr %20, align 1, !tbaa !193 - %22 = zext i8 %21 to i64 - %23 = or disjoint i64 %19, %22 - %24 = add i64 %.sroa.10.0.copyload, -6 - %25 = icmp ult i64 %24, %23 - br i1 %25, label %PACKET_forward.exit.thread, label %PACKET_get_length_prefixed_2.exit - -PACKET_get_length_prefixed_2.exit: ; preds = %15 - %26 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 6 - %27 = getelementptr inbounds nuw i8, ptr %26, i64 %23 - %28 = sub nuw i64 %24, %23 - %.not6 = icmp eq i32 %12, 0 - br i1 %.not6, label %29, label %PACKET_forward.exit.thread - -29: ; preds = %PACKET_get_length_prefixed_2.exit - %30 = tail call i32 @SSL_client_version(ptr noundef %0) #12 - %.mask = and i32 %30, -256 - %31 = icmp eq i32 %.mask, 768 - br i1 %31, label %32, label %36 - -32: ; preds = %29 - %33 = tail call i32 @SSL_client_version(ptr noundef %0) #12 - %34 = icmp sgt i32 %33, 770 - %35 = select i1 %34, i64 34, i64 18 - br label %36 - -36: ; preds = %29, %32 - %37 = phi i64 [ %35, %32 ], [ 18, %29 ] - %.not.i = icmp eq i64 %28, %37 + %19 = or disjoint i64 %15, %18 + %20 = add i64 %.sroa.10.0.copyload, -6 + %21 = icmp ult i64 %20, %19 + br i1 %21, label %PACKET_forward.exit.thread, label %PACKET_get_length_prefixed_2.exit + +PACKET_get_length_prefixed_2.exit:; preds = %11 + %22 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 6 + %23 = getelementptr inbounds nuw i8, ptr %22, i64 %19 + %24 = sub nuw i64 %20, %19 + %25 = or i8 %8, %6 + %26 = icmp eq i8 %25, 0 + br i1 %26, label %27, label %PACKET_forward.exit.thread + +27: ; preds = %PACKET_get_length_prefixed_2.exit + %28 = tail call i32 @SSL_client_version(ptr noundef %0) #12 + %.mask = and i32 %28, -256 + %29 = icmp eq i32 %.mask, 768 + br i1 %29, label %30, label %34 + +PACKET_get_length_prefixed_2.exit: ; preds = %27 + %31 = tail call i32 @SSL_client_version(ptr noundef %0) #12 + %32 = icmp sgt i32 %31, 770 + %33 = select i1 %32, i64 34, i64 18 + br label %34 + +36: ; preds = %27, %30 + %37 = phi i64 [ %33, %30 ], [ 18, %27 ] + %.not.i = icmp eq i64 %24, %37 br i1 %.not.i, label %38, label %PACKET_equal.exit 38: ; preds = %36 - %39 = tail call i32 @CRYPTO_memcmp(ptr noundef nonnull %27, ptr noundef nonnull @ssl_check_for_safari.kSafariExtensionsBlock, i64 noundef %28) #12 + %39 = tail call i32 @CRYPTO_memcmp(ptr noundef nonnull %23, ptr noundef nonnull @ssl_check_for_safari.kSafariExtensionsBlock, i64 noundef %24) #12 %40 = icmp eq i32 %39, 0 %41 = zext i1 %40 to i8 br label %PACKET_equal.exit PACKET_equal.exit: ; preds = %36, %38 - %.0.i10 = phi i8 [ %41, %38 ], [ 0, %36 ] + %.0.i10 = phi i8 [ %41, %36 ], [ 0, %34 ] %42 = getelementptr inbounds nuw i8, ptr %0, i64 1244 store i8 %.0.i10, ptr %42, align 4, !tbaa !289 br label %PACKET_forward.exit.thread -PACKET_forward.exit.thread: ; preds = %2, %15, %3, %PACKET_get_length_prefixed_2.exit, %PACKET_equal.exit +PACKET_forward.exit.thread: ; preds = %2, %11, %3, %PACKET_get_length_prefixed_2.exit, %PACKET_equal.exit ret void } diff --git a/bench/php/optimized/pcre2_auto_possess.ll b/bench/php/optimized/pcre2_auto_possess.ll index 729a0ba92b3..aafbd232cdf 100644 --- a/bench/php/optimized/pcre2_auto_possess.ll +++ b/bench/php/optimized/pcre2_auto_possess.ll @@ -380,25 +380,25 @@ get_repeat_base.exit: ; preds = %11, %13, %15 33: ; preds = %26, %29, %5 %.0196 = phi i8 [ %6, %5 ], [ %6, %26 ], [ %30, %29 ] %.0194 = phi ptr [ %9, %5 ], [ %.1195, %26 ], [ %32, %29 ] - switch i8 %.0196, label %338 [ - i8 6, label %339 - i8 7, label %339 - i8 8, label %339 - i8 9, label %339 - i8 10, label %339 - i8 11, label %339 - i8 12, label %339 - i8 13, label %339 - i8 17, label %339 - i8 18, label %339 - i8 19, label %339 - i8 20, label %339 - i8 21, label %339 - i8 22, label %339 - i8 23, label %339 - i8 24, label %339 - i8 25, label %339 - i8 26, label %339 + switch i8 %.0196, label %335 [ + i8 6, label %336 + i8 7, label %336 + i8 8, label %336 + i8 9, label %336 + i8 10, label %336 + i8 11, label %336 + i8 12, label %336 + i8 13, label %336 + i8 17, label %336 + i8 18, label %336 + i8 19, label %336 + i8 20, label %336 + i8 21, label %336 + i8 22, label %336 + i8 23, label %336 + i8 24, label %336 + i8 25, label %336 + i8 26, label %336 i8 29, label %.thread i8 31, label %.thread i8 113, label %296 @@ -542,7 +542,7 @@ get_repeat_base.exit: ; preds = %11, %13, %15 store i32 %.0190, ptr %131, align 4, !tbaa !4 %132 = getelementptr inbounds nuw i8, ptr %4, i64 12 store i32 -1, ptr %132, align 4, !tbaa !4 - br label %339 + br label %336 133: ; preds = %33 br label %.thread211.thread @@ -718,12 +718,12 @@ get_repeat_base.exit: ; preds = %11, %13, %15 262: ; preds = %259 %263 = getelementptr inbounds nuw i8, ptr %4, i64 12 store i32 -1, ptr %263, align 4, !tbaa !4 - br label %339 + br label %336 264: ; preds = %259 %265 = getelementptr inbounds nuw i8, ptr %4, i64 16 store i32 -1, ptr %265, align 4, !tbaa !4 - br label %339 + br label %336 266: ; preds = %33, %33 %267 = load i8, ptr %.0194, align 1, !tbaa !18 @@ -740,7 +740,7 @@ get_repeat_base.exit: ; preds = %11, %13, %15 %274 = getelementptr inbounds nuw i8, ptr %4, i64 12 store i32 %273, ptr %274, align 4, !tbaa !4 %275 = getelementptr inbounds nuw i8, ptr %.0194, i64 2 - br label %339 + br label %336 276: ; preds = %266 %277 = getelementptr inbounds nuw i8, ptr %.0194, i64 1 @@ -766,7 +766,7 @@ get_repeat_base.exit: ; preds = %11, %13, %15 %288 = zext i8 %287 to i32 %289 = getelementptr inbounds nuw i8, ptr %4, i64 12 store i32 %288, ptr %289, align 4, !tbaa !4 - br label %339 + br label %336 290: ; preds = %282 %.0189.ptr = getelementptr inbounds nuw i8, ptr %4, i64 %.0189.idx @@ -781,7 +781,7 @@ get_repeat_base.exit: ; preds = %11, %13, %15 %294 = icmp eq i8 %.0196, 16 %295 = select i1 %294, i32 29, i32 31 store i32 %295, ptr %4, align 4, !tbaa !4 - br label %339 + br label %336 296: ; preds = %33, %33, %33, %33 %297 = and i8 %.0196, -2 @@ -807,7 +807,7 @@ get_repeat_base.exit: ; preds = %11, %13, %15 310: ; preds = %308, %298 %.0192 = phi ptr [ %307, %298 ], [ %309, %308 ] %311 = load i8, ptr %.0192, align 1, !tbaa !18 - switch i8 %311, label %328 [ + switch i8 %311, label %325 [ i8 98, label %312 i8 99, label %312 i8 102, label %312 @@ -825,47 +825,44 @@ get_repeat_base.exit: ; preds = %11, %13, %15 312: ; preds = %310, %310, %310, %310, %310, %310 store i32 1, ptr %8, align 4, !tbaa !4 %313 = getelementptr inbounds nuw i8, ptr %.0192, i64 1 - br label %328 + br label %325 314: ; preds = %310, %310, %310 %315 = getelementptr inbounds nuw i8, ptr %.0192, i64 1 - br label %328 + br label %325 316: ; preds = %310, %310, %310 %317 = getelementptr inbounds nuw i8, ptr %.0192, i64 1 %318 = load i8, ptr %317, align 1, !tbaa !18 - %319 = zext i8 %318 to i32 - %320 = shl nuw nsw i32 %319, 8 - %321 = getelementptr inbounds nuw i8, ptr %.0192, i64 2 - %322 = load i8, ptr %321, align 1, !tbaa !18 - %323 = zext i8 %322 to i32 - %324 = or disjoint i32 %320, %323 - %325 = icmp eq i32 %324, 0 - %326 = zext i1 %325 to i32 - store i32 %326, ptr %8, align 4, !tbaa !4 - %327 = getelementptr inbounds nuw i8, ptr %.0192, i64 5 - br label %328 - -328: ; preds = %316, %314, %312, %310 - %.1193 = phi ptr [ %.0192, %310 ], [ %327, %316 ], [ %315, %314 ], [ %313, %312 ] - %329 = ptrtoint ptr %.1193 to i64 - %330 = ptrtoint ptr %.0194 to i64 - %331 = sub i64 %329, %330 - %332 = trunc i64 %331 to i32 - %333 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i32 %332, ptr %333, align 4, !tbaa !4 - %334 = ptrtoint ptr %.0192 to i64 - %335 = sub i64 %329, %334 - %336 = trunc i64 %335 to i32 - %337 = getelementptr inbounds nuw i8, ptr %4, i64 12 - store i32 %336, ptr %337, align 4, !tbaa !4 - br label %339 - -338: ; preds = %33 - br label %339 - -339: ; preds = %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %262, %264, %338, %328, %293, %283, %268, %130 - %.0191 = phi ptr [ null, %338 ], [ %.1193, %328 ], [ %275, %268 ], [ %281, %283 ], [ %281, %293 ], [ %.3, %130 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.4, %264 ], [ %.4, %262 ] + %319 = getelementptr inbounds nuw i8, ptr %.0192, i64 2 + %320 = load i8, ptr %319, align 1, !tbaa !18 + %321 = or i8 %320, %318 + %322 = icmp eq i8 %321, 0 + %323 = zext i1 %322 to i32 + store i32 %323, ptr %8, align 4, !tbaa !4 + %324 = getelementptr inbounds nuw i8, ptr %.0192, i64 5 + br label %325 + +325: ; preds = %316, %314, %312, %310 + %.1193 = phi ptr [ %.0192, %310 ], [ %324, %316 ], [ %315, %314 ], [ %313, %312 ] + %326 = ptrtoint ptr %.1193 to i64 + %327 = ptrtoint ptr %.0194 to i64 + %328 = sub i64 %326, %327 + %329 = trunc i64 %328 to i32 + %330 = getelementptr inbounds nuw i8, ptr %4, i64 8 + store i32 %329, ptr %330, align 4, !tbaa !4 + %331 = ptrtoint ptr %.0192 to i64 + %332 = sub i64 %326, %331 + %333 = trunc i64 %332 to i32 + %334 = getelementptr inbounds nuw i8, ptr %4, i64 12 + store i32 %333, ptr %334, align 4, !tbaa !4 + br label %336 + +335:; preds = %33 + br label %336 + +338: ; preds = %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %33, %262, %264, %335, %325, %293, %283, %268, %130 + %.0191 = phi ptr [ null, %335 ], [ %.1193, %325 ], [ %275, %268 ], [ %281, %283 ], [ %281, %293 ], [ %.3, %130 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.0194, %33 ], [ %.4, %264 ], [ %.4, %262 ] ret ptr %.0191 } diff --git a/bench/php/optimized/pcre2_study.ll b/bench/php/optimized/pcre2_study.ll index 8f9ab17c556..908411ec737 100644 --- a/bench/php/optimized/pcre2_study.ll +++ b/bench/php/optimized/pcre2_study.ll @@ -2067,13 +2067,10 @@ study_char_list.exit: ; preds = %.loopexit83.i, %559 732: ; preds = %.loopexit494, %.loopexit494, %.loopexit494 %733 = getelementptr inbounds nuw i8, ptr %.11461, i64 1 %734 = load i8, ptr %733, align 1, !tbaa !17 - %735 = zext i8 %734 to i32 - %736 = shl nuw nsw i32 %735, 8 - %737 = getelementptr inbounds nuw i8, ptr %.11461, i64 2 - %738 = load i8, ptr %737, align 1, !tbaa !17 - %739 = zext i8 %738 to i32 - %740 = or disjoint i32 %736, %739 - %.not595 = icmp eq i32 %740, 0 + %735 = getelementptr inbounds nuw i8, ptr %.11461, i64 2 + %736 = load i8, ptr %735, align 1, !tbaa !17 + %737 = or i8 %736, %734 + %.not595 = icmp eq i8 %737, 0 %spec.select322.idx = select i1 %.not595, i64 5, i64 0 %spec.select322 = getelementptr inbounds nuw i8, ptr %.11461, i64 %spec.select322.idx br i1 %.not595, label %.backedge.backedge, label %.thread470 diff --git a/bench/qemu/optimized/fdt.ll b/bench/qemu/optimized/fdt.ll index 921aa89e2ef..eebdb44deb7 100644 --- a/bench/qemu/optimized/fdt.ll +++ b/bench/qemu/optimized/fdt.ll @@ -26,7 +26,7 @@ define dso_local range(i32 -19, 2147483647) i32 @fdt_ro_probe_(ptr noundef %0) l %20 = ptrtoint ptr %0 to i64 %21 = and i64 %20, 7 %.not = icmp eq i64 %21, 0 - br i1 %.not, label %22, label %102 + br i1 %.not, label %22, label %95 22: ; preds = %1 %23 = load i8, ptr %0, align 1 @@ -46,7 +46,7 @@ define dso_local range(i32 -19, 2147483647) i32 @fdt_ro_probe_(ptr noundef %0) l %37 = load i8, ptr %36, align 1 %38 = zext i8 %37 to i32 %39 = or disjoint i32 %35, %38 - switch i32 %39, label %102 [ + switch i32 %39, label %95 [ i32 -804389139, label %40 i32 804389138, label %80 ] @@ -71,7 +71,7 @@ define dso_local range(i32 -19, 2147483647) i32 @fdt_ro_probe_(ptr noundef %0) l %57 = zext i8 %56 to i32 %58 = or disjoint i32 %54, %57 %59 = icmp ult i32 %58, 2 - br i1 %59, label %102, label %60 + br i1 %59, label %95, label %60 60: ; preds = %40 %61 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -93,37 +93,30 @@ define dso_local range(i32 -19, 2147483647) i32 @fdt_ro_probe_(ptr noundef %0) l %77 = zext i8 %76 to i32 %78 = or disjoint i32 %74, %77 %79 = icmp ugt i32 %78, 17 - br i1 %79, label %102, label %100 + br i1 %79, label %95, label %93 80: ; preds = %22 %81 = getelementptr inbounds nuw i8, ptr %0, i64 36 %82 = load i8, ptr %81, align 1 - %83 = zext i8 %82 to i32 - %84 = shl nuw i32 %83, 24 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 37 + %83 = getelementptr inbounds nuw i8, ptr %0, i64 37 + %84 = load i8, ptr %83, align 1 + %85 = getelementptr inbounds nuw i8, ptr %0, i64 38 %86 = load i8, ptr %85, align 1 - %87 = zext i8 %86 to i32 - %88 = shl nuw nsw i32 %87, 16 - %89 = or disjoint i32 %88, %84 - %90 = getelementptr inbounds nuw i8, ptr %0, i64 38 - %91 = load i8, ptr %90, align 1 - %92 = zext i8 %91 to i32 - %93 = shl nuw nsw i32 %92, 8 - %94 = or disjoint i32 %89, %93 - %95 = getelementptr inbounds nuw i8, ptr %0, i64 39 - %96 = load i8, ptr %95, align 1 - %97 = zext i8 %96 to i32 - %98 = or disjoint i32 %94, %97 - %99 = icmp eq i32 %98, 0 - br i1 %99, label %102, label %100 - -100: ; preds = %80, %60 - %101 = icmp ult i32 %19, 2147483647 - %. = select i1 %101, i32 %19, i32 -8 - br label %102 - -102: ; preds = %22, %100, %80, %60, %40, %1 - %.0 = phi i32 [ -19, %1 ], [ -10, %40 ], [ -10, %60 ], [ -7, %80 ], [ %., %100 ], [ -9, %22 ] + %87 = getelementptr inbounds nuw i8, ptr %0, i64 39 + %88 = load i8, ptr %87, align 1 + %89 = or i8 %84, %82 + %90 = or i8 %89, %86 + %91 = or i8 %90, %88 + %92 = icmp eq i8 %91, 0 + br i1 %92, label %95, label %93 + +93: ; preds = %80, %60 + %94 = icmp ult i32 %19, 2147483647 + %. = select i1 %94, i32 %19, i32 -8 + br label %95 + +95:; preds = %22, %93, %80, %60, %40, %1 + %.0 = phi i32 [ -19, %1 ], [ -10, %40 ], [ -10, %60 ], [ -7, %80 ], [ %., %93 ], [ -9, %22 ] ret i32 %.0 } diff --git a/bench/qemu/optimized/fdt_sw.ll b/bench/qemu/optimized/fdt_sw.ll index 9c0a278c54c..f1f89b56900 100644 --- a/bench/qemu/optimized/fdt_sw.ll +++ b/bench/qemu/optimized/fdt_sw.ll @@ -213,31 +213,24 @@ define dso_local range(i32 -13, 1) i32 @fdt_resize(ptr noundef readonly captures store i32 %rev.i.i, ptr %113, align 4 %114 = getelementptr inbounds nuw i8, ptr %1, i64 12 %115 = load i8, ptr %114, align 1 - %116 = zext i8 %115 to i32 - %117 = shl nuw i32 %116, 24 - %118 = getelementptr inbounds nuw i8, ptr %1, i64 13 + %116 = getelementptr inbounds nuw i8, ptr %1, i64 13 + %117 = load i8, ptr %116, align 1 + %118 = getelementptr inbounds nuw i8, ptr %1, i64 14 %119 = load i8, ptr %118, align 1 - %120 = zext i8 %119 to i32 - %121 = shl nuw nsw i32 %120, 16 - %122 = or disjoint i32 %121, %117 - %123 = getelementptr inbounds nuw i8, ptr %1, i64 14 - %124 = load i8, ptr %123, align 1 - %125 = zext i8 %124 to i32 - %126 = shl nuw nsw i32 %125, 8 - %127 = or disjoint i32 %122, %126 - %128 = getelementptr inbounds nuw i8, ptr %1, i64 15 - %129 = load i8, ptr %128, align 1 - %130 = zext i8 %129 to i32 - %131 = or disjoint i32 %127, %130 - %.not45 = icmp eq i32 %131, 0 - br i1 %.not45, label %133, label %132 - -132: ; preds = %112 + %120 = getelementptr inbounds nuw i8, ptr %1, i64 15 + %121 = load i8, ptr %120, align 1 + %122 = or i8 %117, %115 + %123 = or i8 %122, %119 + %124 = or i8 %123, %121 + %125 = icmp eq i8 %124, 0 + br i1 %125, label %127, label %126 + +126: ; preds = %112 store i32 %rev.i.i, ptr %114, align 4 br label %133 -133: ; preds = %112, %132, %101, %24, %22, %3 - %.1 = phi i32 [ %.0.i, %3 ], [ -3, %22 ], [ -13, %24 ], [ -3, %101 ], [ 0, %132 ], [ 0, %112 ] +133: ; preds = %112, %126, %101, %24, %22, %3 + %.1 = phi i32 [ %.0.i, %3 ], [ -3, %22 ], [ -13, %24 ], [ -3, %101 ], [ 0, %126 ], [ 0, %112 ] ret i32 %.1 } @@ -269,24 +262,17 @@ define dso_local range(i32 -9, 1) i32 @fdt_add_reservemap_entry(ptr noundef capt 21: ; preds = %3 %22 = getelementptr inbounds nuw i8, ptr %0, i64 12 %23 = load i8, ptr %22, align 1 - %24 = zext i8 %23 to i32 - %25 = shl nuw i32 %24, 24 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %25 = load i8, ptr %24, align 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 14 %27 = load i8, ptr %26, align 1 - %28 = zext i8 %27 to i32 - %29 = shl nuw nsw i32 %28, 16 - %30 = or disjoint i32 %29, %25 - %31 = getelementptr inbounds nuw i8, ptr %0, i64 14 - %32 = load i8, ptr %31, align 1 - %33 = zext i8 %32 to i32 - %34 = shl nuw nsw i32 %33, 8 - %35 = or disjoint i32 %30, %34 - %36 = getelementptr inbounds nuw i8, ptr %0, i64 15 - %37 = load i8, ptr %36, align 1 - %38 = zext i8 %37 to i32 - %39 = or disjoint i32 %35, %38 - %.not5.i = icmp eq i32 %39, 0 - br i1 %.not5.i, label %fdt_sw_probe_memrsv_.exit.thread, label %fdt_sw_probe_memrsv_.exit.thread18 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 15 + %29 = load i8, ptr %28, align 1 + %30 = or i8 %25, %23 + %31 = or i8 %30, %27 + %32 = or i8 %31, %29 + %33 = icmp eq i8 %32, 0 + br i1 %33, label %fdt_sw_probe_memrsv_.exit.thread, label %fdt_sw_probe_memrsv_.exit.thread18 fdt_sw_probe_memrsv_.exit: ; preds = %3 %40 = icmp eq i32 %20, -804389139 @@ -309,46 +295,46 @@ fdt_sw_probe_memrsv_.exit.thread: ; preds = %21 %53 = shl nuw nsw i32 %52, 8 %54 = or disjoint i32 %49, %53 %55 = getelementptr inbounds nuw i8, ptr %0, i64 11 + %50 = load i8, ptr %49, align 1 + %51 = zext i8 %50 to i32 + %52 = or disjoint i32 %48, %51 + %53 = sext i32 %52 to i64 + %54 = add nsw i64 %53, 16 + %55 = getelementptr inbounds nuw i8, ptr %0, i64 4 %56 = load i8, ptr %55, align 1 - %57 = zext i8 %56 to i32 - %58 = or disjoint i32 %54, %57 - %59 = sext i32 %58 to i64 - %60 = add nsw i64 %59, 16 - %61 = getelementptr inbounds nuw i8, ptr %0, i64 4 - %62 = load i8, ptr %61, align 1 - %63 = zext i8 %62 to i64 - %64 = shl nuw nsw i64 %63, 24 - %65 = getelementptr inbounds nuw i8, ptr %0, i64 5 - %66 = load i8, ptr %65, align 1 - %67 = zext i8 %66 to i64 - %68 = shl nuw nsw i64 %67, 16 - %69 = or disjoint i64 %68, %64 - %70 = getelementptr inbounds nuw i8, ptr %0, i64 6 - %71 = load i8, ptr %70, align 1 - %72 = zext i8 %71 to i64 - %73 = shl nuw nsw i64 %72, 8 - %74 = or disjoint i64 %69, %73 - %75 = getelementptr inbounds nuw i8, ptr %0, i64 7 - %76 = load i8, ptr %75, align 1 - %77 = zext i8 %76 to i64 - %78 = or disjoint i64 %74, %77 - %79 = icmp ugt i64 %60, %78 - br i1 %79, label %fdt_sw_probe_memrsv_.exit.thread18, label %80 - -80: ; preds = %fdt_sw_probe_memrsv_.exit.thread - %81 = getelementptr inbounds i8, ptr %0, i64 %59 - %82 = tail call noundef i64 @llvm.bswap.i64(i64 %1) - store i64 %82, ptr %81, align 8 - %83 = tail call noundef i64 @llvm.bswap.i64(i64 %2) - %84 = getelementptr inbounds nuw i8, ptr %81, i64 8 - store i64 %83, ptr %84, align 8 - %85 = trunc nuw i64 %60 to i32 - %rev.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %85) - store i32 %rev.i.i, ptr %41, align 4 + %57 = zext i8 %56 to i64 + %58 = shl nuw nsw i64 %57, 24 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 5 + %60 = load i8, ptr %59, align 1 + %61 = zext i8 %60 to i64 + %62 = shl nuw nsw i64 %61, 16 + %63 = or disjoint i64 %62, %58 + %64 = getelementptr inbounds nuw i8, ptr %0, i64 6 + %65 = load i8, ptr %64, align 1 + %66 = zext i8 %65 to i64 + %67 = shl nuw nsw i64 %66, 8 + %68 = or disjoint i64 %63, %67 + %69 = getelementptr inbounds nuw i8, ptr %0, i64 7 + %70 = load i8, ptr %69, align 1 + %71 = zext i8 %70 to i64 + %72 = or disjoint i64 %68, %71 + %73 = icmp ugt i64 %54, %72 + br i1 %73, label %fdt_sw_probe_memrsv_.exit.thread18, label %74 + +74:; preds = %fdt_sw_probe_memrsv_.exit.thread + %75 = getelementptr inbounds i8, ptr %0, i64 %53 + %76 = tail call noundef i64 @llvm.bswap.i64(i64 %1) + store i64 %76, ptr %75, align 8 + %77 = tail call noundef i64 @llvm.bswap.i64(i64 %2) + %78 = getelementptr inbounds nuw i8, ptr %75, i64 8 + store i64 %77, ptr %78, align 8 + %79 = trunc nuw i64 %54 to i32 + %82 = tail call noundef i32 @llvm.bswap.i32(i32 %79) + store i32 %82, ptr %41, align 4 br label %fdt_sw_probe_memrsv_.exit.thread18 -fdt_sw_probe_memrsv_.exit.thread18: ; preds = %fdt_sw_probe_memrsv_.exit, %21, %fdt_sw_probe_memrsv_.exit.thread, %80 - %.1 = phi i32 [ 0, %80 ], [ %.0.i.i, %fdt_sw_probe_memrsv_.exit ], [ -3, %fdt_sw_probe_memrsv_.exit.thread ], [ -7, %21 ] +fdt_sw_probe_memrsv_.exit.thread18: ; preds = %fdt_sw_probe_memrsv_.exit, %21, %fdt_sw_probe_memrsv_.exit.thread, %74 + %.1 = phi i32 [ 0, %74 ], [ %.0.i.i, %fdt_sw_probe_memrsv_.exit ], [ -3, %fdt_sw_probe_memrsv_.exit.thread ], [ -7, %21 ] ret i32 %.1 } @@ -377,24 +363,17 @@ define dso_local range(i32 -9, 1) i32 @fdt_finish_reservemap(ptr noundef capture 19: ; preds = %1 %20 = getelementptr inbounds nuw i8, ptr %0, i64 12 %21 = load i8, ptr %20, align 1 - %22 = zext i8 %21 to i32 - %23 = shl nuw i32 %22, 24 - %24 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %23 = load i8, ptr %22, align 1 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 14 %25 = load i8, ptr %24, align 1 - %26 = zext i8 %25 to i32 - %27 = shl nuw nsw i32 %26, 16 - %28 = or disjoint i32 %27, %23 - %29 = getelementptr inbounds nuw i8, ptr %0, i64 14 - %30 = load i8, ptr %29, align 1 - %31 = zext i8 %30 to i32 - %32 = shl nuw nsw i32 %31, 8 - %33 = or disjoint i32 %28, %32 - %34 = getelementptr inbounds nuw i8, ptr %0, i64 15 - %35 = load i8, ptr %34, align 1 - %36 = zext i8 %35 to i32 - %37 = or disjoint i32 %33, %36 - %.not5.i.i = icmp eq i32 %37, 0 - br i1 %.not5.i.i, label %fdt_sw_probe_memrsv_.exit.thread.i, label %fdt_add_reservemap_entry.exit.thread + %26 = getelementptr inbounds nuw i8, ptr %0, i64 15 + %27 = load i8, ptr %26, align 1 + %28 = or i8 %23, %21 + %29 = or i8 %28, %25 + %30 = or i8 %29, %27 + %31 = icmp eq i8 %30, 0 + br i1 %31, label %fdt_sw_probe_memrsv_.exit.thread.i, label %fdt_add_reservemap_entry.exit.thread fdt_sw_probe_memrsv_.exit.i: ; preds = %1 %38 = icmp eq i32 %18, -804389139 @@ -417,58 +396,58 @@ fdt_sw_probe_memrsv_.exit.thread.i: ; preds = %19 %51 = shl nuw nsw i32 %50, 8 %52 = or disjoint i32 %47, %51 %53 = getelementptr inbounds nuw i8, ptr %0, i64 11 + %48 = load i8, ptr %47, align 1 + %49 = zext i8 %48 to i32 + %50 = or disjoint i32 %46, %49 + %51 = sext i32 %50 to i64 + %52 = add nsw i64 %51, 16 + %53 = getelementptr inbounds nuw i8, ptr %0, i64 4 %54 = load i8, ptr %53, align 1 - %55 = zext i8 %54 to i32 - %56 = or disjoint i32 %52, %55 - %57 = sext i32 %56 to i64 - %58 = add nsw i64 %57, 16 - %59 = getelementptr inbounds nuw i8, ptr %0, i64 4 - %60 = load i8, ptr %59, align 1 - %61 = zext i8 %60 to i64 - %62 = shl nuw nsw i64 %61, 24 - %63 = getelementptr inbounds nuw i8, ptr %0, i64 5 - %64 = load i8, ptr %63, align 1 - %65 = zext i8 %64 to i64 - %66 = shl nuw nsw i64 %65, 16 - %67 = or disjoint i64 %66, %62 - %68 = getelementptr inbounds nuw i8, ptr %0, i64 6 - %69 = load i8, ptr %68, align 1 - %70 = zext i8 %69 to i64 - %71 = shl nuw nsw i64 %70, 8 - %72 = or disjoint i64 %67, %71 - %73 = getelementptr inbounds nuw i8, ptr %0, i64 7 - %74 = load i8, ptr %73, align 1 - %75 = zext i8 %74 to i64 - %76 = or disjoint i64 %72, %75 - %77 = icmp ugt i64 %58, %76 - br i1 %77, label %fdt_add_reservemap_entry.exit.thread, label %78 - -78: ; preds = %fdt_sw_probe_memrsv_.exit.thread.i - %79 = getelementptr inbounds i8, ptr %0, i64 %57 - %80 = trunc nuw i64 %58 to i32 - %rev.i.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %80) - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %79, i8 0, i64 16, i1 false) - store i32 %rev.i.i.i, ptr %39, align 4 - %81 = load i8, ptr %59, align 1 - %82 = zext i8 %81 to i32 - %83 = shl nuw i32 %82, 24 - %84 = load i8, ptr %63, align 1 - %85 = zext i8 %84 to i32 - %86 = shl nuw nsw i32 %85, 16 - %87 = or disjoint i32 %86, %83 - %88 = load i8, ptr %68, align 1 - %89 = zext i8 %88 to i32 - %90 = shl nuw nsw i32 %89, 8 - %91 = or disjoint i32 %87, %90 - %92 = load i8, ptr %73, align 1 - %93 = zext i8 %92 to i32 - %94 = or disjoint i32 %91, %93 - %rev.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %94) + %55 = zext i8 %54 to i64 + %56 = shl nuw nsw i64 %55, 24 + %57 = getelementptr inbounds nuw i8, ptr %0, i64 5 + %58 = load i8, ptr %57, align 1 + %59 = zext i8 %58 to i64 + %60 = shl nuw nsw i64 %59, 16 + %61 = or disjoint i64 %60, %56 + %62 = getelementptr inbounds nuw i8, ptr %0, i64 6 + %63 = load i8, ptr %62, align 1 + %64 = zext i8 %63 to i64 + %65 = shl nuw nsw i64 %64, 8 + %66 = or disjoint i64 %61, %65 + %67 = getelementptr inbounds nuw i8, ptr %0, i64 7 + %68 = load i8, ptr %67, align 1 + %69 = zext i8 %68 to i64 + %70 = or disjoint i64 %66, %69 + %71 = icmp ugt i64 %52, %70 + br i1 %71, label %fdt_add_reservemap_entry.exit.thread, label %72 + +72:; preds = %fdt_sw_probe_memrsv_.exit.thread.i + %73 = getelementptr inbounds i8, ptr %0, i64 %51 + %74 = trunc nuw i64 %52 to i32 + %rev.i.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %74) + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %73, i8 0, i64 16, i1 false) + store i32 %rev.i.i.i, ptr %33, align 4 + %75 = load i8, ptr %53, align 1 + %76 = zext i8 %75 to i32 + %77 = shl nuw i32 %76, 24 + %78 = load i8, ptr %57, align 1 + %79 = zext i8 %78 to i32 + %80 = shl nuw nsw i32 %79, 16 + %81 = or disjoint i32 %80, %77 + %82 = load i8, ptr %62, align 1 + %83 = zext i8 %82 to i32 + %84 = shl nuw nsw i32 %83, 8 + %85 = or disjoint i32 %81, %84 + %86 = load i8, ptr %67, align 1 + %87 = zext i8 %86 to i32 + %88 = or disjoint i32 %85, %87 + %rev.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %88) store i32 %rev.i.i, ptr %20, align 4 br label %fdt_add_reservemap_entry.exit.thread -fdt_add_reservemap_entry.exit.thread: ; preds = %19, %fdt_sw_probe_memrsv_.exit.thread.i, %fdt_sw_probe_memrsv_.exit.i, %78 - %.0 = phi i32 [ 0, %78 ], [ -7, %19 ], [ -3, %fdt_sw_probe_memrsv_.exit.thread.i ], [ %.0.i.i.i, %fdt_sw_probe_memrsv_.exit.i ] +fdt_add_reservemap_entry.exit.thread: ; preds = %19, %fdt_sw_probe_memrsv_.exit.thread.i, %fdt_sw_probe_memrsv_.exit.i, %72 + %.0 = phi i32 [ 0, %72 ], [ -7, %19 ], [ -3, %fdt_sw_probe_memrsv_.exit.thread.i ], [ %.0.i.i.i, %fdt_sw_probe_memrsv_.exit.i ] ret i32 %.0 } diff --git a/bench/recastnavigation/optimized/imguiRenderGL.ll b/bench/recastnavigation/optimized/imguiRenderGL.ll index 0b347692172..1b2a2e08bfd 100644 --- a/bench/recastnavigation/optimized/imguiRenderGL.ll +++ b/bench/recastnavigation/optimized/imguiRenderGL.ll @@ -2511,16 +2511,13 @@ define dso_local range(i32 0, 2) i32 @stbtt_IsGlyphEmpty(ptr noundef readonly ca %.val = load i8, ptr %80, align 1 %81 = getelementptr i8, ptr %80, i64 1 %.val7 = load i8, ptr %81, align 1 - %82 = zext i8 %.val to i16 - %83 = shl nuw i16 %82, 8 - %84 = zext i8 %.val7 to i16 - %85 = or disjoint i16 %83, %84 - %86 = icmp eq i16 %85, 0 - %87 = zext i1 %86 to i32 + %82 = or i8 %.val7, %.val + %83 = icmp eq i8 %82, 0 + %84 = zext i1 %83 to i32 br label %_ZL20stbtt__GetGlyfOffsetPK14stbtt_fontinfoi.exit.thread _ZL20stbtt__GetGlyfOffsetPK14stbtt_fontinfoi.exit.thread: ; preds = %75, %5, %2, %78 - %.0 = phi i32 [ %87, %78 ], [ 1, %2 ], [ 1, %5 ], [ 1, %75 ] + %.0 = phi i32 [ %84, %78 ], [ 1, %2 ], [ 1, %5 ], [ 1, %75 ] ret i32 %.0 } @@ -2677,105 +2674,102 @@ define dso_local range(i32 -32768, 32768) i32 @stbtt_GetGlyphKernAdvance(ptr nou %.val32 = load i8, ptr %11, align 1 %12 = getelementptr i8, ptr %9, i64 3 %.val33 = load i8, ptr %12, align 1 - %13 = zext i8 %.val32 to i16 - %14 = shl nuw i16 %13, 8 - %15 = zext i8 %.val33 to i16 - %16 = or disjoint i16 %14, %15 - %17 = icmp eq i16 %16, 0 - br i1 %17, label %.loopexit, label %18 - -18: ; preds = %10 - %19 = getelementptr inbounds nuw i8, ptr %9, i64 8 - %.val30 = load i8, ptr %19, align 1 - %20 = getelementptr i8, ptr %9, i64 9 - %.val31 = load i8, ptr %20, align 1 - %21 = zext i8 %.val30 to i16 - %22 = shl nuw i16 %21, 8 - %23 = zext i8 %.val31 to i16 - %24 = or disjoint i16 %22, %23 - %.not27 = icmp eq i16 %24, 1 - br i1 %.not27, label %25, label %.loopexit - -25: ; preds = %18 - %26 = getelementptr inbounds nuw i8, ptr %9, i64 10 - %.val = load i8, ptr %26, align 1 - %27 = getelementptr i8, ptr %9, i64 11 - %.val29 = load i8, ptr %27, align 1 - %28 = zext i8 %.val to i32 - %29 = shl nuw nsw i32 %28, 8 - %30 = zext i8 %.val29 to i32 - %31 = or disjoint i32 %29, %30 - %32 = shl i32 %1, 16 - %33 = or i32 %32, %2 - %.not2836 = icmp eq i32 %31, 0 + %13 = or i8 %.val33, %.val32 + %14 = icmp eq i8 %13, 0 + br i1 %14, label %.loopexit, label %15 + +15:; preds = %10 + %16 = getelementptr inbounds nuw i8, ptr %9, i64 8 + %.val30 = load i8, ptr %16, align 1 + %17 = getelementptr i8, ptr %9, i64 9 + %.val31 = load i8, ptr %17, align 1 + %18 = zext i8 %.val30 to i16 + %19 = shl nuw i16 %18, 8 + %20 = zext i8 %.val31 to i16 + %21 = or disjoint i16 %19, %20 + %.not27 = icmp eq i16 %21, 1 + br i1 %.not27, label %62, label %.loopexit + +62: ; preds = %15 + %23 = getelementptr inbounds nuw i8, ptr %9, i64 10 + %.val = load i8, ptr %23, align 1 + %24 = getelementptr i8, ptr %9, i64 11 + %.val29 = load i8, ptr %24, align 1 + %25 = zext i8 %.val to i32 + %26 = shl nuw nsw i32 %25, 8 + %27 = zext i8 %.val29 to i32 + %28 = or disjoint i32 %26, %27 + %29 = shl i32 %1, 16 + %30 = or i32 %29, %2 + %.not2836 = icmp eq i32 %28, 0 br i1 %.not2836, label %.loopexit, label %.lr.ph -.lr.ph: ; preds = %25 - %34 = add nsw i32 %31, -1 - %35 = getelementptr inbounds nuw i8, ptr %9, i64 18 - br label %36 - -36: ; preds = %.lr.ph, %75 - %.02238 = phi i32 [ %34, %.lr.ph ], [ %.1, %75 ] - %.02337 = phi i32 [ 0, %.lr.ph ], [ %.124, %75 ] - %37 = add nsw i32 %.02238, %.02337 - %38 = ashr i32 %37, 1 - %39 = mul nsw i32 %38, 6 - %40 = sext i32 %39 to i64 - %41 = getelementptr inbounds i8, ptr %35, i64 %40 - %42 = load i8, ptr %41, align 1 - %43 = zext i8 %42 to i32 - %44 = shl nuw i32 %43, 24 - %45 = getelementptr inbounds nuw i8, ptr %41, i64 1 - %46 = load i8, ptr %45, align 1 - %47 = zext i8 %46 to i32 - %48 = shl nuw nsw i32 %47, 16 - %49 = or disjoint i32 %48, %44 - %50 = getelementptr inbounds nuw i8, ptr %41, i64 2 - %51 = load i8, ptr %50, align 1 - %52 = zext i8 %51 to i32 - %53 = shl nuw nsw i32 %52, 8 - %54 = or disjoint i32 %49, %53 - %55 = getelementptr inbounds nuw i8, ptr %41, i64 3 - %56 = load i8, ptr %55, align 1 - %57 = zext i8 %56 to i32 - %58 = or disjoint i32 %54, %57 - %59 = icmp ult i32 %33, %58 - br i1 %59, label %60, label %62 - -60: ; preds = %36 - %61 = add nsw i32 %38, -1 - br label %75 - -62: ; preds = %36 - %63 = icmp ugt i32 %33, %58 - br i1 %63, label %64, label %66 - 64: ; preds = %62 - %65 = add nsw i32 %38, 1 - br label %75 + %65 = add nsw i32 %28, -1 + %32 = getelementptr inbounds nuw i8, ptr %9, i64 18 + br label %33 -66: ; preds = %62 - %67 = getelementptr inbounds nuw i8, ptr %9, i64 22 - %68 = getelementptr inbounds i8, ptr %67, i64 %40 - %.val34 = load i8, ptr %68, align 1 - %69 = getelementptr i8, ptr %68, i64 1 - %.val35 = load i8, ptr %69, align 1 - %70 = zext i8 %.val34 to i16 - %71 = shl nuw i16 %70, 8 - %72 = zext i8 %.val35 to i16 - %73 = or disjoint i16 %71, %72 - %74 = sext i16 %73 to i32 +66: ; preds = %64, %72 + %.02238 = phi i32 [ %31, %.lr.ph ], [ %.1, %72 ] + %.02337 = phi i32 [ 0, %.lr.ph ], [ %.124, %72 ] + %34 = add nsw i32 %.02238, %.02337 + %35 = ashr i32 %34, 1 + %36 = mul nsw i32 %35, 6 + %37 = sext i32 %36 to i64 + %41 = getelementptr inbounds i8, ptr %32, i64 %37 + %42 = load i8, ptr %38, align 1 + %43 = zext i8 %39 to i32 + %41 = shl nuw i32 %40, 24 + %42 = getelementptr inbounds nuw i8, ptr %38, i64 1 + %43 = load i8, ptr %42, align 1 + %44 = zext i8 %43 to i32 + %45 = shl nuw nsw i32 %44, 16 + %46 = or disjoint i32 %45, %41 + %47 = getelementptr inbounds nuw i8, ptr %38, i64 2 + %48 = load i8, ptr %47, align 1 + %49 = zext i8 %48 to i32 + %50 = shl nuw nsw i32 %49, 8 + %51 = or disjoint i32 %46, %50 + %52 = getelementptr inbounds nuw i8, ptr %38, i64 3 + %53 = load i8, ptr %52, align 1 + %54 = zext i8 %53 to i32 + %55 = or disjoint i32 %51, %54 + %56 = icmp ult i32 %30, %55 + br i1 %56, label %57, label %59 + +57: ; preds = %33 + %58 = add nsw i32 %35, -1 + br label %72 + +59: ; preds = %33 + %60 = icmp ugt i32 %30, %55 + br i1 %60, label %61, label %63 + +61: ; preds = %59 + %62 = add nsw i32 %35, 1 + br label %72 + +63: ; preds = %59 + %64 = getelementptr inbounds nuw i8, ptr %9, i64 22 + %65 = getelementptr inbounds i8, ptr %64, i64 %37 + %.val34 = load i8, ptr %65, align 1 + %66 = getelementptr i8, ptr %65, i64 1 + %.val35 = load i8, ptr %66, align 1 + %67 = zext i8 %.val34 to i16 + %68 = shl nuw i16 %67, 8 + %69 = zext i8 %.val35 to i16 + %70 = or disjoint i16 %68, %69 + %71 = sext i16 %70 to i32 br label %.loopexit 75: ; preds = %64, %60 - %.124 = phi i32 [ %.02337, %60 ], [ %65, %64 ] - %.1 = phi i32 [ %61, %60 ], [ %.02238, %64 ] + %.124 = phi i32 [ %.02337, %60 ], [ %65, %61 ] + %.1 = phi i32 [ %61, %60 ], [ %.02238, %61 ] %.not28 = icmp sgt i32 %.124, %.1 br i1 %.not28, label %.loopexit, label %36, !llvm.loop !16 -.loopexit: ; preds = %75, %25, %18, %10, %3, %66 - %.0 = phi i32 [ %74, %66 ], [ 0, %3 ], [ 0, %10 ], [ 0, %18 ], [ 0, %25 ], [ 0, %75 ] +.loopexit: ; preds = %75, %22, %15, %10, %3, %66 + %.0 = phi i32 [ %74, %63 ], [ 0, %3 ], [ 0, %10 ], [ 0, %15 ], [ 0, %22 ], [ 0, %75 ] ret i32 %.0 } @@ -2797,47 +2791,44 @@ define dso_local range(i32 -32768, 32768) i32 @stbtt_GetCodepointKernAdvance(ptr %.val32.i = load i8, ptr %13, align 1 %14 = getelementptr i8, ptr %12, i64 3 %.val33.i = load i8, ptr %14, align 1 - %15 = zext i8 %.val32.i to i16 - %16 = shl nuw i16 %15, 8 - %17 = zext i8 %.val33.i to i16 - %18 = or disjoint i16 %16, %17 - %19 = icmp eq i16 %18, 0 - br i1 %19, label %stbtt_GetGlyphKernAdvance.exit, label %20 - -20: ; preds = %6 - %21 = getelementptr inbounds nuw i8, ptr %12, i64 8 - %.val30.i = load i8, ptr %21, align 1 - %22 = getelementptr i8, ptr %12, i64 9 - %.val31.i = load i8, ptr %22, align 1 - %23 = zext i8 %.val30.i to i16 - %24 = shl nuw i16 %23, 8 - %25 = zext i8 %.val31.i to i16 - %26 = or disjoint i16 %24, %25 - %.not27.i = icmp eq i16 %26, 1 - br i1 %.not27.i, label %27, label %stbtt_GetGlyphKernAdvance.exit - -27: ; preds = %20 - %28 = getelementptr inbounds nuw i8, ptr %12, i64 10 - %.val.i = load i8, ptr %28, align 1 - %29 = getelementptr i8, ptr %12, i64 11 - %.val29.i = load i8, ptr %29, align 1 - %30 = zext i8 %.val.i to i32 - %31 = shl nuw nsw i32 %30, 8 - %32 = zext i8 %.val29.i to i32 - %33 = or disjoint i32 %31, %32 - %34 = shl i32 %7, 16 - %35 = or i32 %34, %8 - %.not2836.i = icmp eq i32 %33, 0 + %15 = or i8 %.val33.i, %.val32.i + %16 = icmp eq i8 %15, 0 + br i1 %16, label %stbtt_GetGlyphKernAdvance.exit, label %17 + +17:; preds = %6 + %18 = getelementptr inbounds nuw i8, ptr %12, i64 8 + %.val30.i = load i8, ptr %18, align 1 + %19 = getelementptr i8, ptr %12, i64 9 + %.val31.i = load i8, ptr %19, align 1 + %20 = zext i8 %.val30.i to i16 + %21 = shl nuw i16 %20, 8 + %22 = zext i8 %.val31.i to i16 + %23 = or disjoint i16 %21, %22 + %.not27.i = icmp eq i16 %23, 1 + br i1 %.not27.i, label %24, label %stbtt_GetGlyphKernAdvance.exit + +24:; preds = %17 + %25 = getelementptr inbounds nuw i8, ptr %12, i64 10 + %.val.i = load i8, ptr %25, align 1 + %26 = getelementptr i8, ptr %12, i64 11 + %.val29.i = load i8, ptr %26, align 1 + %27 = zext i8 %.val.i to i32 + %28 = shl nuw nsw i32 %27, 8 + %29 = zext i8 %.val29.i to i32 + %30 = or disjoint i32 %28, %29 + %31 = shl i32 %7, 16 + %32 = or i32 %31, %8 + %.not2836.i = icmp eq i32 %30, 0 br i1 %.not2836.i, label %stbtt_GetGlyphKernAdvance.exit, label %.lr.ph.i -.lr.ph.i: ; preds = %27 - %36 = add nsw i32 %33, -1 +.lr.ph.i: ; preds = %24 + %36 = add nsw i32 %30, -1 %37 = getelementptr inbounds nuw i8, ptr %12, i64 18 br label %38 38: ; preds = %77, %.lr.ph.i - %.02238.i = phi i32 [ %36, %.lr.ph.i ], [ %.1.i, %77 ] - %.02337.i = phi i32 [ 0, %.lr.ph.i ], [ %.124.i, %77 ] + %.02238.i = phi i32 [ %36, %.lr.ph.i ], [ %.1.i, %74 ] + %.02337.i = phi i32 [ 0, %.lr.ph.i ], [ %.124.i, %74 ] %39 = add nsw i32 %.02337.i, %.02238.i %40 = ashr i32 %39, 1 %41 = mul nsw i32 %40, 6 @@ -2860,7 +2851,7 @@ define dso_local range(i32 -32768, 32768) i32 @stbtt_GetCodepointKernAdvance(ptr %58 = load i8, ptr %57, align 1 %59 = zext i8 %58 to i32 %60 = or disjoint i32 %56, %59 - %61 = icmp ult i32 %35, %60 + %61 = icmp ult i32 %32, %60 br i1 %61, label %62, label %64 62: ; preds = %38 @@ -2868,7 +2859,7 @@ define dso_local range(i32 -32768, 32768) i32 @stbtt_GetCodepointKernAdvance(ptr br label %77 64: ; preds = %38 - %65 = icmp ugt i32 %35, %60 + %65 = icmp ugt i32 %32, %60 br i1 %65, label %66, label %68 66: ; preds = %64 @@ -2889,13 +2880,13 @@ define dso_local range(i32 -32768, 32768) i32 @stbtt_GetCodepointKernAdvance(ptr br label %stbtt_GetGlyphKernAdvance.exit 77: ; preds = %66, %62 - %.124.i = phi i32 [ %.02337.i, %62 ], [ %67, %66 ] - %.1.i = phi i32 [ %63, %62 ], [ %.02238.i, %66 ] + %.124.i = phi i32 [ %.02337.i, %59 ], [ %67, %63 ] + %.1.i = phi i32 [ %63, %59 ], [ %.02238.i, %63 ] %.not28.i = icmp sgt i32 %.124.i, %.1.i br i1 %.not28.i, label %stbtt_GetGlyphKernAdvance.exit, label %38, !llvm.loop !16 -stbtt_GetGlyphKernAdvance.exit: ; preds = %77, %68, %27, %20, %6, %3 - %.0 = phi i32 [ 0, %3 ], [ %76, %68 ], [ 0, %6 ], [ 0, %20 ], [ 0, %27 ], [ 0, %77 ] +stbtt_GetGlyphKernAdvance.exit: ; preds = %77, %68, %24, %17, %6, %3 + %.0 = phi i32 [ 0, %3 ], [ %76, %65 ], [ 0, %6 ], [ 0, %17 ], [ 0, %24 ], [ 0, %74 ] ret i32 %.0 } diff --git a/bench/rust-analyzer-rs/optimized/36cskjvhktchzlnh.ll b/bench/rust-analyzer-rs/optimized/36cskjvhktchzlnh.ll index 6f0fce51b51..281614ba31e 100644 --- a/bench/rust-analyzer-rs/optimized/36cskjvhktchzlnh.ll +++ b/bench/rust-analyzer-rs/optimized/36cskjvhktchzlnh.ll @@ -734,7 +734,7 @@ switch.lookup: %.sroa.411.0.insert.ext = zext i8 %.sroa.411.1 to i64 %.sroa.411.0.insert.shift = shl nuw nsw i64 %.sroa.411.0.insert.ext, 8 %61 = or disjoint i64 %.sroa.411.0.insert.shift, %.sroa.010.0 - %62 = or disjoint i64 %.sroa.613.0.insert.shift, %.sroa.010.0 + %62 = or i64 %.sroa.010.0, %.sroa.613.0.insert.ext %or.cond.i = icmp eq i64 %62, 0 %.sroa.616.17.insert.insert.i = select i1 %or.cond.i, i64 5121, i64 %61 %.sroa.616.20.insert.insert.i = or disjoint i64 %.sroa.616.17.insert.insert.i, %.sroa.613.0.insert.shift diff --git a/bench/rust-analyzer-rs/optimized/5ac99zaxn7b9r9xv.ll b/bench/rust-analyzer-rs/optimized/5ac99zaxn7b9r9xv.ll index 9508447fc59..58dae1c1a7f 100644 --- a/bench/rust-analyzer-rs/optimized/5ac99zaxn7b9r9xv.ll +++ b/bench/rust-analyzer-rs/optimized/5ac99zaxn7b9r9xv.ll @@ -696,7 +696,7 @@ switch.lookup: %.sroa.411.0.insert.ext = zext i8 %.sroa.411.1 to i64 %.sroa.411.0.insert.shift = shl nuw nsw i64 %.sroa.411.0.insert.ext, 8 %61 = or disjoint i64 %.sroa.411.0.insert.shift, %.sroa.010.0 - %62 = or disjoint i64 %.sroa.613.0.insert.shift, %.sroa.010.0 + %62 = or i64 %.sroa.010.0, %.sroa.613.0.insert.ext %or.cond.i = icmp eq i64 %62, 0 %.sroa.616.17.insert.insert.i = select i1 %or.cond.i, i64 5121, i64 %61 %.sroa.616.20.insert.insert.i = or disjoint i64 %.sroa.616.17.insert.insert.i, %.sroa.613.0.insert.shift @@ -830,7 +830,7 @@ switch.lookup: %.sroa.411.0.insert.ext = zext i8 %.sroa.411.1 to i64 %.sroa.411.0.insert.shift = shl nuw nsw i64 %.sroa.411.0.insert.ext, 8 %61 = or disjoint i64 %.sroa.411.0.insert.shift, %.sroa.010.0 - %62 = or disjoint i64 %.sroa.613.0.insert.shift, %.sroa.010.0 + %62 = or i64 %.sroa.010.0, %.sroa.613.0.insert.ext %or.cond.i = icmp eq i64 %62, 0 %.sroa.616.17.insert.insert.i = select i1 %or.cond.i, i64 5121, i64 %61 %.sroa.616.20.insert.insert.i = or disjoint i64 %.sroa.616.17.insert.insert.i, %.sroa.613.0.insert.shift diff --git a/bench/rust-analyzer-rs/optimized/hf9vzunhg9aziex.ll b/bench/rust-analyzer-rs/optimized/hf9vzunhg9aziex.ll index 4867d638b16..7f71cbc0835 100644 --- a/bench/rust-analyzer-rs/optimized/hf9vzunhg9aziex.ll +++ b/bench/rust-analyzer-rs/optimized/hf9vzunhg9aziex.ll @@ -1486,7 +1486,7 @@ switch.lookup: unreachable "_ZN17ra_ap_rustc_lexer8unescape16unescape_unicode28_$u7b$$u7b$closure$u7d$$u7d$17h44cd810d16c81c50E.exit": ; preds = %79 - %83 = or disjoint i64 %.sroa.613.0.insert.shift, %.sroa.010.0 + %83 = or i64 %.sroa.010.0, %.sroa.613.0.insert.ext %or.cond.i = icmp eq i64 %83, 0 %.sroa.616.17.insert.insert.i = select i1 %or.cond.i, i64 5121, i64 %64 %.sroa.616.20.insert.insert.i = or disjoint i64 %.sroa.616.17.insert.insert.i, %.sroa.613.0.insert.shift @@ -1494,7 +1494,7 @@ switch.lookup: %85 = extractvalue { i32, i1 } %80, 0 %86 = getelementptr inbounds nuw i8, ptr %74, i64 32 %87 = load ptr, ptr %86, align 8, !invariant.load !11, !noalias !245, !nonnull !11 - tail call void %87(ptr noundef nonnull align 1 %73, i32 noundef %84, i32 noundef %85, i64 %.sroa.616.20.insert.insert.i), !noalias !245 + tail call void %88(ptr noundef nonnull align 1 %73, i32 noundef %84, i32 noundef %85, i64 %.sroa.616.20.insert.insert.i), !noalias !245 %88 = icmp eq ptr %.sroa.0.1.ph3645, %5 br i1 %88, label %.thread, label %10 } @@ -1861,7 +1861,7 @@ switch.lookup: unreachable "_ZN17ra_ap_rustc_lexer8unescape16unescape_unicode28_$u7b$$u7b$closure$u7d$$u7d$17h0b321f92e754c416E.exit": ; preds = %79 - %83 = or disjoint i64 %.sroa.613.0.insert.shift, %.sroa.010.0 + %83 = or i64 %.sroa.010.0, %.sroa.613.0.insert.ext %or.cond.i = icmp eq i64 %83, 0 %.sroa.616.17.insert.insert.i = select i1 %or.cond.i, i64 5121, i64 %64 %.sroa.616.20.insert.insert.i = or disjoint i64 %.sroa.616.17.insert.insert.i, %.sroa.613.0.insert.shift @@ -1869,7 +1869,7 @@ switch.lookup: %85 = extractvalue { i32, i1 } %80, 0 %86 = getelementptr inbounds nuw i8, ptr %74, i64 32 %87 = load ptr, ptr %86, align 8, !invariant.load !11, !noalias !257, !nonnull !11 - tail call void %87(ptr noundef nonnull align 1 %73, i32 noundef %84, i32 noundef %85, i64 %.sroa.616.20.insert.insert.i), !noalias !257 + tail call void %88(ptr noundef nonnull align 1 %73, i32 noundef %84, i32 noundef %85, i64 %.sroa.616.20.insert.insert.i), !noalias !257 %88 = icmp eq ptr %.sroa.0.1.ph3645, %5 br i1 %88, label %.thread, label %10 } diff --git a/bench/rust-analyzer-rs/optimized/hknx1qr3lu9291s.ll b/bench/rust-analyzer-rs/optimized/hknx1qr3lu9291s.ll index 0da7e39fbc0..9e8688a9821 100644 --- a/bench/rust-analyzer-rs/optimized/hknx1qr3lu9291s.ll +++ b/bench/rust-analyzer-rs/optimized/hknx1qr3lu9291s.ll @@ -9203,8 +9203,8 @@ define hidden void @_ZN17ra_ap_rustc_lexer8unescape16unescape_unicode17h616df343 br i1 %.not.i.i, label %.thread.i.i, label %.thread107.i.i .thread107.i.i: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i.i.thread", %.thread43, %146, %.thread297.i - %158 = phi ptr [ %149, %146 ], [ %144, %.thread297.i ], [ %142, %.thread43 ], [ %138, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i.i.thread" ] - %.sroa.4.0.i.ph110.i.i = phi i32 [ %157, %146 ], [ %145, %.thread297.i ], [ %140, %.thread43 ], [ %136, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i.i.thread" ] + %158 = phi ptr [ %149, %146 ], [ %144, %.thread297.i ], [ %142, %.thread42 ], [ %138, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i.i.thread" ] + %.sroa.4.0.i.ph110.i.i = phi i32 [ %157, %146 ], [ %145, %.thread297.i ], [ %140, %.thread42 ], [ %136, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i.i.thread" ] switch i32 %.sroa.4.0.i.ph110.i.i, label %.thread.i.i [ i32 34, label %_ZN17ra_ap_rustc_lexer8unescape11scan_escape17h87456e89320ca408E.exit.i i32 110, label %159 @@ -10113,8 +10113,8 @@ _ZN17ra_ap_rustc_lexer8unescape23unescape_non_raw_common17h36c7e5b6e9fb45b9E.exi br i1 %.not.i41, label %_ZN17ra_ap_rustc_lexer8unescape16check_raw_common17h8da38201a3e9dce2E.exit, label %.thread12.i .thread12.i: ; preds = %560, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i40", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit13.i.i23" - %.sroa.4.0.i.ph17.i = phi i32 [ %570, %560 ], [ %558, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i40" ], [ %545, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit13.i.i23" ] - %.sroa.0.1.ph16.i = phi ptr [ %562, %560 ], [ %551, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i40" ], [ %540, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit13.i.i23" ] + %.sroa.4.0.i.ph17.i = phi i32 [ %570, %560 ], [ %558, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i39" ], [ %545, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit13.i.i23" ] + %.sroa.0.1.ph16.i = phi ptr [ %562, %560 ], [ %551, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit15.i.i39" ], [ %540, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h700a513fb14dabdaE.exit13.i.i23" ] %571 = ptrtoint ptr %.sroa.0.1.ph16.i to i64 %.neg.i24 = sub i64 %571, %526 %572 = add i64 %.neg.i24, %1 @@ -10193,14 +10193,14 @@ _ZN17ra_ap_rustc_lexer8unescape23unescape_non_raw_common17h36c7e5b6e9fb45b9E.exi unreachable "_ZN17ra_ap_rustc_lexer8unescape16unescape_unicode28_$u7b$$u7b$closure$u7d$$u7d$17hda57bf2f24e928a2E.exit.i": ; preds = %596 - %600 = or disjoint i64 %.sroa.613.0.insert.shift.i35, %.sroa.010.0.i31 + %600 = or i64 %.sroa.010.0.i31, %.sroa.613.0.insert.ext.i34 %or.cond.i.i39 = icmp eq i64 %600, 0 %.sroa.616.17.insert.insert.i.i = select i1 %or.cond.i.i39, i64 5121, i64 %584 %.sroa.616.20.insert.insert.i.i = or disjoint i64 %.sroa.616.17.insert.insert.i.i, %.sroa.613.0.insert.shift.i35 %601 = extractvalue { i32, i1 } %594, 0 %602 = extractvalue { i32, i1 } %597, 0 %603 = load ptr, ptr %532, align 8, !invariant.load !4, !noalias !3125, !nonnull !4 - tail call void %603(ptr noundef nonnull align 1 %529, i32 noundef %601, i32 noundef %602, i64 %.sroa.616.20.insert.insert.i.i), !noalias !3125 + tail call void %604(ptr noundef nonnull align 1 %529, i32 noundef %601, i32 noundef %602, i64 %.sroa.616.20.insert.insert.i.i), !noalias !3125 %604 = icmp eq ptr %.sroa.0.1.ph1625.i, %524 br i1 %604, label %_ZN17ra_ap_rustc_lexer8unescape16check_raw_common17h8da38201a3e9dce2E.exit, label %533 diff --git a/bench/spike/optimized/fdt.ll b/bench/spike/optimized/fdt.ll index c2ad8056dd5..fe532a37acf 100644 --- a/bench/spike/optimized/fdt.ll +++ b/bench/spike/optimized/fdt.ll @@ -40,7 +40,7 @@ define range(i32 -10, 2147483647) i32 @fdt_ro_probe_(ptr noundef readonly captur %34 = load i8, ptr %33, align 1, !tbaa !3 %35 = zext i8 %34 to i32 %36 = or disjoint i32 %32, %35 - switch i32 %36, label %99 [ + switch i32 %36, label %92 [ i32 -804389139, label %37 i32 804389138, label %77 ] @@ -65,7 +65,7 @@ define range(i32 -10, 2147483647) i32 @fdt_ro_probe_(ptr noundef readonly captur %54 = zext i8 %53 to i32 %55 = or disjoint i32 %51, %54 %56 = icmp ult i32 %55, 2 - br i1 %56, label %99, label %57 + br i1 %56, label %92, label %57 57: ; preds = %37 %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -87,37 +87,30 @@ define range(i32 -10, 2147483647) i32 @fdt_ro_probe_(ptr noundef readonly captur %74 = zext i8 %73 to i32 %75 = or disjoint i32 %71, %74 %76 = icmp ugt i32 %75, 17 - br i1 %76, label %99, label %97 + br i1 %76, label %92, label %90 77: ; preds = %1 %78 = getelementptr inbounds nuw i8, ptr %0, i64 36 %79 = load i8, ptr %78, align 1, !tbaa !3 - %80 = zext i8 %79 to i32 - %81 = shl nuw i32 %80, 24 - %82 = getelementptr inbounds nuw i8, ptr %0, i64 37 + %80 = getelementptr inbounds nuw i8, ptr %0, i64 37 + %81 = load i8, ptr %80, align 1, !tbaa !3 + %82 = getelementptr inbounds nuw i8, ptr %0, i64 38 %83 = load i8, ptr %82, align 1, !tbaa !3 - %84 = zext i8 %83 to i32 - %85 = shl nuw nsw i32 %84, 16 - %86 = or disjoint i32 %85, %81 - %87 = getelementptr inbounds nuw i8, ptr %0, i64 38 - %88 = load i8, ptr %87, align 1, !tbaa !3 - %89 = zext i8 %88 to i32 - %90 = shl nuw nsw i32 %89, 8 - %91 = or disjoint i32 %86, %90 - %92 = getelementptr inbounds nuw i8, ptr %0, i64 39 - %93 = load i8, ptr %92, align 1, !tbaa !3 - %94 = zext i8 %93 to i32 - %95 = or disjoint i32 %91, %94 - %96 = icmp eq i32 %95, 0 - br i1 %96, label %99, label %97 - -97: ; preds = %77, %57 - %98 = icmp ult i32 %19, 2147483647 - %. = select i1 %98, i32 %19, i32 -8 - br label %99 - -99: ; preds = %1, %97, %77, %57, %37 - %.0 = phi i32 [ -10, %37 ], [ -10, %57 ], [ -7, %77 ], [ %., %97 ], [ -9, %1 ] + %84 = getelementptr inbounds nuw i8, ptr %0, i64 39 + %85 = load i8, ptr %84, align 1, !tbaa !3 + %86 = or i8 %81, %79 + %87 = or i8 %86, %83 + %88 = or i8 %87, %85 + %89 = icmp eq i8 %88, 0 + br i1 %89, label %92, label %90 + +90: ; preds = %77, %57 + %91 = icmp ult i32 %19, 2147483647 + %. = select i1 %91, i32 %19, i32 -8 + br label %92 + +92:; preds = %1, %90, %77, %57, %37 + %.0 = phi i32 [ -10, %37 ], [ -10, %57 ], [ -7, %77 ], [ %., %90 ], [ -9, %1 ] ret i32 %.0 } diff --git a/bench/spike/optimized/fdt_ro.ll b/bench/spike/optimized/fdt_ro.ll index 11cb19be373..53dce22209a 100644 --- a/bench/spike/optimized/fdt_ro.ll +++ b/bench/spike/optimized/fdt_ro.ll @@ -658,9 +658,9 @@ define i32 @fdt_num_mem_rsv(ptr noundef readonly captures(none) %0) local_unname %48 = getelementptr inbounds nuw i8, ptr %46, i64 %47 br label %.split -.split: ; preds = %.split.preheader, %92 - %indvars.iv = phi i64 [ 0, %.split.preheader ], [ %indvars.iv.next, %92 ] - %49 = phi i32 [ %18, %.split.preheader ], [ %95, %92 ] +.split: ; preds = %.split.preheader, %77 + %indvars.iv = phi i64 [ 0, %.split.preheader ], [ %indvars.iv.next, %77 ] + %49 = phi i32 [ %18, %.split.preheader ], [ %95, %77 ] %50 = sext i32 %49 to i64 %51 = icmp ult i64 %37, %50 br i1 %51, label %fdt_mem_rsv.exit.thread.split, label %52 @@ -668,46 +668,31 @@ define i32 @fdt_num_mem_rsv(ptr noundef readonly captures(none) %0) local_unname 52: ; preds = %.split %53 = getelementptr inbounds nuw %struct.fdt_reserve_entry, ptr %48, i64 %indvars.iv, i32 1 %54 = load i8, ptr %53, align 1, !tbaa !3 - %55 = zext i8 %54 to i64 - %56 = shl nuw i64 %55, 56 - %57 = getelementptr inbounds nuw i8, ptr %53, i64 1 + %55 = getelementptr inbounds nuw i8, ptr %53, i64 1 + %56 = load i8, ptr %55, align 1, !tbaa !3 + %57 = getelementptr inbounds nuw i8, ptr %53, i64 2 %58 = load i8, ptr %57, align 1, !tbaa !3 - %59 = zext i8 %58 to i64 - %60 = shl nuw nsw i64 %59, 48 - %61 = or disjoint i64 %60, %56 - %62 = getelementptr inbounds nuw i8, ptr %53, i64 2 - %63 = load i8, ptr %62, align 1, !tbaa !3 - %64 = zext i8 %63 to i64 - %65 = shl nuw nsw i64 %64, 40 - %66 = or disjoint i64 %61, %65 - %67 = getelementptr inbounds nuw i8, ptr %53, i64 3 + %59 = getelementptr inbounds nuw i8, ptr %53, i64 3 + %60 = load i8, ptr %59, align 1, !tbaa !3 + %61 = getelementptr inbounds nuw i8, ptr %53, i64 4 + %62 = load i8, ptr %61, align 1, !tbaa !3 + %63 = getelementptr inbounds nuw i8, ptr %53, i64 5 + %64 = load i8, ptr %63, align 1, !tbaa !3 + %65 = getelementptr inbounds nuw i8, ptr %53, i64 6 + %66 = load i8, ptr %65, align 1, !tbaa !3 + %67 = getelementptr inbounds nuw i8, ptr %53, i64 7 %68 = load i8, ptr %67, align 1, !tbaa !3 - %69 = zext i8 %68 to i64 - %70 = shl nuw nsw i64 %69, 32 - %71 = or disjoint i64 %66, %70 - %72 = getelementptr inbounds nuw i8, ptr %53, i64 4 - %73 = load i8, ptr %72, align 1, !tbaa !3 - %74 = zext i8 %73 to i64 - %75 = shl nuw nsw i64 %74, 24 - %76 = or disjoint i64 %71, %75 - %77 = getelementptr inbounds nuw i8, ptr %53, i64 5 - %78 = load i8, ptr %77, align 1, !tbaa !3 - %79 = zext i8 %78 to i64 - %80 = shl nuw nsw i64 %79, 16 - %81 = or disjoint i64 %76, %80 - %82 = getelementptr inbounds nuw i8, ptr %53, i64 6 - %83 = load i8, ptr %82, align 1, !tbaa !3 - %84 = zext i8 %83 to i64 - %85 = shl nuw nsw i64 %84, 8 - %86 = or i64 %81, %85 - %87 = getelementptr inbounds nuw i8, ptr %53, i64 7 - %88 = load i8, ptr %87, align 1, !tbaa !3 - %89 = zext i8 %88 to i64 - %90 = or i64 %86, %89 - %91 = icmp eq i64 %90, 0 - br i1 %91, label %fdt_mem_rsv.exit.thread.split.split.loop.exit, label %92 - -92: ; preds = %52 + %69 = or i8 %56, %54 + %70 = or i8 %69, %58 + %71 = or i8 %70, %60 + %72 = or i8 %71, %62 + %73 = or i8 %72, %64 + %74 = or i8 %73, %66 + %75 = or i8 %74, %68 + %76 = icmp eq i8 %75, 0 + br i1 %76, label %fdt_mem_rsv.exit.thread.split.split.loop.exit, label %77 + +77:; preds = %52 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %93 = trunc nsw i64 %indvars.iv.next to i32 %94 = shl i32 %93, 4 @@ -719,8 +704,8 @@ fdt_mem_rsv.exit.thread.split.split.loop.exit: ; preds = %52 %97 = trunc nuw nsw i64 %indvars.iv to i32 br label %fdt_mem_rsv.exit.thread.split -fdt_mem_rsv.exit.thread.split: ; preds = %.split, %92, %fdt_mem_rsv.exit.thread.split.split.loop.exit - %.0.split.ph = phi i32 [ %97, %fdt_mem_rsv.exit.thread.split.split.loop.exit ], [ -8, %92 ], [ -8, %.split ] +fdt_mem_rsv.exit.thread.split: ; preds = %.split, %77, %fdt_mem_rsv.exit.thread.split.split.loop.exit + %.0.split.ph = phi i32 [ %97, %fdt_mem_rsv.exit.thread.split.split.loop.exit ], [ -8, %77 ], [ -8, %.split ] ret i32 %.0.split.ph } @@ -3184,49 +3169,119 @@ define i32 @fdt_check_full(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 br i1 %28, label %.loopexit, label %29 29: ; preds = %9 - %30 = tail call i32 @fdt_num_mem_rsv(ptr noundef nonnull %0) - %31 = icmp slt i32 %30, 0 - br i1 %31, label %.loopexit, label %.preheader - -.preheader: ; preds = %29 - %32 = call i32 @fdt_next_tag(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull %4) #9 - %33 = load i32, ptr %4, align 4, !tbaa !6 - %34 = icmp slt i32 %33, 0 - br i1 %34, label %.loopexit, label %.lr.ph - -.lr.ph: ; preds = %.preheader, %50 - %35 = phi i32 [ %53, %50 ], [ %33, %.preheader ] - %36 = phi i32 [ %52, %50 ], [ %32, %.preheader ] - %37 = phi i32 [ %51, %50 ], [ 0, %.preheader ] - %.01828 = phi i32 [ %.1, %50 ], [ 0, %.preheader ] - switch i32 %36, label %.loopexit [ - i32 4, label %50 - i32 9, label %38 - i32 1, label %39 - i32 2, label %42 - i32 3, label %46 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %31 = load i8, ptr %30, align 1, !tbaa !3 + %32 = zext i8 %31 to i32 + %33 = shl nuw i32 %32, 24 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 17 + %35 = load i8, ptr %34, align 1, !tbaa !3 + %36 = zext i8 %35 to i32 + %37 = shl nuw nsw i32 %36, 16 + %38 = or disjoint i32 %37, %33 + %39 = getelementptr inbounds nuw i8, ptr %0, i64 18 + %40 = load i8, ptr %39, align 1, !tbaa !3 + %41 = zext i8 %40 to i32 + %42 = shl nuw nsw i32 %41, 8 + %43 = or disjoint i32 %38, %42 + %44 = getelementptr inbounds nuw i8, ptr %0, i64 19 + %45 = load i8, ptr %44, align 1, !tbaa !3 + %46 = zext i8 %45 to i32 + %47 = or disjoint i32 %43, %46 + %48 = add nsw i64 %27, -16 + %49 = zext i8 %35 to i64 + %50 = shl nuw nsw i64 %49, 16 + %51 = getelementptr inbounds nuw i8, ptr %0, i64 %50 + %52 = zext i8 %31 to i64 + %53 = shl nuw nsw i64 %52, 24 + %54 = getelementptr inbounds nuw i8, ptr %51, i64 %53 + %55 = zext i8 %40 to i64 + %56 = shl nuw nsw i64 %55, 8 + %57 = getelementptr inbounds nuw i8, ptr %54, i64 %56 + %58 = zext i8 %45 to i64 + %59 = getelementptr inbounds nuw i8, ptr %57, i64 %58 + br label %.split.i + +.split.i: ; preds = %91, %29 + %indvars.iv.i = phi i64 [ 0, %29 ], [ %indvars.iv.next.i, %91 ] + %60 = phi i32 [ %47, %29 ], [ %94, %91 ] + %61 = sext i32 %60 to i64 + %62 = icmp ult i64 %48, %61 + br i1 %62, label %fdt_num_mem_rsv.exit.thread, label %63 + +63: ; preds = %.split.i + %64 = getelementptr inbounds nuw %struct.fdt_reserve_entry, ptr %59, i64 %indvars.iv.i, i32 1 + %65 = load i8, ptr %64, align 1, !tbaa !3 + %66 = getelementptr inbounds nuw i8, ptr %64, i64 1 + %67 = load i8, ptr %66, align 1, !tbaa !3 + %68 = getelementptr inbounds nuw i8, ptr %64, i64 2 + %69 = load i8, ptr %68, align 1, !tbaa !3 + %70 = getelementptr inbounds nuw i8, ptr %64, i64 3 + %71 = load i8, ptr %70, align 1, !tbaa !3 + %72 = getelementptr inbounds nuw i8, ptr %64, i64 4 + %73 = load i8, ptr %72, align 1, !tbaa !3 + %74 = getelementptr inbounds nuw i8, ptr %64, i64 5 + %75 = load i8, ptr %74, align 1, !tbaa !3 + %76 = getelementptr inbounds nuw i8, ptr %64, i64 6 + %77 = load i8, ptr %76, align 1, !tbaa !3 + %78 = getelementptr inbounds nuw i8, ptr %64, i64 7 + %79 = load i8, ptr %78, align 1, !tbaa !3 + %80 = or i8 %67, %65 + %81 = or i8 %80, %69 + %82 = or i8 %81, %71 + %83 = or i8 %82, %73 + %84 = or i8 %83, %75 + %85 = or i8 %84, %77 + %86 = or i8 %85, %79 + %87 = icmp eq i8 %86, 0 + br i1 %87, label %fdt_num_mem_rsv.exit.preheader, label %91 + +fdt_num_mem_rsv.exit.preheader: ; preds = %63 + %88 = call i32 @fdt_next_tag(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull %4) #9 + %89 = load i32, ptr %4, align 4, !tbaa !6 + %90 = icmp slt i32 %89, 0 + br i1 %90, label %fdt_num_mem_rsv.exit.thread, label %.lr.ph + +91: ; preds = %63 + %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 + %92 = trunc nsw i64 %indvars.iv.next.i to i32 + %93 = shl i32 %92, 4 + %94 = add i32 %93, %47 + %95 = icmp ult i32 %94, %47 + br i1 %95, label %fdt_num_mem_rsv.exit.thread, label %.split.i, !llvm.loop !10 + +.lr.ph: ; preds = %fdt_num_mem_rsv.exit.preheader, %fdt_num_mem_rsv.exit + %96 = phi i32 [ %113, %fdt_num_mem_rsv.exit ], [ %89, %fdt_num_mem_rsv.exit.preheader ] + %97 = phi i32 [ %112, %fdt_num_mem_rsv.exit ], [ %88, %fdt_num_mem_rsv.exit.preheader ] + %98 = phi i32 [ %111, %fdt_num_mem_rsv.exit ], [ 0, %fdt_num_mem_rsv.exit.preheader ] + %.01830 = phi i32 [ %.1, %fdt_num_mem_rsv.exit ], [ 0, %fdt_num_mem_rsv.exit.preheader ] + switch i32 %97, label %fdt_num_mem_rsv.exit.thread [ + i32 4, label %fdt_num_mem_rsv.exit + i32 9, label %99 + i32 1, label %100 + i32 2, label %103 + i32 3, label %107 ] 38: ; preds = %.lr.ph - %.not25 = icmp eq i32 %.01828, 0 + %.not25 = icmp eq i32 %.01830, 0 %. = select i1 %.not25, i32 0, i32 -11 br label %.loopexit 39: ; preds = %.lr.ph - %40 = add i32 %.01828, 1 + %40 = add i32 %.01830, 1 %41 = icmp slt i32 %40, 0 br i1 %41, label %.loopexit, label %50 42: ; preds = %.lr.ph - %43 = icmp eq i32 %.01828, 0 + %43 = icmp eq i32 %.01830, 0 br i1 %43, label %.loopexit, label %44 44: ; preds = %42 - %45 = add i32 %.01828, -1 + %45 = add i32 %.01830, -1 br label %50 46: ; preds = %.lr.ph - %47 = call ptr @fdt_getprop_by_offset(ptr noundef nonnull %0, i32 noundef %37, ptr noundef nonnull %5, ptr noundef nonnull %3) + %47 = call ptr @fdt_getprop_by_offset(ptr noundef nonnull %0, i32 noundef %98, ptr noundef nonnull %5, ptr noundef nonnull %3) %.not24 = icmp eq ptr %47, null br i1 %.not24, label %48, label %._crit_edge @@ -3239,15 +3294,15 @@ define i32 @fdt_check_full(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 br label %.loopexit 50: ; preds = %._crit_edge, %39, %44, %.lr.ph - %51 = phi i32 [ %.pre, %._crit_edge ], [ %35, %44 ], [ %35, %39 ], [ %35, %.lr.ph ] - %.1 = phi i32 [ %.01828, %._crit_edge ], [ %45, %44 ], [ %40, %39 ], [ %.01828, %.lr.ph ] + %51 = phi i32 [ %.pre, %.fdt_num_mem_rsv.exit_crit_edge ], [ %96, %105 ], [ %96, %100 ], [ %96, %.lr.ph ] + %.1 = phi i32 [ %.01830, %.fdt_num_mem_rsv.exit_crit_edge ], [ %45, %105 ], [ %40, %100 ], [ %.01830, %.lr.ph ] %52 = call i32 @fdt_next_tag(ptr noundef nonnull %0, i32 noundef %51, ptr noundef nonnull %4) #9 %53 = load i32, ptr %4, align 4, !tbaa !6 %54 = icmp slt i32 %53, 0 br i1 %54, label %.loopexit, label %.lr.ph -.loopexit: ; preds = %50, %39, %42, %.lr.ph, %.preheader, %38, %29, %9, %7, %2, %48 - %.0 = phi i32 [ %49, %48 ], [ -8, %2 ], [ %8, %7 ], [ -8, %9 ], [ %30, %29 ], [ %., %38 ], [ %33, %.preheader ], [ %53, %50 ], [ -11, %39 ], [ -11, %42 ], [ -13, %.lr.ph ] +.loopexit: ; preds = %.split.i, %91, %50, %39, %42, %.lr.ph, %fdt_num_mem_rsv.exit.preheader, %38, %9, %7, %2, %48 + %.0 = phi i32 [ %49, %109 ], [ -8, %2 ], [ %8, %7 ], [ -8, %9 ], [ %., %99 ], [ %89, %fdt_num_mem_rsv.exit.preheader ], [ %53, %fdt_num_mem_rsv.exit ], [ -11, %100 ], [ -11, %103 ], [ -13, %.lr.ph ], [ -8, %91 ], [ -8, %.split.i ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9 diff --git a/bench/spike/optimized/fdt_sw.ll b/bench/spike/optimized/fdt_sw.ll index 3fc530f3256..6f758580a00 100644 --- a/bench/spike/optimized/fdt_sw.ll +++ b/bench/spike/optimized/fdt_sw.ll @@ -209,31 +209,24 @@ define range(i32 -13, 1) i32 @fdt_resize(ptr noundef readonly captures(address) store i32 %rev.i.i, ptr %111, align 4, !tbaa !10 %112 = getelementptr inbounds nuw i8, ptr %1, i64 12 %113 = load i8, ptr %112, align 1, !tbaa !14 - %114 = zext i8 %113 to i32 - %115 = shl nuw i32 %114, 24 - %116 = getelementptr inbounds nuw i8, ptr %1, i64 13 + %114 = getelementptr inbounds nuw i8, ptr %1, i64 13 + %115 = load i8, ptr %114, align 1, !tbaa !14 + %116 = getelementptr inbounds nuw i8, ptr %1, i64 14 %117 = load i8, ptr %116, align 1, !tbaa !14 - %118 = zext i8 %117 to i32 - %119 = shl nuw nsw i32 %118, 16 - %120 = or disjoint i32 %119, %115 - %121 = getelementptr inbounds nuw i8, ptr %1, i64 14 - %122 = load i8, ptr %121, align 1, !tbaa !14 - %123 = zext i8 %122 to i32 - %124 = shl nuw nsw i32 %123, 8 - %125 = or disjoint i32 %120, %124 - %126 = getelementptr inbounds nuw i8, ptr %1, i64 15 - %127 = load i8, ptr %126, align 1, !tbaa !14 - %128 = zext i8 %127 to i32 - %129 = or disjoint i32 %125, %128 - %.not45 = icmp eq i32 %129, 0 - br i1 %.not45, label %131, label %130 - -130: ; preds = %110 + %118 = getelementptr inbounds nuw i8, ptr %1, i64 15 + %119 = load i8, ptr %118, align 1, !tbaa !14 + %120 = or i8 %115, %113 + %121 = or i8 %120, %117 + %122 = or i8 %121, %119 + %123 = icmp eq i8 %122, 0 + br i1 %123, label %125, label %124 + +124: ; preds = %110 store i32 %rev.i.i, ptr %112, align 4, !tbaa !13 br label %131 -131: ; preds = %110, %130, %99, %22, %3 - %.1 = phi i32 [ %.0.i, %3 ], [ -13, %22 ], [ -3, %99 ], [ 0, %130 ], [ 0, %110 ] +131: ; preds = %110, %124, %99, %22, %3 + %.1 = phi i32 [ %.0.i, %3 ], [ -13, %22 ], [ -3, %99 ], [ 0, %124 ], [ 0, %110 ] ret i32 %.1 } @@ -265,24 +258,17 @@ define range(i32 -9, 1) i32 @fdt_add_reservemap_entry(ptr noundef captures(none) 21: ; preds = %3 %22 = getelementptr inbounds nuw i8, ptr %0, i64 12 %23 = load i8, ptr %22, align 1, !tbaa !14 - %24 = zext i8 %23 to i32 - %25 = shl nuw i32 %24, 24 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %25 = load i8, ptr %24, align 1, !tbaa !14 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 14 %27 = load i8, ptr %26, align 1, !tbaa !14 - %28 = zext i8 %27 to i32 - %29 = shl nuw nsw i32 %28, 16 - %30 = or disjoint i32 %29, %25 - %31 = getelementptr inbounds nuw i8, ptr %0, i64 14 - %32 = load i8, ptr %31, align 1, !tbaa !14 - %33 = zext i8 %32 to i32 - %34 = shl nuw nsw i32 %33, 8 - %35 = or disjoint i32 %30, %34 - %36 = getelementptr inbounds nuw i8, ptr %0, i64 15 - %37 = load i8, ptr %36, align 1, !tbaa !14 - %38 = zext i8 %37 to i32 - %39 = or disjoint i32 %35, %38 - %.not5.i = icmp eq i32 %39, 0 - br i1 %.not5.i, label %fdt_sw_probe_memrsv_.exit.thread, label %fdt_sw_probe_memrsv_.exit.thread18 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 15 + %29 = load i8, ptr %28, align 1, !tbaa !14 + %30 = or i8 %25, %23 + %31 = or i8 %30, %27 + %32 = or i8 %31, %29 + %33 = icmp eq i8 %32, 0 + br i1 %33, label %fdt_sw_probe_memrsv_.exit.thread, label %fdt_sw_probe_memrsv_.exit.thread18 fdt_sw_probe_memrsv_.exit: ; preds = %3 %40 = icmp eq i32 %20, -804389139 @@ -305,46 +291,46 @@ fdt_sw_probe_memrsv_.exit.thread: ; preds = %21 %53 = shl nuw nsw i32 %52, 8 %54 = or disjoint i32 %49, %53 %55 = getelementptr inbounds nuw i8, ptr %0, i64 11 + %50 = load i8, ptr %49, align 1, !tbaa !14 + %51 = zext i8 %50 to i32 + %52 = or disjoint i32 %48, %51 + %53 = sext i32 %52 to i64 + %54 = add nsw i64 %53, 16 + %55 = getelementptr inbounds nuw i8, ptr %0, i64 4 %56 = load i8, ptr %55, align 1, !tbaa !14 - %57 = zext i8 %56 to i32 - %58 = or disjoint i32 %54, %57 - %59 = sext i32 %58 to i64 - %60 = add nsw i64 %59, 16 - %61 = getelementptr inbounds nuw i8, ptr %0, i64 4 - %62 = load i8, ptr %61, align 1, !tbaa !14 - %63 = zext i8 %62 to i64 - %64 = shl nuw nsw i64 %63, 24 - %65 = getelementptr inbounds nuw i8, ptr %0, i64 5 - %66 = load i8, ptr %65, align 1, !tbaa !14 - %67 = zext i8 %66 to i64 - %68 = shl nuw nsw i64 %67, 16 - %69 = or disjoint i64 %68, %64 - %70 = getelementptr inbounds nuw i8, ptr %0, i64 6 - %71 = load i8, ptr %70, align 1, !tbaa !14 - %72 = zext i8 %71 to i64 - %73 = shl nuw nsw i64 %72, 8 - %74 = or disjoint i64 %69, %73 - %75 = getelementptr inbounds nuw i8, ptr %0, i64 7 - %76 = load i8, ptr %75, align 1, !tbaa !14 - %77 = zext i8 %76 to i64 - %78 = or disjoint i64 %74, %77 - %79 = icmp ugt i64 %60, %78 - br i1 %79, label %fdt_sw_probe_memrsv_.exit.thread18, label %80 - -80: ; preds = %fdt_sw_probe_memrsv_.exit.thread - %81 = getelementptr inbounds i8, ptr %0, i64 %59 - %82 = tail call noundef i64 @llvm.bswap.i64(i64 %1) - store i64 %82, ptr %81, align 8, !tbaa !15 - %83 = tail call noundef i64 @llvm.bswap.i64(i64 %2) - %84 = getelementptr inbounds nuw i8, ptr %81, i64 8 - store i64 %83, ptr %84, align 8, !tbaa !18 - %85 = trunc nuw i64 %60 to i32 - %rev.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %85) - store i32 %rev.i.i, ptr %41, align 4, !tbaa !12 + %57 = zext i8 %56 to i64 + %58 = shl nuw nsw i64 %57, 24 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 5 + %60 = load i8, ptr %59, align 1, !tbaa !14 + %61 = zext i8 %60 to i64 + %62 = shl nuw nsw i64 %61, 16 + %63 = or disjoint i64 %62, %58 + %64 = getelementptr inbounds nuw i8, ptr %0, i64 6 + %65 = load i8, ptr %64, align 1, !tbaa !14 + %66 = zext i8 %65 to i64 + %67 = shl nuw nsw i64 %66, 8 + %68 = or disjoint i64 %63, %67 + %69 = getelementptr inbounds nuw i8, ptr %0, i64 7 + %70 = load i8, ptr %69, align 1, !tbaa !14 + %71 = zext i8 %70 to i64 + %72 = or disjoint i64 %68, %71 + %73 = icmp ugt i64 %54, %72 + br i1 %73, label %fdt_sw_probe_memrsv_.exit.thread18, label %74 + +74:; preds = %fdt_sw_probe_memrsv_.exit.thread + %75 = getelementptr inbounds i8, ptr %0, i64 %53 + %76 = tail call noundef i64 @llvm.bswap.i64(i64 %1) + store i64 %76, ptr %75, align 8, !tbaa !15 + %77 = tail call noundef i64 @llvm.bswap.i64(i64 %2) + %78 = getelementptr inbounds nuw i8, ptr %75, i64 8 + store i64 %77, ptr %78, align 8, !tbaa !18 + %79 = trunc nuw i64 %54 to i32 + %82 = tail call noundef i32 @llvm.bswap.i32(i32 %79) + store i32 %82, ptr %41, align 4, !tbaa !12 br label %fdt_sw_probe_memrsv_.exit.thread18 -fdt_sw_probe_memrsv_.exit.thread18: ; preds = %fdt_sw_probe_memrsv_.exit, %21, %fdt_sw_probe_memrsv_.exit.thread, %80 - %.1 = phi i32 [ 0, %80 ], [ %.0.i.i, %fdt_sw_probe_memrsv_.exit ], [ -3, %fdt_sw_probe_memrsv_.exit.thread ], [ -7, %21 ] +fdt_sw_probe_memrsv_.exit.thread18: ; preds = %fdt_sw_probe_memrsv_.exit, %21, %fdt_sw_probe_memrsv_.exit.thread, %74 + %.1 = phi i32 [ 0, %74 ], [ %.0.i.i, %fdt_sw_probe_memrsv_.exit ], [ -3, %fdt_sw_probe_memrsv_.exit.thread ], [ -7, %21 ] ret i32 %.1 } @@ -373,24 +359,17 @@ define range(i32 -9, 1) i32 @fdt_finish_reservemap(ptr noundef captures(none) %0 19: ; preds = %1 %20 = getelementptr inbounds nuw i8, ptr %0, i64 12 %21 = load i8, ptr %20, align 1, !tbaa !14 - %22 = zext i8 %21 to i32 - %23 = shl nuw i32 %22, 24 - %24 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 13 + %23 = load i8, ptr %22, align 1, !tbaa !14 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 14 %25 = load i8, ptr %24, align 1, !tbaa !14 - %26 = zext i8 %25 to i32 - %27 = shl nuw nsw i32 %26, 16 - %28 = or disjoint i32 %27, %23 - %29 = getelementptr inbounds nuw i8, ptr %0, i64 14 - %30 = load i8, ptr %29, align 1, !tbaa !14 - %31 = zext i8 %30 to i32 - %32 = shl nuw nsw i32 %31, 8 - %33 = or disjoint i32 %28, %32 - %34 = getelementptr inbounds nuw i8, ptr %0, i64 15 - %35 = load i8, ptr %34, align 1, !tbaa !14 - %36 = zext i8 %35 to i32 - %37 = or disjoint i32 %33, %36 - %.not5.i.i = icmp eq i32 %37, 0 - br i1 %.not5.i.i, label %fdt_sw_probe_memrsv_.exit.thread.i, label %fdt_add_reservemap_entry.exit.thread + %26 = getelementptr inbounds nuw i8, ptr %0, i64 15 + %27 = load i8, ptr %26, align 1, !tbaa !14 + %28 = or i8 %23, %21 + %29 = or i8 %28, %25 + %30 = or i8 %29, %27 + %31 = icmp eq i8 %30, 0 + br i1 %31, label %fdt_sw_probe_memrsv_.exit.thread.i, label %fdt_add_reservemap_entry.exit.thread fdt_sw_probe_memrsv_.exit.i: ; preds = %1 %38 = icmp eq i32 %18, -804389139 @@ -413,58 +392,58 @@ fdt_sw_probe_memrsv_.exit.thread.i: ; preds = %19 %51 = shl nuw nsw i32 %50, 8 %52 = or disjoint i32 %47, %51 %53 = getelementptr inbounds nuw i8, ptr %0, i64 11 + %48 = load i8, ptr %47, align 1, !tbaa !14 + %49 = zext i8 %48 to i32 + %50 = or disjoint i32 %46, %49 + %51 = sext i32 %50 to i64 + %52 = add nsw i64 %51, 16 + %53 = getelementptr inbounds nuw i8, ptr %0, i64 4 %54 = load i8, ptr %53, align 1, !tbaa !14 - %55 = zext i8 %54 to i32 - %56 = or disjoint i32 %52, %55 - %57 = sext i32 %56 to i64 - %58 = add nsw i64 %57, 16 - %59 = getelementptr inbounds nuw i8, ptr %0, i64 4 - %60 = load i8, ptr %59, align 1, !tbaa !14 - %61 = zext i8 %60 to i64 - %62 = shl nuw nsw i64 %61, 24 - %63 = getelementptr inbounds nuw i8, ptr %0, i64 5 - %64 = load i8, ptr %63, align 1, !tbaa !14 - %65 = zext i8 %64 to i64 - %66 = shl nuw nsw i64 %65, 16 - %67 = or disjoint i64 %66, %62 - %68 = getelementptr inbounds nuw i8, ptr %0, i64 6 - %69 = load i8, ptr %68, align 1, !tbaa !14 - %70 = zext i8 %69 to i64 - %71 = shl nuw nsw i64 %70, 8 - %72 = or disjoint i64 %67, %71 - %73 = getelementptr inbounds nuw i8, ptr %0, i64 7 - %74 = load i8, ptr %73, align 1, !tbaa !14 - %75 = zext i8 %74 to i64 - %76 = or disjoint i64 %72, %75 - %77 = icmp ugt i64 %58, %76 - br i1 %77, label %fdt_add_reservemap_entry.exit.thread, label %78 - -78: ; preds = %fdt_sw_probe_memrsv_.exit.thread.i - %79 = getelementptr inbounds i8, ptr %0, i64 %57 - %80 = trunc nuw i64 %58 to i32 - %rev.i.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %80) - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %79, i8 0, i64 16, i1 false) - store i32 %rev.i.i.i, ptr %39, align 4, !tbaa !12 - %81 = load i8, ptr %59, align 1, !tbaa !14 - %82 = zext i8 %81 to i32 - %83 = shl nuw i32 %82, 24 - %84 = load i8, ptr %63, align 1, !tbaa !14 - %85 = zext i8 %84 to i32 - %86 = shl nuw nsw i32 %85, 16 - %87 = or disjoint i32 %86, %83 - %88 = load i8, ptr %68, align 1, !tbaa !14 - %89 = zext i8 %88 to i32 - %90 = shl nuw nsw i32 %89, 8 - %91 = or disjoint i32 %87, %90 - %92 = load i8, ptr %73, align 1, !tbaa !14 - %93 = zext i8 %92 to i32 - %94 = or disjoint i32 %91, %93 - %rev.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %94) + %55 = zext i8 %54 to i64 + %56 = shl nuw nsw i64 %55, 24 + %57 = getelementptr inbounds nuw i8, ptr %0, i64 5 + %58 = load i8, ptr %57, align 1, !tbaa !14 + %59 = zext i8 %58 to i64 + %60 = shl nuw nsw i64 %59, 16 + %61 = or disjoint i64 %60, %56 + %62 = getelementptr inbounds nuw i8, ptr %0, i64 6 + %63 = load i8, ptr %62, align 1, !tbaa !14 + %64 = zext i8 %63 to i64 + %65 = shl nuw nsw i64 %64, 8 + %66 = or disjoint i64 %61, %65 + %67 = getelementptr inbounds nuw i8, ptr %0, i64 7 + %68 = load i8, ptr %67, align 1, !tbaa !14 + %69 = zext i8 %68 to i64 + %70 = or disjoint i64 %66, %69 + %71 = icmp ugt i64 %52, %70 + br i1 %71, label %fdt_add_reservemap_entry.exit.thread, label %72 + +72:; preds = %fdt_sw_probe_memrsv_.exit.thread.i + %73 = getelementptr inbounds i8, ptr %0, i64 %51 + %74 = trunc nuw i64 %52 to i32 + %rev.i.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %74) + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %73, i8 0, i64 16, i1 false) + store i32 %rev.i.i.i, ptr %33, align 4, !tbaa !12 + %75 = load i8, ptr %53, align 1, !tbaa !14 + %76 = zext i8 %75 to i32 + %77 = shl nuw i32 %76, 24 + %78 = load i8, ptr %57, align 1, !tbaa !14 + %79 = zext i8 %78 to i32 + %80 = shl nuw nsw i32 %79, 16 + %81 = or disjoint i32 %80, %77 + %82 = load i8, ptr %62, align 1, !tbaa !14 + %83 = zext i8 %82 to i32 + %84 = shl nuw nsw i32 %83, 8 + %85 = or disjoint i32 %81, %84 + %86 = load i8, ptr %67, align 1, !tbaa !14 + %87 = zext i8 %86 to i32 + %88 = or disjoint i32 %85, %87 + %rev.i.i = tail call noundef i32 @llvm.bswap.i32(i32 %88) store i32 %rev.i.i, ptr %20, align 4, !tbaa !13 br label %fdt_add_reservemap_entry.exit.thread -fdt_add_reservemap_entry.exit.thread: ; preds = %19, %fdt_sw_probe_memrsv_.exit.thread.i, %fdt_sw_probe_memrsv_.exit.i, %78 - %.0 = phi i32 [ 0, %78 ], [ -7, %19 ], [ -3, %fdt_sw_probe_memrsv_.exit.thread.i ], [ %.0.i.i.i, %fdt_sw_probe_memrsv_.exit.i ] +fdt_add_reservemap_entry.exit.thread: ; preds = %19, %fdt_sw_probe_memrsv_.exit.thread.i, %fdt_sw_probe_memrsv_.exit.i, %72 + %.0 = phi i32 [ 0, %72 ], [ -7, %19 ], [ -3, %fdt_sw_probe_memrsv_.exit.thread.i ], [ %.0.i.i.i, %fdt_sw_probe_memrsv_.exit.i ] ret i32 %.0 } diff --git a/bench/wireshark/optimized/netscaler.ll b/bench/wireshark/optimized/netscaler.ll index 1bda74b79d6..41e2a1bddb2 100644 --- a/bench/wireshark/optimized/netscaler.ll +++ b/bench/wireshark/optimized/netscaler.ll @@ -1103,8 +1103,8 @@ define internal noundef zeroext i1 @nstrace_read_v20(ptr noundef readonly captur %21 = icmp ult i32 %.0984, %.0990 br i1 %21, label %.lr.ph, label %._crit_edge -.lr.ph: ; preds = %20, %1376 - %.19851300 = phi i32 [ %.3987, %1376 ], [ %.0984, %20 ] +.lr.ph: ; preds = %20, %1379 + %.19851300 = phi i32 [ %.3987, %1379 ], [ %.0984, %20 ] %22 = zext i32 %.19851300 to i64 %23 = getelementptr i8, ptr %10, i64 %22 %24 = load i8, ptr %23, align 1 @@ -3446,7 +3446,7 @@ nstrace_ensure_buflen.exit1129: ; preds = %1295 %1308 = add i64 %1307, %1306 store i64 %1308, ptr %15, align 8 store i64 %1308, ptr %16, align 8 - br label %1376 + br label %1379 1309: ; preds = %.lr.ph %.val1080 = load i32, ptr %13, align 4 @@ -3523,12 +3523,12 @@ nstrace_ensure_buflen.exit1131: ; preds = %1309 1352: ; preds = %1346, %1330 %1353 = phi i32 [ %1351, %1346 ], [ %1345, %1330 ] %1354 = add i32 %1353, %.19851300 - br label %1376 + br label %1379 1355: ; preds = %.lr.ph %.inv = icmp ult i32 %.19851300, 4096 %.0990. = select i1 %.inv, i32 4096, i32 %.0990 - br label %1376 + br label %1379 1356: ; preds = %.lr.ph %.val1082 = load i32, ptr %13, align 4 @@ -3553,17 +3553,16 @@ nstrace_ensure_buflen.exit1135: ; preds = %1356 1365: ; preds = %1361 %.not1059 = icmp eq i8 %1363, 0 - br i1 %.not1059, label %.thread1152, label %1373 + br i1 %.not1059, label %.thread1152, label %1376 .thread1143: ; preds = %1361 %1366 = getelementptr inbounds nuw i8, ptr %23, i64 2 %1367 = load i8, ptr %1366, align 1 %1368 = zext i8 %1367 to i32 - %1369 = shl nuw nsw i32 %1368, 7 - %1370 = and i32 %1364, 127 - %1371 = or disjoint i32 %1369, %1370 - %.not10591144 = icmp eq i32 %1371, 0 - br i1 %.not10591144, label %.thread1152, label %1373 + %1369 = and i32 %1364, 127 + %1370 = or i32 %1369, %1368 + %1371 = icmp eq i32 %1370, 0 + br i1 %1371, label %.thread1152, label %1373 .thread1152: ; preds = %1365, %.thread1143 store i32 -13, ptr %2, align 4 @@ -3571,26 +3570,31 @@ nstrace_ensure_buflen.exit1135: ; preds = %1356 store ptr %1372, ptr %3, align 8 br label %.critedge -1373: ; preds = %.thread1143, %1365 - %1374 = phi i32 [ %1364, %1365 ], [ %1371, %.thread1143 ] - %1375 = add i32 %1374, %.19851300 +1373: ; preds = %.thread1143 + %1374 = shl nuw nsw i32 %1368, 7 + %1375 = or disjoint i32 %1374, %1369 br label %1376 -1376: ; preds = %1373, %1352, %1302, %1355 - %.3987 = phi i32 [ %1375, %1373 ], [ %1354, %1352 ], [ %1297, %1302 ], [ %.0990., %1355 ] - %1377 = icmp ult i32 %.3987, %.0990 - br i1 %1377, label %.lr.ph, label %._crit_edge, !llvm.loop !12 - -._crit_edge: ; preds = %1376, %20 - %1378 = zext i32 %.0990 to i64 - %1379 = load i64, ptr %18, align 8 - %1380 = add i64 %1379, %1378 - store i64 %1380, ptr %18, align 8 - %1381 = load i64, ptr %19, align 8 - %1382 = sub i64 %1381, %1380 - %spec.select1156 = tail call i64 @llvm.umin.i64(i64 %1382, i64 8192) +1376: ; preds = %1373, %1365 + %.3987 = phi i32 [ %1375, %1373 ], [ %1364, %1365 ] + %1378 = add i32 %.3987, %.19851300 + br label %._crit_edge + +._crit_edge: ; preds = %1376, %1352, %1302, %1355 + %.3987 = phi i32 [ %1378, %1376 ], [ %1354, %1352 ], [ %1297, %1302 ], [ %.0990., %1355 ] + %1380 = icmp ult i32 %.3987, %.0990 + br i1 %1380, label %.lr.ph, label %._crit_edge, !llvm.loop !12 + +._crit_edge:; preds = %1379, %20 + %1381 = zext i32 %.0990 to i64 + %1382 = load i64, ptr %18, align 8 + %1383 = add i64 %1382, %1381 + store i64 %1383, ptr %18, align 8 + %1384 = load i64, ptr %19, align 8 + %1385 = sub i64 %1384, %1383 + %spec.select1156 = tail call i64 @llvm.umin.i64(i64 %1385, i64 8192) %spec.select = trunc nuw nsw i64 %spec.select1156 to i32 - %.not = icmp eq i64 %1381, %1380 + %.not = icmp eq i64 %1384, %1383 br i1 %.not, label %.critedge, label %1383 1383: ; preds = %._crit_edge @@ -3623,7 +3627,7 @@ nstrace_read_page.exit: ; preds = %1394 br label %20, !llvm.loop !13 .critedge: ; preds = %._crit_edge, %1396, %1391, %1328, %nstrace_ensure_buflen.exit1129, %1286, %.thread1152, %nstrace_ensure_buflen.exit1135, %nstrace_ensure_buflen.exit1131, %nstrace_ensure_buflen.exit, %1181, %1197, %1245, %1265, %1094, %1110, %1155, %1175, %1005, %1021, %1068, %1088, %919, %935, %979, %999, %833, %849, %893, %913, %750, %766, %807, %827, %667, %683, %724, %744, %587, %603, %641, %661, %491, %507, %561, %581, %398, %414, %465, %485, %303, %319, %372, %392, %211, %227, %277, %297, %118, %134, %185, %205, %28, %44, %92, %112 - %.3 = phi i1 [ false, %28 ], [ false, %44 ], [ false, %92 ], [ true, %112 ], [ false, %118 ], [ false, %134 ], [ false, %185 ], [ true, %205 ], [ false, %211 ], [ false, %227 ], [ false, %277 ], [ true, %297 ], [ false, %303 ], [ false, %319 ], [ false, %372 ], [ true, %392 ], [ false, %398 ], [ false, %414 ], [ false, %465 ], [ true, %485 ], [ false, %491 ], [ false, %507 ], [ false, %561 ], [ true, %581 ], [ false, %587 ], [ false, %603 ], [ false, %641 ], [ true, %661 ], [ false, %667 ], [ false, %683 ], [ false, %724 ], [ true, %744 ], [ false, %750 ], [ false, %766 ], [ false, %807 ], [ true, %827 ], [ false, %833 ], [ false, %849 ], [ false, %893 ], [ true, %913 ], [ false, %919 ], [ false, %935 ], [ false, %979 ], [ true, %999 ], [ false, %1005 ], [ false, %1021 ], [ false, %1068 ], [ true, %1088 ], [ false, %1094 ], [ false, %1110 ], [ false, %1155 ], [ true, %1175 ], [ false, %1181 ], [ false, %1197 ], [ false, %1245 ], [ true, %1265 ], [ false, %nstrace_ensure_buflen.exit ], [ false, %nstrace_ensure_buflen.exit1131 ], [ false, %nstrace_ensure_buflen.exit1135 ], [ false, %.thread1152 ], [ false, %1286 ], [ false, %nstrace_ensure_buflen.exit1129 ], [ false, %1328 ], [ false, %1391 ], [ false, %1396 ], [ false, %._crit_edge ] + %.3 = phi i1 [ false, %28 ], [ false, %44 ], [ false, %92 ], [ true, %112 ], [ false, %118 ], [ false, %134 ], [ false, %185 ], [ true, %205 ], [ false, %211 ], [ false, %227 ], [ false, %277 ], [ true, %297 ], [ false, %303 ], [ false, %319 ], [ false, %372 ], [ true, %392 ], [ false, %398 ], [ false, %414 ], [ false, %465 ], [ true, %485 ], [ false, %491 ], [ false, %507 ], [ false, %561 ], [ true, %581 ], [ false, %587 ], [ false, %603 ], [ false, %641 ], [ true, %661 ], [ false, %667 ], [ false, %683 ], [ false, %724 ], [ true, %744 ], [ false, %750 ], [ false, %766 ], [ false, %807 ], [ true, %827 ], [ false, %833 ], [ false, %849 ], [ false, %893 ], [ true, %913 ], [ false, %919 ], [ false, %935 ], [ false, %979 ], [ true, %999 ], [ false, %1005 ], [ false, %1021 ], [ false, %1068 ], [ true, %1088 ], [ false, %1094 ], [ false, %1110 ], [ false, %1155 ], [ true, %1175 ], [ false, %1181 ], [ false, %1197 ], [ false, %1245 ], [ true, %1265 ], [ false, %nstrace_ensure_buflen.exit ], [ false, %nstrace_ensure_buflen.exit1131 ], [ false, %nstrace_ensure_buflen.exit1135 ], [ false, %.thread1152 ], [ false, %1286 ], [ false, %nstrace_ensure_buflen.exit1129 ], [ false, %1328 ], [ false, %1394 ], [ false, %1399 ], [ false, %._crit_edge ] ret i1 %.3 } diff --git a/bench/wireshark/optimized/packet-atm.ll b/bench/wireshark/optimized/packet-atm.ll index 69fde9141ed..0c6c16560a5 100644 --- a/bench/wireshark/optimized/packet-atm.ll +++ b/bench/wireshark/optimized/packet-atm.ll @@ -1428,17 +1428,14 @@ define internal fastcc i32 @dissect_atm_common(ptr noundef %0, ptr noundef %1, p br i1 %226, label %.thread205.i, label %227 227: ; preds = %225 - %228 = zext i8 %220 to i16 - %229 = zext i8 %217 to i16 - %230 = shl nuw i16 %229, 8 - %231 = or disjoint i16 %230, %228 - %232 = icmp eq i16 %231, 0 - br i1 %232, label %233, label %237 - -233: ; preds = %227 - %234 = load i32, ptr @hf_atm_padding, align 4 - %235 = call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %234, ptr noundef %0, i32 noundef 0, i32 noundef 2, i32 noundef 0) - %236 = call ptr @tvb_new_subset_remaining(ptr noundef %0, i32 noundef 2) + %228 = or i8 %220, %217 + %229 = icmp eq i8 %228, 0 + br i1 %229, label %230, label %234 + +230:; preds = %227 + %231 = load i32, ptr @hf_atm_padding, align 4 + %232 = call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %231, ptr noundef %0, i32 noundef 0, i32 noundef 2, i32 noundef 0) + %233 = call ptr @tvb_new_subset_remaining(ptr noundef %0, i32 noundef 2) br label %.thread205.i 237: ; preds = %227 @@ -1452,7 +1449,7 @@ define internal fastcc i32 @dissect_atm_common(ptr noundef %0, ptr noundef %1, p 238: ; preds = %237 %239 = getelementptr inbounds nuw i8, ptr %7, i64 3 %240 = load i8, ptr %239, align 1 - switch i8 %240, label %241 [ + switch i8 %240, label %238 [ i8 -52, label %.thread205.i i8 -114, label %.thread205.i ] @@ -1466,14 +1463,14 @@ define internal fastcc i32 @dissect_atm_common(ptr noundef %0, ptr noundef %1, p br i1 %or.cond15.i, label %.thread205.i, label %246 246: ; preds = %241, %._crit_edge.i - %247 = phi i8 [ %.pre.i, %._crit_edge.i ], [ %244, %241 ] + %247 = phi i8 [ %.pre.i, %._crit_edge.i ], [ %244, %238 ] %248 = icmp eq i8 %247, 3 br i1 %248, label %249, label %257 249: ; preds = %246 %250 = getelementptr inbounds nuw i8, ptr %7, i64 5 %251 = load i8, ptr %250, align 1 - switch i8 %251, label %252 [ + switch i8 %251, label %249 [ i8 -52, label %.thread205.i i8 -114, label %.thread205.i ] @@ -1488,14 +1485,14 @@ define internal fastcc i32 @dissect_atm_common(ptr noundef %0, ptr noundef %1, p 257: ; preds = %252, %246 %258 = and i8 %217, -16 - switch i8 %258, label %261 [ + switch i8 %258, label %258 [ i8 64, label %.thread205.i i8 96, label %.thread205.i ] -.thread205.i: ; preds = %257, %257, %252, %249, %249, %241, %238, %238, %233, %225, %215 - %llc_handle.sink.i = phi ptr [ @eth_maybefcs_handle, %233 ], [ @llc_handle, %215 ], [ @ppp_handle, %225 ], [ @fr_handle, %238 ], [ @fr_handle, %238 ], [ @fr_handle, %241 ], [ @fr_handle, %249 ], [ @fr_handle, %249 ], [ @fr_handle, %252 ], [ @ip_handle, %257 ], [ @ip_handle, %257 ] - %.0.sink.i = phi ptr [ %236, %233 ], [ %.0.i, %215 ], [ %.0.i, %225 ], [ %.0.i, %238 ], [ %.0.i, %238 ], [ %.0.i, %241 ], [ %.0.i, %249 ], [ %.0.i, %249 ], [ %.0.i, %252 ], [ %.0.i, %257 ], [ %.0.i, %257 ] +.thread205.i: ; preds = %257, %257, %252, %249, %249, %241, %238, %238, %230, %225, %215 + %llc_handle.sink.i = phi ptr [ @eth_maybefcs_handle, %230 ], [ @llc_handle, %215 ], [ @ppp_handle, %225 ], [ @fr_handle, %235 ], [ @fr_handle, %235 ], [ @fr_handle, %238 ], [ @fr_handle, %246 ], [ @fr_handle, %246 ], [ @fr_handle, %249 ], [ @ip_handle, %254 ], [ @ip_handle, %254 ] + %.0.sink.i = phi ptr [ %233, %230 ], [ %.0.i, %215 ], [ %.0.i, %225 ], [ %.0.i, %235 ], [ %.0.i, %235 ], [ %.0.i, %238 ], [ %.0.i, %246 ], [ %.0.i, %246 ], [ %.0.i, %249 ], [ %.0.i, %254 ], [ %.0.i, %254 ] %259 = load ptr, ptr %llc_handle.sink.i, align 8 %260 = call i32 @call_dissector(ptr noundef %259, ptr noundef %.0.sink.i, ptr noundef %1, ptr noundef %2) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #11 @@ -1533,7 +1530,7 @@ define internal fastcc i32 @dissect_atm_common(ptr noundef %0, ptr noundef %1, p br label %280 280: ; preds = %278, %276 - %.3.i = phi ptr [ %279, %278 ], [ %0, %276 ] + %.3.i = phi ptr [ %279, %275 ], [ %0, %273 ] %281 = load ptr, ptr @atm_type_aal2_table, align 8 %282 = getelementptr inbounds nuw i8, ptr %4, i64 5 %283 = load i8, ptr %282, align 1 @@ -1543,7 +1540,7 @@ define internal fastcc i32 @dissect_atm_common(ptr noundef %0, ptr noundef %1, p br i1 %.not190.not.i, label %.thread.i, label %dissect_reassembled_pdu.exit .thread.i: ; preds = %280, %262, %261, %212, %203, %197, %195 - %.1199.i = phi ptr [ %.3.i, %280 ], [ %.0.i, %261 ], [ %.0.i, %195 ], [ %.0.i, %262 ], [ %.0.i, %203 ], [ %.0.i, %212 ], [ %.0.i, %197 ] + %.1199.i = phi ptr [ %.3.i, %277 ], [ %.0.i, %258 ], [ %.0.i, %195 ], [ %.0.i, %259 ], [ %.0.i, %203 ], [ %.0.i, %212 ], [ %.0.i, %197 ] %286 = call i32 @call_data_dissector(ptr noundef %.1199.i, ptr noundef %1, ptr noundef %2) br label %dissect_reassembled_pdu.exit diff --git a/bench/wireshark/optimized/packet-knet.ll b/bench/wireshark/optimized/packet-knet.ll index f60f1f8c841..dc90a12f521 100644 --- a/bench/wireshark/optimized/packet-knet.ll +++ b/bench/wireshark/optimized/packet-knet.ll @@ -244,15 +244,12 @@ define internal i32 @dissect_knet_udp(ptr noundef %0, ptr noundef readonly captu %49 = shl i32 %.139, 3 %50 = add i32 %49, 12 %51 = tail call zeroext i8 @tvb_get_bits8(ptr noundef %0, i32 noundef %50, i32 noundef 4) - %52 = zext i8 %51 to i32 - %53 = shl nuw nsw i32 %52, 8 - %54 = tail call zeroext i8 @tvb_get_bits8(ptr noundef %0, i32 noundef %49, i32 noundef 8) - %55 = zext i8 %54 to i32 - %56 = or disjoint i32 %53, %55 - %.not36 = icmp eq i32 %56, 0 - br i1 %.not36, label %.critedge, label %57 - -57: ; preds = %.lr.ph + %52 = tail call zeroext i8 @tvb_get_bits8(ptr noundef %0, i32 noundef %49, i32 noundef 8) + %53 = or i8 %52, %51 + %54 = icmp eq i8 %53, 0 + br i1 %54, label %.critedge, label %55 + +55:; preds = %.lr.ph call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) %58 = load i32, ptr @hf_knet_message_tree, align 4 %59 = tail call ptr @proto_tree_add_item(ptr noundef %12, i32 noundef %58, ptr noundef %0, i32 noundef %.139, i32 noundef -1, i32 noundef 0) @@ -267,11 +264,11 @@ define internal i32 @dissect_knet_udp(ptr noundef %0, ptr noundef readonly captu %.not.i38 = icmp eq ptr %61, null br i1 %.not.i38, label %.dissect_content_length.exit_crit_edge, label %68 -.dissect_content_length.exit_crit_edge: ; preds = %57 +.dissect_content_length.exit_crit_edge: ; preds = %55 %.pre = add i32 %.139, 1 br label %dissect_content_length.exit -68: ; preds = %57 +68: ; preds = %55 %69 = load i32, ptr @hf_knet_msg_flags, align 4 %70 = add i32 %.139, 1 %71 = tail call ptr @proto_tree_add_item(ptr noundef nonnull %61, i32 noundef %69, ptr noundef %0, i32 noundef %70, i32 noundef 1, i32 noundef 0) @@ -290,7 +287,7 @@ define internal i32 @dissect_knet_udp(ptr noundef %0, ptr noundef readonly captu br label %dissect_content_length.exit dissect_content_length.exit: ; preds = %.dissect_content_length.exit_crit_edge, %68 - %.pre-phi = phi i32 [ %.pre, %.dissect_content_length.exit_crit_edge ], [ %70, %68 ] + %.pre-phi = phi i32 [ %.pre, %.dissect_content_length.exit_crit_edge ], [ %70, %66 ] %84 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.pre-phi) %85 = and i8 %84, 16 %.not.i37 = icmp eq i8 %85, 0 @@ -307,7 +304,7 @@ dissect_content_length.exit: ; preds = %.dissect_content_le br label %dissect_knet_message.exit dissect_knet_message.exit: ; preds = %dissect_content_length.exit, %86 - %92 = phi i32 [ %91, %86 ], [ %.139, %dissect_content_length.exit ] + %92 = phi i32 [ %91, %84 ], [ %.139, %dissect_content_length.exit ] %93 = add i32 %92, 2 store i32 %93, ptr %5, align 4 %94 = sub i32 %67, %.139 diff --git a/bench/wireshark/optimized/packet-opensafety.ll b/bench/wireshark/optimized/packet-opensafety.ll index 74327e1bdf3..0e673194646 100644 --- a/bench/wireshark/optimized/packet-opensafety.ll +++ b/bench/wireshark/optimized/packet-opensafety.ll @@ -1769,14 +1769,14 @@ findFrame1Position.exit.thread291: ; preds = %76 store i32 %59, ptr %10, align 4 br label %.backedge -.backedge: ; preds = %294, %301, %findFrame1Position.exit.thread291, %167, %169, %178, %226, %197, %290 - %92 = phi i32 [ %59, %findFrame1Position.exit.thread291 ], [ %179, %178 ], [ %storemerge, %197 ], [ %227, %226 ], [ %293, %290 ], [ %168, %167 ], [ %170, %169 ], [ %302, %301 ], [ %298, %294 ] - %.0250.be = phi i8 [ %.0250324, %findFrame1Position.exit.thread291 ], [ %.0250324, %178 ], [ %.0250324, %197 ], [ %.0250324, %226 ], [ %.0250324, %290 ], [ %.0250324, %167 ], [ %.0250324, %169 ], [ 1, %301 ], [ 1, %294 ] - %.0246.be = phi i1 [ %.0246325, %findFrame1Position.exit.thread291 ], [ %.0246325, %178 ], [ %.0246325, %197 ], [ %.0246325, %226 ], [ %.0246325, %290 ], [ %.0246325, %167 ], [ %.0246325, %169 ], [ true, %301 ], [ true, %294 ] - %.0240.be = phi i1 [ %.0240326, %findFrame1Position.exit.thread291 ], [ %.0240326, %178 ], [ %.0240326, %197 ], [ %spec.select277, %226 ], [ %.1241, %290 ], [ %.0240326, %167 ], [ %.0240326, %169 ], [ %.1241, %301 ], [ %.1241, %294 ] - %.0236.be = phi i8 [ %.0236328, %findFrame1Position.exit.thread291 ], [ %.0236328, %178 ], [ %.0236328, %197 ], [ %.0236328, %226 ], [ %.0236328, %290 ], [ %.0236328, %167 ], [ %.0236328, %169 ], [ %.6304, %301 ], [ %.6304, %294 ] - %.0233.be = phi i32 [ %.0233329, %findFrame1Position.exit.thread291 ], [ %.0233329, %178 ], [ %.0233329, %197 ], [ %.0233329, %226 ], [ %.0233329, %290 ], [ %.0233329, %167 ], [ %.0233329, %169 ], [ %59, %301 ], [ %59, %294 ] - %.0231.be = phi i8 [ %.0231330, %findFrame1Position.exit.thread291 ], [ %.0231330, %178 ], [ %.0231330, %197 ], [ %.0231330, %226 ], [ %.0231330, %290 ], [ %.0231330, %167 ], [ %.0231330, %169 ], [ %286, %301 ], [ %286, %294 ] +.backedge: ; preds = %294, %301, %findFrame1Position.exit.thread291, %167, %169, %178, %223, %197, %290 + %92 = phi i32 [ %59, %findFrame1Position.exit.thread291 ], [ %179, %178 ], [ %storemerge, %197 ], [ %224, %223 ], [ %293, %287 ], [ %168, %167 ], [ %170, %169 ], [ %302, %298 ], [ %298, %291 ] + %.0250.be = phi i8 [ %.0250324, %findFrame1Position.exit.thread291 ], [ %.0250324, %178 ], [ %.0250324, %197 ], [ %.0250324, %223 ], [ %.0250324, %287 ], [ %.0250324, %167 ], [ %.0250324, %169 ], [ 1, %298 ], [ 1, %291 ] + %.0246.be = phi i1 [ %.0246325, %findFrame1Position.exit.thread291 ], [ %.0246325, %178 ], [ %.0246325, %197 ], [ %.0246325, %223 ], [ %.0246325, %287 ], [ %.0246325, %167 ], [ %.0246325, %169 ], [ true, %298 ], [ true, %291 ] + %.0240.be = phi i1 [ %.0240326, %findFrame1Position.exit.thread291 ], [ %.0240326, %178 ], [ %.0240326, %197 ], [ %spec.select277, %223 ], [ %.1241, %287 ], [ %.0240326, %167 ], [ %.0240326, %169 ], [ %.1241, %298 ], [ %.1241, %291 ] + %.0236.be = phi i8 [ %.0236328, %findFrame1Position.exit.thread291 ], [ %.0236328, %178 ], [ %.0236328, %197 ], [ %.0236328, %223 ], [ %.0236328, %287 ], [ %.0236328, %167 ], [ %.0236328, %169 ], [ %.6304, %298 ], [ %.6304, %291 ] + %.0233.be = phi i32 [ %.0233329, %findFrame1Position.exit.thread291 ], [ %.0233329, %178 ], [ %.0233329, %197 ], [ %.0233329, %223 ], [ %.0233329, %287 ], [ %.0233329, %167 ], [ %.0233329, %169 ], [ %59, %298 ], [ %59, %291 ] + %.0231.be = phi i8 [ %.0231330, %findFrame1Position.exit.thread291 ], [ %.0231330, %178 ], [ %.0231330, %197 ], [ %.0231330, %223 ], [ %.0231330, %287 ], [ %.0231330, %167 ], [ %.0231330, %169 ], [ %283, %298 ], [ %283, %291 ] %93 = icmp ult i32 %92, %13 br i1 %93, label %44, label %._crit_edge333, !llvm.loop !13 @@ -1999,62 +1999,59 @@ findFrame1Position.exit286: ; preds = %143, %144, %150 211: ; preds = %198 %212 = add nuw nsw i32 %96, %.pre357 %213 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %212) - %214 = zext i8 %213 to i32 - %215 = add nuw nsw i32 %212, 1 - %216 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %215) - %217 = shl i8 %216, 6 - %218 = zext i8 %217 to i32 - %219 = shl nuw nsw i32 %218, 2 - %220 = or disjoint i32 %219, %214 - %221 = icmp eq i32 %220, 0 - %spec.select277 = select i1 %221, i1 true, i1 %.0240326 - %222 = add nuw nsw i32 %97, %.pre357 - %223 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %222) - %224 = and i8 %223, -4 - %225 = icmp eq i8 %224, -40 - br i1 %225, label %226, label %228 - -226: ; preds = %211 - %227 = add i32 %57, 2 - store i32 %227, ptr %10, align 4 + %214 = add nuw nsw i32 %212, 1 + %215 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %214) + %216 = shl i8 %215, 6 + %217 = or i8 %216, %213 + %218 = icmp eq i8 %217, 0 + %spec.select277 = select i1 %218, i1 true, i1 %.0240326 + %219 = add nuw nsw i32 %97, %.pre357 + %220 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %219) + %221 = and i8 %220, -4 + %222 = icmp eq i8 %221, -40 + br i1 %222, label %223, label %225 + +223:; preds = %211 + %224 = add i32 %57, 2 + store i32 %224, ptr %10, align 4 br label %.backedge 228: ; preds = %._crit_edge355, %211 - %.pre-phi361 = phi i32 [ %.pre360, %._crit_edge355 ], [ %215, %211 ] + %.pre-phi361 = phi i32 [ %.pre360, %._crit_edge355 ], [ %214, %211 ] %.pre-phi359 = phi i32 [ %.pre358, %._crit_edge355 ], [ %212, %211 ] %.1241 = phi i1 [ %.0240326, %._crit_edge355 ], [ %spec.select277, %211 ] %229 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %.pre-phi359) + %227 = zext i8 %226 to i32 + %228 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %.pre-phi361) + %229 = shl i8 %228, 6 %230 = zext i8 %229 to i32 - %231 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %.pre-phi361) - %232 = shl i8 %231, 6 - %233 = zext i8 %232 to i32 - %234 = shl nuw nsw i32 %233, 2 - %235 = or disjoint i32 %234, %230 - %236 = load ptr, ptr @global_filter_list, align 8 - %.not268 = icmp eq ptr %236, null - br i1 %.not268, label %.thread297, label %237 - -237: ; preds = %228 - %238 = call i32 @wmem_list_count(ptr noundef nonnull %236) - %.not269 = icmp eq i32 %238, 0 - br i1 %.not269, label %.thread297, label %239 - -239: ; preds = %237 - %240 = load ptr, ptr @global_filter_list, align 8 - %241 = zext nneg i32 %235 to i64 - %242 = inttoptr i64 %241 to ptr - %243 = call ptr @wmem_list_find(ptr noundef %240, ptr noundef %242) - %244 = load i8, ptr @global_show_only_node_in_filter, align 1, !range !6, !noundef !7 + %231 = shl nuw nsw i32 %230, 2 + %232 = or disjoint i32 %231, %227 + %233 = load ptr, ptr @global_filter_list, align 8 + %.not268 = icmp eq ptr %233, null + br i1 %.not268, label %.thread297, label %234 + +234:; preds = %225 + %235 = call i32 @wmem_list_count(ptr noundef nonnull %233) + %.not269 = icmp eq i32 %235, 0 + br i1 %.not269, label %.thread297, label %236 + +236:; preds = %234 + %237 = load ptr, ptr @global_filter_list, align 8 + %238 = zext nneg i32 %232 to i64 + %239 = inttoptr i64 %238 to ptr + %240 = call ptr @wmem_list_find(ptr noundef %237, ptr noundef %239) + %241 = load i8, ptr @global_show_only_node_in_filter, align 1, !range !6, !noundef !7 + %242 = trunc nuw i8 %241 to i1 + %243 = icmp eq ptr %240, null + %or.cond278 = xor i1 %243, %242 + br i1 %or.cond278, label %.thread297, label %287 + +.thread297: ; preds = %236, %234, %225 + %244 = load i8, ptr @global_display_intergap_data, align 1, !range !6, !noundef !7 %245 = trunc nuw i8 %244 to i1 - %246 = icmp eq ptr %243, null - %or.cond278 = xor i1 %246, %245 - br i1 %or.cond278, label %.thread297, label %290 - -.thread297: ; preds = %239, %237, %228 - %247 = load i8, ptr @global_display_intergap_data, align 1, !range !6, !noundef !7 - %248 = trunc nuw i8 %247 to i1 %.not270 = icmp ne i32 %.0233329, %57 - %or.cond368.not = select i1 %248, i1 %.not270, i1 false + %or.cond368.not = select i1 %245, i1 %.not270, i1 false br i1 %or.cond368.not, label %249, label %254 249: ; preds = %.thread297 @@ -2072,46 +2069,46 @@ findFrame1Position.exit286: ; preds = %143, %144, %150 .thread301: ; preds = %254 %256 = load ptr, ptr %43, align 8 call void @col_set_str(ptr noundef %256, i32 noundef 35, ptr noundef %0) - br label %264 + br label %261 257: ; preds = %254 - br i1 %.0246325, label %264, label %258 + br i1 %.0246325, label %261, label %258 258: ; preds = %257 - br i1 %.not265.not, label %261, label %259 + br i1 %.not265.not, label %258, label %259 259: ; preds = %258 %260 = call i32 @call_dissector(ptr noundef %.0225, ptr noundef %.0226, ptr noundef %6, ptr noundef %7) %.pre.pre.pre = load i32, ptr %10, align 4 %.pre350.pre.pre = load i32, ptr %11, align 4 + br label %258 + +258: ; preds = %256, %255 + %.pre350.pre = phi i32 [ %.pre350.pre.pre, %256 ], [ %58, %255 ] + %.pre.pre = phi i32 [ %.pre.pre.pre, %256 ], [ %57, %255 ] + %259 = load ptr, ptr %43, align 8 + call void @col_set_str(ptr noundef %259, i32 noundef 35, ptr noundef %0) + %260 = load ptr, ptr %43, align 8 + call void @col_clear(ptr noundef %260, i32 noundef 25) br label %261 -261: ; preds = %259, %258 - %.pre350.pre = phi i32 [ %.pre350.pre.pre, %259 ], [ %58, %258 ] - %.pre.pre = phi i32 [ %.pre.pre.pre, %259 ], [ %57, %258 ] - %262 = load ptr, ptr %43, align 8 - call void @col_set_str(ptr noundef %262, i32 noundef 35, ptr noundef %0) - %263 = load ptr, ptr %43, align 8 - call void @col_clear(ptr noundef %263, i32 noundef 25) - br label %264 - -264: ; preds = %.thread301, %261, %257 - %.pre350 = phi i32 [ %58, %257 ], [ %.pre350.pre, %261 ], [ %58, %.thread301 ] - %.pre = phi i32 [ %57, %257 ], [ %.pre.pre, %261 ], [ %57, %.thread301 ] - %.6304.in = phi i8 [ %.0236328, %257 ], [ %.0236328, %261 ], [ %4, %.thread301 ] +261: ; preds = %.thread301, %258, %254 + %.pre350.pre = phi i32 [ %58, %254 ], [ %.pre350.pre, %258 ], [ %58, %.thread301 ] + %.pre.pre = phi i32 [ %57, %254 ], [ %.pre.pre, %258 ], [ %57, %.thread301 ] + %.6304.in = phi i8 [ %.0236328, %254 ], [ %.0236328, %258 ], [ %4, %.thread301 ] %.6304 = add i8 %.6304.in, 1 br i1 %.not272, label %270, label %265 -265: ; preds = %264 +265: ; preds = %261 %266 = load i32, ptr @proto_opensafety, align 4 %267 = call ptr @proto_tree_add_item(ptr noundef nonnull %7, i32 noundef %266, ptr noundef %.0226, i32 noundef %.pre, i32 noundef %.pre350, i32 noundef 0) %268 = load i32, ptr @ett_opensafety, align 4 %269 = call ptr @proto_item_add_subtree(ptr noundef %267, i32 noundef %268) br label %270 -270: ; preds = %264, %265 - %.0224 = phi ptr [ %267, %265 ], [ null, %264 ] - %.0223 = phi ptr [ %269, %265 ], [ null, %264 ] +270: ; preds = %261, %265 + %.0224 = phi ptr [ %267, %262 ], [ null, %261 ] + %.0223 = phi ptr [ %269, %262 ], [ null, %261 ] %271 = getelementptr inbounds nuw i8, ptr %50, i64 34 store i8 %.0239, ptr %271, align 2 %272 = getelementptr inbounds nuw i8, ptr %50, i64 16 @@ -2130,34 +2127,34 @@ findFrame1Position.exit286: ; preds = %143, %144, %150 store i8 0, ptr %50, align 8 %280 = load i8, ptr %271, align 2 %281 = icmp eq i8 %280, -64 - br i1 %281, label %282, label %285 + br i1 %281, label %282, label %282 282: ; preds = %270 - %283 = load i8, ptr %53, align 1 - %284 = and i8 %283, -8 - store i8 %284, ptr %53, align 1 - br label %285 + %280 = load i8, ptr %53, align 1 + %281 = and i8 %280, -8 + store i8 %281, ptr %53, align 1 + br label %282 -285: ; preds = %282, %270 - call fastcc void @dissect_opensafety_message(ptr noundef %50, ptr noundef %255, ptr noundef %6, ptr noundef %.0224, ptr noundef %.0223, i8 noundef zeroext %.6304, i8 noundef zeroext %.0231330) - %286 = load i8, ptr %53, align 1 - br i1 %.1241, label %287, label %294 +282: ; preds = %279, %267 + call fastcc void @dissect_opensafety_message(ptr noundef %50, ptr noundef %252, ptr noundef %6, ptr noundef %.0224, ptr noundef %.0223, i8 noundef zeroext %.6304, i8 noundef zeroext %.0231330) + %283 = load i8, ptr %53, align 1 + br i1 %.1241, label %284, label %291 -287: ; preds = %285 +287: ; preds = %282 store i8 1, ptr %50, align 8 %288 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %.pre-phi359) %289 = call zeroext i8 @tvb_get_uint8(ptr noundef %.0226, i32 noundef %.pre-phi361) br label %294 -290: ; preds = %239 +290: ; preds = %236 %291 = load i32, ptr @proto_opensafety, align 4 %292 = call ptr @proto_tree_add_item(ptr noundef %7, i32 noundef %291, ptr noundef %.0226, i32 noundef %57, i32 noundef %58, i32 noundef 0) - call void (ptr, ptr, ...) @proto_item_append_text(ptr noundef %292, ptr noundef nonnull @.str.351, i32 noundef %235, i32 noundef %235) + call void (ptr, ptr, ...) @proto_item_append_text(ptr noundef %292, ptr noundef nonnull @.str.351, i32 noundef %232, i32 noundef %232) %293 = add i32 %57, 2 store i32 %293, ptr %10, align 4 br label %.backedge -294: ; preds = %285, %287 +294: ; preds = %282, %287 %295 = load i32, ptr @opensafety_tap, align 4 call void @tap_queue_packet(i32 noundef %295, ptr noundef %6, ptr noundef %50) %296 = load i32, ptr %11, align 4 @@ -2201,7 +2198,7 @@ findFrame1Position.exit286: ; preds = %143, %144, %150 br label %.loopexit .loopexit: ; preds = %198, %.thread362, %24, %9, %314 - %.0 = phi i32 [ %315, %314 ], [ 0, %9 ], [ 0, %24 ], [ 0, %.thread362 ], [ 0, %198 ] + %.0 = phi i32 [ %315, %311 ], [ 0, %9 ], [ 0, %24 ], [ 0, %.thread362 ], [ 0, %198 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #12 ret i32 %.0 diff --git a/bench/wireshark/optimized/tvbuff.ll b/bench/wireshark/optimized/tvbuff.ll index 62b9ffaac4e..2b257c79a3d 100644 --- a/bench/wireshark/optimized/tvbuff.ll +++ b/bench/wireshark/optimized/tvbuff.ll @@ -5730,22 +5730,19 @@ define i32 @tvb_unicode_strsize(ptr noundef %0, i32 noundef %1) local_unnamed_ad unreachable .preheader: ; preds = %3, %.preheader - %.0 = phi i32 [ %15, %.preheader ], [ 0, %3 ] + %.0 = phi i32 [ %11, %.preheader ], [ 0, %3 ] %8 = add i32 %.0, %1 %9 = tail call fastcc ptr @fast_ensure_contiguous(ptr noundef nonnull %0, i32 noundef %8, i32 noundef 2) %.val.i = load i8, ptr %9, align 1 %10 = getelementptr i8, ptr %9, i64 1 %.val2.i = load i8, ptr %10, align 1 - %11 = zext i8 %.val.i to i16 - %12 = shl nuw i16 %11, 8 - %13 = zext i8 %.val2.i to i16 - %14 = or disjoint i16 %12, %13 - %15 = add i32 %.0, 2 - %.not8 = icmp eq i16 %14, 0 - br i1 %.not8, label %16, label %.preheader, !llvm.loop !25 - -16: ; preds = %.preheader - ret i32 %15 + %11 = add i32 %.0, 2 + %12 = or i8 %.val2.i, %.val.i + %13 = icmp eq i8 %12, 0 + br i1 %13, label %14, label %.preheader, !llvm.loop !25 + +14:; preds = %.preheader + ret i32 %11 } ; Function Attrs: null_pointer_is_valid sspstrong uwtable @@ -6891,44 +6888,44 @@ define ptr @tvb_get_stringz_enc(ptr noundef %0, ptr noundef %1, i32 noundef %2, %12 = trunc i32 %4 to i16 %trunc = and i16 %12, -2 switch i16 %trunc, label %13 [ - i16 86, label %219 + i16 86, label %209 i16 2, label %18 i16 4, label %.preheader.i.i i16 6, label %.preheader.i.i149 i16 8, label %.preheader - i16 10, label %72 - i16 12, label %77 - i16 14, label %82 - i16 16, label %87 - i16 18, label %92 - i16 20, label %97 - i16 22, label %102 - i16 24, label %107 - i16 26, label %112 - i16 28, label %117 - i16 30, label %122 - i16 34, label %127 - i16 36, label %132 - i16 38, label %137 - i16 40, label %142 - i16 42, label %147 - i16 60, label %152 - i16 58, label %157 - i16 48, label %162 - i16 50, label %167 - i16 62, label %172 - i16 64, label %177 - i16 66, label %182 - i16 44, label %187 - i16 76, label %187 - i16 78, label %187 - i16 52, label %188 - i16 46, label %189 - i16 56, label %194 - i16 96, label %199 - i16 54, label %204 - i16 80, label %209 - i16 82, label %214 + i16 10, label %62 + i16 12, label %67 + i16 14, label %72 + i16 16, label %77 + i16 18, label %82 + i16 20, label %87 + i16 22, label %92 + i16 24, label %97 + i16 26, label %102 + i16 28, label %107 + i16 30, label %112 + i16 34, label %117 + i16 36, label %122 + i16 38, label %127 + i16 40, label %132 + i16 42, label %137 + i16 60, label %142 + i16 58, label %147 + i16 48, label %152 + i16 50, label %157 + i16 62, label %162 + i16 64, label %167 + i16 66, label %172 + i16 44, label %177 + i16 76, label %177 + i16 78, label %177 + i16 52, label %178 + i16 46, label %179 + i16 56, label %184 + i16 96, label %189 + i16 54, label %194 + i16 80, label %199 + i16 82, label %204 ] 13: ; preds = %11 @@ -6960,102 +6957,117 @@ tvb_get_utf_8_stringz.exit: ; preds = %18, %21 br label %224 .preheader.i.i: ; preds = %11, %.preheader.i.i - %.0.i.i = phi i32 [ %30, %.preheader.i.i ], [ 0, %11 ] + %.0.i.i = phi i32 [ %26, %.preheader.i.i ], [ 0, %11 ] %23 = add i32 %.0.i.i, %2 %24 = tail call fastcc ptr @fast_ensure_contiguous(ptr noundef nonnull %1, i32 noundef %23, i32 noundef 2) %.val.i.i.i = load i8, ptr %24, align 1 %25 = getelementptr i8, ptr %24, i64 1 %.val2.i.i.i = load i8, ptr %25, align 1 - %26 = zext i8 %.val.i.i.i to i16 - %27 = shl nuw i16 %26, 8 - %28 = zext i8 %.val2.i.i.i to i16 - %29 = or disjoint i16 %27, %28 - %30 = add i32 %.0.i.i, 2 - %.not8.i.i = icmp eq i16 %29, 0 - br i1 %.not8.i.i, label %tvb_unicode_strsize.exit.i, label %.preheader.i.i, !llvm.loop !25 + %26 = add i32 %.0.i.i, 2 + %27 = or i8 %.val2.i.i.i, %.val.i.i.i + %28 = icmp eq i8 %27, 0 + br i1 %28, label %tvb_unicode_strsize.exit.i, label %.preheader.i.i, !llvm.loop !25 tvb_unicode_strsize.exit.i: ; preds = %.preheader.i.i %31 = and i32 %4, -1610612736 - %32 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %30) + %32 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %26) %.not.i148 = icmp eq ptr %3, null br i1 %.not.i148, label %tvb_get_utf_16_stringz.exit, label %33 33: ; preds = %tvb_unicode_strsize.exit.i - store i32 %30, ptr %3, align 4 + store i32 %26, ptr %3, align 4 br label %tvb_get_utf_16_stringz.exit tvb_get_utf_16_stringz.exit: ; preds = %tvb_unicode_strsize.exit.i, %33 - %34 = tail call ptr @get_utf_16_string(ptr noundef %0, ptr noundef %32, i32 noundef %30, i32 noundef range(i32 0, -1610612735) %31) + %34 = tail call ptr @get_utf_16_string(ptr noundef %0, ptr noundef %32, i32 noundef %26, i32 noundef range(i32 0, -1610612735) %31) br label %224 .preheader.i.i149: ; preds = %11, %.preheader.i.i149 - %.0.i.i150 = phi i32 [ %42, %.preheader.i.i149 ], [ 0, %11 ] + %.0.i.i150 = phi i32 [ %36, %.preheader.i.i149 ], [ 0, %11 ] %35 = add i32 %.0.i.i150, %2 %36 = tail call fastcc ptr @fast_ensure_contiguous(ptr noundef nonnull %1, i32 noundef %35, i32 noundef 2) %.val.i.i.i151 = load i8, ptr %36, align 1 %37 = getelementptr i8, ptr %36, i64 1 %.val2.i.i.i152 = load i8, ptr %37, align 1 - %38 = zext i8 %.val.i.i.i151 to i16 - %39 = shl nuw i16 %38, 8 - %40 = zext i8 %.val2.i.i.i152 to i16 - %41 = or disjoint i16 %39, %40 - %42 = add i32 %.0.i.i150, 2 - %.not8.i.i153 = icmp eq i16 %41, 0 - br i1 %.not8.i.i153, label %tvb_unicode_strsize.exit.i154, label %.preheader.i.i149, !llvm.loop !25 - -tvb_unicode_strsize.exit.i154: ; preds = %.preheader.i.i149 - %43 = and i32 %4, -1610612736 - %44 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %42) - %.not.i155 = icmp eq ptr %3, null - br i1 %.not.i155, label %tvb_get_ucs_2_stringz.exit, label %45 - -45: ; preds = %tvb_unicode_strsize.exit.i154 - store i32 %42, ptr %3, align 4 + %36 = add i32 %.0.i.i150, 2 + %37 = or i8 %.val2.i.i.i152, %.val.i.i.i151 + %38 = icmp eq i8 %37, 0 + br i1 %38, label %tvb_unicode_strsize.exit.i153, label %.preheader.i.i149, !llvm.loop !25 + +tvb_unicode_strsize.exit.i153:; preds = %.preheader.i.i149 + %39 = and i32 %4, -1610612736 + %40 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %36) + %.not.i154 = icmp eq ptr %3, null + br i1 %.not.i154, label %tvb_get_ucs_2_stringz.exit, label %41 + +41:; preds = %tvb_unicode_strsize.exit.i153 + store i32 %36, ptr %3, align 4 br label %tvb_get_ucs_2_stringz.exit -tvb_get_ucs_2_stringz.exit: ; preds = %tvb_unicode_strsize.exit.i154, %45 - %46 = tail call ptr @get_ucs_2_string(ptr noundef %0, ptr noundef %44, i32 noundef %42, i32 noundef range(i32 0, -1610612735) %43) +tvb_get_ucs_2_stringz.exit: ; preds = %tvb_unicode_strsize.exit.i153, %41 + %46 = tail call ptr @get_ucs_2_string(ptr noundef %0, ptr noundef %40, i32 noundef %36, i32 noundef range(i32 0, -1610612735) %39) br label %224 .preheader: ; preds = %11, %.preheader - %.0.i = phi i32 [ %66, %.preheader ], [ 0, %11 ] + %.0.i = phi i32 [ %52, %.preheader ], [ 0, %11 ] %47 = add i32 %.0.i, %2 %48 = tail call fastcc ptr @fast_ensure_contiguous(ptr noundef nonnull %1, i32 noundef %47, i32 noundef 4) + %45 = load i8, ptr %44, align 1 + %46 = getelementptr i8, ptr %44, i64 1 + %47 = load i8, ptr %46, align 1 + %48 = getelementptr i8, ptr %44, i64 2 %49 = load i8, ptr %48, align 1 - %50 = zext i8 %49 to i32 - %51 = shl nuw i32 %50, 24 - %52 = getelementptr i8, ptr %48, i64 1 - %53 = load i8, ptr %52, align 1 - %54 = zext i8 %53 to i32 - %55 = shl nuw nsw i32 %54, 16 - %56 = or disjoint i32 %55, %51 - %57 = getelementptr i8, ptr %48, i64 2 - %58 = load i8, ptr %57, align 1 - %59 = zext i8 %58 to i32 - %60 = shl nuw nsw i32 %59, 8 - %61 = or disjoint i32 %56, %60 - %62 = getelementptr i8, ptr %48, i64 3 - %63 = load i8, ptr %62, align 1 - %64 = zext i8 %63 to i32 - %65 = or disjoint i32 %61, %64 - %66 = add i32 %.0.i, 4 - %.not.i156 = icmp eq i32 %65, 0 - br i1 %.not.i156, label %67, label %.preheader, !llvm.loop !30 - -67: ; preds = %.preheader - %68 = and i32 %4, -1610612736 - %69 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %66) + %50 = getelementptr i8, ptr %44, i64 3 + %51 = load i8, ptr %50, align 1 + %52 = add i32 %.0.i, 4 + %53 = or i8 %47, %45 + %54 = or i8 %53, %49 + %55 = or i8 %54, %51 + %56 = icmp eq i8 %55, 0 + br i1 %56, label %57, label %.preheader, !llvm.loop !30 + +57:; preds = %.preheader + %58 = and i32 %4, -1610612736 + %59 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %52) %.not15.i = icmp eq ptr %3, null br i1 %.not15.i, label %tvb_get_ucs_4_stringz.exit, label %70 -70: ; preds = %67 - store i32 %66, ptr %3, align 4 +70: ; preds = %57 + store i32 %52, ptr %3, align 4 br label %tvb_get_ucs_4_stringz.exit -tvb_get_ucs_4_stringz.exit: ; preds = %67, %70 - %71 = tail call ptr @get_ucs_4_string(ptr noundef %0, ptr noundef %69, i32 noundef %66, i32 noundef range(i32 0, -1610612735) %68) +tvb_get_ucs_4_stringz.exit: ; preds = %57, %70 + %71 = tail call ptr @get_ucs_4_string(ptr noundef %0, ptr noundef %59, i32 noundef %52, i32 noundef range(i32 0, -1610612735) %58) br label %224 +62: ; preds = %11 + %63 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) + %64 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %63) + %.not.i155 = icmp eq ptr %3, null + br i1 %.not.i155, label %tvb_get_stringz_8859_1.exit, label %65 + +65: ; preds = %62 + store i32 %63, ptr %3, align 4 + br label %tvb_get_stringz_8859_1.exit + +tvb_get_stringz_8859_1.exit: ; preds = %62, %65 + %66 = tail call ptr @get_8859_1_string(ptr noundef %0, ptr noundef %64, i32 noundef %63) + br label %214 + +67: ; preds = %11 + %68 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) + %69 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %68) + %.not.i156 = icmp eq ptr %3, null + br i1 %.not.i156, label %tvb_get_stringz_unichar2.exit, label %70 + +70: ; preds = %67 + store i32 %68, ptr %3, align 4 + br label %tvb_get_stringz_unichar2.exit + +tvb_get_stringz_unichar2.exit: ; preds = %67, %70 + %71 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %69, i32 noundef %68, ptr noundef nonnull @charset_table_iso_8859_2) + br label %214 + 72: ; preds = %11 %73 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) %74 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %73) @@ -7067,7 +7079,7 @@ tvb_get_ucs_4_stringz.exit: ; preds = %67, %70 br label %tvb_get_stringz_8859_1.exit tvb_get_stringz_8859_1.exit: ; preds = %72, %75 - %76 = tail call ptr @get_8859_1_string(ptr noundef %0, ptr noundef %74, i32 noundef %73) + %76 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %74, i32 noundef %73, ptr noundef nonnull @charset_table_iso_8859_3) br label %224 77: ; preds = %11 @@ -7081,7 +7093,7 @@ tvb_get_stringz_8859_1.exit: ; preds = %72, %75 br label %tvb_get_stringz_unichar2.exit tvb_get_stringz_unichar2.exit: ; preds = %77, %80 - %81 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %79, i32 noundef %78, ptr noundef nonnull @charset_table_iso_8859_2) + %81 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %79, i32 noundef %78, ptr noundef nonnull @charset_table_iso_8859_4) br label %224 82: ; preds = %11 @@ -7095,7 +7107,7 @@ tvb_get_stringz_unichar2.exit: ; preds = %77, %80 br label %tvb_get_stringz_unichar2.exit160 tvb_get_stringz_unichar2.exit160: ; preds = %82, %85 - %86 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %84, i32 noundef %83, ptr noundef nonnull @charset_table_iso_8859_3) + %86 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %84, i32 noundef %83, ptr noundef nonnull @charset_table_iso_8859_5) br label %224 87: ; preds = %11 @@ -7109,7 +7121,7 @@ tvb_get_stringz_unichar2.exit160: ; preds = %82, %85 br label %tvb_get_stringz_unichar2.exit162 tvb_get_stringz_unichar2.exit162: ; preds = %87, %90 - %91 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %89, i32 noundef %88, ptr noundef nonnull @charset_table_iso_8859_4) + %91 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %89, i32 noundef %88, ptr noundef nonnull @charset_table_iso_8859_6) br label %224 92: ; preds = %11 @@ -7123,7 +7135,7 @@ tvb_get_stringz_unichar2.exit162: ; preds = %87, %90 br label %tvb_get_stringz_unichar2.exit164 tvb_get_stringz_unichar2.exit164: ; preds = %92, %95 - %96 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %94, i32 noundef %93, ptr noundef nonnull @charset_table_iso_8859_5) + %96 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %94, i32 noundef %93, ptr noundef nonnull @charset_table_iso_8859_7) br label %224 97: ; preds = %11 @@ -7137,7 +7149,7 @@ tvb_get_stringz_unichar2.exit164: ; preds = %92, %95 br label %tvb_get_stringz_unichar2.exit166 tvb_get_stringz_unichar2.exit166: ; preds = %97, %100 - %101 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %99, i32 noundef %98, ptr noundef nonnull @charset_table_iso_8859_6) + %101 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %99, i32 noundef %98, ptr noundef nonnull @charset_table_iso_8859_8) br label %224 102: ; preds = %11 @@ -7151,7 +7163,7 @@ tvb_get_stringz_unichar2.exit166: ; preds = %97, %100 br label %tvb_get_stringz_unichar2.exit168 tvb_get_stringz_unichar2.exit168: ; preds = %102, %105 - %106 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %104, i32 noundef %103, ptr noundef nonnull @charset_table_iso_8859_7) + %106 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %104, i32 noundef %103, ptr noundef nonnull @charset_table_iso_8859_9) br label %224 107: ; preds = %11 @@ -7165,7 +7177,7 @@ tvb_get_stringz_unichar2.exit168: ; preds = %102, %105 br label %tvb_get_stringz_unichar2.exit170 tvb_get_stringz_unichar2.exit170: ; preds = %107, %110 - %111 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %109, i32 noundef %108, ptr noundef nonnull @charset_table_iso_8859_8) + %111 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %109, i32 noundef %108, ptr noundef nonnull @charset_table_iso_8859_10) br label %224 112: ; preds = %11 @@ -7179,7 +7191,7 @@ tvb_get_stringz_unichar2.exit170: ; preds = %107, %110 br label %tvb_get_stringz_unichar2.exit172 tvb_get_stringz_unichar2.exit172: ; preds = %112, %115 - %116 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %114, i32 noundef %113, ptr noundef nonnull @charset_table_iso_8859_9) + %116 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %114, i32 noundef %113, ptr noundef nonnull @charset_table_iso_8859_11) br label %224 117: ; preds = %11 @@ -7193,7 +7205,7 @@ tvb_get_stringz_unichar2.exit172: ; preds = %112, %115 br label %tvb_get_stringz_unichar2.exit174 tvb_get_stringz_unichar2.exit174: ; preds = %117, %120 - %121 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %119, i32 noundef %118, ptr noundef nonnull @charset_table_iso_8859_10) + %121 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %119, i32 noundef %118, ptr noundef nonnull @charset_table_iso_8859_13) br label %224 122: ; preds = %11 @@ -7207,7 +7219,7 @@ tvb_get_stringz_unichar2.exit174: ; preds = %117, %120 br label %tvb_get_stringz_unichar2.exit176 tvb_get_stringz_unichar2.exit176: ; preds = %122, %125 - %126 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %124, i32 noundef %123, ptr noundef nonnull @charset_table_iso_8859_11) + %126 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %124, i32 noundef %123, ptr noundef nonnull @charset_table_iso_8859_14) br label %224 127: ; preds = %11 @@ -7221,7 +7233,7 @@ tvb_get_stringz_unichar2.exit176: ; preds = %122, %125 br label %tvb_get_stringz_unichar2.exit178 tvb_get_stringz_unichar2.exit178: ; preds = %127, %130 - %131 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %129, i32 noundef %128, ptr noundef nonnull @charset_table_iso_8859_13) + %131 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %129, i32 noundef %128, ptr noundef nonnull @charset_table_iso_8859_15) br label %224 132: ; preds = %11 @@ -7235,7 +7247,7 @@ tvb_get_stringz_unichar2.exit178: ; preds = %127, %130 br label %tvb_get_stringz_unichar2.exit180 tvb_get_stringz_unichar2.exit180: ; preds = %132, %135 - %136 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %134, i32 noundef %133, ptr noundef nonnull @charset_table_iso_8859_14) + %136 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %134, i32 noundef %133, ptr noundef nonnull @charset_table_iso_8859_16) br label %224 137: ; preds = %11 @@ -7249,7 +7261,7 @@ tvb_get_stringz_unichar2.exit180: ; preds = %132, %135 br label %tvb_get_stringz_unichar2.exit182 tvb_get_stringz_unichar2.exit182: ; preds = %137, %140 - %141 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %139, i32 noundef %138, ptr noundef nonnull @charset_table_iso_8859_15) + %141 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %139, i32 noundef %138, ptr noundef nonnull @charset_table_cp1250) br label %224 142: ; preds = %11 @@ -7263,7 +7275,7 @@ tvb_get_stringz_unichar2.exit182: ; preds = %137, %140 br label %tvb_get_stringz_unichar2.exit184 tvb_get_stringz_unichar2.exit184: ; preds = %142, %145 - %146 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %144, i32 noundef %143, ptr noundef nonnull @charset_table_iso_8859_16) + %146 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %144, i32 noundef %143, ptr noundef nonnull @charset_table_cp1251) br label %224 147: ; preds = %11 @@ -7277,7 +7289,7 @@ tvb_get_stringz_unichar2.exit184: ; preds = %142, %145 br label %tvb_get_stringz_unichar2.exit186 tvb_get_stringz_unichar2.exit186: ; preds = %147, %150 - %151 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %149, i32 noundef %148, ptr noundef nonnull @charset_table_cp1250) + %151 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %149, i32 noundef %148, ptr noundef nonnull @charset_table_cp1252) br label %224 152: ; preds = %11 @@ -7291,7 +7303,7 @@ tvb_get_stringz_unichar2.exit186: ; preds = %147, %150 br label %tvb_get_stringz_unichar2.exit188 tvb_get_stringz_unichar2.exit188: ; preds = %152, %155 - %156 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %154, i32 noundef %153, ptr noundef nonnull @charset_table_cp1251) + %156 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %154, i32 noundef %153, ptr noundef nonnull @charset_table_mac_roman) br label %224 157: ; preds = %11 @@ -7305,7 +7317,7 @@ tvb_get_stringz_unichar2.exit188: ; preds = %152, %155 br label %tvb_get_stringz_unichar2.exit190 tvb_get_stringz_unichar2.exit190: ; preds = %157, %160 - %161 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %159, i32 noundef %158, ptr noundef nonnull @charset_table_cp1252) + %161 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %159, i32 noundef %158, ptr noundef nonnull @charset_table_cp437) br label %224 162: ; preds = %11 @@ -7319,7 +7331,7 @@ tvb_get_stringz_unichar2.exit190: ; preds = %157, %160 br label %tvb_get_stringz_unichar2.exit192 tvb_get_stringz_unichar2.exit192: ; preds = %162, %165 - %166 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %164, i32 noundef %163, ptr noundef nonnull @charset_table_mac_roman) + %166 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %164, i32 noundef %163, ptr noundef nonnull @charset_table_cp855) br label %224 167: ; preds = %11 @@ -7333,7 +7345,7 @@ tvb_get_stringz_unichar2.exit192: ; preds = %162, %165 br label %tvb_get_stringz_unichar2.exit194 tvb_get_stringz_unichar2.exit194: ; preds = %167, %170 - %171 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %169, i32 noundef %168, ptr noundef nonnull @charset_table_cp437) + %171 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %169, i32 noundef %168, ptr noundef nonnull @charset_table_cp866) br label %224 172: ; preds = %11 @@ -7347,44 +7359,44 @@ tvb_get_stringz_unichar2.exit194: ; preds = %167, %170 br label %tvb_get_stringz_unichar2.exit196 tvb_get_stringz_unichar2.exit196: ; preds = %172, %175 - %176 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %174, i32 noundef %173, ptr noundef nonnull @charset_table_cp855) + %176 = tail call ptr @get_iso_646_string(ptr noundef %0, ptr noundef %174, i32 noundef %173, ptr noundef nonnull @charset_table_iso_646_basic) br label %224 -177: ; preds = %11 - %178 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) - %179 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %178) - %.not.i197 = icmp eq ptr %3, null - br i1 %.not.i197, label %tvb_get_stringz_unichar2.exit198, label %180 +177: ; preds = %11, %11, %11 + tail call void (ptr, ...) @proto_report_dissector_bug(ptr noundef nonnull @.str.19) #18 + unreachable -180: ; preds = %177 - store i32 %178, ptr %3, align 4 - br label %tvb_get_stringz_unichar2.exit198 +180: ; preds = %11 + tail call void (ptr, ...) @proto_report_dissector_bug(ptr noundef nonnull @.str.20) #18 + unreachable -tvb_get_stringz_unichar2.exit198: ; preds = %177, %180 - %181 = tail call ptr @get_unichar2_string(ptr noundef %0, ptr noundef %179, i32 noundef %178, ptr noundef nonnull @charset_table_cp866) - br label %224 +tvb_get_stringz_unichar2.exit198: ; preds = %11 + %181 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) + %181 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %180) + %.not.i198 = icmp eq ptr %3, null + br i1 %.not.i198, label %tvb_get_nonascii_unichar2_stringz.exit, label %182 -182: ; preds = %11 - %183 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) - %184 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %183) - %.not.i199 = icmp eq ptr %3, null - br i1 %.not.i199, label %tvb_get_iso_646_stringz.exit, label %185 +182: ; preds = %179 + store i32 %180, ptr %3, align 4 + br label %tvb_get_nonascii_unichar2_stringz.exit -185: ; preds = %182 - store i32 %183, ptr %3, align 4 - br label %tvb_get_iso_646_stringz.exit +185: ; preds = %179, %182 + %183 = tail call ptr @get_nonascii_unichar2_string(ptr noundef %0, ptr noundef %181, i32 noundef %180, ptr noundef nonnull @charset_table_ebcdic) + br label %214 -tvb_get_iso_646_stringz.exit: ; preds = %182, %185 - %186 = tail call ptr @get_iso_646_string(ptr noundef %0, ptr noundef %184, i32 noundef %183, ptr noundef nonnull @charset_table_iso_646_basic) - br label %224 +tvb_get_iso_646_stringz.exit: ; preds = %11 + %186 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) + %186 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %185) + %.not.i199 = icmp eq ptr %3, null + br i1 %.not.i199, label %tvb_get_nonascii_unichar2_stringz.exit200, label %187 -187: ; preds = %11, %11, %11 - tail call void (ptr, ...) @proto_report_dissector_bug(ptr noundef nonnull @.str.19) #18 - unreachable +187: ; preds = %184 + store i32 %185, ptr %3, align 4 + br label %188 -188: ; preds = %11 - tail call void (ptr, ...) @proto_report_dissector_bug(ptr noundef nonnull @.str.20) #18 - unreachable +188: ; preds = %184, %187 + %188 = tail call ptr @get_nonascii_unichar2_string(ptr noundef %0, ptr noundef %186, i32 noundef %185, ptr noundef nonnull @charset_table_ebcdic_cp037) + br label %214 189: ; preds = %11 %190 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) @@ -7397,7 +7409,7 @@ tvb_get_iso_646_stringz.exit: ; preds = %182, %185 br label %tvb_get_nonascii_unichar2_stringz.exit tvb_get_nonascii_unichar2_stringz.exit: ; preds = %189, %192 - %193 = tail call ptr @get_nonascii_unichar2_string(ptr noundef %0, ptr noundef %191, i32 noundef %190, ptr noundef nonnull @charset_table_ebcdic) + %193 = tail call ptr @get_nonascii_unichar2_string(ptr noundef %0, ptr noundef %191, i32 noundef %190, ptr noundef nonnull @charset_table_ebcdic_cp500) br label %224 194: ; preds = %11 @@ -7411,7 +7423,7 @@ tvb_get_nonascii_unichar2_stringz.exit: ; preds = %189, %192 br label %tvb_get_nonascii_unichar2_stringz.exit202 tvb_get_nonascii_unichar2_stringz.exit202: ; preds = %194, %197 - %198 = tail call ptr @get_nonascii_unichar2_string(ptr noundef %0, ptr noundef %196, i32 noundef %195, ptr noundef nonnull @charset_table_ebcdic_cp037) + %198 = tail call ptr @get_t61_string(ptr noundef %0, ptr noundef %196, i32 noundef %195) br label %224 199: ; preds = %11 @@ -7425,7 +7437,7 @@ tvb_get_nonascii_unichar2_stringz.exit202: ; preds = %194, %197 br label %tvb_get_nonascii_unichar2_stringz.exit204 tvb_get_nonascii_unichar2_stringz.exit204: ; preds = %199, %202 - %203 = tail call ptr @get_nonascii_unichar2_string(ptr noundef %0, ptr noundef %201, i32 noundef %200, ptr noundef nonnull @charset_table_ebcdic_cp500) + %203 = tail call ptr @get_gb18030_string(ptr noundef %0, ptr noundef %201, i32 noundef %200) br label %224 204: ; preds = %11 @@ -7439,53 +7451,25 @@ tvb_get_nonascii_unichar2_stringz.exit204: ; preds = %199, %202 br label %tvb_get_t61_stringz.exit tvb_get_t61_stringz.exit: ; preds = %204, %207 - %208 = tail call ptr @get_t61_string(ptr noundef %0, ptr noundef %206, i32 noundef %205) + %208 = tail call ptr @get_euc_kr_string(ptr noundef %0, ptr noundef %206, i32 noundef %205) br label %224 209: ; preds = %11 %210 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) %211 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %210) %.not.i206 = icmp eq ptr %3, null - br i1 %.not.i206, label %tvb_get_gb18030_stringz.exit, label %212 + br i1 %.not.i206, label %tvb_get_dect_standard_8bits_stringz.exit, label %212 212: ; preds = %209 store i32 %210, ptr %3, align 4 - br label %tvb_get_gb18030_stringz.exit - -tvb_get_gb18030_stringz.exit: ; preds = %209, %212 - %213 = tail call ptr @get_gb18030_string(ptr noundef %0, ptr noundef %211, i32 noundef %210) - br label %224 - -214: ; preds = %11 - %215 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) - %216 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %215) - %.not.i207 = icmp eq ptr %3, null - br i1 %.not.i207, label %tvb_get_euc_kr_stringz.exit, label %217 - -217: ; preds = %214 - store i32 %215, ptr %3, align 4 - br label %tvb_get_euc_kr_stringz.exit - -tvb_get_euc_kr_stringz.exit: ; preds = %214, %217 - %218 = tail call ptr @get_euc_kr_string(ptr noundef %0, ptr noundef %216, i32 noundef %215) - br label %224 - -219: ; preds = %11 - %220 = tail call i32 @tvb_strsize(ptr noundef nonnull %1, i32 noundef %2) - %221 = tail call fastcc ptr @ensure_contiguous(ptr noundef nonnull %1, i32 noundef %2, i32 noundef %220) - %.not.i208 = icmp eq ptr %3, null - br i1 %.not.i208, label %tvb_get_dect_standard_8bits_stringz.exit, label %222 - -222: ; preds = %219 - store i32 %220, ptr %3, align 4 br label %tvb_get_dect_standard_8bits_stringz.exit -tvb_get_dect_standard_8bits_stringz.exit: ; preds = %219, %222 - %223 = tail call ptr @get_t61_string(ptr noundef %0, ptr noundef %221, i32 noundef %220) +tvb_get_dect_standard_8bits_stringz.exit: ; preds = %209, %212 + %223 = tail call ptr @get_t61_string(ptr noundef %0, ptr noundef %211, i32 noundef %210) br label %224 -224: ; preds = %tvb_get_dect_standard_8bits_stringz.exit, %tvb_get_euc_kr_stringz.exit, %tvb_get_gb18030_stringz.exit, %tvb_get_t61_stringz.exit, %tvb_get_nonascii_unichar2_stringz.exit204, %tvb_get_nonascii_unichar2_stringz.exit202, %tvb_get_nonascii_unichar2_stringz.exit, %tvb_get_iso_646_stringz.exit, %tvb_get_stringz_unichar2.exit198, %tvb_get_stringz_unichar2.exit196, %tvb_get_stringz_unichar2.exit194, %tvb_get_stringz_unichar2.exit192, %tvb_get_stringz_unichar2.exit190, %tvb_get_stringz_unichar2.exit188, %tvb_get_stringz_unichar2.exit186, %tvb_get_stringz_unichar2.exit184, %tvb_get_stringz_unichar2.exit182, %tvb_get_stringz_unichar2.exit180, %tvb_get_stringz_unichar2.exit178, %tvb_get_stringz_unichar2.exit176, %tvb_get_stringz_unichar2.exit174, %tvb_get_stringz_unichar2.exit172, %tvb_get_stringz_unichar2.exit170, %tvb_get_stringz_unichar2.exit168, %tvb_get_stringz_unichar2.exit166, %tvb_get_stringz_unichar2.exit164, %tvb_get_stringz_unichar2.exit162, %tvb_get_stringz_unichar2.exit160, %tvb_get_stringz_unichar2.exit, %tvb_get_stringz_8859_1.exit, %tvb_get_ucs_4_stringz.exit, %tvb_get_ucs_2_stringz.exit, %tvb_get_utf_16_stringz.exit, %tvb_get_utf_8_stringz.exit, %tvb_get_ascii_stringz.exit - %.0 = phi ptr [ %17, %tvb_get_ascii_stringz.exit ], [ %218, %tvb_get_euc_kr_stringz.exit ], [ %213, %tvb_get_gb18030_stringz.exit ], [ %208, %tvb_get_t61_stringz.exit ], [ %203, %tvb_get_nonascii_unichar2_stringz.exit204 ], [ %198, %tvb_get_nonascii_unichar2_stringz.exit202 ], [ %193, %tvb_get_nonascii_unichar2_stringz.exit ], [ %186, %tvb_get_iso_646_stringz.exit ], [ %181, %tvb_get_stringz_unichar2.exit198 ], [ %176, %tvb_get_stringz_unichar2.exit196 ], [ %171, %tvb_get_stringz_unichar2.exit194 ], [ %166, %tvb_get_stringz_unichar2.exit192 ], [ %161, %tvb_get_stringz_unichar2.exit190 ], [ %156, %tvb_get_stringz_unichar2.exit188 ], [ %151, %tvb_get_stringz_unichar2.exit186 ], [ %146, %tvb_get_stringz_unichar2.exit184 ], [ %141, %tvb_get_stringz_unichar2.exit182 ], [ %136, %tvb_get_stringz_unichar2.exit180 ], [ %131, %tvb_get_stringz_unichar2.exit178 ], [ %126, %tvb_get_stringz_unichar2.exit176 ], [ %121, %tvb_get_stringz_unichar2.exit174 ], [ %116, %tvb_get_stringz_unichar2.exit172 ], [ %111, %tvb_get_stringz_unichar2.exit170 ], [ %106, %tvb_get_stringz_unichar2.exit168 ], [ %101, %tvb_get_stringz_unichar2.exit166 ], [ %96, %tvb_get_stringz_unichar2.exit164 ], [ %91, %tvb_get_stringz_unichar2.exit162 ], [ %86, %tvb_get_stringz_unichar2.exit160 ], [ %81, %tvb_get_stringz_unichar2.exit ], [ %76, %tvb_get_stringz_8859_1.exit ], [ %71, %tvb_get_ucs_4_stringz.exit ], [ %46, %tvb_get_ucs_2_stringz.exit ], [ %34, %tvb_get_utf_16_stringz.exit ], [ %22, %tvb_get_utf_8_stringz.exit ], [ %223, %tvb_get_dect_standard_8bits_stringz.exit ] +224: ; preds = %tvb_get_dect_standard_8bits_stringz.exit, %tvb_get_euc_kr_stringz.exit, %tvb_get_gb18030_stringz.exit, %tvb_get_t61_stringz.exit, %tvb_get_nonascii_unichar2_stringz.exit202, %tvb_get_nonascii_unichar2_stringz.exit200, %tvb_get_nonascii_unichar2_stringz.exit, %tvb_get_iso_646_stringz.exit, %tvb_get_stringz_unichar2.exit196, %tvb_get_stringz_unichar2.exit194, %tvb_get_stringz_unichar2.exit192, %tvb_get_stringz_unichar2.exit190, %tvb_get_stringz_unichar2.exit188, %tvb_get_stringz_unichar2.exit186, %tvb_get_stringz_unichar2.exit184, %tvb_get_stringz_unichar2.exit182, %tvb_get_stringz_unichar2.exit180, %tvb_get_stringz_unichar2.exit178, %tvb_get_stringz_unichar2.exit176, %tvb_get_stringz_unichar2.exit174, %tvb_get_stringz_unichar2.exit172, %tvb_get_stringz_unichar2.exit170, %tvb_get_stringz_unichar2.exit168, %tvb_get_stringz_unichar2.exit166, %tvb_get_stringz_unichar2.exit164, %tvb_get_stringz_unichar2.exit162, %tvb_get_stringz_unichar2.exit160, %tvb_get_stringz_unichar2.exit158, %tvb_get_stringz_unichar2.exit, %tvb_get_stringz_8859_1.exit, %tvb_get_ucs_4_stringz.exit, %tvb_get_ucs_2_stringz.exit, %tvb_get_utf_16_stringz.exit, %tvb_get_utf_8_stringz.exit, %tvb_get_ascii_stringz.exit + %.0 = phi ptr [ %17, %tvb_get_ascii_stringz.exit ], [ %208, %tvb_get_euc_kr_stringz.exit ], [ %203, %tvb_get_gb18030_stringz.exit ], [ %198, %tvb_get_t61_stringz.exit ], [ %193, %tvb_get_nonascii_unichar2_stringz.exit202 ], [ %188, %tvb_get_nonascii_unichar2_stringz.exit200 ], [ %183, %tvb_get_nonascii_unichar2_stringz.exit ], [ %176, %tvb_get_iso_646_stringz.exit ], [ %171, %tvb_get_stringz_unichar2.exit196 ], [ %166, %tvb_get_stringz_unichar2.exit194 ], [ %161, %tvb_get_stringz_unichar2.exit192 ], [ %156, %tvb_get_stringz_unichar2.exit190 ], [ %151, %tvb_get_stringz_unichar2.exit188 ], [ %146, %tvb_get_stringz_unichar2.exit186 ], [ %141, %tvb_get_stringz_unichar2.exit184 ], [ %136, %tvb_get_stringz_unichar2.exit182 ], [ %131, %tvb_get_stringz_unichar2.exit180 ], [ %126, %tvb_get_stringz_unichar2.exit178 ], [ %121, %tvb_get_stringz_unichar2.exit176 ], [ %116, %tvb_get_stringz_unichar2.exit174 ], [ %111, %tvb_get_stringz_unichar2.exit172 ], [ %106, %tvb_get_stringz_unichar2.exit170 ], [ %101, %tvb_get_stringz_unichar2.exit168 ], [ %96, %tvb_get_stringz_unichar2.exit166 ], [ %91, %tvb_get_stringz_unichar2.exit164 ], [ %86, %tvb_get_stringz_unichar2.exit162 ], [ %81, %tvb_get_stringz_unichar2.exit160 ], [ %76, %tvb_get_stringz_unichar2.exit158 ], [ %71, %tvb_get_stringz_unichar2.exit ], [ %66, %tvb_get_stringz_8859_1.exit ], [ %71, %tvb_get_ucs_4_stringz.exit ], [ %46, %tvb_get_ucs_2_stringz.exit ], [ %34, %tvb_get_utf_16_stringz.exit ], [ %22, %tvb_get_utf_8_stringz.exit ], [ %223, %tvb_get_dect_standard_8bits_stringz.exit ] ret ptr %.0 } diff --git a/bench/wolfssl/optimized/tls.ll b/bench/wolfssl/optimized/tls.ll index adad3c98f4c..bb5797f1093 100644 --- a/bench/wolfssl/optimized/tls.ll +++ b/bench/wolfssl/optimized/tls.ll @@ -2043,12 +2043,9 @@ define range(i32 -396, 2) i32 @TLSX_SNI_GetFromBuffer(ptr noundef readonly captu %.val119 = load i8, ptr %22, align 1, !tbaa !51 %23 = getelementptr i8, ptr %0, i64 8 %.val120 = load i8, ptr %23, align 1, !tbaa !51 - %24 = zext i8 %.val119 to i16 - %25 = shl nuw i16 %24, 8 - %26 = zext i8 %.val120 to i16 - %27 = or disjoint i16 %25, %26 - %.not117 = icmp eq i16 %27, 0 - %. = select i1 %.not117, i32 -396, i32 -328 + %24 = or i8 %.val120, %.val119 + %25 = icmp eq i8 %24, 0 + %. = select i1 %25, i32 -396, i32 -328 br label %.thread165 28: ; preds = %7 @@ -2061,111 +2058,111 @@ define range(i32 -396, 2) i32 @TLSX_SNI_GetFromBuffer(ptr noundef readonly captu %32 = getelementptr inbounds nuw i8, ptr %0, i64 2 %33 = load i8, ptr %32, align 1, !tbaa !51 %34 = icmp eq i8 %33, 0 - br i1 %34, label %.thread165, label %35 - -35: ; preds = %31 - %36 = getelementptr inbounds nuw i8, ptr %0, i64 3 + br i1 %34, label %.thread165, label %33 + +33: ; preds = %29 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 3 + %.val121 = load i8, ptr %34, align 1, !tbaa !51 + %35 = getelementptr i8, ptr %0, i64 4 + %.val122 = load i8, ptr %35, align 1, !tbaa !51 + %36 = zext i8 %.val121 to i32 + %37 = shl nuw nsw i32 %36, 8 + %38 = zext i8 %.val122 to i32 + %39 = or disjoint i32 %37, %38 + %40 = add nuw nsw i32 %39, 5 + %41 = icmp ugt i32 %40, %1 + br i1 %41, label %.thread165, label %42 + +42: ; preds = %33 + %43 = getelementptr inbounds nuw i8, ptr %0, i64 5 + %44 = load i8, ptr %43, align 1, !tbaa !51 + %.not111 = icmp eq i8 %44, 1 + br i1 %.not111, label %45, label %.thread165 + +35: ; preds = %42 + %36 = getelementptr inbounds nuw i8, ptr %0, i64 6 %.val121 = load i8, ptr %36, align 1, !tbaa !51 - %37 = getelementptr i8, ptr %0, i64 4 - %.val122 = load i8, ptr %37, align 1, !tbaa !51 - %38 = zext i8 %.val121 to i32 - %39 = shl nuw nsw i32 %38, 8 - %40 = zext i8 %.val122 to i32 - %41 = or disjoint i32 %39, %40 - %42 = add nuw nsw i32 %41, 5 - %43 = icmp ugt i32 %42, %1 - br i1 %43, label %.thread165, label %44 - -44: ; preds = %35 - %45 = getelementptr inbounds nuw i8, ptr %0, i64 5 - %46 = load i8, ptr %45, align 1, !tbaa !51 - %.not111 = icmp eq i8 %46, 1 - br i1 %.not111, label %47, label %.thread165 - -47: ; preds = %44 - %48 = getelementptr inbounds nuw i8, ptr %0, i64 6 - %49 = load i8, ptr %48, align 1, !tbaa !51 - %50 = zext i8 %49 to i32 - %51 = shl nuw nsw i32 %50, 16 - %52 = getelementptr inbounds nuw i8, ptr %0, i64 7 - %53 = load i8, ptr %52, align 1, !tbaa !51 - %54 = zext i8 %53 to i32 - %55 = shl nuw nsw i32 %54, 8 - %56 = or disjoint i32 %55, %51 - %57 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %58 = load i8, ptr %57, align 1, !tbaa !51 - %59 = zext i8 %58 to i32 - %60 = or disjoint i32 %56, %59 - %61 = add nuw nsw i32 %60, 9 - %62 = icmp ugt i32 %61, %1 - br i1 %62, label %.thread165, label %63 - -63: ; preds = %47 - %64 = getelementptr inbounds nuw i8, ptr %0, i64 43 - %65 = load i8, ptr %64, align 1, !tbaa !51 - %66 = zext i8 %65 to i32 - %67 = add nuw nsw i32 %66, 43 - %68 = icmp ult i32 %1, %67 - br i1 %68, label %.thread165, label %69 - -69: ; preds = %63 - %70 = add nuw nsw i32 %66, 46 - %71 = icmp ult i32 %1, %70 - br i1 %71, label %.thread165, label %72 + %48 = zext i8 %47 to i32 + %49 = shl nuw nsw i32 %48, 16 + %50 = getelementptr inbounds nuw i8, ptr %0, i64 7 + %51 = load i8, ptr %50, align 1, !tbaa !51 + %40 = zext i8 %51 to i32 + %53 = shl nuw nsw i32 %52, 8 + %54 = or disjoint i32 %53, %49 + %55 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %56 = load i8, ptr %55, align 1, !tbaa !51 + %57 = zext i8 %56 to i32 + %58 = or disjoint i32 %54, %57 + %59 = add nuw nsw i32 %58, 9 + %60 = icmp ugt i32 %59, %1 + br i1 %60, label %.thread165, label %61 + +61: ; preds = %45 + %62 = getelementptr inbounds nuw i8, ptr %0, i64 43 + %63 = load i8, ptr %62, align 1, !tbaa !51 + %64 = zext i8 %63 to i32 + %65 = add nuw nsw i32 %64, 43 + %66 = icmp ult i32 %1, %65 + br i1 %66, label %.thread165, label %67 + +67:; preds = %61 + %68 = add nuw nsw i32 %64, 46 + %69 = icmp ult i32 %1, %68 + br i1 %69, label %.thread165, label %70 + +69: ; preds = %67 + %71 = zext i8 %63 to i64 + %72 = getelementptr inbounds nuw i8, ptr %0, i64 %71 + %73 = getelementptr inbounds nuw i8, ptr %72, i64 44 + %.val123 = load i8, ptr %73, align 1, !tbaa !51 + %74 = getelementptr i8, ptr %72, i64 45 + %.val124 = load i8, ptr %74, align 1, !tbaa !51 + %75 = zext i8 %.val123 to i32 + %76 = shl nuw nsw i32 %75, 8 + %77 = zext i8 %.val124 to i32 + %78 = or disjoint i32 %76, %77 + %79 = add nuw nsw i32 %78, %68 + %.not112 = icmp ugt i32 %1, %79 + br i1 %.not112, label %80, label %.thread165 + +80: ; preds = %70 + %81 = zext nneg i32 %79 to i64 + %82 = getelementptr inbounds nuw i8, ptr %0, i64 %81 + %83 = load i8, ptr %82, align 1, !tbaa !51 + %84 = zext i8 %83 to i32 + %85 = add nuw nsw i32 %79, %84 + %86 = icmp ult i32 %1, %85 + br i1 %86, label %.thread165, label %87 + +87: ; preds = %80 + %88 = add nuw nsw i32 %79, 1 + %89 = add nuw nsw i32 %88, %84 + %90 = add nuw nsw i32 %89, 2 + %91 = icmp ult i32 %1, %90 + br i1 %91, label %.thread165, label %92 + +92: ; preds = %87 + %93 = zext nneg i32 %89 to i64 + %94 = getelementptr inbounds nuw i8, ptr %0, i64 %93 + %.val125 = load i8, ptr %94, align 1, !tbaa !51 + %95 = getelementptr i8, ptr %94, i64 1 + %.val126 = load i8, ptr %95, align 1, !tbaa !51 + %96 = zext i8 %.val125 to i16 + %97 = shl nuw i16 %96, 8 + %98 = zext i8 %.val126 to i16 + %99 = or disjoint i16 %97, %98 + %100 = zext i16 %99 to i32 + %101 = add nuw nsw i32 %90, %100 + %102 = icmp ult i32 %1, %101 + br i1 %102, label %.thread165, label %.preheader170 -72: ; preds = %69 - %73 = zext i8 %65 to i64 - %74 = getelementptr inbounds nuw i8, ptr %0, i64 %73 - %75 = getelementptr inbounds nuw i8, ptr %74, i64 44 - %.val123 = load i8, ptr %75, align 1, !tbaa !51 - %76 = getelementptr i8, ptr %74, i64 45 - %.val124 = load i8, ptr %76, align 1, !tbaa !51 - %77 = zext i8 %.val123 to i32 - %78 = shl nuw nsw i32 %77, 8 - %79 = zext i8 %.val124 to i32 - %80 = or disjoint i32 %78, %79 - %81 = add nuw nsw i32 %80, %70 - %.not112 = icmp ugt i32 %1, %81 - br i1 %.not112, label %82, label %.thread165 - -82: ; preds = %72 - %83 = zext nneg i32 %81 to i64 - %84 = getelementptr inbounds nuw i8, ptr %0, i64 %83 - %85 = load i8, ptr %84, align 1, !tbaa !51 - %86 = zext i8 %85 to i32 - %87 = add nuw nsw i32 %81, %86 - %88 = icmp ult i32 %1, %87 - br i1 %88, label %.thread165, label %89 - -89: ; preds = %82 - %90 = add nuw nsw i32 %81, 1 - %91 = add nuw nsw i32 %90, %86 - %92 = add nuw nsw i32 %91, 2 - %93 = icmp ult i32 %1, %92 - br i1 %93, label %.thread165, label %94 - -94: ; preds = %89 - %95 = zext nneg i32 %91 to i64 - %96 = getelementptr inbounds nuw i8, ptr %0, i64 %95 - %.val125 = load i8, ptr %96, align 1, !tbaa !51 - %97 = getelementptr i8, ptr %96, i64 1 - %.val126 = load i8, ptr %97, align 1, !tbaa !51 - %98 = zext i8 %.val125 to i16 - %99 = shl nuw i16 %98, 8 - %100 = zext i8 %.val126 to i16 - %101 = or disjoint i16 %99, %100 - %102 = zext i16 %101 to i32 - %103 = add nuw nsw i32 %92, %102 - %104 = icmp ult i32 %1, %103 - br i1 %104, label %.thread165, label %.preheader170 - -.preheader170: ; preds = %94 - %105 = icmp ugt i16 %101, 3 - br i1 %105, label %.lr.ph184, label %._crit_edge +72: ; preds = %92 + %103 = icmp ugt i16 %99, 3 + br i1 %103, label %.lr.ph184, label %._crit_edge .lr.ph184: ; preds = %.preheader170, %.loopexit - %.097183 = phi i32 [ %.299, %.loopexit ], [ %92, %.preheader170 ] - %.0153182 = phi i16 [ %170, %.loopexit ], [ %101, %.preheader170 ] + %.097183 = phi i32 [ %.299, %.loopexit ], [ %90, %.preheader170 ] + %.0153182 = phi i16 [ %170, %.loopexit ], [ %99, %.preheader170 ] %106 = add i32 %.097183, 2 %107 = zext i32 %106 to i64 %108 = getelementptr inbounds nuw i8, ptr %0, i64 %107 @@ -2185,72 +2182,69 @@ define range(i32 -396, 2) i32 @TLSX_SNI_GetFromBuffer(ptr noundef readonly captu %118 = zext i32 %.097183 to i64 %119 = getelementptr inbounds nuw i8, ptr %0, i64 %118 %.val127 = load i8, ptr %119, align 1, !tbaa !51 - %120 = zext i8 %.val127 to i16 - %121 = shl nuw i16 %120, 8 - %122 = getelementptr i8, ptr %119, i64 1 - %.val128 = load i8, ptr %122, align 1, !tbaa !51 - %123 = zext i8 %.val128 to i16 - %124 = or disjoint i16 %121, %123 - %.not114 = icmp eq i16 %124, 0 - br i1 %.not114, label %125, label %.loopexit - -125: ; preds = %117 - %126 = zext i32 %114 to i64 - %127 = getelementptr inbounds nuw i8, ptr %0, i64 %126 - %.val131 = load i8, ptr %127, align 1, !tbaa !51 - %128 = getelementptr i8, ptr %127, i64 1 - %.val132 = load i8, ptr %128, align 1, !tbaa !51 - %129 = zext i8 %.val131 to i16 - %130 = shl nuw i16 %129, 8 - %131 = zext i8 %.val132 to i16 - %132 = or disjoint i16 %130, %131 - %133 = add i32 %.097183, 6 - %134 = zext i16 %132 to i32 - %135 = add i32 %133, %134 - %136 = icmp ult i32 %1, %135 - br i1 %136, label %.thread165, label %.preheader - -.preheader: ; preds = %125 - %137 = icmp ugt i16 %132, 3 - br i1 %137, label %.lr.ph, label %.loopexit - -.lr.ph: ; preds = %.preheader, %159 - %.4101181 = phi i32 [ %147, %159 ], [ %133, %.preheader ] - %.0151180 = phi i16 [ %164, %159 ], [ %132, %.preheader ] - %138 = add i32 %.4101181, 1 - %139 = zext i32 %138 to i64 - %140 = getelementptr inbounds nuw i8, ptr %0, i64 %139 - %.val133 = load i8, ptr %140, align 1, !tbaa !51 - %141 = getelementptr i8, ptr %140, i64 1 - %.val134 = load i8, ptr %141, align 1, !tbaa !51 - %142 = zext i8 %.val133 to i32 - %143 = shl nuw nsw i32 %142, 8 - %144 = zext i8 %.val134 to i32 - %145 = or disjoint i32 %143, %144 - %146 = add i32 %.4101181, 3 - %147 = add i32 %145, %146 - %148 = icmp ult i32 %1, %147 - br i1 %148, label %.thread165, label %149 - -149: ; preds = %.lr.ph - %150 = zext i32 %.4101181 to i64 - %151 = getelementptr inbounds nuw i8, ptr %0, i64 %150 - %152 = load i8, ptr %151, align 1, !tbaa !51 - %.not115 = icmp eq i8 %152, %2 - br i1 %.not115, label %153, label %159 - -153: ; preds = %149 - %154 = load i32, ptr %4, align 4, !tbaa !3 - %155 = tail call range(i32 0, 65540) i32 @llvm.umin.i32(i32 range(i32 0, 65540) %145, i32 %154) - store i32 %155, ptr %4, align 4, !tbaa !3 - %156 = zext i32 %146 to i64 - %157 = getelementptr inbounds nuw i8, ptr %0, i64 %156 - %158 = zext nneg i32 %155 to i64 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr nonnull align 1 %157, i64 %158, i1 false) + %118 = getelementptr i8, ptr %117, i64 1 + %.val128 = load i8, ptr %118, align 1, !tbaa !51 + %119 = or i8 %.val128, %.val127 + %120 = icmp eq i8 %119, 0 + br i1 %120, label %121, label %.loopexit + +121:; preds = %115 + %122 = zext i32 %112 to i64 + %123 = getelementptr inbounds nuw i8, ptr %0, i64 %122 + %.val131 = load i8, ptr %123, align 1, !tbaa !51 + %124 = getelementptr i8, ptr %123, i64 1 + %.val132 = load i8, ptr %124, align 1, !tbaa !51 + %125 = zext i8 %.val131 to i16 + %126 = shl nuw i16 %125, 8 + %127 = zext i8 %.val132 to i16 + %128 = or disjoint i16 %126, %127 + %129 = add i32 %.097183, 6 + %131 = zext i16 %128 to i32 + %131 = add i32 %129, %131 + %132 = icmp ult i32 %1, %131 + br i1 %132, label %.thread165, label %.preheader + +.preheader:; preds = %121 + %133 = icmp ugt i16 %128, 3 + br i1 %133, label %.lr.ph, label %.loopexit + +.lr.ph:; preds = %.preheader, %155 + %.4101181 = phi i32 [ %143, %155 ], [ %131, %.preheader ] + %.0151180 = phi i16 [ %160, %155 ], [ %128, %.preheader ] + %134 = add i32 %.4101181, 1 + %135 = zext i32 %134 to i64 + %136 = getelementptr inbounds nuw i8, ptr %0, i64 %135 + %.val133 = load i8, ptr %136, align 1, !tbaa !51 + %137 = getelementptr i8, ptr %136, i64 1 + %.val134 = load i8, ptr %137, align 1, !tbaa !51 + %138 = zext i8 %.val133 to i32 + %139 = shl nuw nsw i32 %138, 8 + %140 = zext i8 %.val134 to i32 + %141 = or disjoint i32 %139, %140 + %142 = add i32 %.4101181, 3 + %143 = add i32 %141, %142 + %144 = icmp ult i32 %1, %143 + br i1 %144, label %.thread165, label %135 + +145:; preds = %.lr.ph + %146 = zext i32 %.4101181 to i64 + %147 = getelementptr inbounds nuw i8, ptr %0, i64 %146 + %148 = load i8, ptr %147, align 1, !tbaa !51 + %.not115 = icmp eq i8 %148, %2 + br i1 %.not115, label %149, label %155 + +149:; preds = %145 + %150 = load i32, ptr %4, align 4, !tbaa !3 + %151 = tail call range(i32 0, 65540) i32 @llvm.umin.i32(i32 range(i32 0, 65540) %141, i32 %150) + store i32 %151, ptr %4, align 4, !tbaa !3 + %152 = zext i32 %142 to i64 + %153 = getelementptr inbounds nuw i8, ptr %0, i64 %152 + %154 = zext nneg i32 %151 to i64 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr nonnull align 1 %153, i64 %154, i1 false) br label %.thread165 -159: ; preds = %149 - %160 = add nuw nsw i32 %145, 3 +159: ; preds = %145 + %160 = add nuw nsw i32 %141, 3 %161 = zext i16 %.0151180 to i32 %162 = tail call range(i32 0, 65540) i32 @llvm.umin.i32(i32 range(i32 0, 65540) %160, i32 %161) %163 = trunc nuw i32 %162 to i16 @@ -2259,7 +2253,7 @@ define range(i32 -396, 2) i32 @TLSX_SNI_GetFromBuffer(ptr noundef readonly captu br i1 %165, label %.lr.ph, label %.loopexit .loopexit: ; preds = %159, %.preheader, %117 - %.299 = phi i32 [ %115, %117 ], [ %133, %.preheader ], [ %147, %159 ] + %.299 = phi i32 [ %115, %115 ], [ %131, %.preheader ], [ %143, %155 ] %166 = add nuw nsw i32 %113, 4 %167 = zext i16 %.0153182 to i32 %168 = tail call range(i32 0, 65540) i32 @llvm.umin.i32(i32 range(i32 0, 65540) %166, i32 %167) @@ -2269,13 +2263,13 @@ define range(i32 -396, 2) i32 @TLSX_SNI_GetFromBuffer(ptr noundef readonly captu br i1 %171, label %.lr.ph184, label %._crit_edge, !llvm.loop !109 ._crit_edge: ; preds = %.loopexit, %.preheader170 - %.0153.lcssa = phi i16 [ %101, %.preheader170 ], [ %170, %.loopexit ] + %.0153.lcssa = phi i16 [ %99, %.preheader170 ], [ %170, %.loopexit ] %.not113 = icmp eq i16 %.0153.lcssa, 0 %172 = select i1 %.not113, i32 0, i32 -328 br label %.thread165 -.thread165: ; preds = %125, %.lr.ph184, %.lr.ph, %153, %94, %89, %82, %72, %69, %63, %47, %44, %35, %31, %28, %9, %21, %13, %5, %._crit_edge - %.0 = phi i32 [ %172, %._crit_edge ], [ -310, %5 ], [ -328, %13 ], [ %., %21 ], [ -328, %9 ], [ -328, %28 ], [ -396, %31 ], [ -310, %35 ], [ -328, %44 ], [ -328, %47 ], [ -328, %63 ], [ -328, %69 ], [ -328, %72 ], [ -328, %82 ], [ 0, %89 ], [ -328, %94 ], [ 1, %153 ], [ -328, %.lr.ph ], [ -328, %.lr.ph184 ], [ -328, %125 ] +.thread165: ; preds = %121, %.lr.ph184, %.lr.ph, %149, %92, %87, %80, %69, %67, %61, %45, %42, %33, %31, %28, %9, %21, %13, %5, %._crit_edge + %.0 = phi i32 [ %172, %._crit_edge ], [ -310, %5 ], [ -328, %13 ], [ %., %21 ], [ -328, %9 ], [ -328, %26 ], [ -396, %29 ], [ -310, %33 ], [ -328, %42 ], [ -328, %45 ], [ -328, %61 ], [ -328, %67 ], [ -328, %70 ], [ -328, %80 ], [ 0, %87 ], [ -328, %92 ], [ 1, %149 ], [ -328, %.lr.ph ], [ -328, %.lr.ph184 ], [ -328, %121 ] ret i32 %.0 } diff --git a/bench/zed-rs/optimized/38cn6p2m6864jrrxog4mr8xwk.ll b/bench/zed-rs/optimized/38cn6p2m6864jrrxog4mr8xwk.ll index 7edc9462928..ef44ffd3809 100644 --- a/bench/zed-rs/optimized/38cn6p2m6864jrrxog4mr8xwk.ll +++ b/bench/zed-rs/optimized/38cn6p2m6864jrrxog4mr8xwk.ll @@ -2385,7 +2385,7 @@ define hidden void @_ZN10image_webp8extended20read_extended_header17ha6dcd9d79c0 %29 = add i64 %12, 4 %storemerge.i.i104 = select i1 %28, i64 %29, i64 %15 store i64 %storemerge.i.i104, ptr %11, align 8, !alias.scope !566, !noalias !567 - br i1 %28, label %31, label %41 + br i1 %28, label %31, label %39 30: ; preds = %2 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10), !noalias !539 @@ -2397,19 +2397,17 @@ define hidden void @_ZN10image_webp8extended20read_extended_header17ha6dcd9d79c0 31: ; preds = %22 %32 = getelementptr inbounds nuw i8, ptr %8, i64 1 %33 = load i16, ptr %32, align 1, !noalias !558 - %34 = zext i16 %33 to i32 - %35 = shl nuw nsw i32 %34, 8 - %36 = load i8, ptr %8, align 1, !noalias !558, !noundef !4 - %37 = zext i8 %36 to i32 - %38 = or disjoint i32 %35, %37 + %34 = load i8, ptr %8, align 1, !noalias !558, !noundef !4 call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %8), !noalias !558 %39 = and i8 %23, -63 %or.cond = icmp eq i8 %39, 0 - %40 = icmp eq i32 %38, 0 - %or.cond1 = and i1 %or.cond, %40 - br i1 %or.cond1, label %43, label %42 + %36 = zext i8 %34 to i16 + %37 = or i16 %33, %36 + %38 = icmp eq i16 %37, 0 + %or.cond1 = and i1 %or.cond, %38 + br i1 %or.cond1, label %41, label %42 -41: ; preds = %22 +39: ; preds = %22 call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %8), !noalias !558 store i8 0, ptr %0, align 8 %.sroa.469.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -2530,7 +2528,7 @@ define hidden void @_ZN10image_webp8extended20read_extended_header17ha6dcd9d79c0 store i8 8, ptr %0, align 8 br label %85 -85: ; preds = %84, %78, %77, %65, %42, %41, %30 +85: ; preds = %84, %78, %77, %65, %42, %39, %30 ret void } diff --git a/bench/zed-rs/optimized/7ud3epkhjcjfe38h6hlh4jrau.ll b/bench/zed-rs/optimized/7ud3epkhjcjfe38h6hlh4jrau.ll index 920f97c2daa..07810390ad8 100644 --- a/bench/zed-rs/optimized/7ud3epkhjcjfe38h6hlh4jrau.ll +++ b/bench/zed-rs/optimized/7ud3epkhjcjfe38h6hlh4jrau.ll @@ -2101,17 +2101,15 @@ define internal fastcc void @_ZN10image_webp8extended20read_extended_header17he4 37: ; preds = %"_ZN66_$LT$std..io..cursor..Cursor$LT$T$GT$$u20$as$u20$std..io..Read$GT$10read_exact17hc6a40b397d73c1d9E.exit.i103" %38 = getelementptr inbounds nuw i8, ptr %8, i64 1 %39 = load i16, ptr %38, align 1, !noalias !392 - %40 = zext i16 %39 to i32 - %41 = shl nuw nsw i32 %40, 8 - %42 = load i8, ptr %8, align 1, !noalias !392, !noundef !22 - %43 = zext i8 %42 to i32 - %44 = or disjoint i32 %41, %43 + %40 = load i8, ptr %8, align 1, !noalias !392, !noundef !22 call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %8), !noalias !392 %45 = and i8 %26, -63 %or.cond = icmp eq i8 %45, 0 - %46 = icmp eq i32 %44, 0 - %or.cond1 = and i1 %or.cond, %46 - br i1 %or.cond1, label %49, label %48 + %42 = zext i8 %40 to i16 + %43 = or i16 %39, %42 + %44 = icmp eq i16 %43, 0 + %or.cond1 = and i1 %or.cond, %44 + br i1 %or.cond1, label %47, label %46 47: ; preds = %"_ZN66_$LT$std..io..cursor..Cursor$LT$T$GT$$u20$as$u20$std..io..Read$GT$10read_exact17hc6a40b397d73c1d9E.exit.i103" call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %8), !noalias !392 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..27cc356112c 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/137875 export COMPTIME_MODE=0 # Please rebase manually