diff --git a/bench/abc/optimized/darCore.c.ll b/bench/abc/optimized/darCore.c.ll index 8a2160b12a1..7f13d2fb497 100644 --- a/bench/abc/optimized/darCore.c.ll +++ b/bench/abc/optimized/darCore.c.ll @@ -674,36 +674,29 @@ define i32 @Dar_ManCutCount(ptr nocapture noundef readonly %0, ptr noundef write %.val31 = load ptr, ptr %20, align 8 br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %29 - %.135 = phi i32 [ %.2, %29 ], [ %.039, %.lr.ph.preheader ] - %.12034 = phi i32 [ %.221, %29 ], [ %.01938, %.lr.ph.preheader ] - %.02333 = phi i32 [ %30, %29 ], [ 0, %.lr.ph.preheader ] - %.02532 = phi ptr [ %31, %29 ], [ %.val31, %.lr.ph.preheader ] +.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph + %.135 = phi i32 [ %.2, %.lr.ph ], [ %.039, %.lr.ph.preheader ] + %.12034 = phi i32 [ %.221, %.lr.ph ], [ %.01938, %.lr.ph.preheader ] + %.02333 = phi i32 [ %27, %.lr.ph ], [ 0, %.lr.ph.preheader ] + %.02532 = phi ptr [ %28, %.lr.ph ], [ %.val31, %.lr.ph.preheader ] %21 = getelementptr inbounds i8, ptr %.02532, i64 4 %22 = load i32, ptr %21, align 4 %23 = and i32 %22, 268435456 - %24 = icmp eq i32 %23, 0 - br i1 %24, label %29, label %25 - -25: ; preds = %.lr.ph - %26 = add nsw i32 %.12034, 1 - %.mask = and i32 %22, -536870912 - %27 = icmp eq i32 %.mask, -2147483648 - %28 = zext i1 %27 to i32 - %spec.select = add nsw i32 %.135, %28 - br label %29 - -29: ; preds = %25, %.lr.ph - %.221 = phi i32 [ %.12034, %.lr.ph ], [ %26, %25 ] - %.2 = phi i32 [ %.135, %.lr.ph ], [ %spec.select, %25 ] - %30 = add nuw nsw i32 %.02333, 1 - %31 = getelementptr inbounds i8, ptr %.02532, i64 24 - %exitcond.not = icmp eq i32 %30, %19 + %24 = icmp ne i32 %23, 0 + %25 = icmp slt i32 %22, -1610612736 + %26 = lshr exact i32 %23, 28 + %.221 = add i32 %26, %.12034 + %narrow = and i1 %25, %24 + %spec.select = zext i1 %narrow to i32 + %.2 = add nsw i32 %.135, %spec.select + %27 = add nuw nsw i32 %.02333, 1 + %28 = getelementptr inbounds i8, ptr %.02532, i64 24 + %exitcond.not = icmp eq i32 %27, %19 br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !8 -.loopexit: ; preds = %29, %17, %12, %8 - %.322 = phi i32 [ %.01938, %8 ], [ %.01938, %12 ], [ %.01938, %17 ], [ %.221, %29 ] - %.3 = phi i32 [ %.039, %8 ], [ %.039, %12 ], [ %.039, %17 ], [ %.2, %29 ] +.loopexit: ; preds = %.lr.ph, %17, %12, %8 + %.322 = phi i32 [ %.01938, %8 ], [ %.01938, %12 ], [ %.01938, %17 ], [ %.221, %.lr.ph ] + %.3 = phi i32 [ %.039, %8 ], [ %.039, %12 ], [ %.039, %17 ], [ %.2, %.lr.ph ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond45.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond45.not, label %.critedge, label %8, !llvm.loop !9 @@ -712,13 +705,13 @@ define i32 @Dar_ManCutCount(ptr nocapture noundef readonly %0, ptr noundef write %.019.lcssa = phi i32 [ 0, %2 ], [ %.322, %.loopexit ] %.0.lcssa = phi i32 [ 0, %2 ], [ %.3, %.loopexit ] %.not = icmp eq ptr %1, null - br i1 %.not, label %33, label %32 + br i1 %.not, label %30, label %29 -32: ; preds = %.critedge +29: ; preds = %.critedge store i32 %.0.lcssa, ptr %1, align 4 - br label %33 + br label %30 -33: ; preds = %32, %.critedge +30: ; preds = %29, %.critedge ret i32 %.019.lcssa } @@ -734,15 +727,15 @@ define ptr @Dar_ManComputeCuts(ptr noundef %0, i32 noundef %1, i32 noundef %2, i 10: ; preds = %4 %11 = load i64, ptr %6, align 8 - %.neg48 = mul i64 %11, -1000000 + %.neg49 = mul i64 %11, -1000000 %12 = getelementptr inbounds i8, ptr %6, i64 8 %13 = load i64, ptr %12, align 8 %.neg = sdiv i64 %13, -1000 - %.neg49 = add i64 %.neg, %.neg48 + %.neg50 = add i64 %.neg, %.neg49 br label %Abc_Clock.exit Abc_Clock.exit: ; preds = %4, %10 - %.0.i.neg = phi i64 [ %.neg49, %10 ], [ 1, %4 ] + %.0.i.neg = phi i64 [ %.neg50, %10 ], [ 1, %4 ] call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) %14 = call i32 @Aig_ManCleanup(ptr noundef %0) #11 %15 = getelementptr inbounds i8, ptr %7, i64 4 @@ -776,17 +769,17 @@ Abc_Clock.exit: ; preds = %4, %10 %31 = getelementptr inbounds i8, ptr %0, i64 16 %32 = load ptr, ptr %31, align 8 %33 = getelementptr i8, ptr %32, i64 4 - %.val3950 = load i32, ptr %33, align 4 - %34 = icmp sgt i32 %.val3950, 0 + %.val3951 = load i32, ptr %33, align 4 + %34 = icmp sgt i32 %.val3951, 0 br i1 %34, label %.lr.ph, label %.critedge.preheader .critedge.preheader: ; preds = %.lr.ph, %Abc_Clock.exit %35 = getelementptr inbounds i8, ptr %0, i64 32 %36 = load ptr, ptr %35, align 8 %37 = getelementptr i8, ptr %36, i64 4 - %.val52 = load i32, ptr %37, align 4 - %38 = icmp sgt i32 %.val52, 0 - br i1 %38, label %.lr.ph54, label %.critedge2 + %.val53 = load i32, ptr %37, align 4 + %38 = icmp sgt i32 %.val53, 0 + br i1 %38, label %.lr.ph55, label %.critedge2 .lr.ph: ; preds = %Abc_Clock.exit, %.lr.ph %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %Abc_Clock.exit ] @@ -804,17 +797,17 @@ Abc_Clock.exit: ; preds = %4, %10 %47 = icmp slt i64 %indvars.iv.next, %46 br i1 %47, label %.lr.ph, label %.critedge.preheader, !llvm.loop !10 -.lr.ph54: ; preds = %.critedge.preheader, %.critedge +.lr.ph55: ; preds = %.critedge.preheader, %.critedge %48 = phi ptr [ %60, %.critedge ], [ %36, %.critedge.preheader ] - %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.critedge ], [ 0, %.critedge.preheader ] + %indvars.iv60 = phi i64 [ %indvars.iv.next61, %.critedge ], [ 0, %.critedge.preheader ] %49 = getelementptr i8, ptr %48, i64 8 %.val40 = load ptr, ptr %49, align 8 - %50 = getelementptr inbounds ptr, ptr %.val40, i64 %indvars.iv59 + %50 = getelementptr inbounds ptr, ptr %.val40, i64 %indvars.iv60 %51 = load ptr, ptr %50, align 8 %52 = icmp eq ptr %51, null br i1 %52, label %.critedge, label %53 -53: ; preds = %.lr.ph54 +53: ; preds = %.lr.ph55 %54 = getelementptr i8, ptr %51, i64 24 %.val42 = load i64, ptr %54, align 8 %55 = trunc i64 %.val42 to i32 @@ -828,20 +821,20 @@ Abc_Clock.exit: ; preds = %4, %10 %.pre = load ptr, ptr %35, align 8 br label %.critedge -.critedge: ; preds = %58, %53, %.lr.ph54 - %60 = phi ptr [ %.pre, %58 ], [ %48, %53 ], [ %48, %.lr.ph54 ] - %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1 +.critedge: ; preds = %58, %53, %.lr.ph55 + %60 = phi ptr [ %.pre, %58 ], [ %48, %53 ], [ %48, %.lr.ph55 ] + %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %61 = getelementptr i8, ptr %60, i64 4 %.val = load i32, ptr %61, align 4 %62 = sext i32 %.val to i64 - %63 = icmp slt i64 %indvars.iv.next60, %62 - br i1 %63, label %.lr.ph54, label %.critedge2, !llvm.loop !11 + %63 = icmp slt i64 %indvars.iv.next61, %62 + br i1 %63, label %.lr.ph55, label %.critedge2, !llvm.loop !11 .critedge2: ; preds = %.critedge, %.critedge.preheader %.lcssa = phi ptr [ %36, %.critedge.preheader ], [ %60, %.critedge ] - %.val.lcssa = phi i32 [ %.val52, %.critedge.preheader ], [ %.val, %.critedge ] + %.val.lcssa = phi i32 [ %.val53, %.critedge.preheader ], [ %.val, %.critedge ] %.not = icmp eq i32 %3, 0 - br i1 %.not, label %111, label %64 + br i1 %.not, label %108, label %64 64: ; preds = %.critedge2 %65 = icmp sgt i32 %.val.lcssa, 0 @@ -882,36 +875,29 @@ Abc_Clock.exit: ; preds = %4, %10 %.val31.i = load ptr, ptr %79, align 8 br label %.lr.ph.i -.lr.ph.i: ; preds = %88, %.lr.ph.preheader.i - %.135.i = phi i32 [ %.2.i, %88 ], [ %.039.i, %.lr.ph.preheader.i ] - %.12034.i = phi i32 [ %.221.i, %88 ], [ %.01938.i, %.lr.ph.preheader.i ] - %.02333.i = phi i32 [ %89, %88 ], [ 0, %.lr.ph.preheader.i ] - %.02532.i = phi ptr [ %90, %88 ], [ %.val31.i, %.lr.ph.preheader.i ] +.lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.preheader.i + %.135.i = phi i32 [ %.2.i, %.lr.ph.i ], [ %.039.i, %.lr.ph.preheader.i ] + %.12034.i = phi i32 [ %.221.i, %.lr.ph.i ], [ %.01938.i, %.lr.ph.preheader.i ] + %.02333.i = phi i32 [ %86, %.lr.ph.i ], [ 0, %.lr.ph.preheader.i ] + %.02532.i = phi ptr [ %87, %.lr.ph.i ], [ %.val31.i, %.lr.ph.preheader.i ] %80 = getelementptr inbounds i8, ptr %.02532.i, i64 4 %81 = load i32, ptr %80, align 4 %82 = and i32 %81, 268435456 - %83 = icmp eq i32 %82, 0 - br i1 %83, label %88, label %84 - -84: ; preds = %.lr.ph.i - %85 = add nsw i32 %.12034.i, 1 - %.mask.i = and i32 %81, -536870912 - %86 = icmp eq i32 %.mask.i, -2147483648 - %87 = zext i1 %86 to i32 - %spec.select.i = add nsw i32 %.135.i, %87 - br label %88 - -88: ; preds = %84, %.lr.ph.i - %.221.i = phi i32 [ %.12034.i, %.lr.ph.i ], [ %85, %84 ] - %.2.i = phi i32 [ %.135.i, %.lr.ph.i ], [ %spec.select.i, %84 ] - %89 = add nuw nsw i32 %.02333.i, 1 - %90 = getelementptr inbounds i8, ptr %.02532.i, i64 24 - %exitcond.not.i = icmp eq i32 %89, %78 + %83 = icmp ne i32 %82, 0 + %84 = icmp slt i32 %81, -1610612736 + %85 = lshr exact i32 %82, 28 + %.221.i = add i32 %85, %.12034.i + %narrow.i46 = and i1 %84, %83 + %spec.select.i = zext i1 %narrow.i46 to i32 + %.2.i = add nsw i32 %.135.i, %spec.select.i + %86 = add nuw nsw i32 %.02333.i, 1 + %87 = getelementptr inbounds i8, ptr %.02532.i, i64 24 + %exitcond.not.i = icmp eq i32 %86, %78 br i1 %exitcond.not.i, label %.loopexit.i, label %.lr.ph.i, !llvm.loop !8 -.loopexit.i: ; preds = %88, %76, %71, %67 - %.322.i = phi i32 [ %.01938.i, %67 ], [ %.01938.i, %71 ], [ %.01938.i, %76 ], [ %.221.i, %88 ] - %.3.i = phi i32 [ %.039.i, %67 ], [ %.039.i, %71 ], [ %.039.i, %76 ], [ %.2.i, %88 ] +.loopexit.i: ; preds = %.lr.ph.i, %76, %71, %67 + %.322.i = phi i32 [ %.01938.i, %67 ], [ %.01938.i, %71 ], [ %.01938.i, %76 ], [ %.221.i, %.lr.ph.i ] + %.3.i = phi i32 [ %.039.i, %67 ], [ %.039.i, %71 ], [ %.039.i, %76 ], [ %.2.i, %.lr.ph.i ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond45.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond45.not.i, label %Dar_ManCutCount.exit, label %67, !llvm.loop !9 @@ -919,44 +905,44 @@ Abc_Clock.exit: ; preds = %4, %10 Dar_ManCutCount.exit: ; preds = %.loopexit.i, %64 %.019.lcssa.i = phi i32 [ 0, %64 ], [ %.322.i, %.loopexit.i ] %.0.lcssa.i = phi i32 [ 0, %64 ], [ %.3.i, %.loopexit.i ] - %91 = getelementptr i8, ptr %0, i64 156 - %.val45 = load i32, ptr %91, align 4 - %92 = sub nsw i32 %.val.lcssa, %.val45 - %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %92, i32 noundef %.019.lcssa.i, i32 noundef %.0.lcssa.i) - %94 = load ptr, ptr %25, align 8 - %95 = call i32 @Aig_MmFixedReadMemUsage(ptr noundef %94) #11 - %96 = sitofp i32 %95 to double - %97 = fmul double %96, 0x3EB0000000000000 - %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 24, i32 noundef 4, double noundef %97) + %88 = getelementptr i8, ptr %0, i64 156 + %.val45 = load i32, ptr %88, align 4 + %89 = sub nsw i32 %.val.lcssa, %.val45 + %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %89, i32 noundef %.019.lcssa.i, i32 noundef %.0.lcssa.i) + %91 = load ptr, ptr %25, align 8 + %92 = call i32 @Aig_MmFixedReadMemUsage(ptr noundef %91) #11 + %93 = sitofp i32 %92 to double + %94 = fmul double %93, 0x3EB0000000000000 + %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 24, i32 noundef 4, double noundef %94) call void (i32, ptr, ...) @Abc_Print(i32 poison, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) - %99 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %5) #11 - %100 = icmp slt i32 %99, 0 - br i1 %100, label %Abc_Clock.exit47, label %101 - -101: ; preds = %Dar_ManCutCount.exit - %102 = load i64, ptr %5, align 8 - %103 = mul nsw i64 %102, 1000000 - %104 = getelementptr inbounds i8, ptr %5, i64 8 - %105 = load i64, ptr %104, align 8 - %106 = sdiv i64 %105, 1000 - %107 = add nsw i64 %106, %103 - br label %Abc_Clock.exit47 - -Abc_Clock.exit47: ; preds = %Dar_ManCutCount.exit, %101 - %.0.i46 = phi i64 [ %107, %101 ], [ -1, %Dar_ManCutCount.exit ] + %96 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %5) #11 + %97 = icmp slt i32 %96, 0 + br i1 %97, label %Abc_Clock.exit48, label %98 + +98: ; preds = %Dar_ManCutCount.exit + %99 = load i64, ptr %5, align 8 + %100 = mul nsw i64 %99, 1000000 + %101 = getelementptr inbounds i8, ptr %5, i64 8 + %102 = load i64, ptr %101, align 8 + %103 = sdiv i64 %102, 1000 + %104 = add nsw i64 %103, %100 + br label %Abc_Clock.exit48 + +Abc_Clock.exit48: ; preds = %Dar_ManCutCount.exit, %98 + %.0.i47 = phi i64 [ %104, %98 ], [ -1, %Dar_ManCutCount.exit ] call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) - %108 = add i64 %.0.i46, %.0.i.neg - %109 = sitofp i64 %108 to double - %110 = fdiv double %109, 1.000000e+06 - call void (i32, ptr, ...) @Abc_Print(i32 poison, ptr noundef nonnull @.str.5, double noundef %110) - br label %111 - -111: ; preds = %Abc_Clock.exit47, %.critedge2 - %112 = load ptr, ptr %25, align 8 + %105 = add i64 %.0.i47, %.0.i.neg + %106 = sitofp i64 %105 to double + %107 = fdiv double %106, 1.000000e+06 + call void (i32, ptr, ...) @Abc_Print(i32 poison, ptr noundef nonnull @.str.5, double noundef %107) + br label %108 + +108: ; preds = %Abc_Clock.exit48, %.critedge2 + %109 = load ptr, ptr %25, align 8 store ptr null, ptr %25, align 8 call void @Dar_ManStop(ptr noundef %24) #11 - ret ptr %112 + ret ptr %109 } declare void @Aig_MmFixedRestart(ptr noundef) local_unnamed_addr #2 diff --git a/bench/abc/optimized/darLib.c.ll b/bench/abc/optimized/darLib.c.ll index 8770d2b1326..738f0e16504 100644 --- a/bench/abc/optimized/darLib.c.ll +++ b/bench/abc/optimized/darLib.c.ll @@ -2054,8 +2054,7 @@ Abc_Clock.exit: ; preds = %5, %12 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) %16 = getelementptr inbounds i8, ptr %2, i64 4 %17 = load i32, ptr %16, align 4 - %.mask = and i32 %17, -536870912 - %.not = icmp eq i32 %.mask, -2147483648 + %.not = icmp slt i32 %17, -1610612736 br i1 %.not, label %18, label %230 18: ; preds = %Abc_Clock.exit diff --git a/bench/abseil-cpp/optimized/bind_test.cc.ll b/bench/abseil-cpp/optimized/bind_test.cc.ll index ff791412b3f..b627cbba70f 100644 --- a/bench/abseil-cpp/optimized/bind_test.cc.ll +++ b/bench/abseil-cpp/optimized/bind_test.cc.ll @@ -1830,20 +1830,19 @@ if.end157: ; preds = %if.end147, %land.rh br i1 %cmp.i136, label %if.end227, label %if.then160 if.then160: ; preds = %if.end157 - %39 = and i8 %retval.sroa.0.0.copyload.i135, -64 - %cmp.i137 = icmp eq i8 %39, -128 + %cmp.i137 = icmp ult i8 %retval.sroa.0.0.copyload.i135, -64 br i1 %cmp.i137, label %if.end165, label %return if.end165: ; preds = %if.then160 - %40 = and i8 %retval.sroa.0.0.copyload.i135, 63 + %39 = and i8 %retval.sroa.0.0.copyload.i135, 63 %cmp168 = icmp eq ptr %pos.addr.0, %end br i1 %cmp168, label %return, label %if.end171 if.end171: ; preds = %if.end165 %incdec.ptr172 = getelementptr inbounds i8, ptr %pos.addr.0, i64 1 - %41 = load i8, ptr %pos.addr.0, align 1 - %cmp175 = icmp eq i8 %41, 104 - %cmp177 = icmp eq i8 %40, 0 + %40 = load i8, ptr %pos.addr.0, align 1 + %cmp175 = icmp eq i8 %40, 104 + %cmp177 = icmp eq i8 %39, 0 %or.cond1 = and i1 %cmp177, %cmp175 br i1 %or.cond1, label %if.then178, label %if.else187 @@ -1855,12 +1854,12 @@ if.then178: ; preds = %if.end171 if.end184: ; preds = %if.then178 %incdec.ptr185 = getelementptr inbounds i8, ptr %pos.addr.0, i64 2 - %42 = load i8, ptr %incdec.ptr172, align 1 + %41 = load i8, ptr %incdec.ptr172, align 1 br label %if.end204 if.else187: ; preds = %if.end171 - %cmp189 = icmp eq i8 %41, 108 - %cmp191 = icmp eq i8 %40, 2 + %cmp189 = icmp eq i8 %40, 108 + %cmp191 = icmp eq i8 %39, 2 %or.cond2 = and i1 %cmp191, %cmp189 %length_mod193 = getelementptr inbounds i8, ptr %conv, i64 13 br i1 %or.cond2, label %if.then192, label %if.else201 @@ -1872,17 +1871,17 @@ if.then192: ; preds = %if.else187 if.end198: ; preds = %if.then192 %incdec.ptr199 = getelementptr inbounds i8, ptr %pos.addr.0, i64 2 - %43 = load i8, ptr %incdec.ptr172, align 1 + %42 = load i8, ptr %incdec.ptr172, align 1 br label %if.end204 if.else201: ; preds = %if.else187 - store i8 %40, ptr %length_mod193, align 1 - %44 = icmp eq i8 %40, 2 + store i8 %39, ptr %length_mod193, align 1 + %43 = icmp eq i8 %39, 2 br label %if.end204 if.end204: ; preds = %if.end198, %if.else201, %if.end184 - %cmp218 = phi i1 [ false, %if.end184 ], [ false, %if.end198 ], [ %44, %if.else201 ] - %c.3 = phi i8 [ %42, %if.end184 ], [ %43, %if.end198 ], [ %41, %if.else201 ] + %cmp218 = phi i1 [ false, %if.end184 ], [ false, %if.end198 ], [ %43, %if.else201 ] + %c.3 = phi i8 [ %41, %if.end184 ], [ %42, %if.end198 ], [ %40, %if.else201 ] %pos.addr.4 = phi ptr [ %incdec.ptr185, %if.end184 ], [ %incdec.ptr199, %if.end198 ], [ %incdec.ptr172, %if.else201 ] %idxprom.i138 = zext i8 %c.3 to i64 %arrayidx.i139 = getelementptr inbounds [256 x %"class.absl::str_format_internal::ConvTag"], ptr @_ZN4absl19str_format_internal13ConvTagHolder5valueE, i64 0, i64 %idxprom.i138 @@ -1899,8 +1898,8 @@ if.end216: ; preds = %if.end204 if.then222: ; preds = %if.end216 %flags223 = getelementptr inbounds i8, ptr %conv, i64 12 - %45 = load i8, ptr %flags223, align 4 - %or1.i142 = or i8 %45, 32 + %44 = load i8, ptr %flags223, align 4 + %or1.i142 = or i8 %44, 32 store i8 %or1.i142, ptr %flags223, align 4 br label %if.end227 @@ -2164,20 +2163,19 @@ if.end104: ; preds = %if.end94, %land.rhs br i1 %cmp.i77, label %if.end174, label %if.then107 if.then107: ; preds = %if.end104 - %24 = and i8 %retval.sroa.0.0.copyload.i76, -64 - %cmp.i78 = icmp eq i8 %24, -128 + %cmp.i78 = icmp ult i8 %retval.sroa.0.0.copyload.i76, -64 br i1 %cmp.i78, label %if.end112, label %return if.end112: ; preds = %if.then107 - %25 = and i8 %retval.sroa.0.0.copyload.i76, 63 + %24 = and i8 %retval.sroa.0.0.copyload.i76, 63 %cmp115 = icmp eq ptr %pos.addr.0, %end br i1 %cmp115, label %return, label %if.end118 if.end118: ; preds = %if.end112 %incdec.ptr119 = getelementptr inbounds i8, ptr %pos.addr.0, i64 1 - %26 = load i8, ptr %pos.addr.0, align 1 - %cmp122 = icmp eq i8 %26, 104 - %cmp124 = icmp eq i8 %25, 0 + %25 = load i8, ptr %pos.addr.0, align 1 + %cmp122 = icmp eq i8 %25, 104 + %cmp124 = icmp eq i8 %24, 0 %or.cond1 = and i1 %cmp124, %cmp122 br i1 %or.cond1, label %if.then125, label %if.else134 @@ -2189,12 +2187,12 @@ if.then125: ; preds = %if.end118 if.end131: ; preds = %if.then125 %incdec.ptr132 = getelementptr inbounds i8, ptr %pos.addr.0, i64 2 - %27 = load i8, ptr %incdec.ptr119, align 1 + %26 = load i8, ptr %incdec.ptr119, align 1 br label %if.end151 if.else134: ; preds = %if.end118 - %cmp136 = icmp eq i8 %26, 108 - %cmp138 = icmp eq i8 %25, 2 + %cmp136 = icmp eq i8 %25, 108 + %cmp138 = icmp eq i8 %24, 2 %or.cond2 = and i1 %cmp138, %cmp136 %length_mod140 = getelementptr inbounds i8, ptr %conv, i64 13 br i1 %or.cond2, label %if.then139, label %if.else148 @@ -2206,17 +2204,17 @@ if.then139: ; preds = %if.else134 if.end145: ; preds = %if.then139 %incdec.ptr146 = getelementptr inbounds i8, ptr %pos.addr.0, i64 2 - %28 = load i8, ptr %incdec.ptr119, align 1 + %27 = load i8, ptr %incdec.ptr119, align 1 br label %if.end151 if.else148: ; preds = %if.else134 - store i8 %25, ptr %length_mod140, align 1 - %29 = icmp eq i8 %25, 2 + store i8 %24, ptr %length_mod140, align 1 + %28 = icmp eq i8 %24, 2 br label %if.end151 if.end151: ; preds = %if.end145, %if.else148, %if.end131 - %cmp165 = phi i1 [ false, %if.end131 ], [ false, %if.end145 ], [ %29, %if.else148 ] - %c.3 = phi i8 [ %27, %if.end131 ], [ %28, %if.end145 ], [ %26, %if.else148 ] + %cmp165 = phi i1 [ false, %if.end131 ], [ false, %if.end145 ], [ %28, %if.else148 ] + %c.3 = phi i8 [ %26, %if.end131 ], [ %27, %if.end145 ], [ %25, %if.else148 ] %pos.addr.4 = phi ptr [ %incdec.ptr132, %if.end131 ], [ %incdec.ptr146, %if.end145 ], [ %incdec.ptr119, %if.else148 ] %idxprom.i79 = zext i8 %c.3 to i64 %arrayidx.i80 = getelementptr inbounds [256 x %"class.absl::str_format_internal::ConvTag"], ptr @_ZN4absl19str_format_internal13ConvTagHolder5valueE, i64 0, i64 %idxprom.i79 @@ -2233,8 +2231,8 @@ if.end163: ; preds = %if.end151 if.then169: ; preds = %if.end163 %flags170 = getelementptr inbounds i8, ptr %conv, i64 12 - %30 = load i8, ptr %flags170, align 4 - %or1.i83 = or i8 %30, 32 + %29 = load i8, ptr %flags170, align 4 + %or1.i83 = or i8 %29, 32 store i8 %or1.i83, ptr %flags170, align 4 br label %if.end174 @@ -2243,8 +2241,8 @@ if.end174: ; preds = %if.end163, %if.then %tag95.sroa.0.0 = phi i8 [ %retval.sroa.0.0.copyload.i76, %if.end104 ], [ %retval.sroa.0.0.copyload.i81, %if.then169 ], [ %retval.sroa.0.0.copyload.i81, %if.end163 ] %conv176 = getelementptr inbounds i8, ptr %conv, i64 14 store i8 %tag95.sroa.0.0, ptr %conv176, align 2 - %31 = load i32, ptr %next_arg, align 4 - %inc177 = add nsw i32 %31, 1 + %30 = load i32, ptr %next_arg, align 4 + %inc177 = add nsw i32 %30, 1 store i32 %inc177, ptr %next_arg, align 4 store i32 %inc177, ptr %conv, align 4 br label %return diff --git a/bench/arrow/optimized/utf8.cc.ll b/bench/arrow/optimized/utf8.cc.ll index 5f3683c648b..deec7b3929b 100644 --- a/bench/arrow/optimized/utf8.cc.ll +++ b/bench/arrow/optimized/utf8.cc.ll @@ -1697,7 +1697,7 @@ if.else4.i: ; preds = %if.else.i if.else9.i: ; preds = %if.else4.i %shr11.mask.i = and i32 %conv.i, 248 %cmp12.i = icmp eq i32 %shr11.mask.i, 240 - br i1 %cmp12.i, label %if.end.i36, label %return + br i1 %cmp12.i, label %if.end.i35, label %return if.end.i19: ; preds = %if.else.i %incdec.ptr.i.i = getelementptr inbounds i8, ptr %0, i64 1 @@ -1707,8 +1707,7 @@ if.end.i19: ; preds = %if.else.i if.end.i.i: ; preds = %if.end.i19 %2 = load i8, ptr %incdec.ptr.i.i, align 1 - %.mask.i.i.i = and i8 %2, -64 - %cmp.i.i.i = icmp eq i8 %.mask.i.i.i, -128 + %cmp.i.i.i = icmp slt i8 %2, -64 br i1 %cmp.i.i.i, label %if.end4.i, label %return.sink.split if.end4.i: ; preds = %if.end.i.i @@ -1727,81 +1726,76 @@ if.end.i23: ; preds = %if.else4.i if.end.i.i27: ; preds = %if.end.i23 %4 = load i8, ptr %incdec.ptr.i.i25, align 1 - %.mask.i.i.i28 = and i8 %4, -64 - %cmp.i.i.i29 = icmp eq i8 %.mask.i.i.i28, -128 - br i1 %cmp.i.i.i29, label %if.end4.i31, label %return.sink.split + %cmp.i.i.i28 = icmp slt i8 %4, -64 + br i1 %cmp.i.i.i28, label %if.end4.i30, label %return.sink.split -if.end4.i31: ; preds = %if.end.i.i27 - %shl.i32 = shl nuw nsw i32 %conv.i, 12 - %and.i33 = and i32 %shl.i32, 61440 +if.end4.i30: ; preds = %if.end.i.i27 + %shl.i31 = shl nuw nsw i32 %conv.i, 12 + %and.i32 = and i32 %shl.i31, 61440 %conv6.i = zext i8 %4 to i32 %shl7.i = shl nuw nsw i32 %conv6.i, 6 %and8.i = and i32 %shl7.i, 4032 - %add.i34 = or disjoint i32 %and8.i, %and.i33 + %add.i33 = or disjoint i32 %and8.i, %and.i32 %incdec.ptr.i13.i = getelementptr inbounds i8, ptr %0, i64 2 store ptr %incdec.ptr.i13.i, ptr %it, align 8 %cmp.i14.i = icmp eq ptr %incdec.ptr.i13.i, %end br i1 %cmp.i14.i, label %return.sink.split, label %if.end.i15.i -if.end.i15.i: ; preds = %if.end4.i31 +if.end.i15.i: ; preds = %if.end4.i30 %5 = load i8, ptr %incdec.ptr.i13.i, align 1 - %.mask.i.i16.i = and i8 %5, -64 - %cmp.i.i17.i = icmp eq i8 %.mask.i.i16.i, -128 - br i1 %cmp.i.i17.i, label %if.end13.i, label %return.sink.split + %cmp.i.i16.i = icmp slt i8 %5, -64 + br i1 %cmp.i.i16.i, label %if.end13.i, label %return.sink.split if.end13.i: ; preds = %if.end.i15.i %6 = and i8 %5, 63 %and15.i = zext nneg i8 %6 to i32 - %add16.i = or disjoint i32 %add.i34, %and15.i + %add16.i = or disjoint i32 %add.i33, %and15.i br label %if.then10 -if.end.i36: ; preds = %if.else9.i - %incdec.ptr.i.i38 = getelementptr inbounds i8, ptr %0, i64 1 - store ptr %incdec.ptr.i.i38, ptr %it, align 8 - %cmp.i.i39 = icmp eq ptr %incdec.ptr.i.i38, %end - br i1 %cmp.i.i39, label %return.sink.split, label %if.end.i.i40 - -if.end.i.i40: ; preds = %if.end.i36 - %7 = load i8, ptr %incdec.ptr.i.i38, align 1 - %.mask.i.i.i41 = and i8 %7, -64 - %cmp.i.i.i42 = icmp eq i8 %.mask.i.i.i41, -128 - br i1 %cmp.i.i.i42, label %if.end4.i44, label %return.sink.split - -if.end4.i44: ; preds = %if.end.i.i40 - %shl.i45 = shl nuw nsw i32 %conv.i, 18 - %and.i46 = and i32 %shl.i45, 1835008 - %conv6.i47 = zext i8 %7 to i32 - %shl7.i48 = shl nuw nsw i32 %conv6.i47, 12 - %and8.i49 = and i32 %shl7.i48, 258048 - %add.i50 = or disjoint i32 %and8.i49, %and.i46 +if.end.i35: ; preds = %if.else9.i + %incdec.ptr.i.i37 = getelementptr inbounds i8, ptr %0, i64 1 + store ptr %incdec.ptr.i.i37, ptr %it, align 8 + %cmp.i.i38 = icmp eq ptr %incdec.ptr.i.i37, %end + br i1 %cmp.i.i38, label %return.sink.split, label %if.end.i.i39 + +if.end.i.i39: ; preds = %if.end.i35 + %7 = load i8, ptr %incdec.ptr.i.i37, align 1 + %cmp.i.i.i40 = icmp slt i8 %7, -64 + br i1 %cmp.i.i.i40, label %if.end4.i42, label %return.sink.split + +if.end4.i42: ; preds = %if.end.i.i39 + %shl.i43 = shl nuw nsw i32 %conv.i, 18 + %and.i44 = and i32 %shl.i43, 1835008 + %conv6.i45 = zext i8 %7 to i32 + %shl7.i46 = shl nuw nsw i32 %conv6.i45, 12 + %and8.i47 = and i32 %shl7.i46, 258048 + %add.i48 = or disjoint i32 %and8.i47, %and.i44 %incdec.ptr.i18.i = getelementptr inbounds i8, ptr %0, i64 2 store ptr %incdec.ptr.i18.i, ptr %it, align 8 %cmp.i19.i = icmp eq ptr %incdec.ptr.i18.i, %end br i1 %cmp.i19.i, label %return.sink.split, label %if.end.i20.i -if.end.i20.i: ; preds = %if.end4.i44 +if.end.i20.i: ; preds = %if.end4.i42 %8 = load i8, ptr %incdec.ptr.i18.i, align 1 - %.mask.i.i21.i = and i8 %8, -64 - %cmp.i.i22.i = icmp eq i8 %.mask.i.i21.i, -128 - br i1 %cmp.i.i22.i, label %if.end13.i51, label %return.sink.split + %cmp.i.i21.i = icmp slt i8 %8, -64 + br i1 %cmp.i.i21.i, label %if.end13.i49, label %return.sink.split -if.end13.i51: ; preds = %if.end.i20.i +if.end13.i49: ; preds = %if.end.i20.i %conv15.i = zext i8 %8 to i32 %shl16.i = shl nuw nsw i32 %conv15.i, 6 %and17.i = and i32 %shl16.i, 4032 - %add18.i = or disjoint i32 %add.i50, %and17.i - %incdec.ptr.i26.i = getelementptr inbounds i8, ptr %0, i64 3 - store ptr %incdec.ptr.i26.i, ptr %it, align 8 - %cmp.i27.i = icmp eq ptr %incdec.ptr.i26.i, %end - br i1 %cmp.i27.i, label %return.sink.split, label %if.end.i28.i - -if.end.i28.i: ; preds = %if.end13.i51 - %9 = load i8, ptr %incdec.ptr.i26.i, align 1 - %.mask.i.i29.i = and i8 %9, -64 - %cmp.i.i30.i = icmp eq i8 %.mask.i.i29.i, -128 - br i1 %cmp.i.i30.i, label %if.end23.i, label %return.sink.split - -if.end23.i: ; preds = %if.end.i28.i + %add18.i = or disjoint i32 %add.i48, %and17.i + %incdec.ptr.i25.i = getelementptr inbounds i8, ptr %0, i64 3 + store ptr %incdec.ptr.i25.i, ptr %it, align 8 + %cmp.i26.i = icmp eq ptr %incdec.ptr.i25.i, %end + br i1 %cmp.i26.i, label %return.sink.split, label %if.end.i27.i + +if.end.i27.i: ; preds = %if.end13.i49 + %9 = load i8, ptr %incdec.ptr.i25.i, align 1 + %cmp.i.i28.i = icmp slt i8 %9, -64 + br i1 %cmp.i.i28.i, label %if.end23.i, label %return.sink.split + +if.end23.i: ; preds = %if.end.i27.i %10 = and i8 %9, 63 %and25.i = zext nneg i8 %10 to i32 %add26.i = or disjoint i32 %add18.i, %and25.i @@ -1811,27 +1805,27 @@ if.then10: ; preds = %if.end, %if.end4.i, %cmp11.i = phi i1 [ true, %if.end ], [ true, %if.end4.i ], [ false, %if.end13.i ], [ true, %if.end23.i ] %cmp5.not.i = phi i1 [ false, %if.end ], [ true, %if.end4.i ], [ false, %if.end13.i ], [ false, %if.end23.i ] %cp.0 = phi i32 [ %conv.i, %if.end ], [ %add.i, %if.end4.i ], [ %add16.i, %if.end13.i ], [ %add26.i, %if.end23.i ] - %cmp.i52 = icmp ult i32 %cp.0, 1114112 + %cmp.i50 = icmp ult i32 %cp.0, 1114112 %11 = and i32 %cp.0, -2048 %12 = icmp ne i32 %11, 55296 - %13 = and i1 %cmp.i52, %12 + %13 = and i1 %cmp.i50, %12 br i1 %13, label %if.then12, label %return.sink.split if.then12: ; preds = %if.then10 - %cmp.i53 = icmp ult i32 %cp.0, 128 - br i1 %cmp.i53, label %if.then.i, label %if.else.i54 + %cmp.i51 = icmp ult i32 %cp.0, 128 + br i1 %cmp.i51, label %if.then.i, label %if.else.i52 if.then.i: ; preds = %if.then12 br i1 %cmp.i, label %if.then14, label %return.sink.split -if.else.i54: ; preds = %if.then12 +if.else.i52: ; preds = %if.then12 %cmp3.i = icmp ult i32 %cp.0, 2048 br i1 %cmp3.i, label %if.then4.i, label %if.else8.i -if.then4.i: ; preds = %if.else.i54 +if.then4.i: ; preds = %if.else.i52 br i1 %cmp5.not.i, label %if.then14, label %return.sink.split -if.else8.i: ; preds = %if.else.i54 +if.else8.i: ; preds = %if.else.i52 %cmp9.i = icmp ult i32 %cp.0, 65536 %or.cond.i = and i1 %cmp11.i, %cmp9.i br i1 %or.cond.i, label %return.sink.split, label %if.then14 @@ -1842,9 +1836,9 @@ if.then14: ; preds = %if.else8.i, %if.the %incdec.ptr = getelementptr inbounds i8, ptr %14, i64 1 br label %return.sink.split -return.sink.split: ; preds = %if.then10, %if.end.i.i, %if.end.i19, %if.end.i.i27, %if.end.i23, %if.end.i15.i, %if.end4.i31, %if.end.i.i40, %if.end.i36, %if.end.i20.i, %if.end4.i44, %if.end.i28.i, %if.end13.i51, %if.then.i, %if.then4.i, %if.else8.i, %if.then14 - %.sink = phi ptr [ %incdec.ptr, %if.then14 ], [ %0, %if.else8.i ], [ %0, %if.then4.i ], [ %0, %if.then.i ], [ %0, %if.end13.i51 ], [ %0, %if.end.i28.i ], [ %0, %if.end4.i44 ], [ %0, %if.end.i20.i ], [ %0, %if.end.i36 ], [ %0, %if.end.i.i40 ], [ %0, %if.end4.i31 ], [ %0, %if.end.i15.i ], [ %0, %if.end.i23 ], [ %0, %if.end.i.i27 ], [ %0, %if.end.i19 ], [ %0, %if.end.i.i ], [ %0, %if.then10 ] - %retval.0.ph = phi i32 [ 0, %if.then14 ], [ 4, %if.else8.i ], [ 4, %if.then4.i ], [ 4, %if.then.i ], [ 1, %if.end13.i51 ], [ 3, %if.end.i28.i ], [ 1, %if.end4.i44 ], [ 3, %if.end.i20.i ], [ 1, %if.end.i36 ], [ 3, %if.end.i.i40 ], [ 1, %if.end4.i31 ], [ 3, %if.end.i15.i ], [ 1, %if.end.i23 ], [ 3, %if.end.i.i27 ], [ 1, %if.end.i19 ], [ 3, %if.end.i.i ], [ 5, %if.then10 ] +return.sink.split: ; preds = %if.then10, %if.end.i.i, %if.end.i19, %if.end.i.i27, %if.end.i23, %if.end.i15.i, %if.end4.i30, %if.end.i.i39, %if.end.i35, %if.end.i20.i, %if.end4.i42, %if.end.i27.i, %if.end13.i49, %if.then.i, %if.then4.i, %if.else8.i, %if.then14 + %.sink = phi ptr [ %incdec.ptr, %if.then14 ], [ %0, %if.else8.i ], [ %0, %if.then4.i ], [ %0, %if.then.i ], [ %0, %if.end13.i49 ], [ %0, %if.end.i27.i ], [ %0, %if.end4.i42 ], [ %0, %if.end.i20.i ], [ %0, %if.end.i35 ], [ %0, %if.end.i.i39 ], [ %0, %if.end4.i30 ], [ %0, %if.end.i15.i ], [ %0, %if.end.i23 ], [ %0, %if.end.i.i27 ], [ %0, %if.end.i19 ], [ %0, %if.end.i.i ], [ %0, %if.then10 ] + %retval.0.ph = phi i32 [ 0, %if.then14 ], [ 4, %if.else8.i ], [ 4, %if.then4.i ], [ 4, %if.then.i ], [ 1, %if.end13.i49 ], [ 3, %if.end.i27.i ], [ 1, %if.end4.i42 ], [ 3, %if.end.i20.i ], [ 1, %if.end.i35 ], [ 3, %if.end.i.i39 ], [ 1, %if.end4.i30 ], [ 3, %if.end.i15.i ], [ 1, %if.end.i23 ], [ 3, %if.end.i.i27 ], [ 1, %if.end.i19 ], [ 3, %if.end.i.i ], [ 5, %if.then10 ] store ptr %.sink, ptr %it, align 8 br label %return diff --git a/bench/chibicc/optimized/unicode.ll b/bench/chibicc/optimized/unicode.ll index 2b95470a93e..18cef637b81 100644 --- a/bench/chibicc/optimized/unicode.ll +++ b/bench/chibicc/optimized/unicode.ll @@ -128,8 +128,7 @@ for.body: ; preds = %if.end24, %if.end31 %c.121 = phi i32 [ %c.0, %if.end24 ], [ %or, %if.end31 ] %arrayidx = getelementptr inbounds i8, ptr %p, i64 %indvars.iv %3 = load i8, ptr %arrayidx, align 1 - %.mask = and i8 %3, -64 - %cmp28.not = icmp eq i8 %.mask, -128 + %cmp28.not = icmp slt i8 %3, -64 br i1 %cmp28.not, label %if.end31, label %if.then30 if.then30: ; preds = %for.body @@ -286,8 +285,7 @@ for.body.i: ; preds = %if.end31.i, %if.end %c.121.i = phi i32 [ %c.0.i, %if.end24.i ], [ %or.i, %if.end31.i ] %arrayidx.i = getelementptr inbounds i8, ptr %p.addr.011, i64 %indvars.iv.i %2 = load i8, ptr %arrayidx.i, align 1 - %.mask.i = and i8 %2, -64 - %cmp28.not.i = icmp eq i8 %.mask.i, -128 + %cmp28.not.i = icmp slt i8 %2, -64 br i1 %cmp28.not.i, label %if.end31.i, label %if.then30.i if.then30.i: ; preds = %for.body.i diff --git a/bench/clamav/optimized/cpio.c.ll b/bench/clamav/optimized/cpio.c.ll index c737cb96f41..1f90915955e 100644 --- a/bench/clamav/optimized/cpio.c.ll +++ b/bench/clamav/optimized/cpio.c.ll @@ -49,8 +49,8 @@ define i32 @cli_scancpio_old(ptr noundef %0) local_unnamed_addr #0 { br label %8 8: ; preds = %.lr.ph, %.backedge - %9 = phi i64 [ %7, %.lr.ph ], [ %82, %.backedge ] - %10 = phi ptr [ %5, %.lr.ph ], [ %80, %.backedge ] + %9 = phi i64 [ %7, %.lr.ph ], [ %81, %.backedge ] + %10 = phi ptr [ %5, %.lr.ph ], [ %79, %.backedge ] %.0109 = phi i64 [ 0, %.lr.ph ], [ %.0.be, %.backedge ] %.051108 = phi i32 [ 0, %.lr.ph ], [ %.152, %.backedge ] %.054107 = phi i32 [ 0, %.lr.ph ], [ %23, %.backedge ] @@ -204,35 +204,34 @@ sanitname.exit: ; preds = %51, %40 70: ; preds = %67 %.6..6..6.95 = load i16, ptr %.6..6..6..sroa_idx, align 2 - %rev80 = shl i16 %.6..6..6.95, 8 + %rev80 = call i16 @llvm.bswap.i16(i16 %.6..6..6.95) %.in81 = select i1 %21, i16 %.6..6..6.95, i16 %rev80 - %71 = and i16 %.in81, -4096 - %.not82 = icmp eq i16 %71, -32768 - br i1 %.not82, label %73, label %72 + %.not82 = icmp slt i16 %.in81, -28672 + br i1 %.not82, label %72, label %71 -72: ; preds = %70 +71: ; preds = %70 call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.6) #8 - br label %76 - -73: ; preds = %70 - %74 = load ptr, ptr %4, align 8 - %75 = call i32 @cli_magic_scan_nested_fmap_type(ptr noundef %74, i64 noundef %.1, i64 noundef %68, ptr noundef %0, i32 noundef 0, ptr noundef %.156, i32 noundef 0) #8 - %.not83 = icmp eq i32 %75, 0 - br i1 %.not83, label %76, label %fmap_readn.exit.thread - -76: ; preds = %73, %72 - %77 = and i32 %65, 1 - %spec.select87 = add i32 %66, %77 - %78 = zext i32 %spec.select87 to i64 - %79 = add i64 %.1, %78 + br label %75 + +72: ; preds = %70 + %73 = load ptr, ptr %4, align 8 + %74 = call i32 @cli_magic_scan_nested_fmap_type(ptr noundef %73, i64 noundef %.1, i64 noundef %68, ptr noundef %0, i32 noundef 0, ptr noundef %.156, i32 noundef 0) #8 + %.not83 = icmp eq i32 %74, 0 + br i1 %.not83, label %75, label %fmap_readn.exit.thread + +75: ; preds = %72, %71 + %76 = and i32 %65, 1 + %spec.select87 = add i32 %66, %76 + %77 = zext i32 %spec.select87 to i64 + %78 = add i64 %.1, %77 br label %.backedge -.backedge: ; preds = %76, %62 - %.0.be = phi i64 [ %79, %76 ], [ %.1, %62 ] - %80 = load ptr, ptr %4, align 8 - %81 = getelementptr inbounds i8, ptr %80, i64 88 - %82 = load i64, ptr %81, align 8 - %or.cond103.not = icmp ult i64 %.0.be, %82 +.backedge: ; preds = %75, %62 + %.0.be = phi i64 [ %78, %75 ], [ %.1, %62 ] + %79 = load ptr, ptr %4, align 8 + %80 = getelementptr inbounds i8, ptr %79, i64 88 + %81 = load i64, ptr %80, align 8 + %or.cond103.not = icmp ult i64 %.0.be, %81 br i1 %or.cond103.not, label %8, label %fmap_readn.exit.thread fmap_readn.exit.thread.sink.split: ; preds = %fmap_readn.exit92, %32, %34, %20 @@ -240,8 +239,8 @@ fmap_readn.exit.thread.sink.split: ; preds = %fmap_readn.exit92, call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull %.str.2.sink) #8 br label %fmap_readn.exit.thread -fmap_readn.exit.thread: ; preds = %67, %73, %fmap_readn.exit, %16, %.backedge, %8, %fmap_readn.exit.thread.sink.split, %1 - %.148 = phi i32 [ 0, %1 ], [ 26, %fmap_readn.exit.thread.sink.split ], [ %69, %67 ], [ %75, %73 ], [ 0, %fmap_readn.exit ], [ 0, %16 ], [ 0, %.backedge ], [ 0, %8 ] +fmap_readn.exit.thread: ; preds = %67, %72, %fmap_readn.exit, %16, %.backedge, %8, %fmap_readn.exit.thread.sink.split, %1 + %.148 = phi i32 [ 0, %1 ], [ 26, %fmap_readn.exit.thread.sink.split ], [ %69, %67 ], [ %74, %72 ], [ 0, %fmap_readn.exit ], [ 0, %16 ], [ 0, %.backedge ], [ 0, %8 ] ret i32 %.148 } diff --git a/bench/clamav/optimized/entconv.c.ll b/bench/clamav/optimized/entconv.c.ll index 1a2864501c7..ef92a81f094 100644 --- a/bench/clamav/optimized/entconv.c.ll +++ b/bench/clamav/optimized/entconv.c.ll @@ -1703,177 +1703,176 @@ define range(i32 0, 28) i32 @cli_codepage_to_utf8(ptr noundef %0, i64 noundef %1 %27 = trunc i64 %1 to i32 br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %30 - %.084145 = phi i32 [ %32, %30 ], [ 1, %.lr.ph.preheader ] - %.085144 = phi ptr [ %31, %30 ], [ %25, %.lr.ph.preheader ] +.lr.ph: ; preds = %.lr.ph.preheader, %29 + %.084145 = phi i32 [ %31, %29 ], [ 1, %.lr.ph.preheader ] + %.085144 = phi ptr [ %30, %29 ], [ %25, %.lr.ph.preheader ] %28 = load i8, ptr %.085144, align 1 - %29 = and i8 %28, -64 - %.not111 = icmp eq i8 %29, -128 - br i1 %.not111, label %30, label %._crit_edge - -30: ; preds = %.lr.ph - %31 = getelementptr inbounds i8, ptr %.085144, i64 -1 - %32 = add nuw nsw i32 %.084145, 1 - %.not110 = icmp eq ptr %31, %18 + %.not111 = icmp slt i8 %28, -64 + br i1 %.not111, label %29, label %._crit_edge + +29: ; preds = %.lr.ph + %30 = getelementptr inbounds i8, ptr %.085144, i64 -1 + %31 = add nuw nsw i32 %.084145, 1 + %.not110 = icmp eq ptr %30, %18 br i1 %.not110, label %._crit_edge, label %.lr.ph -._crit_edge: ; preds = %30, %.lr.ph, %.preheader122 - %.085.lcssa = phi ptr [ %18, %.preheader122 ], [ %.085144, %.lr.ph ], [ %18, %30 ] - %.084.lcssa = phi i32 [ 1, %.preheader122 ], [ %.084145, %.lr.ph ], [ %27, %30 ] - %33 = load i8, ptr %.085.lcssa, align 1 - %34 = zext i8 %33 to i32 - br label %35 +._crit_edge: ; preds = %29, %.lr.ph, %.preheader122 + %.085.lcssa = phi ptr [ %18, %.preheader122 ], [ %.085144, %.lr.ph ], [ %18, %29 ] + %.084.lcssa = phi i32 [ 1, %.preheader122 ], [ %.084145, %.lr.ph ], [ %27, %29 ] + %32 = load i8, ptr %.085.lcssa, align 1 + %33 = zext i8 %32 to i32 + br label %34 -35: ; preds = %._crit_edge, %39 - %.083150 = phi i32 [ 0, %._crit_edge ], [ %40, %39 ] - %36 = lshr exact i32 128, %.083150 - %37 = and i32 %36, %34 - %38 = icmp eq i32 %37, 0 - br i1 %38, label %41, label %39 +34: ; preds = %._crit_edge, %38 + %.083150 = phi i32 [ 0, %._crit_edge ], [ %39, %38 ] + %35 = lshr exact i32 128, %.083150 + %36 = and i32 %35, %33 + %37 = icmp eq i32 %36, 0 + br i1 %37, label %40, label %38 -39: ; preds = %35 - %40 = add nuw nsw i32 %.083150, 1 - %exitcond.not = icmp eq i32 %40, 8 - br i1 %exitcond.not, label %41, label %35 +38: ; preds = %34 + %39 = add nuw nsw i32 %.083150, 1 + %exitcond.not = icmp eq i32 %39, 8 + br i1 %exitcond.not, label %40, label %34 -41: ; preds = %35, %39 - %.083.lcssa = phi i32 [ %.083150, %35 ], [ 8, %39 ] +40: ; preds = %34, %38 + %.083.lcssa = phi i32 [ %.083150, %34 ], [ 8, %38 ] %.not112 = icmp eq i32 %.084.lcssa, %.083.lcssa br i1 %.not112, label %.loopexit, label %.loopexit.loopexit155 -.loopexit.loopexit155: ; preds = %41 +.loopexit.loopexit155: ; preds = %40 tail call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.5, i32 noundef %.084.lcssa, i32 noundef %.083.lcssa) #17 %smin = tail call i32 @llvm.smin.i32(i32 %.084.lcssa, i32 1) - %42 = sub i32 %.084.lcssa, %smin - %43 = zext i32 %42 to i64 - %44 = add nuw nsw i64 %43, 1 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %.085.lcssa, i8 0, i64 %44, i1 false) + %41 = sub i32 %.084.lcssa, %smin + %42 = zext i32 %41 to i64 + %43 = add nuw nsw i64 %42, 1 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %.085.lcssa, i8 0, i64 %43, i1 false) br label %.loopexit -.preheader120: ; preds = %15, %48 - %indvars.iv = phi i64 [ %indvars.iv.next, %48 ], [ 0, %15 ] - %45 = getelementptr inbounds [152 x %struct.codepage_entry], ptr @codepage_entries, i64 0, i64 %indvars.iv - %46 = load i16, ptr %45, align 16 - %47 = icmp eq i16 %2, %46 - br i1 %47, label %50, label %48 +.preheader120: ; preds = %15, %47 + %indvars.iv = phi i64 [ %indvars.iv.next, %47 ], [ 0, %15 ] + %44 = getelementptr inbounds [152 x %struct.codepage_entry], ptr @codepage_entries, i64 0, i64 %indvars.iv + %45 = load i16, ptr %44, align 16 + %46 = icmp eq i16 %2, %45 + br i1 %46, label %49, label %47 -48: ; preds = %.preheader120 - %49 = icmp ult i16 %2, %46 +47: ; preds = %.preheader120 + %48 = icmp ult i16 %2, %45 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond175.not = icmp eq i64 %indvars.iv.next, 152 - %or.cond205 = select i1 %49, i1 true, i1 %exitcond175.not + %or.cond205 = select i1 %48, i1 true, i1 %exitcond175.not br i1 %or.cond205, label %.thread, label %.preheader120 -50: ; preds = %.preheader120 - %51 = getelementptr inbounds i8, ptr %45, i64 8 - %52 = load ptr, ptr %51, align 8 - %53 = icmp eq ptr %52, null - br i1 %53, label %.thread, label %.preheader +49: ; preds = %.preheader120 + %50 = getelementptr inbounds i8, ptr %44, i64 8 + %51 = load ptr, ptr %50, align 8 + %52 = icmp eq ptr %51, null + br i1 %52, label %.thread, label %.preheader -.preheader: ; preds = %50 - %54 = shl i64 %1, 1 - br label %55 +.preheader: ; preds = %49 + %53 = shl i64 %1, 1 + br label %54 -.thread: ; preds = %48, %50 +.thread: ; preds = %47, %49 tail call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.6) #17 br label %.thread115 -55: ; preds = %.preheader, %75 - %indvars.iv176 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next177, %75 ] +54: ; preds = %.preheader, %74 + %indvars.iv176 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next177, %74 ] store ptr %0, ptr %6, align 8 store i64 %1, ptr %7, align 8 store ptr null, ptr %9, align 8 - %56 = mul i64 %54, %indvars.iv176 - store i64 %56, ptr %8, align 8 - %57 = or disjoint i64 %56, 1 - %58 = call ptr @cli_max_calloc(i64 noundef 1, i64 noundef %57) #17 - %59 = icmp eq ptr %58, null - br i1 %59, label %60, label %61 - -60: ; preds = %55 + %55 = mul i64 %53, %indvars.iv176 + store i64 %55, ptr %8, align 8 + %56 = or disjoint i64 %55, 1 + %57 = call ptr @cli_max_calloc(i64 noundef 1, i64 noundef %56) #17 + %58 = icmp eq ptr %57, null + br i1 %58, label %59, label %60 + +59: ; preds = %54 call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.7) #17 br label %.thread115 -61: ; preds = %55 - store ptr %58, ptr %9, align 8 - %62 = call ptr @iconv_open(ptr noundef nonnull @.str.8, ptr noundef nonnull %52) #17 - %63 = icmp eq ptr %62, inttoptr (i64 -1 to ptr) - br i1 %63, label %64, label %68 +60: ; preds = %54 + store ptr %57, ptr %9, align 8 + %61 = call ptr @iconv_open(ptr noundef nonnull @.str.8, ptr noundef nonnull %51) #17 + %62 = icmp eq ptr %61, inttoptr (i64 -1 to ptr) + br i1 %62, label %63, label %67 -64: ; preds = %61 - %65 = call ptr @iconv_open(ptr noundef nonnull @.str.9, ptr noundef nonnull %52) #17 - %66 = icmp eq ptr %65, inttoptr (i64 -1 to ptr) - br i1 %66, label %67, label %68 +63: ; preds = %60 + %64 = call ptr @iconv_open(ptr noundef nonnull @.str.9, ptr noundef nonnull %51) #17 + %65 = icmp eq ptr %64, inttoptr (i64 -1 to ptr) + br i1 %65, label %66, label %67 -67: ; preds = %64 +66: ; preds = %63 call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.10) #17 - br label %88 - -68: ; preds = %64, %61 - %.3 = phi ptr [ %65, %64 ], [ %62, %61 ] - %69 = call i64 @iconv(ptr noundef %.3, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8) #17 - %70 = call i32 @iconv_close(ptr noundef %.3) #17 - %71 = icmp eq i64 %69, -1 - br i1 %71, label %72, label %79 - -72: ; preds = %68 - %73 = tail call ptr @__errno_location() #19 - %74 = load i32, ptr %73, align 4 - switch i32 %74, label %78 [ - i32 7, label %75 - i32 84, label %76 - i32 22, label %77 + br label %87 + +67: ; preds = %63, %60 + %.3 = phi ptr [ %64, %63 ], [ %61, %60 ] + %68 = call i64 @iconv(ptr noundef %.3, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8) #17 + %69 = call i32 @iconv_close(ptr noundef %.3) #17 + %70 = icmp eq i64 %68, -1 + br i1 %70, label %71, label %78 + +71: ; preds = %67 + %72 = tail call ptr @__errno_location() #19 + %73 = load i32, ptr %72, align 4 + switch i32 %73, label %77 [ + i32 7, label %74 + i32 84, label %75 + i32 22, label %76 ] -75: ; preds = %72 +74: ; preds = %71 call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.11) #17 - call void @free(ptr noundef nonnull %58) #17 + call void @free(ptr noundef nonnull %57) #17 %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1 %exitcond179.not = icmp eq i64 %indvars.iv.next177, 4 - br i1 %exitcond179.not, label %.loopexit, label %55 + br i1 %exitcond179.not, label %.loopexit, label %54 -76: ; preds = %72 +75: ; preds = %71 call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.12) #17 - br label %88 + br label %87 -77: ; preds = %72 +76: ; preds = %71 call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.13) #17 - br label %88 + br label %87 -78: ; preds = %72 - call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.14, i32 noundef %74) #17 - br label %88 +77: ; preds = %71 + call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.14, i32 noundef %73) #17 + br label %87 -79: ; preds = %68 - %80 = load i64, ptr %8, align 8 - %81 = sub i64 %57, %80 - %82 = call ptr @cli_max_realloc(ptr noundef nonnull %58, i64 noundef %81) #17 - %83 = icmp eq ptr %82, null - br i1 %83, label %84, label %85 +78: ; preds = %67 + %79 = load i64, ptr %8, align 8 + %80 = sub i64 %56, %79 + %81 = call ptr @cli_max_realloc(ptr noundef nonnull %57, i64 noundef %80) #17 + %82 = icmp eq ptr %81, null + br i1 %82, label %83, label %84 -84: ; preds = %79 +83: ; preds = %78 call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.15) #17 - br label %88 + br label %87 -85: ; preds = %79 - %86 = load i64, ptr %8, align 8 - %87 = sub i64 %56, %86 +84: ; preds = %78 + %85 = load i64, ptr %8, align 8 + %86 = sub i64 %55, %85 br label %.loopexit -.loopexit: ; preds = %75, %.loopexit.loopexit155, %85, %21, %23, %41 - %.192 = phi ptr [ %82, %85 ], [ %18, %41 ], [ %18, %23 ], [ %18, %21 ], [ %18, %.loopexit.loopexit155 ], [ null, %75 ] - %.089 = phi i64 [ %87, %85 ], [ %1, %41 ], [ %1, %23 ], [ %1, %21 ], [ %1, %.loopexit.loopexit155 ], [ %56, %75 ] +.loopexit: ; preds = %74, %.loopexit.loopexit155, %84, %21, %23, %40 + %.192 = phi ptr [ %81, %84 ], [ %18, %40 ], [ %18, %23 ], [ %18, %21 ], [ %18, %.loopexit.loopexit155 ], [ null, %74 ] + %.089 = phi i64 [ %86, %84 ], [ %1, %40 ], [ %1, %23 ], [ %1, %21 ], [ %1, %.loopexit.loopexit155 ], [ %55, %74 ] store ptr %.192, ptr %3, align 8 store i64 %.089, ptr %4, align 8 br label %.thread115 -88: ; preds = %76, %77, %78, %84, %67 - %.094 = phi i32 [ 22, %67 ], [ 20, %84 ], [ 27, %78 ], [ 27, %77 ], [ 27, %76 ] - call void @free(ptr noundef nonnull %58) #17 +87: ; preds = %75, %76, %77, %83, %66 + %.094 = phi i32 [ 22, %66 ], [ 20, %83 ], [ 27, %77 ], [ 27, %76 ], [ 27, %75 ] + call void @free(ptr noundef nonnull %57) #17 br label %.thread115 -.thread115: ; preds = %20, %60, %.thread, %14, %.loopexit, %88 - %.094119 = phi i32 [ %.094, %88 ], [ 20, %20 ], [ 0, %.loopexit ], [ 20, %60 ], [ 22, %.thread ], [ 3, %14 ] +.thread115: ; preds = %20, %59, %.thread, %14, %.loopexit, %87 + %.094119 = phi i32 [ %.094, %87 ], [ 20, %20 ], [ 0, %.loopexit ], [ 20, %59 ], [ 22, %.thread ], [ 3, %14 ] ret i32 %.094119 } @@ -2157,7 +2156,7 @@ define range(i32 0, 2) i32 @cli_isutf8(ptr nocapture noundef readonly %0, i32 no br i1 %.not42, label %.loopexit32, label %.lr.ph .lr.ph: ; preds = %2, %.loopexit - %.02737 = phi i32 [ %36, %.loopexit ], [ 0, %2 ] + %.02737 = phi i32 [ %35, %.loopexit ], [ 0, %2 ] %3 = zext i32 %.02737 to i64 %4 = getelementptr inbounds i8, ptr %0, i64 %3 %5 = load i8, ptr %4, align 1 @@ -2214,15 +2213,14 @@ define range(i32 0, 2) i32 @cli_isutf8(ptr nocapture noundef readonly %0, i32 no %32 = zext i32 %30 to i64 %33 = getelementptr inbounds i8, ptr %0, i64 %32 %34 = load i8, ptr %33, align 1 - %35 = and i8 %34, -64 - %or.cond = icmp eq i8 %35, -128 + %or.cond = icmp slt i8 %34, -64 br i1 %or.cond, label %28, label %.loopexit32 .loopexit: ; preds = %28, %.lr.ph %.1 = phi i32 [ %.02737, %.lr.ph ], [ %27, %28 ] - %36 = add i32 %.1, 1 - %37 = icmp ult i32 %36, %1 - br i1 %37, label %.lr.ph, label %.loopexit32 + %35 = add i32 %.1, 1 + %36 = icmp ult i32 %35, %1 + br i1 %36, label %.lr.ph, label %.loopexit32 .loopexit32: ; preds = %8, %23, %.loopexit, %31, %29, %2 %.028 = phi i32 [ 1, %2 ], [ 0, %29 ], [ 0, %31 ], [ 0, %8 ], [ 0, %23 ], [ 1, %.loopexit ] diff --git a/bench/cmake/optimized/cm_utf8.c.ll b/bench/cmake/optimized/cm_utf8.c.ll index 76ae3a3d289..ba23ba29df4 100644 --- a/bench/cmake/optimized/cm_utf8.c.ll +++ b/bench/cmake/optimized/cm_utf8.c.ll @@ -43,57 +43,56 @@ define dso_local ptr @cm_utf8_decode_character(ptr noundef readonly %0, ptr noun %19 = zext i8 %18 to i32 br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %22 - %.042 = phi i32 [ %.0, %22 ], [ %.039, %.lr.ph.preheader ] - %.02941 = phi i32 [ %27, %22 ], [ %19, %.lr.ph.preheader ] - %.03140 = phi ptr [ %23, %22 ], [ %6, %.lr.ph.preheader ] +.lr.ph: ; preds = %.lr.ph.preheader, %21 + %.042 = phi i32 [ %.0, %21 ], [ %.039, %.lr.ph.preheader ] + %.02941 = phi i32 [ %26, %21 ], [ %19, %.lr.ph.preheader ] + %.03140 = phi ptr [ %22, %21 ], [ %6, %.lr.ph.preheader ] %20 = load i8, ptr %.03140, align 1 - %21 = and i8 %20, -64 - %.not = icmp eq i8 %21, -128 - br i1 %.not, label %22, label %.loopexit - -22: ; preds = %.lr.ph - %23 = getelementptr inbounds i8, ptr %.03140, i64 1 - %24 = shl i32 %.02941, 6 - %25 = and i8 %20, 63 - %26 = zext nneg i8 %25 to i32 - %27 = or disjoint i32 %24, %26 + %.not = icmp slt i8 %20, -64 + br i1 %.not, label %21, label %.loopexit + +21: ; preds = %.lr.ph + %22 = getelementptr inbounds i8, ptr %.03140, i64 1 + %23 = shl i32 %.02941, 6 + %24 = and i8 %20, 63 + %25 = zext nneg i8 %24 to i32 + %26 = or disjoint i32 %23, %25 %.0 = add nsw i32 %.042, -1 - %28 = icmp ne i32 %.0, 0 - %29 = icmp ne ptr %23, %1 - %30 = select i1 %28, i1 %29, i1 false - br i1 %30, label %.lr.ph, label %._crit_edge, !llvm.loop !5 - -._crit_edge: ; preds = %22 - %31 = icmp sgt i32 %.042, 1 - br i1 %31, label %.loopexit, label %32 - -32: ; preds = %._crit_edge - %33 = getelementptr inbounds [7 x i32], ptr @cm_utf8_min, i64 0, i64 %14 - %34 = load i32, ptr %33, align 4 - %35 = icmp ult i32 %27, %34 - %36 = and i32 %.02941, 67108832 - %or.cond = icmp eq i32 %36, 864 - %or.cond34 = or i1 %or.cond, %35 - %37 = icmp ugt i32 %24, 1114111 - %or.cond35 = or i1 %37, %or.cond34 + %27 = icmp ne i32 %.0, 0 + %28 = icmp ne ptr %22, %1 + %29 = select i1 %27, i1 %28, i1 false + br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !5 + +._crit_edge: ; preds = %21 + %30 = icmp sgt i32 %.042, 1 + br i1 %30, label %.loopexit, label %31 + +31: ; preds = %._crit_edge + %32 = getelementptr inbounds [7 x i32], ptr @cm_utf8_min, i64 0, i64 %14 + %33 = load i32, ptr %32, align 4 + %34 = icmp ult i32 %26, %33 + %35 = and i32 %.02941, 67108832 + %or.cond = icmp eq i32 %35, 864 + %or.cond34 = or i1 %or.cond, %34 + %36 = icmp ugt i32 %23, 1114111 + %or.cond35 = or i1 %36, %or.cond34 br i1 %or.cond35, label %.loopexit, label %.loopexit.sink.split -.loopexit.sink.split: ; preds = %32, %11 - %.lcssa.sink = phi i32 [ %12, %11 ], [ %27, %32 ] - %.030.ph = phi ptr [ %6, %11 ], [ %23, %32 ] +.loopexit.sink.split: ; preds = %31, %11 + %.lcssa.sink = phi i32 [ %12, %11 ], [ %26, %31 ] + %.030.ph = phi ptr [ %6, %11 ], [ %22, %31 ] store i32 %.lcssa.sink, ptr %2, align 4 br label %.loopexit -.loopexit: ; preds = %.lr.ph, %.loopexit.sink.split, %13, %._crit_edge, %32, %5, %5, %5, %3 - %.030 = phi ptr [ null, %3 ], [ null, %5 ], [ null, %5 ], [ null, %5 ], [ null, %32 ], [ null, %._crit_edge ], [ null, %13 ], [ %.030.ph, %.loopexit.sink.split ], [ null, %.lr.ph ] +.loopexit: ; preds = %.lr.ph, %.loopexit.sink.split, %13, %._crit_edge, %31, %5, %5, %5, %3 + %.030 = phi ptr [ null, %3 ], [ null, %5 ], [ null, %5 ], [ null, %5 ], [ null, %31 ], [ null, %._crit_edge ], [ null, %13 ], [ %.030.ph, %.loopexit.sink.split ], [ null, %.lr.ph ] ret ptr %.030 } ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local range(i32 0, 2) i32 @cm_utf8_is_valid(ptr noundef readonly %0) local_unnamed_addr #1 { %.not = icmp eq ptr %0, null - br i1 %.not, label %37, label %2 + br i1 %.not, label %36, label %2 2: ; preds = %1 %3 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #3 @@ -129,55 +128,54 @@ define dso_local range(i32 0, 2) i32 @cm_utf8_is_valid(ptr noundef readonly %0) %16 = zext i8 %15 to i32 br label %.lr.ph.i -.lr.ph.i: ; preds = %.lr.ph.i.preheader, %19 - %.042.i = phi i32 [ %.0.i, %19 ], [ %.039.i, %.lr.ph.i.preheader ] - %.02941.i = phi i32 [ %24, %19 ], [ %16, %.lr.ph.i.preheader ] - %.03140.i = phi ptr [ %20, %19 ], [ %5, %.lr.ph.i.preheader ] +.lr.ph.i: ; preds = %.lr.ph.i.preheader, %18 + %.042.i = phi i32 [ %.0.i, %18 ], [ %.039.i, %.lr.ph.i.preheader ] + %.02941.i = phi i32 [ %23, %18 ], [ %16, %.lr.ph.i.preheader ] + %.03140.i = phi ptr [ %19, %18 ], [ %5, %.lr.ph.i.preheader ] %17 = load i8, ptr %.03140.i, align 1 - %18 = and i8 %17, -64 - %.not.i = icmp eq i8 %18, -128 - br i1 %.not.i, label %19, label %.critedge - -19: ; preds = %.lr.ph.i - %20 = getelementptr inbounds i8, ptr %.03140.i, i64 1 - %21 = shl i32 %.02941.i, 6 - %22 = and i8 %17, 63 - %23 = zext nneg i8 %22 to i32 - %24 = or disjoint i32 %21, %23 + %.not.i = icmp slt i8 %17, -64 + br i1 %.not.i, label %18, label %.critedge + +18: ; preds = %.lr.ph.i + %19 = getelementptr inbounds i8, ptr %.03140.i, i64 1 + %20 = shl i32 %.02941.i, 6 + %21 = and i8 %17, 63 + %22 = zext nneg i8 %21 to i32 + %23 = or disjoint i32 %20, %22 %.0.i = add nsw i32 %.042.i, -1 - %25 = icmp ne i32 %.0.i, 0 - %26 = icmp ne ptr %20, %4 - %27 = select i1 %25, i1 %26, i1 false - br i1 %27, label %.lr.ph.i, label %._crit_edge.i, !llvm.loop !5 - -._crit_edge.i: ; preds = %19 - %28 = icmp sgt i32 %.042.i, 1 - br i1 %28, label %.critedge, label %29 - -29: ; preds = %._crit_edge.i - %30 = getelementptr inbounds [7 x i32], ptr @cm_utf8_min, i64 0, i64 %11 - %31 = load i32, ptr %30, align 4 - %32 = icmp ult i32 %24, %31 - %33 = and i32 %.02941.i, 67108832 - %or.cond.i = icmp eq i32 %33, 864 - %or.cond34.i = or i1 %or.cond.i, %32 - %34 = icmp ugt i32 %21, 1114111 - %or.cond35.i = or i1 %34, %or.cond34.i + %24 = icmp ne i32 %.0.i, 0 + %25 = icmp ne ptr %19, %4 + %26 = select i1 %24, i1 %25, i1 false + br i1 %26, label %.lr.ph.i, label %._crit_edge.i, !llvm.loop !5 + +._crit_edge.i: ; preds = %18 + %27 = icmp sgt i32 %.042.i, 1 + br i1 %27, label %.critedge, label %28 + +28: ; preds = %._crit_edge.i + %29 = getelementptr inbounds [7 x i32], ptr @cm_utf8_min, i64 0, i64 %11 + %30 = load i32, ptr %29, align 4 + %31 = icmp ult i32 %23, %30 + %32 = and i32 %.02941.i, 67108832 + %or.cond.i = icmp eq i32 %32, 864 + %or.cond34.i = or i1 %or.cond.i, %31 + %33 = icmp ugt i32 %20, 1114111 + %or.cond35.i = or i1 %33, %or.cond34.i br i1 %or.cond35.i, label %.critedge, label %cm_utf8_decode_character.exit -cm_utf8_decode_character.exit: ; preds = %29, %.lr.ph - %.030.ph.i = phi ptr [ %20, %29 ], [ %5, %.lr.ph ] +cm_utf8_decode_character.exit: ; preds = %28, %.lr.ph + %.030.ph.i = phi ptr [ %19, %28 ], [ %5, %.lr.ph ] %.not15 = icmp eq ptr %.030.ph.i, %4 br i1 %.not15, label %.critedge, label %.lr.ph, !llvm.loop !7 -.critedge: ; preds = %cm_utf8_decode_character.exit, %.lr.ph, %.lr.ph, %.lr.ph, %29, %._crit_edge.i, %10, %.lr.ph.i, %2 - %.1 = phi ptr [ %0, %2 ], [ null, %.lr.ph.i ], [ %4, %cm_utf8_decode_character.exit ], [ null, %.lr.ph ], [ null, %.lr.ph ], [ null, %.lr.ph ], [ null, %29 ], [ null, %._crit_edge.i ], [ null, %10 ] - %35 = icmp eq ptr %.1, %4 - %36 = zext i1 %35 to i32 - br label %37 +.critedge: ; preds = %cm_utf8_decode_character.exit, %.lr.ph, %.lr.ph, %.lr.ph, %28, %._crit_edge.i, %10, %.lr.ph.i, %2 + %.1 = phi ptr [ %0, %2 ], [ null, %.lr.ph.i ], [ %4, %cm_utf8_decode_character.exit ], [ null, %.lr.ph ], [ null, %.lr.ph ], [ null, %.lr.ph ], [ null, %28 ], [ null, %._crit_edge.i ], [ null, %10 ] + %34 = icmp eq ptr %.1, %4 + %35 = zext i1 %34 to i32 + br label %36 -37: ; preds = %1, %.critedge - %.010 = phi i32 [ %36, %.critedge ], [ 0, %1 ] +36: ; preds = %1, %.critedge + %.010 = phi i32 [ %35, %.critedge ], [ 0, %1 ] ret i32 %.010 } diff --git a/bench/coreutils-rs/optimized/4xd42pwugxo8maov.ll b/bench/coreutils-rs/optimized/4xd42pwugxo8maov.ll index ec71a48ecb0..bcd0d875b9f 100644 --- a/bench/coreutils-rs/optimized/4xd42pwugxo8maov.ll +++ b/bench/coreutils-rs/optimized/4xd42pwugxo8maov.ll @@ -802,19 +802,18 @@ define hidden void @_ZN5uu_od8prn_char13format_item_c17h24728308594c05d3E.llvm.1 unreachable 40: ; preds = %36 - %41 = and i8 %37, -64 - %42 = icmp eq i8 %41, -128 - br i1 %42, label %47, label %52 + %41 = icmp ult i8 %37, -64 + br i1 %41, label %46, label %51 _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit131: ; preds = %36 - %43 = zext nneg i8 %37 to i64 - %44 = getelementptr inbounds { ptr, i64 }, ptr @_ZN5uu_od8prn_char7C_CHARS17hb381dfc174836e9bE.llvm.10907310164025772830, i64 %43 + %42 = zext nneg i8 %37 to i64 + %43 = getelementptr inbounds { ptr, i64 }, ptr @_ZN5uu_od8prn_char7C_CHARS17hb381dfc174836e9bE.llvm.10907310164025772830, i64 %42 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) - store ptr %44, ptr %34, align 8 + store ptr %43, ptr %34, align 8 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) store ptr %34, ptr %33, align 8 - %45 = getelementptr inbounds i8, ptr %33, i64 8 - store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h09fae1f0258895a1E", ptr %45, align 8 + %44 = getelementptr inbounds i8, ptr %33, i64 8 + store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h09fae1f0258895a1E", ptr %44, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %32) store i64 2, ptr %32, align 8 %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 16 @@ -846,60 +845,60 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit131: ; preds = %36 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %32) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) - br label %46 + br label %45 -46: ; preds = %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit131, %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157, %103, %81, %68, %47 +45: ; preds = %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit131, %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157, %102, %80, %67, %46 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %35) ret void -47: ; preds = %40 - %48 = tail call { i64, ptr } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17hbb901f86ca1b4c0cE"(i64 noundef 4, i1 noundef zeroext false) - %49 = extractvalue { i64, ptr } %48, 0 - %50 = extractvalue { i64, ptr } %48, 1 - %51 = icmp ne ptr %50, null - tail call void @llvm.assume(i1 %51) - store i32 707403808, ptr %50, align 1 - store i64 %49, ptr %0, align 8 +46: ; preds = %40 + %47 = tail call { i64, ptr } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17hbb901f86ca1b4c0cE"(i64 noundef 4, i1 noundef zeroext false) + %48 = extractvalue { i64, ptr } %47, 0 + %49 = extractvalue { i64, ptr } %47, 1 + %50 = icmp ne ptr %49, null + tail call void @llvm.assume(i1 %50) + store i32 707403808, ptr %49, align 1 + store i64 %48, ptr %0, align 8 %.sroa.4103.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 8 - store ptr %50, ptr %.sroa.4103.0..sroa_idx, align 8 + store ptr %49, ptr %.sroa.4103.0..sroa_idx, align 8 %.sroa.5104.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 16 store i64 4, ptr %.sroa.5104.0..sroa_idx, align 8 - br label %46 - -52: ; preds = %40 - %53 = and i8 %37, -32 - %54 = icmp eq i8 %53, -64 - %55 = icmp ne i64 %2, 1 - %or.cond = and i1 %55, %54 - br i1 %or.cond, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit", label %56 - -56: ; preds = %52 - %57 = and i8 %37, -16 - %58 = icmp eq i8 %57, -32 - %59 = icmp ugt i64 %2, 2 - %or.cond1 = and i1 %59, %58 - br i1 %or.cond1, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit142", label %69 - -"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit": ; preds = %52 + br label %45 + +51: ; preds = %40 + %52 = and i8 %37, -32 + %53 = icmp eq i8 %52, -64 + %54 = icmp ne i64 %2, 1 + %or.cond = and i1 %54, %53 + br i1 %or.cond, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit", label %55 + +55: ; preds = %51 + %56 = and i8 %37, -16 + %57 = icmp eq i8 %56, -32 + %58 = icmp ugt i64 %2, 2 + %or.cond1 = and i1 %58, %57 + br i1 %or.cond1, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit142", label %68 + +"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit": ; preds = %51 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %31) call void @_ZN4core3str8converts9from_utf817hca39c4a07e0467cbE(ptr noalias nocapture noundef nonnull sret({ i64, [2 x i64] }) align 8 dereferenceable(24) %31, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef 2) - %60 = load i64, ptr %31, align 8, !range !79, !noundef !9 - %trunc122 = trunc nuw i64 %60 to i1 + %59 = load i64, ptr %31, align 8, !range !79, !noundef !9 + %trunc122 = trunc nuw i64 %59 to i1 br i1 %trunc122, label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit141, label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit136 _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit136: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit" call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) - %61 = getelementptr inbounds i8, ptr %31, i64 8 - %62 = load ptr, ptr %61, align 8, !nonnull !9, !align !33, !noundef !9 - %63 = getelementptr inbounds i8, ptr %31, i64 16 - %64 = load i64, ptr %63, align 8, !noundef !9 - store ptr %62, ptr %30, align 8 - %65 = getelementptr inbounds i8, ptr %30, i64 8 - store i64 %64, ptr %65, align 8 + %60 = getelementptr inbounds i8, ptr %31, i64 8 + %61 = load ptr, ptr %60, align 8, !nonnull !9, !align !33, !noundef !9 + %62 = getelementptr inbounds i8, ptr %31, i64 16 + %63 = load i64, ptr %62, align 8, !noundef !9 + store ptr %61, ptr %30, align 8 + %64 = getelementptr inbounds i8, ptr %30, i64 8 + store i64 %63, ptr %64, align 8 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) store ptr %30, ptr %29, align 8 - %66 = getelementptr inbounds i8, ptr %29, i64 8 - store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h2bec81bbc93d343fE", ptr %66, align 8 + %65 = getelementptr inbounds i8, ptr %29, i64 8 + store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h2bec81bbc93d343fE", ptr %65, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %28) store i64 2, ptr %28, align 8 %.sroa.521.0..sroa_idx = getelementptr inbounds i8, ptr %28, i64 16 @@ -931,13 +930,13 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit136: ; preds = %"_ZN106_$LT$core..o call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) - br label %68 + br label %67 _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit141: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit" call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) store ptr %35, ptr %27, align 8 - %67 = getelementptr inbounds i8, ptr %27, i64 8 - store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %67, align 8 + %66 = getelementptr inbounds i8, ptr %27, i64 8 + store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %66, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %26) store i64 2, ptr %26, align 8 %.sroa.532.0..sroa_idx = getelementptr inbounds i8, ptr %26, i64 16 @@ -968,39 +967,39 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit141: ; preds = %"_ZN106_$LT$core..o call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7), !noalias !93 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %26) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) - br label %68 + br label %67 -68: ; preds = %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit141, %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit136 +67: ; preds = %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit141, %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit136 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %31) - br label %46 + br label %45 -69: ; preds = %56 - %70 = and i8 %37, -8 - %71 = icmp eq i8 %70, -16 - %72 = icmp ugt i64 %2, 3 - %or.cond2 = and i1 %72, %71 +68: ; preds = %55 + %69 = and i8 %37, -8 + %70 = icmp eq i8 %69, -16 + %71 = icmp ugt i64 %2, 3 + %or.cond2 = and i1 %71, %70 br i1 %or.cond2, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158", label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157 -"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit142": ; preds = %56 +"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit142": ; preds = %55 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) call void @_ZN4core3str8converts9from_utf817hca39c4a07e0467cbE(ptr noalias nocapture noundef nonnull sret({ i64, [2 x i64] }) align 8 dereferenceable(24) %25, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef 3) - %73 = load i64, ptr %25, align 8, !range !79, !noundef !9 - %trunc121 = trunc nuw i64 %73 to i1 + %72 = load i64, ptr %25, align 8, !range !79, !noundef !9 + %trunc121 = trunc nuw i64 %72 to i1 br i1 %trunc121, label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit152, label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit147 _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit147: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit142" call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) - %74 = getelementptr inbounds i8, ptr %25, i64 8 - %75 = load ptr, ptr %74, align 8, !nonnull !9, !align !33, !noundef !9 - %76 = getelementptr inbounds i8, ptr %25, i64 16 - %77 = load i64, ptr %76, align 8, !noundef !9 - store ptr %75, ptr %24, align 8 - %78 = getelementptr inbounds i8, ptr %24, i64 8 - store i64 %77, ptr %78, align 8 + %73 = getelementptr inbounds i8, ptr %25, i64 8 + %74 = load ptr, ptr %73, align 8, !nonnull !9, !align !33, !noundef !9 + %75 = getelementptr inbounds i8, ptr %25, i64 16 + %76 = load i64, ptr %75, align 8, !noundef !9 + store ptr %74, ptr %24, align 8 + %77 = getelementptr inbounds i8, ptr %24, i64 8 + store i64 %76, ptr %77, align 8 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) store ptr %24, ptr %23, align 8 - %79 = getelementptr inbounds i8, ptr %23, i64 8 - store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h2bec81bbc93d343fE", ptr %79, align 8 + %78 = getelementptr inbounds i8, ptr %23, i64 8 + store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h2bec81bbc93d343fE", ptr %78, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %22) store i64 2, ptr %22, align 8 %.sroa.543.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 16 @@ -1032,13 +1031,13 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit147: ; preds = %"_ZN106_$LT$core..o call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %22) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) - br label %81 + br label %80 _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit152: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit142" call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) store ptr %35, ptr %21, align 8 - %80 = getelementptr inbounds i8, ptr %21, i64 8 - store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %80, align 8 + %79 = getelementptr inbounds i8, ptr %21, i64 8 + store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %79, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %20) store i64 2, ptr %20, align 8 %.sroa.554.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 16 @@ -1069,17 +1068,17 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit152: ; preds = %"_ZN106_$LT$core..o call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5), !noalias !119 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) - br label %81 + br label %80 -81: ; preds = %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit152, %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit147 +80: ; preds = %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit152, %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit147 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) - br label %46 + br label %45 -_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157: ; preds = %69 +_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157: ; preds = %68 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) store ptr %35, ptr %11, align 8 - %82 = getelementptr inbounds i8, ptr %11, i64 8 - store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %82, align 8 + %81 = getelementptr inbounds i8, ptr %11, i64 8 + store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %81, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) store i64 2, ptr %10, align 8 %.sroa.587.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 16 @@ -1110,29 +1109,29 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157: ; preds = %69 call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4), !noalias !132 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) - br label %46 + br label %45 -"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158": ; preds = %69 +"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158": ; preds = %68 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) call void @_ZN4core3str8converts9from_utf817hca39c4a07e0467cbE(ptr noalias nocapture noundef nonnull sret({ i64, [2 x i64] }) align 8 dereferenceable(24) %19, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef 4) - %83 = load i64, ptr %19, align 8, !range !79, !noundef !9 - %trunc = trunc nuw i64 %83 to i1 - br i1 %trunc, label %96, label %84 + %82 = load i64, ptr %19, align 8, !range !79, !noundef !9 + %trunc = trunc nuw i64 %82 to i1 + br i1 %trunc, label %95, label %83 -84: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158" +83: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158" call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) - %85 = getelementptr inbounds i8, ptr %19, i64 8 - %86 = load ptr, ptr %85, align 8, !nonnull !9, !align !33, !noundef !9 - %87 = getelementptr inbounds i8, ptr %19, i64 16 - %88 = load i64, ptr %87, align 8, !noundef !9 - store ptr %86, ptr %18, align 8 - %89 = getelementptr inbounds i8, ptr %18, i64 8 - store i64 %88, ptr %89, align 8 + %84 = getelementptr inbounds i8, ptr %19, i64 8 + %85 = load ptr, ptr %84, align 8, !nonnull !9, !align !33, !noundef !9 + %86 = getelementptr inbounds i8, ptr %19, i64 16 + %87 = load i64, ptr %86, align 8, !noundef !9 + store ptr %85, ptr %18, align 8 + %88 = getelementptr inbounds i8, ptr %18, i64 8 + store i64 %87, ptr %88, align 8 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %17) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) store ptr %18, ptr %16, align 8 - %90 = getelementptr inbounds i8, ptr %16, i64 8 - store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h2bec81bbc93d343fE", ptr %90, align 8 + %89 = getelementptr inbounds i8, ptr %16, i64 8 + store ptr @"_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17h2bec81bbc93d343fE", ptr %89, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) store i64 2, ptr %15, align 8 %.sroa.565.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 16 @@ -1148,29 +1147,29 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157: ; preds = %69 %.sroa.1070.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 48 store i8 1, ptr %.sroa.1070.0..sroa_idx, align 8 store ptr @anon.bcb2ad54d7f72eda4f6359c0592d322e.147, ptr %17, align 8 - %91 = getelementptr inbounds i8, ptr %17, i64 8 - store i64 1, ptr %91, align 8 - %92 = getelementptr inbounds i8, ptr %17, i64 32 - store ptr %15, ptr %92, align 8 - %93 = getelementptr inbounds i8, ptr %17, i64 40 - store i64 1, ptr %93, align 8 - %94 = getelementptr inbounds i8, ptr %17, i64 16 - store ptr %16, ptr %94, align 8 - %95 = getelementptr inbounds i8, ptr %17, i64 24 - store i64 1, ptr %95, align 8 + %90 = getelementptr inbounds i8, ptr %17, i64 8 + store i64 1, ptr %90, align 8 + %91 = getelementptr inbounds i8, ptr %17, i64 32 + store ptr %15, ptr %91, align 8 + %92 = getelementptr inbounds i8, ptr %17, i64 40 + store i64 1, ptr %92, align 8 + %93 = getelementptr inbounds i8, ptr %17, i64 16 + store ptr %16, ptr %93, align 8 + %94 = getelementptr inbounds i8, ptr %17, i64 24 + store i64 1, ptr %94, align 8 call fastcc void @_ZN5alloc3fmt6format17h7ead8f60e83381d7E(ptr noalias nocapture noundef align 8 dereferenceable(24) %0, ptr noalias nocapture noundef align 8 dereferenceable(48) %17) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %17) call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) - br label %103 + br label %102 -96: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158" +95: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17hcd0fc3da9b484348E.exit158" call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %14) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) store ptr %35, ptr %13, align 8 - %97 = getelementptr inbounds i8, ptr %13, i64 8 - store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %97, align 8 + %96 = getelementptr inbounds i8, ptr %13, i64 8 + store ptr @"_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Octal$u20$for$u20$u8$GT$3fmt17h6ce9fcedb28bfa1fE", ptr %96, align 8 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) store i64 2, ptr %12, align 8 %.sroa.576.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 16 @@ -1186,25 +1185,25 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit157: ; preds = %69 %.sroa.1081.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 48 store i8 3, ptr %.sroa.1081.0..sroa_idx, align 8 store ptr @anon.bcb2ad54d7f72eda4f6359c0592d322e.190, ptr %14, align 8 - %98 = getelementptr inbounds i8, ptr %14, i64 8 - store i64 1, ptr %98, align 8 - %99 = getelementptr inbounds i8, ptr %14, i64 32 - store ptr %12, ptr %99, align 8 - %100 = getelementptr inbounds i8, ptr %14, i64 40 - store i64 1, ptr %100, align 8 - %101 = getelementptr inbounds i8, ptr %14, i64 16 - store ptr %13, ptr %101, align 8 - %102 = getelementptr inbounds i8, ptr %14, i64 24 - store i64 1, ptr %102, align 8 + %97 = getelementptr inbounds i8, ptr %14, i64 8 + store i64 1, ptr %97, align 8 + %98 = getelementptr inbounds i8, ptr %14, i64 32 + store ptr %12, ptr %98, align 8 + %99 = getelementptr inbounds i8, ptr %14, i64 40 + store i64 1, ptr %99, align 8 + %100 = getelementptr inbounds i8, ptr %14, i64 16 + store ptr %13, ptr %100, align 8 + %101 = getelementptr inbounds i8, ptr %14, i64 24 + store i64 1, ptr %101, align 8 call fastcc void @_ZN5alloc3fmt6format17h7ead8f60e83381d7E(ptr noalias nocapture noundef align 8 dereferenceable(24) %0, ptr noalias nocapture noundef align 8 dereferenceable(48) %14) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) - br label %103 + br label %102 -103: ; preds = %96, %84 +102: ; preds = %95, %83 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) - br label %46 + br label %45 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/crow/optimized/example.cpp.ll b/bench/crow/optimized/example.cpp.ll index 05d666669ee..ded4a163334 100644 --- a/bench/crow/optimized/example.cpp.ll +++ b/bench/crow/optimized/example.cpp.ll @@ -69968,7 +69968,7 @@ define linkonce_odr dso_local noundef i32 @_ZN4asio6detail10socket_ops9inet_pton store i32 22, ptr %4, align 8, !tbaa !97 %27 = getelementptr inbounds i8, ptr %4, i64 8 store ptr @_ZZN4asio15system_categoryEvE8instance, ptr %27, align 8, !tbaa !28 - br label %83 + br label %82 28: ; preds = %13 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %6, ptr align 1 %1, i64 %16, i1 false) @@ -70005,7 +70005,7 @@ define linkonce_odr dso_local noundef i32 @_ZN4asio6detail10socket_ops9inet_pton 46: ; preds = %43 %47 = icmp eq i32 %35, 0 - br i1 %47, label %48, label %83 + br i1 %47, label %48, label %82 48: ; preds = %46 %49 = load atomic i8, ptr @_ZGVZN4asio15system_categoryEvE8instance acquire, align 8 @@ -70025,20 +70025,20 @@ define linkonce_odr dso_local noundef i32 @_ZN4asio6detail10socket_ops9inet_pton 56: ; preds = %54, %51, %48 store i32 22, ptr %4, align 8, !tbaa !97 store ptr @_ZZN4asio15system_categoryEvE8instance, ptr %44, align 8, !tbaa !28 - br label %83 + br label %82 57: ; preds = %43 %58 = icmp ne ptr %3, null %59 = and i1 %8, %58 - br i1 %59, label %60, label %83 + br i1 %59, label %60, label %82 60: ; preds = %57 store i64 0, ptr %3, align 8, !tbaa !10 - br i1 %31, label %83, label %61 + br i1 %31, label %82, label %61 61: ; preds = %60 %62 = load i8, ptr %2, align 4, !tbaa !14 - switch i8 %62, label %78 [ + switch i8 %62, label %77 [ i8 -2, label %68 i8 -1, label %63 ] @@ -70048,35 +70048,34 @@ define linkonce_odr dso_local noundef i32 @_ZN4asio6detail10socket_ops9inet_pton %65 = load i8, ptr %64, align 1, !tbaa !14 %66 = and i8 %65, 15 %67 = icmp eq i8 %66, 2 - br i1 %67, label %73, label %78 + br i1 %67, label %72, label %77 68: ; preds = %61 %69 = getelementptr inbounds i8, ptr %2, i64 1 %70 = load i8, ptr %69, align 1, !tbaa !14 - %71 = and i8 %70, -64 - %72 = icmp eq i8 %71, -128 - br i1 %72, label %73, label %78 - -73: ; preds = %68, %63 - %74 = getelementptr inbounds i8, ptr %32, i64 1 - %75 = call i32 @if_nametoindex(ptr noundef nonnull %74) #36 - %76 = zext i32 %75 to i64 - store i64 %76, ptr %3, align 8, !tbaa !10 - %77 = icmp eq i32 %75, 0 - br i1 %77, label %78, label %83 - -78: ; preds = %73, %68, %63, %61 - %79 = getelementptr inbounds i8, ptr %32, i64 1 - %80 = call i64 @strtol(ptr nocapture noundef nonnull %79, ptr noundef null, i32 noundef 10) #36 - %81 = shl i64 %80, 32 - %82 = ashr exact i64 %81, 32 - store i64 %82, ptr %3, align 8, !tbaa !10 - br label %83 + %71 = icmp slt i8 %70, -64 + br i1 %71, label %72, label %77 + +72: ; preds = %68, %63 + %73 = getelementptr inbounds i8, ptr %32, i64 1 + %74 = call i32 @if_nametoindex(ptr noundef nonnull %73) #36 + %75 = zext i32 %74 to i64 + store i64 %75, ptr %3, align 8, !tbaa !10 + %76 = icmp eq i32 %74, 0 + br i1 %76, label %77, label %82 + +77: ; preds = %72, %68, %63, %61 + %78 = getelementptr inbounds i8, ptr %32, i64 1 + %79 = call i64 @strtol(ptr nocapture noundef nonnull %78, ptr noundef null, i32 noundef 10) #36 + %80 = shl i64 %79, 32 + %81 = ashr exact i64 %80, 32 + store i64 %81, ptr %3, align 8, !tbaa !10 + br label %82 -83: ; preds = %78, %73, %60, %57, %56, %46, %26 - %84 = phi i32 [ 0, %26 ], [ %34, %73 ], [ %34, %78 ], [ %34, %60 ], [ %34, %57 ], [ %34, %56 ], [ %34, %46 ] +82: ; preds = %77, %72, %60, %57, %56, %46, %26 + %83 = phi i32 [ 0, %26 ], [ %34, %72 ], [ %34, %77 ], [ %34, %60 ], [ %34, %57 ], [ %34, %56 ], [ %34, %46 ] call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #36 - ret i32 %84 + ret i32 %83 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) @@ -117738,7 +117737,7 @@ define linkonce_odr dso_local noundef ptr @_ZN4asio6detail10socket_ops9inet_ntop 22: ; preds = %19 %23 = icmp eq i32 %11, 0 - br i1 %23, label %24, label %59 + br i1 %23, label %24, label %58 24: ; preds = %22 %25 = load atomic i8, ptr @_ZGVZN4asio15system_categoryEvE8instance acquire, align 8 @@ -117758,19 +117757,19 @@ define linkonce_odr dso_local noundef ptr @_ZN4asio6detail10socket_ops9inet_ntop 32: ; preds = %30, %27, %24 store i32 22, ptr %5, align 8, !tbaa !97 store ptr @_ZZN4asio15system_categoryEvE8instance, ptr %20, align 8, !tbaa !28 - br label %59 + br label %58 33: ; preds = %19 %34 = icmp eq i32 %0, 10 %35 = icmp ne i64 %4, 0 %36 = and i1 %34, %35 - br i1 %36, label %37, label %59 + br i1 %36, label %37, label %58 37: ; preds = %33 call void @llvm.lifetime.start.p0(i64 22, ptr nonnull %7) #36 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(22) %7, ptr noundef nonnull align 16 dereferenceable(22) @__const._ZN4asio6detail10socket_ops9inet_ntopEiPKvPcmmRSt10error_code.if_name, i64 22, i1 false) %38 = load i8, ptr %1, align 4, !tbaa !14 - switch i8 %38, label %54 [ + switch i8 %38, label %53 [ i8 -2, label %44 i8 -1, label %39 ] @@ -117780,33 +117779,32 @@ define linkonce_odr dso_local noundef ptr @_ZN4asio6detail10socket_ops9inet_ntop %41 = load i8, ptr %40, align 1, !tbaa !14 %42 = and i8 %41, 15 %43 = icmp eq i8 %42, 2 - br i1 %43, label %49, label %54 + br i1 %43, label %48, label %53 44: ; preds = %37 %45 = getelementptr inbounds i8, ptr %1, i64 1 %46 = load i8, ptr %45, align 1, !tbaa !14 - %47 = and i8 %46, -64 - %48 = icmp eq i8 %47, -128 - br i1 %48, label %49, label %54 + %47 = icmp slt i8 %46, -64 + br i1 %47, label %48, label %53 -49: ; preds = %44, %39 - %50 = trunc i64 %4 to i32 - %51 = getelementptr inbounds i8, ptr %7, i64 1 - %52 = call ptr @if_indextoname(i32 noundef %50, ptr noundef nonnull %51) #36 - %53 = icmp eq ptr %52, null - br i1 %53, label %54, label %57 +48: ; preds = %44, %39 + %49 = trunc i64 %4 to i32 + %50 = getelementptr inbounds i8, ptr %7, i64 1 + %51 = call ptr @if_indextoname(i32 noundef %49, ptr noundef nonnull %50) #36 + %52 = icmp eq ptr %51, null + br i1 %52, label %53, label %56 -54: ; preds = %49, %44, %39, %37 - %55 = getelementptr inbounds i8, ptr %7, i64 1 - %56 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %55, ptr noundef nonnull dereferenceable(1) @.str.584, i64 noundef %4) #36 - br label %57 +53: ; preds = %48, %44, %39, %37 + %54 = getelementptr inbounds i8, ptr %7, i64 1 + %55 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %54, ptr noundef nonnull dereferenceable(1) @.str.584, i64 noundef %4) #36 + br label %56 -57: ; preds = %54, %49 - %58 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %7) #36 +56: ; preds = %53, %48 + %57 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %7) #36 call void @llvm.lifetime.end.p0(i64 22, ptr nonnull %7) #36 - br label %59 + br label %58 -59: ; preds = %57, %33, %32, %22 +58: ; preds = %56, %33, %32, %22 ret ptr %10 } diff --git a/bench/duckdb/optimized/ub_duckdb_func_ops_main.cpp.ll b/bench/duckdb/optimized/ub_duckdb_func_ops_main.cpp.ll index 9dea3e650b5..15967db7708 100644 --- a/bench/duckdb/optimized/ub_duckdb_func_ops_main.cpp.ll +++ b/bench/duckdb/optimized/ub_duckdb_func_ops_main.cpp.ll @@ -13614,8 +13614,7 @@ unreachable.i: ; preds = %invoke.cont3.i unreachable _ZN6duckdb14NegateOperator9OperationIiiEET0_T_.exit: ; preds = %entry - %input.sroa.2.0.extract.shift.mask = and i64 %input.coerce0, -4294967296 - %cmp.i.not.i8 = icmp eq i64 %input.sroa.2.0.extract.shift.mask, -9223372036854775808 + %cmp.i.not.i8 = icmp slt i64 %input.coerce0, -9223372032559808512 br i1 %cmp.i.not.i8, label %if.then.i10, label %_ZN6duckdb14NegateOperator9OperationIiiEET0_T_.exit27 if.then.i10: ; preds = %_ZN6duckdb14NegateOperator9OperationIiiEET0_T_.exit @@ -13721,6 +13720,7 @@ unreachable.i48: ; preds = %invoke.cont3.i47 unreachable _ZN6duckdb14NegateOperator9OperationIllEET0_T_.exit: ; preds = %_ZN6duckdb14NegateOperator9OperationIiiEET0_T_.exit27 + %input.sroa.2.0.extract.shift.mask = and i64 %input.coerce0, -4294967296 %sub.i = sub nsw i64 0, %input.coerce0 %sub.i31 = sub nsw i64 0, %input.coerce1 %retval.sroa.0.0.insert.ext = and i64 %sub.i, 4294967295 diff --git a/bench/duckdb/optimized/ub_duckdb_func_string_regexp.cpp.ll b/bench/duckdb/optimized/ub_duckdb_func_string_regexp.cpp.ll index 066e695cdb7..5eba50769e5 100644 --- a/bench/duckdb/optimized/ub_duckdb_func_string_regexp.cpp.ll +++ b/bench/duckdb/optimized/ub_duckdb_func_string_regexp.cpp.ll @@ -957,8 +957,7 @@ land.rhs: ; preds = %while.body, %land.r %consumed.033 = phi i64 [ %inc11, %while.body ], [ 1, %land.rhs.preheader ] %arrayidx.i = getelementptr inbounds i8, ptr %4, i64 %add634 %8 = load i8, ptr %arrayidx.i, align 1, !tbaa !26 - %9 = and i8 %8, -64 - %cmp.i.not = icmp eq i8 %9, -128 + %cmp.i.not = icmp slt i8 %8, -64 br i1 %cmp.i.not, label %while.body, label %if.end12 while.body: ; preds = %land.rhs @@ -1042,7 +1041,7 @@ for.cond: ; preds = %if.end45 %conv9 = trunc i64 %8 to i32 %call1.i = call noundef i32 @_ZNK10duckdb_re23RE28AnchoredEv(ptr noundef nonnull align 8 dereferenceable(212) %pattern) %add.i = add nsw i32 %conv9, 1 - %call2.i = call noundef zeroext i1 @_ZNK10duckdb_re23RE25MatchERKNS_11StringPieceEmmNS0_6AnchorEPS1_i(ptr noundef nonnull align 8 dereferenceable(212) %pattern, ptr noundef nonnull align 8 dereferenceable(16) %input, i64 noundef %add13.i141, i64 noundef %35, i32 noundef %call1.i, ptr noundef %7, i32 noundef %add.i) + %call2.i = call noundef zeroext i1 @_ZNK10duckdb_re23RE25MatchERKNS_11StringPieceEmmNS0_6AnchorEPS1_i(ptr noundef nonnull align 8 dereferenceable(212) %pattern, ptr noundef nonnull align 8 dereferenceable(16) %input, i64 noundef %add13.i141, i64 noundef %34, i32 noundef %call1.i, ptr noundef %7, i32 noundef %add.i) br i1 %call2.i, label %if.end.i, label %cleanup52, !llvm.loop !71 if.end.i: ; preds = %for.cond, %if.end.i.lr.ph @@ -1079,8 +1078,7 @@ land.rhs.i: ; preds = %while.body.i, %land %consumed.033.i = phi i64 [ %inc11.i, %while.body.i ], [ 1, %land.rhs.preheader.i ] %arrayidx.i.i = getelementptr inbounds i8, ptr %12, i64 %add634.i %15 = load i8, ptr %arrayidx.i.i, align 1, !tbaa !26 - %16 = and i8 %15, -64 - %cmp.i.not.i = icmp eq i8 %16, -128 + %cmp.i.not.i = icmp slt i8 %15, -64 br i1 %cmp.i.not.i, label %while.body.i, label %for.body while.body.i: ; preds = %land.rhs.i @@ -1104,8 +1102,8 @@ if.then12: ; preds = %for.body to label %invoke.cont unwind label %ehcleanup.thread invoke.cont: ; preds = %if.then12 - %17 = load i64, ptr %args, align 8, !tbaa !68 - invoke void @_ZN6duckdb21InvalidInputExceptionC2IJmiEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpT_(ptr noundef nonnull align 8 dereferenceable(80) %exception, ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp, i64 noundef %17, i32 noundef %group) + %16 = load i64, ptr %args, align 8, !tbaa !68 + invoke void @_ZN6duckdb21InvalidInputExceptionC2IJmiEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpT_(ptr noundef nonnull align 8 dereferenceable(80) %exception, ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp, i64 noundef %16, i32 noundef %group) to label %invoke.cont16 unwind label %lpad15 invoke.cont16: ; preds = %invoke.cont @@ -1113,7 +1111,7 @@ invoke.cont16: ; preds = %invoke.cont to label %unreachable unwind label %lpad15 ehcleanup.thread: ; preds = %if.then12 - %18 = landingpad { ptr, i32 } + %17 = landingpad { ptr, i32 } cleanup call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ref.tmp13) #19 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %ref.tmp) #19 @@ -1121,35 +1119,35 @@ ehcleanup.thread: ; preds = %if.then12 lpad15: ; preds = %invoke.cont16, %invoke.cont %cleanup.isactive.0 = phi i1 [ false, %invoke.cont16 ], [ true, %invoke.cont ] - %19 = landingpad { ptr, i32 } + %18 = landingpad { ptr, i32 } cleanup - %20 = load ptr, ptr %ref.tmp, align 8, !tbaa !25 - %21 = getelementptr inbounds i8, ptr %ref.tmp, i64 16 - %cmp.i.i.i113 = icmp eq ptr %20, %21 + %19 = load ptr, ptr %ref.tmp, align 8, !tbaa !25 + %20 = getelementptr inbounds i8, ptr %ref.tmp, i64 16 + %cmp.i.i.i113 = icmp eq ptr %19, %20 br i1 %cmp.i.i.i113, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %ehcleanup _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %lpad15 %_M_string_length.i.i.i = getelementptr inbounds i8, ptr %ref.tmp, i64 8 - %22 = load i64, ptr %_M_string_length.i.i.i, align 8, !tbaa !21 - %cmp3.i.i.i = icmp ult i64 %22, 16 + %21 = load i64, ptr %_M_string_length.i.i.i, align 8, !tbaa !21 + %cmp3.i.i.i = icmp ult i64 %21, 16 call void @llvm.assume(i1 %cmp3.i.i.i) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ref.tmp13) #19 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %ref.tmp) #19 br i1 %cleanup.isactive.0, label %cleanup.action, label %cleanup.done ehcleanup: ; preds = %lpad15 - call void @_ZdlPv(ptr noundef %20) #21 + call void @_ZdlPv(ptr noundef %19) #21 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ref.tmp13) #19 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %ref.tmp) #19 br i1 %cleanup.isactive.0, label %cleanup.action, label %cleanup.done cleanup.action: ; preds = %ehcleanup, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, %ehcleanup.thread - %.pn145 = phi { ptr, i32 } [ %18, %ehcleanup.thread ], [ %19, %ehcleanup ], [ %19, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i ] + %.pn145 = phi { ptr, i32 } [ %17, %ehcleanup.thread ], [ %18, %ehcleanup ], [ %18, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i ] call void @__cxa_free_exception(ptr %exception) #19 br label %cleanup.done cleanup.done: ; preds = %cleanup.action, %ehcleanup, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i - %.pn144 = phi { ptr, i32 } [ %.pn145, %cleanup.action ], [ %19, %ehcleanup ], [ %19, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i ] + %.pn144 = phi { ptr, i32 } [ %.pn145, %cleanup.action ], [ %18, %ehcleanup ], [ %18, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i ] call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %input) #19 resume { ptr, i32 } %.pn144 @@ -1162,17 +1160,17 @@ if.then22: ; preds = %if.end20 %mul = shl i64 %current_list_capacity.0152, 1 call void @_ZN6duckdb10ListVector7ReserveERNS_6VectorEm(ptr noundef nonnull align 8 dereferenceable(104) %result, i64 noundef %mul) %call23 = call noundef i64 @_ZN6duckdb10ListVector15GetListCapacityERKNS_6VectorE(ptr noundef nonnull align 8 dereferenceable(104) %result) - %23 = load ptr, ptr %data.i.i.i, align 8, !tbaa !56 + %22 = load ptr, ptr %data.i.i.i, align 8, !tbaa !56 br label %if.end25 if.end25: ; preds = %if.then22, %if.end20 %current_list_capacity.1 = phi i64 [ %call23, %if.then22 ], [ %current_list_capacity.0152, %if.end20 ] - %list_content.1 = phi ptr [ %23, %if.then22 ], [ %list_content.0154, %if.end20 ] - %24 = load ptr, ptr %group_buffer, align 8, !tbaa !70 - %arrayidx27 = getelementptr inbounds %"class.duckdb_re2::StringPiece", ptr %24, i64 %conv + %list_content.1 = phi ptr [ %22, %if.then22 ], [ %list_content.0154, %if.end20 ] + %23 = load ptr, ptr %group_buffer, align 8, !tbaa !70 + %arrayidx27 = getelementptr inbounds %"class.duckdb_re2::StringPiece", ptr %23, i64 %conv %size_.i = getelementptr inbounds i8, ptr %arrayidx27, i64 8 - %25 = load i64, ptr %size_.i, align 8, !tbaa !52 - %cmp.i = icmp eq i64 %25, 0 + %24 = load i64, ptr %size_.i, align 8, !tbaa !52 + %cmp.i = icmp eq i64 %24, 0 br i1 %cmp.i, label %if.then29, label %if.else if.then29: ; preds = %if.end25 @@ -1183,45 +1181,45 @@ if.then29: ; preds = %if.end25 %ref.tmp30.sroa.4.0.arrayidx32.sroa_idx = getelementptr inbounds i8, ptr %arrayidx32, i64 4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %ref.tmp30.sroa.4.0.arrayidx32.sroa_idx, ptr noundef nonnull align 4 dereferenceable(12) %ref.tmp30.sroa.4, i64 12, i1 false), !tbaa.struct !73 call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %ref.tmp30.sroa.4) - %26 = load ptr, ptr %arrayidx27, align 8, !tbaa !54 - %cmp34 = icmp eq ptr %26, null + %25 = load ptr, ptr %arrayidx27, align 8, !tbaa !54 + %cmp34 = icmp eq ptr %25, null br i1 %cmp34, label %if.then35, label %if.end45 if.then35: ; preds = %if.then29 - %27 = load ptr, ptr %validity.i, align 8, !tbaa !74 - %tobool.not.i116 = icmp eq ptr %27, null + %26 = load ptr, ptr %validity.i, align 8, !tbaa !74 + %tobool.not.i116 = icmp eq ptr %26, null br i1 %tobool.not.i116, label %if.then.i, label %_ZN6duckdb21TemplatedValidityMaskImE10SetInvalidEm.exit if.then.i: ; preds = %if.then35 - %28 = load i64, ptr %target_count.i, align 8, !tbaa !75 - call void @_ZN6duckdb21TemplatedValidityMaskImE10InitializeEm(ptr noundef nonnull align 8 dereferenceable(32) %validity.i, i64 noundef %28) + %27 = load i64, ptr %target_count.i, align 8, !tbaa !75 + call void @_ZN6duckdb21TemplatedValidityMaskImE10InitializeEm(ptr noundef nonnull align 8 dereferenceable(32) %validity.i, i64 noundef %27) %.pre.i = load ptr, ptr %validity.i, align 8, !tbaa !74 br label %_ZN6duckdb21TemplatedValidityMaskImE10SetInvalidEm.exit _ZN6duckdb21TemplatedValidityMaskImE10SetInvalidEm.exit: ; preds = %if.then.i, %if.then35 - %29 = phi ptr [ %.pre.i, %if.then.i ], [ %27, %if.then35 ] + %28 = phi ptr [ %.pre.i, %if.then.i ], [ %26, %if.then35 ] %div2.i.i.i = lshr i64 %current_list_size.0153, 6 %rem.i.i.i = and i64 %current_list_size.0153, 63 %shl.i.i.i = shl nuw i64 1, %rem.i.i.i %not.i.i.i = xor i64 %shl.i.i.i, -1 - %arrayidx.i.i.i = getelementptr inbounds i64, ptr %29, i64 %div2.i.i.i - %30 = load i64, ptr %arrayidx.i.i.i, align 8, !tbaa !51 - %and.i.i.i = and i64 %30, %not.i.i.i + %arrayidx.i.i.i = getelementptr inbounds i64, ptr %28, i64 %div2.i.i.i + %29 = load i64, ptr %arrayidx.i.i.i, align 8, !tbaa !51 + %and.i.i.i = and i64 %29, %not.i.i.i store i64 %and.i.i.i, ptr %arrayidx.i.i.i, align 8, !tbaa !51 br label %if.end45 if.else: ; preds = %if.end25 - %31 = load ptr, ptr %arrayidx27, align 8, !tbaa !54 - %32 = load i32, ptr %string, align 8, !tbaa !26 - %cmp.i.i118 = icmp ult i32 %32, 13 - %33 = load ptr, ptr %ptr.i.i, align 8 - %cond.i121 = select i1 %cmp.i.i118, ptr %inlined.i.i, ptr %33 - %sub.ptr.lhs.cast = ptrtoint ptr %31 to i64 + %30 = load ptr, ptr %arrayidx27, align 8, !tbaa !54 + %31 = load i32, ptr %string, align 8, !tbaa !26 + %cmp.i.i118 = icmp ult i32 %31, 13 + %32 = load ptr, ptr %ptr.i.i, align 8 + %cond.i121 = select i1 %cmp.i.i118, ptr %inlined.i.i, ptr %32 + %sub.ptr.lhs.cast = ptrtoint ptr %30 to i64 %sub.ptr.rhs.cast = ptrtoint ptr %cond.i121 to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %ref.tmp40.sroa.4) %add.ptr = getelementptr inbounds i8, ptr %cond.i121, i64 %sub.ptr.sub - %conv43 = trunc i64 %25 to i32 + %conv43 = trunc i64 %24 to i32 %cmp.i.i127 = icmp ult i32 %conv43, 13 br i1 %cmp.i.i127, label %if.then.i130, label %if.else.i @@ -1231,13 +1229,13 @@ if.then.i130: ; preds = %if.else br i1 %cmp.i131, label %_ZN6duckdb8string_tC2EPKcj.exit, label %if.end.i132 if.end.i132: ; preds = %if.then.i130 - %conv.i.i133 = and i64 %25, 15 + %conv.i.i133 = and i64 %24, 15 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %ref.tmp40.sroa.4, ptr align 1 %add.ptr, i64 %conv.i.i133, i1 false) br label %_ZN6duckdb8string_tC2EPKcj.exit if.else.i: ; preds = %if.else - %34 = load i32, ptr %add.ptr, align 1 - store i32 %34, ptr %ref.tmp40.sroa.4, align 4 + %33 = load i32, ptr %add.ptr, align 1 + store i32 %33, ptr %ref.tmp40.sroa.4, align 4 store ptr %add.ptr, ptr %ref.tmp40.sroa.4.4.ptr.i129.sroa_idx, align 4, !tbaa !26 br label %_ZN6duckdb8string_tC2EPKcj.exit @@ -1250,14 +1248,14 @@ _ZN6duckdb8string_tC2EPKcj.exit: ; preds = %if.else.i, %if.end. br label %if.end45 if.end45: ; preds = %_ZN6duckdb8string_tC2EPKcj.exit, %_ZN6duckdb21TemplatedValidityMaskImE10SetInvalidEm.exit, %if.then29 - %35 = load i64, ptr %2, align 8, !tbaa !52 - %cmp47.not = icmp ugt i64 %add13.i141, %35 + %34 = load i64, ptr %2, align 8, !tbaa !52 + %cmp47.not = icmp ugt i64 %add13.i141, %34 br i1 %cmp47.not, label %cleanup52, label %for.cond cleanup52: ; preds = %if.end45, %for.cond, %if.end %current_list_size.1 = phi i64 [ %call4, %if.end ], [ %add, %for.cond ], [ %add, %if.end45 ] - %36 = load i64, ptr %arrayidx, align 8, !tbaa !65 - %sub = sub i64 %current_list_size.1, %36 + %35 = load i64, ptr %arrayidx, align 8, !tbaa !65 + %sub = sub i64 %current_list_size.1, %35 %length55 = getelementptr inbounds i8, ptr %arrayidx, i64 8 store i64 %sub, ptr %length55, align 8, !tbaa !67 call void @_ZN6duckdb10ListVector11SetListSizeERNS_6VectorEm(ptr noundef nonnull align 8 dereferenceable(104) %result, i64 noundef %current_list_size.1) diff --git a/bench/eastl/optimized/EAString.cpp.ll b/bench/eastl/optimized/EAString.cpp.ll index 3796fab9924..4a93d4be16a 100644 --- a/bench/eastl/optimized/EAString.cpp.ll +++ b/bench/eastl/optimized/EAString.cpp.ll @@ -2481,40 +2481,39 @@ entry: br i1 %tobool.not4.i, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i - %1 = phi i8 [ %3, %while.body.i ], [ %0, %entry ] + %1 = phi i8 [ %2, %while.body.i ], [ %0, %entry ] %nLength.06.i = phi i64 [ %spec.select.i, %while.body.i ], [ 0, %entry ] %pString.addr.05.i = phi ptr [ %incdec.ptr.i, %while.body.i ], [ %pSource, %entry ] - %2 = and i8 %1, -64 - %cmp.not.i = icmp ne i8 %2, -128 + %cmp.not.i = icmp sgt i8 %1, -65 %inc.i = zext i1 %cmp.not.i to i64 %spec.select.i = add i64 %nLength.06.i, %inc.i %incdec.ptr.i = getelementptr inbounds i8, ptr %pString.addr.05.i, i64 1 - %3 = load i8, ptr %incdec.ptr.i, align 1 - %tobool.not.i = icmp eq i8 %3, 0 + %2 = load i8, ptr %incdec.ptr.i, align 1 + %tobool.not.i = icmp eq i8 %2, 0 br i1 %tobool.not.i, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i, !llvm.loop !58 _ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit: ; preds = %while.body.i, %entry %nLength.0.lcssa.i = phi i64 [ 0, %entry ], [ %spec.select.i, %while.body.i ] - %4 = ptrtoint ptr %pDestination to i64 - %and14.i = and i64 %4, 7 + %3 = ptrtoint ptr %pDestination to i64 + %and14.i = and i64 %3, 7 %tobool.not15.i = icmp eq i64 %and14.i, 0 br i1 %tobool.not15.i, label %for.cond1.i.preheader, label %for.body.i.preheader for.body.i.preheader: ; preds = %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit - %5 = load i16, ptr %pDestination, align 2 - %cmp.i10 = icmp eq i16 %5, 0 + %4 = load i16, ptr %pDestination, align 2 + %cmp.i10 = icmp eq i16 %4, 0 br i1 %cmp.i10, label %_ZN2EA4StdC6StrlenEPKDs.exit, label %for.inc.i for.body.i: ; preds = %for.inc.i - %6 = load i16, ptr %incdec.ptr.i7, align 2 - %cmp.i = icmp eq i16 %6, 0 + %5 = load i16, ptr %incdec.ptr.i7, align 2 + %cmp.i = icmp eq i16 %5, 0 br i1 %cmp.i, label %_ZN2EA4StdC6StrlenEPKDs.exit, label %for.inc.i, !llvm.loop !54 for.inc.i: ; preds = %for.body.i.preheader, %for.body.i %pu.sroa.0.016.i11 = phi ptr [ %incdec.ptr.i7, %for.body.i ], [ %pDestination, %for.body.i.preheader ] %incdec.ptr.i7 = getelementptr inbounds i8, ptr %pu.sroa.0.016.i11, i64 2 - %7 = ptrtoint ptr %incdec.ptr.i7 to i64 - %and.i = and i64 %7, 7 + %6 = ptrtoint ptr %incdec.ptr.i7 to i64 + %and.i = and i64 %6, 7 %tobool.not.i8 = icmp eq i64 %and.i, 0 br i1 %tobool.not.i8, label %for.cond1.i.preheader, label %for.body.i, !llvm.loop !54 @@ -2526,18 +2525,18 @@ for.cond1.i: ; preds = %for.cond1.i.prehead %pu.sroa.0.1.i = phi ptr [ %incdec.ptr8.i, %for.cond1.i ], [ %pu.sroa.0.1.i.ph, %for.cond1.i.preheader ] %add.ptr.i = getelementptr inbounds i8, ptr %pu.sroa.0.1.i, i64 512 tail call void @llvm.prefetch.p0(ptr nonnull %add.ptr.i, i32 0, i32 0, i32 1) - %8 = load i64, ptr %pu.sroa.0.1.i, align 8 - %9 = sub i64 281479271743488, %8 - %10 = or i64 %9, %8 - %11 = and i64 %10, -9223231297218904064 - %tobool4.not.i = icmp eq i64 %11, -9223231297218904064 + %7 = load i64, ptr %pu.sroa.0.1.i, align 8 + %8 = sub i64 281479271743488, %7 + %9 = or i64 %8, %7 + %10 = and i64 %9, -9223231297218904064 + %tobool4.not.i = icmp eq i64 %10, -9223231297218904064 %incdec.ptr8.i = getelementptr inbounds i8, ptr %pu.sroa.0.1.i, i64 8 br i1 %tobool4.not.i, label %for.cond1.i, label %while.cond.i, !llvm.loop !55 while.cond.i: ; preds = %for.cond1.i, %while.cond.i %pu.sroa.0.2.i = phi ptr [ %incdec.ptr11.i, %while.cond.i ], [ %pu.sroa.0.1.i, %for.cond1.i ] - %12 = load i16, ptr %pu.sroa.0.2.i, align 2 - %tobool10.not.i = icmp eq i16 %12, 0 + %11 = load i16, ptr %pu.sroa.0.2.i, align 2 + %tobool10.not.i = icmp eq i16 %11, 0 %incdec.ptr11.i = getelementptr inbounds i8, ptr %pu.sroa.0.2.i, i64 2 br i1 %tobool10.not.i, label %while.end.i, label %while.cond.i, !llvm.loop !56 @@ -2546,8 +2545,8 @@ while.end.i: ; preds = %while.cond.i br label %_ZN2EA4StdC6StrlenEPKDs.exit _ZN2EA4StdC6StrlenEPKDs.exit: ; preds = %for.body.i, %for.body.i.preheader, %while.end.i - %.pn.i = phi i64 [ %sub.ptr.lhs.cast12.i, %while.end.i ], [ %4, %for.body.i.preheader ], [ %7, %for.body.i ] - %retval.0.in.i = sub i64 %.pn.i, %4 + %.pn.i = phi i64 [ %sub.ptr.lhs.cast12.i, %while.end.i ], [ %3, %for.body.i.preheader ], [ %6, %for.body.i ] + %retval.0.in.i = sub i64 %.pn.i, %3 %retval.0.i = ashr exact i64 %retval.0.in.i, 1 %cmp = icmp ugt i64 %nDestCapacity, %retval.0.i br i1 %cmp, label %if.then, label %if.end @@ -2571,16 +2570,15 @@ entry: br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body - %1 = phi i8 [ %3, %while.body ], [ %0, %entry ] + %1 = phi i8 [ %2, %while.body ], [ %0, %entry ] %nLength.06 = phi i64 [ %spec.select, %while.body ], [ 0, %entry ] %pString.addr.05 = phi ptr [ %incdec.ptr, %while.body ], [ %pString, %entry ] - %2 = and i8 %1, -64 - %cmp.not = icmp ne i8 %2, -128 + %cmp.not = icmp sgt i8 %1, -65 %inc = zext i1 %cmp.not to i64 %spec.select = add i64 %nLength.06, %inc %incdec.ptr = getelementptr inbounds i8, ptr %pString.addr.05, i64 1 - %3 = load i8, ptr %incdec.ptr, align 1 - %tobool.not = icmp eq i8 %3, 0 + %2 = load i8, ptr %incdec.ptr, align 1 + %tobool.not = icmp eq i8 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !58 while.end: ; preds = %while.body, %entry @@ -2596,16 +2594,15 @@ entry: br i1 %tobool.not4.i, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i - %1 = phi i8 [ %3, %while.body.i ], [ %0, %entry ] + %1 = phi i8 [ %2, %while.body.i ], [ %0, %entry ] %nLength.06.i = phi i64 [ %spec.select.i, %while.body.i ], [ 0, %entry ] %pString.addr.05.i = phi ptr [ %incdec.ptr.i, %while.body.i ], [ %pSource, %entry ] - %2 = and i8 %1, -64 - %cmp.not.i = icmp ne i8 %2, -128 + %cmp.not.i = icmp sgt i8 %1, -65 %inc.i = zext i1 %cmp.not.i to i64 %spec.select.i = add i64 %nLength.06.i, %inc.i %incdec.ptr.i = getelementptr inbounds i8, ptr %pString.addr.05.i, i64 1 - %3 = load i8, ptr %incdec.ptr.i, align 1 - %tobool.not.i = icmp eq i8 %3, 0 + %2 = load i8, ptr %incdec.ptr.i, align 1 + %tobool.not.i = icmp eq i8 %2, 0 br i1 %tobool.not.i, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i, !llvm.loop !58 _ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit: ; preds = %while.body.i, %entry @@ -2617,8 +2614,8 @@ do.body.i: ; preds = %do.body.i, %_ZN2EA4 %nLength.0.i = phi i64 [ -1, %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit ], [ %inc.i7, %do.body.i ] %inc.i7 = add i64 %nLength.0.i, 1 %incdec.ptr.i8 = getelementptr inbounds i8, ptr %pString.addr.0.i, i64 4 - %4 = load i32, ptr %pString.addr.0.i, align 4 - %tobool.not.i9 = icmp eq i32 %4, 0 + %3 = load i32, ptr %pString.addr.0.i, align 4 + %tobool.not.i9 = icmp eq i32 %3, 0 br i1 %tobool.not.i9, label %_ZN2EA4StdC6StrlenEPKDi.exit, label %do.body.i, !llvm.loop !57 _ZN2EA4StdC6StrlenEPKDi.exit: ; preds = %do.body.i @@ -2696,16 +2693,15 @@ _ZN2EA4StdC6StrlenEPKDs.exit: ; preds = %for.body.i, %for.bo br i1 %tobool.not4.i, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i while.body.i: ; preds = %_ZN2EA4StdC6StrlenEPKDs.exit, %while.body.i - %10 = phi i8 [ %12, %while.body.i ], [ %9, %_ZN2EA4StdC6StrlenEPKDs.exit ] + %10 = phi i8 [ %11, %while.body.i ], [ %9, %_ZN2EA4StdC6StrlenEPKDs.exit ] %nLength.06.i = phi i64 [ %spec.select.i, %while.body.i ], [ 0, %_ZN2EA4StdC6StrlenEPKDs.exit ] %pString.addr.05.i = phi ptr [ %incdec.ptr.i7, %while.body.i ], [ %pDestination, %_ZN2EA4StdC6StrlenEPKDs.exit ] - %11 = and i8 %10, -64 - %cmp.not.i = icmp ne i8 %11, -128 + %cmp.not.i = icmp sgt i8 %10, -65 %inc.i = zext i1 %cmp.not.i to i64 %spec.select.i = add i64 %nLength.06.i, %inc.i %incdec.ptr.i7 = getelementptr inbounds i8, ptr %pString.addr.05.i, i64 1 - %12 = load i8, ptr %incdec.ptr.i7, align 1 - %tobool.not.i8 = icmp eq i8 %12, 0 + %11 = load i8, ptr %incdec.ptr.i7, align 1 + %tobool.not.i8 = icmp eq i8 %11, 0 br i1 %tobool.not.i8, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i, !llvm.loop !58 _ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit: ; preds = %while.body.i, %_ZN2EA4StdC6StrlenEPKDs.exit @@ -2725,12 +2721,12 @@ while.body.i10: ; preds = %if.end89.i, %if.the %destCount.051.i = phi i64 [ %destCount.1.i, %if.end89.i ], [ 0, %if.then ] %dec54.i = add i64 %dec54.in.i, -1 %incdec.ptr.i11 = getelementptr inbounds i8, ptr %pSource.addr.052.i, i64 2 - %13 = load i16, ptr %pSource.addr.052.i, align 2 - %cmp1.i = icmp ult i16 %13, 128 + %12 = load i16, ptr %pSource.addr.052.i, align 2 + %cmp1.i = icmp ult i16 %12, 128 br i1 %cmp1.i, label %if.then.i, label %if.else.i if.then.i: ; preds = %while.body.i10 - %cmp2.i = icmp eq i16 %13, 0 + %cmp2.i = icmp eq i16 %12, 0 br i1 %cmp2.i, label %while.end.loopexit.i, label %if.end.i if.end.i: ; preds = %if.then.i @@ -2743,13 +2739,13 @@ land.lhs.true.i: ; preds = %if.end.i br i1 %cmp4.i, label %if.then5.i, label %if.end89.i if.then5.i: ; preds = %land.lhs.true.i - %conv6.i = trunc nuw i16 %13 to i8 + %conv6.i = trunc nuw i16 %12 to i8 %incdec.ptr7.i = getelementptr inbounds i8, ptr %pDest.addr.053.i, i64 1 store i8 %conv6.i, ptr %pDest.addr.053.i, align 1 br label %if.end89.i if.else.i: ; preds = %while.body.i10 - %cmp10.i = icmp ult i16 %13, 2048 + %cmp10.i = icmp ult i16 %12, 2048 %tobool12.not.i = icmp eq ptr %pDest.addr.053.i, null br i1 %cmp10.i, label %if.then11.i, label %if.then26.i @@ -2762,14 +2758,14 @@ land.lhs.true13.i: ; preds = %if.then11.i br i1 %cmp15.i, label %if.then16.i, label %if.end89.i if.then16.i: ; preds = %land.lhs.true13.i - %shr.i = lshr i16 %13, 6 - %14 = trunc nuw i16 %shr.i to i8 - %conv17.i = or disjoint i8 %14, -64 + %shr.i = lshr i16 %12, 6 + %13 = trunc nuw i16 %shr.i to i8 + %conv17.i = or disjoint i8 %13, -64 %incdec.ptr18.i = getelementptr inbounds i8, ptr %pDest.addr.053.i, i64 1 store i8 %conv17.i, ptr %pDest.addr.053.i, align 1 - %15 = trunc i16 %13 to i8 - %16 = and i8 %15, 63 - %conv20.i = or disjoint i8 %16, -128 + %14 = trunc i16 %12 to i8 + %15 = and i8 %14, 63 + %conv20.i = or disjoint i8 %15, -128 %incdec.ptr21.i = getelementptr inbounds i8, ptr %pDest.addr.053.i, i64 2 store i8 %conv20.i, ptr %incdec.ptr18.i, align 1 br label %if.end89.i @@ -2783,20 +2779,20 @@ land.lhs.true28.i: ; preds = %if.then26.i br i1 %cmp30.i, label %if.then31.i, label %if.end89.i if.then31.i: ; preds = %land.lhs.true28.i - %shr32.i = lshr i16 %13, 12 - %17 = trunc nuw nsw i16 %shr32.i to i8 - %conv34.i = or disjoint i8 %17, -32 + %shr32.i = lshr i16 %12, 12 + %16 = trunc nuw nsw i16 %shr32.i to i8 + %conv34.i = or disjoint i8 %16, -32 %incdec.ptr35.i = getelementptr inbounds i8, ptr %pDest.addr.053.i, i64 1 store i8 %conv34.i, ptr %pDest.addr.053.i, align 1 - %shr36.i = lshr i16 %13, 6 - %18 = trunc i16 %shr36.i to i8 - %19 = and i8 %18, 63 - %conv39.i = or disjoint i8 %19, -128 + %shr36.i = lshr i16 %12, 6 + %17 = trunc i16 %shr36.i to i8 + %18 = and i8 %17, 63 + %conv39.i = or disjoint i8 %18, -128 %incdec.ptr40.i = getelementptr inbounds i8, ptr %pDest.addr.053.i, i64 2 store i8 %conv39.i, ptr %incdec.ptr35.i, align 1 - %20 = trunc i16 %13 to i8 - %21 = and i8 %20, 63 - %conv43.i = or disjoint i8 %21, -128 + %19 = trunc i16 %12 to i8 + %20 = and i8 %19, 63 + %conv43.i = or disjoint i8 %20, -128 %incdec.ptr44.i = getelementptr inbounds i8, ptr %pDest.addr.053.i, i64 3 store i8 %conv43.i, ptr %incdec.ptr40.i, align 1 br label %if.end89.i @@ -2843,16 +2839,15 @@ _ZN2EA4StdC6StrlenEPKDi.exit: ; preds = %do.body.i br i1 %tobool.not4.i, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i while.body.i: ; preds = %_ZN2EA4StdC6StrlenEPKDi.exit, %while.body.i - %2 = phi i8 [ %4, %while.body.i ], [ %1, %_ZN2EA4StdC6StrlenEPKDi.exit ] + %2 = phi i8 [ %3, %while.body.i ], [ %1, %_ZN2EA4StdC6StrlenEPKDi.exit ] %nLength.06.i = phi i64 [ %spec.select.i, %while.body.i ], [ 0, %_ZN2EA4StdC6StrlenEPKDi.exit ] %pString.addr.05.i = phi ptr [ %incdec.ptr.i8, %while.body.i ], [ %pDestination, %_ZN2EA4StdC6StrlenEPKDi.exit ] - %3 = and i8 %2, -64 - %cmp.not.i = icmp ne i8 %3, -128 + %cmp.not.i = icmp sgt i8 %2, -65 %inc.i7 = zext i1 %cmp.not.i to i64 %spec.select.i = add i64 %nLength.06.i, %inc.i7 %incdec.ptr.i8 = getelementptr inbounds i8, ptr %pString.addr.05.i, i64 1 - %4 = load i8, ptr %incdec.ptr.i8, align 1 - %tobool.not.i9 = icmp eq i8 %4, 0 + %3 = load i8, ptr %incdec.ptr.i8, align 1 + %tobool.not.i9 = icmp eq i8 %3, 0 br i1 %tobool.not.i9, label %_ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit, label %while.body.i, !llvm.loop !58 _ZN2EA4StdC17StrlenUTF8DecodedEPKc.exit: ; preds = %while.body.i, %_ZN2EA4StdC6StrlenEPKDi.exit diff --git a/bench/eastl/optimized/EATextUtil.cpp.ll b/bench/eastl/optimized/EATextUtil.cpp.ll index 859706f7b0a..c48af0d74c7 100644 --- a/bench/eastl/optimized/EATextUtil.cpp.ll +++ b/bench/eastl/optimized/EATextUtil.cpp.ll @@ -285,16 +285,15 @@ entry: br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body - %1 = phi i8 [ %3, %while.body ], [ %0, %entry ] + %1 = phi i8 [ %2, %while.body ], [ %0, %entry ] %n.06 = phi i64 [ %spec.select, %while.body ], [ 0, %entry ] %p.addr.05 = phi ptr [ %incdec.ptr, %while.body ], [ %p, %entry ] - %2 = and i8 %1, -64 - %cmp.not = icmp ne i8 %2, -128 + %cmp.not = icmp sgt i8 %1, -65 %inc = zext i1 %cmp.not to i64 %spec.select = add i64 %n.06, %inc %incdec.ptr = getelementptr inbounds i8, ptr %p.addr.05, i64 1 - %3 = load i8, ptr %incdec.ptr, align 1 - %tobool.not = icmp eq i8 %3, 0 + %2 = load i8, ptr %incdec.ptr, align 1 + %tobool.not = icmp eq i8 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !8 while.end: ; preds = %while.body, %entry diff --git a/bench/flac/optimized/format.c.ll b/bench/flac/optimized/format.c.ll index 8518349cc2e..4e515fff24e 100644 --- a/bench/flac/optimized/format.c.ll +++ b/bench/flac/optimized/format.c.ll @@ -419,8 +419,7 @@ if.else: ; preds = %entry land.lhs.true: ; preds = %if.else %arrayidx7 = getelementptr inbounds i8, ptr %utf8, i64 1 %1 = load i8, ptr %arrayidx7, align 1 - %2 = and i8 %1, -64 - %cmp10 = icmp eq i8 %2, -128 + %cmp10 = icmp slt i8 %1, -64 br i1 %cmp10, label %if.then12, label %if.else19 if.then12: ; preds = %land.lhs.true @@ -430,23 +429,22 @@ if.then12: ; preds = %land.lhs.true br label %return if.else19: ; preds = %land.lhs.true, %if.else - %3 = and i8 %0, -16 - %cmp23 = icmp eq i8 %3, -32 + %2 = and i8 %0, -16 + %cmp23 = icmp eq i8 %2, -32 br i1 %cmp23, label %land.lhs.true25, label %if.else79 land.lhs.true25: ; preds = %if.else19 %arrayidx26 = getelementptr inbounds i8, ptr %utf8, i64 1 - %4 = load i8, ptr %arrayidx26, align 1 - %conv27 = zext i8 %4 to i32 + %3 = load i8, ptr %arrayidx26, align 1 + %conv27 = zext i8 %3 to i32 %and28 = and i32 %conv27, 192 %cmp29 = icmp eq i32 %and28, 128 br i1 %cmp29, label %land.lhs.true31, label %if.else79 land.lhs.true31: ; preds = %land.lhs.true25 %arrayidx32 = getelementptr inbounds i8, ptr %utf8, i64 2 - %5 = load i8, ptr %arrayidx32, align 1 - %6 = and i8 %5, -64 - %cmp35 = icmp eq i8 %6, -128 + %4 = load i8, ptr %arrayidx32, align 1 + %cmp35 = icmp slt i8 %4, -64 br i1 %cmp35, label %if.then37, label %if.else79 if.then37: ; preds = %land.lhs.true31 @@ -463,14 +461,14 @@ if.end49: ; preds = %if.then37 ] land.lhs.true54: ; preds = %if.end49 - %7 = and i8 %4, -32 - %cmp58 = icmp eq i8 %7, -96 + %5 = and i8 %3, -32 + %cmp58 = icmp eq i8 %5, -96 br i1 %cmp58, label %return, label %if.end78 land.lhs.true66: ; preds = %if.end49 - %cmp69 = icmp eq i8 %4, -65 - %8 = and i8 %5, -66 - %cmp75 = icmp eq i8 %8, -66 + %cmp69 = icmp eq i8 %3, -65 + %6 = and i8 %4, -66 + %cmp75 = icmp eq i8 %6, -66 %or.cond41 = and i1 %cmp69, %cmp75 br i1 %or.cond41, label %return, label %if.end78 @@ -478,30 +476,28 @@ if.end78: ; preds = %if.end49, %land.lhs br label %return if.else79: ; preds = %land.lhs.true31, %land.lhs.true25, %if.else19 - %9 = and i8 %0, -8 - %cmp83 = icmp eq i8 %9, -16 + %7 = and i8 %0, -8 + %cmp83 = icmp eq i8 %7, -16 br i1 %cmp83, label %land.lhs.true85, label %if.else116 land.lhs.true85: ; preds = %if.else79 %arrayidx86 = getelementptr inbounds i8, ptr %utf8, i64 1 - %10 = load i8, ptr %arrayidx86, align 1 - %conv87 = zext i8 %10 to i32 + %8 = load i8, ptr %arrayidx86, align 1 + %conv87 = zext i8 %8 to i32 %and88 = and i32 %conv87, 192 %cmp89 = icmp eq i32 %and88, 128 br i1 %cmp89, label %land.lhs.true91, label %if.else116 land.lhs.true91: ; preds = %land.lhs.true85 %arrayidx92 = getelementptr inbounds i8, ptr %utf8, i64 2 - %11 = load i8, ptr %arrayidx92, align 1 - %12 = and i8 %11, -64 - %cmp95 = icmp eq i8 %12, -128 + %9 = load i8, ptr %arrayidx92, align 1 + %cmp95 = icmp slt i8 %9, -64 br i1 %cmp95, label %land.lhs.true97, label %if.else116 land.lhs.true97: ; preds = %land.lhs.true91 %arrayidx98 = getelementptr inbounds i8, ptr %utf8, i64 3 - %13 = load i8, ptr %arrayidx98, align 1 - %14 = and i8 %13, -64 - %cmp101 = icmp eq i8 %14, -128 + %10 = load i8, ptr %arrayidx98, align 1 + %cmp101 = icmp slt i8 %10, -64 br i1 %cmp101, label %if.then103, label %if.else116 if.then103: ; preds = %land.lhs.true97 @@ -513,37 +509,34 @@ if.then103: ; preds = %land.lhs.true97 br label %return if.else116: ; preds = %land.lhs.true97, %land.lhs.true91, %land.lhs.true85, %if.else79 - %15 = and i8 %0, -4 - %cmp120 = icmp eq i8 %15, -8 + %11 = and i8 %0, -4 + %cmp120 = icmp eq i8 %11, -8 br i1 %cmp120, label %land.lhs.true122, label %if.else159 land.lhs.true122: ; preds = %if.else116 %arrayidx123 = getelementptr inbounds i8, ptr %utf8, i64 1 - %16 = load i8, ptr %arrayidx123, align 1 - %conv124 = zext i8 %16 to i32 + %12 = load i8, ptr %arrayidx123, align 1 + %conv124 = zext i8 %12 to i32 %and125 = and i32 %conv124, 192 %cmp126 = icmp eq i32 %and125, 128 br i1 %cmp126, label %land.lhs.true128, label %if.else159 land.lhs.true128: ; preds = %land.lhs.true122 %arrayidx129 = getelementptr inbounds i8, ptr %utf8, i64 2 - %17 = load i8, ptr %arrayidx129, align 1 - %18 = and i8 %17, -64 - %cmp132 = icmp eq i8 %18, -128 + %13 = load i8, ptr %arrayidx129, align 1 + %cmp132 = icmp slt i8 %13, -64 br i1 %cmp132, label %land.lhs.true134, label %if.else159 land.lhs.true134: ; preds = %land.lhs.true128 %arrayidx135 = getelementptr inbounds i8, ptr %utf8, i64 3 - %19 = load i8, ptr %arrayidx135, align 1 - %20 = and i8 %19, -64 - %cmp138 = icmp eq i8 %20, -128 + %14 = load i8, ptr %arrayidx135, align 1 + %cmp138 = icmp slt i8 %14, -64 br i1 %cmp138, label %land.lhs.true140, label %if.else159 land.lhs.true140: ; preds = %land.lhs.true134 %arrayidx141 = getelementptr inbounds i8, ptr %utf8, i64 4 - %21 = load i8, ptr %arrayidx141, align 1 - %22 = and i8 %21, -64 - %cmp144 = icmp eq i8 %22, -128 + %15 = load i8, ptr %arrayidx141, align 1 + %cmp144 = icmp slt i8 %15, -64 br i1 %cmp144, label %if.then146, label %if.else159 if.then146: ; preds = %land.lhs.true140 @@ -555,44 +548,40 @@ if.then146: ; preds = %land.lhs.true140 br label %return if.else159: ; preds = %land.lhs.true140, %land.lhs.true134, %land.lhs.true128, %land.lhs.true122, %if.else116 - %23 = and i8 %0, -2 - %cmp163 = icmp eq i8 %23, -4 + %16 = and i8 %0, -2 + %cmp163 = icmp eq i8 %16, -4 br i1 %cmp163, label %land.lhs.true165, label %return land.lhs.true165: ; preds = %if.else159 %arrayidx166 = getelementptr inbounds i8, ptr %utf8, i64 1 - %24 = load i8, ptr %arrayidx166, align 1 - %conv167 = zext i8 %24 to i32 + %17 = load i8, ptr %arrayidx166, align 1 + %conv167 = zext i8 %17 to i32 %and168 = and i32 %conv167, 192 %cmp169 = icmp eq i32 %and168, 128 br i1 %cmp169, label %land.lhs.true171, label %return land.lhs.true171: ; preds = %land.lhs.true165 %arrayidx172 = getelementptr inbounds i8, ptr %utf8, i64 2 - %25 = load i8, ptr %arrayidx172, align 1 - %26 = and i8 %25, -64 - %cmp175 = icmp eq i8 %26, -128 + %18 = load i8, ptr %arrayidx172, align 1 + %cmp175 = icmp slt i8 %18, -64 br i1 %cmp175, label %land.lhs.true177, label %return land.lhs.true177: ; preds = %land.lhs.true171 %arrayidx178 = getelementptr inbounds i8, ptr %utf8, i64 3 - %27 = load i8, ptr %arrayidx178, align 1 - %28 = and i8 %27, -64 - %cmp181 = icmp eq i8 %28, -128 + %19 = load i8, ptr %arrayidx178, align 1 + %cmp181 = icmp slt i8 %19, -64 br i1 %cmp181, label %land.lhs.true183, label %return land.lhs.true183: ; preds = %land.lhs.true177 %arrayidx184 = getelementptr inbounds i8, ptr %utf8, i64 4 - %29 = load i8, ptr %arrayidx184, align 1 - %30 = and i8 %29, -64 - %cmp187 = icmp eq i8 %30, -128 + %20 = load i8, ptr %arrayidx184, align 1 + %cmp187 = icmp slt i8 %20, -64 br i1 %cmp187, label %land.lhs.true189, label %return land.lhs.true189: ; preds = %land.lhs.true183 %arrayidx190 = getelementptr inbounds i8, ptr %utf8, i64 5 - %31 = load i8, ptr %arrayidx190, align 1 - %32 = and i8 %31, -64 - %cmp193 = icmp eq i8 %32, -128 + %21 = load i8, ptr %arrayidx190, align 1 + %cmp193 = icmp slt i8 %21, -64 br i1 %cmp193, label %if.then195, label %return if.then195: ; preds = %land.lhs.true189 diff --git a/bench/flatbuffers/optimized/idl_gen_json_schema.cpp.ll b/bench/flatbuffers/optimized/idl_gen_json_schema.cpp.ll index 1f09f9c81ac..6a12cc428ea 100644 --- a/bench/flatbuffers/optimized/idl_gen_json_schema.cpp.ll +++ b/bench/flatbuffers/optimized/idl_gen_json_schema.cpp.ll @@ -5862,22 +5862,21 @@ for.body22.i: ; preds = %if.end27.i, %for.bo %ucc.034.i = phi i32 [ %and18.i, %for.body22.lr.ph.i ], [ %or.i, %if.end27.i ] %7 = getelementptr inbounds i8, ptr %arrayidx.pn, i64 1 %8 = load i8, ptr %7, align 1 - %9 = and i8 %8, -64 - %cmp25.not.i = icmp eq i8 %9, -128 + %cmp25.not.i = icmp slt i8 %8, -64 br i1 %cmp25.not.i, label %if.end27.i, label %if.then23 if.end27.i: ; preds = %for.body22.i %shl28.i = shl i32 %ucc.034.i, 6 - %10 = and i8 %8, 63 - %and31.i = zext nneg i8 %10 to i32 + %9 = and i8 %8, 63 + %and31.i = zext nneg i8 %9 to i32 %or.i = or disjoint i32 %shl28.i, %and31.i %inc33.i = add nuw nsw i32 %i.035.i, 1 %exitcond36.not.i = icmp eq i32 %i.035.i, %5 br i1 %exitcond36.not.i, label %for.end34.i, label %for.body22.i, !llvm.loop !206 for.end34.i: ; preds = %if.end27.i - %11 = and i32 %ucc.034.i, 67108832 - %or.cond1.i = icmp eq i32 %11, 864 + %10 = and i32 %ucc.034.i, 67108832 + %or.cond1.i = icmp eq i32 %10, 864 br i1 %or.cond1.i, label %if.then23, label %if.end38.i if.end38.i: ; preds = %for.end34.i @@ -5888,18 +5887,18 @@ if.end38.i: ; preds = %for.end34.i ] sw.bb.i: ; preds = %if.end38.i - %12 = add i32 %shl28.i, -2048 - %or.cond2.i = icmp ult i32 %12, -1920 + %11 = add i32 %shl28.i, -2048 + %or.cond2.i = icmp ult i32 %11, -1920 br i1 %or.cond2.i, label %if.then23, label %_ZN11flatbuffers8FromUTF8EPPKc.exit sw.bb44.i: ; preds = %if.end38.i - %13 = add i32 %shl28.i, -65536 - %or.cond3.i = icmp ult i32 %13, -63488 + %12 = add i32 %shl28.i, -65536 + %or.cond3.i = icmp ult i32 %12, -63488 br i1 %or.cond3.i, label %if.then23, label %_ZN11flatbuffers8FromUTF8EPPKc.exit sw.bb50.i: ; preds = %if.end38.i - %14 = add i32 %shl28.i, -1114112 - %or.cond4.i = icmp ult i32 %14, -1048576 + %13 = add i32 %shl28.i, -1114112 + %or.cond4.i = icmp ult i32 %13, -1048576 br i1 %or.cond4.i, label %if.then23, label %_ZN11flatbuffers8FromUTF8EPPKc.exit default.unreachable.i: ; preds = %if.end38.i @@ -5925,7 +5924,7 @@ invoke.cont: ; preds = %if.then24 br label %for.inc lpad: ; preds = %if.then24 - %15 = landingpad { ptr, i32 } + %14 = landingpad { ptr, i32 } cleanup br label %eh.resume @@ -5934,8 +5933,8 @@ if.else29: ; preds = %_ZN11flatbuffers8Fr if.then31: ; preds = %if.else29 %sub.ptr.lhs.cast = ptrtoint ptr %utf8.1 to i64 - %16 = add i64 %conv55, %sub.ptr.rhs.cast - %sub = sub i64 %sub.ptr.lhs.cast, %16 + %15 = add i64 %conv55, %sub.ptr.rhs.cast + %sub = sub i64 %sub.ptr.lhs.cast, %15 %call35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %_text, ptr noundef nonnull %arrayidx, i64 noundef %sub) br label %if.end61 @@ -5954,7 +5953,7 @@ invoke.cont42: ; preds = %if.then38 br label %if.end61 lpad41: ; preds = %if.then38 - %17 = landingpad { ptr, i32 } + %16 = landingpad { ptr, i32 } cleanup br label %eh.resume @@ -5985,12 +5984,12 @@ invoke.cont57: ; preds = %invoke.cont52 br label %if.end61 lpad51: ; preds = %if.then46 - %18 = landingpad { ptr, i32 } + %17 = landingpad { ptr, i32 } cleanup br label %eh.resume lpad56: ; preds = %invoke.cont52 - %19 = landingpad { ptr, i32 } + %18 = landingpad { ptr, i32 } cleanup br label %eh.resume @@ -6017,7 +6016,7 @@ return: ; preds = %if.then23, %for.end eh.resume: ; preds = %lpad56, %lpad51, %lpad41, %lpad %ref.tmp55.sink = phi ptr [ %ref.tmp55, %lpad56 ], [ %ref.tmp50, %lpad51 ], [ %ref.tmp40, %lpad41 ], [ %ref.tmp, %lpad ] - %.pn = phi { ptr, i32 } [ %19, %lpad56 ], [ %18, %lpad51 ], [ %17, %lpad41 ], [ %15, %lpad ] + %.pn = phi { ptr, i32 } [ %18, %lpad56 ], [ %17, %lpad51 ], [ %16, %lpad41 ], [ %14, %lpad ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp55.sink) #20 resume { ptr, i32 } %.pn } diff --git a/bench/flatbuffers/optimized/idl_parser.cpp.ll b/bench/flatbuffers/optimized/idl_parser.cpp.ll index 4b2c809b962..8b338b834de 100644 --- a/bench/flatbuffers/optimized/idl_parser.cpp.ll +++ b/bench/flatbuffers/optimized/idl_parser.cpp.ll @@ -3987,22 +3987,21 @@ for.body22.i: ; preds = %if.end27.i, %for.bo %ucc.034.i = phi i32 [ %and18.i, %for.body22.lr.ph.i ], [ %or.i, %if.end27.i ] %5 = getelementptr inbounds i8, ptr %s.0.pn, i64 1 %6 = load i8, ptr %5, align 1 - %7 = and i8 %6, -64 - %cmp25.not.i = icmp eq i8 %7, -128 + %cmp25.not.i = icmp slt i8 %6, -64 br i1 %cmp25.not.i, label %if.end27.i, label %return if.end27.i: ; preds = %for.body22.i %shl28.i = shl i32 %ucc.034.i, 6 - %8 = and i8 %6, 63 - %and31.i = zext nneg i8 %8 to i32 + %7 = and i8 %6, 63 + %and31.i = zext nneg i8 %7 to i32 %or.i = or disjoint i32 %shl28.i, %and31.i %inc33.i = add nuw nsw i32 %i.035.i, 1 %exitcond36.not.i = icmp eq i32 %i.035.i, %3 br i1 %exitcond36.not.i, label %for.end34.i, label %for.body22.i, !llvm.loop !87 for.end34.i: ; preds = %if.end27.i - %9 = and i32 %ucc.034.i, 67108832 - %or.cond1.i = icmp eq i32 %9, 864 + %8 = and i32 %ucc.034.i, 67108832 + %or.cond1.i = icmp eq i32 %8, 864 br i1 %or.cond1.i, label %return, label %if.end38.i if.end38.i: ; preds = %for.end34.i @@ -4013,18 +4012,18 @@ if.end38.i: ; preds = %for.end34.i ] sw.bb.i: ; preds = %if.end38.i - %10 = add i32 %shl28.i, -2048 - %or.cond2.i = icmp ult i32 %10, -1920 + %9 = add i32 %shl28.i, -2048 + %or.cond2.i = icmp ult i32 %9, -1920 br i1 %or.cond2.i, label %return, label %_ZN11flatbuffers8FromUTF8EPPKc.exit sw.bb44.i: ; preds = %if.end38.i - %11 = add i32 %shl28.i, -65536 - %or.cond3.i = icmp ult i32 %11, -63488 + %10 = add i32 %shl28.i, -65536 + %or.cond3.i = icmp ult i32 %10, -63488 br i1 %or.cond3.i, label %return, label %_ZN11flatbuffers8FromUTF8EPPKc.exit sw.bb50.i: ; preds = %if.end38.i - %12 = add i32 %shl28.i, -1114112 - %or.cond4.i = icmp ult i32 %12, -1048576 + %11 = add i32 %shl28.i, -1114112 + %or.cond4.i = icmp ult i32 %11, -1048576 br i1 %or.cond4.i, label %return, label %_ZN11flatbuffers8FromUTF8EPPKc.exit default.unreachable.i: ; preds = %if.end38.i diff --git a/bench/folly/optimized/AsyncSSLSocket.cpp.ll b/bench/folly/optimized/AsyncSSLSocket.cpp.ll index 849fd1c0632..a3466ee1b43 100644 --- a/bench/folly/optimized/AsyncSSLSocket.cpp.ll +++ b/bench/folly/optimized/AsyncSSLSocket.cpp.ll @@ -22891,19 +22891,18 @@ invoke.cont: ; preds = %_ZNK5folly17excepti br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %invoke.cont - %7 = and i8 %6, -64 - %cmp.i = icmp eq i8 %7, -128 - %8 = load ptr, ptr %ref.tmp, align 8, !tbaa !175 + %cmp.i = icmp slt i8 %6, -64 + %7 = load ptr, ptr %ref.tmp, align 8, !tbaa !175 br i1 %cmp.i, label %if.end.sink.split.i, label %if.else.i1 if.else.i1: ; preds = %if.end.i.i - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %8, i64 -8 - %9 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i2 = icmp eq i64 %9, 1 + %add.ptr.i.i.i = getelementptr inbounds i8, ptr %7, i64 -8 + %8 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i2 = icmp eq i64 %8, 1 br i1 %cmp.i.i2, label %if.end.sink.split.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i: ; preds = %if.else.i1, %if.end.i.i - %add.ptr.i.i.sink.i = phi ptr [ %8, %if.end.i.i ], [ %add.ptr.i.i.i, %if.else.i1 ] + %add.ptr.i.i.sink.i = phi ptr [ %7, %if.end.i.i ], [ %add.ptr.i.i.i, %if.else.i1 ] call void @free(ptr noundef %add.ptr.i.i.sink.i) #38 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -22917,8 +22916,8 @@ if.then: ; preds = %_ZN5folly14basic_fb %call1.i = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %sout, ptr noundef nonnull @.str.110, i64 noundef 2) %vtable = load ptr, ptr %call1.i.i.i, align 8, !tbaa !15 %vfn = getelementptr inbounds i8, ptr %vtable, i64 16 - %10 = load ptr, ptr %vfn, align 8 - %call3 = call noundef ptr %10(ptr noundef nonnull align 8 dereferenceable(8) %call1.i.i.i) #38 + %9 = load ptr, ptr %vfn, align 8 + %call3 = call noundef ptr %9(ptr noundef nonnull align 8 dereferenceable(8) %call1.i.i.i) #38 %tobool.not.i13 = icmp eq ptr %call3, null br i1 %tobool.not.i13, label %if.then.i, label %if.else.i @@ -22928,8 +22927,8 @@ if.then.i: ; preds = %if.then %vbase.offset.i = load i64, ptr %vbase.offset.ptr.i, align 8 %add.ptr.i = getelementptr inbounds i8, ptr %sout, i64 %vbase.offset.i %_M_streambuf_state.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 32 - %11 = load i32, ptr %_M_streambuf_state.i.i.i, align 8, !tbaa !482 - %or.i.i.i = or i32 %11, 1 + %10 = load i32, ptr %_M_streambuf_state.i.i.i, align 8, !tbaa !482 + %or.i.i.i = or i32 %10, 1 call void @_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %add.ptr.i, i32 noundef %or.i.i.i) br label %if.end @@ -22939,32 +22938,31 @@ if.else.i: ; preds = %if.then br label %if.end lpad: ; preds = %_ZNK5folly17exception_wrapper10class_nameEv.exit - %12 = landingpad { ptr, i32 } + %11 = landingpad { ptr, i32 } cleanup - %13 = load i8, ptr %arrayidx.i.i.i.i.i, align 1, !tbaa !175 - %cmp.i.i17 = icmp ult i8 %13, 64 + %12 = load i8, ptr %arrayidx.i.i.i.i.i, align 1, !tbaa !175 + %cmp.i.i17 = icmp ult i8 %12, 64 br i1 %cmp.i.i17, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit19, label %if.end.i.i18 if.end.i.i18: ; preds = %lpad - %14 = and i8 %13, -64 - %cmp.i4 = icmp eq i8 %14, -128 - %15 = load ptr, ptr %ref.tmp, align 8, !tbaa !175 + %cmp.i4 = icmp slt i8 %12, -64 + %13 = load ptr, ptr %ref.tmp, align 8, !tbaa !175 br i1 %cmp.i4, label %if.end.sink.split.i8, label %if.else.i5 if.else.i5: ; preds = %if.end.i.i18 - %add.ptr.i.i.i6 = getelementptr inbounds i8, ptr %15, i64 -8 - %16 = atomicrmw sub ptr %add.ptr.i.i.i6, i64 1 acq_rel, align 8 - %cmp.i.i7 = icmp eq i64 %16, 1 + %add.ptr.i.i.i6 = getelementptr inbounds i8, ptr %13, i64 -8 + %14 = atomicrmw sub ptr %add.ptr.i.i.i6, i64 1 acq_rel, align 8 + %cmp.i.i7 = icmp eq i64 %14, 1 br i1 %cmp.i.i7, label %if.end.sink.split.i8, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit19 if.end.sink.split.i8: ; preds = %if.else.i5, %if.end.i.i18 - %add.ptr.i.i.sink.i9 = phi ptr [ %15, %if.end.i.i18 ], [ %add.ptr.i.i.i6, %if.else.i5 ] + %add.ptr.i.i.sink.i9 = phi ptr [ %13, %if.end.i.i18 ], [ %add.ptr.i.i.i6, %if.else.i5 ] call void @free(ptr noundef %add.ptr.i.i.sink.i9) #38 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit19 _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit19: ; preds = %if.end.sink.split.i8, %if.else.i5, %lpad call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %ref.tmp) #38 - resume { ptr, i32 } %12 + resume { ptr, i32 } %11 if.end: ; preds = %if.else.i, %if.then.i, %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit ret ptr %sout diff --git a/bench/folly/optimized/FiberManager.cpp.ll b/bench/folly/optimized/FiberManager.cpp.ll index 7b664682b1e..24722c5bf2f 100644 --- a/bench/folly/optimized/FiberManager.cpp.ll +++ b/bench/folly/optimized/FiberManager.cpp.ll @@ -468,19 +468,18 @@ invoke.cont11: ; preds = %invoke.cont9 br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %invoke.cont11 - %4 = and i8 %3, -64 - %cmp.i = icmp eq i8 %4, -128 - %5 = load ptr, ptr %ref.tmp7, align 8, !tbaa !17 + %cmp.i = icmp slt i8 %3, -64 + %4 = load ptr, ptr %ref.tmp7, align 8, !tbaa !17 br i1 %cmp.i, label %if.end.sink.split.i, label %if.else.i if.else.i: ; preds = %if.end.i.i - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %5, i64 -8 - %6 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i1 = icmp eq i64 %6, 1 + %add.ptr.i.i.i = getelementptr inbounds i8, ptr %4, i64 -8 + %5 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i1 = icmp eq i64 %5, 1 br i1 %cmp.i.i1, label %if.end.sink.split.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i: ; preds = %if.else.i, %if.end.i.i - %add.ptr.i.i.sink.i = phi ptr [ %5, %if.end.i.i ], [ %add.ptr.i.i.i, %if.else.i ] + %add.ptr.i.i.sink.i = phi ptr [ %4, %if.end.i.i ], [ %add.ptr.i.i.i, %if.else.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i) #12 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -491,46 +490,45 @@ _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.ex ret void lpad: ; preds = %invoke.cont3, %invoke.cont1, %invoke.cont, %entry - %7 = landingpad { ptr, i32 } + %6 = landingpad { ptr, i32 } cleanup br label %ehcleanup13 lpad8: ; preds = %invoke.cont5 - %8 = landingpad { ptr, i32 } + %7 = landingpad { ptr, i32 } cleanup br label %ehcleanup lpad10: ; preds = %invoke.cont9 - %9 = landingpad { ptr, i32 } + %8 = landingpad { ptr, i32 } cleanup - %10 = load i8, ptr %arrayidx.i.i.i.i.i, align 1, !tbaa !17 - %cmp.i.i25 = icmp ult i8 %10, 64 + %9 = load i8, ptr %arrayidx.i.i.i.i.i, align 1, !tbaa !17 + %cmp.i.i25 = icmp ult i8 %9, 64 br i1 %cmp.i.i25, label %ehcleanup, label %if.end.i.i26 if.end.i.i26: ; preds = %lpad10 - %11 = and i8 %10, -64 - %cmp.i3 = icmp eq i8 %11, -128 - %12 = load ptr, ptr %ref.tmp7, align 8, !tbaa !17 + %cmp.i3 = icmp slt i8 %9, -64 + %10 = load ptr, ptr %ref.tmp7, align 8, !tbaa !17 br i1 %cmp.i3, label %if.end.sink.split.i7, label %if.else.i4 if.else.i4: ; preds = %if.end.i.i26 - %add.ptr.i.i.i5 = getelementptr inbounds i8, ptr %12, i64 -8 - %13 = atomicrmw sub ptr %add.ptr.i.i.i5, i64 1 acq_rel, align 8 - %cmp.i.i6 = icmp eq i64 %13, 1 + %add.ptr.i.i.i5 = getelementptr inbounds i8, ptr %10, i64 -8 + %11 = atomicrmw sub ptr %add.ptr.i.i.i5, i64 1 acq_rel, align 8 + %cmp.i.i6 = icmp eq i64 %11, 1 br i1 %cmp.i.i6, label %if.end.sink.split.i7, label %ehcleanup if.end.sink.split.i7: ; preds = %if.else.i4, %if.end.i.i26 - %add.ptr.i.i.sink.i8 = phi ptr [ %12, %if.end.i.i26 ], [ %add.ptr.i.i.i5, %if.else.i4 ] + %add.ptr.i.i.sink.i8 = phi ptr [ %10, %if.end.i.i26 ], [ %add.ptr.i.i.i5, %if.else.i4 ] call void @free(ptr noundef %add.ptr.i.i.sink.i8) #12 br label %ehcleanup ehcleanup: ; preds = %if.end.sink.split.i7, %if.else.i4, %lpad10, %lpad8 - %.pn = phi { ptr, i32 } [ %8, %lpad8 ], [ %9, %lpad10 ], [ %9, %if.else.i4 ], [ %9, %if.end.sink.split.i7 ] + %.pn = phi { ptr, i32 } [ %7, %lpad8 ], [ %8, %lpad10 ], [ %8, %if.else.i4 ], [ %8, %if.end.sink.split.i7 ] call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %ref.tmp7) #12 br label %ehcleanup13 ehcleanup13: ; preds = %ehcleanup, %lpad - %.pn.pn = phi { ptr, i32 } [ %.pn, %ehcleanup ], [ %7, %lpad ] + %.pn.pn = phi { ptr, i32 } [ %.pn, %ehcleanup ], [ %6, %lpad ] call void @_ZN6google10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %ref.tmp) #12 call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %ref.tmp) #12 resume { ptr, i32 } %.pn.pn diff --git a/bench/folly/optimized/SymbolizePrinter.cpp.ll b/bench/folly/optimized/SymbolizePrinter.cpp.ll index e8b87f17d18..2ec5c3ac37c 100644 --- a/bench/folly/optimized/SymbolizePrinter.cpp.ll +++ b/bench/folly/optimized/SymbolizePrinter.cpp.ll @@ -197,19 +197,18 @@ entry: if.end.i.i: ; preds = %entry %buf_ = getelementptr inbounds i8, ptr %this, i64 16 - %1 = and i8 %0, -64 - %cmp.i = icmp eq i8 %1, -128 - %2 = load ptr, ptr %buf_, align 8, !tbaa !10 + %cmp.i = icmp slt i8 %0, -64 + %1 = load ptr, ptr %buf_, align 8, !tbaa !10 br i1 %cmp.i, label %if.end.sink.split.i, label %if.else.i if.else.i: ; preds = %if.end.i.i - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %2, i64 -8 - %3 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i1 = icmp eq i64 %3, 1 + %add.ptr.i.i.i = getelementptr inbounds i8, ptr %1, i64 -8 + %2 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i1 = icmp eq i64 %2, 1 br i1 %cmp.i.i1, label %if.end.sink.split.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i: ; preds = %if.else.i, %if.end.i.i - %add.ptr.i.i.sink.i = phi ptr [ %2, %if.end.i.i ], [ %add.ptr.i.i.i, %if.else.i ] + %add.ptr.i.i.sink.i = phi ptr [ %1, %if.end.i.i ], [ %add.ptr.i.i.i, %if.else.i ] tail call void @free(ptr noundef %add.ptr.i.i.sink.i) #28 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -228,19 +227,18 @@ entry: if.end.i.i.i: ; preds = %entry %buf_.i = getelementptr inbounds i8, ptr %this, i64 16 - %1 = and i8 %0, -64 - %cmp.i = icmp eq i8 %1, -128 - %2 = load ptr, ptr %buf_.i, align 8, !tbaa !10 + %cmp.i = icmp slt i8 %0, -64 + %1 = load ptr, ptr %buf_.i, align 8, !tbaa !10 br i1 %cmp.i, label %if.end.sink.split.i, label %if.else.i if.else.i: ; preds = %if.end.i.i.i - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %2, i64 -8 - %3 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i = icmp eq i64 %3, 1 + %add.ptr.i.i.i = getelementptr inbounds i8, ptr %1, i64 -8 + %2 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i = icmp eq i64 %2, 1 br i1 %cmp.i.i, label %if.end.sink.split.i, label %_ZN5folly10symbolizer22StringSymbolizePrinterD2Ev.exit if.end.sink.split.i: ; preds = %if.else.i, %if.end.i.i.i - %add.ptr.i.i.sink.i = phi ptr [ %2, %if.end.i.i.i ], [ %add.ptr.i.i.i, %if.else.i ] + %add.ptr.i.i.sink.i = phi ptr [ %1, %if.end.i.i.i ], [ %add.ptr.i.i.i, %if.else.i ] tail call void @free(ptr noundef %add.ptr.i.i.sink.i) #28 br label %_ZN5folly10symbolizer22StringSymbolizePrinterD2Ev.exit @@ -2424,19 +2422,18 @@ invoke.cont: ; preds = %sw.bb.i br i1 %cmp.i, label %_ZN5folly13fbstring_coreIcED2Ev.exit, label %if.end.i if.end.i: ; preds = %invoke.cont - %12 = and i8 %11, -64 - %cmp.i7 = icmp eq i8 %12, -128 - %13 = load ptr, ptr %nascent, align 8, !tbaa !10 + %cmp.i7 = icmp slt i8 %11, -64 + %12 = load ptr, ptr %nascent, align 8, !tbaa !10 br i1 %cmp.i7, label %if.end.sink.split.i, label %if.else.i if.else.i: ; preds = %if.end.i - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %13, i64 -8 - %14 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i = icmp eq i64 %14, 1 + %add.ptr.i.i.i = getelementptr inbounds i8, ptr %12, i64 -8 + %13 = atomicrmw sub ptr %add.ptr.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i = icmp eq i64 %13, 1 br i1 %cmp.i.i, label %if.end.sink.split.i, label %_ZN5folly13fbstring_coreIcED2Ev.exit if.end.sink.split.i: ; preds = %if.else.i, %if.end.i - %add.ptr.i.i.sink.i = phi ptr [ %13, %if.end.i ], [ %add.ptr.i.i.i, %if.else.i ] + %add.ptr.i.i.sink.i = phi ptr [ %12, %if.end.i ], [ %add.ptr.i.i.i, %if.else.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i) #28 br label %_ZN5folly13fbstring_coreIcED2Ev.exit @@ -2445,32 +2442,31 @@ _ZN5folly13fbstring_coreIcED2Ev.exit: ; preds = %if.end.sink.split.i br label %if.end21 lpad: ; preds = %sw.bb.i - %15 = landingpad { ptr, i32 } + %14 = landingpad { ptr, i32 } cleanup - %16 = load i8, ptr %arrayidx.i.i.i, align 1, !tbaa !10 - %cmp.i31 = icmp ult i8 %16, 64 + %15 = load i8, ptr %arrayidx.i.i.i, align 1, !tbaa !10 + %cmp.i31 = icmp ult i8 %15, 64 br i1 %cmp.i31, label %_ZN5folly13fbstring_coreIcED2Ev.exit33, label %if.end.i32 if.end.i32: ; preds = %lpad - %17 = and i8 %16, -64 - %cmp.i10 = icmp eq i8 %17, -128 - %18 = load ptr, ptr %nascent, align 8, !tbaa !10 + %cmp.i10 = icmp slt i8 %15, -64 + %16 = load ptr, ptr %nascent, align 8, !tbaa !10 br i1 %cmp.i10, label %if.end.sink.split.i15, label %if.else.i11 if.else.i11: ; preds = %if.end.i32 - %add.ptr.i.i.i12 = getelementptr inbounds i8, ptr %18, i64 -8 - %19 = atomicrmw sub ptr %add.ptr.i.i.i12, i64 1 acq_rel, align 8 - %cmp.i.i13 = icmp eq i64 %19, 1 + %add.ptr.i.i.i12 = getelementptr inbounds i8, ptr %16, i64 -8 + %17 = atomicrmw sub ptr %add.ptr.i.i.i12, i64 1 acq_rel, align 8 + %cmp.i.i13 = icmp eq i64 %17, 1 br i1 %cmp.i.i13, label %if.end.sink.split.i15, label %_ZN5folly13fbstring_coreIcED2Ev.exit33 if.end.sink.split.i15: ; preds = %if.else.i11, %if.end.i32 - %add.ptr.i.i.sink.i16 = phi ptr [ %18, %if.end.i32 ], [ %add.ptr.i.i.i12, %if.else.i11 ] + %add.ptr.i.i.sink.i16 = phi ptr [ %16, %if.end.i32 ], [ %add.ptr.i.i.i12, %if.else.i11 ] call void @free(ptr noundef %add.ptr.i.i.sink.i16) #28 br label %_ZN5folly13fbstring_coreIcED2Ev.exit33 _ZN5folly13fbstring_coreIcED2Ev.exit33: ; preds = %if.end.sink.split.i15, %if.else.i11, %lpad call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %nascent) #28 - resume { ptr, i32 } %15 + resume { ptr, i32 } %14 if.end21: ; preds = %_ZN5folly13fbstring_coreIcED2Ev.exit, %_ZN5folly12smartReallocEPvmmm.exit, %entry ret void diff --git a/bench/git/optimized/tree-walk.ll b/bench/git/optimized/tree-walk.ll index 8956f1a0cfc..c667193bd6a 100644 --- a/bench/git/optimized/tree-walk.ll +++ b/bench/git/optimized/tree-walk.ll @@ -1767,14 +1767,8 @@ if.end72: ; preds = %if.end41.tail, %sub if.end77: ; preds = %if.end72 %28 = load i16, ptr %mode, align 2 %29 = and i16 %28, -4096 - switch i16 %29, label %while.body.outer.backedge [ - i16 16384, label %if.then81 - i16 -32768, label %if.then93 - i16 -24576, label %if.then103 - ] - -while.body.outer.backedge: ; preds = %if.end77, %if.end84 - br label %while.body.outer + %cmp79 = icmp eq i16 %29, 16384 + br i1 %cmp79, label %if.then81, label %if.else88 if.then81: ; preds = %if.end77 br i1 %tobool39.not, label %if.then83, label %if.end84 @@ -1796,7 +1790,11 @@ if.end84: ; preds = %if.then81 call void @strbuf_remove(ptr noundef nonnull %namebuf, i64 noundef 0, i64 noundef %sub.ptr.sub) #14 br label %while.body.outer.backedge -if.then93: ; preds = %if.end77 +if.else88: ; preds = %if.end77 + %cmp91 = icmp slt i16 %28, -28672 + br i1 %cmp91, label %if.then93, label %if.else98 + +if.then93: ; preds = %if.else88 br i1 %tobool39.not, label %if.then95, label %done if.then95: ; preds = %if.then93 @@ -1806,7 +1804,14 @@ if.then95: ; preds = %if.then93 store i32 %32, ptr %algo3.i83, align 4 br label %done -if.then103: ; preds = %if.end77 +if.else98: ; preds = %if.else88 + %cmp101 = icmp eq i16 %29, -24576 + br i1 %cmp101, label %if.then103, label %while.body.outer.backedge + +while.body.outer.backedge: ; preds = %if.else98, %if.end84 + br label %while.body.outer + +if.then103: ; preds = %if.else98 %dec106 = add nsw i32 %follows_remaining.0.ph.ph, -1 %cmp107 = icmp eq i32 %follows_remaining.0.ph.ph, 0 br i1 %cmp107, label %done, label %if.end110 diff --git a/bench/git/optimized/utf8.ll b/bench/git/optimized/utf8.ll index bceeffbaabb..fa582560468 100644 --- a/bench/git/optimized/utf8.ll +++ b/bench/git/optimized/utf8.ll @@ -253,8 +253,7 @@ lor.lhs.false39: ; preds = %if.then36 lor.lhs.false45: ; preds = %lor.lhs.false39 %arrayidx46 = getelementptr inbounds i8, ptr %0, i64 2 %5 = load i8, ptr %arrayidx46, align 1 - %6 = and i8 %5, -64 - %cmp49.not = icmp eq i8 %6, -128 + %cmp49.not = icmp slt i8 %5, -64 br i1 %cmp49.not, label %lor.lhs.false51, label %invalid lor.lhs.false51: ; preds = %lor.lhs.false45 @@ -271,27 +270,27 @@ lor.lhs.false61: ; preds = %lor.lhs.false51 ] land.lhs.true66: ; preds = %lor.lhs.false61 - %7 = and i8 %4, -32 - %cmp70 = icmp eq i8 %7, -96 + %6 = and i8 %4, -32 + %cmp70 = icmp eq i8 %6, -96 br i1 %cmp70, label %invalid, label %if.end89 land.lhs.true77: ; preds = %lor.lhs.false61 %cmp80 = icmp eq i8 %4, -65 - %8 = and i8 %5, -66 - %cmp86 = icmp eq i8 %8, -66 + %7 = and i8 %5, -66 + %cmp86 = icmp eq i8 %7, -66 %or.cond51 = and i1 %cmp80, %cmp86 br i1 %or.cond51, label %invalid, label %if.end89 if.end89: ; preds = %lor.lhs.false61, %land.lhs.true66, %land.lhs.true77 - %9 = and i8 %2, 15 - %and92 = zext nneg i8 %9 to i32 + %8 = and i8 %2, 15 + %and92 = zext nneg i8 %8 to i32 %shl93 = shl nuw nsw i32 %and92, 12 - %10 = and i8 %4, 63 - %and96 = zext nneg i8 %10 to i32 + %9 = and i8 %4, 63 + %and96 = zext nneg i8 %9 to i32 %shl97 = shl nuw nsw i32 %and96, 6 %or98 = or disjoint i32 %shl97, %shl93 - %11 = and i8 %5, 63 - %and101 = zext nneg i8 %11 to i32 + %10 = and i8 %5, 63 + %and101 = zext nneg i8 %10 to i32 %or102 = or disjoint i32 %or98, %and101 br label %if.end181 @@ -304,24 +303,22 @@ if.else103: ; preds = %if.else30 lor.lhs.false112: ; preds = %if.else103 %arrayidx113 = getelementptr inbounds i8, ptr %0, i64 1 - %12 = load i8, ptr %arrayidx113, align 1 - %conv114 = zext i8 %12 to i32 + %11 = load i8, ptr %arrayidx113, align 1 + %conv114 = zext i8 %11 to i32 %and115 = and i32 %conv114, 192 %cmp116.not = icmp eq i32 %and115, 128 br i1 %cmp116.not, label %lor.lhs.false118, label %invalid lor.lhs.false118: ; preds = %lor.lhs.false112 %arrayidx119 = getelementptr inbounds i8, ptr %0, i64 2 - %13 = load i8, ptr %arrayidx119, align 1 - %14 = and i8 %13, -64 - %cmp122.not = icmp eq i8 %14, -128 + %12 = load i8, ptr %arrayidx119, align 1 + %cmp122.not = icmp slt i8 %12, -64 br i1 %cmp122.not, label %lor.lhs.false124, label %invalid lor.lhs.false124: ; preds = %lor.lhs.false118 %arrayidx125 = getelementptr inbounds i8, ptr %0, i64 3 - %15 = load i8, ptr %arrayidx125, align 1 - %16 = and i8 %15, -64 - %cmp128.not = icmp eq i8 %16, -128 + %13 = load i8, ptr %arrayidx125, align 1 + %cmp128.not = icmp slt i8 %13, -64 br i1 %cmp128.not, label %lor.lhs.false130, label %invalid lor.lhs.false130: ; preds = %lor.lhs.false124 @@ -336,7 +333,7 @@ lor.lhs.false141: ; preds = %lor.lhs.false130 br i1 %cmp144, label %land.lhs.true146, label %lor.lhs.false151 land.lhs.true146: ; preds = %lor.lhs.false141 - %cmp149 = icmp ugt i8 %12, -113 + %cmp149 = icmp ugt i8 %11, -113 br i1 %cmp149, label %invalid, label %if.end157 lor.lhs.false151: ; preds = %lor.lhs.false141 @@ -344,19 +341,19 @@ lor.lhs.false151: ; preds = %lor.lhs.false141 br i1 %cmp154, label %invalid, label %if.end157 if.end157: ; preds = %land.lhs.true146, %lor.lhs.false151 - %17 = and i8 %2, 7 - %and160 = zext nneg i8 %17 to i32 + %14 = and i8 %2, 7 + %and160 = zext nneg i8 %14 to i32 %shl161 = shl nuw nsw i32 %and160, 18 - %18 = and i8 %12, 63 - %and164 = zext nneg i8 %18 to i32 + %15 = and i8 %11, 63 + %and164 = zext nneg i8 %15 to i32 %shl165 = shl nuw nsw i32 %and164, 12 %or166 = or disjoint i32 %shl165, %shl161 - %19 = and i8 %13, 63 - %and169 = zext nneg i8 %19 to i32 + %16 = and i8 %12, 63 + %and169 = zext nneg i8 %16 to i32 %shl170 = shl nuw nsw i32 %and169, 6 %or171 = or disjoint i32 %shl170, %or166 - %20 = and i8 %15, 63 - %and174 = zext nneg i8 %20 to i32 + %17 = and i8 %13, 63 + %and174 = zext nneg i8 %17 to i32 %or175 = or disjoint i32 %or171, %and174 br label %if.end181 diff --git a/bench/graphviz/optimized/shapes.c.ll b/bench/graphviz/optimized/shapes.c.ll index f35bbb4f4e2..f4d8d7f3610 100644 --- a/bench/graphviz/optimized/shapes.c.ll +++ b/bench/graphviz/optimized/shapes.c.ll @@ -6135,7 +6135,7 @@ gv_alloc.exit: ; preds = %4 52: ; preds = %50 tail call fastcc void @free_field(ptr noundef nonnull %6) tail call void @free(ptr noundef %.0138.ph255.ph.ph) #26 - br label %208 + br label %206 53: ; preds = %50 %54 = load i8, ptr %38, align 2 @@ -6160,7 +6160,7 @@ gv_alloc.exit: ; preds = %4 64: ; preds = %62 tail call fastcc void @free_field(ptr noundef nonnull %6) tail call void @free(ptr noundef %.0138.ph255.ph.ph) #26 - br label %208 + br label %206 65: ; preds = %62 %66 = icmp ugt ptr %.0151.ph252.ph, %43 @@ -6212,7 +6212,7 @@ gv_strdup.exit: ; preds = %72 87: ; preds = %85, %83 tail call fastcc void @free_field(ptr noundef nonnull %6) tail call void @free(ptr noundef %.0138.ph255.ph.ph) #26 - br label %208 + br label %206 88: ; preds = %85 %89 = tail call fastcc ptr @parse_reclbl(ptr noundef %0, i1 noundef zeroext %42, i1 noundef zeroext false, ptr noundef %3) @@ -6227,7 +6227,7 @@ gv_strdup.exit: ; preds = %72 94: ; preds = %88 tail call fastcc void @free_field(ptr noundef nonnull %6) tail call void @free(ptr noundef %.0138.ph255.ph.ph) #26 - br label %208 + br label %206 95: ; preds = %.split.us, %.split.us, %.split.us %.0156.ptr.le.le508 = getelementptr inbounds i8, ptr %3, i64 %.0156.idx.ph251.ph @@ -6241,7 +6241,7 @@ gv_strdup.exit: ; preds = %72 97: ; preds = %95 tail call fastcc void @free_field(ptr noundef nonnull %6) tail call void @free(ptr noundef %.0138.ph255.ph.ph) #26 - br label %208 + br label %206 98: ; preds = %95 %99 = and i32 %.0131.ph256, 4 @@ -6343,7 +6343,7 @@ gv_alloc.exit202: ; preds = %100 store ptr %140, ptr @reclblp, align 8 %141 = getelementptr inbounds i8, ptr %6, i64 48 store i32 %.2130, ptr %141, align 8 - br label %208 + br label %206 142: ; preds = %136 %143 = getelementptr inbounds i8, ptr %137, i64 1 @@ -6400,7 +6400,7 @@ gv_alloc.exit202: ; preds = %100 157: ; preds = %154 tail call fastcc void @free_field(ptr noundef nonnull %6) tail call void @free(ptr noundef %.0138.ph255.ph.ph) #26 - br label %208 + br label %206 158: ; preds = %154, %.loopexit %159 = and i32 %.1132, 24 @@ -6492,29 +6492,27 @@ gv_alloc.exit202: ; preds = %100 %196 = getelementptr inbounds i8, ptr %195, i64 1 store ptr %196, ptr @reclblp, align 8 %197 = load i8, ptr %196, align 1 - %198 = and i8 %197, -64 - %199 = icmp eq i8 %198, -128 - br i1 %199, label %.lr.ph247.preheader, label %.lr.ph.split.us.outer + %198 = icmp slt i8 %197, -64 + br i1 %198, label %.lr.ph247.preheader, label %.lr.ph.split.us.outer .lr.ph247.preheader: ; preds = %.thread280 - %200 = getelementptr inbounds i8, ptr %195, i64 1 + %199 = getelementptr inbounds i8, ptr %195, i64 1 br label %.lr.ph247 .lr.ph247: ; preds = %.lr.ph247.preheader, %.lr.ph247 - %201 = phi i8 [ %204, %.lr.ph247 ], [ %197, %.lr.ph247.preheader ] + %200 = phi i8 [ %203, %.lr.ph247 ], [ %197, %.lr.ph247.preheader ] %.9.idx245 = phi i64 [ %.9.add, %.lr.ph247 ], [ %.8.idx, %.lr.ph247.preheader ] - %202 = phi ptr [ %203, %.lr.ph247 ], [ %200, %.lr.ph247.preheader ] + %201 = phi ptr [ %202, %.lr.ph247 ], [ %199, %.lr.ph247.preheader ] %.9.ptr = getelementptr inbounds i8, ptr %3, i64 %.9.idx245 - %203 = getelementptr inbounds i8, ptr %202, i64 1 + %202 = getelementptr inbounds i8, ptr %201, i64 1 %.9.add = add nsw i64 %.9.idx245, 1 - store i8 %201, ptr %.9.ptr, align 1 - %204 = load i8, ptr %203, align 1 - %205 = and i8 %204, -64 - %206 = icmp eq i8 %205, -128 - br i1 %206, label %.lr.ph247, label %.outer.sink.split + store i8 %200, ptr %.9.ptr, align 1 + %203 = load i8, ptr %202, align 1 + %204 = icmp slt i8 %203, -64 + br i1 %204, label %.lr.ph247, label %.outer.sink.split .outer.sink.split: ; preds = %.lr.ph247, %56, %gv_strdup.exit, %142 - %.lcssa306.sink = phi ptr [ %143, %142 ], [ %82, %gv_strdup.exit ], [ %58, %56 ], [ %203, %.lr.ph247 ] + %.lcssa306.sink = phi ptr [ %143, %142 ], [ %82, %gv_strdup.exit ], [ %58, %56 ], [ %202, %.lr.ph247 ] %.2158.idx.ph = phi i64 [ %.4160.idx, %142 ], [ %.0156.idx.ph251.ph, %gv_strdup.exit ], [ %.0156.idx.ph251.ph, %56 ], [ %.9.add, %.lr.ph247 ] %.1152.ph = phi ptr [ %.0151.ph252.ph, %142 ], [ %.2153, %gv_strdup.exit ], [ %3, %56 ], [ %.3154, %.lr.ph247 ] %.1148.ph = phi ptr [ %.2149, %142 ], [ %.0147.ph253.ph, %gv_strdup.exit ], [ %.0147.ph253.ph, %56 ], [ %.3150, %.lr.ph247 ] @@ -6528,11 +6526,11 @@ gv_alloc.exit202: ; preds = %100 br label %.lr.ph.split.us.outer.outer .outer._crit_edge: ; preds = %136 - %207 = getelementptr inbounds i8, ptr %6, i64 48 - store i32 %.2130, ptr %207, align 8 - br label %208 + %205 = getelementptr inbounds i8, ptr %6, i64 48 + store i32 %.2130, ptr %205, align 8 + br label %206 -208: ; preds = %.outer._crit_edge, %157, %139, %97, %94, %87, %64, %52 +206: ; preds = %.outer._crit_edge, %157, %139, %97, %94, %87, %64, %52 %.0124 = phi ptr [ null, %157 ], [ null, %97 ], [ %6, %139 ], [ null, %87 ], [ null, %94 ], [ null, %64 ], [ null, %52 ], [ %6, %.outer._crit_edge ] ret ptr %.0124 } diff --git a/bench/harfbuzz/optimized/harfbuzz.cc.ll b/bench/harfbuzz/optimized/harfbuzz.cc.ll index 275346537e2..eee7e55e776 100644 --- a/bench/harfbuzz/optimized/harfbuzz.cc.ll +++ b/bench/harfbuzz/optimized/harfbuzz.cc.ll @@ -17324,12 +17324,11 @@ land.lhs.true.lr.ph.i.i: ; preds = %while.body.i land.lhs.true.i.i: ; preds = %while.body.i.i, %land.lhs.true.lr.ph.i.i %text.addr.013.i.i = phi ptr [ %incdec.ptr.i.i, %land.lhs.true.lr.ph.i.i ], [ %incdec.ptr3.i.i, %while.body.i.i ] %6 = load i8, ptr %text.addr.013.i.i, align 1 - %7 = and i8 %6, -64 - %cmp1.i.i = icmp eq i8 %7, -128 + %cmp1.i.i = icmp slt i8 %6, -64 %sub.ptr.rhs.cast.i.i = ptrtoint ptr %text.addr.013.i.i to i64 %sub.ptr.sub.i.i = sub i64 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i %cmp2.i.i = icmp slt i64 %sub.ptr.sub.i.i, 4 - %or.cond.i47.i = and i1 %cmp2.i.i, %cmp1.i.i + %or.cond.i47.i = and i1 %cmp1.i.i, %cmp2.i.i br i1 %or.cond.i47.i, label %while.body.i.i, label %while.end.i.i while.body.i.i: ; preds = %land.lhs.true.i.i @@ -17352,14 +17351,14 @@ if.end.i.i: ; preds = %while.end.i.i br label %_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i _ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i: ; preds = %if.end.i.i, %while.end.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i - %8 = phi i32 [ %0, %if.end.i.i ], [ %.pre59.i, %while.end.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] + %7 = phi i32 [ %0, %if.end.i.i ], [ %.pre59.i, %while.end.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] %retval.0.i.i = phi ptr [ %incdec.ptr.i.i, %if.end.i.i ], [ %text.addr.0.lcssa.i.i, %while.end.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] - %9 = load i32, ptr %context_len.i.i, align 8 - %inc.i = add i32 %9, 1 + %8 = load i32, ptr %context_len.i.i, align 8 + %inc.i = add i32 %8, 1 store i32 %inc.i, ptr %context_len.i.i, align 8 - %idxprom.i = zext i32 %9 to i64 + %idxprom.i = zext i32 %8 to i64 %arrayidx25.i = getelementptr inbounds [5 x i32], ptr %context.i, i64 0, i64 %idxprom.i - store i32 %8, ptr %arrayidx25.i, align 4 + store i32 %7, ptr %arrayidx25.i, align 4 %cmp19.i = icmp ult ptr %text, %retval.0.i.i br i1 %cmp19.i, label %land.rhsthread-pre-split.i, label %if.end26.i, !llvm.loop !115 @@ -17378,15 +17377,15 @@ while.body33.lr.ph.i: ; preds = %if.end26.i while.body33.i: ; preds = %_ZN11hb_buffer_t3addEjj.exit.i, %while.body33.lr.ph.i %next.056.i = phi ptr [ %add.ptr28.i, %while.body33.lr.ph.i ], [ %call35.i, %_ZN11hb_buffer_t3addEjj.exit.i ] %call35.i = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef %next.056.i, ptr noundef nonnull %add.ptr30.i, ptr noundef nonnull %u34.i, i32 noundef %0) - %10 = load i32, ptr %u34.i, align 4 + %9 = load i32, ptr %u34.i, align 4 %sub.ptr.lhs.cast.i = ptrtoint ptr %next.056.i to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %conv36.i = trunc i64 %sub.ptr.sub.i to i32 - %11 = load i32, ptr %len.i, align 8 - %add.i.i = add i32 %11, 1 + %10 = load i32, ptr %len.i, align 8 + %add.i.i = add i32 %10, 1 %tobool.not.i.i.i = icmp eq i32 %add.i.i, 0 - %12 = load i32, ptr %allocated.i.i, align 8 - %cmp.i.i.i = icmp ult i32 %add.i.i, %12 + %11 = load i32, ptr %allocated.i.i, align 8 + %cmp.i.i.i = icmp ult i32 %add.i.i, %11 %or.cond.i.i.i = select i1 %tobool.not.i.i.i, i1 true, i1 %cmp.i.i.i br i1 %or.cond.i.i.i, label %if.end.i49.i, label %_ZN11hb_buffer_t6ensureEj.exit.i.i @@ -17399,19 +17398,19 @@ _ZN11hb_buffer_t6ensureEj.exit.if.end_crit_edge.i.i: ; preds = %_ZN11hb_buffer_t br label %if.end.i49.i if.end.i49.i: ; preds = %_ZN11hb_buffer_t6ensureEj.exit.if.end_crit_edge.i.i, %while.body33.i - %13 = phi i32 [ %.pre.i.i, %_ZN11hb_buffer_t6ensureEj.exit.if.end_crit_edge.i.i ], [ %11, %while.body33.i ] - %14 = load ptr, ptr %info.i.i, align 8 - %idxprom.i.i = zext i32 %13 to i64 - %arrayidx.i.i = getelementptr inbounds %struct.hb_glyph_info_t, ptr %14, i64 %idxprom.i.i - %15 = getelementptr inbounds i8, ptr %arrayidx.i.i, i64 12 - store i64 0, ptr %15, align 1 - store i32 %10, ptr %arrayidx.i.i, align 4 + %12 = phi i32 [ %.pre.i.i, %_ZN11hb_buffer_t6ensureEj.exit.if.end_crit_edge.i.i ], [ %10, %while.body33.i ] + %13 = load ptr, ptr %info.i.i, align 8 + %idxprom.i.i = zext i32 %12 to i64 + %arrayidx.i.i = getelementptr inbounds %struct.hb_glyph_info_t, ptr %13, i64 %idxprom.i.i + %14 = getelementptr inbounds i8, ptr %arrayidx.i.i, i64 12 + store i64 0, ptr %14, align 1 + store i32 %9, ptr %arrayidx.i.i, align 4 %mask.i.i = getelementptr inbounds i8, ptr %arrayidx.i.i, i64 4 store i32 0, ptr %mask.i.i, align 4 %cluster5.i.i = getelementptr inbounds i8, ptr %arrayidx.i.i, i64 8 store i32 %conv36.i, ptr %cluster5.i.i, align 4 - %16 = load i32, ptr %len.i, align 8 - %inc.i.i = add i32 %16, 1 + %15 = load i32, ptr %len.i, align 8 + %inc.i.i = add i32 %15, 1 store i32 %inc.i.i, ptr %len.i, align 8 br label %_ZN11hb_buffer_t3addEjj.exit.i @@ -17434,19 +17433,19 @@ land.rhs42.lr.ph.i: ; preds = %while.end37.i land.rhs42.i: ; preds = %while.body47.i, %land.rhs42.lr.ph.i %next.158.i = phi ptr [ %next.0.lcssa.i, %land.rhs42.lr.ph.i ], [ %call49.i, %while.body47.i ] - %17 = load i32, ptr %arrayidx.i51.i, align 4 - %cmp45.i = icmp ult i32 %17, 5 + %16 = load i32, ptr %arrayidx.i51.i, align 4 + %cmp45.i = icmp ult i32 %16, 5 br i1 %cmp45.i, label %while.body47.i, label %while.end57.i while.body47.i: ; preds = %land.rhs42.i %call49.i = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef %next.158.i, ptr noundef nonnull %add.ptr39.i, ptr noundef nonnull %u48.i, i32 noundef %0) - %18 = load i32, ptr %u48.i, align 4 - %19 = load i32, ptr %arrayidx.i51.i, align 4 - %inc54.i = add i32 %19, 1 + %17 = load i32, ptr %u48.i, align 4 + %18 = load i32, ptr %arrayidx.i51.i, align 4 + %inc54.i = add i32 %18, 1 store i32 %inc54.i, ptr %arrayidx.i51.i, align 4 - %idxprom55.i = zext i32 %19 to i64 + %idxprom55.i = zext i32 %18 to i64 %arrayidx56.i = getelementptr inbounds [5 x i32], ptr %arrayidx51.i, i64 0, i64 %idxprom55.i - store i32 %18, ptr %arrayidx56.i, align 4 + store i32 %17, ptr %arrayidx56.i, align 4 %cmp41.i = icmp ult ptr %call49.i, %add.ptr39.i br i1 %cmp41.i, label %land.rhs42.i, label %while.end57.i, !llvm.loop !117 diff --git a/bench/hermes/optimized/BytecodeGenerator.cpp.ll b/bench/hermes/optimized/BytecodeGenerator.cpp.ll index 7563b8891e5..39542717c95 100644 --- a/bench/hermes/optimized/BytecodeGenerator.cpp.ll +++ b/bench/hermes/optimized/BytecodeGenerator.cpp.ll @@ -2166,14 +2166,13 @@ if.end.i.i: ; preds = %while.body.i if.then.i.i.i: ; preds = %if.end.i.i %arrayidx2.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 1 %22 = load i8, ptr %arrayidx2.i.i.i, align 1 - %23 = and i8 %22, -64 - %cmp5.not.i.i.i = icmp eq i8 %23, -128 + %cmp5.not.i.i.i = icmp slt i8 %22, -64 br i1 %cmp5.not.i.i.i, label %if.end.i.i.i31, label %if.then.i30 if.end.i.i.i31: ; preds = %if.then.i.i.i %add.ptr8.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 2 - %24 = and i32 %conv.i.i.i, 30 - %cmp11.i.i.i = icmp eq i32 %24, 0 + %23 = and i32 %conv.i.i.i, 30 + %cmp11.i.i.i = icmp eq i32 %23, 0 br label %"_ZN6hermes10decodeUTF8ILb0EZNS_3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEjRPKcT0_.exit.i" if.else.i.i.i: ; preds = %if.end.i.i @@ -2183,17 +2182,16 @@ if.else.i.i.i: ; preds = %if.end.i.i if.then19.i.i.i: ; preds = %if.else.i.i.i %arrayidx21.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 1 - %25 = load i8, ptr %arrayidx21.i.i.i, align 1 - %conv22.i.i.i = sext i8 %25 to i32 - %26 = and i32 %conv22.i.i.i, 192 - %.not44.i.i.i = icmp eq i32 %26, 128 + %24 = load i8, ptr %arrayidx21.i.i.i, align 1 + %conv22.i.i.i = sext i8 %24 to i32 + %25 = and i32 %conv22.i.i.i, 192 + %.not44.i.i.i = icmp eq i32 %25, 128 br i1 %.not44.i.i.i, label %if.end31.i.i.i, label %if.then.i30 if.end31.i.i.i: ; preds = %if.then19.i.i.i %arrayidx32.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 2 - %27 = load i8, ptr %arrayidx32.i.i.i, align 1 - %28 = and i8 %27, -64 - %.not45.i.i.i = icmp eq i8 %28, -128 + %26 = load i8, ptr %arrayidx32.i.i.i, align 1 + %.not45.i.i.i = icmp slt i8 %26, -64 br i1 %.not45.i.i.i, label %if.end44.i.i.i, label %if.then.i30 if.end44.i.i.i: ; preds = %if.end31.i.i.i @@ -2219,24 +2217,22 @@ if.else68.i.i.i: ; preds = %if.else.i.i.i if.then71.i.i.i: ; preds = %if.else68.i.i.i %arrayidx73.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 1 - %29 = load i8, ptr %arrayidx73.i.i.i, align 1 - %conv74.i.i.i = sext i8 %29 to i32 - %30 = and i32 %conv74.i.i.i, 192 - %.not.i.i.i = icmp eq i32 %30, 128 + %27 = load i8, ptr %arrayidx73.i.i.i, align 1 + %conv74.i.i.i = sext i8 %27 to i32 + %28 = and i32 %conv74.i.i.i, 192 + %.not.i.i.i = icmp eq i32 %28, 128 br i1 %.not.i.i.i, label %if.end85.i.i.i, label %if.then.i30 if.end85.i.i.i: ; preds = %if.then71.i.i.i %arrayidx87.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 2 - %31 = load i8, ptr %arrayidx87.i.i.i, align 1 - %32 = and i8 %31, -64 - %.not42.i.i.i = icmp eq i8 %32, -128 + %29 = load i8, ptr %arrayidx87.i.i.i, align 1 + %.not42.i.i.i = icmp slt i8 %29, -64 br i1 %.not42.i.i.i, label %if.end99.i.i.i, label %if.then.i30 if.end99.i.i.i: ; preds = %if.end85.i.i.i %arrayidx100.i.i.i = getelementptr inbounds i8, ptr %it.052.i, i64 3 - %33 = load i8, ptr %arrayidx100.i.i.i, align 1 - %34 = and i8 %33, -64 - %.not43.i.i.i = icmp eq i8 %34, -128 + %30 = load i8, ptr %arrayidx100.i.i.i, align 1 + %.not43.i.i.i = icmp slt i8 %30, -64 br i1 %.not43.i.i.i, label %if.end112.i.i.i, label %if.then.i30 if.end112.i.i.i: ; preds = %if.end99.i.i.i @@ -2284,9 +2280,9 @@ if.then.i30: ; preds = %if.end112.i.i.i, %i _ZN6hermes3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit: ; preds = %"_ZN6hermes10decodeUTF8ILb0EZNS_3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEjRPKcT0_.exit.i.thread", %for.body, %while.end.i, %if.then.i30 %name.sroa.0.0.i = phi ptr [ %call.i4.i, %if.then.i30 ], [ %retval.sroa.0.0.copyload.i, %while.end.i ], [ %retval.sroa.0.0.copyload.i, %for.body ], [ %retval.sroa.0.0.copyload.i, %"_ZN6hermes10decodeUTF8ILb0EZNS_3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EEjRPKcT0_.exit.i.thread" ] - %35 = load i32, ptr %Size.i.i.i.i.i, align 8 - %36 = load i32, ptr %Capacity2.i.i.i.i.i, align 4 - %cmp.not.i32 = icmp ult i32 %35, %36 + %31 = load i32, ptr %Size.i.i.i.i.i, align 8 + %32 = load i32, ptr %Capacity2.i.i.i.i.i, align 4 + %cmp.not.i32 = icmp ult i32 %31, %32 br i1 %cmp.not.i32, label %_ZN4llvh23SmallVectorTemplateBaseIN6hermes10IdentifierELb1EE9push_backERKS2_.exit, label %if.then.i33 if.then.i33: ; preds = %_ZN6hermes3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit @@ -2295,14 +2291,14 @@ if.then.i33: ; preds = %_ZN6hermes3hbc12_GL br label %_ZN4llvh23SmallVectorTemplateBaseIN6hermes10IdentifierELb1EE9push_backERKS2_.exit _ZN4llvh23SmallVectorTemplateBaseIN6hermes10IdentifierELb1EE9push_backERKS2_.exit: ; preds = %_ZN6hermes3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit, %if.then.i33 - %37 = phi i32 [ %.pre.i, %if.then.i33 ], [ %35, %_ZN6hermes3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit ] - %38 = load ptr, ptr %names, align 8 - %conv.i3.i = zext i32 %37 to i64 - %add.ptr.i.i35 = getelementptr inbounds %"class.hermes::Identifier", ptr %38, i64 %conv.i3.i - %39 = ptrtoint ptr %name.sroa.0.0.i to i64 - store i64 %39, ptr %add.ptr.i.i35, align 1 - %40 = load i32, ptr %Size.i.i.i.i.i, align 8 - %add.i = add i32 %40, 1 + %33 = phi i32 [ %.pre.i, %if.then.i33 ], [ %31, %_ZN6hermes3hbc12_GLOBAL__N_119ensureUTF8IdentiferERNS_11StringTableENS_10IdentifierERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit ] + %34 = load ptr, ptr %names, align 8 + %conv.i3.i = zext i32 %33 to i64 + %add.ptr.i.i35 = getelementptr inbounds %"class.hermes::Identifier", ptr %34, i64 %conv.i3.i + %35 = ptrtoint ptr %name.sroa.0.0.i to i64 + store i64 %35, ptr %add.ptr.i.i35, align 1 + %36 = load i32, ptr %Size.i.i.i.i.i, align 8 + %add.i = add i32 %36, 1 store i32 %add.i, ptr %Size.i.i.i.i.i, align 8 %incdec.ptr = getelementptr inbounds i8, ptr %__begin3.053, i64 8 %cmp26.not = icmp eq ptr %incdec.ptr, %add.ptr.i @@ -2310,40 +2306,40 @@ _ZN4llvh23SmallVectorTemplateBaseIN6hermes10IdentifierELb1EE9push_backERKS2_.exi for.end: ; preds = %_ZN4llvh23SmallVectorTemplateBaseIN6hermes10IdentifierELb1EE9push_backERKS2_.exit, %land.end call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %nameUTF8Buffer) #20 - %41 = or disjoint i64 %parentScopeOffset.sroa.3.1, %parentScopeOffset.sroa.0.1 + %37 = or disjoint i64 %parentScopeOffset.sroa.3.1, %parentScopeOffset.sroa.0.1 %.pre = load ptr, ptr %names, align 8 %.pre56 = load i32, ptr %Size.i.i.i.i.i, align 8 - %42 = zext i32 %.pre56 to i64 + %38 = zext i32 %.pre56 to i64 br label %if.end31 if.end31: ; preds = %for.end, %if.end - %conv.i.i = phi i64 [ 0, %if.end ], [ %42, %for.end ] - %43 = phi ptr [ %add.ptr.i.i.i.i.i, %if.end ], [ %.pre, %for.end ] - %parentScopeOffset.sroa.0.0.insert.insert = phi i64 [ 0, %if.end ], [ %41, %for.end ] + %conv.i.i = phi i64 [ 0, %if.end ], [ %38, %for.end ] + %39 = phi ptr [ %add.ptr.i.i.i.i.i, %if.end ], [ %.pre, %for.end ] + %parentScopeOffset.sroa.0.0.insert.insert = phi i64 [ 0, %if.end ], [ %37, %for.end ] %agg.tmp33.sroa.0.0.copyload = load i16, ptr %flags, align 2 - %call35 = call noundef i32 @_ZN6hermes3hbc18DebugInfoGenerator15appendScopeDescENS_8OptValueIjEENS0_20DebugScopeDescriptor5FlagsEN4llvh8ArrayRefINS_10IdentifierEEE(ptr noundef nonnull align 8 dereferenceable(216) %debugInfoGen, i64 %parentScopeOffset.sroa.0.0.insert.insert, i16 %agg.tmp33.sroa.0.0.copyload, ptr %43, i64 %conv.i.i) #20 - %44 = load ptr, ptr %scopeDescIDAddr_, align 8 - %45 = load i32, ptr %NumBuckets.i.i.i.i.i, align 8 - %cmp.i.i.i.i37 = icmp eq i32 %45, 0 + %call35 = call noundef i32 @_ZN6hermes3hbc18DebugInfoGenerator15appendScopeDescENS_8OptValueIjEENS0_20DebugScopeDescriptor5FlagsEN4llvh8ArrayRefINS_10IdentifierEEE(ptr noundef nonnull align 8 dereferenceable(216) %debugInfoGen, i64 %parentScopeOffset.sroa.0.0.insert.insert, i16 %agg.tmp33.sroa.0.0.copyload, ptr %39, i64 %conv.i.i) #20 + %40 = load ptr, ptr %scopeDescIDAddr_, align 8 + %41 = load i32, ptr %NumBuckets.i.i.i.i.i, align 8 + %cmp.i.i.i.i37 = icmp eq i32 %41, 0 br i1 %cmp.i.i.i.i37, label %if.end.i.i39, label %if.end.i.i.i.i if.end.i.i.i.i: ; preds = %if.end31 %mul.i.i.i.i.i.i = mul i32 %call7.i, 37 - %sub.i.i.i.i = add i32 %45, -1 + %sub.i.i.i.i = add i32 %41, -1 %BucketNo.019.i.i.i.i = and i32 %mul.i.i.i.i.i.i, %sub.i.i.i.i %idx.ext20.i.i.i.i = zext i32 %BucketNo.019.i.i.i.i to i64 - %add.ptr21.i.i.i.i = getelementptr inbounds %"struct.llvh::detail::DenseMapPair", ptr %44, i64 %idx.ext20.i.i.i.i - %46 = load i32, ptr %add.ptr21.i.i.i.i, align 4 - %cmp.i22.i.i.i.i = icmp eq i32 %call7.i, %46 + %add.ptr21.i.i.i.i = getelementptr inbounds %"struct.llvh::detail::DenseMapPair", ptr %40, i64 %idx.ext20.i.i.i.i + %42 = load i32, ptr %add.ptr21.i.i.i.i, align 4 + %cmp.i22.i.i.i.i = icmp eq i32 %call7.i, %42 br i1 %cmp.i22.i.i.i.i, label %_ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapPairIjjEEEEjjS3_S6_EixERKj.exit, label %if.end9.i.i.i.i if.end9.i.i.i.i: ; preds = %if.end.i.i.i.i, %if.end13.i.i.i.i - %47 = phi i32 [ %48, %if.end13.i.i.i.i ], [ %46, %if.end.i.i.i.i ] + %43 = phi i32 [ %44, %if.end13.i.i.i.i ], [ %42, %if.end.i.i.i.i ] %add.ptr26.i.i.i.i = phi ptr [ %add.ptr.i.i.i.i38, %if.end13.i.i.i.i ], [ %add.ptr21.i.i.i.i, %if.end.i.i.i.i ] %BucketNo.025.i.i.i.i = phi i32 [ %BucketNo.0.i.i.i.i, %if.end13.i.i.i.i ], [ %BucketNo.019.i.i.i.i, %if.end.i.i.i.i ] %ProbeAmt.024.i.i.i.i = phi i32 [ %inc.i.i.i.i, %if.end13.i.i.i.i ], [ 1, %if.end.i.i.i.i ] %FoundTombstone.023.i.i.i.i = phi ptr [ %spec.select.i.i.i.i, %if.end13.i.i.i.i ], [ null, %if.end.i.i.i.i ] - %cmp.i15.i.i.i.i = icmp eq i32 %47, -1 + %cmp.i15.i.i.i.i = icmp eq i32 %43, -1 br i1 %cmp.i15.i.i.i.i, label %if.then12.i.i.i.i, label %if.end13.i.i.i.i if.then12.i.i.i.i: ; preds = %if.end9.i.i.i.i @@ -2352,7 +2348,7 @@ if.then12.i.i.i.i: ; preds = %if.end9.i.i.i.i br label %if.end.i.i39 if.end13.i.i.i.i: ; preds = %if.end9.i.i.i.i - %cmp.i16.i.i.i.i = icmp eq i32 %47, -2 + %cmp.i16.i.i.i.i = icmp eq i32 %43, -2 %tobool16.i.i.i.i = icmp eq ptr %FoundTombstone.023.i.i.i.i, null %or.cond.not.i.i.i.i = select i1 %cmp.i16.i.i.i.i, i1 %tobool16.i.i.i.i, i1 false %spec.select.i.i.i.i = select i1 %or.cond.not.i.i.i.i, ptr %add.ptr26.i.i.i.i, ptr %FoundTombstone.023.i.i.i.i @@ -2360,16 +2356,16 @@ if.end13.i.i.i.i: ; preds = %if.end9.i.i.i.i %add.i.i.i.i = add i32 %ProbeAmt.024.i.i.i.i, %BucketNo.025.i.i.i.i %BucketNo.0.i.i.i.i = and i32 %add.i.i.i.i, %sub.i.i.i.i %idx.ext.i.i.i.i = zext i32 %BucketNo.0.i.i.i.i to i64 - %add.ptr.i.i.i.i38 = getelementptr inbounds %"struct.llvh::detail::DenseMapPair", ptr %44, i64 %idx.ext.i.i.i.i - %48 = load i32, ptr %add.ptr.i.i.i.i38, align 4 - %cmp.i.i.i.i.i = icmp eq i32 %call7.i, %48 + %add.ptr.i.i.i.i38 = getelementptr inbounds %"struct.llvh::detail::DenseMapPair", ptr %40, i64 %idx.ext.i.i.i.i + %44 = load i32, ptr %add.ptr.i.i.i.i38, align 4 + %cmp.i.i.i.i.i = icmp eq i32 %call7.i, %44 br i1 %cmp.i.i.i.i.i, label %_ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapPairIjjEEEEjjS3_S6_EixERKj.exit, label %if.end9.i.i.i.i, !llvm.loop !93 if.end.i.i39: ; preds = %if.then12.i.i.i.i, %if.end31 %cond.sink.i.i.i.i = phi ptr [ %cond.i.i.i.i, %if.then12.i.i.i.i ], [ null, %if.end31 ] %call.i.i.i = call noundef ptr @_ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapPairIjjEEEEjjS3_S6_E20InsertIntoBucketImplIjEEPS6_RKjRKT_SA_(ptr noundef nonnull align 1 dereferenceable(1) %scopeDescIDAddr_, ptr noundef nonnull align 4 dereferenceable(4) %ID, ptr noundef nonnull align 4 dereferenceable(4) %ID, ptr noundef %cond.sink.i.i.i.i) - %49 = load i32, ptr %ID, align 4 - store i32 %49, ptr %call.i.i.i, align 4 + %45 = load i32, ptr %ID, align 4 + store i32 %45, ptr %call.i.i.i, align 4 %second.i.i.i.i = getelementptr inbounds i8, ptr %call.i.i.i, i64 4 store i32 0, ptr %second.i.i.i.i, align 4 br label %_ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapPairIjjEEEEjjS3_S6_EixERKj.exit @@ -2378,12 +2374,12 @@ _ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapP %retval.0.i.i = phi ptr [ %call.i.i.i, %if.end.i.i39 ], [ %add.ptr21.i.i.i.i, %if.end.i.i.i.i ], [ %add.ptr.i.i.i.i38, %if.end13.i.i.i.i ] %second.i = getelementptr inbounds i8, ptr %retval.0.i.i, i64 4 store i32 %call35, ptr %second.i, align 4 - %50 = load ptr, ptr %names, align 8 - %cmp.i.i.i41 = icmp eq ptr %50, %add.ptr.i.i.i.i.i + %46 = load ptr, ptr %names, align 8 + %cmp.i.i.i41 = icmp eq ptr %46, %add.ptr.i.i.i.i.i br i1 %cmp.i.i.i41, label %return, label %if.then.i.i42 if.then.i.i42: ; preds = %_ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapPairIjjEEEEjjS3_S6_EixERKj.exit - call void @free(ptr noundef %50) #20 + call void @free(ptr noundef %46) #20 br label %return return: ; preds = %if.then.i.i42, %_ZN4llvh12DenseMapBaseINS_8DenseMapIjjNS_12DenseMapInfoIjEENS_6detail12DenseMapPairIjjEEEEjjS3_S6_EixERKj.exit, %if.then diff --git a/bench/hermes/optimized/ESTreeIRGen-expr.cpp.ll b/bench/hermes/optimized/ESTreeIRGen-expr.cpp.ll index 7b778cc2fc8..2660e131202 100644 --- a/bench/hermes/optimized/ESTreeIRGen-expr.cpp.ll +++ b/bench/hermes/optimized/ESTreeIRGen-expr.cpp.ll @@ -5263,19 +5263,18 @@ for.cond.i.i: ; preds = %land.rhs.i.i, %for. land.rhs.i.i: ; preds = %for.cond.i.i %9 = load i8, ptr %storemerge.i.i, align 1, !noalias !58 - %10 = and i8 %9, -64 - %cmp.i.i.i = icmp eq i8 %10, -128 + %cmp.i.i.i = icmp slt i8 %9, -64 br i1 %cmp.i.i.i, label %for.cond.i.i, label %for.end.i.i, !llvm.loop !61 for.end.i.i: ; preds = %land.rhs.i.i, %for.cond.i.i - %11 = load i8, ptr %8, align 1, !noalias !58 - %cmp4.i.i = icmp eq i8 %11, 10 + %10 = load i8, ptr %8, align 1, !noalias !58 + %cmp4.i.i = icmp eq i8 %10, 10 %or14.i.i = or i1 %skipSpace.0.shrunk4.i.i, %cmp4.i.i - %cmp11.i.i = icmp ult i8 %11, 32 + %cmp11.i.i = icmp ult i8 %10, 32 br i1 %cmp11.i.i, label %do.body.backedge.i.i, label %lor.rhs.i.i lor.rhs.i.i: ; preds = %for.end.i.i - %cmp18.i.i = icmp eq i8 %11, 32 + %cmp18.i.i = icmp eq i8 %10, 32 %or.cond.i.i = and i1 %skipSpace.0.shrunk4.i.i, %cmp18.i.i br i1 %or.cond.i.i, label %do.body.backedge.i.i, label %if.then.i12 @@ -5289,10 +5288,10 @@ if.then.i12: ; preds = %lor.rhs.i.i %sub.ptr.rhs.cast.i.i = ptrtoint ptr %8 to i64 %sub.ptr.sub.i.i = sub i64 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i %inc.i = add nuw nsw i32 %numUTF8Chars.0199.i, 1 - %12 = load ptr, ptr %OutBufEnd.i.i, align 8 - %13 = load ptr, ptr %OutBufCur.i.i, align 8 - %sub.ptr.lhs.cast.i20.i = ptrtoint ptr %12 to i64 - %sub.ptr.rhs.cast.i21.i = ptrtoint ptr %13 to i64 + %11 = load ptr, ptr %OutBufEnd.i.i, align 8 + %12 = load ptr, ptr %OutBufCur.i.i, align 8 + %sub.ptr.lhs.cast.i20.i = ptrtoint ptr %11 to i64 + %sub.ptr.rhs.cast.i21.i = ptrtoint ptr %12 to i64 %sub.ptr.sub.i22.i = sub i64 %sub.ptr.lhs.cast.i20.i, %sub.ptr.rhs.cast.i21.i %cmp.i23.i = icmp ugt i64 %sub.ptr.sub.i.i, %sub.ptr.sub.i22.i br i1 %cmp.i23.i, label %if.then.i24.i, label %if.then4.i.i @@ -5302,17 +5301,17 @@ if.then.i24.i: ; preds = %if.then.i12 br label %if.end.i if.then4.i.i: ; preds = %if.then.i12 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %13, ptr noundef nonnull align 1 dereferenceable(1) %8, i64 %sub.ptr.sub.i.i, i1 false) - %14 = load ptr, ptr %OutBufCur.i.i, align 8 - %add.ptr.i.i13 = getelementptr inbounds i8, ptr %14, i64 %sub.ptr.sub.i.i + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(1) %8, i64 %sub.ptr.sub.i.i, i1 false) + %13 = load ptr, ptr %OutBufCur.i.i, align 8 + %add.ptr.i.i13 = getelementptr inbounds i8, ptr %13, i64 %sub.ptr.sub.i.i store ptr %add.ptr.i.i13, ptr %OutBufCur.i.i, align 8 br label %if.end.i if.end.i: ; preds = %do.body.backedge.i.i, %if.then4.i.i, %if.then.i24.i %numUTF8Chars.1.i = phi i32 [ %inc.i, %if.then.i24.i ], [ %inc.i, %if.then4.i.i ], [ %numUTF8Chars.0199.i, %do.body.backedge.i.i ] %cmp5.i = icmp ult i32 %numUTF8Chars.1.i, 32 - %15 = select i1 %cmp2.i.i, i1 %cmp5.i, i1 false - br i1 %15, label %for.cond.preheader.i.preheader.i, label %while.cond9.preheader.i, !llvm.loop !63 + %14 = select i1 %cmp2.i.i, i1 %cmp5.i, i1 false + br i1 %14, label %for.cond.preheader.i.preheader.i, label %while.cond9.preheader.i, !llvm.loop !63 for.cond.preheader.i27.preheader.i: ; preds = %while.cond9.preheader.i, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit52.i" %numUTF8Chars.2204.i = phi i32 [ %spec.select.i, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit52.i" ], [ %numUTF8Chars.0.lcssa.i, %while.cond9.preheader.i ] @@ -5321,30 +5320,29 @@ for.cond.preheader.i27.preheader.i: ; preds = %while.cond9.prehead for.cond.preheader.i27.i: ; preds = %do.body.backedge.i46.i, %for.cond.preheader.i27.preheader.i %skipSpace.0.shrunk4.i28.i = phi i1 [ %skipSpace.0.shrunk.be.i47.i, %do.body.backedge.i46.i ], [ false, %for.cond.preheader.i27.preheader.i ] - %16 = phi ptr [ %storemerge.i31.i, %do.body.backedge.i46.i ], [ %pos.1203.i, %for.cond.preheader.i27.preheader.i ] + %15 = phi ptr [ %storemerge.i31.i, %do.body.backedge.i46.i ], [ %pos.1203.i, %for.cond.preheader.i27.preheader.i ] br label %for.cond.i29.i for.cond.i29.i: ; preds = %land.rhs.i50.i, %for.cond.preheader.i27.i - %.pn.i30.i = phi ptr [ %storemerge.i31.i, %land.rhs.i50.i ], [ %16, %for.cond.preheader.i27.i ] + %.pn.i30.i = phi ptr [ %storemerge.i31.i, %land.rhs.i50.i ], [ %15, %for.cond.preheader.i27.i ] %storemerge.i31.i = getelementptr inbounds i8, ptr %.pn.i30.i, i64 1 %cmp2.i32.i = icmp ult ptr %storemerge.i31.i, %retval.sroa.2.0.copyload.i.i br i1 %cmp2.i32.i, label %land.rhs.i50.i, label %for.end.i33.i land.rhs.i50.i: ; preds = %for.cond.i29.i - %17 = load i8, ptr %storemerge.i31.i, align 1, !noalias !64 - %18 = and i8 %17, -64 - %cmp.i.i51.i = icmp eq i8 %18, -128 + %16 = load i8, ptr %storemerge.i31.i, align 1, !noalias !64 + %cmp.i.i51.i = icmp slt i8 %16, -64 br i1 %cmp.i.i51.i, label %for.cond.i29.i, label %for.end.i33.i, !llvm.loop !61 for.end.i33.i: ; preds = %land.rhs.i50.i, %for.cond.i29.i - %19 = load i8, ptr %16, align 1, !noalias !64 - %cmp4.i34.i = icmp eq i8 %19, 10 + %17 = load i8, ptr %15, align 1, !noalias !64 + %cmp4.i34.i = icmp eq i8 %17, 10 %or14.i35.i = or i1 %skipSpace.0.shrunk4.i28.i, %cmp4.i34.i - %cmp11.i36.i = icmp ult i8 %19, 32 + %cmp11.i36.i = icmp ult i8 %17, 32 br i1 %cmp11.i36.i, label %do.body.backedge.i46.i, label %lor.rhs.i37.i lor.rhs.i37.i: ; preds = %for.end.i33.i - %cmp18.i38.i = icmp eq i8 %19, 32 + %cmp18.i38.i = icmp eq i8 %17, 32 %or.cond.i39.i = and i1 %skipSpace.0.shrunk4.i28.i, %cmp18.i38.i br i1 %or.cond.i39.i, label %do.body.backedge.i46.i, label %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit52.i" @@ -5357,8 +5355,8 @@ do.body.backedge.i46.i: ; preds = %lor.rhs.i37.i, %for %ref.tmp15.sroa.3.1.i = phi i32 [ 0, %do.body.backedge.i46.i ], [ 1, %lor.rhs.i37.i ] %spec.select.i = add nuw nsw i32 %ref.tmp15.sroa.3.1.i, %numUTF8Chars.2204.i %cmp12.i = icmp ult i32 %spec.select.i, 64 - %20 = select i1 %cmp2.i32.i, i1 %cmp12.i, i1 false - br i1 %20, label %for.cond.preheader.i27.preheader.i, label %while.end20.i, !llvm.loop !67 + %18 = select i1 %cmp2.i32.i, i1 %cmp12.i, i1 false + br i1 %18, label %for.cond.preheader.i27.preheader.i, label %while.end20.i, !llvm.loop !67 while.end20.i: ; preds = %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit52.i", %while.cond9.preheader.i %pos.1.lcssa.i = phi ptr [ %pos.0.lcssa.i, %while.cond9.preheader.i ], [ %storemerge.i31.i, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit52.i" ] @@ -5367,11 +5365,11 @@ while.end20.i: ; preds = %"_ZZN6hermes5irgenL if.then22.i: ; preds = %while.end20.i %OutBufEnd.i5.i.i = getelementptr inbounds i8, ptr %OS.i, i64 16 - %21 = load ptr, ptr %OutBufEnd.i5.i.i, align 8 + %19 = load ptr, ptr %OutBufEnd.i5.i.i, align 8 %OutBufCur.i6.i.i = getelementptr inbounds i8, ptr %OS.i, i64 24 - %22 = load ptr, ptr %OutBufCur.i6.i.i, align 8 - %sub.ptr.lhs.cast.i7.i.i = ptrtoint ptr %21 to i64 - %sub.ptr.rhs.cast.i8.i.i = ptrtoint ptr %22 to i64 + %20 = load ptr, ptr %OutBufCur.i6.i.i, align 8 + %sub.ptr.lhs.cast.i7.i.i = ptrtoint ptr %19 to i64 + %sub.ptr.rhs.cast.i8.i.i = ptrtoint ptr %20 to i64 %sub.ptr.sub.i9.i.i = sub i64 %sub.ptr.lhs.cast.i7.i.i, %sub.ptr.rhs.cast.i8.i.i %cmp.i.i55.i = icmp ult i64 %sub.ptr.sub.i9.i.i, 5 br i1 %cmp.i.i55.i, label %if.then.i.i.i, label %if.then4.i.i.i @@ -5381,9 +5379,9 @@ if.then.i.i.i: ; preds = %if.then22.i br label %_ZN4llvh11raw_ostreamlsEPKc.exit.i if.then4.i.i.i: ; preds = %if.then22.i - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(5) %22, ptr noundef nonnull align 1 dereferenceable(5) @.str.34, i64 5, i1 false) - %23 = load ptr, ptr %OutBufCur.i6.i.i, align 8 - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %23, i64 5 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(5) %20, ptr noundef nonnull align 1 dereferenceable(5) @.str.34, i64 5, i1 false) + %21 = load ptr, ptr %OutBufCur.i6.i.i, align 8 + %add.ptr.i.i.i = getelementptr inbounds i8, ptr %21, i64 5 store ptr %add.ptr.i.i.i, ptr %OutBufCur.i6.i.i, align 8 br label %_ZN4llvh11raw_ostreamlsEPKc.exit.i @@ -5399,30 +5397,29 @@ while.body26.i: ; preds = %_ZN4llvh11raw_ostre for.cond.preheader.i58.i: ; preds = %while.body26.i, %do.body.backedge.i77.i %skipSpace.0.shrunk4.i59.i = phi i1 [ %skipSpace.0.shrunk.be.i78.i, %do.body.backedge.i77.i ], [ false, %while.body26.i ] - %24 = phi ptr [ %storemerge.i62.i, %do.body.backedge.i77.i ], [ %mark.1209.i, %while.body26.i ] + %22 = phi ptr [ %storemerge.i62.i, %do.body.backedge.i77.i ], [ %mark.1209.i, %while.body26.i ] br label %for.cond.i60.i for.cond.i60.i: ; preds = %land.rhs.i81.i, %for.cond.preheader.i58.i - %.pn.i61.i = phi ptr [ %storemerge.i62.i, %land.rhs.i81.i ], [ %24, %for.cond.preheader.i58.i ] + %.pn.i61.i = phi ptr [ %storemerge.i62.i, %land.rhs.i81.i ], [ %22, %for.cond.preheader.i58.i ] %storemerge.i62.i = getelementptr inbounds i8, ptr %.pn.i61.i, i64 1 %cmp2.i63.i = icmp ult ptr %storemerge.i62.i, %retval.sroa.2.0.copyload.i.i br i1 %cmp2.i63.i, label %land.rhs.i81.i, label %for.end.i64.i land.rhs.i81.i: ; preds = %for.cond.i60.i - %25 = load i8, ptr %storemerge.i62.i, align 1, !noalias !68 - %26 = and i8 %25, -64 - %cmp.i.i82.i = icmp eq i8 %26, -128 + %23 = load i8, ptr %storemerge.i62.i, align 1, !noalias !68 + %cmp.i.i82.i = icmp slt i8 %23, -64 br i1 %cmp.i.i82.i, label %for.cond.i60.i, label %for.end.i64.i, !llvm.loop !61 for.end.i64.i: ; preds = %land.rhs.i81.i, %for.cond.i60.i - %27 = load i8, ptr %24, align 1, !noalias !68 - %cmp4.i65.i = icmp eq i8 %27, 10 + %24 = load i8, ptr %22, align 1, !noalias !68 + %cmp4.i65.i = icmp eq i8 %24, 10 %or14.i66.i = or i1 %skipSpace.0.shrunk4.i59.i, %cmp4.i65.i - %cmp11.i67.i = icmp ult i8 %27, 32 + %cmp11.i67.i = icmp ult i8 %24, 32 br i1 %cmp11.i67.i, label %do.body.backedge.i77.i, label %lor.rhs.i68.i lor.rhs.i68.i: ; preds = %for.end.i64.i - %cmp18.i69.i = icmp eq i8 %27, 32 + %cmp18.i69.i = icmp eq i8 %24, 32 %or.cond.i70.i = and i1 %skipSpace.0.shrunk4.i59.i, %cmp18.i69.i br i1 %or.cond.i70.i, label %do.body.backedge.i77.i, label %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit83.i" @@ -5437,30 +5434,29 @@ do.body.backedge.i77.i: ; preds = %lor.rhs.i68.i, %for for.cond.preheader.i86.i: ; preds = %do.body.backedge.i105.i, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit83.i" %skipSpace.0.shrunk4.i87.i = phi i1 [ %skipSpace.0.shrunk.be.i106.i, %do.body.backedge.i105.i ], [ false, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit83.i" ] - %28 = phi ptr [ %storemerge.i90.i, %do.body.backedge.i105.i ], [ %pos.2208.i, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit83.i" ] + %25 = phi ptr [ %storemerge.i90.i, %do.body.backedge.i105.i ], [ %pos.2208.i, %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit83.i" ] br label %for.cond.i88.i for.cond.i88.i: ; preds = %land.rhs.i109.i, %for.cond.preheader.i86.i - %.pn.i89.i = phi ptr [ %storemerge.i90.i, %land.rhs.i109.i ], [ %28, %for.cond.preheader.i86.i ] + %.pn.i89.i = phi ptr [ %storemerge.i90.i, %land.rhs.i109.i ], [ %25, %for.cond.preheader.i86.i ] %storemerge.i90.i = getelementptr inbounds i8, ptr %.pn.i89.i, i64 1 %cmp2.i91.i = icmp ult ptr %storemerge.i90.i, %retval.sroa.2.0.copyload.i.i br i1 %cmp2.i91.i, label %land.rhs.i109.i, label %for.end.i92.i land.rhs.i109.i: ; preds = %for.cond.i88.i - %29 = load i8, ptr %storemerge.i90.i, align 1, !noalias !71 - %30 = and i8 %29, -64 - %cmp.i.i110.i = icmp eq i8 %30, -128 + %26 = load i8, ptr %storemerge.i90.i, align 1, !noalias !71 + %cmp.i.i110.i = icmp slt i8 %26, -64 br i1 %cmp.i.i110.i, label %for.cond.i88.i, label %for.end.i92.i, !llvm.loop !61 for.end.i92.i: ; preds = %land.rhs.i109.i, %for.cond.i88.i - %31 = load i8, ptr %28, align 1, !noalias !71 - %cmp4.i93.i = icmp eq i8 %31, 10 + %27 = load i8, ptr %25, align 1, !noalias !71 + %cmp4.i93.i = icmp eq i8 %27, 10 %or14.i94.i = or i1 %skipSpace.0.shrunk4.i87.i, %cmp4.i93.i - %cmp11.i95.i = icmp ult i8 %31, 32 + %cmp11.i95.i = icmp ult i8 %27, 32 br i1 %cmp11.i95.i, label %do.body.backedge.i105.i, label %lor.rhs.i96.i lor.rhs.i96.i: ; preds = %for.end.i92.i - %cmp18.i97.i = icmp eq i8 %31, 32 + %cmp18.i97.i = icmp eq i8 %27, 32 %or.cond.i98.i = and i1 %skipSpace.0.shrunk4.i87.i, %cmp18.i97.i br i1 %or.cond.i98.i, label %do.body.backedge.i105.i, label %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit111.loopexit.i" @@ -5484,30 +5480,29 @@ for.cond.preheader.i114.preheader.lr.ph.i: ; preds = %if.end29.i for.cond.preheader.i114.i: ; preds = %for.cond.preheader.i114.i.backedge, %for.cond.preheader.i114.preheader.lr.ph.i %skipSpace.0.shrunk4.i115.i = phi i1 [ false, %for.cond.preheader.i114.preheader.lr.ph.i ], [ %skipSpace.0.shrunk4.i115.i.be, %for.cond.preheader.i114.i.backedge ] - %32 = phi ptr [ %mark.0.i, %for.cond.preheader.i114.preheader.lr.ph.i ], [ %storemerge.i118.i, %for.cond.preheader.i114.i.backedge ] + %28 = phi ptr [ %mark.0.i, %for.cond.preheader.i114.preheader.lr.ph.i ], [ %storemerge.i118.i, %for.cond.preheader.i114.i.backedge ] br label %for.cond.i116.i for.cond.i116.i: ; preds = %land.rhs.i137.i, %for.cond.preheader.i114.i - %.pn.i117.i = phi ptr [ %storemerge.i118.i, %land.rhs.i137.i ], [ %32, %for.cond.preheader.i114.i ] + %.pn.i117.i = phi ptr [ %storemerge.i118.i, %land.rhs.i137.i ], [ %28, %for.cond.preheader.i114.i ] %storemerge.i118.i = getelementptr inbounds i8, ptr %.pn.i117.i, i64 1 %cmp2.i119.i = icmp ult ptr %storemerge.i118.i, %retval.sroa.2.0.copyload.i.i br i1 %cmp2.i119.i, label %land.rhs.i137.i, label %for.end.i120.i land.rhs.i137.i: ; preds = %for.cond.i116.i - %33 = load i8, ptr %storemerge.i118.i, align 1, !noalias !75 - %34 = and i8 %33, -64 - %cmp.i.i138.i = icmp eq i8 %34, -128 + %29 = load i8, ptr %storemerge.i118.i, align 1, !noalias !75 + %cmp.i.i138.i = icmp slt i8 %29, -64 br i1 %cmp.i.i138.i, label %for.cond.i116.i, label %for.end.i120.i, !llvm.loop !61 for.end.i120.i: ; preds = %land.rhs.i137.i, %for.cond.i116.i - %35 = load i8, ptr %32, align 1, !noalias !75 - %cmp4.i121.i = icmp eq i8 %35, 10 + %30 = load i8, ptr %28, align 1, !noalias !75 + %cmp4.i121.i = icmp eq i8 %30, 10 %or14.i122.i = or i1 %skipSpace.0.shrunk4.i115.i, %cmp4.i121.i - %cmp11.i123.i = icmp ult i8 %35, 32 + %cmp11.i123.i = icmp ult i8 %30, 32 br i1 %cmp11.i123.i, label %do.body.backedge.i133.i, label %lor.rhs.i124.i lor.rhs.i124.i: ; preds = %for.end.i120.i - %cmp18.i125.i = icmp eq i8 %35, 32 + %cmp18.i125.i = icmp eq i8 %30, 32 %or.cond.i126.i = and i1 %skipSpace.0.shrunk4.i115.i, %cmp18.i125.i br i1 %or.cond.i126.i, label %do.body.backedge.i133.i, label %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit139.i" @@ -5519,24 +5514,24 @@ do.body.backedge.i133.i: ; preds = %lor.rhs.i124.i, %fo "_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit139.i": ; preds = %lor.rhs.i124.i %sub.ptr.lhs.cast.i128.i = ptrtoint ptr %storemerge.i118.i to i64 - %sub.ptr.rhs.cast.i129.i = ptrtoint ptr %32 to i64 + %sub.ptr.rhs.cast.i129.i = ptrtoint ptr %28 to i64 %sub.ptr.sub.i130.i = sub i64 %sub.ptr.lhs.cast.i128.i, %sub.ptr.rhs.cast.i129.i - %36 = load ptr, ptr %OutBufEnd.i140.i, align 8 - %37 = load ptr, ptr %OutBufCur.i141.i, align 8 - %sub.ptr.lhs.cast.i142.i = ptrtoint ptr %36 to i64 - %sub.ptr.rhs.cast.i143.i = ptrtoint ptr %37 to i64 + %31 = load ptr, ptr %OutBufEnd.i140.i, align 8 + %32 = load ptr, ptr %OutBufCur.i141.i, align 8 + %sub.ptr.lhs.cast.i142.i = ptrtoint ptr %31 to i64 + %sub.ptr.rhs.cast.i143.i = ptrtoint ptr %32 to i64 %sub.ptr.sub.i144.i = sub i64 %sub.ptr.lhs.cast.i142.i, %sub.ptr.rhs.cast.i143.i %cmp.i145.i = icmp ugt i64 %sub.ptr.sub.i130.i, %sub.ptr.sub.i144.i br i1 %cmp.i145.i, label %if.then.i151.i, label %if.then4.i148.i if.then.i151.i: ; preds = %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit139.i" - %call3.i152.i = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN4llvh11raw_ostream5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(36) %OS.i, ptr noundef nonnull %32, i64 noundef %sub.ptr.sub.i130.i) #16 + %call3.i152.i = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN4llvh11raw_ostream5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(36) %OS.i, ptr noundef nonnull %28, i64 noundef %sub.ptr.sub.i130.i) #16 br label %_ZN4llvh11raw_ostreamlsENS_9StringRefE.exit153.i if.then4.i148.i: ; preds = %"_ZZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeEENK3$_0clERPKc.exit139.i" - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %37, ptr noundef nonnull align 1 dereferenceable(1) %32, i64 %sub.ptr.sub.i130.i, i1 false) - %38 = load ptr, ptr %OutBufCur.i141.i, align 8 - %add.ptr.i149.i = getelementptr inbounds i8, ptr %38, i64 %sub.ptr.sub.i130.i + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 1 dereferenceable(1) %28, i64 %sub.ptr.sub.i130.i, i1 false) + %33 = load ptr, ptr %OutBufCur.i141.i, align 8 + %add.ptr.i149.i = getelementptr inbounds i8, ptr %33, i64 %sub.ptr.sub.i130.i store ptr %add.ptr.i149.i, ptr %OutBufCur.i141.i, align 8 br label %_ZN4llvh11raw_ostreamlsENS_9StringRefE.exit153.i @@ -5548,37 +5543,37 @@ for.cond.preheader.i114.i.backedge: ; preds = %_ZN4llvh11raw_ostre br label %for.cond.preheader.i114.i, !llvm.loop !62 while.end37.i: ; preds = %_ZN4llvh11raw_ostreamlsENS_9StringRefE.exit153.i, %do.body.backedge.i133.i, %if.end29.i - %39 = load ptr, ptr %OS.i.i, align 8 - %40 = load ptr, ptr %39, align 8 - %Size.i.i.i = getelementptr inbounds i8, ptr %39, i64 8 - %41 = load i32, ptr %Size.i.i.i, align 8 - %conv.i.i.i = zext i32 %41 to i64 - %call40.i = call noundef ptr @_ZN6hermes9IRBuilder16getLiteralStringEN4llvh9StringRefE(ptr noundef nonnull align 8 dereferenceable(40) %Builder, ptr %40, i64 %conv.i.i.i) #16 + %34 = load ptr, ptr %OS.i.i, align 8 + %35 = load ptr, ptr %34, align 8 + %Size.i.i.i = getelementptr inbounds i8, ptr %34, i64 8 + %36 = load i32, ptr %Size.i.i.i, align 8 + %conv.i.i.i = zext i32 %36 to i64 + %call40.i = call noundef ptr @_ZN6hermes9IRBuilder16getLiteralStringEN4llvh9StringRefE(ptr noundef nonnull align 8 dereferenceable(40) %Builder, ptr %35, i64 %conv.i.i.i) #16 call void @_ZN4llvh11raw_ostreamD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %OS.i) #16 - %42 = load ptr, ptr %textifiedCallee.i, align 8 - %cmp.i.i.i.i = icmp eq ptr %42, %add.ptr.i.i.i.i.i.i + %37 = load ptr, ptr %textifiedCallee.i, align 8 + %cmp.i.i.i.i = icmp eq ptr %37, %add.ptr.i.i.i.i.i.i br i1 %cmp.i.i.i.i, label %_ZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeE.exit, label %if.then.i.i157.i if.then.i.i157.i: ; preds = %while.end37.i - call void @free(ptr noundef %42) #16 + call void @free(ptr noundef %37) #16 br label %_ZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeE.exit _ZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeE.exit: ; preds = %while.end37.i, %if.then.i.i157.i call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %textifiedCallee.i) call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %OS.i) - %43 = load ptr, ptr %args, align 8 - %44 = load i32, ptr %Size.i.i.i.i.i, align 8 - %conv.i.i = zext i32 %44 to i64 - %call31 = call noundef ptr @_ZN6hermes9IRBuilder14createCallInstEPNS_13LiteralStringEPNS_5ValueES4_N4llvh8ArrayRefIS4_EE(ptr noundef nonnull align 8 dereferenceable(40) %Builder, ptr noundef %call40.i, ptr noundef %callee, ptr noundef %thisVal, ptr %43, i64 %conv.i.i) #16 - %45 = icmp eq ptr %call31, null + %38 = load ptr, ptr %args, align 8 + %39 = load i32, ptr %Size.i.i.i.i.i, align 8 + %conv.i.i = zext i32 %39 to i64 + %call31 = call noundef ptr @_ZN6hermes9IRBuilder14createCallInstEPNS_13LiteralStringEPNS_5ValueES4_N4llvh8ArrayRefIS4_EE(ptr noundef nonnull align 8 dereferenceable(40) %Builder, ptr noundef %call40.i, ptr noundef %callee, ptr noundef %thisVal, ptr %38, i64 %conv.i.i) #16 + %40 = icmp eq ptr %call31, null %add.ptr = getelementptr inbounds i8, ptr %call31, i64 16 - %spec.select = select i1 %45, ptr null, ptr %add.ptr - %46 = load ptr, ptr %args, align 8 - %cmp.i.i.i16 = icmp eq ptr %46, %add.ptr.i.i.i.i.i + %spec.select = select i1 %40, ptr null, ptr %add.ptr + %41 = load ptr, ptr %args, align 8 + %cmp.i.i.i16 = icmp eq ptr %41, %add.ptr.i.i.i.i.i br i1 %cmp.i.i.i16, label %return, label %if.then.i.i if.then.i.i: ; preds = %_ZN6hermes5irgenL20getTextifiedCallExprERNS_9IRBuilderEPNS_6ESTree4NodeE.exit - call void @free(ptr noundef %46) #16 + call void @free(ptr noundef %41) #16 br label %return if.end32: ; preds = %for.end diff --git a/bench/hermes/optimized/SourceErrorManager.cpp.ll b/bench/hermes/optimized/SourceErrorManager.cpp.ll index dfd430c7761..579129f180d 100644 --- a/bench/hermes/optimized/SourceErrorManager.cpp.ll +++ b/bench/hermes/optimized/SourceErrorManager.cpp.ll @@ -1495,16 +1495,15 @@ if.then2: ; preds = %if.end if.then7: ; preds = %if.then2 %2 = load i8, ptr %loc.coerce, align 1 %cmp.i.i = icmp eq i8 %2, 13 - %3 = and i8 %2, -64 - %cmp.i.i.i = icmp eq i8 %3, -128 + %cmp.i.i.i = icmp slt i8 %2, -64 %or.cond.i.i = or i1 %cmp.i.i, %cmp.i.i.i br i1 %or.cond.i.i, label %do.body.preheader.i.i, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit do.body.preheader.i.i: ; preds = %if.then7 %bufStart9.i.i = ptrtoint ptr %agg.tmp.sroa.0.0.copyload to i64 %loc.coerce10.i.i = ptrtoint ptr %loc.coerce to i64 - %4 = sub i64 %bufStart9.i.i, %loc.coerce10.i.i - %scevgep.i.i = getelementptr i8, ptr %loc.coerce, i64 %4 + %3 = sub i64 %bufStart9.i.i, %loc.coerce10.i.i + %scevgep.i.i = getelementptr i8, ptr %loc.coerce, i64 %3 br label %do.body.i.i do.body.i.i: ; preds = %if.end.i.i, %do.body.preheader.i.i @@ -1514,10 +1513,9 @@ do.body.i.i: ; preds = %if.end.i.i, %do.bod if.end.i.i: ; preds = %do.body.i.i %incdec.ptr.i.i = getelementptr inbounds i8, ptr %ptr.1.i.i, i64 -1 - %5 = load i8, ptr %incdec.ptr.i.i, align 1 - %cmp8.i.i = icmp eq i8 %5, 13 - %6 = and i8 %5, -64 - %cmp.i7.i.i = icmp eq i8 %6, -128 + %4 = load i8, ptr %incdec.ptr.i.i, align 1 + %cmp8.i.i = icmp eq i8 %4, 13 + %cmp.i7.i.i = icmp slt i8 %4, -64 %or.cond8.i.i = or i1 %cmp8.i.i, %cmp.i7.i.i br i1 %or.cond8.i.i, label %do.body.i.i, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit, !llvm.loop !24 @@ -1525,15 +1523,15 @@ _ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12So %ptr.0.i.i = phi ptr [ %loc.coerce, %if.then7 ], [ %incdec.ptr.i.i, %if.end.i.i ], [ %scevgep.i.i, %do.body.i.i ] store i32 %0, ptr %result, align 4 %lineNo.i = getelementptr inbounds i8, ptr %this, i64 156 - %7 = load i32, ptr %lineNo.i, align 4 + %5 = load i32, ptr %lineNo.i, align 4 %line.i = getelementptr inbounds i8, ptr %result, i64 4 - store i32 %7, ptr %line.i, align 4 - %8 = load ptr, ptr %lineRef, align 8 + store i32 %5, ptr %line.i, align 4 + %6 = load ptr, ptr %lineRef, align 8 %sub.ptr.lhs.cast.i = ptrtoint ptr %ptr.0.i.i to i64 - %sub.ptr.rhs.cast.i = ptrtoint ptr %8 to i64 + %sub.ptr.rhs.cast.i = ptrtoint ptr %6 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i - %9 = trunc i64 %sub.ptr.sub.i to i32 - %conv.i = add i32 %9, 1 + %7 = trunc i64 %sub.ptr.sub.i to i32 + %conv.i = add i32 %7, 1 %col.i = getelementptr inbounds i8, ptr %result, i64 8 store i32 %conv.i, ptr %col.i, align 4 br label %return @@ -1546,63 +1544,61 @@ if.end11: ; preds = %if.then2 %cmp.not.i5 = icmp uge ptr %loc.coerce, %agg.tmp12.sroa.0.0.copyload %add.ptr.i.i6 = getelementptr inbounds i8, ptr %agg.tmp12.sroa.0.0.copyload, i64 %agg.tmp12.sroa.2.0.copyload %cmp3.i7 = icmp ult ptr %loc.coerce, %add.ptr.i.i6 - %10 = select i1 %cmp.not.i5, i1 %cmp3.i7, i1 false - br i1 %10, label %if.then17, label %if.end33 + %8 = select i1 %cmp.not.i5, i1 %cmp3.i7, i1 false + br i1 %8, label %if.then17, label %if.end33 if.then17: ; preds = %if.end11 %lineNo = getelementptr inbounds i8, ptr %this, i64 156 - %11 = load i32, ptr %lineNo, align 4 - %inc = add i32 %11, 1 + %9 = load i32, ptr %lineNo, align 4 + %inc = add i32 %9, 1 store i32 %inc, ptr %lineNo, align 4 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %lineRef, ptr noundef nonnull align 8 dereferenceable(16) %nextLineRef, i64 16, i1 false) - %add = add i32 %11, 2 + %add = add i32 %9, 2 %call27 = tail call { ptr, i64 } @_ZNK4llvh9SourceMgr10getLineRefEjj(ptr noundef nonnull align 8 dereferenceable(120) %this, i32 noundef %add, i32 noundef %0) #24 - %12 = extractvalue { ptr, i64 } %call27, 0 - %13 = extractvalue { ptr, i64 } %call27, 1 - store ptr %12, ptr %nextLineRef, align 8 - store i64 %13, ptr %agg.tmp12.sroa.2.0.nextLineRef.sroa_idx, align 8 - %14 = load ptr, ptr %lineRef, align 8 - %15 = load i8, ptr %loc.coerce, align 1 - %cmp.i.i9 = icmp eq i8 %15, 13 - %16 = and i8 %15, -64 - %cmp.i.i.i10 = icmp eq i8 %16, -128 + %10 = extractvalue { ptr, i64 } %call27, 0 + %11 = extractvalue { ptr, i64 } %call27, 1 + store ptr %10, ptr %nextLineRef, align 8 + store i64 %11, ptr %agg.tmp12.sroa.2.0.nextLineRef.sroa_idx, align 8 + %12 = load ptr, ptr %lineRef, align 8 + %13 = load i8, ptr %loc.coerce, align 1 + %cmp.i.i9 = icmp eq i8 %13, 13 + %cmp.i.i.i10 = icmp slt i8 %13, -64 %or.cond.i.i11 = or i1 %cmp.i.i9, %cmp.i.i.i10 br i1 %or.cond.i.i11, label %do.body.preheader.i.i20, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit32 do.body.preheader.i.i20: ; preds = %if.then17 - %bufStart9.i.i21 = ptrtoint ptr %14 to i64 + %bufStart9.i.i21 = ptrtoint ptr %12 to i64 %loc.coerce10.i.i22 = ptrtoint ptr %loc.coerce to i64 - %17 = sub i64 %bufStart9.i.i21, %loc.coerce10.i.i22 - %scevgep.i.i23 = getelementptr i8, ptr %loc.coerce, i64 %17 + %14 = sub i64 %bufStart9.i.i21, %loc.coerce10.i.i22 + %scevgep.i.i23 = getelementptr i8, ptr %loc.coerce, i64 %14 br label %do.body.i.i24 do.body.i.i24: ; preds = %if.end.i.i27, %do.body.preheader.i.i20 %ptr.1.i.i25 = phi ptr [ %incdec.ptr.i.i28, %if.end.i.i27 ], [ %loc.coerce, %do.body.preheader.i.i20 ] - %cmp4.i.i26 = icmp eq ptr %ptr.1.i.i25, %14 + %cmp4.i.i26 = icmp eq ptr %ptr.1.i.i25, %12 br i1 %cmp4.i.i26, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit32, label %if.end.i.i27 if.end.i.i27: ; preds = %do.body.i.i24 %incdec.ptr.i.i28 = getelementptr inbounds i8, ptr %ptr.1.i.i25, i64 -1 - %18 = load i8, ptr %incdec.ptr.i.i28, align 1 - %cmp8.i.i29 = icmp eq i8 %18, 13 - %19 = and i8 %18, -64 - %cmp.i7.i.i30 = icmp eq i8 %19, -128 + %15 = load i8, ptr %incdec.ptr.i.i28, align 1 + %cmp8.i.i29 = icmp eq i8 %15, 13 + %cmp.i7.i.i30 = icmp slt i8 %15, -64 %or.cond8.i.i31 = or i1 %cmp8.i.i29, %cmp.i7.i.i30 br i1 %or.cond8.i.i31, label %do.body.i.i24, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit32, !llvm.loop !24 _ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit32: ; preds = %do.body.i.i24, %if.end.i.i27, %if.then17 %ptr.0.i.i12 = phi ptr [ %loc.coerce, %if.then17 ], [ %incdec.ptr.i.i28, %if.end.i.i27 ], [ %scevgep.i.i23, %do.body.i.i24 ] - %20 = load i32, ptr %findLineCache_, align 8 - store i32 %20, ptr %result, align 4 - %21 = load i32, ptr %lineNo, align 4 + %16 = load i32, ptr %findLineCache_, align 8 + store i32 %16, ptr %result, align 4 + %17 = load i32, ptr %lineNo, align 4 %line.i14 = getelementptr inbounds i8, ptr %result, i64 4 - store i32 %21, ptr %line.i14, align 4 - %22 = load ptr, ptr %lineRef, align 8 + store i32 %17, ptr %line.i14, align 4 + %18 = load ptr, ptr %lineRef, align 8 %sub.ptr.lhs.cast.i15 = ptrtoint ptr %ptr.0.i.i12 to i64 - %sub.ptr.rhs.cast.i16 = ptrtoint ptr %22 to i64 + %sub.ptr.rhs.cast.i16 = ptrtoint ptr %18 to i64 %sub.ptr.sub.i17 = sub i64 %sub.ptr.lhs.cast.i15, %sub.ptr.rhs.cast.i16 - %23 = trunc i64 %sub.ptr.sub.i17 to i32 - %conv.i18 = add i32 %23, 1 + %19 = trunc i64 %sub.ptr.sub.i17 to i32 + %conv.i18 = add i32 %19, 1 %col.i19 = getelementptr inbounds i8, ptr %result, i64 8 store i32 %conv.i18, ptr %col.i19, align 4 br label %return @@ -1625,64 +1621,62 @@ if.then40: ; preds = %if.end.i if.end42: ; preds = %if.end.i call void @_ZNK4llvh9SourceMgr8FindLineENS_5SMLocEj(ptr nonnull sret(%"struct.std::pair") align 8 %lineRefAndNo.i, ptr noundef nonnull align 8 dereferenceable(120) %this, ptr nonnull %loc.coerce, i32 noundef %call3.i) #24, !noalias !25 %second.i = getelementptr inbounds i8, ptr %lineRefAndNo.i, i64 16 - %24 = load i32, ptr %second.i, align 8, !noalias !25 + %20 = load i32, ptr %second.i, align 8, !noalias !25 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %lineCoord.sroa.5, ptr noundef nonnull align 8 dereferenceable(16) %lineRefAndNo.i, i64 16, i1 false) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %lineRefAndNo.i) store i32 %call3.i, ptr %findLineCache_, align 8 %lineNo50 = getelementptr inbounds i8, ptr %this, i64 156 - store i32 %24, ptr %lineNo50, align 4 + store i32 %20, ptr %lineNo50, align 4 %lineRef54 = getelementptr inbounds i8, ptr %this, i64 160 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %lineRef54, ptr noundef nonnull align 8 dereferenceable(16) %lineCoord.sroa.5, i64 16, i1 false) - %add59 = add i32 %24, 1 + %add59 = add i32 %20, 1 %call62 = call { ptr, i64 } @_ZNK4llvh9SourceMgr10getLineRefEjj(ptr noundef nonnull align 8 dereferenceable(120) %this, i32 noundef %add59, i32 noundef %call3.i) #24 - %25 = extractvalue { ptr, i64 } %call62, 0 - %26 = extractvalue { ptr, i64 } %call62, 1 + %21 = extractvalue { ptr, i64 } %call62, 0 + %22 = extractvalue { ptr, i64 } %call62, 1 %nextLineRef64 = getelementptr inbounds i8, ptr %this, i64 176 - store ptr %25, ptr %nextLineRef64, align 8 + store ptr %21, ptr %nextLineRef64, align 8 %ref.tmp55.sroa.2.0.nextLineRef64.sroa_idx = getelementptr inbounds i8, ptr %this, i64 184 - store i64 %26, ptr %ref.tmp55.sroa.2.0.nextLineRef64.sroa_idx, align 8 - %27 = load ptr, ptr %lineRef54, align 8 - %28 = load i8, ptr %loc.coerce, align 1 - %cmp.i.i34 = icmp eq i8 %28, 13 - %29 = and i8 %28, -64 - %cmp.i.i.i35 = icmp eq i8 %29, -128 + store i64 %22, ptr %ref.tmp55.sroa.2.0.nextLineRef64.sroa_idx, align 8 + %23 = load ptr, ptr %lineRef54, align 8 + %24 = load i8, ptr %loc.coerce, align 1 + %cmp.i.i34 = icmp eq i8 %24, 13 + %cmp.i.i.i35 = icmp slt i8 %24, -64 %or.cond.i.i36 = or i1 %cmp.i.i34, %cmp.i.i.i35 br i1 %or.cond.i.i36, label %do.body.preheader.i.i45, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit57 do.body.preheader.i.i45: ; preds = %if.end42 - %bufStart9.i.i46 = ptrtoint ptr %27 to i64 + %bufStart9.i.i46 = ptrtoint ptr %23 to i64 %loc.coerce10.i.i47 = ptrtoint ptr %loc.coerce to i64 - %30 = sub i64 %bufStart9.i.i46, %loc.coerce10.i.i47 - %scevgep.i.i48 = getelementptr i8, ptr %loc.coerce, i64 %30 + %25 = sub i64 %bufStart9.i.i46, %loc.coerce10.i.i47 + %scevgep.i.i48 = getelementptr i8, ptr %loc.coerce, i64 %25 br label %do.body.i.i49 do.body.i.i49: ; preds = %if.end.i.i52, %do.body.preheader.i.i45 %ptr.1.i.i50 = phi ptr [ %incdec.ptr.i.i53, %if.end.i.i52 ], [ %loc.coerce, %do.body.preheader.i.i45 ] - %cmp4.i.i51 = icmp eq ptr %ptr.1.i.i50, %27 + %cmp4.i.i51 = icmp eq ptr %ptr.1.i.i50, %23 br i1 %cmp4.i.i51, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit57, label %if.end.i.i52 if.end.i.i52: ; preds = %do.body.i.i49 %incdec.ptr.i.i53 = getelementptr inbounds i8, ptr %ptr.1.i.i50, i64 -1 - %31 = load i8, ptr %incdec.ptr.i.i53, align 1 - %cmp8.i.i54 = icmp eq i8 %31, 13 - %32 = and i8 %31, -64 - %cmp.i7.i.i55 = icmp eq i8 %32, -128 + %26 = load i8, ptr %incdec.ptr.i.i53, align 1 + %cmp8.i.i54 = icmp eq i8 %26, 13 + %cmp.i7.i.i55 = icmp slt i8 %26, -64 %or.cond8.i.i56 = or i1 %cmp8.i.i54, %cmp.i7.i.i55 br i1 %or.cond8.i.i56, label %do.body.i.i49, label %_ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit57, !llvm.loop !24 _ZN6hermes18SourceErrorManager13FindLineCache10fillCoordsEN4llvh5SMLocERNS0_12SourceCoordsE.exit57: ; preds = %do.body.i.i49, %if.end.i.i52, %if.end42 %ptr.0.i.i37 = phi ptr [ %loc.coerce, %if.end42 ], [ %incdec.ptr.i.i53, %if.end.i.i52 ], [ %scevgep.i.i48, %do.body.i.i49 ] - %33 = load i32, ptr %findLineCache_, align 8 - store i32 %33, ptr %result, align 4 - %34 = load i32, ptr %lineNo50, align 4 + %27 = load i32, ptr %findLineCache_, align 8 + store i32 %27, ptr %result, align 4 + %28 = load i32, ptr %lineNo50, align 4 %line.i39 = getelementptr inbounds i8, ptr %result, i64 4 - store i32 %34, ptr %line.i39, align 4 - %35 = load ptr, ptr %lineRef54, align 8 + store i32 %28, ptr %line.i39, align 4 + %29 = load ptr, ptr %lineRef54, align 8 %sub.ptr.lhs.cast.i40 = ptrtoint ptr %ptr.0.i.i37 to i64 - %sub.ptr.rhs.cast.i41 = ptrtoint ptr %35 to i64 + %sub.ptr.rhs.cast.i41 = ptrtoint ptr %29 to i64 %sub.ptr.sub.i42 = sub i64 %sub.ptr.lhs.cast.i40, %sub.ptr.rhs.cast.i41 - %36 = trunc i64 %sub.ptr.sub.i42 to i32 - %conv.i43 = add i32 %36, 1 + %30 = trunc i64 %sub.ptr.sub.i42 to i32 + %conv.i43 = add i32 %30, 1 %col.i44 = getelementptr inbounds i8, ptr %result, i64 8 store i32 %conv.i43, ptr %col.i44, align 4 br label %return @@ -2332,8 +2326,7 @@ for.body61: ; preds = %for.body, %for.inc7 %column.052 = phi i32 [ %column.1, %for.inc72 ], [ 0, %for.body ] %cur.251 = phi ptr [ %incdec.ptr73, %for.inc72 ], [ %cur.1, %for.body ] %10 = load i8, ptr %cur.251, align 1 - %11 = and i8 %10, -64 - %cmp.i33 = icmp eq i8 %11, -128 + %cmp.i33 = icmp slt i8 %10, -64 br i1 %cmp.i33, label %for.inc72, label %if.end64 if.end64: ; preds = %for.body61 diff --git a/bench/icu/optimized/uresbund.ll b/bench/icu/optimized/uresbund.ll index c93fb0e395b..7e61b0bb1d2 100644 --- a/bench/icu/optimized/uresbund.ll +++ b/bench/icu/optimized/uresbund.ll @@ -2043,7 +2043,7 @@ invoke.cont.i: ; preds = %if.then9 %8 = load ptr, ptr %agg.tmp.i, align 8 %9 = getelementptr inbounds i8, ptr %agg.tmp.i, i64 8 %10 = load i32, ptr %9, align 8 - %call3.i20.i = invoke noundef nonnull align 8 dereferenceable(60) ptr @_ZN6icu_7510CharString6appendEPKciR10UErrorCode(ptr noundef nonnull align 8 dereferenceable(60) %path.i, ptr noundef %8, i32 noundef %10, ptr noundef nonnull align 4 dereferenceable(4) %errorCode.i) + %call3.i19.i = invoke noundef nonnull align 8 dereferenceable(60) ptr @_ZN6icu_7510CharString6appendEPKciR10UErrorCode(ptr noundef nonnull align 8 dereferenceable(60) %path.i, ptr noundef %8, i32 noundef %10, ptr noundef nonnull align 4 dereferenceable(4) %errorCode.i) to label %invoke.cont1.i unwind label %lpad.loopexit.split-lp.i invoke.cont1.i: ; preds = %invoke.cont.i @@ -2052,18 +2052,18 @@ invoke.cont1.i: ; preds = %invoke.cont.i br i1 %cmp.i.i, label %if.end.i, label %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread lpad.loopexit.i: ; preds = %if.end18.i - %lpad.loopexit21.i = landingpad { ptr, i32 } + %lpad.loopexit20.i = landingpad { ptr, i32 } cleanup br label %common.resume lpad.loopexit.split-lp.i: ; preds = %invoke.cont.i, %if.then9 - %lpad.loopexit.split-lp22.i = landingpad { ptr, i32 } + %lpad.loopexit.split-lp21.i = landingpad { ptr, i32 } cleanup br label %common.resume common.resume: ; preds = %lpad.loopexit, %lpad.loopexit.split-lp.loopexit.split-lp, %lpad.loopexit.split-lp.loopexit, %lpad.loopexit.i, %lpad.loopexit.split-lp.i %path.sink = phi ptr [ %path.i, %lpad.loopexit.split-lp.i ], [ %path.i, %lpad.loopexit.i ], [ %path, %lpad.loopexit.split-lp.loopexit ], [ %path, %lpad.loopexit.split-lp.loopexit.split-lp ], [ %path, %lpad.loopexit ] - %common.resume.op = phi { ptr, i32 } [ %lpad.loopexit.split-lp22.i, %lpad.loopexit.split-lp.i ], [ %lpad.loopexit21.i, %lpad.loopexit.i ], [ %lpad.loopexit111, %lpad.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp112, %lpad.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit109, %lpad.loopexit ] + %common.resume.op = phi { ptr, i32 } [ %lpad.loopexit.split-lp21.i, %lpad.loopexit.split-lp.i ], [ %lpad.loopexit20.i, %lpad.loopexit.i ], [ %lpad.loopexit111, %lpad.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp112, %lpad.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit109, %lpad.loopexit ] call void @_ZN6icu_7515MaybeStackArrayIcLi40EED1Ev(ptr noundef nonnull align 8 dereferenceable(53) %path.sink) #21 resume { ptr, i32 } %common.resume.op @@ -2074,26 +2074,23 @@ if.end.i: ; preds = %invoke.cont1.i while.cond.i: ; preds = %if.end18.i, %if.end.i %resource.0.i = phi i32 [ %1, %if.end.i ], [ %call20.i, %if.end18.i ] %pathPart.0.i = phi ptr [ %12, %if.end.i ], [ %nextPathPart.0.i, %if.end18.i ] - %resource.0.fr.i = freeze i32 %resource.0.i %13 = load i8, ptr %pathPart.0.i, align 1 %tobool5.i = icmp ne i8 %13, 0 - %cmp.i91 = icmp ne i32 %resource.0.fr.i, -1 - %or.cond.i = and i1 %cmp.i91, %tobool5.i + %cmp.i91 = icmp ne i32 %resource.0.i, -1 + %or.cond.i = select i1 %tobool5.i, i1 %cmp.i91, i1 false br i1 %or.cond.i, label %land.rhs.i, label %while.end.i land.rhs.i: ; preds = %while.cond.i - %type.0.mask.i = and i32 %resource.0.fr.i, -268435456 + %type.0.mask.i = and i32 %resource.0.i, -268435456 %cmp6.i = icmp eq i32 %type.0.mask.i, 536870912 - br i1 %cmp6.i, label %while.body.i, label %switch.early.test.i - -switch.early.test.i: ; preds = %land.rhs.i - %14 = and i32 %resource.0.fr.i, -536870912 - switch i32 %14, label %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread [ - i32 -2147483648, label %while.body.i - i32 1073741824, label %while.body.i - ] - -while.body.i: ; preds = %switch.early.test.i, %switch.early.test.i, %land.rhs.i + %14 = and i32 %resource.0.i, -536870912 + %15 = icmp eq i32 %14, 1073741824 + %or.cond2.i = or i1 %cmp6.i, %15 + %16 = icmp slt i32 %resource.0.i, -1610612736 + %or.cond18.i = select i1 %or.cond2.i, i1 true, i1 %16 + br i1 %or.cond18.i, label %while.body.i, label %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread + +while.body.i: ; preds = %land.rhs.i %call14.i = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %pathPart.0.i, i32 noundef 47) #25 %cmp15.not.i = icmp eq ptr %call14.i, null br i1 %cmp15.not.i, label %if.else.i, label %if.then16.i @@ -2111,14 +2108,14 @@ if.else.i: ; preds = %while.body.i if.end18.i: ; preds = %if.else.i, %if.then16.i %nextPathPart.0.i = phi ptr [ %incdec.ptr.i, %if.then16.i ], [ %strchr.i, %if.else.i ] store ptr %pathPart.0.i, ptr %pathP.i, align 8 - %call20.i = invoke i32 @res_getTableItemByKey_75(ptr noundef nonnull %fData2.i, i32 noundef %resource.0.fr.i, ptr noundef nonnull %t.i, ptr noundef nonnull %pathP.i) + %call20.i = invoke i32 @res_getTableItemByKey_75(ptr noundef nonnull %fData2.i, i32 noundef %resource.0.i, ptr noundef nonnull %t.i, ptr noundef nonnull %pathP.i) to label %while.cond.i unwind label %lpad.loopexit.i, !llvm.loop !8 while.end.i: ; preds = %while.cond.i %tobool22.not.i = icmp eq i8 %13, 0 br i1 %tobool22.not.i, label %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit, label %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread -_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread: ; preds = %switch.early.test.i, %invoke.cont1.i, %while.end.i +_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread: ; preds = %land.rhs.i, %invoke.cont1.i, %while.end.i call void @_ZN6icu_7515MaybeStackArrayIcLi40EED1Ev(ptr noundef nonnull align 8 dereferenceable(53) %path.i) #21 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %path.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %errorCode.i) @@ -2136,42 +2133,42 @@ _ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit: ; preds = %while.end.i call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t.i) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %pathP.i) store ptr %inKey, ptr %key, align 8 - %cmp13 = icmp eq i32 %resource.0.fr.i, -1 + %cmp13 = icmp eq i32 %resource.0.i, -1 br i1 %cmp13, label %if.then14, label %if.else115 if.then14: ; preds = %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit.thread, %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit - %15 = load ptr, ptr %fData.i, align 8 + %17 = load ptr, ptr %fData.i, align 8 call void @_ZN6icu_7515MaybeStackArrayIcLi40EEC1Ev(ptr noundef nonnull align 8 dereferenceable(53) %path) %len.i = getelementptr inbounds i8, ptr %path, i64 56 store i32 0, ptr %len.i, align 8 - %16 = load ptr, ptr %path, align 8 - store i8 0, ptr %16, align 1 + %18 = load ptr, ptr %path, align 8 + store i8 0, ptr %18, align 1 store ptr null, ptr %myPath, align 8 - %17 = load ptr, ptr %fResPath, align 8 - %18 = load i32, ptr %fResPathLen, align 8 - %19 = getelementptr i8, ptr %resB, i64 24 + %19 = load ptr, ptr %fResPath, align 8 + %20 = load i32, ptr %fResPathLen, align 8 + %21 = getelementptr i8, ptr %resB, i64 24 br label %land.rhs land.rhs: ; preds = %if.then14, %if.end60 - %len.0143 = phi i32 [ %18, %if.then14 ], [ %len.1, %if.end60 ] - %resPath.0142 = phi ptr [ %17, %if.then14 ], [ %resPath.1, %if.end60 ] - %dataEntry.0141 = phi ptr [ %15, %if.then14 ], [ %dataEntry.2, %if.end60 ] + %len.0143 = phi i32 [ %20, %if.then14 ], [ %len.1, %if.end60 ] + %resPath.0142 = phi ptr [ %19, %if.then14 ], [ %resPath.1, %if.end60 ] + %dataEntry.0141 = phi ptr [ %17, %if.then14 ], [ %dataEntry.2, %if.end60 ] %didRootOnce.0140 = phi i1 [ false, %if.then14 ], [ %.didRootOnce.0, %if.end60 ] %helper.0139 = phi ptr [ null, %if.then14 ], [ %helper.1, %if.end60 ] %fParent = getelementptr inbounds i8, ptr %dataEntry.0141, i64 16 - %20 = load ptr, ptr %fParent, align 8 - %cmp18 = icmp eq ptr %20, null + %22 = load ptr, ptr %fParent, align 8 + %cmp18 = icmp eq ptr %22, null %.not = select i1 %cmp18, i1 %didRootOnce.0140, i1 false br i1 %.not, label %if.else113, label %while.body while.body: ; preds = %land.rhs %.didRootOnce.0 = select i1 %cmp18, i1 true, i1 %didRootOnce.0140 - %dataEntry.0. = select i1 %cmp18, ptr %dataEntry.0141, ptr %20 + %dataEntry.0. = select i1 %cmp18, ptr %dataEntry.0141, ptr %22 %rootRes26 = getelementptr inbounds i8, ptr %dataEntry.0., i64 72 - %21 = load i32, ptr %rootRes26, align 8 + %23 = load i32, ptr %rootRes26, align 8 %fBogus = getelementptr inbounds i8, ptr %dataEntry.0., i64 112 - %22 = load i32, ptr %fBogus, align 8 - %cmp27 = icmp eq i32 %22, 0 + %24 = load i32, ptr %fBogus, align 8 + %cmp27 = icmp eq i32 %24, 0 br i1 %cmp27, label %if.then28, label %if.end60 if.then28: ; preds = %while.body @@ -2179,8 +2176,8 @@ if.then28: ; preds = %while.body to label %invoke.cont unwind label %lpad.loopexit.split-lp.loopexit invoke.cont: ; preds = %if.then28 - %23 = load i32, ptr %status, align 4 - %cmp.i92 = icmp slt i32 %23, 1 + %25 = load i32, ptr %status, align 4 + %cmp.i92 = icmp slt i32 %25, 1 br i1 %cmp.i92, label %if.end34, label %if.then32 if.then32: ; preds = %invoke.cont @@ -2203,14 +2200,14 @@ lpad.loopexit.split-lp.loopexit.split-lp: ; preds = %if.else95.invoke, % br label %common.resume if.end34: ; preds = %invoke.cont - %24 = load ptr, ptr %path, align 8 - store ptr %24, ptr %myPath, align 8 + %26 = load ptr, ptr %path, align 8 + store ptr %26, ptr %myPath, align 8 store ptr %inKey, ptr %key, align 8 br label %do.body do.body: ; preds = %do.cond, %if.end34 %helper.2 = phi ptr [ %helper.0139, %if.end34 ], [ %helper.3, %do.cond ] - %rootRes.0 = phi i32 [ %21, %if.end34 ], [ %rootRes.1, %do.cond ] + %rootRes.0 = phi i32 [ %23, %if.end34 ], [ %rootRes.1, %do.cond ] %dataEntry.3 = phi ptr [ %dataEntry.0., %if.end34 ], [ %dataEntry.4, %do.cond ] %resPath.2 = phi ptr [ %resPath.0142, %if.end34 ], [ %resPath.3, %do.cond ] %len.2 = phi i32 [ %len.0143, %if.end34 ], [ %len.3, %do.cond ] @@ -2224,13 +2221,13 @@ invoke.cont38: ; preds = %do.body br i1 %cmp41, label %land.lhs.true, label %if.else54 land.lhs.true: ; preds = %invoke.cont38 - %25 = load ptr, ptr %myPath, align 8 - %26 = load i8, ptr %25, align 1 - %tobool42.not = icmp eq i8 %26, 0 + %27 = load ptr, ptr %myPath, align 8 + %28 = load i8, ptr %27, align 1 + %tobool42.not = icmp eq i8 %28, 0 br i1 %tobool42.not, label %do.cond, label %if.then43 if.then43: ; preds = %land.lhs.true - %resB.val89 = load ptr, ptr %19, align 8 + %resB.val89 = load ptr, ptr %21, align 8 %resB.val90 = load ptr, ptr %fResPath, align 8 %call.i94 = invoke fastcc noundef ptr @_ZN12_GLOBAL__N_116init_resb_resultEP18UResourceDataEntryjPKciS1_S3_iP15UResourceBundleP10UErrorCode(ptr noundef %dataEntry.3, i32 noundef %call39, ptr noundef null, i32 noundef -1, ptr noundef %resB.val89, ptr noundef %resB.val90, i32 noundef 0, ptr noundef %helper.2, ptr noundef %status) to label %invoke.cont44 unwind label %lpad.loopexit @@ -2241,13 +2238,13 @@ invoke.cont44: ; preds = %if.then43 if.then47: ; preds = %invoke.cont44 %fData48 = getelementptr inbounds i8, ptr %call.i94, i64 8 - %27 = load ptr, ptr %fData48, align 8 + %29 = load ptr, ptr %fData48, align 8 %fRes49 = getelementptr inbounds i8, ptr %call.i94, i64 108 - %28 = load i32, ptr %fRes49, align 4 + %30 = load i32, ptr %fRes49, align 4 %fResPath50 = getelementptr inbounds i8, ptr %call.i94, i64 32 - %29 = load ptr, ptr %fResPath50, align 8 + %31 = load ptr, ptr %fResPath50, align 8 %fResPathLen51 = getelementptr inbounds i8, ptr %call.i94, i64 104 - %30 = load i32, ptr %fResPathLen51, align 8 + %32 = load i32, ptr %fResPathLen51, align 8 br label %do.cond if.else54: ; preds = %invoke.cont38 @@ -2256,13 +2253,13 @@ if.else54: ; preds = %invoke.cont38 do.cond: ; preds = %land.lhs.true, %if.then47, %if.else54 %helper.3 = phi ptr [ %call.i94, %if.then47 ], [ %helper.2, %if.else54 ], [ %helper.2, %land.lhs.true ] - %rootRes.1 = phi i32 [ %28, %if.then47 ], [ %rootRes.0, %if.else54 ], [ %rootRes.0, %land.lhs.true ] - %dataEntry.4 = phi ptr [ %27, %if.then47 ], [ %dataEntry.3, %if.else54 ], [ %dataEntry.3, %land.lhs.true ] - %resPath.3 = phi ptr [ %29, %if.then47 ], [ %resPath.2, %if.else54 ], [ %resPath.2, %land.lhs.true ] - %len.3 = phi i32 [ %30, %if.then47 ], [ %len.2, %if.else54 ], [ %len.2, %land.lhs.true ] - %31 = load ptr, ptr %myPath, align 8 - %32 = load i8, ptr %31, align 1 - %tobool59.not = icmp eq i8 %32, 0 + %rootRes.1 = phi i32 [ %30, %if.then47 ], [ %rootRes.0, %if.else54 ], [ %rootRes.0, %land.lhs.true ] + %dataEntry.4 = phi ptr [ %29, %if.then47 ], [ %dataEntry.3, %if.else54 ], [ %dataEntry.3, %land.lhs.true ] + %resPath.3 = phi ptr [ %31, %if.then47 ], [ %resPath.2, %if.else54 ], [ %resPath.2, %land.lhs.true ] + %len.3 = phi i32 [ %32, %if.then47 ], [ %len.2, %if.else54 ], [ %len.2, %land.lhs.true ] + %33 = load ptr, ptr %myPath, align 8 + %34 = load i8, ptr %33, align 1 + %tobool59.not = icmp eq i8 %34, 0 br i1 %tobool59.not, label %if.end60, label %do.body, !llvm.loop !9 if.end60: ; preds = %do.cond, %if.else54, %while.body @@ -2280,18 +2277,18 @@ if.then62: ; preds = %if.end60, %invoke.c %dataEntry.2160 = phi ptr [ %dataEntry.3, %invoke.cont44 ], [ %dataEntry.2, %if.end60 ] %res.1159 = phi i32 [ %call39, %invoke.cont44 ], [ %res.1, %if.end60 ] %helper.1158 = phi ptr [ null, %invoke.cont44 ], [ %helper.1, %if.end60 ] - %33 = load ptr, ptr %dataEntry.2160, align 8 + %35 = load ptr, ptr %dataEntry.2160, align 8 %call64 = invoke ptr @uloc_getDefault_75() to label %invoke.cont63 unwind label %lpad.loopexit.split-lp.loopexit.split-lp invoke.cont63: ; preds = %if.then62 - %call65 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) %call64) #25 + %call65 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) %call64) #25 %cmp66 = icmp eq i32 %call65, 0 br i1 %cmp66, label %if.end73, label %lor.lhs.false67 lor.lhs.false67: ; preds = %invoke.cont63 - %34 = load ptr, ptr %dataEntry.2160, align 8 - %call69 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(5) @.str) #25 + %36 = load ptr, ptr %dataEntry.2160, align 8 + %call69 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %36, ptr noundef nonnull dereferenceable(5) @.str) #25 %cmp70 = icmp eq i32 %call69, 0 %spec.select = select i1 %cmp70, i32 -127, i32 -128 br label %if.end73 @@ -2299,10 +2296,10 @@ lor.lhs.false67: ; preds = %invoke.cont63 if.end73: ; preds = %lor.lhs.false67, %invoke.cont63 %storemerge = phi i32 [ -127, %invoke.cont63 ], [ %spec.select, %lor.lhs.false67 ] store i32 %storemerge, ptr %status, align 4 - %35 = load ptr, ptr %key, align 8 - %resB.val87 = load ptr, ptr %19, align 8 + %37 = load ptr, ptr %key, align 8 + %resB.val87 = load ptr, ptr %21, align 8 %resB.val88 = load ptr, ptr %fResPath, align 8 - %call.i95 = invoke fastcc noundef ptr @_ZN12_GLOBAL__N_116init_resb_resultEP18UResourceDataEntryjPKciS1_S3_iP15UResourceBundleP10UErrorCode(ptr noundef nonnull %dataEntry.2160, i32 noundef %res.1159, ptr noundef %35, i32 noundef -1, ptr noundef %resB.val87, ptr noundef %resB.val88, i32 noundef 0, ptr noundef %fillIn, ptr noundef %status) + %call.i95 = invoke fastcc noundef ptr @_ZN12_GLOBAL__N_116init_resb_resultEP18UResourceDataEntryjPKciS1_S3_iP15UResourceBundleP10UErrorCode(ptr noundef nonnull %dataEntry.2160, i32 noundef %res.1159, ptr noundef %37, i32 noundef -1, ptr noundef %resB.val87, ptr noundef %resB.val88, i32 noundef 0, ptr noundef %fillIn, ptr noundef %status) to label %invoke.cont74 unwind label %lpad.loopexit.split-lp.loopexit.split-lp invoke.cont74: ; preds = %if.end73 @@ -2311,62 +2308,62 @@ invoke.cont74: ; preds = %if.end73 if.else79: ; preds = %invoke.cont74 %fResPath80 = getelementptr inbounds i8, ptr %call.i95, i64 32 - %36 = load ptr, ptr %fResPath80, align 8 - %cmp81.not = icmp eq ptr %36, null + %38 = load ptr, ptr %fResPath80, align 8 + %cmp81.not = icmp eq ptr %38, null br i1 %cmp81.not, label %if.else95.invoke, label %if.end85 if.end85: ; preds = %if.else79 - %call84 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %36, i32 noundef 47) #25 + %call84 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %38, i32 noundef 47) #25 %cmp86.not = icmp eq ptr %call84, null br i1 %cmp86.not, label %if.else95.invoke, label %land.lhs.true87 land.lhs.true87: ; preds = %if.end85 %arrayidx = getelementptr inbounds i8, ptr %call84, i64 1 - %37 = load i8, ptr %arrayidx, align 1 - %cmp88.not = icmp eq i8 %37, 0 + %39 = load i8, ptr %arrayidx, align 1 + %cmp88.not = icmp eq i8 %39, 0 br i1 %cmp88.not, label %if.else95.invoke, label %if.then89 if.then89: ; preds = %land.lhs.true87 - %call92 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %36) #25 + %call92 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %38) #25 %conv93 = trunc i64 %call92 to i32 br label %if.else95.invoke if.else95.invoke: ; preds = %if.end85, %land.lhs.true87, %if.else79, %invoke.cont74, %if.then89 - %38 = phi ptr [ %36, %if.then89 ], [ %resPath.1161, %invoke.cont74 ], [ @.str.1, %if.else79 ], [ @.str.1, %land.lhs.true87 ], [ @.str.1, %if.end85 ] - %39 = phi i32 [ %conv93, %if.then89 ], [ %len.1162, %invoke.cont74 ], [ 0, %if.else79 ], [ 0, %land.lhs.true87 ], [ 0, %if.end85 ] - invoke fastcc void @_ZL10createPathPKciS0_iS0_RN6icu_7510CharStringEP10UErrorCode(ptr noundef %4, i32 noundef %5, ptr noundef nonnull %38, i32 noundef %39, ptr noundef %inKey, ptr noundef nonnull align 8 dereferenceable(60) %path, ptr noundef %status) + %40 = phi ptr [ %38, %if.then89 ], [ %resPath.1161, %invoke.cont74 ], [ @.str.1, %if.else79 ], [ @.str.1, %land.lhs.true87 ], [ @.str.1, %if.end85 ] + %41 = phi i32 [ %conv93, %if.then89 ], [ %len.1162, %invoke.cont74 ], [ 0, %if.else79 ], [ 0, %land.lhs.true87 ], [ 0, %if.end85 ] + invoke fastcc void @_ZL10createPathPKciS0_iS0_RN6icu_7510CharStringEP10UErrorCode(ptr noundef %4, i32 noundef %5, ptr noundef nonnull %40, i32 noundef %41, ptr noundef %inKey, ptr noundef nonnull align 8 dereferenceable(60) %path, ptr noundef %status) to label %if.end98 unwind label %lpad.loopexit.split-lp.loopexit.split-lp if.end98: ; preds = %if.else95.invoke %fResPath.i = getelementptr inbounds i8, ptr %call.i95, i64 32 - %40 = load ptr, ptr %fResPath.i, align 8 - %tobool.not.i = icmp eq ptr %40, null + %42 = load ptr, ptr %fResPath.i, align 8 + %tobool.not.i = icmp eq ptr %42, null %fResBuf.i = getelementptr inbounds i8, ptr %call.i95, i64 40 - %cmp.not.i = icmp eq ptr %40, %fResBuf.i + %cmp.not.i = icmp eq ptr %42, %fResBuf.i %or.cond.i97 = select i1 %tobool.not.i, i1 true, i1 %cmp.not.i br i1 %or.cond.i97, label %invoke.cont99, label %if.then.i if.then.i: ; preds = %if.end98 - invoke void @uprv_free_75(ptr noundef nonnull %40) + invoke void @uprv_free_75(ptr noundef nonnull %42) to label %invoke.cont99 unwind label %lpad.loopexit.split-lp.loopexit.split-lp invoke.cont99: ; preds = %if.end98, %if.then.i store ptr null, ptr %fResPath.i, align 8 %fResPathLen.i = getelementptr inbounds i8, ptr %call.i95, i64 104 store i32 0, ptr %fResPathLen.i, align 8 - %41 = load ptr, ptr %path, align 8 - %42 = load i32, ptr %len.i, align 8 - invoke fastcc void @_ZL18ures_appendResPathP15UResourceBundlePKciP10UErrorCode(ptr noundef nonnull %call.i95, ptr noundef %41, i32 noundef %42, ptr noundef nonnull %status) + %43 = load ptr, ptr %path, align 8 + %44 = load i32, ptr %len.i, align 8 + invoke fastcc void @_ZL18ures_appendResPathP15UResourceBundlePKciP10UErrorCode(ptr noundef nonnull %call.i95, ptr noundef %43, i32 noundef %44, ptr noundef nonnull %status) to label %invoke.cont104 unwind label %lpad.loopexit.split-lp.loopexit.split-lp invoke.cont104: ; preds = %invoke.cont99 - %43 = load ptr, ptr %fResPath.i, align 8 - %44 = load i32, ptr %fResPathLen.i, align 8 - %45 = sext i32 %44 to i64 - %46 = getelementptr i8, ptr %43, i64 %45 - %arrayidx107 = getelementptr i8, ptr %46, i64 -1 - %47 = load i8, ptr %arrayidx107, align 1 - %cmp109.not = icmp eq i8 %47, 47 + %45 = load ptr, ptr %fResPath.i, align 8 + %46 = load i32, ptr %fResPathLen.i, align 8 + %47 = sext i32 %46 to i64 + %48 = getelementptr i8, ptr %45, i64 %47 + %arrayidx107 = getelementptr i8, ptr %48, i64 -1 + %49 = load i8, ptr %arrayidx107, align 1 + %cmp109.not = icmp eq i8 %49, 47 br i1 %cmp109.not, label %cleanup.thread, label %if.then110 if.then110: ; preds = %invoke.cont104 @@ -2388,11 +2385,11 @@ cleanup: ; preds = %if.then32 br label %return if.else115: ; preds = %_ZL21getTableItemByKeyPathPK12ResourceDatajPKc.exit - %48 = load ptr, ptr %fData.i, align 8 - %49 = getelementptr i8, ptr %resB, i64 24 - %resB.val = load ptr, ptr %49, align 8 + %50 = load ptr, ptr %fData.i, align 8 + %51 = getelementptr i8, ptr %resB, i64 24 + %resB.val = load ptr, ptr %51, align 8 %resB.val86 = load ptr, ptr %fResPath, align 8 - %call.i = call fastcc noundef ptr @_ZN12_GLOBAL__N_116init_resb_resultEP18UResourceDataEntryjPKciS1_S3_iP15UResourceBundleP10UErrorCode(ptr noundef %48, i32 noundef %resource.0.fr.i, ptr noundef %inKey, i32 noundef -1, ptr noundef %resB.val, ptr noundef %resB.val86, i32 noundef 0, ptr noundef %fillIn, ptr noundef %status) + %call.i = call fastcc noundef ptr @_ZN12_GLOBAL__N_116init_resb_resultEP18UResourceDataEntryjPKciS1_S3_iP15UResourceBundleP10UErrorCode(ptr noundef %50, i32 noundef %resource.0.i, ptr noundef %inKey, i32 noundef -1, ptr noundef %resB.val, ptr noundef %resB.val86, i32 noundef 0, ptr noundef %fillIn, ptr noundef %status) br label %if.end120 if.else119: ; preds = %if.end3 diff --git a/bench/icu/optimized/uresdata.ll b/bench/icu/optimized/uresdata.ll index d2438f04b56..1f6da6dba13 100644 --- a/bench/icu/optimized/uresdata.ll +++ b/bench/icu/optimized/uresdata.ll @@ -3192,16 +3192,14 @@ entry: if.end: ; preds = %entry %shr = lshr i32 %r, 28 %cmp = icmp eq i32 %shr, 2 - br i1 %cmp, label %while.cond.preheader, label %switch.early.test - -switch.early.test: ; preds = %if.end %1 = and i32 %r, -536870912 - switch i32 %1, label %return [ - i32 -2147483648, label %while.cond.preheader - i32 1073741824, label %while.cond.preheader - ] + %2 = icmp eq i32 %1, 1073741824 + %or.cond1 = or i1 %cmp, %2 + %3 = icmp slt i32 %r, -1610612736 + %or.cond3 = or i1 %3, %or.cond1 + br i1 %or.cond3, label %while.cond.preheader, label %return -while.cond.preheader: ; preds = %switch.early.test, %switch.early.test, %if.end +while.cond.preheader: ; preds = %if.end %p16BitUnits.i = getelementptr inbounds i8, ptr %pResData, i64 16 %poolStringIndex16Limit.i.i = getelementptr inbounds i8, ptr %pResData, i64 52 %poolStringIndexLimit.i.i = getelementptr inbounds i8, ptr %pResData, i64 48 @@ -3211,9 +3209,9 @@ while.cond.preheader: ; preds = %switch.early.test, land.lhs.true: ; preds = %while.cond.preheader, %if.end54 %type.050 = phi i32 [ %shr, %while.cond.preheader ], [ %shr55, %if.end54 ] %t1.049 = phi i32 [ %r, %while.cond.preheader ], [ %t2.0, %if.end54 ] - %pathP.048 = phi ptr [ %0, %while.cond.preheader ], [ %20, %if.end54 ] - %2 = load i8, ptr %pathP.048, align 1 - %tobool11 = icmp ne i8 %2, 0 + %pathP.048 = phi ptr [ %0, %while.cond.preheader ], [ %22, %if.end54 ] + %4 = load i8, ptr %pathP.048, align 1 + %tobool11 = icmp ne i8 %4, 0 %cmp13 = icmp ne i32 %t1.049, -1 %or.cond4 = select i1 %tobool11, i1 %cmp13, i1 false br i1 %or.cond4, label %land.rhs, label %return @@ -3221,19 +3219,19 @@ land.lhs.true: ; preds = %while.cond.preheade land.rhs: ; preds = %land.lhs.true %type.050.fr = freeze i32 %type.050 %cmp14 = icmp eq i32 %type.050.fr, 2 - %3 = and i32 %type.050.fr, 14 - %4 = icmp eq i32 %3, 4 - %or.cond6 = or i1 %cmp14, %4 - %5 = icmp eq i32 %3, 8 - br i1 %cmp14, label %while.body, label %switch.early.test51 - -switch.early.test51: ; preds = %land.rhs - switch i32 %3, label %return [ + %5 = and i32 %type.050.fr, 14 + %6 = icmp eq i32 %5, 4 + %or.cond6 = or i1 %cmp14, %6 + %7 = icmp eq i32 %5, 8 + br i1 %cmp14, label %while.body, label %switch.early.test + +switch.early.test: ; preds = %land.rhs + switch i32 %5, label %return [ i32 8, label %while.body i32 4, label %while.body ] -while.body: ; preds = %switch.early.test51, %switch.early.test51, %land.rhs +while.body: ; preds = %switch.early.test, %switch.early.test, %land.rhs %call23 = tail call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %pathP.048, i32 noundef 47) #18 %cmp24.not = icmp eq ptr %call23, null br i1 %cmp24.not, label %if.else, label %if.then25 @@ -3263,7 +3261,7 @@ if.then36: ; preds = %if.end30 br label %if.end54 if.else38: ; preds = %if.end30 - br i1 %5, label %if.then42, label %if.end54 + br i1 %7, label %if.then42, label %if.end54 if.then42: ; preds = %if.else38 %call43 = call i64 @strtol(ptr noundef nonnull %pathP.048, ptr noundef nonnull %closeIndex, i32 noundef 10) #17 @@ -3272,9 +3270,9 @@ if.then42: ; preds = %if.else38 br i1 %cmp44, label %land.lhs.true45, label %if.end51 land.lhs.true45: ; preds = %if.then42 - %6 = load ptr, ptr %closeIndex, align 8 - %7 = load i8, ptr %6, align 1 - %cmp47 = icmp eq i8 %7, 0 + %8 = load ptr, ptr %closeIndex, align 8 + %9 = load i8, ptr %8, align 1 + %cmp47 = icmp eq i8 %9, 0 br i1 %cmp47, label %if.end.i, label %if.end51 if.end.i: ; preds = %land.lhs.true45 @@ -3290,43 +3288,43 @@ sw.bb.i: ; preds = %if.end.i br i1 %cmp1.not.i, label %if.end51, label %if.then2.i if.then2.i: ; preds = %sw.bb.i - %8 = load ptr, ptr %pRoot.i, align 8 + %10 = load ptr, ptr %pRoot.i, align 8 %idx.ext.i = zext nneg i32 %and.i to i64 - %add.ptr.i = getelementptr inbounds i32, ptr %8, i64 %idx.ext.i - %9 = load i32, ptr %add.ptr.i, align 4 - %cmp3.i = icmp sgt i32 %9, %conv + %add.ptr.i = getelementptr inbounds i32, ptr %10, i64 %idx.ext.i + %11 = load i32, ptr %add.ptr.i, align 4 + %cmp3.i = icmp sgt i32 %11, %conv br i1 %cmp3.i, label %if.then4.i, label %if.end51 if.then4.i: ; preds = %if.then2.i - %10 = and i64 %call43, 2147483647 - %11 = getelementptr inbounds i32, ptr %add.ptr.i, i64 %10 - %arrayidx.i = getelementptr inbounds i8, ptr %11, i64 4 - %12 = load i32, ptr %arrayidx.i, align 4 + %12 = and i64 %call43, 2147483647 + %13 = getelementptr inbounds i32, ptr %add.ptr.i, i64 %12 + %arrayidx.i = getelementptr inbounds i8, ptr %13, i64 4 + %14 = load i32, ptr %arrayidx.i, align 4 br label %if.end51 sw.bb7.i: ; preds = %if.end.i - %13 = load ptr, ptr %p16BitUnits.i, align 8 + %15 = load ptr, ptr %p16BitUnits.i, align 8 %idx.ext9.i = zext nneg i32 %and.i to i64 - %add.ptr10.i = getelementptr inbounds i16, ptr %13, i64 %idx.ext9.i - %14 = load i16, ptr %add.ptr10.i, align 2 - %conv.i = zext i16 %14 to i32 + %add.ptr10.i = getelementptr inbounds i16, ptr %15, i64 %idx.ext9.i + %16 = load i16, ptr %add.ptr10.i, align 2 + %conv.i = zext i16 %16 to i32 %cmp11.i = icmp ult i32 %conv, %conv.i br i1 %cmp11.i, label %if.then12.i, label %if.end51 if.then12.i: ; preds = %sw.bb7.i - %15 = and i64 %call43, 2147483647 - %16 = getelementptr inbounds i16, ptr %add.ptr10.i, i64 %15 - %arrayidx15.i = getelementptr inbounds i8, ptr %16, i64 2 - %17 = load i16, ptr %arrayidx15.i, align 2 - %conv16.i = zext i16 %17 to i32 - %18 = load i32, ptr %poolStringIndex16Limit.i.i, align 4 - %cmp.i.i = icmp sgt i32 %18, %conv16.i + %17 = and i64 %call43, 2147483647 + %18 = getelementptr inbounds i16, ptr %add.ptr10.i, i64 %17 + %arrayidx15.i = getelementptr inbounds i8, ptr %18, i64 2 + %19 = load i16, ptr %arrayidx15.i, align 2 + %conv16.i = zext i16 %19 to i32 + %20 = load i32, ptr %poolStringIndex16Limit.i.i, align 4 + %cmp.i.i = icmp sgt i32 %20, %conv16.i br i1 %cmp.i.i, label %_ZL18makeResourceFrom16PK12ResourceDatai.exit.i, label %if.else.i.i if.else.i.i: ; preds = %if.then12.i - %sub.i.i = sub i32 %conv16.i, %18 - %19 = load i32, ptr %poolStringIndexLimit.i.i, align 8 - %add.i.i = add nsw i32 %sub.i.i, %19 + %sub.i.i = sub i32 %conv16.i, %20 + %21 = load i32, ptr %poolStringIndexLimit.i.i, align 8 + %add.i.i = add nsw i32 %sub.i.i, %21 br label %_ZL18makeResourceFrom16PK12ResourceDatai.exit.i _ZL18makeResourceFrom16PK12ResourceDatai.exit.i: ; preds = %if.else.i.i, %if.then12.i @@ -3335,18 +3333,18 @@ _ZL18makeResourceFrom16PK12ResourceDatai.exit.i: ; preds = %if.else.i.i, %if.th br label %if.end51 if.end51: ; preds = %_ZL18makeResourceFrom16PK12ResourceDatai.exit.i, %sw.bb7.i, %if.then4.i, %if.then2.i, %sw.bb.i, %if.end.i, %if.then42, %land.lhs.true45 - %t2.1 = phi i32 [ -1, %land.lhs.true45 ], [ -1, %if.then42 ], [ %or.i.i, %_ZL18makeResourceFrom16PK12ResourceDatai.exit.i ], [ %12, %if.then4.i ], [ -1, %if.end.i ], [ -1, %sw.bb7.i ], [ -1, %sw.bb.i ], [ -1, %if.then2.i ] + %t2.1 = phi i32 [ -1, %land.lhs.true45 ], [ -1, %if.then42 ], [ %or.i.i, %_ZL18makeResourceFrom16PK12ResourceDatai.exit.i ], [ %14, %if.then4.i ], [ -1, %if.end.i ], [ -1, %sw.bb7.i ], [ -1, %sw.bb.i ], [ -1, %if.then2.i ] store ptr null, ptr %key, align 8 br label %if.end54 if.end54: ; preds = %if.else38, %if.end51, %if.then36 %t2.0 = phi i32 [ %call37, %if.then36 ], [ %t2.1, %if.end51 ], [ -1, %if.else38 ] %shr55 = lshr i32 %t2.0, 28 - %20 = load ptr, ptr %path, align 8 + %22 = load ptr, ptr %path, align 8 br i1 %cmp24.not, label %return, label %land.lhs.true, !llvm.loop !9 -return: ; preds = %if.end54, %land.lhs.true, %if.then25, %switch.early.test51, %switch.early.test, %entry - %retval.0 = phi i32 [ %r, %entry ], [ -1, %switch.early.test ], [ %t2.0, %if.end54 ], [ %t1.049, %land.lhs.true ], [ %t1.049, %switch.early.test51 ], [ -1, %if.then25 ] +return: ; preds = %if.end54, %land.lhs.true, %if.then25, %switch.early.test, %if.end, %entry + %retval.0 = phi i32 [ %r, %entry ], [ -1, %if.end ], [ %t2.0, %if.end54 ], [ %t1.049, %land.lhs.true ], [ %t1.049, %switch.early.test ], [ -1, %if.then25 ] ret i32 %retval.0 } diff --git a/bench/jq/optimized/utf8.ll b/bench/jq/optimized/utf8.ll index 6ced4308504..b53cd6200a6 100644 --- a/bench/jq/optimized/utf8.ll +++ b/bench/jq/optimized/utf8.ll @@ -219,14 +219,13 @@ define internal noundef ptr @left_adjust_char_head(ptr noundef readnone %0, ptr br i1 %.not, label %.preheader, label %.loopexit .preheader: ; preds = %2, %.preheader - %.0 = phi ptr [ %7, %.preheader ], [ %1, %2 ] + %.0 = phi ptr [ %6, %.preheader ], [ %1, %2 ] %3 = load i8, ptr %.0, align 1 - %4 = and i8 %3, -64 - %.not13 = icmp eq i8 %4, -128 - %5 = icmp ugt ptr %.0, %0 - %6 = and i1 %5, %.not13 - %7 = getelementptr inbounds i8, ptr %.0, i64 -1 - br i1 %6, label %.preheader, label %.loopexit, !llvm.loop !6 + %.not13 = icmp slt i8 %3, -64 + %4 = icmp ugt ptr %.0, %0 + %5 = and i1 %4, %.not13 + %6 = getelementptr inbounds i8, ptr %.0, i64 -1 + br i1 %5, label %.preheader, label %.loopexit, !llvm.loop !6 .loopexit: ; preds = %.preheader, %2 %.010 = phi ptr [ %1, %2 ], [ %.0, %.preheader ] @@ -243,48 +242,46 @@ define internal range(i32 0, 2) i32 @is_valid_mbc_string(ptr noundef readonly %0 .lr.ph21: ; preds = %2, %.loopexit %.01220 = phi ptr [ %.1, %.loopexit ], [ %0, %2 ] %4 = load i8, ptr %.01220, align 1 - %5 = and i8 %4, -64 - %.not = icmp eq i8 %5, -128 - br i1 %.not, label %.loopexit15, label %6 - -6: ; preds = %.lr.ph21 - %7 = getelementptr inbounds i8, ptr %.01220, i64 1 - %8 = zext i8 %4 to i64 - %9 = add nsw i64 %8, -192 - %or.cond = icmp ult i64 %9, 53 + %.not = icmp slt i8 %4, -64 + br i1 %.not, label %.loopexit15, label %5 + +5: ; preds = %.lr.ph21 + %6 = getelementptr inbounds i8, ptr %.01220, i64 1 + %7 = zext i8 %4 to i64 + %8 = add nsw i64 %7, -192 + %or.cond = icmp ult i64 %8, 53 br i1 %or.cond, label %.lr.ph.preheader, label %.loopexit -.lr.ph.preheader: ; preds = %6 - %10 = getelementptr inbounds [256 x i32], ptr @EncLen_UTF8, i64 0, i64 %8 - %11 = load i32, ptr %10, align 4 - %smax = tail call i32 @llvm.smax.i32(i32 %11, i32 2) +.lr.ph.preheader: ; preds = %5 + %9 = getelementptr inbounds [256 x i32], ptr @EncLen_UTF8, i64 0, i64 %7 + %10 = load i32, ptr %9, align 4 + %smax = tail call i32 @llvm.smax.i32(i32 %10, i32 2) br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %17 - %.01119 = phi i32 [ %19, %17 ], [ 1, %.lr.ph.preheader ] - %.218 = phi ptr [ %18, %17 ], [ %7, %.lr.ph.preheader ] - %12 = icmp eq ptr %.218, %1 - br i1 %12, label %.loopexit15, label %13 - -13: ; preds = %.lr.ph - %14 = load i8, ptr %.218, align 1 - %15 = and i8 %14, -64 - %16 = icmp eq i8 %15, -128 - br i1 %16, label %17, label %.loopexit15 - -17: ; preds = %13 - %18 = getelementptr inbounds i8, ptr %.218, i64 1 - %19 = add nuw nsw i32 %.01119, 1 - %exitcond.not = icmp eq i32 %19, %smax +.lr.ph: ; preds = %.lr.ph.preheader, %15 + %.01119 = phi i32 [ %17, %15 ], [ 1, %.lr.ph.preheader ] + %.218 = phi ptr [ %16, %15 ], [ %6, %.lr.ph.preheader ] + %11 = icmp eq ptr %.218, %1 + br i1 %11, label %.loopexit15, label %12 + +12: ; preds = %.lr.ph + %13 = load i8, ptr %.218, align 1 + %14 = icmp slt i8 %13, -64 + br i1 %14, label %15, label %.loopexit15 + +15: ; preds = %12 + %16 = getelementptr inbounds i8, ptr %.218, i64 1 + %17 = add nuw nsw i32 %.01119, 1 + %exitcond.not = icmp eq i32 %17, %smax br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !7 -.loopexit: ; preds = %17, %6 - %.1 = phi ptr [ %7, %6 ], [ %18, %17 ] - %20 = icmp ult ptr %.1, %1 - br i1 %20, label %.lr.ph21, label %.loopexit15, !llvm.loop !8 +.loopexit: ; preds = %15, %5 + %.1 = phi ptr [ %6, %5 ], [ %16, %15 ] + %18 = icmp ult ptr %.1, %1 + br i1 %18, label %.lr.ph21, label %.loopexit15, !llvm.loop !8 -.loopexit15: ; preds = %.lr.ph21, %.loopexit, %13, %.lr.ph, %2 - %.0 = phi i32 [ 1, %2 ], [ 0, %.lr.ph ], [ 0, %13 ], [ 0, %.lr.ph21 ], [ 1, %.loopexit ] +.loopexit15: ; preds = %.lr.ph21, %.loopexit, %12, %.lr.ph, %2 + %.0 = phi i32 [ 1, %2 ], [ 0, %.lr.ph ], [ 0, %12 ], [ 0, %.lr.ph21 ], [ 1, %.loopexit ] ret i32 %.0 } diff --git a/bench/libevent/optimized/evutil.c.ll b/bench/libevent/optimized/evutil.c.ll index 06d34b127e9..1ebde9445d1 100644 --- a/bench/libevent/optimized/evutil.c.ll +++ b/bench/libevent/optimized/evutil.c.ll @@ -684,19 +684,16 @@ lor.lhs.false2: ; preds = %lor.lhs.false land.lhs.true: ; preds = %lor.lhs.false2 %arrayidx7 = getelementptr inbounds i8, ptr %in, i64 1 %2 = load i8, ptr %arrayidx7, align 1 - %3 = and i8 %2, -64 - %cmp10 = icmp eq i8 %3, -128 - %cmp21 = icmp ugt i8 %2, -65 - %or.cond = or i1 %cmp10, %cmp21 + %or.cond = icmp slt i8 %2, 0 br i1 %or.cond, label %lor.end, label %lor.rhs lor.rhs: ; preds = %land.lhs.true, %lor.lhs.false2 %cmp25 = icmp eq i8 %0, -1 - %4 = zext i1 %cmp25 to i32 + %3 = zext i1 %cmp25 to i32 br label %lor.end lor.end: ; preds = %lor.rhs, %land.lhs.true, %lor.lhs.false, %entry - %lor.ext = phi i32 [ 1, %land.lhs.true ], [ 1, %lor.lhs.false ], [ 1, %entry ], [ %4, %lor.rhs ] + %lor.ext = phi i32 [ 1, %land.lhs.true ], [ 1, %lor.lhs.false ], [ 1, %entry ], [ %3, %lor.rhs ] ret i32 %lor.ext } @@ -3714,15 +3711,12 @@ lor.lhs.false2.i: ; preds = %lor.lhs.false.i land.lhs.true.i: ; preds = %lor.lhs.false2.i %arrayidx7.i = getelementptr inbounds i8, ptr %sa, i64 9 %6 = load i8, ptr %arrayidx7.i, align 1 - %7 = and i8 %6, -64 - %cmp10.i = icmp eq i8 %7, -128 - %cmp21.i = icmp ugt i8 %6, -65 - %or.cond.i6 = or i1 %cmp21.i, %cmp10.i + %or.cond.i6 = icmp slt i8 %6, 0 br i1 %or.cond.i6, label %if.end21, label %do.body14 do.body14: ; preds = %lor.lhs.false2.i, %land.lhs.true.i - %8 = load i32, ptr @event_debug_logging_mask_, align 4 - %tobool15.not = icmp eq i32 %8, 0 + %7 = load i32, ptr @event_debug_logging_mask_, align 4 + %tobool15.not = icmp eq i32 %7, 0 br i1 %tobool15.not, label %if.end21.sink.split, label %if.end21.sink.split.sink.split if.end21.sink.split.sink.split: ; preds = %do.body14, %do.body diff --git a/bench/libquic/optimized/a_utf8.c.ll b/bench/libquic/optimized/a_utf8.c.ll index 5ddee53793b..8c53e291ba7 100644 --- a/bench/libquic/optimized/a_utf8.c.ll +++ b/bench/libquic/optimized/a_utf8.c.ll @@ -68,8 +68,7 @@ if.end43: ; preds = %if.then39 lor.lhs.false: ; preds = %if.end43 %arrayidx49 = getelementptr inbounds i8, ptr %str, i64 2 %3 = load i8, ptr %arrayidx49, align 1 - %4 = and i8 %3, -64 - %cmp52.not = icmp eq i8 %4, -128 + %cmp52.not = icmp slt i8 %3, -64 br i1 %cmp52.not, label %if.end55, label %return if.end55: ; preds = %lor.lhs.false @@ -82,10 +81,10 @@ if.end55: ; preds = %lor.lhs.false br i1 %cmp72, label %return, label %if.end75 if.end75: ; preds = %if.end55 - %5 = and i8 %3, 63 - %6 = zext nneg i8 %5 to i32 - %7 = or disjoint i32 %or6670, %6 - %or71 = zext nneg i32 %7 to i64 + %4 = and i8 %3, 63 + %5 = zext nneg i8 %4 to i32 + %6 = or disjoint i32 %or6670, %5 + %or71 = zext nneg i32 %6 to i64 br label %if.end283 if.else76: ; preds = %if.else34 @@ -99,44 +98,42 @@ if.then81: ; preds = %if.else76 if.end85: ; preds = %if.then81 %arrayidx86 = getelementptr inbounds i8, ptr %str, i64 1 - %8 = load i8, ptr %arrayidx86, align 1 - %conv87 = zext i8 %8 to i32 + %7 = load i8, ptr %arrayidx86, align 1 + %conv87 = zext i8 %7 to i32 %and88 = and i32 %conv87, 192 %cmp89.not = icmp eq i32 %and88, 128 br i1 %cmp89.not, label %lor.lhs.false91, label %return lor.lhs.false91: ; preds = %if.end85 %arrayidx92 = getelementptr inbounds i8, ptr %str, i64 2 - %9 = load i8, ptr %arrayidx92, align 1 - %10 = and i8 %9, -64 - %cmp95.not = icmp eq i8 %10, -128 + %8 = load i8, ptr %arrayidx92, align 1 + %cmp95.not = icmp slt i8 %8, -64 br i1 %cmp95.not, label %lor.lhs.false97, label %return lor.lhs.false97: ; preds = %lor.lhs.false91 %arrayidx98 = getelementptr inbounds i8, ptr %str, i64 3 - %11 = load i8, ptr %arrayidx98, align 1 - %12 = and i8 %11, -64 - %cmp101.not = icmp eq i8 %12, -128 + %9 = load i8, ptr %arrayidx98, align 1 + %cmp101.not = icmp slt i8 %9, -64 br i1 %cmp101.not, label %if.end104, label %return if.end104: ; preds = %lor.lhs.false97 %and107 = shl nuw nsw i32 %conv, 18 - %13 = and i32 %and107, 1835008 + %10 = and i32 %and107, 1835008 %and112 = shl nuw nsw i32 %conv87, 12 %shl113 = and i32 %and112, 258048 - %or11569 = or disjoint i32 %shl113, %13 + %or11569 = or disjoint i32 %shl113, %10 %cmp127 = icmp ult i32 %or11569, 65536 br i1 %cmp127, label %return, label %if.end130 if.end130: ; preds = %if.end104 %or115 = zext nneg i32 %or11569 to i64 - %14 = and i8 %9, 63 - %and118 = zext nneg i8 %14 to i64 + %11 = and i8 %8, 63 + %and118 = zext nneg i8 %11 to i64 %shl119 = shl nuw nsw i64 %and118, 6 - %15 = and i8 %11, 63 - %conv125 = zext nneg i8 %15 to i64 - %16 = or disjoint i64 %shl119, %conv125 - %or126 = or disjoint i64 %16, %or115 + %12 = and i8 %9, 63 + %conv125 = zext nneg i8 %12 to i64 + %13 = or disjoint i64 %shl119, %conv125 + %or126 = or disjoint i64 %13, %or115 br label %if.end283 if.else131: ; preds = %if.else76 @@ -150,55 +147,52 @@ if.then136: ; preds = %if.else131 if.end140: ; preds = %if.then136 %arrayidx141 = getelementptr inbounds i8, ptr %str, i64 1 - %17 = load i8, ptr %arrayidx141, align 1 - %conv142 = zext i8 %17 to i32 + %14 = load i8, ptr %arrayidx141, align 1 + %conv142 = zext i8 %14 to i32 %and143 = and i32 %conv142, 192 %cmp144.not = icmp eq i32 %and143, 128 br i1 %cmp144.not, label %lor.lhs.false146, label %return lor.lhs.false146: ; preds = %if.end140 %arrayidx147 = getelementptr inbounds i8, ptr %str, i64 2 - %18 = load i8, ptr %arrayidx147, align 1 - %19 = and i8 %18, -64 - %cmp150.not = icmp eq i8 %19, -128 + %15 = load i8, ptr %arrayidx147, align 1 + %cmp150.not = icmp slt i8 %15, -64 br i1 %cmp150.not, label %lor.lhs.false152, label %return lor.lhs.false152: ; preds = %lor.lhs.false146 %arrayidx153 = getelementptr inbounds i8, ptr %str, i64 3 - %20 = load i8, ptr %arrayidx153, align 1 - %21 = and i8 %20, -64 - %cmp156.not = icmp eq i8 %21, -128 + %16 = load i8, ptr %arrayidx153, align 1 + %cmp156.not = icmp slt i8 %16, -64 br i1 %cmp156.not, label %lor.lhs.false158, label %return lor.lhs.false158: ; preds = %lor.lhs.false152 %arrayidx159 = getelementptr inbounds i8, ptr %str, i64 4 - %22 = load i8, ptr %arrayidx159, align 1 - %23 = and i8 %22, -64 - %cmp162.not = icmp eq i8 %23, -128 + %17 = load i8, ptr %arrayidx159, align 1 + %cmp162.not = icmp slt i8 %17, -64 br i1 %cmp162.not, label %if.end165, label %return if.end165: ; preds = %lor.lhs.false158 %and168 = shl nuw i32 %conv, 24 - %24 = and i32 %and168, 50331648 + %18 = and i32 %and168, 50331648 %and173 = shl nuw nsw i32 %conv142, 18 - %25 = and i32 %and173, 16515072 - %or17668 = or disjoint i32 %25, %24 + %19 = and i32 %and173, 16515072 + %or17668 = or disjoint i32 %19, %18 %cmp194 = icmp ult i32 %or17668, 2097152 br i1 %cmp194, label %return, label %if.end197 if.end197: ; preds = %if.end165 %or176 = zext nneg i32 %or17668 to i64 - %26 = and i8 %18, 63 - %conv180 = zext nneg i8 %26 to i64 + %20 = and i8 %15, 63 + %conv180 = zext nneg i8 %20 to i64 %shl181 = shl nuw nsw i64 %conv180, 12 %or182 = or disjoint i64 %shl181, %or176 - %27 = and i8 %20, 63 - %and185 = zext nneg i8 %27 to i64 + %21 = and i8 %16, 63 + %and185 = zext nneg i8 %21 to i64 %shl186 = shl nuw nsw i64 %and185, 6 - %28 = and i8 %22, 63 - %conv192 = zext nneg i8 %28 to i64 - %29 = or disjoint i64 %shl186, %conv192 - %or193 = or disjoint i64 %29, %or182 + %22 = and i8 %17, 63 + %conv192 = zext nneg i8 %22 to i64 + %23 = or disjoint i64 %shl186, %conv192 + %or193 = or disjoint i64 %23, %or182 br label %if.end283 if.else198: ; preds = %if.else131 @@ -212,65 +206,61 @@ if.then203: ; preds = %if.else198 if.end207: ; preds = %if.then203 %arrayidx208 = getelementptr inbounds i8, ptr %str, i64 1 - %30 = load i8, ptr %arrayidx208, align 1 - %conv209 = zext i8 %30 to i32 + %24 = load i8, ptr %arrayidx208, align 1 + %conv209 = zext i8 %24 to i32 %and210 = and i32 %conv209, 192 %cmp211.not = icmp eq i32 %and210, 128 br i1 %cmp211.not, label %lor.lhs.false213, label %return lor.lhs.false213: ; preds = %if.end207 %arrayidx214 = getelementptr inbounds i8, ptr %str, i64 2 - %31 = load i8, ptr %arrayidx214, align 1 - %32 = and i8 %31, -64 - %cmp217.not = icmp eq i8 %32, -128 + %25 = load i8, ptr %arrayidx214, align 1 + %cmp217.not = icmp slt i8 %25, -64 br i1 %cmp217.not, label %lor.lhs.false219, label %return lor.lhs.false219: ; preds = %lor.lhs.false213 %arrayidx220 = getelementptr inbounds i8, ptr %str, i64 3 - %33 = load i8, ptr %arrayidx220, align 1 - %34 = and i8 %33, -64 - %cmp223.not = icmp eq i8 %34, -128 + %26 = load i8, ptr %arrayidx220, align 1 + %cmp223.not = icmp slt i8 %26, -64 br i1 %cmp223.not, label %lor.lhs.false225, label %return lor.lhs.false225: ; preds = %lor.lhs.false219 %arrayidx226 = getelementptr inbounds i8, ptr %str, i64 4 - %35 = load i8, ptr %arrayidx226, align 1 - %36 = and i8 %35, -64 - %cmp229.not = icmp eq i8 %36, -128 + %27 = load i8, ptr %arrayidx226, align 1 + %cmp229.not = icmp slt i8 %27, -64 br i1 %cmp229.not, label %lor.lhs.false231, label %return lor.lhs.false231: ; preds = %lor.lhs.false225 %arrayidx232 = getelementptr inbounds i8, ptr %str, i64 5 - %37 = load i8, ptr %arrayidx232, align 1 - %38 = and i8 %37, -64 - %cmp235.not = icmp eq i8 %38, -128 + %28 = load i8, ptr %arrayidx232, align 1 + %cmp235.not = icmp slt i8 %28, -64 br i1 %cmp235.not, label %if.end238, label %return if.end238: ; preds = %lor.lhs.false231 - %39 = shl i32 %conv, 30 + %29 = shl i32 %conv, 30 %and246 = shl nuw i32 %conv209, 24 - %40 = and i32 %and246, 1056964608 - %or24967 = or disjoint i32 %40, %39 + %30 = and i32 %and246, 1056964608 + %or24967 = or disjoint i32 %30, %29 %cmp273 = icmp ult i32 %or24967, 67108864 br i1 %cmp273, label %return, label %if.end276 if.end276: ; preds = %if.end238 %or249 = zext nneg i32 %or24967 to i64 - %41 = and i8 %31, 63 - %conv253 = zext nneg i8 %41 to i64 + %31 = and i8 %25, 63 + %conv253 = zext nneg i8 %31 to i64 %shl254 = shl nuw nsw i64 %conv253, 18 - %42 = and i8 %33, 63 - %conv259 = zext nneg i8 %42 to i64 + %32 = and i8 %26, 63 + %conv259 = zext nneg i8 %32 to i64 %shl260 = shl nuw nsw i64 %conv259, 12 - %43 = or disjoint i64 %shl260, %shl254 - %or261 = or disjoint i64 %43, %or249 - %44 = and i8 %35, 63 - %and264 = zext nneg i8 %44 to i64 + %33 = or disjoint i64 %shl260, %shl254 + %or261 = or disjoint i64 %33, %or249 + %34 = and i8 %27, 63 + %and264 = zext nneg i8 %34 to i64 %shl265 = shl nuw nsw i64 %and264, 6 - %45 = and i8 %37, 63 - %conv271 = zext nneg i8 %45 to i64 - %46 = or disjoint i64 %shl265, %conv271 - %or272 = or disjoint i64 %46, %or261 + %35 = and i8 %28, 63 + %conv271 = zext nneg i8 %35 to i64 + %36 = or disjoint i64 %shl265, %conv271 + %or272 = or disjoint i64 %36, %or261 br label %if.end283 if.end283: ; preds = %if.end33, %if.end130, %if.end276, %if.end197, %if.end75, %if.then3 diff --git a/bench/libquic/optimized/icu_utf.cc.ll b/bench/libquic/optimized/icu_utf.cc.ll index c9f3a10f3de..e2a37ed88de 100644 --- a/bench/libquic/optimized/icu_utf.cc.ll +++ b/bench/libquic/optimized/icu_utf.cc.ll @@ -133,8 +133,7 @@ land.rhs: ; preds = %land.rhs.lr.ph, %wh %count.065 = phi i8 [ %2, %land.rhs.lr.ph ], [ %dec, %while.body ] %arrayidx63 = getelementptr inbounds i8, ptr %s, i64 %indvars.iv %18 = load i8, ptr %arrayidx63, align 1 - %19 = and i8 %18, -64 - %cmp66 = icmp eq i8 %19, -128 + %cmp66 = icmp slt i8 %18, -64 br i1 %cmp66, label %while.body, label %while.end.loopexit.split.loop.exit76 while.body: ; preds = %land.rhs @@ -144,12 +143,12 @@ while.body: ; preds = %land.rhs br i1 %cmp61.not, label %while.end, label %land.rhs, !llvm.loop !5 while.end.loopexit.split.loop.exit76: ; preds = %land.rhs - %20 = trunc nsw i64 %indvars.iv to i32 + %19 = trunc nsw i64 %indvars.iv to i32 br label %while.end while.end: ; preds = %while.body, %while.end.loopexit.split.loop.exit76, %if.then59 %count.0.lcssa = phi i8 [ %2, %if.then59 ], [ %count.065, %while.end.loopexit.split.loop.exit76 ], [ 0, %while.body ] - %i.3.lcssa = phi i32 [ %0, %if.then59 ], [ %20, %while.end.loopexit.split.loop.exit76 ], [ %17, %while.body ] + %i.3.lcssa = phi i32 [ %0, %if.then59 ], [ %19, %while.end.loopexit.split.loop.exit76 ], [ %17, %while.body ] %cmp69 = icmp sgt i8 %strict, -1 br i1 %cmp69, label %if.then70, label %if.end116 @@ -179,9 +178,8 @@ lor.lhs.false85: ; preds = %land.lhs.true83 land.rhs98: ; preds = %land.rhs98.preheader, %while.body105 %indvars.iv73 = phi i64 [ %3, %land.rhs98.preheader ], [ %indvars.iv.next74, %while.body105 ] %arrayidx100 = getelementptr inbounds i8, ptr %s, i64 %indvars.iv73 - %21 = load i8, ptr %arrayidx100, align 1 - %22 = and i8 %21, -64 - %cmp103 = icmp eq i8 %22, -128 + %20 = load i8, ptr %arrayidx100, align 1 + %cmp103 = icmp slt i8 %20, -64 br i1 %cmp103, label %while.body105, label %while.end107.loopexit.split.loop.exit79 while.body105: ; preds = %land.rhs98 @@ -191,11 +189,11 @@ while.body105: ; preds = %land.rhs98 br i1 %exitcond.not, label %while.end107, label %land.rhs98, !llvm.loop !7 while.end107.loopexit.split.loop.exit79: ; preds = %land.rhs98 - %23 = trunc nsw i64 %indvars.iv73 to i32 + %21 = trunc nsw i64 %indvars.iv73 to i32 br label %while.end107 while.end107: ; preds = %while.body105, %while.end107.loopexit.split.loop.exit79, %while.cond96.preheader - %i.5.lcssa = phi i32 [ %0, %while.cond96.preheader ], [ %23, %while.end107.loopexit.split.loop.exit79 ], [ %length, %while.body105 ] + %i.5.lcssa = phi i32 [ %0, %while.cond96.preheader ], [ %21, %while.end107.loopexit.split.loop.exit79 ], [ %length, %while.body105 ] %cmp109 = icmp sgt i8 %strict, -1 br i1 %cmp109, label %if.then110, label %if.end116 @@ -208,12 +206,12 @@ if.end116.sink.split: ; preds = %lor.lhs.false85, %l %idxprom112.sink = phi i64 [ %idxprom112, %if.then110 ], [ %idxprom74, %if.then70 ], [ %idxprom51, %land.lhs.true83 ], [ %idxprom51, %lor.lhs.false85 ] %i.4.ph = phi i32 [ %i.5.lcssa, %if.then110 ], [ %i.3.lcssa, %if.then70 ], [ %i.061, %land.lhs.true83 ], [ %i.061, %lor.lhs.false85 ] %arrayidx113 = getelementptr inbounds [6 x i32], ptr @_ZN8base_icuL15utf8_errorValueE, i64 0, i64 %idxprom112.sink - %24 = load i32, ptr %arrayidx113, align 4 + %22 = load i32, ptr %arrayidx113, align 4 br label %if.end116 if.end116: ; preds = %if.end116.sink.split, %while.end107, %while.end, %lor.lhs.false85, %if.else78 %i.4 = phi i32 [ %i.061, %lor.lhs.false85 ], [ %i.061, %if.else78 ], [ %i.3.lcssa, %while.end ], [ %i.5.lcssa, %while.end107 ], [ %i.4.ph, %if.end116.sink.split ] - %c.addr.3 = phi i32 [ %c.addr.062, %lor.lhs.false85 ], [ %c.addr.062, %if.else78 ], [ -1, %while.end ], [ -1, %while.end107 ], [ %24, %if.end116.sink.split ] + %c.addr.3 = phi i32 [ %c.addr.062, %lor.lhs.false85 ], [ %c.addr.062, %if.else78 ], [ -1, %while.end ], [ -1, %while.end107 ], [ %22, %if.end116.sink.split ] store i32 %i.4, ptr %pi, align 4 br label %return diff --git a/bench/libuv/optimized/idna.c.ll b/bench/libuv/optimized/idna.c.ll index 4338fbd8ec2..b160c58e4b0 100644 --- a/bench/libuv/optimized/idna.c.ll +++ b/bench/libuv/optimized/idna.c.ll @@ -1019,8 +1019,7 @@ if.end28.i: ; preds = %if.end21.i if.end38.i: ; preds = %if.end28.i %incdec.ptr39.i = getelementptr inbounds i8, ptr %source_ptr.addr.0, i64 3 %5 = load i8, ptr %incdec.ptr39.i, align 1 - %6 = and i8 %5, -64 - %cmp42.not.i = icmp eq i8 %6, -128 + %cmp42.not.i = icmp slt i8 %5, -64 %cmp51.i = icmp ult i8 %0, -11 %or.cond.i = and i1 %cmp51.i, %cmp42.not.i br i1 %or.cond.i, label %if.then53.i, label %return @@ -1032,18 +1031,18 @@ if.then53.i: ; preds = %if.end38.i br i1 %cmp55.i, label %if.then57.i, label %return if.then57.i: ; preds = %if.then53.i - %7 = icmp ugt i32 %shl46.masked.i, 65535 - %8 = zext i1 %7 to i64 + %6 = icmp ugt i32 %shl46.masked.i, 65535 + %7 = zext i1 %6 to i64 br label %if.end if.end: ; preds = %if.end28.i, %if.end13.i, %if.then57.i, %do.body - %9 = phi i8 [ %0, %do.body ], [ %5, %if.then57.i ], [ %1, %if.end13.i ], [ %2, %if.end28.i ] + %8 = phi i8 [ %0, %do.body ], [ 1, %if.then57.i ], [ %1, %if.end13.i ], [ %2, %if.end28.i ] %source_ptr.addr.1 = phi ptr [ %source_ptr.addr.0, %do.body ], [ %incdec.ptr39.i, %if.then57.i ], [ %incdec.ptr.i, %if.end13.i ], [ %incdec.ptr22.i, %if.end28.i ] - %retval.0.i = phi i64 [ 0, %do.body ], [ %8, %if.then57.i ], [ 0, %if.end13.i ], [ 0, %if.end28.i ] + %retval.0.i = phi i64 [ 0, %do.body ], [ %7, %if.then57.i ], [ 0, %if.end13.i ], [ 0, %if.end28.i ] %spec.select = add i64 %w_target_len.0, 1 %inc4 = add i64 %spec.select, %retval.0.i %incdec.ptr = getelementptr inbounds i8, ptr %source_ptr.addr.1, i64 1 - %tobool.not = icmp eq i8 %9, 0 + %tobool.not = icmp eq i8 %8, 0 br i1 %tobool.not, label %return, label %do.body return: ; preds = %if.then53.i, %if.end38.i, %if.end21.i, %if.end7.i, %if.end.i, %if.end diff --git a/bench/lief/optimized/ResourcesManager.cpp.ll b/bench/lief/optimized/ResourcesManager.cpp.ll index d34e04ebdb1..7685daf12df 100644 --- a/bench/lief/optimized/ResourcesManager.cpp.ll +++ b/bench/lief/optimized/ResourcesManager.cpp.ll @@ -38854,118 +38854,117 @@ define linkonce_odr hidden ptr @_ZN3fmt2v96detail5writeIcNS0_8appenderEEET0_S4_N %14 = icmp ugt i64 %2, %13 br i1 %14, label %.lr.ph.i, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit -.lr.ph.i: ; preds = %12, %21 - %.0815.i = phi i64 [ %22, %21 ], [ 0, %12 ] - %.0914.i = phi i64 [ %.1.i, %21 ], [ 0, %12 ] +.lr.ph.i: ; preds = %12, %20 + %.0815.i = phi i64 [ %21, %20 ], [ 0, %12 ] + %.0914.i = phi i64 [ %.1.i, %20 ], [ 0, %12 ] %15 = getelementptr inbounds i8, ptr %1, i64 %.0815.i %16 = load i8, ptr %15, align 1 - %17 = and i8 %16, -64 - %.not11.i = icmp eq i8 %17, -128 - br i1 %.not11.i, label %21, label %18 - -18: ; preds = %.lr.ph.i - %19 = add i64 %.0914.i, 1 - %20 = icmp ugt i64 %19, %13 - br i1 %20, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %21 - -21: ; preds = %18, %.lr.ph.i - %.1.i = phi i64 [ %19, %18 ], [ %.0914.i, %.lr.ph.i ] - %22 = add nuw i64 %.0815.i, 1 - %.not.i = icmp eq i64 %22, %2 + %.not11.i = icmp slt i8 %16, -64 + br i1 %.not11.i, label %20, label %17 + +17: ; preds = %.lr.ph.i + %18 = add i64 %.0914.i, 1 + %19 = icmp ugt i64 %18, %13 + br i1 %19, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %20 + +20: ; preds = %17, %.lr.ph.i + %.1.i = phi i64 [ %18, %17 ], [ %.0914.i, %.lr.ph.i ] + %21 = add nuw i64 %.0815.i, 1 + %.not.i = icmp eq i64 %21, %2 br i1 %.not.i, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %.lr.ph.i, !llvm.loop !491 -_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %21, %18, %12, %4 - %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %18 ], [ %2, %21 ] - %23 = getelementptr inbounds i8, ptr %3, i64 8 - %24 = load i8, ptr %23, align 4 - %25 = icmp eq i8 %24, 18 - %26 = load i32, ptr %3, align 4 - %.not = icmp eq i32 %26, 0 - br i1 %.not, label %55, label %27 +_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %20, %17, %12, %4 + %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %17 ], [ %2, %20 ] + %22 = getelementptr inbounds i8, ptr %3, i64 8 + %23 = load i8, ptr %22, align 4 + %24 = icmp eq i8 %23, 18 + %25 = load i32, ptr %3, align 4 + %.not = icmp eq i32 %25, 0 + br i1 %.not, label %54, label %26 -27: ; preds = %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - br i1 %25, label %28, label %30 +26: ; preds = %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + br i1 %24, label %27, label %29 -28: ; preds = %27 - %29 = tail call i64 @_ZN3fmt2v96detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) - br label %55 +27: ; preds = %26 + %28 = tail call i64 @_ZN3fmt2v96detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) + br label %54 -30: ; preds = %27 +29: ; preds = %26 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) store i64 0, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) store ptr %7, ptr %5, align 8 - %31 = icmp ugt i64 %.0, 3 - br i1 %31, label %32, label %.loopexit28.i.i + %30 = icmp ugt i64 %.0, 3 + br i1 %30, label %31, label %.loopexit28.i.i -32: ; preds = %30 - %33 = getelementptr inbounds i8, ptr %1, i64 %.0 - %34 = getelementptr inbounds i8, ptr %33, i64 -3 - br label %35 +31: ; preds = %29 + %32 = getelementptr inbounds i8, ptr %1, i64 %.0 + %33 = getelementptr inbounds i8, ptr %32, i64 -3 + br label %34 -35: ; preds = %37, %32 - %.1.i.i = phi ptr [ %1, %32 ], [ %38, %37 ] - %36 = icmp ult ptr %.1.i.i, %34 - br i1 %36, label %37, label %.loopexit28.i.i +34: ; preds = %36, %31 + %.1.i.i = phi ptr [ %1, %31 ], [ %37, %36 ] + %35 = icmp ult ptr %.1.i.i, %33 + br i1 %35, label %36, label %.loopexit28.i.i -37: ; preds = %35 - %38 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) - %.not24.i.i = icmp eq ptr %38, null - br i1 %.not24.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %35, !llvm.loop !492 +36: ; preds = %34 + %37 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) + %.not24.i.i = icmp eq ptr %37, null + br i1 %.not24.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %34, !llvm.loop !492 -.loopexit28.i.i: ; preds = %35, %30 - %.0.i.i = phi ptr [ %1, %30 ], [ %.1.i.i, %35 ] - %39 = getelementptr inbounds i8, ptr %1, i64 %.0 - %40 = ptrtoint ptr %39 to i64 - %41 = ptrtoint ptr %.0.i.i to i64 - %42 = sub i64 %40, %41 - %.not.i.i = icmp eq ptr %39, %.0.i.i - br i1 %.not.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %43 +.loopexit28.i.i: ; preds = %34, %29 + %.0.i.i = phi ptr [ %1, %29 ], [ %.1.i.i, %34 ] + %38 = getelementptr inbounds i8, ptr %1, i64 %.0 + %39 = ptrtoint ptr %38 to i64 + %40 = ptrtoint ptr %.0.i.i to i64 + %41 = sub i64 %39, %40 + %.not.i.i = icmp eq ptr %38, %.0.i.i + br i1 %.not.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %42 -43: ; preds = %.loopexit28.i.i +42: ; preds = %.loopexit28.i.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %6, i8 0, i64 7, i1 false) - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %42, i1 false) - %44 = ptrtoint ptr %6 to i64 - br label %45 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %41, i1 false) + %43 = ptrtoint ptr %6 to i64 + br label %44 -45: ; preds = %47, %43 - %.019.i.i = phi ptr [ %6, %43 ], [ %46, %47 ] - %.2.i.i = phi ptr [ %.0.i.i, %43 ], [ %51, %47 ] - %46 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) - %.not23.i.i = icmp eq ptr %46, null - br i1 %.not23.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %47 +44: ; preds = %46, %42 + %.019.i.i = phi ptr [ %6, %42 ], [ %45, %46 ] + %.2.i.i = phi ptr [ %.0.i.i, %42 ], [ %50, %46 ] + %45 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) + %.not23.i.i = icmp eq ptr %45, null + br i1 %.not23.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %46 -47: ; preds = %45 - %48 = ptrtoint ptr %46 to i64 - %49 = ptrtoint ptr %.019.i.i to i64 - %50 = sub i64 %48, %49 - %51 = getelementptr inbounds i8, ptr %.2.i.i, i64 %50 - %52 = sub i64 %48, %44 - %53 = icmp slt i64 %52, %42 - br i1 %53, label %45, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !493 +46: ; preds = %44 + %47 = ptrtoint ptr %45 to i64 + %48 = ptrtoint ptr %.019.i.i to i64 + %49 = sub i64 %47, %48 + %50 = getelementptr inbounds i8, ptr %.2.i.i, i64 %49 + %51 = sub i64 %47, %43 + %52 = icmp slt i64 %51, %41 + br i1 %52, label %44, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !493 -_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %37, %45, %47, %.loopexit28.i.i +_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %36, %44, %46, %.loopexit28.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) - %54 = load i64, ptr %7, align 8 + %53 = load i64, ptr %7, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) - br label %55 + br label %54 -55: ; preds = %28, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - %.019 = phi i64 [ %29, %28 ], [ %54, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] - %56 = zext i1 %25 to i8 - store i8 %56, ptr %8, align 8 - %57 = getelementptr inbounds i8, ptr %8, i64 8 - store ptr %1, ptr %57, align 8 +54: ; preds = %27, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + %.019 = phi i64 [ %28, %27 ], [ %53, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] + %55 = zext i1 %24 to i8 + store i8 %55, ptr %8, align 8 + %56 = getelementptr inbounds i8, ptr %8, i64 8 + store ptr %1, ptr %56, align 8 %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 16 store i64 %2, ptr %.sroa.5.0..sroa_idx, align 8 - %58 = getelementptr inbounds i8, ptr %8, i64 24 - store ptr %1, ptr %58, align 8 - %59 = getelementptr inbounds i8, ptr %8, i64 32 - store i64 %.0, ptr %59, align 8 - %60 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) - ret ptr %60 + %57 = getelementptr inbounds i8, ptr %8, i64 24 + store ptr %1, ptr %57, align 8 + %58 = getelementptr inbounds i8, ptr %8, i64 32 + store i64 %.0, ptr %58, align 8 + %59 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) + ret ptr %59 } ; Function Attrs: mustprogress uwtable diff --git a/bench/lightgbm/optimized/tree.cpp.ll b/bench/lightgbm/optimized/tree.cpp.ll index 7334572bce9..5020fc6f443 100644 --- a/bench/lightgbm/optimized/tree.cpp.ll +++ b/bench/lightgbm/optimized/tree.cpp.ll @@ -48296,118 +48296,117 @@ define linkonce_odr ptr @_ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_NS0_17b %14 = icmp ugt i64 %2, %13 br i1 %14, label %.lr.ph.i, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit -.lr.ph.i: ; preds = %12, %21 - %.0815.i = phi i64 [ %22, %21 ], [ 0, %12 ] - %.0914.i = phi i64 [ %.1.i, %21 ], [ 0, %12 ] +.lr.ph.i: ; preds = %12, %20 + %.0815.i = phi i64 [ %21, %20 ], [ 0, %12 ] + %.0914.i = phi i64 [ %.1.i, %20 ], [ 0, %12 ] %15 = getelementptr inbounds i8, ptr %1, i64 %.0815.i %16 = load i8, ptr %15, align 1 - %17 = and i8 %16, -64 - %.not11.i = icmp eq i8 %17, -128 - br i1 %.not11.i, label %21, label %18 - -18: ; preds = %.lr.ph.i - %19 = add i64 %.0914.i, 1 - %20 = icmp ugt i64 %19, %13 - br i1 %20, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %21 - -21: ; preds = %18, %.lr.ph.i - %.1.i = phi i64 [ %19, %18 ], [ %.0914.i, %.lr.ph.i ] - %22 = add nuw i64 %.0815.i, 1 - %.not.i = icmp eq i64 %22, %2 + %.not11.i = icmp slt i8 %16, -64 + br i1 %.not11.i, label %20, label %17 + +17: ; preds = %.lr.ph.i + %18 = add i64 %.0914.i, 1 + %19 = icmp ugt i64 %18, %13 + br i1 %19, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %20 + +20: ; preds = %17, %.lr.ph.i + %.1.i = phi i64 [ %18, %17 ], [ %.0914.i, %.lr.ph.i ] + %21 = add nuw i64 %.0815.i, 1 + %.not.i = icmp eq i64 %21, %2 br i1 %.not.i, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %.lr.ph.i, !llvm.loop !291 -_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %21, %18, %12, %4 - %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %18 ], [ %2, %21 ] - %23 = getelementptr inbounds i8, ptr %3, i64 8 - %24 = load i8, ptr %23, align 4 - %25 = icmp eq i8 %24, 18 - %26 = load i32, ptr %3, align 4 - %.not = icmp eq i32 %26, 0 - br i1 %.not, label %54, label %27 +_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %20, %17, %12, %4 + %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %17 ], [ %2, %20 ] + %22 = getelementptr inbounds i8, ptr %3, i64 8 + %23 = load i8, ptr %22, align 4 + %24 = icmp eq i8 %23, 18 + %25 = load i32, ptr %3, align 4 + %.not = icmp eq i32 %25, 0 + br i1 %.not, label %53, label %26 -27: ; preds = %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - br i1 %25, label %28, label %30 +26: ; preds = %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + br i1 %24, label %27, label %29 -28: ; preds = %27 - %29 = tail call i64 @_ZN3fmt3v106detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) - br label %54 +27: ; preds = %26 + %28 = tail call i64 @_ZN3fmt3v106detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) + br label %53 -30: ; preds = %27 +29: ; preds = %26 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) store i64 0, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) store ptr %7, ptr %5, align 8 - %31 = icmp ugt i64 %.0, 3 - br i1 %31, label %32, label %.loopexit28.i.i - -32: ; preds = %30 - %33 = getelementptr inbounds i8, ptr %1, i64 %.0 - %34 = getelementptr inbounds i8, ptr %33, i64 -3 - br label %35 + %30 = icmp ugt i64 %.0, 3 + br i1 %30, label %31, label %.loopexit28.i.i -35: ; preds = %37, %32 - %.1.i.i = phi ptr [ %1, %32 ], [ %38, %37 ] - %36 = icmp ult ptr %.1.i.i, %34 - br i1 %36, label %37, label %.loopexit28.i.i +31: ; preds = %29 + %32 = getelementptr inbounds i8, ptr %1, i64 %.0 + %33 = getelementptr inbounds i8, ptr %32, i64 -3 + br label %34 -37: ; preds = %35 - %38 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) - %.not24.i.i = icmp eq ptr %38, null - br i1 %.not24.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %35, !llvm.loop !292 - -.loopexit28.i.i: ; preds = %35, %30 - %.0.i.i = phi ptr [ %1, %30 ], [ %.1.i.i, %35 ] - %39 = getelementptr inbounds i8, ptr %1, i64 %.0 - %40 = ptrtoint ptr %39 to i64 - %41 = ptrtoint ptr %.0.i.i to i64 - %42 = sub i64 %40, %41 - %.not.i.i = icmp eq ptr %39, %.0.i.i +34: ; preds = %36, %31 + %.1.i.i = phi ptr [ %1, %31 ], [ %37, %36 ] + %35 = icmp ult ptr %.1.i.i, %33 + br i1 %35, label %36, label %.loopexit28.i.i + +36: ; preds = %34 + %37 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) + %.not24.i.i = icmp eq ptr %37, null + br i1 %.not24.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %34, !llvm.loop !292 + +.loopexit28.i.i: ; preds = %34, %29 + %.0.i.i = phi ptr [ %1, %29 ], [ %.1.i.i, %34 ] + %38 = getelementptr inbounds i8, ptr %1, i64 %.0 + %39 = ptrtoint ptr %38 to i64 + %40 = ptrtoint ptr %.0.i.i to i64 + %41 = sub i64 %39, %40 + %.not.i.i = icmp eq ptr %38, %.0.i.i br i1 %.not.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i _ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i: ; preds = %.loopexit28.i.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %6, i8 0, i64 7, i1 false) - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %42, i1 false) - %43 = ptrtoint ptr %6 to i64 - br label %44 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %41, i1 false) + %42 = ptrtoint ptr %6 to i64 + br label %43 -44: ; preds = %46, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i - %.019.i.i = phi ptr [ %6, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %45, %46 ] - %.2.i.i = phi ptr [ %.0.i.i, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %50, %46 ] - %45 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) - %.not23.i.i = icmp eq ptr %45, null - br i1 %.not23.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %46 +43: ; preds = %45, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i + %.019.i.i = phi ptr [ %6, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %44, %45 ] + %.2.i.i = phi ptr [ %.0.i.i, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %49, %45 ] + %44 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) + %.not23.i.i = icmp eq ptr %44, null + br i1 %.not23.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %45 -46: ; preds = %44 - %47 = ptrtoint ptr %45 to i64 - %48 = ptrtoint ptr %.019.i.i to i64 - %49 = sub i64 %47, %48 - %50 = getelementptr inbounds i8, ptr %.2.i.i, i64 %49 - %51 = sub i64 %47, %43 - %52 = icmp slt i64 %51, %42 - br i1 %52, label %44, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !293 - -_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %37, %44, %46, %.loopexit28.i.i +45: ; preds = %43 + %46 = ptrtoint ptr %44 to i64 + %47 = ptrtoint ptr %.019.i.i to i64 + %48 = sub i64 %46, %47 + %49 = getelementptr inbounds i8, ptr %.2.i.i, i64 %48 + %50 = sub i64 %46, %42 + %51 = icmp slt i64 %50, %41 + br i1 %51, label %43, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !293 + +_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %36, %43, %45, %.loopexit28.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) - %53 = load i64, ptr %7, align 8 + %52 = load i64, ptr %7, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) - br label %54 + br label %53 -54: ; preds = %28, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - %.019 = phi i64 [ %29, %28 ], [ %53, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] - %55 = zext i1 %25 to i8 - store i8 %55, ptr %8, align 8 - %56 = getelementptr inbounds i8, ptr %8, i64 8 - store ptr %1, ptr %56, align 8 +53: ; preds = %27, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + %.019 = phi i64 [ %28, %27 ], [ %52, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] + %54 = zext i1 %24 to i8 + store i8 %54, ptr %8, align 8 + %55 = getelementptr inbounds i8, ptr %8, i64 8 + store ptr %1, ptr %55, align 8 %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 16 store i64 %2, ptr %.sroa.5.0..sroa_idx, align 8 - %57 = getelementptr inbounds i8, ptr %8, i64 24 - store ptr %1, ptr %57, align 8 - %58 = getelementptr inbounds i8, ptr %8, i64 32 - store i64 %.0, ptr %58, align 8 - %59 = call ptr @_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) - ret ptr %59 + %56 = getelementptr inbounds i8, ptr %8, i64 24 + store ptr %1, ptr %56, align 8 + %57 = getelementptr inbounds i8, ptr %8, i64 32 + store i64 %.0, ptr %57, align 8 + %58 = call ptr @_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) + ret ptr %58 } ; Function Attrs: mustprogress uwtable diff --git a/bench/linux/optimized/balloc.ll b/bench/linux/optimized/balloc.ll index 04ee8c16543..e423e8e35bc 100644 --- a/bench/linux/optimized/balloc.ll +++ b/bench/linux/optimized/balloc.ll @@ -2640,76 +2640,75 @@ define dso_local i64 @ext4_inode_to_goal_block(ptr nocapture noundef readonly %0 %9 = getelementptr i8, ptr %0, i64 -224 %10 = load i32, ptr %9, align 8 %11 = icmp sgt i32 %8, 3 - br i1 %11, label %12, label %20 + br i1 %11, label %12, label %19 12: ; preds = %1 %13 = sub nsw i32 0, %8 %14 = and i32 %10, %13 %15 = load i16, ptr %0, align 8 - %16 = and i16 %15, -4096 - %17 = icmp eq i16 %16, -32768 - %18 = zext i1 %17 to i32 - %19 = add nuw i32 %14, %18 - br label %20 - -20: ; preds = %12, %1 - %21 = phi i32 [ %10, %1 ], [ %19, %12 ] - %22 = zext i32 %21 to i64 - %23 = getelementptr inbounds i8, ptr %5, i64 16 - %24 = load i64, ptr %23, align 16 - %25 = mul i64 %24, %22 - %26 = getelementptr inbounds i8, ptr %5, i64 104 - %27 = load ptr, ptr %26, align 8 - %28 = getelementptr inbounds i8, ptr %27, i64 20 - %29 = load i32, ptr %28, align 4 - %30 = zext i32 %29 to i64 - %31 = add i64 %25, %30 - %32 = getelementptr inbounds i8, ptr %27, i64 96 - %33 = load i32, ptr %32, align 8 - %34 = and i32 %33, 128 - %35 = icmp eq i32 %34, 0 - br i1 %35, label %41, label %36 - -36: ; preds = %20 - %37 = getelementptr inbounds i8, ptr %27, i64 336 - %38 = load i32, ptr %37, align 8 - %39 = zext i32 %38 to i64 - %40 = shl nuw i64 %39, 32 - br label %41 - -41: ; preds = %36, %20 - %42 = phi i64 [ %40, %36 ], [ 0, %20 ] - %43 = getelementptr inbounds i8, ptr %5, i64 120 - %44 = load i32, ptr %43, align 8 - %45 = and i32 %44, 134217728 - %46 = icmp eq i32 %45, 0 - br i1 %46, label %47, label %67 - -47: ; preds = %41 - %48 = getelementptr inbounds i8, ptr %27, i64 4 - %49 = load i32, ptr %48, align 4 - %50 = zext i32 %49 to i64 - %51 = or disjoint i64 %42, %50 - %52 = add i64 %51, -1 - %53 = add i64 %31, %24 - %54 = icmp ugt i64 %53, %52 - %55 = tail call i64 asm "movq %gs:${1:P}, $0", "=r,p,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @pcpu_hot) #16 - %56 = inttoptr i64 %55 to ptr - %57 = getelementptr inbounds i8, ptr %56, i64 1320 - %58 = load i32, ptr %57, align 8 - %59 = srem i32 %58, 16 - %60 = sub i64 %52, %31 - %61 = select i1 %54, i64 %60, i64 %24 - %62 = lshr i64 %61, 4 - %63 = trunc i64 %62 to i32 - %64 = mul i32 %59, %63 - %65 = sext i32 %64 to i64 - %66 = add i64 %31, %65 - br label %67 - -67: ; preds = %47, %41 - %68 = phi i64 [ %66, %47 ], [ %31, %41 ] - ret i64 %68 + %16 = icmp slt i16 %15, -28672 + %17 = zext i1 %16 to i32 + %18 = add nuw i32 %14, %17 + br label %19 + +19: ; preds = %12, %1 + %20 = phi i32 [ %10, %1 ], [ %18, %12 ] + %21 = zext i32 %20 to i64 + %22 = getelementptr inbounds i8, ptr %5, i64 16 + %23 = load i64, ptr %22, align 16 + %24 = mul i64 %23, %21 + %25 = getelementptr inbounds i8, ptr %5, i64 104 + %26 = load ptr, ptr %25, align 8 + %27 = getelementptr inbounds i8, ptr %26, i64 20 + %28 = load i32, ptr %27, align 4 + %29 = zext i32 %28 to i64 + %30 = add i64 %24, %29 + %31 = getelementptr inbounds i8, ptr %26, i64 96 + %32 = load i32, ptr %31, align 8 + %33 = and i32 %32, 128 + %34 = icmp eq i32 %33, 0 + br i1 %34, label %40, label %35 + +35: ; preds = %19 + %36 = getelementptr inbounds i8, ptr %26, i64 336 + %37 = load i32, ptr %36, align 8 + %38 = zext i32 %37 to i64 + %39 = shl nuw i64 %38, 32 + br label %40 + +40: ; preds = %35, %19 + %41 = phi i64 [ %39, %35 ], [ 0, %19 ] + %42 = getelementptr inbounds i8, ptr %5, i64 120 + %43 = load i32, ptr %42, align 8 + %44 = and i32 %43, 134217728 + %45 = icmp eq i32 %44, 0 + br i1 %45, label %46, label %66 + +46: ; preds = %40 + %47 = getelementptr inbounds i8, ptr %26, i64 4 + %48 = load i32, ptr %47, align 4 + %49 = zext i32 %48 to i64 + %50 = or disjoint i64 %41, %49 + %51 = add i64 %50, -1 + %52 = add i64 %30, %23 + %53 = icmp ugt i64 %52, %51 + %54 = tail call i64 asm "movq %gs:${1:P}, $0", "=r,p,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @pcpu_hot) #16 + %55 = inttoptr i64 %54 to ptr + %56 = getelementptr inbounds i8, ptr %55, i64 1320 + %57 = load i32, ptr %56, align 8 + %58 = srem i32 %57, 16 + %59 = sub i64 %51, %30 + %60 = select i1 %53, i64 %59, i64 %23 + %61 = lshr i64 %60, 4 + %62 = trunc i64 %61 to i32 + %63 = mul i32 %58, %62 + %64 = sext i32 %63 to i64 + %65 = add i64 %30, %64 + br label %66 + +66: ; preds = %46, %40 + %67 = phi i64 [ %65, %46 ], [ %30, %40 ] + ret i64 %67 } ; Function Attrs: null_pointer_is_valid diff --git a/bench/linux/optimized/delegation.ll b/bench/linux/optimized/delegation.ll index f7f746cf600..27beddcc7c1 100644 --- a/bench/linux/optimized/delegation.ll +++ b/bench/linux/optimized/delegation.ll @@ -1082,7 +1082,7 @@ define dso_local i32 @nfs4_inode_return_delegation(ptr noundef %0) local_unnamed %3 = tail call fastcc ptr @nfs_start_delegation_return_locked(ptr noundef %2) tail call void @__rcu_read_unlock() #12 %4 = icmp eq ptr %3, null - br i1 %4, label %27, label %5 + br i1 %4, label %26, label %5 5: ; preds = %1 tail call void asm sideeffect "lock; addl $$0,-4(%rsp)", "~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"() #12, !srcloc !39 @@ -1110,21 +1110,20 @@ define dso_local i32 @nfs4_inode_return_delegation(ptr noundef %0) local_unnamed 19: ; preds = %17, %13, %5 %20 = load i16, ptr %0, align 8 - %21 = and i16 %20, -4096 - %22 = icmp eq i16 %21, -32768 - br i1 %22, label %23, label %25 + %21 = icmp slt i16 %20, -28672 + br i1 %21, label %22, label %24 -23: ; preds = %19 - %24 = tail call i32 @nfs_wb_all(ptr noundef %0) #12 - br label %25 +22: ; preds = %19 + %23 = tail call i32 @nfs_wb_all(ptr noundef %0) #12 + br label %24 -25: ; preds = %23, %19 - %26 = tail call fastcc i32 @nfs_end_delegation_return(ptr noundef %0, ptr noundef nonnull %3, i32 noundef 1) - br label %27 +24: ; preds = %22, %19 + %25 = tail call fastcc i32 @nfs_end_delegation_return(ptr noundef %0, ptr noundef nonnull %3, i32 noundef 1) + br label %26 -27: ; preds = %25, %1 - %28 = phi i32 [ %26, %25 ], [ 0, %1 ] - ret i32 %28 +26: ; preds = %24, %1 + %27 = phi i32 [ %25, %24 ], [ 0, %1 ] + ret i32 %27 } ; Function Attrs: null_pointer_is_valid diff --git a/bench/linux/optimized/e100.ll b/bench/linux/optimized/e100.ll index 8846218e473..424bf5cb81a 100644 --- a/bench/linux/optimized/e100.ll +++ b/bench/linux/optimized/e100.ll @@ -6004,50 +6004,49 @@ define internal fastcc void @__e100_shutdown(ptr noundef %0, ptr nocapture nound %18 = load i16, ptr %17, align 2 %19 = and i16 %18, -8 %20 = icmp eq i16 %19, 4176 - br i1 %20, label %21, label %32 + br i1 %20, label %21, label %31 21: ; preds = %11 %22 = getelementptr i8, ptr %4, i64 3224 %23 = load i16, ptr %22, align 2 - %24 = and i16 %23, -16384 - %25 = icmp eq i16 %24, -32768 - br i1 %25, label %26, label %32 - -26: ; preds = %21 - %27 = getelementptr i8, ptr %4, i64 3486 - %28 = load i16, ptr %27, align 2 - %29 = and i16 %28, 255 - %30 = icmp ne i16 %29, 254 - %31 = zext i1 %30 to i32 - br label %32 + %24 = icmp slt i16 %23, -16384 + br i1 %24, label %25, label %31 + +25: ; preds = %21 + %26 = getelementptr i8, ptr %4, i64 3486 + %27 = load i16, ptr %26, align 2 + %28 = and i16 %27, 255 + %29 = icmp ne i16 %28, 254 + %30 = zext i1 %29 to i32 + br label %31 -32: ; preds = %26, %21, %11 - %33 = phi i32 [ 0, %21 ], [ 0, %11 ], [ %31, %26 ] - %34 = or disjoint i32 %33, %14 - %35 = icmp eq i32 %34, 0 - br i1 %35, label %50, label %36 +31: ; preds = %25, %21, %11 + %32 = phi i32 [ 0, %21 ], [ 0, %11 ], [ %30, %25 ] + %33 = or disjoint i32 %32, %14 + %34 = icmp eq i32 %33, 0 + br i1 %34, label %49, label %35 -36: ; preds = %32 - %37 = getelementptr i8, ptr %4, i64 2952 - %38 = load i32, ptr %37, align 8 - %39 = icmp eq i32 %38, -798949299 - br i1 %39, label %40, label %50 +35: ; preds = %31 + %36 = getelementptr i8, ptr %4, i64 2952 + %37 = load i32, ptr %36, align 8 + %38 = icmp eq i32 %37, -798949299 + br i1 %38, label %39, label %49 -40: ; preds = %36 - %41 = getelementptr i8, ptr %4, i64 3024 - %42 = load i32, ptr %41, align 16 - %43 = getelementptr i8, ptr %4, i64 2328 - %44 = load ptr, ptr %43, align 8 - %45 = tail call zeroext i16 %44(ptr noundef %5, i32 noundef %42, i32 noundef 134217728, i32 noundef 20, i16 noundef zeroext 0) #19 - %46 = load i32, ptr %41, align 16 - %47 = or i16 %45, 1536 - %48 = load ptr, ptr %43, align 8 - %49 = tail call zeroext i16 %48(ptr noundef %5, i32 noundef %46, i32 noundef 67108864, i32 noundef 20, i16 noundef zeroext %47) #19 - br label %50 +39: ; preds = %35 + %40 = getelementptr i8, ptr %4, i64 3024 + %41 = load i32, ptr %40, align 16 + %42 = getelementptr i8, ptr %4, i64 2328 + %43 = load ptr, ptr %42, align 8 + %44 = tail call zeroext i16 %43(ptr noundef %5, i32 noundef %41, i32 noundef 134217728, i32 noundef 20, i16 noundef zeroext 0) #19 + %45 = load i32, ptr %40, align 16 + %46 = or i16 %44, 1536 + %47 = load ptr, ptr %42, align 8 + %48 = tail call zeroext i16 %47(ptr noundef %5, i32 noundef %45, i32 noundef 67108864, i32 noundef 20, i16 noundef zeroext %46) #19 + br label %49 -50: ; preds = %40, %36, %32 - %51 = phi i8 [ 1, %40 ], [ 1, %36 ], [ 0, %32 ] - store i8 %51, ptr %1, align 1 +49: ; preds = %39, %35, %31 + %50 = phi i8 [ 1, %39 ], [ 1, %35 ], [ 0, %31 ] + store i8 %50, ptr %1, align 1 tail call void @pci_disable_device(ptr noundef %0) #19 ret void } diff --git a/bench/linux/optimized/exec.ll b/bench/linux/optimized/exec.ll index b35ac6dad97..a9580ff6563 100644 --- a/bench/linux/optimized/exec.ll +++ b/bench/linux/optimized/exec.ll @@ -875,65 +875,64 @@ define internal fastcc ptr @do_open_execat(i32 noundef %0, ptr noundef %1, i32 n %21 = getelementptr inbounds i8, ptr %18, i64 168 %22 = load ptr, ptr %21, align 8 %23 = load i16, ptr %22, align 8 - %24 = and i16 %23, -4096 - %25 = icmp eq i16 %24, -32768 - br i1 %25, label %26, label %40 + %24 = icmp slt i16 %23, -28672 + br i1 %24, label %25, label %39 -26: ; preds = %20 - %27 = getelementptr inbounds i8, ptr %18, i64 152 - %28 = load ptr, ptr %27, align 8 - %29 = getelementptr inbounds i8, ptr %28, i64 16 - %30 = load i32, ptr %29, align 8 - %31 = and i32 %30, 4 - %32 = icmp eq i32 %31, 0 - br i1 %32, label %33, label %40 - -33: ; preds = %26 - %34 = getelementptr inbounds i8, ptr %28, i64 8 - %35 = load ptr, ptr %34, align 8 - %36 = getelementptr inbounds i8, ptr %35, i64 88 - %37 = load i64, ptr %36, align 8 - %38 = and i64 %37, 2 - %39 = icmp eq i64 %38, 0 - br i1 %39, label %41, label %40, !prof !6 - -40: ; preds = %33, %26, %20 +25: ; preds = %20 + %26 = getelementptr inbounds i8, ptr %18, i64 152 + %27 = load ptr, ptr %26, align 8 + %28 = getelementptr inbounds i8, ptr %27, i64 16 + %29 = load i32, ptr %28, align 8 + %30 = and i32 %29, 4 + %31 = icmp eq i32 %30, 0 + br i1 %31, label %32, label %39 + +32: ; preds = %25 + %33 = getelementptr inbounds i8, ptr %27, i64 8 + %34 = load ptr, ptr %33, align 8 + %35 = getelementptr inbounds i8, ptr %34, i64 88 + %36 = load i64, ptr %35, align 8 + %37 = and i64 %36, 2 + %38 = icmp eq i64 %37, 0 + br i1 %38, label %40, label %39, !prof !6 + +39: ; preds = %32, %25, %20 call void asm sideeffect "1072: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 1072b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 1072) #15, !srcloc !20 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 940, i32 2307, i64 12) #15, !srcloc !21 call void asm sideeffect "1073: nop\0A\09.pushsection .discard.instr_end\0A\09.long 1073b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 1073) #15, !srcloc !22 br label %.loopexit -41: ; preds = %33 - %42 = getelementptr inbounds i8, ptr %22, i64 336 - %43 = load volatile i32, ptr %42, align 4 - %44 = icmp slt i32 %43, 1 - br i1 %44, label %.lr.ph, label %.loopexit, !prof !23 - -.lr.ph: ; preds = %41, %51 - %45 = phi i32 [ %52, %51 ], [ %43, %41 ] - %46 = add i32 %45, -1 - %47 = call { i8, i32 } asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; cmpxchgl $3, $1\0A\09/* output condition code z*/\0A", "={@ccz},=*m,={ax},r,*m,2,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %42, i32 %46, ptr elementtype(i32) %42, i32 %45) #15, !srcloc !24 - %48 = extractvalue { i8, i32 } %47, 0 - %49 = icmp ult i8 %48, 2 - call void @llvm.assume(i1 %49) - %50 = icmp eq i8 %48, 0 - br i1 %50, label %51, label %.thread2, !prof !13 - -51: ; preds = %.lr.ph - %52 = extractvalue { i8, i32 } %47, 1 - %53 = icmp slt i32 %52, 1 - br i1 %53, label %.lr.ph, label %.loopexit, !prof !25, !llvm.loop !26 - -.loopexit: ; preds = %51, %41, %40 - %54 = phi i64 [ -13, %40 ], [ -26, %41 ], [ -26, %51 ] +40: ; preds = %32 + %41 = getelementptr inbounds i8, ptr %22, i64 336 + %42 = load volatile i32, ptr %41, align 4 + %43 = icmp slt i32 %42, 1 + br i1 %43, label %.lr.ph, label %.loopexit, !prof !23 + +.lr.ph: ; preds = %40, %50 + %44 = phi i32 [ %51, %50 ], [ %42, %40 ] + %45 = add i32 %44, -1 + %46 = call { i8, i32 } asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; cmpxchgl $3, $1\0A\09/* output condition code z*/\0A", "={@ccz},=*m,={ax},r,*m,2,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %41, i32 %45, ptr elementtype(i32) %41, i32 %44) #15, !srcloc !24 + %47 = extractvalue { i8, i32 } %46, 0 + %48 = icmp ult i8 %47, 2 + call void @llvm.assume(i1 %48) + %49 = icmp eq i8 %47, 0 + br i1 %49, label %50, label %.thread2, !prof !13 + +50: ; preds = %.lr.ph + %51 = extractvalue { i8, i32 } %46, 1 + %52 = icmp slt i32 %51, 1 + br i1 %52, label %.lr.ph, label %.loopexit, !prof !25, !llvm.loop !26 + +.loopexit: ; preds = %50, %40, %39 + %53 = phi i64 [ -13, %39 ], [ -26, %40 ], [ -26, %50 ] call void @fput(ptr noundef %18) #15 - %55 = inttoptr i64 %54 to ptr + %54 = inttoptr i64 %53 to ptr br label %.thread2 .thread2: ; preds = %.lr.ph, %.loopexit, %17, %3 - %56 = phi ptr [ %55, %.loopexit ], [ %18, %17 ], [ inttoptr (i64 -22 to ptr), %3 ], [ %18, %.lr.ph ] + %55 = phi ptr [ %54, %.loopexit ], [ %18, %17 ], [ inttoptr (i64 -22 to ptr), %3 ], [ %18, %.lr.ph ] call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #15 - ret ptr %56 + ret ptr %55 } ; Function Attrs: null_pointer_is_valid diff --git a/bench/linux/optimized/vfs_inode.ll b/bench/linux/optimized/vfs_inode.ll index 5bc217912dc..998a9f73910 100644 --- a/bench/linux/optimized/vfs_inode.ll +++ b/bench/linux/optimized/vfs_inode.ll @@ -2505,89 +2505,88 @@ define internal i32 @v9fs_vfs_getattr(ptr nocapture readnone %0, ptr nocapture n 18: ; preds = %5 tail call void @generic_fillattr(ptr noundef nonnull @nop_mnt_idmap, i32 noundef %3, ptr noundef %9, ptr noundef %2) #14 - br label %58 + br label %57 19: ; preds = %5 %20 = and i32 %15, 4 %21 = icmp eq i32 %20, 0 - br i1 %21, label %30, label %22 + br i1 %21, label %29, label %22 22: ; preds = %19 %23 = load i16, ptr %9, align 8 - %24 = and i16 %23, -4096 - %25 = icmp eq i16 %24, -32768 - br i1 %25, label %26, label %30 - -26: ; preds = %22 - %27 = getelementptr inbounds i8, ptr %9, i64 48 - %28 = load ptr, ptr %27, align 8 - %29 = tail call i32 @filemap_fdatawrite(ptr noundef %28) #14 - br label %30 - -30: ; preds = %26, %22, %19 - %31 = tail call ptr @v9fs_fid_lookup(ptr noundef %7) #14 - %32 = icmp ugt ptr %31, inttoptr (i64 -4096 to ptr) - br i1 %32, label %33, label %36 - -33: ; preds = %30 - %34 = ptrtoint ptr %31 to i64 - %35 = trunc i64 %34 to i32 - br label %58 + %24 = icmp slt i16 %23, -28672 + br i1 %24, label %25, label %29 + +25: ; preds = %22 + %26 = getelementptr inbounds i8, ptr %9, i64 48 + %27 = load ptr, ptr %26, align 8 + %28 = tail call i32 @filemap_fdatawrite(ptr noundef %27) #14 + br label %29 + +29: ; preds = %25, %22, %19 + %30 = tail call ptr @v9fs_fid_lookup(ptr noundef %7) #14 + %31 = icmp ugt ptr %30, inttoptr (i64 -4096 to ptr) + br i1 %31, label %32, label %35 + +32: ; preds = %29 + %33 = ptrtoint ptr %30 to i64 + %34 = trunc i64 %33 to i32 + br label %57 -36: ; preds = %30 - %37 = tail call ptr @p9_client_stat(ptr noundef %31) #14 - %38 = icmp eq ptr %31, null - br i1 %38, label %.thread, label %39 +35: ; preds = %29 + %36 = tail call ptr @p9_client_stat(ptr noundef %30) #14 + %37 = icmp eq ptr %30, null + br i1 %37, label %.thread, label %38 -39: ; preds = %36 +38: ; preds = %35 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 (i8, ptr @__tracepoint_9p_fid_ref, i64 8), i32 2) #14 - to label %41 [label %40], !srcloc !9 + to label %40 [label %39], !srcloc !9 -40: ; preds = %39 - tail call void @do_trace_9p_fid_put(ptr noundef nonnull %31) #14 - br label %41 +39: ; preds = %38 + tail call void @do_trace_9p_fid_put(ptr noundef nonnull %30) #14 + br label %40 -41: ; preds = %40, %39 - %42 = getelementptr inbounds i8, ptr %31, i64 12 - %43 = tail call i32 asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; xaddl $0, $1\0A", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %42, i32 -1, ptr elementtype(i32) %42) #14, !srcloc !10 - %44 = icmp eq i32 %43, 1 - br i1 %44, label %48, label %45 +40: ; preds = %39, %38 + %41 = getelementptr inbounds i8, ptr %30, i64 12 + %42 = tail call i32 asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; xaddl $0, $1\0A", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %41, i32 -1, ptr elementtype(i32) %41) #14, !srcloc !10 + %43 = icmp eq i32 %42, 1 + br i1 %43, label %47, label %44 -45: ; preds = %41 - %46 = icmp sgt i32 %43, 0 - br i1 %46, label %.thread, label %47, !prof !11 +44: ; preds = %40 + %45 = icmp sgt i32 %42, 0 + br i1 %45, label %.thread, label %46, !prof !11 -47: ; preds = %45 - tail call void @refcount_warn_saturate(ptr noundef %42, i32 noundef 3) #14 +46: ; preds = %44 + tail call void @refcount_warn_saturate(ptr noundef %41, i32 noundef 3) #14 br label %.thread -48: ; preds = %41 +47: ; preds = %40 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #14, !srcloc !12 - %49 = tail call i32 @p9_client_clunk(ptr noundef nonnull %31) #14 + %48 = tail call i32 @p9_client_clunk(ptr noundef nonnull %30) #14 br label %.thread -.thread: ; preds = %45, %47, %48, %36 - %50 = icmp ugt ptr %37, inttoptr (i64 -4096 to ptr) - br i1 %50, label %51, label %54 - -51: ; preds = %.thread - %52 = ptrtoint ptr %37 to i64 - %53 = trunc i64 %52 to i32 - br label %58 - -54: ; preds = %.thread - %55 = load ptr, ptr %8, align 8 - %56 = load ptr, ptr %10, align 8 - tail call void @v9fs_stat2inode(ptr noundef %37, ptr noundef %55, ptr noundef %56, i32 noundef 0) - %57 = load ptr, ptr %8, align 8 - tail call void @generic_fillattr(ptr noundef nonnull @nop_mnt_idmap, i32 noundef %3, ptr noundef %57, ptr noundef %2) #14 - tail call void @p9stat_free(ptr noundef %37) #14 - tail call void @kfree(ptr noundef %37) #14 - br label %58 - -58: ; preds = %54, %51, %33, %18 - %59 = phi i32 [ 0, %18 ], [ %35, %33 ], [ %53, %51 ], [ 0, %54 ] - ret i32 %59 +.thread: ; preds = %44, %46, %47, %35 + %49 = icmp ugt ptr %36, inttoptr (i64 -4096 to ptr) + br i1 %49, label %50, label %53 + +50: ; preds = %.thread + %51 = ptrtoint ptr %36 to i64 + %52 = trunc i64 %51 to i32 + br label %57 + +53: ; preds = %.thread + %54 = load ptr, ptr %8, align 8 + %55 = load ptr, ptr %10, align 8 + tail call void @v9fs_stat2inode(ptr noundef %36, ptr noundef %54, ptr noundef %55, i32 noundef 0) + %56 = load ptr, ptr %8, align 8 + tail call void @generic_fillattr(ptr noundef nonnull @nop_mnt_idmap, i32 noundef %3, ptr noundef %56, ptr noundef %2) #14 + tail call void @p9stat_free(ptr noundef %36) #14 + tail call void @kfree(ptr noundef %36) #14 + br label %57 + +57: ; preds = %53, %50, %32, %18 + %58 = phi i32 [ 0, %18 ], [ %34, %32 ], [ %52, %50 ], [ 0, %53 ] + ret i32 %58 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid diff --git a/bench/llama.cpp/optimized/console.cpp.ll b/bench/llama.cpp/optimized/console.cpp.ll index ae5ec49e309..2ebadf596df 100644 --- a/bench/llama.cpp/optimized/console.cpp.ll +++ b/bench/llama.cpp/optimized/console.cpp.ll @@ -452,8 +452,7 @@ for.body.i.i: ; preds = %for.cond.i.i, %for. call3.i.noexc.i: ; preds = %for.body.i.i %26 = load i8, ptr %call3.i56.i, align 1 - %27 = and i8 %26, -64 - %cmp4.not.i.i = icmp eq i8 %27, -128 + %cmp4.not.i.i = icmp slt i8 %26, -64 br i1 %cmp4.not.i.i, label %for.cond.i.i, label %for.end.i.i for.end.i.i: ; preds = %call3.i.noexc.i, %for.cond.i.i, %if.end.i.i @@ -482,15 +481,15 @@ if.else.i.i: ; preds = %if.else56.i if.then2.i.i: ; preds = %if.else.i.i %shr.i.i = lshr i32 %call.i44.i, 6 - %28 = trunc nuw i32 %shr.i.i to i8 - %conv3.i.i = or disjoint i8 %28, -64 + %27 = trunc nuw i32 %shr.i.i to i8 + %conv3.i.i = or disjoint i8 %27, -64 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc(ptr noundef nonnull align 8 dereferenceable(32) %line, i8 noundef signext %conv3.i.i) to label %.noexc.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i .noexc.i: ; preds = %if.then2.i.i - %29 = trunc i32 %call.i44.i to i8 - %30 = and i8 %29, 63 - %conv6.i.i = or disjoint i8 %30, -128 + %28 = trunc i32 %call.i44.i to i8 + %29 = and i8 %28, 63 + %conv6.i.i = or disjoint i8 %29, -128 br label %if.end42.sink.split.i.i if.else7.i.i: ; preds = %if.else.i.i @@ -499,23 +498,23 @@ if.else7.i.i: ; preds = %if.else.i.i if.then9.i.i: ; preds = %if.else7.i.i %shr10.i.i = lshr i32 %call.i44.i, 12 - %31 = trunc nuw i32 %shr10.i.i to i8 - %conv13.i.i = or disjoint i8 %31, -32 + %30 = trunc nuw i32 %shr10.i.i to i8 + %conv13.i.i = or disjoint i8 %30, -32 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc(ptr noundef nonnull align 8 dereferenceable(32) %line, i8 noundef signext %conv13.i.i) to label %.noexc62.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i .noexc62.i: ; preds = %if.then9.i.i %shr14.i.i = lshr i32 %call.i44.i, 6 - %32 = trunc i32 %shr14.i.i to i8 - %33 = and i8 %32, 63 - %conv17.i.i = or disjoint i8 %33, -128 + %31 = trunc i32 %shr14.i.i to i8 + %32 = and i8 %31, 63 + %conv17.i.i = or disjoint i8 %32, -128 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc(ptr noundef nonnull align 8 dereferenceable(32) %line, i8 noundef signext %conv17.i.i) to label %.noexc63.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i .noexc63.i: ; preds = %.noexc62.i - %34 = trunc i32 %call.i44.i to i8 - %35 = and i8 %34, 63 - %conv20.i.i = or disjoint i8 %35, -128 + %33 = trunc i32 %call.i44.i to i8 + %34 = and i8 %33, 63 + %conv20.i.i = or disjoint i8 %34, -128 br label %if.end42.sink.split.i.i if.else21.i.i: ; preds = %if.else7.i.i @@ -524,31 +523,31 @@ if.else21.i.i: ; preds = %if.else7.i.i if.then23.i.i: ; preds = %if.else21.i.i %shr24.i.i = lshr i32 %call.i44.i, 18 - %36 = trunc nuw i32 %shr24.i.i to i8 - %conv27.i.i = or disjoint i8 %36, -16 + %35 = trunc nuw i32 %shr24.i.i to i8 + %conv27.i.i = or disjoint i8 %35, -16 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc(ptr noundef nonnull align 8 dereferenceable(32) %line, i8 noundef signext %conv27.i.i) to label %.noexc64.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i .noexc64.i: ; preds = %if.then23.i.i %shr28.i.i = lshr i32 %call.i44.i, 12 - %37 = trunc i32 %shr28.i.i to i8 - %38 = and i8 %37, 63 - %conv31.i.i = or disjoint i8 %38, -128 + %36 = trunc i32 %shr28.i.i to i8 + %37 = and i8 %36, 63 + %conv31.i.i = or disjoint i8 %37, -128 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc(ptr noundef nonnull align 8 dereferenceable(32) %line, i8 noundef signext %conv31.i.i) to label %.noexc65.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i .noexc65.i: ; preds = %.noexc64.i %shr32.i.i = lshr i32 %call.i44.i, 6 - %39 = trunc i32 %shr32.i.i to i8 - %40 = and i8 %39, 63 - %conv35.i.i = or disjoint i8 %40, -128 + %38 = trunc i32 %shr32.i.i to i8 + %39 = and i8 %38, 63 + %conv35.i.i = or disjoint i8 %39, -128 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc(ptr noundef nonnull align 8 dereferenceable(32) %line, i8 noundef signext %conv35.i.i) to label %.noexc66.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i .noexc66.i: ; preds = %.noexc65.i - %41 = trunc i32 %call.i44.i to i8 - %42 = and i8 %41, 63 - %conv38.i.i = or disjoint i8 %42, -128 + %40 = trunc i32 %call.i44.i to i8 + %41 = and i8 %40, 63 + %conv38.i.i = or disjoint i8 %41, -128 br label %if.end42.sink.split.i.i if.end42.sink.split.i.i: ; preds = %.noexc66.i, %.noexc63.i, %.noexc.i, %if.then.i60.i @@ -570,29 +569,29 @@ invoke.cont58.i: ; preds = %if.end42.sink.split call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y2.i.i) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %w.i.i) %cmp.i69.i = icmp sgt i32 %call.i68.i, -1 - %43 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 - %cmp1.i70.i = icmp eq ptr %43, null + %42 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 + %cmp1.i70.i = icmp eq ptr %42, null %or.cond.i.i = select i1 %cmp.i69.i, i1 true, i1 %cmp1.i70.i br i1 %or.cond.i.i, label %if.then.i73.i, label %if.end.i71.i if.then.i73.i: ; preds = %invoke.cont58.i - %44 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call.i74.i = call i64 @fwrite(ptr noundef %add.ptr.i12, i64 noundef %sub.i, i64 noundef 1, ptr noundef %44) + %43 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call.i74.i = call i64 @fwrite(ptr noundef %add.ptr.i12, i64 noundef %sub.i, i64 noundef 1, ptr noundef %43) br label %invoke.cont64.i if.end.i71.i: ; preds = %invoke.cont58.i - %45 = call i64 @fwrite(ptr nonnull @.str.9, i64 4, i64 1, ptr nonnull %43) - %46 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 - %call3.i76.i = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %46, ptr noundef nonnull @.str.10, ptr noundef nonnull %y1.i.i, ptr noundef nonnull %x1.i.i) + %44 = call i64 @fwrite(ptr nonnull @.str.9, i64 4, i64 1, ptr nonnull %42) + %45 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 + %call3.i76.i = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %45, ptr noundef nonnull @.str.10, ptr noundef nonnull %y1.i.i, ptr noundef nonnull %x1.i.i) to label %call3.i.noexc75.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i call3.i.noexc75.i: ; preds = %if.end.i71.i + %46 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 + %call4.i.i = call i64 @fwrite(ptr noundef %add.ptr.i12, i64 noundef %sub.i, i64 noundef 1, ptr noundef %46) %47 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 - %call4.i.i = call i64 @fwrite(ptr noundef %add.ptr.i12, i64 noundef %sub.i, i64 noundef 1, ptr noundef %47) - %48 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 - %49 = call i64 @fwrite(ptr nonnull @.str.9, i64 4, i64 1, ptr %48) - %50 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 - %call6.i77.i = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %50, ptr noundef nonnull @.str.10, ptr noundef nonnull %y2.i.i, ptr noundef nonnull %x2.i.i) + %48 = call i64 @fwrite(ptr nonnull @.str.9, i64 4, i64 1, ptr %47) + %49 = load ptr, ptr @_ZN7consoleL3ttyE, align 8 + %call6.i77.i = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %49, ptr noundef nonnull @.str.10, ptr noundef nonnull %y2.i.i, ptr noundef nonnull %x2.i.i) to label %call6.i.noexc.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.i call6.i.noexc.i: ; preds = %call3.i.noexc75.i @@ -601,16 +600,16 @@ call6.i.noexc.i: ; preds = %call3.i.noexc75.i br i1 %cmp7.not.i.i, label %if.end9.i.i, label %invoke.cont64.i if.end9.i.i: ; preds = %call6.i.noexc.i - %51 = load i32, ptr %x2.i.i, align 4 - %52 = load i32, ptr %x1.i.i, align 4 - %sub.i.i = sub nsw i32 %51, %52 + %50 = load i32, ptr %x2.i.i, align 4 + %51 = load i32, ptr %x1.i.i, align 4 + %sub.i.i = sub nsw i32 %50, %51 %cmp10.i.i = icmp slt i32 %sub.i.i, 0 br i1 %cmp10.i.i, label %if.then11.i.i, label %invoke.cont64.i if.then11.i.i: ; preds = %if.end9.i.i %call12.i.i = call i32 (i32, i64, ...) @ioctl(i32 noundef 1, i64 noundef 21523, ptr noundef nonnull %w.i.i) #14 - %53 = load i16, ptr %ws_col.i.i, align 2 - %conv.i72.i = zext i16 %53 to i32 + %52 = load i16, ptr %ws_col.i.i, align 2 + %conv.i72.i = zext i16 %52 to i32 %add13.i.i = add nsw i32 %sub.i.i, %conv.i72.i br label %invoke.cont64.i @@ -649,8 +648,8 @@ _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i.i.i: ; preds = %if.else.i83.i %.sroa.speculated.i.i.i.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i.i.i, i64 1) %add.i.i.i.i = add nsw i64 %.sroa.speculated.i.i.i.i, %sub.ptr.div.i.i.i.i.i %cmp7.i.i.i.i = icmp ult i64 %add.i.i.i.i, %sub.ptr.div.i.i.i.i.i - %54 = call i64 @llvm.umin.i64(i64 %add.i.i.i.i, i64 2305843009213693951) - %cond.i.i.i.i = select i1 %cmp7.i.i.i.i, i64 2305843009213693951, i64 %54 + %53 = call i64 @llvm.umin.i64(i64 %add.i.i.i.i, i64 2305843009213693951) + %cond.i.i.i.i = select i1 %cmp7.i.i.i.i, i64 2305843009213693951, i64 %53 %cmp.not.i.i.i.i = icmp eq i64 %cond.i.i.i.i, 0 br i1 %cmp.not.i.i.i.i, label %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit.i.i.i, label %cond.true.i.i.i.i @@ -693,40 +692,40 @@ if.end71.i: ; preds = %do.cond.i, %lor.lhs land.lhs.true73.i: ; preds = %if.end71.i %call74.i = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %55 = load i8, ptr %call74.i, align 1 - %cmp76.i = icmp eq i8 %55, 92 + %54 = load i8, ptr %call74.i, align 1 + %cmp76.i = icmp eq i8 %54, 92 br i1 %cmp76.i, label %if.then81.i, label %lor.lhs.false77.i lor.lhs.false77.i: ; preds = %land.lhs.true73.i %call78.i = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %56 = load i8, ptr %call78.i, align 1 - %cmp80.i = icmp eq i8 %56, 47 + %55 = load i8, ptr %call78.i, align 1 + %cmp80.i = icmp eq i8 %55, 47 br i1 %cmp80.i, label %if.then81.i, label %while.cond.i.backedge if.then81.i: ; preds = %lor.lhs.false77.i, %land.lhs.true73.i - %57 = load i8, ptr @_ZN7consoleL16advanced_displayE, align 1 - %tobool.i89.i = trunc nuw i8 %57 to i1 - %58 = load i32, ptr @_ZN7consoleL15current_displayE, align 4 - %cmp.not.i90.i = icmp ne i32 %58, 1 + %56 = load i8, ptr @_ZN7consoleL16advanced_displayE, align 1 + %tobool.i89.i = trunc nuw i8 %56 to i1 + %57 = load i32, ptr @_ZN7consoleL15current_displayE, align 4 + %cmp.not.i90.i = icmp ne i32 %57, 1 %or.cond.not.i91.i = select i1 %tobool.i89.i, i1 %cmp.not.i90.i, i1 false br i1 %or.cond.not.i91.i, label %if.then.i93.i, label %invoke.cont82.i if.then.i93.i: ; preds = %if.then81.i - %59 = load ptr, ptr @stdout, align 8 - %call.i94.i = call i32 @fflush(ptr noundef %59) - %60 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %61 = call i64 @fwrite(ptr nonnull @.str.4, i64 5, i64 1, ptr %60) + %58 = load ptr, ptr @stdout, align 8 + %call.i94.i = call i32 @fflush(ptr noundef %58) + %59 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %60 = call i64 @fwrite(ptr nonnull @.str.4, i64 5, i64 1, ptr %59) store i32 1, ptr @_ZN7consoleL15current_displayE, align 4 - %62 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call8.i95.i = call i32 @fflush(ptr noundef %62) + %61 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call8.i95.i = call i32 @fflush(ptr noundef %61) br label %invoke.cont82.i invoke.cont82.i: ; preds = %if.then.i93.i, %if.then81.i %call83.i = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %63 = load i8, ptr %call83.i, align 1 - %64 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %conv.i97.i = sext i8 %63 to i32 - %call.i98.i = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.8, i32 noundef %conv.i97.i) + %62 = load i8, ptr %call83.i, align 1 + %63 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %conv.i97.i = sext i8 %62 to i32 + %call.i98.i = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.8, i32 noundef %conv.i97.i) br label %while.cond.i.backedge while.cond.i.backedge: ; preds = %invoke.cont82.i, %lor.lhs.false77.i, %if.end71.i @@ -738,14 +737,14 @@ while.end86.i: ; preds = %invoke.cont2.i, %in br i1 %tobool89.i, label %invoke.cont92.i, label %if.else115.i invoke.cont92.i: ; preds = %while.end86.i + %64 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call.i99.i = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.8, i32 noundef 32) %65 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call.i99.i = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.8, i32 noundef 32) - %66 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call.i100.i = call i32 @putc(i32 noundef 8, ptr noundef %66) + %call.i100.i = call i32 @putc(i32 noundef 8, ptr noundef %65) %call93.i = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %67 = load i8, ptr %call93.i, align 1 + %66 = load i8, ptr %call93.i, align 1 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %cmp95.i = icmp eq i8 %67, 92 + %cmp95.i = icmp eq i8 %66, 92 br i1 %cmp95.i, label %if.then96.i, label %if.else104.i if.then96.i: ; preds = %invoke.cont92.i @@ -753,8 +752,8 @@ if.then96.i: ; preds = %invoke.cont92.i to label %invoke.cont97.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i invoke.cont97.i: ; preds = %if.then96.i - %68 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call100.i = call i32 @fputc(i32 noundef 10, ptr noundef %68) + %67 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call100.i = call i32 @fputc(i32 noundef 10, ptr noundef %67) %lnot102.i = xor i1 %multiline_input, true br label %if.end124.i @@ -765,14 +764,14 @@ if.else104.i: ; preds = %invoke.cont92.i land.lhs.true107.i: ; preds = %if.else104.i %call108.i = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %69 = load i8, ptr %call108.i, align 1 - %cmp110.i = icmp eq i8 %69, 32 + %68 = load i8, ptr %call108.i, align 1 + %cmp110.i = icmp eq i8 %68, 32 br i1 %cmp110.i, label %if.then111.i, label %if.end124.i if.then111.i: ; preds = %land.lhs.true107.i call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %line) #14 - %70 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call.i101.i = call i32 @putc(i32 noundef 8, ptr noundef %70) + %69 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call.i101.i = call i32 @putc(i32 noundef 8, ptr noundef %69) br label %if.end124.i if.else115.i: ; preds = %while.end86.i @@ -786,14 +785,14 @@ if.else118.i: ; preds = %if.else115.i, %if.e to label %invoke.cont119.i unwind label %lpad.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i invoke.cont119.i: ; preds = %if.else118.i - %71 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call122.i = call i32 @fputc(i32 noundef 10, ptr noundef %71) + %70 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call122.i = call i32 @fputc(i32 noundef 10, ptr noundef %70) br label %if.end124.i if.end124.i: ; preds = %invoke.cont119.i, %if.else115.i, %if.then111.i, %land.lhs.true107.i, %if.else104.i, %invoke.cont97.i %has_more.0.shrunk.i = phi i1 [ %lnot102.i, %invoke.cont97.i ], [ %multiline_input, %invoke.cont119.i ], [ false, %if.then111.i ], [ false, %land.lhs.true107.i ], [ false, %if.else104.i ], [ false, %if.else115.i ] - %72 = load ptr, ptr @_ZN7consoleL3outE, align 8 - %call126.i = call i32 @fflush(ptr noundef %72) + %71 = load ptr, ptr @_ZN7consoleL3outE, align 8 + %call126.i = call i32 @fflush(ptr noundef %71) %tobool.not.i.i.i102.i = icmp eq ptr %widths.sroa.0.0.i, null br i1 %tobool.not.i.i.i102.i, label %return, label %if.then.i.i.i103.i diff --git a/bench/llama.cpp/optimized/llama.cpp.ll b/bench/llama.cpp/optimized/llama.cpp.ll index c24bdd0e270..14c7850c851 100644 --- a/bench/llama.cpp/optimized/llama.cpp.ll +++ b/bench/llama.cpp/optimized/llama.cpp.ll @@ -51639,8 +51639,7 @@ lor.lhs.false: ; preds = %if.then17 %add20 = add i64 %11, 1 %call21 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add20) #47 %12 = load i8, ptr %call21, align 1 - %13 = and i8 %12, -64 - %cmp24 = icmp eq i8 %13, -128 + %cmp24 = icmp slt i8 %12, -64 br i1 %cmp24, label %if.end, label %if.then25 if.then25: ; preds = %lor.lhs.false, %if.then17 @@ -51653,59 +51652,57 @@ invoke.cont28: ; preds = %if.then25 unreachable lpad27: ; preds = %if.then25 - %14 = landingpad { ptr, i32 } + %13 = landingpad { ptr, i32 } cleanup br label %eh.resume if.end: ; preds = %lor.lhs.false - %15 = load i64, ptr %offset, align 8 - %call31 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %15) #47 - %16 = load i8, ptr %call31, align 1 - %17 = and i8 %16, 31 - %and33 = zext nneg i8 %17 to i32 + %14 = load i64, ptr %offset, align 8 + %call31 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %14) #47 + %15 = load i8, ptr %call31, align 1 + %16 = and i8 %15, 31 + %and33 = zext nneg i8 %16 to i32 %shl = shl nuw nsw i32 %and33, 6 - %18 = load i64, ptr %offset, align 8 - %add34 = add i64 %18, 1 + %17 = load i64, ptr %offset, align 8 + %add34 = add i64 %17, 1 %call35 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add34) #47 - %19 = load i8, ptr %call35, align 1 - %20 = and i8 %19, 63 - %and37 = zext nneg i8 %20 to i32 + %18 = load i8, ptr %call35, align 1 + %19 = and i8 %18, 63 + %and37 = zext nneg i8 %19 to i32 %or = or disjoint i32 %shl, %and37 - %21 = load i64, ptr %offset, align 8 - %add38 = add i64 %21, 2 + %20 = load i64, ptr %offset, align 8 + %add38 = add i64 %20, 2 store i64 %add38, ptr %offset, align 8 br label %return if.else39: ; preds = %if.else11 %call41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %10) #47 - %22 = load i8, ptr %call41, align 1 - %23 = and i8 %22, 16 - %tobool44.not = icmp eq i8 %23, 0 - %24 = load i64, ptr %offset, align 8 + %21 = load i8, ptr %call41, align 1 + %22 = and i8 %21, 16 + %tobool44.not = icmp eq i8 %22, 0 + %23 = load i64, ptr %offset, align 8 br i1 %tobool44.not, label %if.then45, label %if.else84 if.then45: ; preds = %if.else39 - %add46 = add i64 %24, 2 + %add46 = add i64 %23, 2 %call47 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %utf8) #47 %cmp48.not = icmp ult i64 %add46, %call47 br i1 %cmp48.not, label %lor.lhs.false49, label %if.then61 lor.lhs.false49: ; preds = %if.then45 - %25 = load i64, ptr %offset, align 8 - %add50 = add i64 %25, 1 + %24 = load i64, ptr %offset, align 8 + %add50 = add i64 %24, 1 %call51 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add50) #47 - %26 = load i8, ptr %call51, align 1 - %27 = and i8 %26, -64 - %cmp54 = icmp eq i8 %27, -128 + %25 = load i8, ptr %call51, align 1 + %cmp54 = icmp slt i8 %25, -64 br i1 %cmp54, label %lor.lhs.false55, label %if.then61 lor.lhs.false55: ; preds = %lor.lhs.false49 - %28 = load i64, ptr %offset, align 8 - %add56 = add i64 %28, 2 + %26 = load i64, ptr %offset, align 8 + %add56 = add i64 %26, 2 %call57 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add56) #47 - %29 = load i8, ptr %call57, align 1 - %30 = and i8 %29, -64 - %cmp60 = icmp eq i8 %30, -128 + %27 = load i8, ptr %call57, align 1 + %cmp60 = icmp slt i8 %27, -64 br i1 %cmp60, label %if.end65, label %if.then61 if.then61: ; preds = %lor.lhs.false55, %lor.lhs.false49, %if.then45 @@ -51718,76 +51715,73 @@ invoke.cont64: ; preds = %if.then61 unreachable lpad63: ; preds = %if.then61 - %31 = landingpad { ptr, i32 } + %28 = landingpad { ptr, i32 } cleanup br label %eh.resume if.end65: ; preds = %lor.lhs.false55 - %32 = load i64, ptr %offset, align 8 - %call68 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %32) #47 - %33 = load i8, ptr %call68, align 1 - %34 = and i8 %33, 15 - %and70 = zext nneg i8 %34 to i32 + %29 = load i64, ptr %offset, align 8 + %call68 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %29) #47 + %30 = load i8, ptr %call68, align 1 + %31 = and i8 %30, 15 + %and70 = zext nneg i8 %31 to i32 %shl71 = shl nuw nsw i32 %and70, 12 - %35 = load i64, ptr %offset, align 8 - %add72 = add i64 %35, 1 + %32 = load i64, ptr %offset, align 8 + %add72 = add i64 %32, 1 %call73 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add72) #47 - %36 = load i8, ptr %call73, align 1 - %37 = and i8 %36, 63 - %and75 = zext nneg i8 %37 to i32 + %33 = load i8, ptr %call73, align 1 + %34 = and i8 %33, 63 + %and75 = zext nneg i8 %34 to i32 %shl76 = shl nuw nsw i32 %and75, 6 %or77 = or disjoint i32 %shl76, %shl71 - %38 = load i64, ptr %offset, align 8 - %add78 = add i64 %38, 2 + %35 = load i64, ptr %offset, align 8 + %add78 = add i64 %35, 2 %call79 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add78) #47 - %39 = load i8, ptr %call79, align 1 - %40 = and i8 %39, 63 - %and81 = zext nneg i8 %40 to i32 + %36 = load i8, ptr %call79, align 1 + %37 = and i8 %36, 63 + %and81 = zext nneg i8 %37 to i32 %or82 = or disjoint i32 %or77, %and81 - %41 = load i64, ptr %offset, align 8 - %add83 = add i64 %41, 3 + %38 = load i64, ptr %offset, align 8 + %add83 = add i64 %38, 3 store i64 %add83, ptr %offset, align 8 br label %return if.else84: ; preds = %if.else39 - %call86 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %24) #47 - %42 = load i8, ptr %call86, align 1 - %43 = and i8 %42, 8 - %tobool89.not = icmp eq i8 %43, 0 + %call86 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %23) #47 + %39 = load i8, ptr %call86, align 1 + %40 = and i8 %39, 8 + %tobool89.not = icmp eq i8 %40, 0 br i1 %tobool89.not, label %if.then90, label %if.end145 if.then90: ; preds = %if.else84 - %44 = load i64, ptr %offset, align 8 - %add91 = add i64 %44, 3 + %41 = load i64, ptr %offset, align 8 + %add91 = add i64 %41, 3 %call92 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %utf8) #47 %cmp93.not = icmp ult i64 %add91, %call92 br i1 %cmp93.not, label %lor.lhs.false94, label %if.then112 lor.lhs.false94: ; preds = %if.then90 - %45 = load i64, ptr %offset, align 8 - %add95 = add i64 %45, 1 + %42 = load i64, ptr %offset, align 8 + %add95 = add i64 %42, 1 %call96 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add95) #47 - %46 = load i8, ptr %call96, align 1 - %47 = and i8 %46, -64 - %cmp99 = icmp eq i8 %47, -128 + %43 = load i8, ptr %call96, align 1 + %cmp99 = icmp slt i8 %43, -64 br i1 %cmp99, label %lor.lhs.false100, label %if.then112 lor.lhs.false100: ; preds = %lor.lhs.false94 - %48 = load i64, ptr %offset, align 8 - %add101 = add i64 %48, 2 + %44 = load i64, ptr %offset, align 8 + %add101 = add i64 %44, 2 %call102 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add101) #47 - %49 = load i8, ptr %call102, align 1 - %50 = and i8 %49, -64 - %cmp105 = icmp eq i8 %50, -128 + %45 = load i8, ptr %call102, align 1 + %cmp105 = icmp slt i8 %45, -64 br i1 %cmp105, label %lor.lhs.false106, label %if.then112 lor.lhs.false106: ; preds = %lor.lhs.false100 - %51 = load i64, ptr %offset, align 8 - %add107 = add i64 %51, 3 + %46 = load i64, ptr %offset, align 8 + %add107 = add i64 %46, 3 %call108 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add107) #47 - %52 = load i8, ptr %call108, align 1 - %53 = and i8 %52, -64 - %cmp111 = icmp eq i8 %53, -128 + %47 = load i8, ptr %call108, align 1 + %cmp111 = icmp slt i8 %47, -64 br i1 %cmp111, label %if.end116, label %if.then112 if.then112: ; preds = %lor.lhs.false106, %lor.lhs.false100, %lor.lhs.false94, %if.then90 @@ -51800,42 +51794,42 @@ invoke.cont115: ; preds = %if.then112 unreachable lpad114: ; preds = %if.then112 - %54 = landingpad { ptr, i32 } + %48 = landingpad { ptr, i32 } cleanup br label %eh.resume if.end116: ; preds = %lor.lhs.false106 - %55 = load i64, ptr %offset, align 8 - %call119 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %55) #47 - %56 = load i8, ptr %call119, align 1 - %57 = and i8 %56, 7 - %and121 = zext nneg i8 %57 to i32 + %49 = load i64, ptr %offset, align 8 + %call119 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %49) #47 + %50 = load i8, ptr %call119, align 1 + %51 = and i8 %50, 7 + %and121 = zext nneg i8 %51 to i32 %shl122 = shl nuw nsw i32 %and121, 18 - %58 = load i64, ptr %offset, align 8 - %add123 = add i64 %58, 1 + %52 = load i64, ptr %offset, align 8 + %add123 = add i64 %52, 1 %call124 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add123) #47 - %59 = load i8, ptr %call124, align 1 - %60 = and i8 %59, 63 - %and126 = zext nneg i8 %60 to i32 + %53 = load i8, ptr %call124, align 1 + %54 = and i8 %53, 63 + %and126 = zext nneg i8 %54 to i32 %shl127 = shl nuw nsw i32 %and126, 12 %or128 = or disjoint i32 %shl127, %shl122 - %61 = load i64, ptr %offset, align 8 - %add129 = add i64 %61, 2 + %55 = load i64, ptr %offset, align 8 + %add129 = add i64 %55, 2 %call130 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add129) #47 - %62 = load i8, ptr %call130, align 1 - %63 = and i8 %62, 63 - %and132 = zext nneg i8 %63 to i32 + %56 = load i8, ptr %call130, align 1 + %57 = and i8 %56, 63 + %and132 = zext nneg i8 %57 to i32 %shl133 = shl nuw nsw i32 %and132, 6 %or134 = or disjoint i32 %shl133, %or128 - %64 = load i64, ptr %offset, align 8 - %add135 = add i64 %64, 3 + %58 = load i64, ptr %offset, align 8 + %add135 = add i64 %58, 3 %call136 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %utf8, i64 noundef %add135) #47 - %65 = load i8, ptr %call136, align 1 - %66 = and i8 %65, 63 - %and138 = zext nneg i8 %66 to i32 + %59 = load i8, ptr %call136, align 1 + %60 = and i8 %59, 63 + %and138 = zext nneg i8 %60 to i32 %or139 = or disjoint i32 %or134, %and138 - %67 = load i64, ptr %offset, align 8 - %add140 = add i64 %67, 4 + %61 = load i64, ptr %offset, align 8 + %add140 = add i64 %61, 4 store i64 %add140, ptr %offset, align 8 br label %return @@ -51849,7 +51843,7 @@ invoke.cont148: ; preds = %if.end145 unreachable lpad147: ; preds = %if.end145 - %68 = landingpad { ptr, i32 } + %62 = landingpad { ptr, i32 } cleanup br label %eh.resume @@ -51859,7 +51853,7 @@ return: ; preds = %if.end116, %if.end6 eh.resume: ; preds = %lpad147, %lpad114, %lpad63, %lpad27, %lpad %exception146.sink = phi ptr [ %exception146, %lpad147 ], [ %exception113, %lpad114 ], [ %exception62, %lpad63 ], [ %exception26, %lpad27 ], [ %exception, %lpad ] - %.pn = phi { ptr, i32 } [ %68, %lpad147 ], [ %54, %lpad114 ], [ %31, %lpad63 ], [ %14, %lpad27 ], [ %6, %lpad ] + %.pn = phi { ptr, i32 } [ %62, %lpad147 ], [ %48, %lpad114 ], [ %28, %lpad63 ], [ %13, %lpad27 ], [ %6, %lpad ] tail call void @__cxa_free_exception(ptr %exception146.sink) #47 resume { ptr, i32 } %.pn } diff --git a/bench/llvm/optimized/ConvertEBCDIC.cpp.ll b/bench/llvm/optimized/ConvertEBCDIC.cpp.ll index 9e5c50d473f..2e6db39a751 100644 --- a/bench/llvm/optimized/ConvertEBCDIC.cpp.ll +++ b/bench/llvm/optimized/ConvertEBCDIC.cpp.ll @@ -32,7 +32,7 @@ _ZN4llvm15SmallVectorImplIcE7reserveEm.exit: ; preds = %3 %10 = getelementptr inbounds i8, ptr %.030, i64 1 %11 = load i8, ptr %.030, align 1 %12 = icmp slt i8 %11, 0 - br i1 %12, label %13, label %30 + br i1 %12, label %13, label %29 13: ; preds = %8 %14 = add nsw i8 %11, 60 @@ -41,7 +41,7 @@ _ZN4llvm15SmallVectorImplIcE7reserveEm.exit: ; preds = %3 15: ; preds = %13 %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3_V216generic_categoryEv() #4 - br label %44 + br label %43 17: ; preds = %13 %.not23 = icmp eq i64 %9, 0 @@ -49,60 +49,59 @@ _ZN4llvm15SmallVectorImplIcE7reserveEm.exit: ; preds = %3 18: ; preds = %17 %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3_V216generic_categoryEv() #4 - br label %44 + br label %43 20: ; preds = %17 %21 = load i8, ptr %10, align 1 - %22 = and i8 %21, -64 - %.not24 = icmp eq i8 %22, -128 - br i1 %.not24, label %25, label %23 - -23: ; preds = %20 - %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3_V216generic_categoryEv() #4 - br label %44 - -25: ; preds = %20 - %26 = getelementptr inbounds i8, ptr %.030, i64 2 - %27 = shl i8 %11, 6 - %28 = or i8 %21, %27 - %29 = add i64 %.01929, -2 - br label %30 - -30: ; preds = %25, %8 - %.120 = phi i64 [ %29, %25 ], [ %9, %8 ] - %.018 = phi i8 [ %28, %25 ], [ %11, %8 ] - %.1 = phi ptr [ %26, %25 ], [ %10, %8 ] - %31 = zext i8 %.018 to i64 - %32 = getelementptr inbounds i8, ptr @_ZL17ISO88591ToIBM1047, i64 %31 - %33 = load i8, ptr %32, align 1 - %34 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 - %35 = add i64 %34, 1 - %36 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE8capacityEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 - %.not.i.i.i = icmp ugt i64 %35, %36 - br i1 %.not.i.i.i, label %37, label %_ZN4llvm23SmallVectorTemplateBaseIcLb1EE9push_backEc.exit - -37: ; preds = %30 - tail call void @_ZN4llvm15SmallVectorBaseImE8grow_podEPvmm(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull %7, i64 noundef %35, i64 noundef 1) #3 + %.not24 = icmp slt i8 %21, -64 + br i1 %.not24, label %24, label %22 + +22: ; preds = %20 + %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3_V216generic_categoryEv() #4 + br label %43 + +24: ; preds = %20 + %25 = getelementptr inbounds i8, ptr %.030, i64 2 + %26 = shl i8 %11, 6 + %27 = or i8 %21, %26 + %28 = add i64 %.01929, -2 + br label %29 + +29: ; preds = %24, %8 + %.120 = phi i64 [ %28, %24 ], [ %9, %8 ] + %.018 = phi i8 [ %27, %24 ], [ %11, %8 ] + %.1 = phi ptr [ %25, %24 ], [ %10, %8 ] + %30 = zext i8 %.018 to i64 + %31 = getelementptr inbounds i8, ptr @_ZL17ISO88591ToIBM1047, i64 %30 + %32 = load i8, ptr %31, align 1 + %33 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 + %34 = add i64 %33, 1 + %35 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE8capacityEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 + %.not.i.i.i = icmp ugt i64 %34, %35 + br i1 %.not.i.i.i, label %36, label %_ZN4llvm23SmallVectorTemplateBaseIcLb1EE9push_backEc.exit + +36: ; preds = %29 + tail call void @_ZN4llvm15SmallVectorBaseImE8grow_podEPvmm(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull %7, i64 noundef %34, i64 noundef 1) #3 br label %_ZN4llvm23SmallVectorTemplateBaseIcLb1EE9push_backEc.exit -_ZN4llvm23SmallVectorTemplateBaseIcLb1EE9push_backEc.exit: ; preds = %30, %37 - %38 = load ptr, ptr %2, align 8 - %39 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 - %40 = getelementptr inbounds i8, ptr %38, i64 %39 - store i8 %33, ptr %40, align 1 - %41 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 - %42 = add i64 %41, 1 - tail call void @_ZN4llvm15SmallVectorBaseImE8set_sizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %42) #3 +_ZN4llvm23SmallVectorTemplateBaseIcLb1EE9push_backEc.exit: ; preds = %29, %36 + %37 = load ptr, ptr %2, align 8 + %38 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 + %39 = getelementptr inbounds i8, ptr %37, i64 %38 + store i8 %32, ptr %39, align 1 + %40 = tail call noundef i64 @_ZNK4llvm15SmallVectorBaseImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3 + %41 = add i64 %40, 1 + tail call void @_ZN4llvm15SmallVectorBaseImE8set_sizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %41) #3 %.not = icmp eq i64 %.120, 0 br i1 %.not, label %._crit_edge, label %8, !llvm.loop !4 ._crit_edge: ; preds = %_ZN4llvm23SmallVectorTemplateBaseIcLb1EE9push_backEc.exit, %_ZN4llvm15SmallVectorImplIcE7reserveEm.exit - %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3_V215system_categoryEv() #4 - br label %44 + %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3_V215system_categoryEv() #4 + br label %43 -44: ; preds = %._crit_edge, %23, %18, %15 - %.sroa.027.0 = phi i32 [ 0, %._crit_edge ], [ 84, %15 ], [ 22, %18 ], [ 84, %23 ] - %.sroa.5.0 = phi ptr [ %43, %._crit_edge ], [ %16, %15 ], [ %19, %18 ], [ %24, %23 ] +43: ; preds = %._crit_edge, %22, %18, %15 + %.sroa.027.0 = phi i32 [ 0, %._crit_edge ], [ 84, %15 ], [ 22, %18 ], [ 84, %22 ] + %.sroa.5.0 = phi ptr [ %42, %._crit_edge ], [ %16, %15 ], [ %19, %18 ], [ %23, %22 ] %.fca.0.insert = insertvalue { i32, ptr } poison, i32 %.sroa.027.0, 0 %.fca.1.insert = insertvalue { i32, ptr } %.fca.0.insert, ptr %.sroa.5.0, 1 ret { i32, ptr } %.fca.1.insert diff --git a/bench/llvm/optimized/ItaniumDemangle.cpp.ll b/bench/llvm/optimized/ItaniumDemangle.cpp.ll index 27cb1b89391..fa552310ad8 100644 --- a/bench/llvm/optimized/ItaniumDemangle.cpp.ll +++ b/bench/llvm/optimized/ItaniumDemangle.cpp.ll @@ -11150,8 +11150,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK4llvm16itanium_demangle24Forw %10 = getelementptr inbounds nuw i8, ptr %9, i64 9 %11 = load i16, ptr %10, align 1 %12 = trunc i16 %11 to i8 - %.mask.i = and i8 %12, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %12, -64 br i1 %.not.i, label %15, label %13 13: ; preds = %6 @@ -22618,8 +22617,7 @@ define linkonce_odr hidden void @_ZNK4llvm16itanium_demangle24NonTypeTemplatePar %9 = getelementptr inbounds nuw i8, ptr %8, i64 9 %10 = load i16, ptr %9, align 1 %11 = trunc i16 %10 to i8 - %.mask.i = and i8 %11, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %11, -64 br i1 %.not.i, label %_ZNK4llvm16itanium_demangle4Node15hasRHSComponentERNS0_12OutputBufferE.exit, label %12 12: ; preds = %2 @@ -30265,8 +30263,7 @@ _ZNK4llvm16itanium_demangle13ParameterPack23initializePackExpansionERNS0_12Outpu %21 = getelementptr inbounds nuw i8, ptr %20, i64 9 %22 = load i16, ptr %21, align 1 %23 = trunc i16 %22 to i8 - %.mask.i = and i8 %23, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %23, -64 br i1 %.not.i, label %26, label %24 24: ; preds = %16 @@ -31148,8 +31145,7 @@ define linkonce_odr hidden void @_ZNK4llvm16itanium_demangle16FunctionEncoding9p %10 = getelementptr inbounds nuw i8, ptr %9, i64 9 %11 = load i16, ptr %10, align 1 %12 = trunc i16 %11 to i8 - %.mask.i = and i8 %12, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %12, -64 br i1 %.not.i, label %_ZNK4llvm16itanium_demangle4Node15hasRHSComponentERNS0_12OutputBufferE.exit, label %13 13: ; preds = %5 @@ -34881,8 +34877,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK4llvm16itanium_demangle8QualT %5 = getelementptr inbounds nuw i8, ptr %4, i64 9 %6 = load i16, ptr %5, align 1 %7 = trunc i16 %6 to i8 - %.mask.i = and i8 %7, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %7, -64 br i1 %.not.i, label %10, label %8 8: ; preds = %2 @@ -36223,8 +36218,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK4llvm16itanium_demangle19Poin %5 = getelementptr inbounds nuw i8, ptr %4, i64 9 %6 = load i16, ptr %5, align 1 %7 = trunc i16 %6 to i8 - %.mask.i = and i8 %7, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %7, -64 br i1 %.not.i, label %10, label %8 8: ; preds = %2 @@ -36654,8 +36648,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK4llvm16itanium_demangle11Poin %5 = getelementptr inbounds nuw i8, ptr %4, i64 9 %6 = load i16, ptr %5, align 1 %7 = trunc i16 %6 to i8 - %.mask.i = and i8 %7, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %7, -64 br i1 %.not.i, label %10, label %8 8: ; preds = %2 @@ -37141,8 +37134,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK4llvm16itanium_demangle13Refe %5 = getelementptr inbounds nuw i8, ptr %4, i64 9 %6 = load i16, ptr %5, align 1 %7 = trunc i16 %6 to i8 - %.mask.i = and i8 %7, -64 - %.not.i = icmp eq i8 %.mask.i, -128 + %.not.i = icmp slt i8 %7, -64 br i1 %.not.i, label %10, label %8 8: ; preds = %2 diff --git a/bench/lua/optimized/lutf8lib.ll b/bench/lua/optimized/lutf8lib.ll index b0a30f73d8b..b17fb14f753 100644 --- a/bench/lua/optimized/lutf8lib.ll +++ b/bench/lua/optimized/lutf8lib.ll @@ -99,8 +99,7 @@ land.rhs14: ; preds = %while.cond.preheade %posi.153 = phi i64 [ %dec20, %while.body ], [ %posi.038, %while.cond.preheader ] %add.ptr = getelementptr inbounds i8, ptr %call, i64 %posi.153 %3 = load i8, ptr %add.ptr, align 1 - %4 = and i8 %3, -64 - %cmp16 = icmp eq i8 %4, -128 + %cmp16 = icmp slt i8 %3, -64 br i1 %cmp16, label %while.body, label %if.then78 while.body: ; preds = %land.rhs14 @@ -110,9 +109,8 @@ while.body: ; preds = %land.rhs14 if.else: ; preds = %lor.end %add.ptr21 = getelementptr inbounds i8, ptr %call, i64 %posi.038 - %5 = load i8, ptr %add.ptr21, align 1 - %6 = and i8 %5, -64 - %cmp24 = icmp eq i8 %6, -128 + %4 = load i8, ptr %add.ptr21, align 1 + %cmp24 = icmp slt i8 %4, -64 br i1 %cmp24, label %if.then26, label %if.end if.then26: ; preds = %if.else @@ -124,12 +122,12 @@ if.end: ; preds = %if.else br i1 %cmp28, label %while.cond31.preheader, label %while.cond54.preheader while.cond54.preheader: ; preds = %if.end - %7 = load i64, ptr %len, align 8 + %5 = load i64, ptr %len, align 8 %n.241 = add nsw i64 %call1, -1 %cmp5542 = icmp ne i64 %call1, 1 - %cmp5843 = icmp slt i64 %posi.038, %7 - %8 = select i1 %cmp5542, i1 %cmp5843, i1 false - br i1 %8, label %do.body63.preheader, label %if.end75 + %cmp5843 = icmp slt i64 %posi.038, %5 + %6 = select i1 %cmp5542, i1 %cmp5843, i1 false + br i1 %6, label %do.body63.preheader, label %if.end75 while.cond31.preheader: ; preds = %if.end %cmp3547 = icmp sgt i64 %posi.038, 0 @@ -152,17 +150,16 @@ do.end.thread: ; preds = %do.body land.rhs43: ; preds = %do.body %dec40 = add nsw i64 %posi.4, -1 %add.ptr44 = getelementptr inbounds i8, ptr %call, i64 %dec40 - %9 = load i8, ptr %add.ptr44, align 1 - %10 = and i8 %9, -64 - %cmp47 = icmp eq i8 %10, -128 + %7 = load i8, ptr %add.ptr44, align 1 + %cmp47 = icmp slt i8 %7, -64 br i1 %cmp47, label %do.body, label %do.end, !llvm.loop !7 do.end: ; preds = %land.rhs43 %inc = add nsw i64 %n.148, 1 %cmp32 = icmp slt i64 %n.148, -1 %cmp35 = icmp sgt i64 %posi.4, 1 - %11 = and i1 %cmp32, %cmp35 - br i1 %11, label %do.body.preheader, label %if.end75, !llvm.loop !8 + %8 = and i1 %cmp32, %cmp35 + br i1 %8, label %do.body.preheader, label %if.end75, !llvm.loop !8 do.body63.preheader: ; preds = %while.cond54.preheader, %do.end71 %n.245 = phi i64 [ %n.2, %do.end71 ], [ %n.241, %while.cond54.preheader ] @@ -173,17 +170,16 @@ do.body63: ; preds = %do.body63.preheader %posi.6 = phi i64 [ %inc64, %do.body63 ], [ %posi.544, %do.body63.preheader ] %inc64 = add nsw i64 %posi.6, 1 %add.ptr66 = getelementptr inbounds i8, ptr %call, i64 %inc64 - %12 = load i8, ptr %add.ptr66, align 1 - %13 = and i8 %12, -64 - %cmp69 = icmp eq i8 %13, -128 + %9 = load i8, ptr %add.ptr66, align 1 + %cmp69 = icmp slt i8 %9, -64 br i1 %cmp69, label %do.body63, label %do.end71, !llvm.loop !9 do.end71: ; preds = %do.body63 %n.2 = add nsw i64 %n.245, -1 %cmp55 = icmp sgt i64 %n.245, 1 - %cmp58 = icmp slt i64 %inc64, %7 - %14 = select i1 %cmp55, i1 %cmp58, i1 false - br i1 %14, label %do.body63.preheader, label %if.end75, !llvm.loop !10 + %cmp58 = icmp slt i64 %inc64, %5 + %10 = select i1 %cmp55, i1 %cmp58, i1 false + br i1 %10, label %do.body63.preheader, label %if.end75, !llvm.loop !10 if.end75: ; preds = %do.end71, %do.end, %do.end.thread, %while.cond54.preheader %n.0 = phi i64 [ %n.241, %while.cond54.preheader ], [ %inc60, %do.end.thread ], [ %inc, %do.end ], [ %n.2, %do.end71 ] @@ -741,9 +737,8 @@ entry: %call = tail call i32 @lua_toboolean(ptr noundef %L, i32 noundef 2) #2 %call1 = tail call ptr @luaL_checklstring(ptr noundef %L, i32 noundef 1, ptr noundef null) #2 %0 = load i8, ptr %call1, align 1 - %1 = and i8 %0, -64 - %cmp.not = icmp eq i8 %1, -128 - br i1 %cmp.not, label %lor.rhs, label %lor.end + %cmp = icmp sgt i8 %0, -65 + br i1 %cmp, label %lor.end, label %lor.rhs lor.rhs: ; preds = %entry %call6 = tail call i32 @luaL_argerror(ptr noundef %L, i32 noundef 1, ptr noundef nonnull @.str.11) #2 @@ -818,8 +813,7 @@ while.cond: ; preds = %entry, %while.cond %n.1 = phi i64 [ %inc, %while.cond ], [ %call1, %entry ] %add.ptr = getelementptr inbounds i8, ptr %call, i64 %n.1 %1 = load i8, ptr %add.ptr, align 1 - %2 = and i8 %1, -64 - %cmp2 = icmp eq i8 %2, -128 + %cmp2 = icmp slt i8 %1, -64 %inc = add i64 %n.1, 1 br i1 %cmp2, label %while.cond, label %if.end, !llvm.loop !15 @@ -830,9 +824,9 @@ if.end: ; preds = %while.cond, %entry if.else: ; preds = %if.end %add.ptr7 = getelementptr inbounds i8, ptr %call, i64 %n.0 - %3 = load i8, ptr %add.ptr7, align 1 - %conv.i = zext i8 %3 to i32 - %cmp.i = icmp sgt i8 %3, -1 + %2 = load i8, ptr %add.ptr7, align 1 + %conv.i = zext i8 %2 to i32 + %cmp.i = icmp sgt i8 %2, -1 br i1 %cmp.i, label %if.end24.i, label %for.cond.preheader.i for.cond.preheader.i: ; preds = %if.else @@ -846,8 +840,8 @@ for.body.i: ; preds = %for.cond.preheader. %c.028.i = phi i32 [ %shl9.i, %if.end.i ], [ %conv.i, %for.cond.preheader.i ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %arrayidx2.i = getelementptr inbounds i8, ptr %add.ptr7, i64 %indvars.iv.next.i - %4 = load i8, ptr %arrayidx2.i, align 1 - %conv3.i = zext i8 %4 to i32 + %3 = load i8, ptr %arrayidx2.i, align 1 + %conv3.i = zext i8 %3 to i32 %and4.i = and i32 %conv3.i, 192 %cmp5.i = icmp eq i32 %and4.i, 128 br i1 %cmp5.i, label %if.end.i, label %if.then15 @@ -857,18 +851,18 @@ if.end.i: ; preds = %for.body.i %and8.i = and i32 %conv3.i, 63 %or.i = or disjoint i32 %and8.i, %shl.i %shl9.i = shl i32 %c.028.i, 1 - %5 = and i32 %c.028.i, 32 - %tobool.not.i = icmp eq i32 %5, 0 + %4 = and i32 %c.028.i, 32 + %tobool.not.i = icmp eq i32 %4, 0 br i1 %tobool.not.i, label %for.end.loopexit.i, label %for.body.i, !llvm.loop !11 for.end.loopexit.i: ; preds = %if.end.i - %6 = trunc nuw nsw i64 %indvars.iv.next.i to i32 + %5 = trunc nuw nsw i64 %indvars.iv.next.i to i32 br label %for.end.i for.end.i: ; preds = %for.end.loopexit.i, %for.cond.preheader.i %c.0.lcssa.i = phi i32 [ %conv.i, %for.cond.preheader.i ], [ %shl9.i, %for.end.loopexit.i ] %res.1.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %or.i, %for.end.loopexit.i ] - %count.0.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %6, %for.end.loopexit.i ] + %count.0.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %5, %for.end.loopexit.i ] %and10.i = and i32 %c.0.lcssa.i, 63 %mul.i = mul nuw nsw i32 %count.0.lcssa.i, 5 %shl11.i = shl i32 %and10.i, %mul.i @@ -881,8 +875,8 @@ for.end.i: ; preds = %for.end.loopexit.i, lor.lhs.false17.i: ; preds = %for.end.i %idxprom18.i = zext nneg i32 %count.0.lcssa.i to i64 %arrayidx19.i = getelementptr inbounds [6 x i32], ptr @utf8_decode.limits, i64 0, i64 %idxprom18.i - %7 = load i32, ptr %arrayidx19.i, align 4 - %cmp20.i = icmp ult i32 %or12.i, %7 + %6 = load i32, ptr %arrayidx19.i, align 4 + %cmp20.i = icmp ult i32 %or12.i, %6 br i1 %cmp20.i, label %if.then15, label %if.end23.i if.end23.i: ; preds = %lor.lhs.false17.i @@ -897,16 +891,15 @@ if.end24.i: ; preds = %if.end23.i, %if.els if.then26.i: ; preds = %if.end24.i %cmp27.i = icmp ugt i32 %res.0.i, 1114111 - %8 = and i32 %res.0.i, 2095104 - %or.cond1.i = icmp eq i32 %8, 55296 + %7 = and i32 %res.0.i, 2095104 + %or.cond1.i = icmp eq i32 %7, 55296 %or.cond22.i = or i1 %cmp27.i, %or.cond1.i br i1 %or.cond22.i, label %if.then15, label %lor.lhs.false lor.lhs.false: ; preds = %if.then26.i, %if.end24.i %add.ptr40.i = getelementptr inbounds i8, ptr %s.addr.0.i, i64 1 - %9 = load i8, ptr %add.ptr40.i, align 1 - %10 = and i8 %9, -64 - %cmp13 = icmp eq i8 %10, -128 + %8 = load i8, ptr %add.ptr40.i, align 1 + %cmp13 = icmp slt i8 %8, -64 br i1 %cmp13, label %if.then15, label %if.end17 if.then15: ; preds = %for.body.i, %if.then26.i, %for.end.i, %lor.lhs.false17.i, %lor.lhs.false diff --git a/bench/luajit/optimized/lj_carith.ll b/bench/luajit/optimized/lj_carith.ll index eeed5304a83..70ba3fe531d 100644 --- a/bench/luajit/optimized/lj_carith.ll +++ b/bench/luajit/optimized/lj_carith.ll @@ -113,8 +113,7 @@ do.body.i.i: ; preds = %cdata_getptr.exit.i %idxprom.i.i.i.i = zext nneg i32 %and.i.i.i to i64 %arrayidx.i.i.i.i = getelementptr inbounds %struct.CType, ptr %9, i64 %idxprom.i.i.i.i %16 = load i32, ptr %arrayidx.i.i.i.i, align 8 - %shr.i209.mask.i = and i32 %16, -268435456 - %cmp.i210.i = icmp eq i32 %shr.i209.mask.i, -2147483648 + %cmp.i210.i = icmp slt i32 %16, -1879048192 br i1 %cmp.i210.i, label %do.body.i.i, label %if.end35.i, !llvm.loop !6 if.then23.i: ; preds = %ctype_raw.exit174.i @@ -194,8 +193,7 @@ while.cond.i.i: ; preds = %while.cond.i.i, %if %idxprom.i.i.pn.i = phi i64 [ %idxprom.i.i.i, %if.then77.i ], [ %idxprom.i.i187.i, %while.cond.i.i ] %ct.i.0.i = getelementptr inbounds %struct.CType, ptr %28, i64 %idxprom.i.i.pn.i %29 = load i32, ptr %ct.i.0.i, align 8 - %shr.i.mask.i = and i32 %29, -268435456 - %cmp.i.i = icmp eq i32 %shr.i.mask.i, -2147483648 + %cmp.i.i = icmp slt i32 %29, -1879048192 %and.i185.i = and i32 %29, 65535 %idxprom.i.i187.i = zext nneg i32 %and.i185.i to i64 br i1 %cmp.i.i, label %while.cond.i.i, label %ctype_raw.exit.i, !llvm.loop !4 @@ -207,7 +205,8 @@ ctype_raw.exit.i: ; preds = %while.cond.i.i %30 = inttoptr i64 %and96.i to ptr %add.ptr97.i = getelementptr inbounds i8, ptr %30, i64 24 store ptr %add.ptr97.i, ptr %indvars.iv.i.sroa.phi, align 8 - %cmp103.i = icmp eq i32 %shr.i.mask.i, 1342177280 + %shr102.mask.i = and i32 %29, -268435456 + %cmp103.i = icmp eq i32 %shr102.mask.i, 1342177280 br i1 %cmp103.i, label %if.then105.i, label %for.inc.i if.then105.i: ; preds = %ctype_raw.exit.i @@ -231,11 +230,11 @@ carith_checkarg.exit.thread: ; preds = %if.then105.i, %land br label %if.end9 for.inc.i.sink.split: ; preds = %if.else72.i, %if.end35.i, %if.then53.i, %if.then64.i - %.sink136 = phi ptr [ %arrayidx.i.i, %if.then64.i ], [ %arrayidx.i148.i, %if.then53.i ], [ %ct.1.i, %if.end35.i ], [ null, %if.else72.i ] + %.sink139 = phi ptr [ %arrayidx.i.i, %if.then64.i ], [ %arrayidx.i148.i, %if.then53.i ], [ %ct.1.i, %if.end35.i ], [ null, %if.else72.i ] %.sink = phi ptr [ null, %if.then64.i ], [ %o.098.i, %if.then53.i ], [ %p.0.i, %if.end35.i ], [ inttoptr (i64 1 to ptr), %if.else72.i ] %ok.2.i.ph = phi i32 [ %ok.097.i, %if.then64.i ], [ %ok.097.i, %if.then53.i ], [ %ok.097.i, %if.end35.i ], [ 0, %if.else72.i ] %arrayidx136.i = getelementptr inbounds [2 x ptr], ptr %ct134.i, i64 0, i64 %indvars.iv.i - store ptr %.sink136, ptr %arrayidx136.i, align 8 + store ptr %.sink139, ptr %arrayidx136.i, align 8 store ptr %.sink, ptr %indvars.iv.i.sroa.phi, align 8 br label %for.inc.i @@ -256,9 +255,9 @@ for.inc.i.thread: ; preds = %land.lhs.true.i store ptr %arrayidx.i.i196.i, ptr %arrayidx94.i, align 8 %size119.i = getelementptr inbounds i8, ptr %call108.i, i64 4 store ptr %size119.i, ptr %indvars.iv.i.sroa.phi, align 8 - br i1 %tobool.not.i, label %for.body.i.backedge, label %carith_checkarg.exit.thread128 + br i1 %tobool.not.i, label %for.body.i.backedge, label %carith_checkarg.exit.thread130 -carith_checkarg.exit.thread128: ; preds = %for.inc.i.thread +carith_checkarg.exit.thread130: ; preds = %for.inc.i.thread call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ofs.i) br label %switch.early.test @@ -267,7 +266,7 @@ carith_checkarg.exit: ; preds = %for.inc.i %tobool.not = icmp eq i32 %ok.2.i, 0 br i1 %tobool.not, label %if.end9, label %switch.early.test -switch.early.test: ; preds = %carith_checkarg.exit.thread128, %carith_checkarg.exit +switch.early.test: ; preds = %carith_checkarg.exit.thread130, %carith_checkarg.exit switch i32 %mm, label %if.then [ i32 8, label %if.end9 i32 5, label %if.end9 diff --git a/bench/luajit/optimized/lj_ccall.ll b/bench/luajit/optimized/lj_ccall.ll index 7c3d875cea1..865218e08db 100644 --- a/bench/luajit/optimized/lj_ccall.ll +++ b/bench/luajit/optimized/lj_ccall.ll @@ -134,11 +134,13 @@ do.body.i: ; preds = %do.body.i, %if.then %idxprom.i.i46 = zext nneg i32 %and.i to i64 %arrayidx.i.i47 = getelementptr inbounds %struct.CType, ptr %5, i64 %idxprom.i.i46 %9 = load i32, ptr %arrayidx.i.i47, align 8 - %shr.i37.mask = and i32 %9, -268435456 - switch i32 %shr.i37.mask, label %return [ - i32 -2147483648, label %do.body.i - i32 1610612736, label %if.then8 - ] + %cmp.i38 = icmp slt i32 %9, -1879048192 + br i1 %cmp.i38, label %do.body.i, label %if.end, !llvm.loop !6 + +if.end: ; preds = %do.body.i + %shr5.mask = and i32 %9, -268435456 + %cmp6 = icmp eq i32 %shr5.mask, 1610612736 + br i1 %cmp6, label %if.then8, label %return if.end.thread: ; preds = %while.cond.i %shr5.mask62 = and i32 %6, -268435456 @@ -149,7 +151,7 @@ if.then8.thread: ; preds = %if.end.thread %add.ptr68 = getelementptr inbounds i8, ptr %cd, i64 16 br label %if.else.i -if.then8: ; preds = %do.body.i +if.then8: ; preds = %if.end %10 = icmp eq i32 %7, 4 %add.ptr = getelementptr inbounds i8, ptr %cd, i64 16 br i1 %10, label %if.then.i, label %if.else.i @@ -274,8 +276,7 @@ while.body.i38: ; preds = %while.cond.i37 %idxprom.i280.i = zext i16 %fid.0.in.i to i64 %arrayidx.i281.i = getelementptr inbounds %struct.CType, ptr %23, i64 %idxprom.i280.i %24 = load i32, ptr %arrayidx.i281.i, align 8 - %shr40.mask.i = and i32 %24, -268435456 - %cmp41.i = icmp eq i32 %shr40.mask.i, -2147483648 + %cmp41.i = icmp slt i32 %24, -1879048192 br i1 %cmp41.i, label %while.cond.i37, label %while.end.i, !llvm.loop !7 while.end.i: ; preds = %while.body.i38, %while.cond.i37 @@ -874,8 +875,8 @@ if.end34: ; preds = %if.then32, %while.b %cmp23 = icmp ugt i32 %dec82.in, 1 br i1 %cmp23, label %while.body, label %return, !llvm.loop !11 -return: ; preds = %do.body.i, %if.end34, %ccall_get_results.exit.thread93, %ccall_get_results.exit, %if.end.thread - %retval.0 = phi i32 [ -1, %if.end.thread ], [ 1, %ccall_get_results.exit ], [ 0, %ccall_get_results.exit.thread93 ], [ 1, %if.end34 ], [ -1, %do.body.i ] +return: ; preds = %if.end34, %ccall_get_results.exit.thread93, %ccall_get_results.exit, %if.end.thread, %if.end + %retval.0 = phi i32 [ -1, %if.end ], [ -1, %if.end.thread ], [ 1, %ccall_get_results.exit ], [ 0, %ccall_get_results.exit.thread93 ], [ 1, %if.end34 ] ret i32 %retval.0 } @@ -923,8 +924,7 @@ do.body.i32: ; preds = %while.body, %do.bod %idxprom.i.i = zext nneg i32 %and.i to i64 %arrayidx.i.i = getelementptr inbounds %struct.CType, ptr %3, i64 %idxprom.i.i %7 = load i32, ptr %arrayidx.i.i, align 8 - %shr.i34.mask = and i32 %7, -268435456 - %cmp.i35 = icmp eq i32 %shr.i34.mask, -2147483648 + %cmp.i35 = icmp slt i32 %7, -1879048192 br i1 %cmp.i35, label %do.body.i32, label %ctype_rawchild.exit36, !llvm.loop !6 ctype_rawchild.exit36: ; preds = %do.body.i32 @@ -951,8 +951,7 @@ do.body.i: ; preds = %if.else14, %do.body %idxprom.i.i48 = zext nneg i32 %and.i47 to i64 %arrayidx.i.i49 = getelementptr inbounds %struct.CType, ptr %3, i64 %idxprom.i.i48 %10 = load i32, ptr %arrayidx.i.i49, align 8 - %shr.i.mask = and i32 %10, -268435456 - %cmp.i = icmp eq i32 %shr.i.mask, -2147483648 + %cmp.i = icmp slt i32 %10, -1879048192 br i1 %cmp.i, label %do.body.i, label %ctype_rawchild.exit, !llvm.loop !6 ctype_rawchild.exit: ; preds = %do.body.i @@ -1005,8 +1004,7 @@ do.body.i: ; preds = %do.body.i.preheader %idxprom.i.i = zext nneg i32 %and.i to i64 %arrayidx.i.i = getelementptr inbounds %struct.CType, ptr %1, i64 %idxprom.i.i %3 = load i32, ptr %arrayidx.i.i, align 8 - %shr.i.mask = and i32 %3, -268435456 - %cmp.i = icmp eq i32 %shr.i.mask, -2147483648 + %cmp.i = icmp slt i32 %3, -1879048192 br i1 %cmp.i, label %do.body.i, label %ctype_rawchild.exit, !llvm.loop !6 ctype_rawchild.exit: ; preds = %do.body.i diff --git a/bench/luajit/optimized/lj_ccallback.ll b/bench/luajit/optimized/lj_ccallback.ll index a37af701c13..05f6101a3e3 100644 --- a/bench/luajit/optimized/lj_ccallback.ll +++ b/bench/luajit/optimized/lj_ccallback.ll @@ -253,8 +253,7 @@ while.body.i: ; preds = %if.end79.i, %while. %idxprom.i.i = zext i16 %fid.0.in73.i to i64 %arrayidx.i.i = getelementptr inbounds %struct.CType, ptr %32, i64 %idxprom.i.i %33 = load i32, ptr %arrayidx.i.i, align 8 - %shr.mask.i = and i32 %33, -268435456 - %cmp41.i = icmp eq i32 %shr.mask.i, -2147483648 + %cmp41.i = icmp slt i32 %33, -1879048192 br i1 %cmp41.i, label %if.end79.i, label %do.body.i.i do.body.i.i: ; preds = %while.body.i, %do.body.i.i @@ -263,8 +262,7 @@ do.body.i.i: ; preds = %while.body.i, %do.b %idxprom.i.i.i = zext nneg i32 %and.i.i to i64 %arrayidx.i.i.i = getelementptr inbounds %struct.CType, ptr %32, i64 %idxprom.i.i.i %35 = load i32, ptr %arrayidx.i.i.i, align 8 - %shr.i.mask.i = and i32 %35, -268435456 - %cmp.i108.i = icmp eq i32 %shr.i.mask.i, -2147483648 + %cmp.i108.i = icmp slt i32 %35, -1879048192 br i1 %cmp.i108.i, label %do.body.i.i, label %ctype_rawchild.exit.i, !llvm.loop !4 ctype_rawchild.exit.i: ; preds = %do.body.i.i @@ -570,8 +568,7 @@ while.body.i: ; preds = %while.cond.preheade %idxprom.i.i = zext i16 %fid.0.in43.i to i64 %arrayidx.i.i = getelementptr inbounds %struct.CType, ptr %2, i64 %idxprom.i.i %9 = load i32, ptr %arrayidx.i.i, align 8 - %shr37.mask.i = and i32 %9, -268435456 - %cmp38.i = icmp eq i32 %shr37.mask.i, -2147483648 + %cmp38.i = icmp slt i32 %9, -1879048192 br i1 %cmp38.i, label %if.end65.i, label %do.body.i.i do.body.i.i: ; preds = %while.body.i, %do.body.i.i diff --git a/bench/luajit/optimized/lj_cconv.ll b/bench/luajit/optimized/lj_cconv.ll index 1d52f016e45..2c2ce18f63f 100644 --- a/bench/luajit/optimized/lj_cconv.ll +++ b/bench/luajit/optimized/lj_cconv.ll @@ -1183,8 +1183,7 @@ do.body.i: ; preds = %do.body.i.preheader %idxprom.i.i225 = zext nneg i32 %and.i.i224 to i64 %arrayidx.i.i226 = getelementptr inbounds %struct.CType, ptr %11, i64 %idxprom.i.i225 %13 = load i32, ptr %arrayidx.i.i226, align 8 - %shr.i227.mask = and i32 %13, -268435456 - %cmp.i228 = icmp eq i32 %shr.i227.mask, -2147483648 + %cmp.i228 = icmp slt i32 %13, -1879048192 br i1 %cmp.i228, label %do.body.i, label %ctype_rawchild.exit, !llvm.loop !8 ctype_rawchild.exit: ; preds = %do.body.i @@ -1235,8 +1234,7 @@ do.body.i.i: ; preds = %do.body.i.i, %if.th %idxprom.i.i.i = zext nneg i32 %and.i.i.i to i64 %arrayidx.i.i.i = getelementptr inbounds %struct.CType, ptr %19, i64 %idxprom.i.i.i %21 = load i32, ptr %arrayidx.i.i.i, align 8 - %shr.i.mask.i = and i32 %21, -268435456 - %cmp.i.i = icmp eq i32 %shr.i.mask.i, -2147483648 + %cmp.i.i = icmp slt i32 %21, -1879048192 br i1 %cmp.i.i, label %do.body.i.i, label %ctype_rawchild.exit.i, !llvm.loop !8 ctype_rawchild.exit.i: ; preds = %do.body.i.i @@ -1714,8 +1712,7 @@ do.body.i.i: ; preds = %do.body.i.i, %if.th %idxprom.i.i.i = zext nneg i32 %and.i.i.i to i64 %arrayidx.i.i.i = getelementptr inbounds %struct.CType, ptr %5, i64 %idxprom.i.i.i %7 = load i32, ptr %arrayidx.i.i.i, align 8 - %shr.i.mask.i = and i32 %7, -268435456 - %cmp.i.i = icmp eq i32 %shr.i.mask.i, -2147483648 + %cmp.i.i = icmp slt i32 %7, -1879048192 br i1 %cmp.i.i, label %do.body.i.i, label %ctype_rawchild.exit.i, !llvm.loop !8 ctype_rawchild.exit.i: ; preds = %do.body.i.i @@ -1948,8 +1945,7 @@ do.body.i74: ; preds = %do.body.i74.prehead %idxprom.i.i77 = zext nneg i32 %and.i.i75 to i64 %arrayidx.i.i78 = getelementptr inbounds %struct.CType, ptr %14, i64 %idxprom.i.i77 %16 = load i32, ptr %arrayidx.i.i78, align 8 - %shr.i79.mask = and i32 %16, -268435456 - %cmp.i80 = icmp eq i32 %shr.i79.mask, -2147483648 + %cmp.i80 = icmp slt i32 %16, -1879048192 br i1 %cmp.i80, label %do.body.i74, label %ctype_rawchild.exit81, !llvm.loop !8 ctype_rawchild.exit81: ; preds = %do.body.i74 @@ -1987,8 +1983,7 @@ do.body.i: ; preds = %if.else55, %do.body %idxprom.i.i = zext nneg i32 %and.i.i to i64 %arrayidx.i.i = getelementptr inbounds %struct.CType, ptr %1, i64 %idxprom.i.i %21 = load i32, ptr %arrayidx.i.i, align 8 - %shr.i.mask = and i32 %21, -268435456 - %cmp.i = icmp eq i32 %shr.i.mask, -2147483648 + %cmp.i = icmp slt i32 %21, -1879048192 br i1 %cmp.i, label %do.body.i, label %ctype_rawchild.exit, !llvm.loop !8 ctype_rawchild.exit: ; preds = %do.body.i @@ -2055,8 +2050,7 @@ do.body.i56: ; preds = %do.body.i56.prehead %idxprom.i.i59 = zext nneg i32 %and.i.i57 to i64 %arrayidx.i.i60 = getelementptr inbounds %struct.CType, ptr %7, i64 %idxprom.i.i59 %9 = load i32, ptr %arrayidx.i.i60, align 8 - %shr.i61.mask = and i32 %9, -268435456 - %cmp.i62 = icmp eq i32 %shr.i61.mask, -2147483648 + %cmp.i62 = icmp slt i32 %9, -1879048192 br i1 %cmp.i62, label %do.body.i56, label %ctype_rawchild.exit63, !llvm.loop !8 ctype_rawchild.exit63: ; preds = %do.body.i56 @@ -2098,8 +2092,7 @@ do.body.i: ; preds = %if.else32, %do.body %idxprom.i.i = zext nneg i32 %and.i.i to i64 %arrayidx.i.i = getelementptr inbounds %struct.CType, ptr %1, i64 %idxprom.i.i %14 = load i32, ptr %arrayidx.i.i, align 8 - %shr.i.mask = and i32 %14, -268435456 - %cmp.i = icmp eq i32 %shr.i.mask, -2147483648 + %cmp.i = icmp slt i32 %14, -1879048192 br i1 %cmp.i, label %do.body.i, label %ctype_rawchild.exit, !llvm.loop !8 ctype_rawchild.exit: ; preds = %do.body.i diff --git a/bench/luau/optimized/Lexer.cpp.ll b/bench/luau/optimized/Lexer.cpp.ll index 150ecf8d642..3b9af6b4c13 100644 --- a/bench/luau/optimized/Lexer.cpp.ll +++ b/bench/luau/optimized/Lexer.cpp.ll @@ -6017,7 +6017,7 @@ define dso_local void @_ZN4Luau5Lexer13readUtf8ErrorEv(ptr dead_on_unwind noalia store i32 0, ptr %29, align 4 %30 = getelementptr inbounds i8, ptr %0, i64 24 store ptr null, ptr %30, align 8 - br label %60 + br label %59 .critedge: ; preds = %14, %2 %.020.shrunk = phi i8 [ 0, %2 ], [ %17, %14 ] @@ -6036,10 +6036,10 @@ define dso_local void @_ZN4Luau5Lexer13readUtf8ErrorEv(ptr dead_on_unwind noalia %34 = load ptr, ptr %1, align 8 br label %35 -35: ; preds = %.lr.ph, %48 - %.063 = phi i32 [ 1, %.lr.ph ], [ %54, %48 ] - %.162 = phi i32 [ %.02068, %.lr.ph ], [ %52, %48 ] - %36 = phi i32 [ %33, %.lr.ph ], [ %53, %48 ] +35: ; preds = %.lr.ph, %47 + %.063 = phi i32 [ 1, %.lr.ph ], [ %53, %47 ] + %.162 = phi i32 [ %.02068, %.lr.ph ], [ %51, %47 ] + %36 = phi i32 [ %33, %.lr.ph ], [ %52, %47 ] %37 = zext i32 %36 to i64 %38 = icmp ugt i64 %12, %37 br i1 %38, label %39, label %.critedge38 @@ -6047,57 +6047,56 @@ define dso_local void @_ZN4Luau5Lexer13readUtf8ErrorEv(ptr dead_on_unwind noalia 39: ; preds = %35 %40 = getelementptr inbounds i8, ptr %34, i64 %37 %41 = load i8, ptr %40, align 1 - %42 = and i8 %41, -64 - %43 = icmp eq i8 %42, -128 - br i1 %43, label %48, label %.critedge38 + %42 = icmp slt i8 %41, -64 + br i1 %42, label %47, label %.critedge38 .critedge38: ; preds = %35, %39 - %44 = sub i32 %36, %8 - %.sroa.2.0.insert.ext.i43 = zext i32 %44 to i64 + %43 = sub i32 %36, %8 + %.sroa.2.0.insert.ext.i43 = zext i32 %43 to i64 %.sroa.2.0.insert.shift.i44 = shl nuw i64 %.sroa.2.0.insert.ext.i43, 32 %.sroa.0.0.insert.insert.i46 = or disjoint i64 %.sroa.2.0.insert.shift.i44, %.sroa.0.0.insert.ext.i store i32 287, ptr %0, align 8 - %45 = getelementptr inbounds i8, ptr %0, i64 4 - store i64 %.sroa.0.0.insert.insert.i, ptr %45, align 4 + %44 = getelementptr inbounds i8, ptr %0, i64 4 + store i64 %.sroa.0.0.insert.insert.i, ptr %44, align 4 %.sroa.254.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 12 store i64 %.sroa.0.0.insert.insert.i46, ptr %.sroa.254.0..sroa_idx, align 4 - %46 = getelementptr inbounds i8, ptr %0, i64 20 - store i32 0, ptr %46, align 4 - %47 = getelementptr inbounds i8, ptr %0, i64 24 - store ptr null, ptr %47, align 8 - br label %60 - -48: ; preds = %39 - %49 = shl i32 %.162, 6 - %50 = and i8 %41, 63 - %51 = zext nneg i8 %50 to i32 - %52 = or disjoint i32 %49, %51 - %53 = add i32 %36, 1 - store i32 %53, ptr %5, align 8 - %54 = add nuw nsw i32 %.063, 1 - %exitcond.not = icmp eq i32 %54, %.019.ph + %45 = getelementptr inbounds i8, ptr %0, i64 20 + store i32 0, ptr %45, align 4 + %46 = getelementptr inbounds i8, ptr %0, i64 24 + store ptr null, ptr %46, align 8 + br label %59 + +47: ; preds = %39 + %48 = shl i32 %.162, 6 + %49 = and i8 %41, 63 + %50 = zext nneg i8 %49 to i32 + %51 = or disjoint i32 %48, %50 + %52 = add i32 %36, 1 + store i32 %52, ptr %5, align 8 + %53 = add nuw nsw i32 %.063, 1 + %exitcond.not = icmp eq i32 %53, %.019.ph br i1 %exitcond.not, label %._crit_edge, label %35, !llvm.loop !31 -._crit_edge: ; preds = %48, %.critedge - %55 = phi i32 [ %31, %.critedge ], [ %53, %48 ] - %.1.lcssa = phi i32 [ %.020, %.critedge ], [ %52, %48 ] - %56 = sub i32 %55, %8 - %.sroa.2.0.insert.ext.i47 = zext i32 %56 to i64 +._crit_edge: ; preds = %47, %.critedge + %54 = phi i32 [ %31, %.critedge ], [ %52, %47 ] + %.1.lcssa = phi i32 [ %.020, %.critedge ], [ %51, %47 ] + %55 = sub i32 %54, %8 + %.sroa.2.0.insert.ext.i47 = zext i32 %55 to i64 %.sroa.2.0.insert.shift.i48 = shl nuw i64 %.sroa.2.0.insert.ext.i47, 32 %.sroa.0.0.insert.insert.i50 = or disjoint i64 %.sroa.2.0.insert.shift.i48, %.sroa.0.0.insert.ext.i store i32 287, ptr %0, align 8 - %57 = getelementptr inbounds i8, ptr %0, i64 4 - store i64 %.sroa.0.0.insert.insert.i, ptr %57, align 4 + %56 = getelementptr inbounds i8, ptr %0, i64 4 + store i64 %.sroa.0.0.insert.insert.i, ptr %56, align 4 %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 12 store i64 %.sroa.0.0.insert.insert.i50, ptr %.sroa.2.0..sroa_idx, align 4 - %58 = getelementptr inbounds i8, ptr %0, i64 20 - store i32 0, ptr %58, align 4 - %59 = getelementptr inbounds i8, ptr %0, i64 24 - store ptr null, ptr %59, align 8 - store i32 %.1.lcssa, ptr %59, align 8 - br label %60 - -60: ; preds = %._crit_edge, %.critedge38, %.critedge36 + %57 = getelementptr inbounds i8, ptr %0, i64 20 + store i32 0, ptr %57, align 4 + %58 = getelementptr inbounds i8, ptr %0, i64 24 + store ptr null, ptr %58, align 8 + store i32 %.1.lcssa, ptr %58, align 8 + br label %59 + +59: ; preds = %._crit_edge, %.critedge38, %.critedge36 ret void } diff --git a/bench/memcached/optimized/memcached-items.ll b/bench/memcached/optimized/memcached-items.ll index 8d5d2d1d09a..24ff09862cc 100644 --- a/bench/memcached/optimized/memcached-items.ll +++ b/bench/memcached/optimized/memcached-items.ll @@ -2559,48 +2559,47 @@ if.then: ; preds = %entry if.then2: ; preds = %if.then %slabs_clsid = getelementptr inbounds i8, ptr %it, i64 40 %2 = load i8, ptr %slabs_clsid, align 8 - %3 = and i8 %2, -64 - %cmp5 = icmp ne i8 %3, -128 + %cmp5 = icmp sgt i8 %2, -65 %and9 = and i32 %conv, 16 %tobool10.not = icmp eq i32 %and9, 0 %or.cond = or i1 %tobool10.not, %cmp5 - %4 = load volatile i32, ptr @current_time, align 4 + %3 = load volatile i32, ptr @current_time, align 4 %time24 = getelementptr inbounds i8, ptr %it, i64 24 - store i32 %4, ptr %time24, align 8 + store i32 %3, ptr %time24, align 8 br i1 %or.cond, label %if.end40, label %if.then11 if.then11: ; preds = %if.then2 tail call fastcc void @item_unlink_q(ptr noundef nonnull %it) - %5 = load i8, ptr %slabs_clsid, align 8 - %6 = and i8 %5, 63 - %7 = or disjoint i8 %6, 64 - store i8 %7, ptr %slabs_clsid, align 8 - %8 = load i16, ptr %it_flags, align 2 - %9 = and i16 %8, -17 - store i16 %9, ptr %it_flags, align 2 - %idxprom.i = zext nneg i8 %7 to i64 + %4 = load i8, ptr %slabs_clsid, align 8 + %5 = and i8 %4, 63 + %6 = or disjoint i8 %5, 64 + store i8 %6, ptr %slabs_clsid, align 8 + %7 = load i16, ptr %it_flags, align 2 + %8 = and i16 %7, -17 + store i16 %8, ptr %it_flags, align 2 + %idxprom.i = zext nneg i8 %6 to i64 %arrayidx.i = getelementptr inbounds [256 x %union.pthread_mutex_t], ptr @lru_locks, i64 0, i64 %idxprom.i %call.i = tail call i32 @pthread_mutex_lock(ptr noundef nonnull %arrayidx.i) #18 - %10 = load i8, ptr %slabs_clsid, align 8 - %idxprom.i.i = zext i8 %10 to i64 + %9 = load i8, ptr %slabs_clsid, align 8 + %idxprom.i.i = zext i8 %9 to i64 %arrayidx.i.i = getelementptr inbounds [256 x ptr], ptr @heads, i64 0, i64 %idxprom.i.i %arrayidx3.i.i = getelementptr inbounds [256 x ptr], ptr @tails, i64 0, i64 %idxprom.i.i %prev.i.i = getelementptr inbounds i8, ptr %it, i64 8 store ptr null, ptr %prev.i.i, align 8 - %11 = load ptr, ptr %arrayidx.i.i, align 8 - store ptr %11, ptr %it, align 8 - %tobool.not.i.i = icmp eq ptr %11, null + %10 = load ptr, ptr %arrayidx.i.i, align 8 + store ptr %10, ptr %it, align 8 + %tobool.not.i.i = icmp eq ptr %10, null br i1 %tobool.not.i.i, label %if.end.i.i, label %if.then.i.i if.then.i.i: ; preds = %if.then11 - %prev6.i.i = getelementptr inbounds i8, ptr %11, i64 8 + %prev6.i.i = getelementptr inbounds i8, ptr %10, i64 8 store ptr %it, ptr %prev6.i.i, align 8 br label %if.end.i.i if.end.i.i: ; preds = %if.then.i.i, %if.then11 store ptr %it, ptr %arrayidx.i.i, align 8 - %12 = load ptr, ptr %arrayidx3.i.i, align 8 - %cmp.i.i = icmp eq ptr %12, null + %11 = load ptr, ptr %arrayidx3.i.i, align 8 + %cmp.i.i = icmp eq ptr %11, null br i1 %cmp.i.i, label %if.then7.i.i, label %if.end8.i.i if.then7.i.i: ; preds = %if.end.i.i @@ -2608,59 +2607,59 @@ if.then7.i.i: ; preds = %if.end.i.i br label %if.end8.i.i if.end8.i.i: ; preds = %if.then7.i.i, %if.end.i.i - %13 = load i8, ptr %slabs_clsid, align 8 - %idxprom10.i.i = zext i8 %13 to i64 + %12 = load i8, ptr %slabs_clsid, align 8 + %idxprom10.i.i = zext i8 %12 to i64 %arrayidx11.i.i = getelementptr inbounds [256 x i32], ptr @sizes, i64 0, i64 %idxprom10.i.i - %14 = load i32, ptr %arrayidx11.i.i, align 4 - %inc.i.i = add i32 %14, 1 + %13 = load i32, ptr %arrayidx11.i.i, align 4 + %inc.i.i = add i32 %13, 1 store i32 %inc.i.i, ptr %arrayidx11.i.i, align 4 - %15 = load i16, ptr %it_flags, align 2 - %conv.i.i = zext i16 %15 to i32 + %14 = load i16, ptr %it_flags, align 2 + %conv.i.i = zext i16 %14 to i32 %and.i.i = and i32 %conv.i.i, 128 %tobool12.not.i.i = icmp eq i32 %and.i.i, 0 %nkey36.i.i = getelementptr inbounds i8, ptr %it, i64 41 - %16 = load i8, ptr %nkey36.i.i, align 1 - %conv37.i.i = zext i8 %16 to i64 + %15 = load i8, ptr %nkey36.i.i, align 1 + %conv37.i.i = zext i8 %15 to i64 br i1 %tobool12.not.i.i, label %if.else.i.i, label %if.then13.i.i if.then13.i.i: ; preds = %if.end8.i.i %and20.i.i = lshr i32 %conv.i.i, 6 - %17 = and i32 %and20.i.i, 4 + %16 = and i32 %and20.i.i, 4 %and25.i.i = shl nuw nsw i32 %conv.i.i, 2 - %18 = and i32 %and25.i.i, 8 + %17 = and i32 %and25.i.i, 8 %arrayidx34.i.i = getelementptr inbounds [256 x i64], ptr @sizes_bytes, i64 0, i64 %idxprom10.i.i - %19 = load i64, ptr %arrayidx34.i.i, align 8 - %narrow.i.i = add nuw nsw i32 %17, 61 - %narrow24.i.i = add nuw nsw i32 %narrow.i.i, %18 + %18 = load i64, ptr %arrayidx34.i.i, align 8 + %narrow.i.i = add nuw nsw i32 %16, 61 + %narrow24.i.i = add nuw nsw i32 %narrow.i.i, %17 %sub.i.i = zext nneg i32 %narrow24.i.i to i64 %add31.i.i = add nuw nsw i64 %sub.i.i, %conv37.i.i - %add35.i.i = add i64 %add31.i.i, %19 + %add35.i.i = add i64 %add31.i.i, %18 store i64 %add35.i.i, ptr %arrayidx34.i.i, align 8 br label %item_link_q_warm.exit if.else.i.i: ; preds = %if.end8.i.i %nbytes40.i.i = getelementptr inbounds i8, ptr %it, i64 32 - %20 = load i32, ptr %nbytes40.i.i, align 8 - %conv41.i.i = sext i32 %20 to i64 + %19 = load i32, ptr %nbytes40.i.i, align 8 + %conv41.i.i = sext i32 %19 to i64 %and45.i.i = lshr i32 %conv.i.i, 6 - %21 = and i32 %and45.i.i, 4 + %20 = and i32 %and45.i.i, 4 %and51.i.i = shl nuw nsw i32 %conv.i.i, 2 - %22 = and i32 %and51.i.i, 8 + %21 = and i32 %and51.i.i, 8 %arrayidx57.i.i = getelementptr inbounds [256 x i64], ptr @sizes_bytes, i64 0, i64 %idxprom10.i.i - %23 = load i64, ptr %arrayidx57.i.i, align 8 - %24 = or disjoint i32 %21, %22 - %add4225.i.i = or disjoint i32 %24, 49 + %22 = load i64, ptr %arrayidx57.i.i, align 8 + %23 = or disjoint i32 %20, %21 + %add4225.i.i = or disjoint i32 %23, 49 %add42.i.i = zext nneg i32 %add4225.i.i to i64 %add48.i.i = add nuw nsw i64 %add42.i.i, %conv37.i.i %add54.i.i = add nsw i64 %add48.i.i, %conv41.i.i - %add58.i.i = add i64 %add54.i.i, %23 + %add58.i.i = add i64 %add54.i.i, %22 store i64 %add58.i.i, ptr %arrayidx57.i.i, align 8 br label %item_link_q_warm.exit item_link_q_warm.exit: ; preds = %if.then13.i.i, %if.else.i.i %moves_to_warm.i = getelementptr inbounds [256 x %struct.itemstats_t], ptr @itemstats, i64 0, i64 %idxprom10.i.i, i32 12 - %25 = load i64, ptr %moves_to_warm.i, align 8 - %inc.i = add i64 %25, 1 + %24 = load i64, ptr %moves_to_warm.i, align 8 + %inc.i = add i64 %24, 1 store i64 %inc.i, ptr %moves_to_warm.i, align 8 %arrayidx6.i = getelementptr inbounds [256 x %union.pthread_mutex_t], ptr @lru_locks, i64 0, i64 %idxprom10.i.i %call7.i = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull %arrayidx6.i) #18 @@ -2668,22 +2667,22 @@ item_link_q_warm.exit: ; preds = %if.then13.i.i, %if. if.else26: ; preds = %entry %time27 = getelementptr inbounds i8, ptr %it, i64 24 - %26 = load i32, ptr %time27, align 8 - %27 = load volatile i32, ptr @current_time, align 4 - %sub = add i32 %27, -60 - %cmp28 = icmp ult i32 %26, %sub + %25 = load i32, ptr %time27, align 8 + %26 = load volatile i32, ptr @current_time, align 4 + %sub = add i32 %26, -60 + %cmp28 = icmp ult i32 %25, %sub br i1 %cmp28, label %if.then30, label %if.end40 if.then30: ; preds = %if.else26 %it_flags31 = getelementptr inbounds i8, ptr %it, i64 38 - %28 = load i16, ptr %it_flags31, align 2 - %29 = and i16 %28, 1 - %cmp34.not = icmp eq i16 %29, 0 + %27 = load i16, ptr %it_flags31, align 2 + %28 = and i16 %27, 1 + %cmp34.not = icmp eq i16 %28, 0 br i1 %cmp34.not, label %if.end40, label %if.then36 if.then36: ; preds = %if.then30 - %30 = load volatile i32, ptr @current_time, align 4 - store i32 %30, ptr %time27, align 8 + %29 = load volatile i32, ptr @current_time, align 4 + store i32 %29, ptr %time27, align 8 tail call fastcc void @item_unlink_q(ptr noundef nonnull %it) tail call fastcc void @item_link_q(ptr noundef nonnull %it) br label %if.end40 @@ -3886,28 +3885,27 @@ if.else: ; preds = %if.then2 store i16 %or14, ptr %it_flags, align 2 %slabs_clsid = getelementptr inbounds i8, ptr %it, i64 40 %2 = load i8, ptr %slabs_clsid, align 8 - %3 = and i8 %2, -64 - %cmp18.not = icmp eq i8 %3, -128 + %cmp18.not = icmp slt i8 %2, -64 br i1 %cmp18.not, label %if.else21, label %if.then20 if.then20: ; preds = %if.else - %4 = load volatile i32, ptr @current_time, align 4 + %3 = load volatile i32, ptr @current_time, align 4 %time = getelementptr inbounds i8, ptr %it, i64 24 - store i32 %4, ptr %time, align 8 + store i32 %3, ptr %time, align 8 br label %if.end35 if.else21: ; preds = %if.else %lru_bump_buf = getelementptr inbounds i8, ptr %t, i64 6920 - %5 = load ptr, ptr %lru_bump_buf, align 8 + %4 = load ptr, ptr %lru_bump_buf, align 8 %refcount.i = getelementptr inbounds i8, ptr %it, i64 36 - %6 = load i16, ptr %refcount.i, align 4 - %inc.i = add i16 %6, 1 + %5 = load i16, ptr %refcount.i, align 4 + %inc.i = add i16 %5, 1 store i16 %inc.i, ptr %refcount.i, align 4 - %mutex.i = getelementptr inbounds i8, ptr %5, i64 16 + %mutex.i = getelementptr inbounds i8, ptr %4, i64 16 %call.i = tail call i32 @pthread_mutex_lock(ptr noundef nonnull %mutex.i) #18 - %buf.i = getelementptr inbounds i8, ptr %5, i64 56 - %7 = load ptr, ptr %buf.i, align 8 - %call1.i = tail call ptr @bipbuf_request(ptr noundef %7, i32 noundef 16) #18 + %buf.i = getelementptr inbounds i8, ptr %4, i64 56 + %6 = load ptr, ptr %buf.i, align 8 + %call1.i = tail call ptr @bipbuf_request(ptr noundef %6, i32 noundef 16) #18 %cmp.not.i = icmp eq ptr %call1.i, null br i1 %cmp.not.i, label %if.then22, label %if.then.i @@ -3915,8 +3913,8 @@ if.then.i: ; preds = %if.else21 store ptr %it, ptr %call1.i, align 8 %hv3.i = getelementptr inbounds i8, ptr %call1.i, i64 8 store i32 %hv, ptr %hv3.i, align 8 - %8 = load ptr, ptr %buf.i, align 8 - %call5.i = tail call i32 @bipbuf_push(ptr noundef %8, i32 noundef 16) #18 + %7 = load ptr, ptr %buf.i, align 8 + %call5.i = tail call i32 @bipbuf_push(ptr noundef %7, i32 noundef 16) #18 %cmp6.i = icmp eq i32 %call5.i, 0 br i1 %cmp6.i, label %if.then22, label %lru_bump_async.exit.thread @@ -3925,22 +3923,22 @@ lru_bump_async.exit.thread: ; preds = %if.then.i br label %if.end35 if.then22: ; preds = %if.then.i, %if.else21 - %dropped.i = getelementptr inbounds i8, ptr %5, i64 64 - %9 = load i64, ptr %dropped.i, align 8 - %inc8.i = add i64 %9, 1 + %dropped.i = getelementptr inbounds i8, ptr %4, i64 64 + %8 = load i64, ptr %dropped.i, align 8 + %inc8.i = add i64 %8, 1 store i64 %inc8.i, ptr %dropped.i, align 8 - %10 = load i16, ptr %refcount.i, align 4 - %dec.i = add i16 %10, -1 + %9 = load i16, ptr %refcount.i, align 4 + %dec.i = add i16 %9, -1 store i16 %dec.i, ptr %refcount.i, align 4 %call16.i = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull %mutex.i) #18 - %11 = load i16, ptr %it_flags, align 2 - %12 = and i16 %11, -17 - store i16 %12, ptr %it_flags, align 2 + %10 = load i16, ptr %it_flags, align 2 + %11 = and i16 %10, -17 + store i16 %11, ptr %it_flags, align 2 br label %if.end35 if.else30: ; preds = %entry - %13 = or i16 %1, 8 - store i16 %13, ptr %it_flags, align 2 + %12 = or i16 %1, 8 + store i16 %12, ptr %it_flags, align 2 tail call void @do_item_update(ptr noundef %it) br label %if.end35 diff --git a/bench/memcached/optimized/memcached-storage.ll b/bench/memcached/optimized/memcached-storage.ll index 3f1d7ba101f..41112fdd145 100644 --- a/bench/memcached/optimized/memcached-storage.ll +++ b/bench/memcached/optimized/memcached-storage.ll @@ -2138,8 +2138,7 @@ if.then73.i: ; preds = %land.lhs.true67.i if.end86.i: ; preds = %if.then73.i %slabs_clsid.i = getelementptr inbounds i8, ptr %call.i, i64 40 %60 = load i8, ptr %slabs_clsid.i, align 8 - %61 = and i8 %60, -64 - %cmp80.i = icmp eq i8 %61, -128 + %cmp80.i = icmp slt i8 %60, -64 %inc83.i = zext i1 %cmp80.i to i32 %spec.select.i40 = add i32 %skipped.0.i, %inc83.i br i1 %cmp80.i, label %if.end209.i, label %if.then88.i @@ -2163,29 +2162,29 @@ if.else97.i: ; preds = %for.body.i38 br i1 %cmp89.i, label %for.body.i38, label %if.else206.i, !llvm.loop !14 if.then101.i: ; preds = %for.body.i38 - %62 = load ptr, ptr %buf.i, align 8 - %63 = load i32, ptr %len.i, align 8 - %conv96.i = zext i32 %63 to i64 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %62, ptr nonnull align 8 %add.ptr.i, i64 %conv96.i, i1 false) + %61 = load ptr, ptr %buf.i, align 8 + %62 = load i32, ptr %len.i, align 8 + %conv96.i = zext i32 %62 to i64 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %61, ptr nonnull align 8 %add.ptr.i, i64 %conv96.i, i1 false) call void @extstore_write(ptr noundef %arg, ptr noundef nonnull %io.i) #22 %refcount102.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 36 - %64 = load i16, ptr %refcount102.i, align 4 - %cmp104.i = icmp eq i16 %64, 2 + %63 = load i16, ptr %refcount102.i, align 4 + %cmp104.i = icmp eq i16 %63, 2 br i1 %cmp104.i, label %if.then106.i, label %if.else114.i if.then106.i: ; preds = %if.then101.i - %65 = load i32, ptr %page_version174.i, align 4 - store i32 %65, ptr %add.ptr57.i, align 4 - %66 = load i16, ptr %page_id176.i, align 8 - store i16 %66, ptr %page_id58.i, align 4 - %67 = load i32, ptr %offset178.i, align 4 - store i32 %67, ptr %offset68.i, align 4 + %64 = load i32, ptr %page_version174.i, align 4 + store i32 %64, ptr %add.ptr57.i, align 4 + %65 = load i16, ptr %page_id176.i, align 8 + store i16 %65, ptr %page_id58.i, align 4 + %66 = load i32, ptr %offset178.i, align 4 + store i32 %66, ptr %offset68.i, align 4 %inc113.i = add i32 %rescues.0.i, 1 br label %if.end209.i if.else114.i: ; preds = %if.then101.i - %68 = load i16, ptr %it_flags28.i, align 2 - %conv116.i = zext i16 %68 to i32 + %67 = load i16, ptr %it_flags28.i, align 2 + %conv116.i = zext i16 %67 to i32 %and117.i = and i32 %conv116.i, 256 %tobool118.not.i = icmp eq i32 %and117.i, 0 %.pre.i39 = load i8, ptr %nkey42.i, align 1 @@ -2196,82 +2195,82 @@ if.then119.i: ; preds = %if.else114.i %add.ptr124.i = getelementptr inbounds i8, ptr %data41.i, i64 %.pre93.i %add.ptr125.i = getelementptr inbounds i8, ptr %add.ptr124.i, i64 1 %and128.i = shl nuw nsw i32 %conv116.i, 2 - %69 = and i32 %and128.i, 8 - %cond130.i = zext nneg i32 %69 to i64 + %68 = and i32 %and128.i, 8 + %cond130.i = zext nneg i32 %68 to i64 %add.ptr131.i = getelementptr inbounds i8, ptr %add.ptr125.i, i64 %cond130.i - %70 = load i32, ptr %add.ptr131.i, align 4 + %69 = load i32, ptr %add.ptr131.i, align 4 br label %if.end133.i if.end133.i: ; preds = %if.then119.i, %if.else114.i - %flags.0.i = phi i32 [ %70, %if.then119.i ], [ 0, %if.else114.i ] - %71 = shl i16 %68, 2 - %72 = and i16 %71, 8 - %cond139.i = zext nneg i16 %72 to i64 + %flags.0.i = phi i32 [ %69, %if.then119.i ], [ 0, %if.else114.i ] + %70 = shl i16 %67, 2 + %71 = and i16 %70, 8 + %cond139.i = zext nneg i16 %71 to i64 %add.ptr140.i = getelementptr inbounds i8, ptr %data41.i, i64 %cond139.i - %73 = load i32, ptr %exptime.i, align 4 - %call144.i = call ptr @do_item_alloc(ptr noundef nonnull %add.ptr140.i, i64 noundef %.pre93.i, i32 noundef %flags.0.i, i32 noundef %73, i32 noundef 12) #22 + %72 = load i32, ptr %exptime.i, align 4 + %call144.i = call ptr @do_item_alloc(ptr noundef nonnull %add.ptr140.i, i64 noundef %.pre93.i, i32 noundef %flags.0.i, i32 noundef %72, i32 noundef 12) #22 %tobool145.not.i = icmp eq ptr %call144.i, null br i1 %tobool145.not.i, label %if.else202.i, label %if.then146.i if.then146.i: ; preds = %if.end133.i - %74 = load i16, ptr %it_flags28.i, align 2 - %75 = and i16 %74, -2 + %73 = load i16, ptr %it_flags28.i, align 2 + %74 = and i16 %73, -2 %it_flags151.i = getelementptr inbounds i8, ptr %call144.i, i64 38 - store i16 %75, ptr %it_flags151.i, align 2 + store i16 %74, ptr %it_flags151.i, align 2 %time152.i = getelementptr inbounds i8, ptr %call.i, i64 24 - %76 = load i32, ptr %time152.i, align 8 + %75 = load i32, ptr %time152.i, align 8 %time153.i = getelementptr inbounds i8, ptr %call144.i, i64 24 - store i32 %76, ptr %time153.i, align 8 + store i32 %75, ptr %time153.i, align 8 %nbytes154.i = getelementptr inbounds i8, ptr %call.i, i64 32 - %77 = load i32, ptr %nbytes154.i, align 8 + %76 = load i32, ptr %nbytes154.i, align 8 %nbytes155.i = getelementptr inbounds i8, ptr %call144.i, i64 32 - store i32 %77, ptr %nbytes155.i, align 8 + store i32 %76, ptr %nbytes155.i, align 8 %data156.i = getelementptr inbounds i8, ptr %call144.i, i64 48 %nkey157.i = getelementptr inbounds i8, ptr %call144.i, i64 41 - %78 = load i8, ptr %nkey157.i, align 1 - %idx.ext159.i = zext i8 %78 to i64 + %77 = load i8, ptr %nkey157.i, align 1 + %idx.ext159.i = zext i8 %77 to i64 %add.ptr160.i = getelementptr inbounds i8, ptr %data156.i, i64 %idx.ext159.i %add.ptr161.i = getelementptr inbounds i8, ptr %add.ptr160.i, i64 1 - %conv163.i = zext i16 %75 to i32 + %conv163.i = zext i16 %74 to i32 %and164.i = lshr i32 %conv163.i, 6 - %79 = and i32 %and164.i, 4 - %cond166.i = zext nneg i32 %79 to i64 + %78 = and i32 %and164.i, 4 + %cond166.i = zext nneg i32 %78 to i64 %add.ptr167.i = getelementptr inbounds i8, ptr %add.ptr161.i, i64 %cond166.i %and170.i = shl nuw nsw i32 %conv163.i, 2 - %80 = and i32 %and170.i, 8 - %cond172.i = zext nneg i32 %80 to i64 + %79 = and i32 %and170.i, 8 + %cond172.i = zext nneg i32 %79 to i64 %add.ptr173.i = getelementptr inbounds i8, ptr %add.ptr167.i, i64 %cond172.i - %81 = load i32, ptr %page_version174.i, align 4 - store i32 %81, ptr %add.ptr173.i, align 4 - %82 = load i16, ptr %page_id176.i, align 8 + %80 = load i32, ptr %page_version174.i, align 4 + store i32 %80, ptr %add.ptr173.i, align 4 + %81 = load i16, ptr %page_id176.i, align 8 %page_id177.i = getelementptr inbounds i8, ptr %add.ptr173.i, i64 8 - store i16 %82, ptr %page_id177.i, align 4 - %83 = load i32, ptr %offset178.i, align 4 + store i16 %81, ptr %page_id177.i, align 4 + %82 = load i32, ptr %offset178.i, align 4 %offset179.i = getelementptr inbounds i8, ptr %add.ptr173.i, i64 4 - store i32 %83, ptr %offset179.i, align 4 + store i32 %82, ptr %offset179.i, align 4 %call180.i = call i32 @item_replace(ptr noundef nonnull %call.i, ptr noundef nonnull %call144.i, i32 noundef %43) #22 - %84 = load i16, ptr %it_flags151.i, align 2 - %85 = and i16 %84, 2 - %tobool184.not.i = icmp eq i16 %85, 0 + %83 = load i16, ptr %it_flags151.i, align 2 + %84 = and i16 %83, 2 + %tobool184.not.i = icmp eq i16 %84, 0 br i1 %tobool184.not.i, label %if.end200.i, label %if.then185.i if.then185.i: ; preds = %if.then146.i - %86 = load i8, ptr getelementptr inbounds (i8, ptr @settings, i64 112), align 8 - %tobool186.i = trunc i8 %86 to i1 + %85 = load i8, ptr getelementptr inbounds (i8, ptr @settings, i64 112), align 8 + %tobool186.i = trunc i8 %85 to i1 br i1 %tobool186.i, label %cond.true.i, label %cond.end196.i cond.true.i: ; preds = %if.then185.i - %87 = load i16, ptr %it_flags28.i, align 2 - %88 = and i16 %87, 2 - %tobool191.not.i = icmp eq i16 %88, 0 + %86 = load i16, ptr %it_flags28.i, align 2 + %87 = and i16 %86, 2 + %tobool191.not.i = icmp eq i16 %87, 0 br i1 %tobool191.not.i, label %cond.end196.i, label %cond.true192.i cond.true192.i: ; preds = %cond.true.i - %89 = load i64, ptr %data41.i, align 8 + %88 = load i64, ptr %data41.i, align 8 br label %cond.end196.i cond.end196.i: ; preds = %cond.true192.i, %cond.true.i, %if.then185.i - %cond197.i = phi i64 [ %89, %cond.true192.i ], [ 0, %cond.true.i ], [ 0, %if.then185.i ] + %cond197.i = phi i64 [ %88, %cond.true192.i ], [ 0, %cond.true.i ], [ 0, %if.then185.i ] store i64 %cond197.i, ptr %data156.i, align 8 br label %if.end200.i @@ -2313,21 +2312,21 @@ while.end.i: ; preds = %if.end210.i, %while %offset.1.i = phi i64 [ %offset.0.i, %while.body.i ], [ %add212.i, %if.end210.i ], [ %offset.0.i, %while.cond.i ] call void @STATS_LOCK() #22 %conv217.i = zext i32 %lost.1.i to i64 - %90 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 152), align 8 - %add218.i = add i64 %90, %conv217.i + %89 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 152), align 8 + %add218.i = add i64 %89, %conv217.i store i64 %add218.i, ptr getelementptr inbounds (i8, ptr @stats, i64 152), align 8 %conv219.i = zext i32 %rescues.1.i to i64 - %91 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 160), align 8 - %add220.i = add i64 %91, %conv219.i + %90 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 160), align 8 + %add220.i = add i64 %90, %conv219.i store i64 %add220.i, ptr getelementptr inbounds (i8, ptr @stats, i64 160), align 8 %conv221.i = zext i32 %skipped.1.i to i64 - %92 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 168), align 8 - %add222.i = add i64 %92, %conv221.i + %91 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 168), align 8 + %add222.i = add i64 %91, %conv221.i store i64 %add222.i, ptr getelementptr inbounds (i8, ptr @stats, i64 168), align 8 call void @STATS_UNLOCK() #22 - %93 = load i16, ptr %eflags.i, align 4 - %94 = and i16 %93, 2 - %tobool230.not.i = icmp eq i16 %94, 0 + %92 = load i16, ptr %eflags.i, align 4 + %93 = and i16 %92, 2 + %tobool230.not.i = icmp eq i16 %93, 0 br i1 %tobool230.not.i, label %storage_compact_readback.exit, label %if.then231.i if.then231.i: ; preds = %while.end.i @@ -2336,8 +2335,8 @@ if.then231.i: ; preds = %while.end.i storage_compact_readback.exit: ; preds = %while.end.i, %if.then231.i call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %io.i) - %95 = load i32, ptr getelementptr inbounds (i8, ptr @settings, i64 280), align 8 - %add = add i32 %95, %page_offset.183 + %94 = load i32, ptr getelementptr inbounds (i8, ptr @settings, i64 280), align 8 + %add = add i32 %94, %page_offset.183 store i8 0, ptr %done, align 8 store i8 0, ptr %submitted, align 1 br label %if.end133 @@ -2349,9 +2348,9 @@ if.then112: ; preds = %if.else108 store i8 0, ptr %done, align 8 store i8 0, ptr %submitted, align 1 call void @extstore_close_page(ptr noundef %arg, i32 noundef %page_id.179, i64 noundef %page_version.175) #22 - %96 = load i16, ptr %eflags.i, align 4 - %97 = and i16 %96, 2 - %tobool125.not = icmp eq i16 %97, 0 + %95 = load i16, ptr %eflags.i, align 4 + %96 = and i16 %95, 2 + %tobool125.not = icmp eq i16 %96, 0 br i1 %tobool125.not, label %if.end133, label %if.then126 if.then126: ; preds = %if.then112 @@ -2368,9 +2367,9 @@ if.else136: ; preds = %if.else.i, %land.lh %drop_unread.2.ph90 = phi i1 [ %drop_unread.0, %land.lhs.true ], [ %drop_unread.0, %if.end.i ], [ false, %if.else.i.thread ], [ false, %land.lhs.true76.i ], [ false, %land.lhs.true.i ], [ false, %if.else.i ] %page_size.2.ph89 = phi i64 [ %page_size.0, %land.lhs.true ], [ %page_size.0, %if.end.i ], [ %17, %if.else.i.thread ], [ %22, %land.lhs.true76.i ], [ %22, %land.lhs.true.i ], [ %22, %if.else.i ] call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %st.i) - %98 = load i32, ptr getelementptr inbounds (i8, ptr @settings, i64 292), align 4 - %cmp137 = icmp ult i32 %to_sleep.0, %98 - %add140 = select i1 %cmp137, i32 %98, i32 0 + %97 = load i32, ptr getelementptr inbounds (i8, ptr @settings, i64 292), align 4 + %cmp137 = icmp ult i32 %to_sleep.0, %97 + %add140 = select i1 %cmp137, i32 %97, i32 0 %spec.select = add i32 %add140, %to_sleep.0 br label %while.body } diff --git a/bench/node/optimized/libnode.string_decoder.ll b/bench/node/optimized/libnode.string_decoder.ll index d1749bc3839..528e8eeab1e 100644 --- a/bench/node/optimized/libnode.string_decoder.ll +++ b/bench/node/optimized/libnode.string_decoder.ll @@ -144,8 +144,7 @@ for.body: ; preds = %for.cond.preheader, %i.0133 = phi i64 [ %inc, %for.inc ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds i8, ptr %data, i64 %i.0133 %4 = load i8, ptr %arrayidx, align 1 - %5 = and i8 %4, -64 - %cmp28.not = icmp eq i8 %5, -128 + %cmp28.not = icmp slt i8 %4, -64 br i1 %cmp28.not, label %for.inc, label %if.then29 if.then29: ; preds = %for.body @@ -154,9 +153,9 @@ if.then29: ; preds = %for.body %idx.ext = zext i8 %3 to i64 %add.ptr = getelementptr inbounds i8, ptr %this, i64 %idx.ext tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %add.ptr, ptr nonnull align 1 %data, i64 %i.0133, i1 false) - %6 = load i8, ptr %arrayidx.i52, align 1 - %7 = trunc i64 %i.0133 to i8 - %conv37 = add i8 %6, %7 + %5 = load i8, ptr %arrayidx.i52, align 1 + %6 = trunc i64 %i.0133 to i8 + %conv37 = add i8 %5, %6 store i8 %conv37, ptr %arrayidx.i52, align 1 %sub = sub i64 %0, %i.0133 %.pre = load i8, ptr %arrayidx.i48, align 1 @@ -168,40 +167,40 @@ for.inc: ; preds = %for.body br i1 %exitcond.not, label %if.end40, label %for.body, !llvm.loop !5 if.end40: ; preds = %for.inc, %for.cond.preheader, %if.then29, %do.end20 - %8 = phi i8 [ %conv37, %if.then29 ], [ %3, %do.end20 ], [ %3, %for.cond.preheader ], [ %3, %for.inc ] - %9 = phi i8 [ %.pre, %if.then29 ], [ %2, %do.end20 ], [ %2, %for.cond.preheader ], [ %2, %for.inc ] + %7 = phi i8 [ %conv37, %if.then29 ], [ %3, %do.end20 ], [ %3, %for.cond.preheader ], [ %3, %for.inc ] + %8 = phi i8 [ %.pre, %if.then29 ], [ %2, %do.end20 ], [ %2, %for.cond.preheader ], [ %2, %for.inc ] %nread.1 = phi i64 [ %sub, %if.then29 ], [ %0, %do.end20 ], [ 0, %for.cond.preheader ], [ %0, %for.inc ] %data.addr.1 = phi ptr [ %arrayidx.le, %if.then29 ], [ %data, %do.end20 ], [ %data, %for.cond.preheader ], [ %data, %for.inc ] - %conv42 = zext i8 %9 to i64 + %conv42 = zext i8 %8 to i64 %.sroa.speculated = tail call i64 @llvm.umin.i64(i64 %nread.1, i64 %conv42) - %idx.ext46 = zext i8 %8 to i64 + %idx.ext46 = zext i8 %7 to i64 %add.ptr47 = getelementptr inbounds i8, ptr %this, i64 %idx.ext46 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %add.ptr47, ptr align 1 %data.addr.1, i64 %.sroa.speculated, i1 false) %add.ptr48 = getelementptr inbounds i8, ptr %data.addr.1, i64 %.sroa.speculated %sub49 = sub i64 %nread.1, %.sroa.speculated - %10 = load i8, ptr %arrayidx.i48, align 1 - %11 = trunc nuw i64 %.sroa.speculated to i8 - %conv54 = sub i8 %10, %11 + %9 = load i8, ptr %arrayidx.i48, align 1 + %10 = trunc nuw i64 %.sroa.speculated to i8 + %conv54 = sub i8 %9, %10 store i8 %conv54, ptr %arrayidx.i48, align 1 - %12 = load i8, ptr %arrayidx.i52, align 1 - %conv59 = add i8 %12, %11 + %11 = load i8, ptr %arrayidx.i52, align 1 + %conv59 = add i8 %11, %10 store i8 %conv59, ptr %arrayidx.i52, align 1 - %cmp61 = icmp eq i8 %10, %11 + %cmp61 = icmp eq i8 %9, %10 br i1 %cmp61, label %if.then65, label %if.end85 if.then65: ; preds = %if.end40 %conv69 = zext i8 %conv59 to i64 - %13 = load i8, ptr %arrayidx.i, align 1 - %conv.i70 = zext i8 %13 to i32 + %12 = load i8, ptr %arrayidx.i, align 1 + %conv.i70 = zext i8 %12 to i32 %call71 = tail call fastcc ptr @_ZN4node12_GLOBAL__N_110MakeStringEPN2v87IsolateEPKcmNS_8encodingE(ptr noundef %isolate, ptr noundef nonnull %this, i64 noundef %conv69, i32 noundef %conv.i70) %cmp.i.i = icmp eq ptr %call71, null br i1 %cmp.i.i, label %return, label %if.end78 if.end78: ; preds = %if.then65 - %14 = load i8, ptr %arrayidx.i52, align 1 - %conv80 = zext i8 %14 to i64 - %15 = load i64, ptr %nread_ptr, align 8 - %add81 = add i64 %15, %conv80 + %13 = load i8, ptr %arrayidx.i52, align 1 + %conv80 = zext i8 %13 to i64 + %14 = load i64, ptr %nread_ptr, align 8 + %add81 = add i64 %14, %conv80 store i64 %add81, ptr %nread_ptr, align 8 store i8 0, ptr %arrayidx.i52, align 1 br label %if.end85 @@ -215,15 +214,15 @@ if.end85: ; preds = %if.end40, %if.end78 if.end258.thread: ; preds = %if.end85 %cmp.i330 = icmp eq ptr %prepend.sroa.0.0, null - %16 = ptrtoint ptr %isolate to i64 - %add1.i = add i64 %16, 648 - %17 = inttoptr i64 %add1.i to ptr - %ref.tmp91.sroa.0.0 = select i1 %cmp.i330, ptr %17, ptr %prepend.sroa.0.0 + %15 = ptrtoint ptr %isolate to i64 + %add1.i = add i64 %15, 648 + %16 = inttoptr i64 %add1.i to ptr + %ref.tmp91.sroa.0.0 = select i1 %cmp.i330, ptr %16, ptr %prepend.sroa.0.0 br label %return if.else: ; preds = %if.end85 - %18 = load i8, ptr %arrayidx.i, align 1 - switch i8 %18, label %if.end223 [ + %17 = load i8, ptr %arrayidx.i, align 1 + switch i8 %17, label %if.end223 [ i8 1, label %land.lhs.true i8 3, label %if.then179 i8 2, label %if.then205 @@ -233,8 +232,8 @@ if.else: ; preds = %if.end85 land.lhs.true: ; preds = %if.else %sub100 = add i64 %nread.0, -1 %arrayidx101 = getelementptr inbounds i8, ptr %data.addr.0, i64 %sub100 - %19 = load i8, ptr %arrayidx101, align 1 - %tobool.not = icmp sgt i8 %19, -1 + %18 = load i8, ptr %arrayidx101, align 1 + %tobool.not = icmp sgt i8 %18, -1 br i1 %tobool.not, label %if.end223, label %for.cond107.preheader for.cond107.preheader: ; preds = %land.lhs.true @@ -242,8 +241,8 @@ for.cond107.preheader: ; preds = %land.lhs.true %arrayidx109.promoted = load i8, ptr %arrayidx109, align 1 %inc110135 = add i8 %arrayidx109.promoted, 1 store i8 %inc110135, ptr %arrayidx109, align 1 - %20 = load i8, ptr %arrayidx101, align 1 - %conv112137146 = zext i8 %20 to i32 + %19 = load i8, ptr %arrayidx101, align 1 + %conv112137146 = zext i8 %19 to i32 %and113138 = and i32 %conv112137146, 192 %cmp114139 = icmp eq i32 %and113138, 128 br i1 %cmp114139, label %if.then115, label %if.else126 @@ -253,8 +252,8 @@ for.cond107: ; preds = %if.then115 %inc110 = add nuw nsw i8 %inc110141, 1 store i8 %inc110, ptr %arrayidx109, align 1 %arrayidx111 = getelementptr inbounds i8, ptr %data.addr.0, i64 %dec - %21 = load i8, ptr %arrayidx111, align 1 - %conv112147 = zext i8 %21 to i32 + %20 = load i8, ptr %arrayidx111, align 1 + %conv112147 = zext i8 %20 to i32 %and113 = and i32 %conv112147, 192 %cmp114 = icmp eq i32 %and113, 128 br i1 %cmp114, label %if.then115, label %if.else126, !llvm.loop !7 @@ -293,8 +292,8 @@ if.else150: ; preds = %if.else142 br label %if.end223 if.end155: ; preds = %if.else142, %if.else134, %if.else126 - %22 = phi i8 [ 2, %if.else126 ], [ 3, %if.else134 ], [ 4, %if.else142 ] - %cmp158.not = icmp ult i8 %inc110.lcssa, %22 + %21 = phi i8 [ 2, %if.else126 ], [ 3, %if.else134 ], [ 4, %if.else142 ] + %cmp158.not = icmp ult i8 %inc110.lcssa, %21 br i1 %cmp158.not, label %if.end164, label %if.then159 if.then159: ; preds = %if.end155 @@ -302,9 +301,9 @@ if.then159: ; preds = %if.end155 br label %if.end164 if.end164: ; preds = %if.then159, %if.end155 - %23 = phi i8 [ 0, %if.then159 ], [ %22, %if.end155 ] - %24 = phi i8 [ 0, %if.then159 ], [ %inc110.lcssa, %if.end155 ] - %sub171 = sub nsw i8 %23, %24 + %22 = phi i8 [ 0, %if.then159 ], [ %21, %if.end155 ] + %23 = phi i8 [ 0, %if.then159 ], [ %inc110.lcssa, %if.end155 ] + %sub171 = sub nsw i8 %22, %23 store i8 %sub171, ptr %arrayidx.i48, align 1 br label %if.end223 @@ -322,9 +321,9 @@ if.then181: ; preds = %if.then179 if.else186: ; preds = %if.then179 %sub187 = add i64 %nread.0, -1 %arrayidx188 = getelementptr inbounds i8, ptr %data.addr.0, i64 %sub187 - %25 = load i8, ptr %arrayidx188, align 1 - %26 = and i8 %25, -4 - %cmp191 = icmp eq i8 %26, -40 + %24 = load i8, ptr %arrayidx188, align 1 + %25 = and i8 %24, -4 + %cmp191 = icmp eq i8 %25, -40 br i1 %cmp191, label %if.then192, label %if.end223 if.then192: ; preds = %if.else186 @@ -348,19 +347,19 @@ if.then214: ; preds = %if.then205 if.end223: ; preds = %if.else, %land.lhs.true, %if.else186, %if.then192, %if.then181, %if.then205, %if.then214, %if.then122, %if.else150, %if.end164 %arrayidx.i87 = getelementptr inbounds i8, ptr %this, i64 5 - %27 = load i8, ptr %arrayidx.i87, align 1 - %cmp225.not = icmp eq i8 %27, 0 + %26 = load i8, ptr %arrayidx.i87, align 1 + %cmp225.not = icmp eq i8 %26, 0 br i1 %cmp225.not, label %if.end237, label %if.then226 if.then226: ; preds = %if.end223 - %conv228 = zext i8 %27 to i64 + %conv228 = zext i8 %26 to i64 %sub229 = sub i64 %nread.0, %conv228 - %28 = load i64, ptr %nread_ptr, align 8 - %sub232 = sub i64 %28, %conv228 + %27 = load i64, ptr %nread_ptr, align 8 + %sub232 = sub i64 %27, %conv228 store i64 %sub232, ptr %nread_ptr, align 8 %add.ptr234 = getelementptr inbounds i8, ptr %data.addr.0, i64 %sub229 - %29 = load i8, ptr %arrayidx.i87, align 1 - %conv236 = zext i8 %29 to i64 + %28 = load i8, ptr %arrayidx.i87, align 1 + %conv236 = zext i8 %28 to i64 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %this, ptr align 1 %add.ptr234, i64 %conv236, i1 false) br label %if.end237 @@ -370,20 +369,20 @@ if.end237: ; preds = %if.then226, %if.end br i1 %cmp238.not, label %if.else251, label %if.then239 if.then239: ; preds = %if.end237 - %30 = load i8, ptr %arrayidx.i, align 1 - %conv.i96 = zext i8 %30 to i32 + %29 = load i8, ptr %arrayidx.i, align 1 + %conv.i96 = zext i8 %29 to i32 %call242 = tail call fastcc ptr @_ZN4node12_GLOBAL__N_110MakeStringEPN2v87IsolateEPKcmNS_8encodingE(ptr noundef %isolate, ptr noundef %data.addr.0, i64 noundef %nread.2, i32 noundef %conv.i96) %cmp.i.i369 = icmp eq ptr %call242, null br i1 %cmp.i.i369, label %return, label %if.end258 if.else251: ; preds = %if.end237 - %31 = ptrtoint ptr %isolate to i64 - %add1.i379 = add i64 %31, 648 - %32 = inttoptr i64 %add1.i379 to ptr + %30 = ptrtoint ptr %isolate to i64 + %add1.i379 = add i64 %30, 648 + %31 = inttoptr i64 %add1.i379 to ptr br label %if.end258 if.end258: ; preds = %if.else251, %if.then239 - %body.sroa.0.0 = phi ptr [ %call242, %if.then239 ], [ %32, %if.else251 ] + %body.sroa.0.0 = phi ptr [ %call242, %if.then239 ], [ %31, %if.else251 ] %cmp.i = icmp eq ptr %prepend.sroa.0.0, null br i1 %cmp.i, label %return, label %if.else264 diff --git a/bench/node/optimized/simdutf.ll b/bench/node/optimized/simdutf.ll index 2ab2234218f..cc27e8072c1 100644 --- a/bench/node/optimized/simdutf.ll +++ b/bench/node/optimized/simdutf.ll @@ -3064,10 +3064,9 @@ if.then17.i: ; preds = %while.end.i if.end21.i: ; preds = %if.then17.i %arrayidx23.i = getelementptr i8, ptr %byte.0.in.i.le, i64 1 %0 = load i8, ptr %arrayidx23.i, align 1 - %1 = and i8 %0, -64 - %cmp26.not.i = icmp ne i8 %1, -128 - %2 = and i32 %conv.le.i, 30 - %cmp36.i = icmp eq i32 %2, 0 + %cmp26.not.i = icmp sgt i8 %0, -65 + %1 = and i32 %conv.le.i, 30 + %cmp36.i = icmp eq i32 %1, 0 %or.cond.i = or i1 %cmp36.i, %cmp26.not.i br i1 %or.cond.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit, label %while.cond.backedge.i @@ -3083,17 +3082,16 @@ if.then43.i: ; preds = %if.else.i if.end47.i: ; preds = %if.then43.i %arrayidx49.i = getelementptr i8, ptr %byte.0.in.i.le, i64 1 - %3 = load i8, ptr %arrayidx49.i, align 1 - %conv50.i = zext i8 %3 to i32 + %2 = load i8, ptr %arrayidx49.i, align 1 + %conv50.i = zext i8 %2 to i32 %and51.i = and i32 %conv50.i, 192 %cmp52.not.i = icmp eq i32 %and51.i, 128 br i1 %cmp52.not.i, label %if.end54.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit if.end54.i: ; preds = %if.end47.i %arrayidx56.i = getelementptr i8, ptr %byte.0.in.i.le, i64 2 - %4 = load i8, ptr %arrayidx56.i, align 1 - %5 = and i8 %4, -64 - %cmp59.not.i = icmp eq i8 %5, -128 + %3 = load i8, ptr %arrayidx56.i, align 1 + %cmp59.not.i = icmp slt i8 %3, -64 br i1 %cmp59.not.i, label %if.end61.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit if.end61.i: ; preds = %if.end54.i @@ -3123,24 +3121,22 @@ if.then88.i: ; preds = %if.else84.i if.end92.i: ; preds = %if.then88.i %arrayidx94.i = getelementptr i8, ptr %byte.0.in.i.le, i64 1 - %6 = load i8, ptr %arrayidx94.i, align 1 - %conv95.i = zext i8 %6 to i32 + %4 = load i8, ptr %arrayidx94.i, align 1 + %conv95.i = zext i8 %4 to i32 %and96.i = and i32 %conv95.i, 192 %cmp97.not.i = icmp eq i32 %and96.i, 128 br i1 %cmp97.not.i, label %if.end99.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit if.end99.i: ; preds = %if.end92.i %arrayidx101.i = getelementptr i8, ptr %byte.0.in.i.le, i64 2 - %7 = load i8, ptr %arrayidx101.i, align 1 - %8 = and i8 %7, -64 - %cmp104.not.i = icmp eq i8 %8, -128 + %5 = load i8, ptr %arrayidx101.i, align 1 + %cmp104.not.i = icmp slt i8 %5, -64 br i1 %cmp104.not.i, label %if.end106.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit if.end106.i: ; preds = %if.end99.i %arrayidx108.i = getelementptr i8, ptr %byte.0.in.i.le, i64 3 - %9 = load i8, ptr %arrayidx108.i, align 1 - %10 = and i8 %9, -64 - %cmp111.not.i = icmp eq i8 %10, -128 + %6 = load i8, ptr %arrayidx108.i, align 1 + %cmp111.not.i = icmp slt i8 %6, -64 br i1 %cmp111.not.i, label %if.end113.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit if.end113.i: ; preds = %if.end106.i @@ -3149,8 +3145,8 @@ if.end113.i: ; preds = %if.end106.i %and120.i = shl nuw nsw i32 %conv95.i, 12 %shl121.i = and i32 %and120.i, 196608 %or122.i = add nsw i32 %shl116.i, -1114112 - %11 = add nsw i32 %or122.i, %shl121.i - %or.cond3.i = icmp ult i32 %11, -1048576 + %7 = add nsw i32 %or122.i, %shl121.i + %or.cond3.i = icmp ult i32 %7, -1048576 br i1 %or.cond3.i, label %_ZN7simdutf6scalar12_GLOBAL__N_14utf88validateEPKcm.exit, label %while.cond.backedge.i while.cond.backedge.i: ; preds = %if.end113.i, %lor.lhs.false79.i, %if.end21.i, %if.then.i @@ -3289,13 +3285,12 @@ if.then17: ; preds = %while.end if.end21: ; preds = %if.then17 %arrayidx23 = getelementptr i8, ptr %byte.0.in.le, i64 1 %0 = load i8, ptr %arrayidx23, align 1 - %1 = and i8 %0, -64 - %cmp26.not = icmp eq i8 %1, -128 + %cmp26.not = icmp slt i8 %0, -64 br i1 %cmp26.not, label %if.end28, label %return if.end28: ; preds = %if.end21 - %2 = and i32 %conv.le, 30 - %cmp36 = icmp eq i32 %2, 0 + %1 = and i32 %conv.le, 30 + %cmp36 = icmp eq i32 %1, 0 br i1 %cmp36, label %return, label %while.cond.backedge if.else: ; preds = %while.end @@ -3310,17 +3305,16 @@ if.then43: ; preds = %if.else if.end47: ; preds = %if.then43 %arrayidx49 = getelementptr i8, ptr %byte.0.in.le, i64 1 - %3 = load i8, ptr %arrayidx49, align 1 - %conv50 = zext i8 %3 to i32 + %2 = load i8, ptr %arrayidx49, align 1 + %conv50 = zext i8 %2 to i32 %and51 = and i32 %conv50, 192 %cmp52.not = icmp eq i32 %and51, 128 br i1 %cmp52.not, label %if.end54, label %return if.end54: ; preds = %if.end47 %arrayidx56 = getelementptr i8, ptr %byte.0.in.le, i64 2 - %4 = load i8, ptr %arrayidx56, align 1 - %5 = and i8 %4, -64 - %cmp59.not = icmp eq i8 %5, -128 + %3 = load i8, ptr %arrayidx56, align 1 + %cmp59.not = icmp slt i8 %3, -64 br i1 %cmp59.not, label %if.end61, label %return if.end61: ; preds = %if.end54 @@ -3350,24 +3344,22 @@ if.then89: ; preds = %if.else85 if.end93: ; preds = %if.then89 %arrayidx95 = getelementptr i8, ptr %byte.0.in.le, i64 1 - %6 = load i8, ptr %arrayidx95, align 1 - %conv96 = zext i8 %6 to i32 + %4 = load i8, ptr %arrayidx95, align 1 + %conv96 = zext i8 %4 to i32 %and97 = and i32 %conv96, 192 %cmp98.not = icmp eq i32 %and97, 128 br i1 %cmp98.not, label %if.end100, label %return if.end100: ; preds = %if.end93 %arrayidx102 = getelementptr i8, ptr %byte.0.in.le, i64 2 - %7 = load i8, ptr %arrayidx102, align 1 - %8 = and i8 %7, -64 - %cmp105.not = icmp eq i8 %8, -128 + %5 = load i8, ptr %arrayidx102, align 1 + %cmp105.not = icmp slt i8 %5, -64 br i1 %cmp105.not, label %if.end107, label %return if.end107: ; preds = %if.end100 %arrayidx109 = getelementptr i8, ptr %byte.0.in.le, i64 3 - %9 = load i8, ptr %arrayidx109, align 1 - %10 = and i8 %9, -64 - %cmp112.not = icmp eq i8 %10, -128 + %6 = load i8, ptr %arrayidx109, align 1 + %cmp112.not = icmp slt i8 %6, -64 br i1 %cmp112.not, label %if.end114, label %return if.end114: ; preds = %if.end107 @@ -3899,10 +3891,9 @@ if.then19.i: ; preds = %if.else.i if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %buf, i64 %add20.i %3 = load i8, ptr %arrayidx25.i, align 1 - %4 = and i8 %3, -64 - %cmp28.not.i = icmp eq i8 %4, -128 - %5 = and i32 %conv.i, 30 - %or.cond.not.i = icmp eq i32 %5, 2 + %cmp28.not.i = icmp slt i8 %3, -64 + %4 = and i32 %conv.i, 30 + %or.cond.not.i = icmp eq i32 %4, 2 %or.cond.i = and i1 %or.cond.not.i, %cmp28.not.i br i1 %or.cond.i, label %if.end41.i, label %_ZN7simdutf6scalar12_GLOBAL__N_114utf8_to_latin17convertEPKcmPc.exit @@ -4125,8 +4116,7 @@ if.then19.i: ; preds = %if.else.i if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %buf, i64 %add20.i %4 = load i8, ptr %arrayidx25.i, align 1 - %5 = and i8 %4, -64 - %cmp28.not.i = icmp eq i8 %5, -128 + %cmp28.not.i = icmp slt i8 %4, -64 br i1 %cmp28.not.i, label %if.end30.i, label %_ZN7simdutf6scalar12_GLOBAL__N_114utf8_to_latin113convert_validEPKcmPc.exit if.end30.i: ; preds = %if.end23.i @@ -10187,8 +10177,7 @@ return: ; preds = %return.sink.split, define internal fastcc { i32, i64 } @_ZN7simdutf6scalar12_GLOBAL__N_14utf831rewind_and_validate_with_errorsEPKcS4_m(ptr nocapture noundef readonly %start, ptr nocapture noundef readonly %buf, i64 noundef %len) unnamed_addr #1 { entry: %0 = load i8, ptr %start, align 1 - %1 = and i8 %0, -64 - %cmp = icmp eq i8 %1, -128 + %cmp = icmp slt i8 %0, -64 br i1 %cmp, label %return, label %for.body.preheader for.body.preheader: ; preds = %entry @@ -10198,9 +10187,8 @@ for.body.preheader: ; preds = %entry for.body: ; preds = %for.body.preheader, %if.else %buf.addr.09 = phi ptr [ %incdec.ptr, %if.else ], [ %buf, %for.body.preheader ] %extra_len.07 = phi i64 [ %inc, %if.else ], [ 0, %for.body.preheader ] - %2 = load i8, ptr %buf.addr.09, align 1 - %3 = and i8 %2, -64 - %cmp4.not = icmp eq i8 %3, -128 + %1 = load i8, ptr %buf.addr.09, align 1 + %cmp4.not = icmp slt i8 %1, -64 br i1 %cmp4.not, label %if.else, label %for.end if.else: ; preds = %for.body @@ -10214,14 +10202,14 @@ for.end: ; preds = %for.body, %if.else %buf.addr.0.lcssa = phi ptr [ %buf.addr.09, %for.body ], [ %scevgep, %if.else ] %add = add i64 %extra_len.0.lcssa, %len %call = tail call fastcc { i32, i64 } @_ZN7simdutf6scalar12_GLOBAL__N_14utf820validate_with_errorsEPKcm(ptr noundef nonnull %buf.addr.0.lcssa, i64 noundef %add) #51 - %4 = extractvalue { i32, i64 } %call, 0 - %5 = extractvalue { i32, i64 } %call, 1 - %sub = sub i64 %5, %extra_len.0.lcssa + %2 = extractvalue { i32, i64 } %call, 0 + %3 = extractvalue { i32, i64 } %call, 1 + %sub = sub i64 %3, %extra_len.0.lcssa br label %return return: ; preds = %entry, %for.end %retval.sroa.3.0 = phi i64 [ %sub, %for.end ], [ 0, %entry ] - %retval.sroa.0.0 = phi i32 [ %4, %for.end ], [ 3, %entry ] + %retval.sroa.0.0 = phi i32 [ %2, %for.end ], [ 3, %entry ] %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %retval.sroa.0.0, 0 %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %retval.sroa.3.0, 1 ret { i32, i64 } %.fca.1.insert @@ -14729,8 +14717,7 @@ _ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE0 land.rhs: ; preds = %_ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE0EDsEESt4pairIPKcPT0_ES6_mS8_.exit, %while.body %ret.sroa.0.019 = phi ptr [ %add.ptr7, %while.body ], [ %ptr.1.i, %_ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE0EDsEESt4pairIPKcPT0_ES6_mS8_.exit ] %380 = load i8, ptr %ret.sroa.0.019, align 1 - %381 = and i8 %380, -64 - %cmp5 = icmp eq i8 %381, -128 + %cmp5 = icmp slt i8 %380, -64 br i1 %cmp5, label %while.body, label %if.then10 while.body: ; preds = %land.rhs @@ -15550,8 +15537,7 @@ _ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE1 land.rhs: ; preds = %_ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE1EDsEESt4pairIPKcPT0_ES6_mS8_.exit, %while.body %ret.sroa.0.019 = phi ptr [ %add.ptr7, %while.body ], [ %ptr.1.i, %_ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE1EDsEESt4pairIPKcPT0_ES6_mS8_.exit ] %442 = load i8, ptr %ret.sroa.0.019, align 1 - %443 = and i8 %442, -64 - %cmp5 = icmp eq i8 %443, -128 + %cmp5 = icmp slt i8 %442, -64 br i1 %cmp5, label %while.body, label %if.then10 while.body: ; preds = %land.rhs @@ -16149,8 +16135,7 @@ if.end: ; preds = %_ZN7simdutf7icelake land.rhs: ; preds = %if.end, %while.body %ret.sroa.0.035 = phi ptr [ %add.ptr11, %while.body ], [ %ptr.1.i, %if.end ] %319 = load i8, ptr %ret.sroa.0.035, align 1 - %320 = and i8 %319, -64 - %cmp9 = icmp eq i8 %320, -128 + %cmp9 = icmp slt i8 %319, -64 br i1 %cmp9, label %while.body, label %if.then14 while.body: ; preds = %land.rhs @@ -16775,8 +16760,7 @@ if.end: ; preds = %_ZN7simdutf7icelake land.rhs: ; preds = %if.end, %while.body %ret.sroa.12.074 = phi ptr [ %add.ptr24, %while.body ], [ %ptr.1.i, %if.end ] %327 = load i8, ptr %ret.sroa.12.074, align 1 - %328 = and i8 %327, -64 - %cmp22 = icmp eq i8 %328, -128 + %cmp22 = icmp slt i8 %327, -64 br i1 %cmp22, label %while.body, label %if.then27 while.body: ; preds = %land.rhs @@ -16791,23 +16775,23 @@ if.then27: ; preds = %land.rhs %sub33 = sub i64 %sub.ptr.sub32.neg, %sub.ptr.lhs.cast30 %add.ptr34 = getelementptr inbounds i8, ptr %utf32, i64 %sub.ptr.sub15 %call35 = tail call fastcc { i32, i64 } @_ZN7simdutf6scalar12_GLOBAL__N_113utf8_to_utf3219convert_with_errorsEPKcmPDi(ptr noundef nonnull %ret.sroa.12.074, i64 noundef %sub33, ptr noundef %add.ptr34) - %329 = extractvalue { i32, i64 } %call35, 0 - %330 = extractvalue { i32, i64 } %call35, 1 - %cmp36.not = icmp eq i32 %329, 0 + %328 = extractvalue { i32, i64 } %call35, 0 + %329 = extractvalue { i32, i64 } %call35, 1 + %cmp36.not = icmp eq i32 %328, 0 br i1 %cmp36.not, label %if.else, label %if.then37 if.then37: ; preds = %if.then27 %sub.ptr.sub41 = sub i64 %sub.ptr.lhs.cast30, %sub.ptr.rhs.cast31 - %add43 = add i64 %sub.ptr.sub41, %330 + %add43 = add i64 %sub.ptr.sub41, %329 br label %return if.else: ; preds = %if.then27 - %add45 = add i64 %330, %sub.ptr.div + %add45 = add i64 %329, %sub.ptr.div br label %return return: ; preds = %while.body, %if.end, %if.then37, %if.else, %if.then %retval.sroa.6.0 = phi i64 [ %add43, %if.then37 ], [ %add45, %if.else ], [ %add, %if.then ], [ %sub.ptr.div, %if.end ], [ %sub.ptr.div, %while.body ] - %retval.sroa.0.0 = phi i32 [ %329, %if.then37 ], [ 0, %if.else ], [ %325, %if.then ], [ 0, %if.end ], [ 0, %while.body ] + %retval.sroa.0.0 = phi i32 [ %328, %if.then37 ], [ 0, %if.else ], [ %325, %if.then ], [ 0, %if.end ], [ 0, %while.body ] %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %retval.sroa.0.0, 0 %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %retval.sroa.6.0, 1 ret { i32, i64 } %.fca.1.insert @@ -16824,9 +16808,8 @@ for.body: ; preds = %entry, %for.inc %sub = sub nsw i64 0, %i.022 %arrayidx = getelementptr inbounds i8, ptr %buf, i64 %sub %0 = load i8, ptr %arrayidx, align 1 - %1 = and i8 %0, -64 - %cmp2.not = icmp eq i8 %1, -128 - br i1 %cmp2.not, label %for.inc, label %if.end8 + %cmp2 = icmp sgt i8 %0, -65 + br i1 %cmp2, label %if.end8, label %for.inc for.inc: ; preds = %for.body %inc = add nuw nsw i64 %i.022, 1 @@ -16841,16 +16824,16 @@ if.end8: ; preds = %for.body %arrayidx.le = getelementptr inbounds i8, ptr %buf, i64 %sub %add = add i64 %i.022, %len %call = tail call fastcc { i32, i64 } @_ZN7simdutf6scalar12_GLOBAL__N_113utf8_to_utf3219convert_with_errorsEPKcmPDi(ptr noundef nonnull %arrayidx.le, i64 noundef %add, ptr noundef %utf32_output) - %2 = extractvalue { i32, i64 } %call, 0 - %3 = extractvalue { i32, i64 } %call, 1 - %tobool9.not = icmp eq i32 %2, 0 + %1 = extractvalue { i32, i64 } %call, 0 + %2 = extractvalue { i32, i64 } %call, 1 + %tobool9.not = icmp eq i32 %1, 0 %sub11 = select i1 %tobool9.not, i64 0, i64 %i.022 - %spec.select14 = sub i64 %3, %sub11 + %spec.select14 = sub i64 %2, %sub11 br label %return return: ; preds = %if.end8, %if.then6 %retval.sroa.4.0 = phi i64 [ %sub7, %if.then6 ], [ %spec.select14, %if.end8 ] - %retval.sroa.0.0 = phi i32 [ 3, %if.then6 ], [ %2, %if.end8 ] + %retval.sroa.0.0 = phi i32 [ 3, %if.then6 ], [ %1, %if.end8 ] %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %retval.sroa.0.0, 0 %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %retval.sroa.4.0, 1 ret { i32, i64 } %.fca.1.insert @@ -17268,8 +17251,7 @@ _ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE0 land.rhs: ; preds = %_ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE0EjEESt4pairIPKcPT0_ES6_mS8_.exit, %while.body %ret.sroa.0.020 = phi ptr [ %add.ptr7, %while.body ], [ %ptr.1.i, %_ZN7simdutf7icelake12_GLOBAL__N_126valid_utf8_to_fixed_lengthILNS_10endiannessE0EjEESt4pairIPKcPT0_ES6_mS8_.exit ] %232 = load i8, ptr %ret.sroa.0.020, align 1 - %233 = and i8 %232, -64 - %cmp5 = icmp eq i8 %233, -128 + %cmp5 = icmp slt i8 %232, -64 br i1 %cmp5, label %while.body, label %if.then10 while.body: ; preds = %land.rhs @@ -26648,10 +26630,9 @@ if.then19.i: ; preds = %if.else.i414 if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %add.ptr36.i, i64 %add20.i %56 = load i8, ptr %arrayidx25.i, align 1 - %57 = and i8 %56, -64 - %cmp28.not.i = icmp eq i8 %57, -128 - %58 = and i32 %conv.i413, 30 - %or.cond.not.i = icmp eq i32 %58, 2 + %cmp28.not.i = icmp slt i8 %56, -64 + %57 = and i32 %conv.i413, 30 + %or.cond.not.i = icmp eq i32 %57, 2 %or.cond.i = and i1 %or.cond.not.i, %cmp28.not.i br i1 %or.cond.i, label %if.end41.i416, label %_ZN7simdutf7haswell12_GLOBAL__N_114utf8_to_latin121validating_transcoder7convertEPKcmPc.exit @@ -27144,10 +27125,9 @@ if.then19.i: ; preds = %if.else.i74 if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %add.ptr24.i, i64 %add20.i %27 = load i8, ptr %arrayidx25.i, align 1 - %28 = and i8 %27, -64 - %cmp28.not.i = icmp eq i8 %28, -128 - %29 = and i32 %conv.i73, 30 - %or.cond.not.i = icmp eq i32 %29, 2 + %cmp28.not.i = icmp slt i8 %27, -64 + %28 = and i32 %conv.i73, 30 + %or.cond.not.i = icmp eq i32 %28, 2 %or.cond.i = and i1 %or.cond.not.i, %cmp28.not.i br i1 %or.cond.i, label %if.end41.i, label %_ZN7simdutf7haswell12_GLOBAL__N_114utf8_to_latin113convert_validEPKcmPc.exit @@ -39975,10 +39955,9 @@ if.then19.i: ; preds = %if.else.i289 if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %add.ptr114.i, i64 %add20.i %87 = load i8, ptr %arrayidx25.i, align 1 - %88 = and i8 %87, -64 - %cmp28.not.i = icmp eq i8 %88, -128 - %89 = and i32 %conv.i288, 30 - %or.cond.not.i = icmp eq i32 %89, 2 + %cmp28.not.i = icmp slt i8 %87, -64 + %88 = and i32 %conv.i288, 30 + %or.cond.not.i = icmp eq i32 %88, 2 %or.cond.i = and i1 %or.cond.not.i, %cmp28.not.i br i1 %or.cond.i, label %if.end41.i, label %_ZN7simdutf8westmere12_GLOBAL__N_114utf8_to_latin121validating_transcoder7convertEPKcmPc.exit @@ -40543,10 +40522,9 @@ if.then19.i: ; preds = %if.else.i67 if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %add.ptr24.i, i64 %add20.i %34 = load i8, ptr %arrayidx25.i, align 1 - %35 = and i8 %34, -64 - %cmp28.not.i = icmp eq i8 %35, -128 - %36 = and i32 %conv.i66, 30 - %or.cond.not.i = icmp eq i32 %36, 2 + %cmp28.not.i = icmp slt i8 %34, -64 + %35 = and i32 %conv.i66, 30 + %or.cond.not.i = icmp eq i32 %35, 2 %or.cond.i = and i1 %or.cond.not.i, %cmp28.not.i br i1 %or.cond.i, label %if.end41.i, label %_ZN7simdutf8westmere12_GLOBAL__N_114utf8_to_latin113convert_validEPKcmPc.exit @@ -53060,9 +53038,8 @@ for.body: ; preds = %entry, %for.inc %sub = sub i64 0, %i.031 %arrayidx = getelementptr inbounds i8, ptr %buf, i64 %sub %0 = load i8, ptr %arrayidx, align 1 - %1 = and i8 %0, -64 - %cmp1.not = icmp eq i8 %1, -128 - br i1 %cmp1.not, label %for.inc, label %if.end5 + %cmp1 = icmp sgt i8 %0, -65 + br i1 %cmp1, label %if.end5, label %for.inc for.inc: ; preds = %for.body %inc = add i64 %i.031, 1 @@ -53098,7 +53075,7 @@ if.then.i: ; preds = %while.body.i %or.i = or i64 %v2.0.copyload.i, %v1.0.copyload.i %and.i = and i64 %or.i, -9187201950435737472 %cmp4.i = icmp eq i64 %and.i, 0 - %2 = trunc i64 %v1.0.copyload.i to i8 + %1 = trunc i64 %v1.0.copyload.i to i8 br i1 %cmp4.i, label %while.cond7.preheader.i, label %if.end10.i while.cond7.preheader.i: ; preds = %if.then.i @@ -53109,17 +53086,17 @@ while.body9.i: ; preds = %while.cond7.prehead %latin_output.addr.148.i = phi ptr [ %incdec.ptr.i, %while.body9.i ], [ %latin_output.addr.053.i, %while.cond7.preheader.i ] %pos.147.i = phi i64 [ %inc.i, %while.body9.i ], [ %pos.052.i, %while.cond7.preheader.i ] %arrayidx.i = getelementptr inbounds i8, ptr %arrayidx.le, i64 %pos.147.i - %3 = load i8, ptr %arrayidx.i, align 1 + %2 = load i8, ptr %arrayidx.i, align 1 %incdec.ptr.i = getelementptr inbounds i8, ptr %latin_output.addr.148.i, i64 1 - store i8 %3, ptr %latin_output.addr.148.i, align 1 + store i8 %2, ptr %latin_output.addr.148.i, align 1 %inc.i = add nuw i64 %pos.147.i, 1 %exitcond.not.i = icmp eq i64 %inc.i, %add.i br i1 %exitcond.not.i, label %while.cond.backedge.i, label %while.body9.i, !llvm.loop !32 if.end10.i: ; preds = %if.then.i, %while.body.if.end10_crit_edge.i - %4 = phi i8 [ %.pre.i, %while.body.if.end10_crit_edge.i ], [ %2, %if.then.i ] - %conv.i = zext i8 %4 to i32 - %cmp12.i = icmp sgt i8 %4, -1 + %3 = phi i8 [ %.pre.i, %while.body.if.end10_crit_edge.i ], [ %1, %if.then.i ] + %conv.i = zext i8 %3 to i32 + %cmp12.i = icmp sgt i8 %3, -1 br i1 %cmp12.i, label %if.end64.i, label %if.else.i if.else.i: ; preds = %if.end10.i @@ -53134,8 +53111,8 @@ if.then19.i: ; preds = %if.else.i if.end23.i: ; preds = %if.then19.i %arrayidx25.i = getelementptr inbounds i8, ptr %arrayidx.le, i64 %add20.i - %5 = load i8, ptr %arrayidx25.i, align 1 - %conv26.i = zext i8 %5 to i32 + %4 = load i8, ptr %arrayidx25.i, align 1 + %conv26.i = zext i8 %4 to i32 %and27.i = and i32 %conv26.i, 192 %cmp28.not.i = icmp eq i32 %and27.i, 128 br i1 %cmp28.not.i, label %if.end30.i, label %_ZN7simdutf6scalar12_GLOBAL__N_114utf8_to_latin119convert_with_errorsEPKcmPc.exit.thread @@ -53171,7 +53148,7 @@ if.else57.i: ; preds = %if.else47.i br label %_ZN7simdutf6scalar12_GLOBAL__N_114utf8_to_latin119convert_with_errorsEPKcmPc.exit.thread if.end64.i: ; preds = %if.end43.i, %if.end10.i - %conv44.sink.i = phi i8 [ %conv44.i, %if.end43.i ], [ %4, %if.end10.i ] + %conv44.sink.i = phi i8 [ %conv44.i, %if.end43.i ], [ %3, %if.end10.i ] %.sink.i = phi i64 [ 2, %if.end43.i ], [ 1, %if.end10.i ] store i8 %conv44.sink.i, ptr %latin_output.addr.053.i, align 1 %add46.i = add i64 %.sink.i, %pos.052.i @@ -53321,9 +53298,8 @@ for.body: ; preds = %entry, %for.inc %sub = sub i64 0, %i.019 %arrayidx = getelementptr inbounds i8, ptr %buf, i64 %sub %0 = load i8, ptr %arrayidx, align 1 - %1 = and i8 %0, -64 - %cmp1.not = icmp eq i8 %1, -128 - br i1 %cmp1.not, label %for.inc, label %if.end5 + %cmp1 = icmp sgt i8 %0, -65 + br i1 %cmp1, label %if.end5, label %for.inc for.inc: ; preds = %for.body %inc = add i64 %i.019, 1 @@ -53338,16 +53314,16 @@ if.end5: ; preds = %for.body %arrayidx.le = getelementptr inbounds i8, ptr %buf, i64 %sub %add = add i64 %i.019, %len %call = tail call fastcc { i32, i64 } @_ZN7simdutf6scalar12_GLOBAL__N_113utf8_to_utf1619convert_with_errorsILNS_10endiannessE0EEENS_6resultEPKcmPDs(ptr noundef nonnull %arrayidx.le, i64 noundef %add, ptr noundef %utf16_output) - %2 = extractvalue { i32, i64 } %call, 0 - %3 = extractvalue { i32, i64 } %call, 1 - %tobool6.not = icmp eq i32 %2, 0 + %1 = extractvalue { i32, i64 } %call, 0 + %2 = extractvalue { i32, i64 } %call, 1 + %tobool6.not = icmp eq i32 %1, 0 %sub8 = select i1 %tobool6.not, i64 0, i64 %i.019 - %spec.select = sub i64 %3, %sub8 + %spec.select = sub i64 %2, %sub8 br label %return return: ; preds = %if.end5, %if.then3 %retval.sroa.4.0 = phi i64 [ %sub4, %if.then3 ], [ %spec.select, %if.end5 ] - %retval.sroa.0.0 = phi i32 [ 3, %if.then3 ], [ %2, %if.end5 ] + %retval.sroa.0.0 = phi i32 [ 3, %if.then3 ], [ %1, %if.end5 ] %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %retval.sroa.0.0, 0 %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %retval.sroa.4.0, 1 ret { i32, i64 } %.fca.1.insert @@ -53363,9 +53339,8 @@ for.body: ; preds = %entry, %for.inc %sub = sub i64 0, %i.019 %arrayidx = getelementptr inbounds i8, ptr %buf, i64 %sub %0 = load i8, ptr %arrayidx, align 1 - %1 = and i8 %0, -64 - %cmp1.not = icmp eq i8 %1, -128 - br i1 %cmp1.not, label %for.inc, label %if.end5 + %cmp1 = icmp sgt i8 %0, -65 + br i1 %cmp1, label %if.end5, label %for.inc for.inc: ; preds = %for.body %inc = add i64 %i.019, 1 @@ -53380,16 +53355,16 @@ if.end5: ; preds = %for.body %arrayidx.le = getelementptr inbounds i8, ptr %buf, i64 %sub %add = add i64 %i.019, %len %call = tail call fastcc { i32, i64 } @_ZN7simdutf6scalar12_GLOBAL__N_113utf8_to_utf1619convert_with_errorsILNS_10endiannessE1EEENS_6resultEPKcmPDs(ptr noundef nonnull %arrayidx.le, i64 noundef %add, ptr noundef %utf16_output) - %2 = extractvalue { i32, i64 } %call, 0 - %3 = extractvalue { i32, i64 } %call, 1 - %tobool6.not = icmp eq i32 %2, 0 + %1 = extractvalue { i32, i64 } %call, 0 + %2 = extractvalue { i32, i64 } %call, 1 + %tobool6.not = icmp eq i32 %1, 0 %sub8 = select i1 %tobool6.not, i64 0, i64 %i.019 - %spec.select = sub i64 %3, %sub8 + %spec.select = sub i64 %2, %sub8 br label %return return: ; preds = %if.end5, %if.then3 %retval.sroa.4.0 = phi i64 [ %sub4, %if.then3 ], [ %spec.select, %if.end5 ] - %retval.sroa.0.0 = phi i32 [ 3, %if.then3 ], [ %2, %if.end5 ] + %retval.sroa.0.0 = phi i32 [ 3, %if.then3 ], [ %1, %if.end5 ] %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %retval.sroa.0.0, 0 %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %retval.sroa.4.0, 1 ret { i32, i64 } %.fca.1.insert diff --git a/bench/nuttx/optimized/lib_mbrtowc.c.ll b/bench/nuttx/optimized/lib_mbrtowc.c.ll index a9b14ccffa2..fd57084eff3 100644 --- a/bench/nuttx/optimized/lib_mbrtowc.c.ll +++ b/bench/nuttx/optimized/lib_mbrtowc.c.ll @@ -18,12 +18,12 @@ define i64 @mbrtowc(ptr noundef writeonly %0, ptr noundef readonly %1, i64 nound 8: ; preds = %4 %.not49 = icmp eq i32 %6, 0 - br i1 %.not49, label %52, label %.loopexit60 + br i1 %.not49, label %51, label %.loopexit60 9: ; preds = %4 %10 = icmp eq ptr %0, null %11 = icmp eq i64 %2, 0 - br i1 %11, label %52, label %12 + br i1 %11, label %51, label %12 12: ; preds = %9 %13 = icmp eq i32 %6, 0 @@ -45,7 +45,7 @@ define i64 @mbrtowc(ptr noundef writeonly %0, ptr noundef readonly %1, i64 nound .cont50: ; preds = %18, %.else52 %19 = icmp ne i8 %15, 0 %20 = zext i1 %19 to i64 - br label %52 + br label %51 21: ; preds = %14 %22 = add nsw i32 %16, -194 @@ -99,7 +99,7 @@ define i64 @mbrtowc(ptr noundef writeonly %0, ptr noundef readonly %1, i64 nound .cont: ; preds = %45, %.else %46 = sub i64 %2, %43 - br label %52 + br label %51 47: ; preds = %.preheader %.not47 = icmp eq i64 %43, 0 @@ -107,22 +107,21 @@ define i64 @mbrtowc(ptr noundef writeonly %0, ptr noundef readonly %1, i64 nound 48: ; preds = %47 %49 = load i8, ptr %39, align 1 - %50 = and i8 %49, -64 - %.not48 = icmp eq i8 %50, -128 + %.not48 = icmp slt i8 %49, -64 br i1 %.not48, label %.preheader, label %.loopexit60 .loopexit: ; preds = %47, %24 %.1 = phi i32 [ %28, %24 ], [ %42, %47 ] store i32 %.1, ptr %spec.store.select, align 4 - br label %52 + br label %51 .loopexit60: ; preds = %48, %.thread, %21, %8 store i32 0, ptr %spec.store.select, align 4 - %51 = tail call ptr @__errno() #2 - store i32 84, ptr %51, align 4 - br label %52 + %50 = tail call ptr @__errno() #2 + store i32 84, ptr %50, align 4 + br label %51 -52: ; preds = %9, %8, %.loopexit60, %.loopexit, %.cont, %.cont50 +51: ; preds = %9, %8, %.loopexit60, %.loopexit, %.cont, %.cont50 %.034 = phi i64 [ -1, %.loopexit60 ], [ %20, %.cont50 ], [ %46, %.cont ], [ -2, %.loopexit ], [ 0, %8 ], [ -2, %9 ] ret i64 %.034 } diff --git a/bench/opencv/optimized/stringutils.cpp.ll b/bench/opencv/optimized/stringutils.cpp.ll index 862ec7d5267..1858b0c69a7 100644 --- a/bench/opencv/optimized/stringutils.cpp.ll +++ b/bench/opencv/optimized/stringutils.cpp.ll @@ -1158,8 +1158,7 @@ define hidden noundef range(i32 -1, 2) i32 @_ZN5zxing6common11StringUtils13is_as ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define hidden noundef range(i32 0, 2) i32 @_ZN5zxing6common11StringUtils20is_utf8_special_byteEh(i8 noundef zeroext %0) local_unnamed_addr #7 align 2 { - %.mask = and i8 %0, -64 - %2 = icmp eq i8 %.mask, -128 + %2 = icmp slt i8 %0, -64 %. = zext i1 %2 to i32 ret i32 %. } @@ -1167,22 +1166,22 @@ define hidden noundef range(i32 0, 2) i32 @_ZN5zxing6common11StringUtils20is_utf ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define hidden noundef range(i32 0, 2) i32 @_ZN5zxing6common11StringUtils12is_utf8_codeEPci(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #6 align 2 { %3 = icmp sgt i32 %1, 0 - br i1 %3, label %.lr.ph.lr.ph.preheader, label %.outer151._crit_edge + br i1 %3, label %.lr.ph.lr.ph.preheader, label %.outer122._crit_edge .lr.ph.lr.ph.preheader: ; preds = %2 %4 = zext nneg i32 %1 to i64 br label %.lr.ph.lr.ph .lr.ph.lr.ph: ; preds = %.lr.ph.lr.ph.preheader, %.outer.backedge - %.080.ph179 = phi i32 [ %20, %.outer.backedge ], [ 0, %.lr.ph.lr.ph.preheader ] - %.081.ph178 = phi i32 [ %.081.ph152171, %.outer.backedge ], [ 0, %.lr.ph.lr.ph.preheader ] - %.082.ph177 = phi i32 [ %.082.ph.be, %.outer.backedge ], [ 0, %.lr.ph.lr.ph.preheader ] + %.080.ph150 = phi i32 [ %21, %.outer.backedge ], [ 0, %.lr.ph.lr.ph.preheader ] + %.081.ph149 = phi i32 [ %.081.ph123142, %.outer.backedge ], [ 0, %.lr.ph.lr.ph.preheader ] + %.082.ph148 = phi i32 [ %.082.ph.be, %.outer.backedge ], [ 0, %.lr.ph.lr.ph.preheader ] br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.lr.ph, %.outer151 - %.080.ph153172 = phi i32 [ %.080.ph179, %.lr.ph.lr.ph ], [ %67, %.outer151 ] - %.081.ph152171 = phi i32 [ %.081.ph178, %.lr.ph.lr.ph ], [ %66, %.outer151 ] - %5 = sext i32 %.080.ph153172 to i64 +.lr.ph: ; preds = %.lr.ph.lr.ph, %.outer122 + %.080.ph124143 = phi i32 [ %.080.ph150, %.lr.ph.lr.ph ], [ %82, %.outer122 ] + %.081.ph123142 = phi i32 [ %.081.ph149, %.lr.ph.lr.ph ], [ %81, %.outer122 ] + %5 = sext i32 %.080.ph124143 to i64 br label %6 6: ; preds = %.lr.ph, %10 @@ -1195,7 +1194,7 @@ define hidden noundef range(i32 0, 2) i32 @_ZN5zxing6common11StringUtils12is_utf 10: ; preds = %6 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %11 = icmp slt i64 %indvars.iv.next, %4 - br i1 %11, label %6, label %.outer151._crit_edge, !llvm.loop !10 + br i1 %11, label %6, label %.outer122._crit_edge, !llvm.loop !10 12: ; preds = %6 %13 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv @@ -1203,150 +1202,135 @@ define hidden noundef range(i32 0, 2) i32 @_ZN5zxing6common11StringUtils12is_utf %15 = zext i8 %8 to i32 %.mask = and i32 %15, 224 %16 = icmp eq i32 %.mask, 192 - br i1 %16, label %17, label %22 + br i1 %16, label %17, label %23 17: ; preds = %12 %18 = getelementptr i8, ptr %13, i64 1 %19 = load i8, ptr %18, align 1 - %.mask.i = and i8 %19, -64 - %.not145 = icmp eq i8 %.mask.i, -128 - br i1 %.not145, label %.outer.backedge, label %.outer151 - -.outer.backedge: ; preds = %17, %57, %45, %35, %27 - %.sink = phi i32 [ 3, %27 ], [ 4, %35 ], [ 5, %45 ], [ 6, %57 ], [ 2, %17 ] - %20 = add nsw i32 %.sink, %14 - %.082.ph.be = add nuw nsw i32 %.082.ph177, 1 - %21 = icmp slt i32 %20, %1 - br i1 %21, label %.lr.ph.lr.ph, label %.outer151._crit_edge, !llvm.loop !10 + %20 = icmp sgt i8 %19, -65 + br i1 %20, label %.outer122, label %.outer.backedge -22: ; preds = %12 - %.mask84 = and i32 %15, 240 - %23 = icmp eq i32 %.mask84, 224 - br i1 %23, label %24, label %30 +.outer.backedge: ; preds = %17, %68, %52, %39, %29 + %.sink = phi i32 [ 3, %29 ], [ 4, %39 ], [ 5, %52 ], [ 6, %68 ], [ 2, %17 ] + %21 = add nsw i32 %.sink, %14 + %.082.ph.be = add nuw nsw i32 %.082.ph148, 1 + %22 = icmp slt i32 %21, %1 + br i1 %22, label %.lr.ph.lr.ph, label %.outer122._crit_edge, !llvm.loop !10 -24: ; preds = %22 - %25 = getelementptr i8, ptr %13, i64 1 - %26 = load i8, ptr %25, align 1 - %.mask.i103 = and i8 %26, -64 - %.not143 = icmp eq i8 %.mask.i103, -128 - br i1 %.not143, label %27, label %.outer151 - -27: ; preds = %24 - %28 = getelementptr i8, ptr %13, i64 2 - %29 = load i8, ptr %28, align 1 - %.mask.i105 = and i8 %29, -64 - %.not144 = icmp eq i8 %.mask.i105, -128 - br i1 %.not144, label %.outer.backedge, label %.outer151 - -30: ; preds = %22 +23: ; preds = %12 + %.mask84 = and i32 %15, 240 + %24 = icmp eq i32 %.mask84, 224 + br i1 %24, label %25, label %33 + +25: ; preds = %23 + %26 = getelementptr i8, ptr %13, i64 1 + %27 = load i8, ptr %26, align 1 + %28 = icmp sgt i8 %27, -65 + br i1 %28, label %.outer122, label %29 + +29: ; preds = %25 + %30 = getelementptr i8, ptr %13, i64 2 + %31 = load i8, ptr %30, align 1 + %32 = icmp sgt i8 %31, -65 + br i1 %32, label %.outer122, label %.outer.backedge + +33: ; preds = %23 %.mask85 = and i32 %15, 248 - %31 = icmp eq i32 %.mask85, 240 - br i1 %31, label %32, label %40 + %34 = icmp eq i32 %.mask85, 240 + br i1 %34, label %35, label %46 -32: ; preds = %30 - %33 = getelementptr i8, ptr %13, i64 1 - %34 = load i8, ptr %33, align 1 - %.mask.i107 = and i8 %34, -64 - %.not140 = icmp eq i8 %.mask.i107, -128 - br i1 %.not140, label %35, label %.outer151 - -35: ; preds = %32 - %36 = getelementptr i8, ptr %13, i64 3 +35: ; preds = %33 + %36 = getelementptr i8, ptr %13, i64 1 %37 = load i8, ptr %36, align 1 - %38 = getelementptr i8, ptr %13, i64 2 - %39 = load i8, ptr %38, align 1 - %.mask.i109 = and i8 %39, -64 - %.not141 = icmp eq i8 %.mask.i109, -128 - %.mask.i111 = and i8 %37, -64 - %.not142 = icmp eq i8 %.mask.i111, -128 - %or.cond = select i1 %.not141, i1 %.not142, i1 false - br i1 %or.cond, label %.outer.backedge, label %.outer151 - -40: ; preds = %30 + %38 = icmp sgt i8 %37, -65 + br i1 %38, label %.outer122, label %39 + +39: ; preds = %35 + %40 = getelementptr i8, ptr %13, i64 3 + %41 = load i8, ptr %40, align 1 + %42 = getelementptr i8, ptr %13, i64 2 + %43 = load i8, ptr %42, align 1 + %44 = icmp sgt i8 %43, -65 + %45 = icmp sgt i8 %41, -65 + %or.cond = select i1 %44, i1 true, i1 %45 + br i1 %or.cond, label %.outer122, label %.outer.backedge + +46: ; preds = %33 %.mask86 = and i32 %15, 252 - %41 = icmp eq i32 %.mask86, 248 - br i1 %41, label %42, label %52 - -42: ; preds = %40 - %43 = getelementptr i8, ptr %13, i64 1 - %44 = load i8, ptr %43, align 1 - %.mask.i113 = and i8 %44, -64 - %.not136 = icmp eq i8 %.mask.i113, -128 - br i1 %.not136, label %45, label %.outer151 - -45: ; preds = %42 - %46 = getelementptr i8, ptr %13, i64 4 - %47 = load i8, ptr %46, align 1 - %48 = getelementptr i8, ptr %13, i64 3 - %49 = load i8, ptr %48, align 1 - %50 = getelementptr i8, ptr %13, i64 2 - %51 = load i8, ptr %50, align 1 - %.mask.i115 = and i8 %51, -64 - %.not137 = icmp eq i8 %.mask.i115, -128 - %.mask.i117 = and i8 %49, -64 - %.not138 = icmp eq i8 %.mask.i117, -128 - %or.cond146 = select i1 %.not137, i1 %.not138, i1 false - %.mask.i119 = and i8 %47, -64 - %.not139 = icmp eq i8 %.mask.i119, -128 - %or.cond147 = select i1 %or.cond146, i1 %.not139, i1 false - br i1 %or.cond147, label %.outer.backedge, label %.outer151 - -52: ; preds = %40 - %.mask87 = and i32 %15, 254 - %53 = icmp eq i32 %.mask87, 252 - br i1 %53, label %54, label %.outer151 - -54: ; preds = %52 - %55 = getelementptr i8, ptr %13, i64 1 + %47 = icmp eq i32 %.mask86, 248 + br i1 %47, label %48, label %62 + +48: ; preds = %46 + %49 = getelementptr i8, ptr %13, i64 1 + %50 = load i8, ptr %49, align 1 + %51 = icmp sgt i8 %50, -65 + br i1 %51, label %.outer122, label %52 + +52: ; preds = %48 + %53 = getelementptr i8, ptr %13, i64 4 + %54 = load i8, ptr %53, align 1 + %55 = getelementptr i8, ptr %13, i64 3 %56 = load i8, ptr %55, align 1 - %.mask.i121 = and i8 %56, -64 - %.not131 = icmp eq i8 %.mask.i121, -128 - br i1 %.not131, label %57, label %.outer151 - -57: ; preds = %54 - %58 = getelementptr i8, ptr %13, i64 5 - %59 = load i8, ptr %58, align 1 - %60 = getelementptr i8, ptr %13, i64 4 - %61 = load i8, ptr %60, align 1 - %62 = getelementptr i8, ptr %13, i64 3 - %63 = load i8, ptr %62, align 1 - %64 = getelementptr i8, ptr %13, i64 2 - %65 = load i8, ptr %64, align 1 - %.mask.i123 = and i8 %65, -64 - %.not132 = icmp eq i8 %.mask.i123, -128 - %.mask.i125 = and i8 %63, -64 - %.not133 = icmp eq i8 %.mask.i125, -128 - %or.cond148 = select i1 %.not132, i1 %.not133, i1 false - %.mask.i127 = and i8 %61, -64 - %.not134 = icmp eq i8 %.mask.i127, -128 - %or.cond149 = select i1 %or.cond148, i1 %.not134, i1 false - %.mask.i129 = and i8 %59, -64 - %.not135 = icmp eq i8 %.mask.i129, -128 - %or.cond150 = select i1 %or.cond149, i1 %.not135, i1 false - br i1 %or.cond150, label %.outer.backedge, label %.outer151 - -.outer151: ; preds = %17, %35, %32, %52, %57, %54, %42, %45, %24, %27 - %66 = add nsw i32 %.081.ph152171, 1 - %67 = add nsw i32 %14, 1 - %68 = icmp slt i32 %67, %1 - br i1 %68, label %.lr.ph, label %.outer151._crit_edge, !llvm.loop !10 - -.outer151._crit_edge: ; preds = %.outer.backedge, %.outer151, %10, %2 - %.082.ph.lcssa = phi i32 [ 0, %2 ], [ %.082.ph177, %10 ], [ %.082.ph177, %.outer151 ], [ %.082.ph.be, %.outer.backedge ] - %.081.ph152.lcssa164 = phi i32 [ 0, %2 ], [ %.081.ph152171, %10 ], [ %66, %.outer151 ], [ %.081.ph152171, %.outer.backedge ] - %69 = add nsw i32 %.081.ph152.lcssa164, %.082.ph.lcssa - %.not = icmp eq i32 %69, 0 - br i1 %.not, label %74, label %70 - -70: ; preds = %.outer151._crit_edge - %71 = mul nsw i32 %.082.ph.lcssa, 100 - %72 = sdiv i32 %71, %69 - %73 = icmp sgt i32 %72, 90 - %. = zext i1 %73 to i32 - br label %74 - -74: ; preds = %.outer151._crit_edge, %70 - %.0 = phi i32 [ %., %70 ], [ 0, %.outer151._crit_edge ] + %57 = getelementptr i8, ptr %13, i64 2 + %58 = load i8, ptr %57, align 1 + %59 = icmp sgt i8 %58, -65 + %60 = icmp sgt i8 %56, -65 + %or.cond117 = select i1 %59, i1 true, i1 %60 + %61 = icmp sgt i8 %54, -65 + %or.cond118 = select i1 %or.cond117, i1 true, i1 %61 + br i1 %or.cond118, label %.outer122, label %.outer.backedge + +62: ; preds = %46 + %.mask87 = and i32 %15, 254 + %63 = icmp eq i32 %.mask87, 252 + br i1 %63, label %64, label %.outer122 + +64: ; preds = %62 + %65 = getelementptr i8, ptr %13, i64 1 + %66 = load i8, ptr %65, align 1 + %67 = icmp sgt i8 %66, -65 + br i1 %67, label %.outer122, label %68 + +68: ; preds = %64 + %69 = getelementptr i8, ptr %13, i64 5 + %70 = load i8, ptr %69, align 1 + %71 = getelementptr i8, ptr %13, i64 4 + %72 = load i8, ptr %71, align 1 + %73 = getelementptr i8, ptr %13, i64 3 + %74 = load i8, ptr %73, align 1 + %75 = getelementptr i8, ptr %13, i64 2 + %76 = load i8, ptr %75, align 1 + %77 = icmp sgt i8 %76, -65 + %78 = icmp sgt i8 %74, -65 + %or.cond119 = select i1 %77, i1 true, i1 %78 + %79 = icmp sgt i8 %72, -65 + %or.cond120 = select i1 %or.cond119, i1 true, i1 %79 + %80 = icmp sgt i8 %70, -65 + %or.cond121 = select i1 %or.cond120, i1 true, i1 %80 + br i1 %or.cond121, label %.outer122, label %.outer.backedge + +.outer122: ; preds = %17, %39, %35, %62, %68, %64, %48, %52, %25, %29 + %81 = add nsw i32 %.081.ph123142, 1 + %82 = add nsw i32 %14, 1 + %83 = icmp slt i32 %82, %1 + br i1 %83, label %.lr.ph, label %.outer122._crit_edge, !llvm.loop !10 + +.outer122._crit_edge: ; preds = %.outer.backedge, %.outer122, %10, %2 + %.082.ph.lcssa = phi i32 [ 0, %2 ], [ %.082.ph148, %10 ], [ %.082.ph148, %.outer122 ], [ %.082.ph.be, %.outer.backedge ] + %.081.ph123.lcssa135 = phi i32 [ 0, %2 ], [ %.081.ph123142, %10 ], [ %81, %.outer122 ], [ %.081.ph123142, %.outer.backedge ] + %84 = add nsw i32 %.081.ph123.lcssa135, %.082.ph.lcssa + %.not = icmp eq i32 %84, 0 + br i1 %.not, label %89, label %85 + +85: ; preds = %.outer122._crit_edge + %86 = mul nsw i32 %.082.ph.lcssa, 100 + %87 = sdiv i32 %86, %84 + %88 = icmp sgt i32 %87, 90 + %. = zext i1 %88 to i32 + br label %89 + +89: ; preds = %.outer122._crit_edge, %85 + %.0 = phi i32 [ %., %85 ], [ 0, %.outer122._crit_edge ] ret i32 %.0 } diff --git a/bench/openjdk/optimized/EncodingSupport.ll b/bench/openjdk/optimized/EncodingSupport.ll index ba94b5d54d3..1f876fdf5ca 100644 --- a/bench/openjdk/optimized/EncodingSupport.ll +++ b/bench/openjdk/optimized/EncodingSupport.ll @@ -8,9 +8,9 @@ define hidden i32 @modifiedUtf8LengthOfUtf8(ptr nocapture noundef readonly %0, i %3 = icmp sgt i32 %1, 0 br i1 %3, label %.lr.ph, label %._crit_edge -.lr.ph: ; preds = %2, %59 - %.04159 = phi i32 [ %60, %59 ], [ 0, %2 ] - %.04258 = phi i32 [ %.143, %59 ], [ 0, %2 ] +.lr.ph: ; preds = %2, %53 + %.04159 = phi i32 [ %54, %53 ], [ 0, %2 ] + %.04258 = phi i32 [ %.143, %53 ], [ 0, %2 ] %4 = sext i32 %.04159 to i64 %5 = getelementptr inbounds i8, ptr %0, i64 %4 %6 = load i8, ptr %5, align 1 @@ -22,12 +22,12 @@ define hidden i32 @modifiedUtf8LengthOfUtf8(ptr nocapture noundef readonly %0, i %10 = icmp eq i8 %6, 0 %spec.select.v = select i1 %10, i32 2, i32 1 %spec.select = add nuw nsw i32 %spec.select.v, %.04258 - br label %59 + br label %53 11: ; preds = %.lr.ph %12 = and i32 %7, 224 %13 = icmp eq i32 %12, 192 - br i1 %13, label %14, label %23 + br i1 %13, label %14, label %22 14: ; preds = %11 %15 = add nsw i32 %.04159, 1 @@ -38,89 +38,83 @@ define hidden i32 @modifiedUtf8LengthOfUtf8(ptr nocapture noundef readonly %0, i %17 = sext i32 %15 to i64 %18 = getelementptr inbounds i8, ptr %0, i64 %17 %19 = load i8, ptr %18, align 1 - %20 = and i8 %19, -64 - %.not56 = icmp eq i8 %20, -128 - br i1 %.not56, label %21, label %._crit_edge - -21: ; preds = %16 - %22 = add nuw nsw i32 %.04258, 2 - br label %59 - -23: ; preds = %11 - %24 = and i32 %7, 240 - %25 = icmp eq i32 %24, 224 - br i1 %25, label %26, label %39 - -26: ; preds = %23 - %27 = add nsw i32 %.04159, 2 - %.not52 = icmp slt i32 %27, %1 - br i1 %.not52, label %28, label %._crit_edge - -28: ; preds = %26 - %29 = getelementptr i8, ptr %5, i64 1 - %30 = load i8, ptr %29, align 1 - %31 = and i8 %30, -64 - %.not53 = icmp eq i8 %31, -128 - br i1 %.not53, label %32, label %._crit_edge - -32: ; preds = %28 - %33 = sext i32 %27 to i64 - %34 = getelementptr inbounds i8, ptr %0, i64 %33 - %35 = load i8, ptr %34, align 1 - %36 = and i8 %35, -64 - %.not54 = icmp eq i8 %36, -128 - br i1 %.not54, label %37, label %._crit_edge - -37: ; preds = %32 - %38 = add nuw nsw i32 %.04258, 3 - br label %59 - -39: ; preds = %23 - %40 = and i32 %7, 248 - %41 = icmp eq i32 %40, 240 - br i1 %41, label %42, label %._crit_edge - -42: ; preds = %39 - %43 = add nsw i32 %.04159, 3 - %.not = icmp slt i32 %43, %1 - br i1 %.not, label %44, label %._crit_edge - -44: ; preds = %42 - %45 = getelementptr i8, ptr %5, i64 1 + %.not56 = icmp slt i8 %19, -64 + br i1 %.not56, label %20, label %._crit_edge + +20: ; preds = %16 + %21 = add nuw nsw i32 %.04258, 2 + br label %53 + +22: ; preds = %11 + %23 = and i32 %7, 240 + %24 = icmp eq i32 %23, 224 + br i1 %24, label %25, label %36 + +25: ; preds = %22 + %26 = add nsw i32 %.04159, 2 + %.not52 = icmp slt i32 %26, %1 + br i1 %.not52, label %27, label %._crit_edge + +27: ; preds = %25 + %28 = getelementptr i8, ptr %5, i64 1 + %29 = load i8, ptr %28, align 1 + %.not53 = icmp slt i8 %29, -64 + br i1 %.not53, label %30, label %._crit_edge + +30: ; preds = %27 + %31 = sext i32 %26 to i64 + %32 = getelementptr inbounds i8, ptr %0, i64 %31 + %33 = load i8, ptr %32, align 1 + %.not54 = icmp slt i8 %33, -64 + br i1 %.not54, label %34, label %._crit_edge + +34: ; preds = %30 + %35 = add nuw nsw i32 %.04258, 3 + br label %53 + +36: ; preds = %22 + %37 = and i32 %7, 248 + %38 = icmp eq i32 %37, 240 + br i1 %38, label %39, label %._crit_edge + +39: ; preds = %36 + %40 = add nsw i32 %.04159, 3 + %.not = icmp slt i32 %40, %1 + br i1 %.not, label %41, label %._crit_edge + +41: ; preds = %39 + %42 = getelementptr i8, ptr %5, i64 1 + %43 = load i8, ptr %42, align 1 + %.not49 = icmp slt i8 %43, -64 + br i1 %.not49, label %44, label %._crit_edge + +44: ; preds = %41 + %45 = getelementptr i8, ptr %5, i64 2 %46 = load i8, ptr %45, align 1 - %47 = and i8 %46, -64 - %.not49 = icmp eq i8 %47, -128 - br i1 %.not49, label %48, label %._crit_edge + %.not50 = icmp slt i8 %46, -64 + br i1 %.not50, label %47, label %._crit_edge -48: ; preds = %44 - %49 = getelementptr i8, ptr %5, i64 2 +47: ; preds = %44 + %48 = sext i32 %40 to i64 + %49 = getelementptr inbounds i8, ptr %0, i64 %48 %50 = load i8, ptr %49, align 1 - %51 = and i8 %50, -64 - %.not50 = icmp eq i8 %51, -128 - br i1 %.not50, label %52, label %._crit_edge - -52: ; preds = %48 - %53 = sext i32 %43 to i64 - %54 = getelementptr inbounds i8, ptr %0, i64 %53 - %55 = load i8, ptr %54, align 1 - %56 = and i8 %55, -64 - %.not51 = icmp eq i8 %56, -128 - br i1 %.not51, label %57, label %._crit_edge - -57: ; preds = %52 - %58 = add nuw nsw i32 %.04258, 6 - br label %59 - -59: ; preds = %9, %37, %57, %21 - %.143 = phi i32 [ %22, %21 ], [ %38, %37 ], [ %58, %57 ], [ %spec.select, %9 ] - %.1 = phi i32 [ %15, %21 ], [ %27, %37 ], [ %43, %57 ], [ %.04159, %9 ] - %60 = add nsw i32 %.1, 1 - %61 = icmp slt i32 %60, %1 - br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !6 - -._crit_edge: ; preds = %59, %16, %14, %32, %28, %26, %52, %48, %44, %42, %39, %2 - %.042.lcssa = phi i32 [ 0, %2 ], [ %.04258, %39 ], [ %.04258, %42 ], [ %.04258, %44 ], [ %.04258, %48 ], [ %.04258, %52 ], [ %.04258, %26 ], [ %.04258, %28 ], [ %.04258, %32 ], [ %.04258, %14 ], [ %.04258, %16 ], [ %.143, %59 ] - %.041.lcssa = phi i32 [ 0, %2 ], [ %.04159, %39 ], [ %.04159, %42 ], [ %.04159, %44 ], [ %.04159, %48 ], [ %.04159, %52 ], [ %.04159, %26 ], [ %.04159, %28 ], [ %.04159, %32 ], [ %.04159, %14 ], [ %.04159, %16 ], [ %60, %59 ] + %.not51 = icmp slt i8 %50, -64 + br i1 %.not51, label %51, label %._crit_edge + +51: ; preds = %47 + %52 = add nuw nsw i32 %.04258, 6 + br label %53 + +53: ; preds = %9, %34, %51, %20 + %.143 = phi i32 [ %21, %20 ], [ %35, %34 ], [ %52, %51 ], [ %spec.select, %9 ] + %.1 = phi i32 [ %15, %20 ], [ %26, %34 ], [ %40, %51 ], [ %.04159, %9 ] + %54 = add nsw i32 %.1, 1 + %55 = icmp slt i32 %54, %1 + br i1 %55, label %.lr.ph, label %._crit_edge, !llvm.loop !6 + +._crit_edge: ; preds = %53, %16, %14, %30, %27, %25, %47, %44, %41, %39, %36, %2 + %.042.lcssa = phi i32 [ 0, %2 ], [ %.04258, %36 ], [ %.04258, %39 ], [ %.04258, %41 ], [ %.04258, %44 ], [ %.04258, %47 ], [ %.04258, %25 ], [ %.04258, %27 ], [ %.04258, %30 ], [ %.04258, %14 ], [ %.04258, %16 ], [ %.143, %53 ] + %.041.lcssa = phi i32 [ 0, %2 ], [ %.04159, %36 ], [ %.04159, %39 ], [ %.04159, %41 ], [ %.04159, %44 ], [ %.04159, %47 ], [ %.04159, %25 ], [ %.04159, %27 ], [ %.04159, %30 ], [ %.04159, %14 ], [ %.04159, %16 ], [ %54, %53 ] %.not57 = icmp eq i32 %.041.lcssa, %1 %.042. = select i1 %.not57, i32 %.042.lcssa, i32 %1 ret i32 %.042. diff --git a/bench/openjdk/optimized/cmsnamed.ll b/bench/openjdk/optimized/cmsnamed.ll index a8d7729189e..a80070fc2ee 100644 --- a/bench/openjdk/optimized/cmsnamed.ll +++ b/bench/openjdk/optimized/cmsnamed.ll @@ -307,7 +307,7 @@ strTo16.exit: ; preds = %4, %7 strTo16.exit24: ; preds = %strTo16.exit, %16 %.0.i23 = phi i16 [ %23, %16 ], [ 0, %strTo16.exit ] %24 = icmp eq ptr %0, null - br i1 %24, label %94, label %25 + br i1 %24, label %92, label %25 25: ; preds = %strTo16.exit24 %26 = load i8, ptr %3, align 1 @@ -317,7 +317,7 @@ strTo16.exit24: ; preds = %strTo16.exit, %16 28: ; preds = %25 store i32 0, ptr %5, align 4 %29 = call fastcc i32 @AddMLUBlock(ptr noundef %0, i32 noundef 4, ptr noundef %5, i16 noundef zeroext %.0.i, i16 noundef zeroext %.0.i23) - br label %94 + br label %92 .lr.ph.i: ; preds = %25, %49 %30 = phi i8 [ %51, %49 ], [ %26, %25 ] @@ -362,100 +362,98 @@ strTo16.exit24: ; preds = %strTo16.exit, %16 %.123.i = phi i32 [ %38, %35 ], [ %42, %41 ], [ %46, %45 ], [ %48, %47 ], [ %31, %.lr.ph.i ] %50 = getelementptr inbounds i8, ptr %.02430.i, i64 1 %51 = load i8, ptr %50, align 1 - %52 = and i8 %51, -64 - %53 = icmp ne i8 %52, -128 - %54 = icmp ult i32 %.123.i, 1114112 - %or.cond.i = select i1 %53, i1 %54, i1 false - %55 = zext i1 %or.cond.i to i32 - %spec.select = add i32 %.02032.i, %55 + %52 = icmp sgt i8 %51, -65 + %53 = icmp ult i32 %.123.i, 1114112 + %or.cond.i = select i1 %52, i1 %53, i1 false + %54 = zext i1 %or.cond.i to i32 + %spec.select = add i32 %.02032.i, %54 %.not.i = icmp eq i8 %51, 0 br i1 %.not.i, label %decodeUTF8.exit, label %.lr.ph.i, !llvm.loop !10 decodeUTF8.exit: ; preds = %49 - %56 = load ptr, ptr %0, align 8 - %57 = tail call ptr @_cmsCalloc(ptr noundef %56, i32 noundef %spec.select, i32 noundef 4) #13 - %58 = icmp eq ptr %57, null - br i1 %58, label %94, label %59 - -59: ; preds = %decodeUTF8.exit - %60 = load i8, ptr %3, align 1 - %.not29.i25 = icmp eq i8 %60, 0 + %55 = load ptr, ptr %0, align 8 + %56 = tail call ptr @_cmsCalloc(ptr noundef %55, i32 noundef %spec.select, i32 noundef 4) #13 + %57 = icmp eq ptr %56, null + br i1 %57, label %92, label %58 + +58: ; preds = %decodeUTF8.exit + %59 = load i8, ptr %3, align 1 + %.not29.i25 = icmp eq i8 %59, 0 br i1 %.not29.i25, label %decodeUTF8.exit41, label %.lr.ph.i26 -.lr.ph.i26: ; preds = %59, %89 - %61 = phi i8 [ %90, %89 ], [ %60, %59 ] - %.033.i27 = phi ptr [ %.1.i34, %89 ], [ %57, %59 ] - %.02231.i29 = phi i32 [ %.123.i31, %89 ], [ 0, %59 ] - %.02430.i30 = phi ptr [ %81, %89 ], [ %3, %59 ] - %62 = zext i8 %61 to i32 - %63 = icmp sgt i8 %61, -1 - br i1 %63, label %80, label %64 - -64: ; preds = %.lr.ph.i26 - %65 = icmp ult i8 %61, -64 - br i1 %65, label %66, label %70 - -66: ; preds = %64 - %67 = shl i32 %.02231.i29, 6 - %68 = and i32 %62, 63 - %69 = or disjoint i32 %67, %68 - br label %80 - -70: ; preds = %64 - %71 = icmp ult i8 %61, -32 - br i1 %71, label %72, label %74 - -72: ; preds = %70 - %73 = and i32 %62, 31 - br label %80 - -74: ; preds = %70 - %75 = icmp ult i8 %61, -16 - br i1 %75, label %76, label %78 - -76: ; preds = %74 - %77 = and i32 %62, 15 - br label %80 - -78: ; preds = %74 - %79 = and i32 %62, 7 - br label %80 - -80: ; preds = %78, %76, %72, %66, %.lr.ph.i26 - %.123.i31 = phi i32 [ %69, %66 ], [ %73, %72 ], [ %77, %76 ], [ %79, %78 ], [ %62, %.lr.ph.i26 ] - %81 = getelementptr inbounds i8, ptr %.02430.i30, i64 1 - %82 = load i8, ptr %81, align 1 - %83 = and i8 %82, -64 - %84 = icmp ne i8 %83, -128 - %85 = icmp ult i32 %.123.i31, 1114112 - %or.cond.i32 = select i1 %84, i1 %85, i1 false - br i1 %or.cond.i32, label %86, label %89 - -86: ; preds = %80 +.lr.ph.i26: ; preds = %58, %87 + %60 = phi i8 [ %88, %87 ], [ %59, %58 ] + %.033.i27 = phi ptr [ %.1.i34, %87 ], [ %56, %58 ] + %.02231.i29 = phi i32 [ %.123.i31, %87 ], [ 0, %58 ] + %.02430.i30 = phi ptr [ %80, %87 ], [ %3, %58 ] + %61 = zext i8 %60 to i32 + %62 = icmp sgt i8 %60, -1 + br i1 %62, label %79, label %63 + +63: ; preds = %.lr.ph.i26 + %64 = icmp ult i8 %60, -64 + br i1 %64, label %65, label %69 + +65: ; preds = %63 + %66 = shl i32 %.02231.i29, 6 + %67 = and i32 %61, 63 + %68 = or disjoint i32 %66, %67 + br label %79 + +69: ; preds = %63 + %70 = icmp ult i8 %60, -32 + br i1 %70, label %71, label %73 + +71: ; preds = %69 + %72 = and i32 %61, 31 + br label %79 + +73: ; preds = %69 + %74 = icmp ult i8 %60, -16 + br i1 %74, label %75, label %77 + +75: ; preds = %73 + %76 = and i32 %61, 15 + br label %79 + +77: ; preds = %73 + %78 = and i32 %61, 7 + br label %79 + +79: ; preds = %77, %75, %71, %65, %.lr.ph.i26 + %.123.i31 = phi i32 [ %68, %65 ], [ %72, %71 ], [ %76, %75 ], [ %78, %77 ], [ %61, %.lr.ph.i26 ] + %80 = getelementptr inbounds i8, ptr %.02430.i30, i64 1 + %81 = load i8, ptr %80, align 1 + %82 = icmp sgt i8 %81, -65 + %83 = icmp ult i32 %.123.i31, 1114112 + %or.cond.i32 = select i1 %82, i1 %83, i1 false + br i1 %or.cond.i32, label %84, label %87 + +84: ; preds = %79 %.not28.i37 = icmp eq ptr %.033.i27, null - br i1 %.not28.i37, label %89, label %87 + br i1 %.not28.i37, label %87, label %85 -87: ; preds = %86 - %88 = getelementptr inbounds i8, ptr %.033.i27, i64 4 +85: ; preds = %84 + %86 = getelementptr inbounds i8, ptr %.033.i27, i64 4 store i32 %.123.i31, ptr %.033.i27, align 4 - %.pre.pre.i38 = load i8, ptr %81, align 1 - br label %89 + %.pre.pre.i38 = load i8, ptr %80, align 1 + br label %87 -89: ; preds = %86, %87, %80 - %90 = phi i8 [ %82, %80 ], [ %.pre.pre.i38, %87 ], [ %82, %86 ] - %.1.i34 = phi ptr [ %.033.i27, %80 ], [ %88, %87 ], [ null, %86 ] - %.not.i35 = icmp eq i8 %90, 0 +87: ; preds = %84, %85, %79 + %88 = phi i8 [ %81, %79 ], [ %.pre.pre.i38, %85 ], [ %81, %84 ] + %.1.i34 = phi ptr [ %.033.i27, %79 ], [ %86, %85 ], [ null, %84 ] + %.not.i35 = icmp eq i8 %88, 0 br i1 %.not.i35, label %decodeUTF8.exit41, label %.lr.ph.i26, !llvm.loop !10 -decodeUTF8.exit41: ; preds = %89, %59 - %91 = shl i32 %spec.select, 2 - %92 = tail call fastcc i32 @AddMLUBlock(ptr noundef %0, i32 noundef %91, ptr noundef %57, i16 noundef zeroext %.0.i, i16 noundef zeroext %.0.i23) - %93 = load ptr, ptr %0, align 8 - tail call void @_cmsFree(ptr noundef %93, ptr noundef nonnull %57) #13 - br label %94 +decodeUTF8.exit41: ; preds = %87, %58 + %89 = shl i32 %spec.select, 2 + %90 = tail call fastcc i32 @AddMLUBlock(ptr noundef %0, i32 noundef %89, ptr noundef %56, i16 noundef zeroext %.0.i, i16 noundef zeroext %.0.i23) + %91 = load ptr, ptr %0, align 8 + tail call void @_cmsFree(ptr noundef %91, ptr noundef nonnull %56) #13 + br label %92 -94: ; preds = %decodeUTF8.exit, %strTo16.exit24, %decodeUTF8.exit41, %28 - %.0 = phi i32 [ %29, %28 ], [ %92, %decodeUTF8.exit41 ], [ 0, %strTo16.exit24 ], [ 0, %decodeUTF8.exit ] +92: ; preds = %decodeUTF8.exit, %strTo16.exit24, %decodeUTF8.exit41, %28 + %.0 = phi i32 [ %29, %28 ], [ %90, %decodeUTF8.exit41 ], [ 0, %strTo16.exit24 ], [ 0, %decodeUTF8.exit ] ret i32 %.0 } diff --git a/bench/openjdk/optimized/hb-buffer.ll b/bench/openjdk/optimized/hb-buffer.ll index 5648ce0bb86..20203d1ef25 100644 --- a/bench/openjdk/optimized/hb-buffer.ll +++ b/bench/openjdk/optimized/hb-buffer.ll @@ -2928,138 +2928,137 @@ thread-pre-split.i: ; preds = %_ZN9hb_utf8_t4prevE %scevgep.i.i = getelementptr i8, ptr %.05867.i4, i64 %44 br label %45 -45: ; preds = %52, %.lr.ph.i.i - %.01620.i.i = phi ptr [ %41, %.lr.ph.i.i ], [ %53, %52 ] +45: ; preds = %51, %.lr.ph.i.i + %.01620.i.i = phi ptr [ %41, %.lr.ph.i.i ], [ %52, %51 ] %46 = load i8, ptr %.01620.i.i, align 1 - %47 = and i8 %46, -64 - %48 = icmp eq i8 %47, -128 - %49 = ptrtoint ptr %.01620.i.i to i64 - %50 = sub i64 %43, %49 - %51 = icmp slt i64 %50, 4 - %or.cond.i66.i = and i1 %51, %48 - br i1 %or.cond.i66.i, label %52, label %.critedge.i.i - -52: ; preds = %45 - %53 = getelementptr inbounds i8, ptr %.01620.i.i, i64 -1 - %54 = icmp ult ptr %1, %53 - br i1 %54, label %45, label %.critedge.i.i, !llvm.loop !38 - -.critedge.i.i: ; preds = %52, %45, %40 - %.016.lcssa.i.i = phi ptr [ %41, %40 ], [ %.01620.i.i, %45 ], [ %scevgep.i.i, %52 ] - %55 = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef nonnull %.016.lcssa.i.i, ptr noundef nonnull %.05867.i4, ptr noundef nonnull %6, i32 noundef %10) - %56 = icmp eq ptr %55, %.05867.i4 - br i1 %56, label %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i, label %57 + %47 = icmp slt i8 %46, -64 + %48 = ptrtoint ptr %.01620.i.i to i64 + %49 = sub i64 %43, %48 + %50 = icmp slt i64 %49, 4 + %or.cond.i66.i = and i1 %47, %50 + br i1 %or.cond.i66.i, label %51, label %.critedge.i.i + +51: ; preds = %45 + %52 = getelementptr inbounds i8, ptr %.01620.i.i, i64 -1 + %53 = icmp ult ptr %1, %52 + br i1 %53, label %45, label %.critedge.i.i, !llvm.loop !38 + +.critedge.i.i: ; preds = %51, %45, %40 + %.016.lcssa.i.i = phi ptr [ %41, %40 ], [ %.01620.i.i, %45 ], [ %scevgep.i.i, %51 ] + %54 = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef nonnull %.016.lcssa.i.i, ptr noundef nonnull %.05867.i4, ptr noundef nonnull %6, i32 noundef %10) + %55 = icmp eq ptr %54, %.05867.i4 + br i1 %55, label %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i, label %56 .critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i: ; preds = %.critedge.i.i %.pre75.i = load i32, ptr %6, align 4 br label %_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i -57: ; preds = %.critedge.i.i +56: ; preds = %.critedge.i.i store i32 %10, ptr %6, align 4 br label %_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i -_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i: ; preds = %57, %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i - %58 = phi i32 [ %10, %57 ], [ %.pre75.i, %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] - %.0.i.i = phi ptr [ %41, %57 ], [ %.016.lcssa.i.i, %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] - %59 = load i32, ptr %34, align 8 - %60 = add i32 %59, 1 - store i32 %60, ptr %34, align 8 - %61 = zext i32 %59 to i64 - %62 = getelementptr inbounds [5 x i32], ptr %38, i64 0, i64 %61 - store i32 %58, ptr %62, align 4 - %63 = icmp ult ptr %1, %.0.i.i - br i1 %63, label %thread-pre-split.i, label %.critedge.i, !llvm.loop !39 +_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i: ; preds = %56, %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i + %57 = phi i32 [ %10, %56 ], [ %.pre75.i, %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] + %.0.i.i = phi ptr [ %41, %56 ], [ %.016.lcssa.i.i, %.critedge.i._ZN9hb_utf8_t4prevEPKhS1_Pjj.exit_crit_edge.i ] + %58 = load i32, ptr %34, align 8 + %59 = add i32 %58, 1 + store i32 %59, ptr %34, align 8 + %60 = zext i32 %58 to i64 + %61 = getelementptr inbounds [5 x i32], ptr %38, i64 0, i64 %60 + store i32 %57, ptr %61, align 4 + %62 = icmp ult ptr %1, %.0.i.i + br i1 %62, label %thread-pre-split.i, label %.critedge.i, !llvm.loop !39 .critedge.i: ; preds = %_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i, %thread-pre-split.i, %_ZN11hb_buffer_t6ensureEj.exit.thread.i..critedge.i_crit_edge %.pre-phi = phi i64 [ %.pre, %_ZN11hb_buffer_t6ensureEj.exit.thread.i..critedge.i_crit_edge ], [ %35, %thread-pre-split.i ], [ %35, %_ZN9hb_utf8_t4prevEPKhS1_Pjj.exit.i ] - %64 = getelementptr inbounds i8, ptr %1, i64 %.pre-phi - %65 = getelementptr inbounds i8, ptr %64, i64 %24 + %63 = getelementptr inbounds i8, ptr %1, i64 %.pre-phi + %64 = getelementptr inbounds i8, ptr %63, i64 %24 %.not.i = icmp eq i32 %spec.select.i, 0 br i1 %.not.i, label %._crit_edge.i, label %.lr.ph70.i .lr.ph70.i: ; preds = %.critedge.i - %66 = ptrtoint ptr %1 to i64 - %67 = getelementptr inbounds i8, ptr %0, i64 104 - br label %68 - -68: ; preds = %_ZN11hb_buffer_t3addEjj.exit.i, %.lr.ph70.i - %.05669.i = phi ptr [ %64, %.lr.ph70.i ], [ %69, %_ZN11hb_buffer_t3addEjj.exit.i ] - %69 = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef %.05669.i, ptr noundef nonnull %65, ptr noundef nonnull %7, i32 noundef %10) - %70 = load i32, ptr %7, align 4 - %71 = ptrtoint ptr %.05669.i to i64 - %72 = sub i64 %71, %66 - %73 = trunc i64 %72 to i32 - %74 = load i32, ptr %22, align 8 - %75 = add i32 %74, 1 - %.not.i.i.i = icmp eq i32 %75, 0 - %76 = load i32, ptr %27, align 8 - %77 = icmp ult i32 %75, %76 - %or.cond.i.i.i = select i1 %.not.i.i.i, i1 true, i1 %77 + %65 = ptrtoint ptr %1 to i64 + %66 = getelementptr inbounds i8, ptr %0, i64 104 + br label %67 + +67: ; preds = %_ZN11hb_buffer_t3addEjj.exit.i, %.lr.ph70.i + %.05669.i = phi ptr [ %63, %.lr.ph70.i ], [ %68, %_ZN11hb_buffer_t3addEjj.exit.i ] + %68 = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef %.05669.i, ptr noundef nonnull %64, ptr noundef nonnull %7, i32 noundef %10) + %69 = load i32, ptr %7, align 4 + %70 = ptrtoint ptr %.05669.i to i64 + %71 = sub i64 %70, %65 + %72 = trunc i64 %71 to i32 + %73 = load i32, ptr %22, align 8 + %74 = add i32 %73, 1 + %.not.i.i.i = icmp eq i32 %74, 0 + %75 = load i32, ptr %27, align 8 + %76 = icmp ult i32 %74, %75 + %or.cond.i.i.i = select i1 %.not.i.i.i, i1 true, i1 %76 br i1 %or.cond.i.i.i, label %_ZN11hb_buffer_t6ensureEj.exit.thread.i.i, label %_ZN11hb_buffer_t6ensureEj.exit.i.i -_ZN11hb_buffer_t6ensureEj.exit.i.i: ; preds = %68 - %78 = call noundef zeroext i1 @_ZN11hb_buffer_t7enlargeEj(ptr noundef nonnull align 8 dereferenceable(220) %0, i32 noundef %75) - br i1 %78, label %_ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i, label %_ZN11hb_buffer_t3addEjj.exit.i +_ZN11hb_buffer_t6ensureEj.exit.i.i: ; preds = %67 + %77 = call noundef zeroext i1 @_ZN11hb_buffer_t7enlargeEj(ptr noundef nonnull align 8 dereferenceable(220) %0, i32 noundef %74) + br i1 %77, label %_ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i, label %_ZN11hb_buffer_t3addEjj.exit.i _ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i: ; preds = %_ZN11hb_buffer_t6ensureEj.exit.i.i %.pre.i.i = load i32, ptr %22, align 8 br label %_ZN11hb_buffer_t6ensureEj.exit.thread.i.i -_ZN11hb_buffer_t6ensureEj.exit.thread.i.i: ; preds = %_ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i, %68 - %79 = phi i32 [ %.pre.i.i, %_ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i ], [ %74, %68 ] - %80 = load ptr, ptr %67, align 8 - %81 = zext i32 %79 to i64 - %82 = getelementptr inbounds %struct.hb_glyph_info_t, ptr %80, i64 %81 - %83 = getelementptr inbounds i8, ptr %82, i64 12 - store i64 0, ptr %83, align 1 - store i32 %70, ptr %82, align 4 - %84 = getelementptr inbounds i8, ptr %82, i64 4 - store i32 0, ptr %84, align 4 - %85 = getelementptr inbounds i8, ptr %82, i64 8 - store i32 %73, ptr %85, align 4 - %86 = load i32, ptr %22, align 8 - %87 = add i32 %86, 1 - store i32 %87, ptr %22, align 8 +_ZN11hb_buffer_t6ensureEj.exit.thread.i.i: ; preds = %_ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i, %67 + %78 = phi i32 [ %.pre.i.i, %_ZN11hb_buffer_t6ensureEj.exit._ZN11hb_buffer_t6ensureEj.exit.thread_crit_edge.i.i ], [ %73, %67 ] + %79 = load ptr, ptr %66, align 8 + %80 = zext i32 %78 to i64 + %81 = getelementptr inbounds %struct.hb_glyph_info_t, ptr %79, i64 %80 + %82 = getelementptr inbounds i8, ptr %81, i64 12 + store i64 0, ptr %82, align 1 + store i32 %69, ptr %81, align 4 + %83 = getelementptr inbounds i8, ptr %81, i64 4 + store i32 0, ptr %83, align 4 + %84 = getelementptr inbounds i8, ptr %81, i64 8 + store i32 %72, ptr %84, align 4 + %85 = load i32, ptr %22, align 8 + %86 = add i32 %85, 1 + store i32 %86, ptr %22, align 8 br label %_ZN11hb_buffer_t3addEjj.exit.i _ZN11hb_buffer_t3addEjj.exit.i: ; preds = %_ZN11hb_buffer_t6ensureEj.exit.thread.i.i, %_ZN11hb_buffer_t6ensureEj.exit.i.i - %88 = icmp ult ptr %69, %65 - br i1 %88, label %68, label %._crit_edge.i, !llvm.loop !40 + %87 = icmp ult ptr %68, %64 + br i1 %87, label %67, label %._crit_edge.i, !llvm.loop !40 ._crit_edge.i: ; preds = %_ZN11hb_buffer_t3addEjj.exit.i, %.critedge.i - %.056.lcssa.i = phi ptr [ %64, %.critedge.i ], [ %69, %_ZN11hb_buffer_t3addEjj.exit.i ] - %89 = getelementptr inbounds i8, ptr %0, i64 172 - store i32 0, ptr %89, align 4 - %90 = sext i32 %.0.i to i64 - %91 = getelementptr inbounds i8, ptr %1, i64 %90 - %92 = icmp ult ptr %.056.lcssa.i, %91 - br i1 %92, label %.lr.ph73.i, label %.critedge5.i + %.056.lcssa.i = phi ptr [ %63, %.critedge.i ], [ %68, %_ZN11hb_buffer_t3addEjj.exit.i ] + %88 = getelementptr inbounds i8, ptr %0, i64 172 + store i32 0, ptr %88, align 4 + %89 = sext i32 %.0.i to i64 + %90 = getelementptr inbounds i8, ptr %1, i64 %89 + %91 = icmp ult ptr %.056.lcssa.i, %90 + br i1 %91, label %.lr.ph73.i, label %.critedge5.i .lr.ph73.i: ; preds = %._crit_edge.i - %93 = getelementptr inbounds i8, ptr %0, i64 148 - br label %94 - -94: ; preds = %97, %.lr.ph73.i - %.171.i = phi ptr [ %.056.lcssa.i, %.lr.ph73.i ], [ %98, %97 ] - %95 = load i32, ptr %89, align 4 - %96 = icmp ult i32 %95, 5 - br i1 %96, label %97, label %.critedge5.i - -97: ; preds = %94 - %98 = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef %.171.i, ptr noundef nonnull %91, ptr noundef nonnull %8, i32 noundef %10) - %99 = load i32, ptr %8, align 4 - %100 = load i32, ptr %89, align 4 - %101 = add i32 %100, 1 - store i32 %101, ptr %89, align 4 - %102 = zext i32 %100 to i64 - %103 = getelementptr inbounds [5 x i32], ptr %93, i64 0, i64 %102 - store i32 %99, ptr %103, align 4 - %104 = icmp ult ptr %98, %91 - br i1 %104, label %94, label %.critedge5.i, !llvm.loop !41 - -.critedge5.i: ; preds = %97, %94, %._crit_edge.i - %105 = getelementptr inbounds i8, ptr %0, i64 44 - store i32 1, ptr %105, align 4 + %92 = getelementptr inbounds i8, ptr %0, i64 148 + br label %93 + +93: ; preds = %96, %.lr.ph73.i + %.171.i = phi ptr [ %.056.lcssa.i, %.lr.ph73.i ], [ %97, %96 ] + %94 = load i32, ptr %88, align 4 + %95 = icmp ult i32 %94, 5 + br i1 %95, label %96, label %.critedge5.i + +96: ; preds = %93 + %97 = call noundef ptr @_ZN9hb_utf8_t4nextEPKhS1_Pjj(ptr noundef %.171.i, ptr noundef nonnull %90, ptr noundef nonnull %8, i32 noundef %10) + %98 = load i32, ptr %8, align 4 + %99 = load i32, ptr %88, align 4 + %100 = add i32 %99, 1 + store i32 %100, ptr %88, align 4 + %101 = zext i32 %99 to i64 + %102 = getelementptr inbounds [5 x i32], ptr %92, i64 0, i64 %101 + store i32 %98, ptr %102, align 4 + %103 = icmp ult ptr %97, %90 + br i1 %103, label %93, label %.critedge5.i, !llvm.loop !41 + +.critedge5.i: ; preds = %96, %93, %._crit_edge.i + %104 = getelementptr inbounds i8, ptr %0, i64 44 + store i32 1, ptr %104, align 4 br label %_ZL17hb_buffer_add_utfI9hb_utf8_tEvP11hb_buffer_tPKNT_11codepoint_tEiji.exit _ZL17hb_buffer_add_utfI9hb_utf8_tEvP11hb_buffer_tPKNT_11codepoint_tEiji.exit: ; preds = %5, %18, %_ZN11hb_buffer_t6ensureEj.exit.i, %.critedge5.i diff --git a/bench/openssl/optimized/libcrypto-lib-a_utf8.ll b/bench/openssl/optimized/libcrypto-lib-a_utf8.ll index 9abb85649d3..1afabccd462 100644 --- a/bench/openssl/optimized/libcrypto-lib-a_utf8.ll +++ b/bench/openssl/optimized/libcrypto-lib-a_utf8.ll @@ -68,8 +68,7 @@ if.end43: ; preds = %if.then39 lor.lhs.false: ; preds = %if.end43 %arrayidx49 = getelementptr inbounds i8, ptr %str, i64 2 %3 = load i8, ptr %arrayidx49, align 1 - %4 = and i8 %3, -64 - %cmp52.not = icmp eq i8 %4, -128 + %cmp52.not = icmp slt i8 %3, -64 br i1 %cmp52.not, label %if.end55, label %return if.end55: ; preds = %lor.lhs.false @@ -82,12 +81,12 @@ if.end55: ; preds = %lor.lhs.false br i1 %cmp72, label %return, label %if.end75 if.end75: ; preds = %if.end55 - %5 = and i8 %3, 63 - %6 = zext nneg i8 %5 to i32 - %7 = or disjoint i32 %or6634, %6 - %or71 = zext nneg i32 %7 to i64 - %8 = and i64 %or71, 63488 - %.not = icmp eq i64 %8, 55296 + %4 = and i8 %3, 63 + %5 = zext nneg i8 %4 to i32 + %6 = or disjoint i32 %or6634, %5 + %or71 = zext nneg i32 %6 to i64 + %7 = and i64 %or71, 63488 + %.not = icmp eq i64 %7, 55296 br i1 %.not, label %return, label %if.end137 if.else78: ; preds = %if.else34 @@ -101,44 +100,42 @@ if.then83: ; preds = %if.else78 if.end87: ; preds = %if.then83 %arrayidx88 = getelementptr inbounds i8, ptr %str, i64 1 - %9 = load i8, ptr %arrayidx88, align 1 - %conv89 = zext i8 %9 to i32 + %8 = load i8, ptr %arrayidx88, align 1 + %conv89 = zext i8 %8 to i32 %and90 = and i32 %conv89, 192 %cmp91.not = icmp eq i32 %and90, 128 br i1 %cmp91.not, label %lor.lhs.false93, label %return lor.lhs.false93: ; preds = %if.end87 %arrayidx94 = getelementptr inbounds i8, ptr %str, i64 2 - %10 = load i8, ptr %arrayidx94, align 1 - %11 = and i8 %10, -64 - %cmp97.not = icmp eq i8 %11, -128 + %9 = load i8, ptr %arrayidx94, align 1 + %cmp97.not = icmp slt i8 %9, -64 br i1 %cmp97.not, label %lor.lhs.false99, label %return lor.lhs.false99: ; preds = %lor.lhs.false93 %arrayidx100 = getelementptr inbounds i8, ptr %str, i64 3 - %12 = load i8, ptr %arrayidx100, align 1 - %13 = and i8 %12, -64 - %cmp103.not = icmp eq i8 %13, -128 + %10 = load i8, ptr %arrayidx100, align 1 + %cmp103.not = icmp slt i8 %10, -64 br i1 %cmp103.not, label %if.end106, label %return if.end106: ; preds = %lor.lhs.false99 %and109 = shl nuw nsw i32 %conv, 18 - %14 = and i32 %and109, 1835008 + %11 = and i32 %and109, 1835008 %and114 = shl nuw nsw i32 %conv89, 12 %shl115 = and i32 %and114, 258048 - %or11733 = or disjoint i32 %shl115, %14 + %or11733 = or disjoint i32 %shl115, %11 %cmp129 = icmp ult i32 %or11733, 65536 br i1 %cmp129, label %return, label %if.end132 if.end132: ; preds = %if.end106 %or117 = zext nneg i32 %or11733 to i64 - %15 = and i8 %10, 63 - %and120 = zext nneg i8 %15 to i64 + %12 = and i8 %9, 63 + %and120 = zext nneg i8 %12 to i64 %shl121 = shl nuw nsw i64 %and120, 6 - %16 = and i8 %12, 63 - %conv127 = zext nneg i8 %16 to i64 - %17 = or disjoint i64 %shl121, %conv127 - %or128 = or disjoint i64 %17, %or117 + %13 = and i8 %10, 63 + %conv127 = zext nneg i8 %13 to i64 + %14 = or disjoint i64 %shl121, %conv127 + %or128 = or disjoint i64 %14, %or117 br label %if.end137 if.end137: ; preds = %if.end75, %if.end33, %if.end132, %if.then3 diff --git a/bench/openusd/optimized/assetPath.cpp.ll b/bench/openusd/optimized/assetPath.cpp.ll index a8bc49e11b0..946dd48fa65 100644 --- a/bench/openusd/optimized/assetPath.cpp.ll +++ b/bench/openusd/optimized/assetPath.cpp.ll @@ -892,12 +892,12 @@ define internal fastcc noundef i32 @_ZN32pxrInternal_v0_24__pxrReserved__L9_Read store ptr %9, ptr %0, align 8 %10 = load i8, ptr %5, align 1 %11 = zext i8 %10 to i32 - br label %50 + br label %49 .preheader: ; preds = %2, %12 %.026 = phi i32 [ %13, %12 ], [ 2, %2 ] %exitcond.not = icmp eq i32 %.026, 5 - br i1 %exitcond.not, label %47, label %12 + br i1 %exitcond.not, label %46, label %12 12: ; preds = %.preheader %13 = add nuw nsw i32 %.026, 1 @@ -922,49 +922,48 @@ define internal fastcc noundef i32 @_ZN32pxrInternal_v0_24__pxrReserved__L9_Read %28 = zext nneg i32 %.026 to i64 br label %29 -29: ; preds = %24, %40 - %indvars.iv = phi i64 [ 1, %24 ], [ %indvars.iv.next, %40 ] - %.02533 = phi i32 [ %27, %24 ], [ %44, %40 ] +29: ; preds = %24, %39 + %indvars.iv = phi i64 [ 1, %24 ], [ %indvars.iv.next, %39 ] + %.02533 = phi i32 [ %27, %24 ], [ %43, %39 ] %30 = getelementptr inbounds i8, ptr %5, i64 %indvars.iv %31 = load i8, ptr %30, align 1 - %32 = and i8 %31, -64 - %33 = icmp eq i8 %32, -128 - br i1 %33, label %40, label %34 - -34: ; preds = %29 - %35 = shl i64 %indvars.iv, 32 - %sext = add i64 %35, -4294967296 - %36 = ashr exact i64 %sext, 32 - %37 = getelementptr inbounds [4 x ptr], ptr @__const._ZN32pxrInternal_v0_24__pxrReserved__L9_ReadUTF8ERPKhPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.ordinalWords, i64 0, i64 %36 - %38 = load ptr, ptr %37, align 8 - call void (ptr, ptr, ...) @_ZN32pxrInternal_v0_24__pxrReserved__14TfStringPrintfB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull @.str.12, i32 noundef %.026, ptr noundef %38) - %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %3) #16 + %32 = icmp slt i8 %31, -64 + br i1 %32, label %39, label %33 + +33: ; preds = %29 + %34 = shl i64 %indvars.iv, 32 + %sext = add i64 %34, -4294967296 + %35 = ashr exact i64 %sext, 32 + %36 = getelementptr inbounds [4 x ptr], ptr @__const._ZN32pxrInternal_v0_24__pxrReserved__L9_ReadUTF8ERPKhPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.ordinalWords, i64 0, i64 %35 + %37 = load ptr, ptr %36, align 8 + call void (ptr, ptr, ...) @_ZN32pxrInternal_v0_24__pxrReserved__14TfStringPrintfB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull @.str.12, i32 noundef %.026, ptr noundef %37) + %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %3) #16 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #16 - br label %50 + br label %49 -40: ; preds = %29 - %41 = shl i32 %.02533, 6 - %42 = and i8 %31, 63 - %43 = zext nneg i8 %42 to i32 - %44 = or disjoint i32 %41, %43 +39: ; preds = %29 + %40 = shl i32 %.02533, 6 + %41 = and i8 %31, 63 + %42 = zext nneg i8 %41 to i32 + %43 = or disjoint i32 %40, %42 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.not = icmp eq i64 %indvars.iv.next, %28 - br i1 %.not, label %45, label %29, !llvm.loop !13 + br i1 %.not, label %44, label %29, !llvm.loop !13 -45: ; preds = %40 - %46 = getelementptr inbounds i8, ptr %5, i64 %28 - store ptr %46, ptr %0, align 8 - br label %50 +44: ; preds = %39 + %45 = getelementptr inbounds i8, ptr %5, i64 %28 + store ptr %45, ptr %0, align 8 + br label %49 -47: ; preds = %.preheader - %48 = zext i8 %6 to i32 - call void (ptr, ptr, ...) @_ZN32pxrInternal_v0_24__pxrReserved__14TfStringPrintfB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.13, i32 noundef %48) - %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %4) #16 +46: ; preds = %.preheader + %47 = zext i8 %6 to i32 + call void (ptr, ptr, ...) @_ZN32pxrInternal_v0_24__pxrReserved__14TfStringPrintfB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.13, i32 noundef %47) + %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %4) #16 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #16 - br label %50 + br label %49 -50: ; preds = %47, %45, %34, %8 - %.027 = phi i32 [ %11, %8 ], [ -1, %34 ], [ %44, %45 ], [ -1, %47 ] +49: ; preds = %46, %44, %33, %8 + %.027 = phi i32 [ %11, %8 ], [ -1, %33 ], [ %43, %44 ], [ -1, %46 ] ret i32 %.027 } diff --git a/bench/openusd/optimized/fileIO_Common.cpp.ll b/bench/openusd/optimized/fileIO_Common.cpp.ll index 19aa72c2b52..c0be8bab1bd 100644 --- a/bench/openusd/optimized/fileIO_Common.cpp.ll +++ b/bench/openusd/optimized/fileIO_Common.cpp.ll @@ -5331,7 +5331,7 @@ define void @_ZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNS %13 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %.023) to label %15 unwind label %.loopexit.split-lp -.loopexit47: ; preds = %.invoke55, %.invoke, %_ZN32pxrInternal_v0_24__pxrReserved__L16_IsUTF8MultiByteEPKc.exit, %59, %64 +.loopexit47: ; preds = %.invoke55, %.invoke, %_ZN32pxrInternal_v0_24__pxrReserved__L16_IsUTF8MultiByteEPKc.exit, %58, %63 %lpad.loopexit = landingpad { ptr, i32 } cleanup br label %14 @@ -5362,8 +5362,8 @@ define void @_ZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNS br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" - %22 = phi i8 [ %19, %.preheader.lr.ph ], [ %76, %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" ] - %.050 = phi ptr [ %18, %.preheader.lr.ph ], [ %75, %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" ] + %22 = phi i8 [ %19, %.preheader.lr.ph ], [ %75, %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" ] + %.050 = phi ptr [ %18, %.preheader.lr.ph ], [ %74, %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" ] br label %23 23: ; preds = %.preheader, %24 @@ -5400,97 +5400,96 @@ define void @_ZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNS %indvars.iv.i = phi i64 [ 1, %.preheader.i ], [ %indvars.iv.next.i, %37 ] %39 = getelementptr inbounds i8, ptr %.050, i64 %indvars.iv.i %40 = load i8, ptr %39, align 1 - %41 = and i8 %40, -64 - %42 = icmp eq i8 %41, -128 - br i1 %42, label %37, label %.loopexit + %41 = icmp slt i8 %40, -64 + br i1 %41, label %37, label %.loopexit _ZN32pxrInternal_v0_24__pxrReserved__L16_IsUTF8MultiByteEPKc.exit: ; preds = %37 - %43 = getelementptr inbounds i8, ptr %.050, i64 %36 + %42 = getelementptr inbounds i8, ptr %.050, i64 %36 + %43 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #18 %44 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #18 - %45 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #18 - %46 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_S8_S8_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %44, ptr %45, ptr noundef nonnull %.050, ptr noundef nonnull %43) + %45 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_S8_S8_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %43, ptr %44, ptr noundef nonnull %.050, ptr noundef nonnull %42) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIPKcvEERS4_T_S9_.exit unwind label %.loopexit47 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIPKcvEERS4_T_S9_.exit: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__L16_IsUTF8MultiByteEPKc.exit - %47 = add nsw i32 %.011.i, -1 - %48 = sext i32 %47 to i64 - %49 = getelementptr inbounds i8, ptr %.050, i64 %48 + %46 = add nsw i32 %.011.i, -1 + %47 = sext i32 %46 to i64 + %48 = getelementptr inbounds i8, ptr %.050, i64 %47 br label %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" .loopexit: ; preds = %23, %38 - switch i8 %22, label %57 [ - i8 10, label %50 + switch i8 %22, label %56 [ + i8 10, label %49 i8 13, label %.invoke55 - i8 9, label %55 - i8 92, label %56 + i8 9, label %54 + i8 92, label %55 ] -50: ; preds = %.loopexit +49: ; preds = %.loopexit br i1 %.not26.not, label %.invoke55, label %.invoke -.invoke: ; preds = %61, %59, %50 - %51 = phi i8 [ 10, %50 ], [ %.023, %59 ], [ %22, %61 ] - %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %51) +.invoke: ; preds = %60, %58, %49 + %50 = phi i8 [ 10, %49 ], [ %.023, %58 ], [ %22, %60 ] + %51 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext %50) to label %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" unwind label %.loopexit47 -.invoke55: ; preds = %.loopexit, %50, %56, %55 - %53 = phi ptr [ @.str.37, %55 ], [ @.str.38, %56 ], [ @.str.35, %50 ], [ @.str.36, %.loopexit ] - %54 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %53) +.invoke55: ; preds = %.loopexit, %49, %55, %54 + %52 = phi ptr [ @.str.37, %54 ], [ @.str.38, %55 ], [ @.str.35, %49 ], [ @.str.36, %.loopexit ] + %53 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %52) to label %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" unwind label %.loopexit47 -55: ; preds = %.loopexit +54: ; preds = %.loopexit br label %.invoke55 -56: ; preds = %.loopexit +55: ; preds = %.loopexit br label %.invoke55 -57: ; preds = %.loopexit - %58 = icmp eq i8 %22, %.023 - br i1 %58, label %59, label %61 +56: ; preds = %.loopexit + %57 = icmp eq i8 %22, %.023 + br i1 %57, label %58, label %60 -59: ; preds = %57 - %60 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 92) +58: ; preds = %56 + %59 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 92) to label %.invoke unwind label %.loopexit47 -61: ; preds = %57 - %62 = add i8 %22, -32 - %63 = icmp ult i8 %62, 95 - br i1 %63, label %.invoke, label %64 +60: ; preds = %56 + %61 = add i8 %22, -32 + %62 = icmp ult i8 %61, 95 + br i1 %62, label %.invoke, label %63 -64: ; preds = %61 +63: ; preds = %60 call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %3) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(5) %3, ptr noundef nonnull align 1 dereferenceable(5) @__const._ZN32pxrInternal_v0_24__pxrReserved__L15_WriteHexEscapeEhPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.buf, i64 5, i1 false) - %65 = zext i8 %22 to i32 - %66 = lshr i32 %65, 4 - %67 = zext nneg i32 %66 to i64 - %68 = getelementptr inbounds i8, ptr @.str.39, i64 %67 - %69 = load i8, ptr %68, align 1 - store i8 %69, ptr %20, align 1 - %70 = and i32 %65, 15 - %71 = zext nneg i32 %70 to i64 - %72 = getelementptr inbounds i8, ptr @.str.39, i64 %71 - %73 = load i8, ptr %72, align 1 - store i8 %73, ptr %21, align 1 - %74 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %3) + %64 = zext i8 %22 to i32 + %65 = lshr i32 %64, 4 + %66 = zext nneg i32 %65 to i64 + %67 = getelementptr inbounds i8, ptr @.str.39, i64 %66 + %68 = load i8, ptr %67, align 1 + store i8 %68, ptr %20, align 1 + %69 = and i32 %64, 15 + %70 = zext nneg i32 %69 to i64 + %71 = getelementptr inbounds i8, ptr @.str.39, i64 %70 + %72 = load i8, ptr %71, align 1 + store i8 %72, ptr %21, align 1 + %73 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %3) to label %.noexc35 unwind label %.loopexit47 -.noexc35: ; preds = %64 +.noexc35: ; preds = %63 call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %3) br label %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit" "_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit": ; preds = %.invoke55, %.invoke, %.noexc35, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIPKcvEERS4_T_S9_.exit - %.1 = phi ptr [ %49, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIPKcvEERS4_T_S9_.exit ], [ %.050, %.noexc35 ], [ %.050, %.invoke ], [ %.050, %.invoke55 ] - %75 = getelementptr inbounds i8, ptr %.1, i64 1 - %76 = load i8, ptr %75, align 1 - %.not27 = icmp eq i8 %76, 0 + %.1 = phi ptr [ %48, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIPKcvEERS4_T_S9_.exit ], [ %.050, %.noexc35 ], [ %.050, %.invoke ], [ %.050, %.invoke55 ] + %74 = getelementptr inbounds i8, ptr %.1, i64 1 + %75 = load i8, ptr %74, align 1 + %.not27 = icmp eq i8 %75, 0 br i1 %.not27, label %._crit_edge, label %.preheader, !llvm.loop !10 ._crit_edge: ; preds = %"_ZZN32pxrInternal_v0_24__pxrReserved__17Sdf_FileIOUtility5QuoteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clEc.exit", %17 - %77 = select i1 %.not26.not, i64 1, i64 3 - %78 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEmc(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %77, i8 noundef signext %.023) - to label %79 unwind label %.loopexit.split-lp + %76 = select i1 %.not26.not, i64 1, i64 3 + %77 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEmc(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %76, i8 noundef signext %.023) + to label %78 unwind label %.loopexit.split-lp -79: ; preds = %._crit_edge +78: ; preds = %._crit_edge ret void } diff --git a/bench/php/optimized/html_document.ll b/bench/php/optimized/html_document.ll index e2b7d95e450..fdc7b471e8d 100644 --- a/bench/php/optimized/html_document.ll +++ b/bench/php/optimized/html_document.ll @@ -588,8 +588,8 @@ define internal void @dom_lexbor_libxml2_bridge_tokenizer_error_reporter(ptr noc %exitcond.not.i = icmp eq i64 %30, %spec.select.i br i1 %exitcond.not.i, label %dom_find_line_and_column_using_cache.exit, label %18 -31: ; preds = %43, %.lr.ph34.i - %storemerge3233.i = phi i64 [ %.promoted.i, %.lr.ph34.i ], [ %storemerge.i, %43 ] +31: ; preds = %42, %.lr.ph34.i + %storemerge3233.i = phi i64 [ %.promoted.i, %.lr.ph34.i ], [ %storemerge.i, %42 ] %32 = getelementptr inbounds i8, ptr %17, i64 %storemerge3233.i %33 = load i8, ptr %32, align 1 %34 = icmp eq i8 %33, 10 @@ -602,47 +602,46 @@ define internal void @dom_lexbor_libxml2_bridge_tokenizer_error_reporter(ptr noc br label %.sink.split.i 38: ; preds = %31 - %39 = and i8 %33, -64 - %.not29.i = icmp eq i8 %39, -128 - br i1 %.not29.i, label %43, label %40 + %.not29.i = icmp slt i8 %33, -64 + br i1 %.not29.i, label %42, label %39 -40: ; preds = %38 - %41 = load i64, ptr %16, align 8 - %42 = add i64 %41, 1 +39: ; preds = %38 + %40 = load i64, ptr %16, align 8 + %41 = add i64 %40, 1 br label %.sink.split.i -.sink.split.i: ; preds = %40, %35 - %.sink.i = phi i64 [ %42, %40 ], [ 1, %35 ] +.sink.split.i: ; preds = %39, %35 + %.sink.i = phi i64 [ %41, %39 ], [ 1, %35 ] store i64 %.sink.i, ptr %16, align 8 - br label %43 + br label %42 -43: ; preds = %.sink.split.i, %38 +42: ; preds = %.sink.split.i, %38 %storemerge.i = add nuw i64 %storemerge3233.i, 1 store i64 %storemerge.i, ptr %12, align 8 %exitcond36.not.i = icmp eq i64 %storemerge.i, %spec.select.i br i1 %exitcond36.not.i, label %dom_find_line_and_column_using_cache.exit, label %31 -dom_find_line_and_column_using_cache.exit: ; preds = %29, %43, %.preheader30.i, %.preheader.i - %44 = load ptr, ptr %0, align 8 - %45 = load i64, ptr %4, align 8 - %46 = getelementptr inbounds i8, ptr %0, i64 48 - %47 = load i64, ptr %46, align 8 - %48 = getelementptr inbounds i8, ptr %1, i64 8 - %49 = load i32, ptr %48, align 8 - %50 = icmp ult i32 %49, 49 - br i1 %50, label %switch.lookup, label %dom_lexbor_tokenizer_error_code_to_string.exit +dom_find_line_and_column_using_cache.exit: ; preds = %29, %42, %.preheader30.i, %.preheader.i + %43 = load ptr, ptr %0, align 8 + %44 = load i64, ptr %4, align 8 + %45 = getelementptr inbounds i8, ptr %0, i64 48 + %46 = load i64, ptr %45, align 8 + %47 = getelementptr inbounds i8, ptr %1, i64 8 + %48 = load i32, ptr %47, align 8 + %49 = icmp ult i32 %48, 49 + br i1 %49, label %switch.lookup, label %dom_lexbor_tokenizer_error_code_to_string.exit switch.lookup: ; preds = %dom_find_line_and_column_using_cache.exit - %51 = zext nneg i32 %49 to i64 - %switch.gep = getelementptr inbounds [49 x ptr], ptr @switch.table.dom_lexbor_libxml2_bridge_tokenizer_error_reporter, i64 0, i64 %51 + %50 = zext nneg i32 %48 to i64 + %switch.gep = getelementptr inbounds [49 x ptr], ptr @switch.table.dom_lexbor_libxml2_bridge_tokenizer_error_reporter, i64 0, i64 %50 %switch.load = load ptr, ptr %switch.gep, align 8 br label %dom_lexbor_tokenizer_error_code_to_string.exit dom_lexbor_tokenizer_error_code_to_string.exit: ; preds = %dom_find_line_and_column_using_cache.exit, %switch.lookup %.0.i = phi ptr [ %switch.load, %switch.lookup ], [ @.str.70, %dom_find_line_and_column_using_cache.exit ] - %52 = trunc i64 %47 to i32 - %53 = trunc i64 %45 to i32 - tail call void (ptr, i32, i32, ptr, ...) @php_libxml_pretend_ctx_error_ex(ptr noundef %44, i32 noundef %53, i32 noundef %52, ptr noundef nonnull @.str.20, ptr noundef nonnull %.0.i, ptr noundef %44, i64 noundef %45, i64 noundef %47) #11 + %51 = trunc i64 %46 to i32 + %52 = trunc i64 %44 to i32 + tail call void (ptr, i32, i32, ptr, ...) @php_libxml_pretend_ctx_error_ex(ptr noundef %43, i32 noundef %52, i32 noundef %51, ptr noundef nonnull @.str.20, ptr noundef nonnull %.0.i, ptr noundef %43, i64 noundef %44, i64 noundef %46) #11 ret void } @@ -2415,7 +2414,7 @@ define internal fastcc noundef zeroext i1 @dom_process_parse_chunk(ptr noundef n store i64 %5, ptr %11, align 8 %12 = tail call i32 @lxb_html_document_parse_chunk(ptr noundef nonnull %1, ptr noundef %4, i64 noundef %3) #11 %.not = icmp eq i32 %12, 0 - br i1 %.not, label %13, label %60 + br i1 %.not, label %13, label %59 13: ; preds = %8 %14 = load ptr, ptr %0, align 8 @@ -2486,8 +2485,8 @@ define internal fastcc noundef zeroext i1 @dom_process_parse_chunk(ptr noundef n %exitcond.not.i = icmp eq i64 %42, %spec.select.i br i1 %exitcond.not.i, label %dom_find_line_and_column_using_cache.exit, label %30 -43: ; preds = %55, %.lr.ph34.i - %storemerge3233.i = phi i64 [ %.promoted.i, %.lr.ph34.i ], [ %storemerge.i, %55 ] +43: ; preds = %54, %.lr.ph34.i + %storemerge3233.i = phi i64 [ %.promoted.i, %.lr.ph34.i ], [ %storemerge.i, %54 ] %44 = getelementptr inbounds i8, ptr %.pre, i64 %storemerge3233.i %45 = load i8, ptr %44, align 1 %46 = icmp eq i8 %45, 10 @@ -2500,36 +2499,35 @@ define internal fastcc noundef zeroext i1 @dom_process_parse_chunk(ptr noundef n br label %.sink.split.i 50: ; preds = %43 - %51 = and i8 %45, -64 - %.not29.i = icmp eq i8 %51, -128 - br i1 %.not29.i, label %55, label %52 + %.not29.i = icmp slt i8 %45, -64 + br i1 %.not29.i, label %54, label %51 -52: ; preds = %50 - %53 = load i64, ptr %29, align 8 - %54 = add i64 %53, 1 +51: ; preds = %50 + %52 = load i64, ptr %29, align 8 + %53 = add i64 %52, 1 br label %.sink.split.i -.sink.split.i: ; preds = %52, %47 - %.sink.i = phi i64 [ %54, %52 ], [ 1, %47 ] +.sink.split.i: ; preds = %51, %47 + %.sink.i = phi i64 [ %53, %51 ], [ 1, %47 ] store i64 %.sink.i, ptr %29, align 8 - br label %55 + br label %54 -55: ; preds = %.sink.split.i, %50 +54: ; preds = %.sink.split.i, %50 %storemerge.i = add nuw i64 %storemerge3233.i, 1 store i64 %storemerge.i, ptr %25, align 8 %exitcond36.not.i = icmp eq i64 %storemerge.i, %spec.select.i br i1 %exitcond36.not.i, label %dom_find_line_and_column_using_cache.exit, label %43 -dom_find_line_and_column_using_cache.exit: ; preds = %41, %55, %.preheader.i, %.preheader30.i, %15 - %56 = getelementptr inbounds i8, ptr %10, i64 32 - %57 = load i64, ptr %56, align 8 - %58 = add i64 %57, %5 - store i64 %58, ptr %56, align 8 - %59 = getelementptr inbounds i8, ptr %10, i64 56 - store i64 0, ptr %59, align 8 - br label %60 +dom_find_line_and_column_using_cache.exit: ; preds = %41, %54, %.preheader.i, %.preheader30.i, %15 + %55 = getelementptr inbounds i8, ptr %10, i64 32 + %56 = load i64, ptr %55, align 8 + %57 = add i64 %56, %5 + store i64 %57, ptr %55, align 8 + %58 = getelementptr inbounds i8, ptr %10, i64 56 + store i64 0, ptr %58, align 8 + br label %59 -60: ; preds = %8, %dom_find_line_and_column_using_cache.exit +59: ; preds = %8, %dom_find_line_and_column_using_cache.exit ret i1 %.not } diff --git a/bench/php/optimized/libxml.ll b/bench/php/optimized/libxml.ll index 5148773b005..cab6ae41889 100644 --- a/bench/php/optimized/libxml.ll +++ b/bench/php/optimized/libxml.ll @@ -2822,85 +2822,79 @@ define range(i32 0, 2) i32 @php_libxml_xmlCheckUTF8(ptr nocapture noundef readon %.not26 = icmp eq i8 %2, 0 br i1 %.not26, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %1, %44 - %3 = phi i8 [ %47, %44 ], [ %2, %1 ] - %4 = phi ptr [ %46, %44 ], [ %0, %1 ] - %5 = phi i64 [ %45, %44 ], [ 1, %1 ] - %.01827 = phi i64 [ %.1, %44 ], [ 0, %1 ] +.lr.ph: ; preds = %1, %38 + %3 = phi i8 [ %41, %38 ], [ %2, %1 ] + %4 = phi ptr [ %40, %38 ], [ %0, %1 ] + %5 = phi i64 [ %39, %38 ], [ 1, %1 ] + %.01827 = phi i64 [ %.1, %38 ], [ 0, %1 ] %6 = zext i8 %3 to i32 %7 = icmp sgt i8 %3, -1 - br i1 %7, label %44, label %8 + br i1 %7, label %38, label %8 8: ; preds = %.lr.ph %9 = and i32 %6, 224 %10 = icmp eq i32 %9, 192 - br i1 %10, label %11, label %16 + br i1 %10, label %11, label %15 11: ; preds = %8 %12 = add i64 %.01827, 2 %13 = getelementptr inbounds i8, ptr %0, i64 %5 %14 = load i8, ptr %13, align 1 - %15 = and i8 %14, -64 - %.not25 = icmp eq i8 %15, -128 - br i1 %.not25, label %44, label %._crit_edge + %.not25 = icmp slt i8 %14, -64 + br i1 %.not25, label %38, label %._crit_edge -16: ; preds = %8 - %17 = and i32 %6, 240 - %18 = icmp eq i32 %17, 224 - br i1 %18, label %19, label %28 +15: ; preds = %8 + %16 = and i32 %6, 240 + %17 = icmp eq i32 %16, 224 + br i1 %17, label %18, label %25 -19: ; preds = %16 - %20 = getelementptr inbounds i8, ptr %0, i64 %5 - %21 = load i8, ptr %20, align 1 - %22 = and i8 %21, -64 - %.not23 = icmp eq i8 %22, -128 - br i1 %.not23, label %23, label %._crit_edge - -23: ; preds = %19 - %24 = add i64 %.01827, 3 - %25 = getelementptr i8, ptr %4, i64 2 - %26 = load i8, ptr %25, align 1 - %27 = and i8 %26, -64 - %.not24 = icmp eq i8 %27, -128 - br i1 %.not24, label %44, label %._crit_edge - -28: ; preds = %16 - %29 = and i32 %6, 248 - %30 = icmp eq i32 %29, 240 - br i1 %30, label %31, label %._crit_edge +18: ; preds = %15 + %19 = getelementptr inbounds i8, ptr %0, i64 %5 + %20 = load i8, ptr %19, align 1 + %.not23 = icmp slt i8 %20, -64 + br i1 %.not23, label %21, label %._crit_edge + +21: ; preds = %18 + %22 = add i64 %.01827, 3 + %23 = getelementptr i8, ptr %4, i64 2 + %24 = load i8, ptr %23, align 1 + %.not24 = icmp slt i8 %24, -64 + br i1 %.not24, label %38, label %._crit_edge + +25: ; preds = %15 + %26 = and i32 %6, 248 + %27 = icmp eq i32 %26, 240 + br i1 %27, label %28, label %._crit_edge + +28: ; preds = %25 + %29 = getelementptr inbounds i8, ptr %0, i64 %5 + %30 = load i8, ptr %29, align 1 + %.not20 = icmp slt i8 %30, -64 + br i1 %.not20, label %31, label %._crit_edge 31: ; preds = %28 - %32 = getelementptr inbounds i8, ptr %0, i64 %5 + %32 = getelementptr i8, ptr %4, i64 2 %33 = load i8, ptr %32, align 1 - %34 = and i8 %33, -64 - %.not20 = icmp eq i8 %34, -128 - br i1 %.not20, label %35, label %._crit_edge + %.not21 = icmp slt i8 %33, -64 + br i1 %.not21, label %34, label %._crit_edge -35: ; preds = %31 - %36 = getelementptr i8, ptr %4, i64 2 +34: ; preds = %31 + %35 = add i64 %.01827, 4 + %36 = getelementptr i8, ptr %4, i64 3 %37 = load i8, ptr %36, align 1 - %38 = and i8 %37, -64 - %.not21 = icmp eq i8 %38, -128 - br i1 %.not21, label %39, label %._crit_edge - -39: ; preds = %35 - %40 = add i64 %.01827, 4 - %41 = getelementptr i8, ptr %4, i64 3 - %42 = load i8, ptr %41, align 1 - %43 = and i8 %42, -64 - %.not22 = icmp eq i8 %43, -128 - br i1 %.not22, label %44, label %._crit_edge - -44: ; preds = %11, %39, %23, %.lr.ph - %.1 = phi i64 [ %5, %.lr.ph ], [ %12, %11 ], [ %24, %23 ], [ %40, %39 ] - %45 = add i64 %.1, 1 - %46 = getelementptr inbounds i8, ptr %0, i64 %.1 - %47 = load i8, ptr %46, align 1 - %.not = icmp eq i8 %47, 0 + %.not22 = icmp slt i8 %37, -64 + br i1 %.not22, label %38, label %._crit_edge + +38: ; preds = %11, %34, %21, %.lr.ph + %.1 = phi i64 [ %5, %.lr.ph ], [ %12, %11 ], [ %22, %21 ], [ %35, %34 ] + %39 = add i64 %.1, 1 + %40 = getelementptr inbounds i8, ptr %0, i64 %.1 + %41 = load i8, ptr %40, align 1 + %.not = icmp eq i8 %41, 0 br i1 %.not, label %._crit_edge, label %.lr.ph -._crit_edge: ; preds = %11, %23, %19, %39, %35, %31, %28, %44, %1 - %.0 = phi i32 [ 1, %1 ], [ 1, %44 ], [ 0, %28 ], [ 0, %31 ], [ 0, %35 ], [ 0, %39 ], [ 0, %19 ], [ 0, %23 ], [ 0, %11 ] +._crit_edge: ; preds = %11, %21, %18, %34, %31, %28, %25, %38, %1 + %.0 = phi i32 [ 1, %1 ], [ 1, %38 ], [ 0, %25 ], [ 0, %28 ], [ 0, %31 ], [ 0, %34 ], [ 0, %18 ], [ 0, %21 ], [ 0, %11 ] ret i32 %.0 } diff --git a/bench/postgres/optimized/like.ll b/bench/postgres/optimized/like.ll index a30faf0e078..bd24f000353 100644 --- a/bench/postgres/optimized/like.ll +++ b/bench/postgres/optimized/like.ll @@ -1640,7 +1640,7 @@ define internal fastcc range(i32 -1, 2) i32 @UTF8_MatchText(ptr nocapture nounde %.07933 = phi i32 [ %.079.be, %.backedge ], [ %3, %9 ] %.08432 = phi ptr [ %.084.be, %.backedge ], [ %2, %9 ] %13 = load i8, ptr %.08432, align 1 - switch i8 %13, label %72 [ + switch i8 %13, label %69 [ i8 92, label %15 i8 37, label %.preheader1 i8 95, label %.preheader5 @@ -1668,7 +1668,7 @@ define internal fastcc range(i32 -1, 2) i32 @UTF8_MatchText(ptr nocapture nounde %24 = load i8, ptr %23, align 1 %25 = load i8, ptr %.07135, align 1 %.not97 = icmp eq i8 %24, %25 - br i1 %.not97, label %74, label %.thread + br i1 %.not97, label %71, label %.thread .lr.ph51: ; preds = %.preheader1, %.critedge %.28149.in = phi i32 [ %.28149, %.critedge ], [ %.07933, %.preheader1 ] @@ -1681,7 +1681,7 @@ define internal fastcc range(i32 -1, 2) i32 @UTF8_MatchText(ptr nocapture nounde switch i8 %26, label %.loopexit [ i8 37, label %.critedge i8 95, label %27 - i8 92, label %39 + i8 92, label %38 ] 27: ; preds = %.lr.ph51 @@ -1705,134 +1705,131 @@ define internal fastcc range(i32 -1, 2) i32 @UTF8_MatchText(ptr nocapture nounde %33 = getelementptr i8, ptr %.3, i64 1 %34 = add nsw i32 %.375, -1 %35 = load i8, ptr %33, align 1 - %36 = and i8 %35, -64 - %37 = icmp eq i8 %36, -128 - br i1 %37, label %.preheader, label %.critedge, !llvm.loop !17 + %36 = icmp slt i8 %35, -64 + br i1 %36, label %.preheader, label %.critedge, !llvm.loop !17 .critedge: ; preds = %32, %.preheader, %.lr.ph51 %.274 = phi i32 [ %.17347, %.lr.ph51 ], [ %34, %32 ], [ 0, %.preheader ] %.2 = phi ptr [ %.148, %.lr.ph51 ], [ %33, %32 ], [ %scevgep87, %.preheader ] - %38 = icmp sgt i32 %.28149.in, 2 - br i1 %38, label %.lr.ph51, label %.thread, !llvm.loop !18 - -39: ; preds = %.lr.ph51 - %40 = icmp eq i32 %.28149, 1 - br i1 %40, label %41, label %45 - -41: ; preds = %39 - %42 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #9 - tail call void @llvm.assume(i1 %42) - %43 = tail call i32 @errcode(i32 noundef 84410498) #7 - %44 = tail call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.2) #7 + %37 = icmp sgt i32 %.28149.in, 2 + br i1 %37, label %.lr.ph51, label %.thread, !llvm.loop !18 + +38: ; preds = %.lr.ph51 + %39 = icmp eq i32 %.28149, 1 + br i1 %39, label %40, label %44 + +40: ; preds = %38 + %41 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #9 + tail call void @llvm.assume(i1 %41) + %42 = tail call i32 @errcode(i32 noundef 84410498) #7 + %43 = tail call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.2) #7 tail call void @errfinish(ptr noundef nonnull @.str.3, i32 noundef 168, ptr noundef nonnull @__func__.UTF8_MatchText) #7 unreachable -45: ; preds = %39 - %46 = getelementptr i8, ptr %.084.pn46, i64 2 - %47 = load i8, ptr %46, align 1 +44: ; preds = %38 + %45 = getelementptr i8, ptr %.084.pn46, i64 2 + %46 = load i8, ptr %45, align 1 br label %.loopexit -.loopexit: ; preds = %.lr.ph51, %45 - %.070 = phi i8 [ %47, %45 ], [ %26, %.lr.ph51 ] - %48 = icmp sgt i32 %.17347, 0 - br i1 %48, label %.lr.ph58, label %.thread +.loopexit: ; preds = %.lr.ph51, %44 + %.070 = phi i8 [ %46, %44 ], [ %26, %.lr.ph51 ] + %47 = icmp sgt i32 %.17347, 0 + br i1 %47, label %.lr.ph58, label %.thread .lr.ph58: ; preds = %.loopexit, %.critedge2 - %.456 = phi ptr [ %56, %.critedge2 ], [ %.148, %.loopexit ] - %.47655 = phi i32 [ %57, %.critedge2 ], [ %.17347, %.loopexit ] - %49 = load i8, ptr %.456, align 1 - %50 = icmp eq i8 %49, %.070 - br i1 %50, label %51, label %.preheader31 - -51: ; preds = %.lr.ph58 - %52 = tail call fastcc i32 @UTF8_MatchText(ptr noundef nonnull %.456, i32 noundef %.47655, ptr noundef nonnull %.28650, i32 noundef %.28149) - %.not96 = icmp eq i32 %52, 0 + %.456 = phi ptr [ %55, %.critedge2 ], [ %.148, %.loopexit ] + %.47655 = phi i32 [ %56, %.critedge2 ], [ %.17347, %.loopexit ] + %48 = load i8, ptr %.456, align 1 + %49 = icmp eq i8 %48, %.070 + br i1 %49, label %50, label %.preheader31 + +50: ; preds = %.lr.ph58 + %51 = tail call fastcc i32 @UTF8_MatchText(ptr noundef nonnull %.456, i32 noundef %.47655, ptr noundef nonnull %.28650, i32 noundef %.28149) + %.not96 = icmp eq i32 %51, 0 br i1 %.not96, label %.preheader31, label %.thread -.preheader31: ; preds = %51, %.lr.ph58 - br label %53 - -53: ; preds = %.preheader31, %55 - %.577 = phi i32 [ %57, %55 ], [ %.47655, %.preheader31 ] - %.5 = phi ptr [ %56, %55 ], [ %.456, %.preheader31 ] - %54 = icmp ugt i32 %.577, 1 - br i1 %54, label %55, label %.thread - -55: ; preds = %53 - %56 = getelementptr i8, ptr %.5, i64 1 - %57 = add nsw i32 %.577, -1 - %58 = load i8, ptr %56, align 1 - %59 = and i8 %58, -64 - %60 = icmp eq i8 %59, -128 - br i1 %60, label %53, label %.critedge2, !llvm.loop !19 - -.critedge2: ; preds = %55 - %61 = icmp sgt i32 %.577, 1 - br i1 %61, label %.lr.ph58, label %.thread, !llvm.loop !20 - -.preheader5: ; preds = %.lr.ph, %64 - %.678 = phi i32 [ %65, %64 ], [ %.07234, %.lr.ph ] - %.6 = phi ptr [ %62, %64 ], [ %.07135, %.lr.ph ] - %62 = getelementptr i8, ptr %.6, i64 1 - %63 = icmp sgt i32 %.678, 1 - br i1 %63, label %64, label %.backedge - -64: ; preds = %.preheader5 - %65 = add nsw i32 %.678, -1 - %66 = load i8, ptr %62, align 1 - %67 = and i8 %66, -64 - %68 = icmp eq i8 %67, -128 - br i1 %68, label %.preheader5, label %.backedge, !llvm.loop !21 - -.backedge: ; preds = %64, %.preheader5, %74 - %.185.pn = phi ptr [ %.185, %74 ], [ %.08432, %.preheader5 ], [ %.08432, %64 ] - %.079.be.in = phi i32 [ %.180, %74 ], [ %.07933, %.preheader5 ], [ %.07933, %64 ] - %.072.be = phi i32 [ %76, %74 ], [ %65, %64 ], [ 0, %.preheader5 ] - %.071.be = phi ptr [ %75, %74 ], [ %62, %.preheader5 ], [ %62, %64 ] +.preheader31: ; preds = %50, %.lr.ph58 + br label %52 + +52: ; preds = %.preheader31, %54 + %.577 = phi i32 [ %56, %54 ], [ %.47655, %.preheader31 ] + %.5 = phi ptr [ %55, %54 ], [ %.456, %.preheader31 ] + %53 = icmp ugt i32 %.577, 1 + br i1 %53, label %54, label %.thread + +54: ; preds = %52 + %55 = getelementptr i8, ptr %.5, i64 1 + %56 = add nsw i32 %.577, -1 + %57 = load i8, ptr %55, align 1 + %58 = icmp slt i8 %57, -64 + br i1 %58, label %52, label %.critedge2, !llvm.loop !19 + +.critedge2: ; preds = %54 + %59 = icmp sgt i32 %.577, 1 + br i1 %59, label %.lr.ph58, label %.thread, !llvm.loop !20 + +.preheader5: ; preds = %.lr.ph, %62 + %.678 = phi i32 [ %63, %62 ], [ %.07234, %.lr.ph ] + %.6 = phi ptr [ %60, %62 ], [ %.07135, %.lr.ph ] + %60 = getelementptr i8, ptr %.6, i64 1 + %61 = icmp sgt i32 %.678, 1 + br i1 %61, label %62, label %.backedge + +62: ; preds = %.preheader5 + %63 = add nsw i32 %.678, -1 + %64 = load i8, ptr %60, align 1 + %65 = icmp slt i8 %64, -64 + br i1 %65, label %.preheader5, label %.backedge, !llvm.loop !21 + +.backedge: ; preds = %62, %.preheader5, %71 + %.185.pn = phi ptr [ %.185, %71 ], [ %.08432, %.preheader5 ], [ %.08432, %62 ] + %.079.be.in = phi i32 [ %.180, %71 ], [ %.07933, %.preheader5 ], [ %.07933, %62 ] + %.072.be = phi i32 [ %73, %71 ], [ %63, %62 ], [ 0, %.preheader5 ] + %.071.be = phi ptr [ %72, %71 ], [ %60, %.preheader5 ], [ %60, %62 ] %.079.be = add nsw i32 %.079.be.in, -1 %.084.be = getelementptr i8, ptr %.185.pn, i64 1 - %69 = icmp sgt i32 %.072.be, 0 - %70 = icmp sgt i32 %.079.be.in, 1 - %71 = select i1 %69, i1 %70, i1 false - br i1 %71, label %.lr.ph, label %._crit_edge, !llvm.loop !22 - -72: ; preds = %.lr.ph - %73 = load i8, ptr %.07135, align 1 - %.not = icmp eq i8 %13, %73 - br i1 %.not, label %74, label %.thread - -74: ; preds = %72, %21 - %.185 = phi ptr [ %23, %21 ], [ %.08432, %72 ] - %.180 = phi i32 [ %22, %21 ], [ %.07933, %72 ] - %75 = getelementptr i8, ptr %.07135, i64 1 - %76 = add nsw i32 %.07234, -1 + %66 = icmp sgt i32 %.072.be, 0 + %67 = icmp sgt i32 %.079.be.in, 1 + %68 = select i1 %66, i1 %67, i1 false + br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !22 + +69: ; preds = %.lr.ph + %70 = load i8, ptr %.07135, align 1 + %.not = icmp eq i8 %13, %70 + br i1 %.not, label %71, label %.thread + +71: ; preds = %69, %21 + %.185 = phi ptr [ %23, %21 ], [ %.08432, %69 ] + %.180 = phi i32 [ %22, %21 ], [ %.07933, %69 ] + %72 = getelementptr i8, ptr %.07135, i64 1 + %73 = add nsw i32 %.07234, -1 br label %.backedge ._crit_edge: ; preds = %.backedge, %9 %.084.lcssa = phi ptr [ %2, %9 ], [ %.084.be, %.backedge ] %.079.lcssa = phi i32 [ %3, %9 ], [ %.079.be, %.backedge ] - %.lcssa16 = phi i1 [ %10, %9 ], [ %69, %.backedge ] + %.lcssa16 = phi i1 [ %10, %9 ], [ %66, %.backedge ] br i1 %.lcssa16, label %.thread, label %.preheader4 .preheader4: ; preds = %._crit_edge - %77 = icmp sgt i32 %.079.lcssa, 0 - br i1 %77, label %.lr.ph40, label %.thread - -.lr.ph40: ; preds = %.preheader4, %80 - %.48339 = phi i32 [ %82, %80 ], [ %.079.lcssa, %.preheader4 ] - %.48838 = phi ptr [ %81, %80 ], [ %.084.lcssa, %.preheader4 ] - %78 = load i8, ptr %.48838, align 1 - %79 = icmp eq i8 %78, 37 - br i1 %79, label %80, label %.thread - -80: ; preds = %.lr.ph40 - %81 = getelementptr i8, ptr %.48838, i64 1 - %82 = add nsw i32 %.48339, -1 - %83 = icmp sgt i32 %.48339, 1 - br i1 %83, label %.lr.ph40, label %.thread, !llvm.loop !23 - -.thread: ; preds = %72, %21, %27, %.critedge, %51, %.critedge2, %53, %80, %.lr.ph40, %.preheader4, %.preheader1, %.loopexit, %._crit_edge, %6 - %.0 = phi i32 [ 1, %6 ], [ 0, %._crit_edge ], [ -1, %.loopexit ], [ 1, %.preheader1 ], [ 1, %.preheader4 ], [ 1, %80 ], [ -1, %.lr.ph40 ], [ -1, %53 ], [ %52, %51 ], [ -1, %.critedge2 ], [ -1, %27 ], [ 1, %.critedge ], [ 0, %21 ], [ 0, %72 ] + %74 = icmp sgt i32 %.079.lcssa, 0 + br i1 %74, label %.lr.ph40, label %.thread + +.lr.ph40: ; preds = %.preheader4, %77 + %.48339 = phi i32 [ %79, %77 ], [ %.079.lcssa, %.preheader4 ] + %.48838 = phi ptr [ %78, %77 ], [ %.084.lcssa, %.preheader4 ] + %75 = load i8, ptr %.48838, align 1 + %76 = icmp eq i8 %75, 37 + br i1 %76, label %77, label %.thread + +77: ; preds = %.lr.ph40 + %78 = getelementptr i8, ptr %.48838, i64 1 + %79 = add nsw i32 %.48339, -1 + %80 = icmp sgt i32 %.48339, 1 + br i1 %80, label %.lr.ph40, label %.thread, !llvm.loop !23 + +.thread: ; preds = %69, %21, %27, %.critedge, %50, %.critedge2, %52, %77, %.lr.ph40, %.preheader4, %.preheader1, %.loopexit, %._crit_edge, %6 + %.0 = phi i32 [ 1, %6 ], [ 0, %._crit_edge ], [ -1, %.loopexit ], [ 1, %.preheader1 ], [ 1, %.preheader4 ], [ 1, %77 ], [ -1, %.lr.ph40 ], [ -1, %52 ], [ %51, %50 ], [ -1, %.critedge2 ], [ -1, %27 ], [ 1, %.critedge ], [ 0, %21 ], [ 0, %69 ] ret i32 %.0 } diff --git a/bench/postgres/optimized/mbprint.ll b/bench/postgres/optimized/mbprint.ll index cf576aa1f98..4c31d5b7fed 100644 --- a/bench/postgres/optimized/mbprint.ll +++ b/bench/postgres/optimized/mbprint.ll @@ -445,7 +445,7 @@ pg_get_utf8_id.exit: ; preds = %2, %5 br i1 %.not30.i, label %mb_utf_validate.exit, label %.lr.ph.i .lr.ph.i: ; preds = %9, %.loopexit.i - %11 = phi i8 [ %86, %.loopexit.i ], [ %10, %9 ] + %11 = phi i8 [ %84, %.loopexit.i ], [ %10, %9 ] %.01732.i = phi ptr [ %.2.i, %.loopexit.i ], [ %0, %9 ] %.01831.i = phi ptr [ %.220.i, %.loopexit.i ], [ %0, %9 ] %12 = zext i8 %11 to i32 @@ -455,142 +455,140 @@ pg_get_utf8_id.exit: ; preds = %2, %5 14: ; preds = %.lr.ph.i %15 = and i32 %12, 224 %16 = icmp eq i32 %15, 192 - br i1 %16, label %17, label %23 + br i1 %16, label %17, label %22 17: ; preds = %14 %18 = getelementptr i8, ptr %.01732.i, i64 1 %19 = load i8, ptr %18, align 1 - %20 = and i8 %19, -64 - %21 = icmp ne i8 %20, -128 - %22 = and i32 %12, 30 - %.not39.i.i = icmp eq i32 %22, 0 - %or.cond.i.i = or i1 %.not39.i.i, %21 + %20 = icmp sgt i8 %19, -65 + %21 = and i32 %12, 30 + %.not39.i.i = icmp eq i32 %21, 0 + %or.cond.i.i = or i1 %.not39.i.i, %20 br i1 %or.cond.i.i, label %select.unfold.i, label %utf_charcheck.exit.i -23: ; preds = %14 - %24 = and i32 %12, 240 - %25 = icmp eq i32 %24, 224 - br i1 %25, label %26, label %43 - -26: ; preds = %23 - %27 = getelementptr i8, ptr %.01732.i, i64 1 - %28 = load i8, ptr %27, align 1 - %29 = zext i8 %28 to i32 - %30 = and i32 %29, 192 - %31 = icmp eq i32 %30, 128 - br i1 %31, label %32, label %select.unfold.i - -32: ; preds = %26 - %33 = and i32 %12, 15 - %34 = and i32 %29, 32 - %35 = or disjoint i32 %34, %33 - %or.cond40.i.i = icmp eq i32 %35, 0 - br i1 %or.cond40.i.i, label %select.unfold.i, label %36 - -36: ; preds = %32 - %37 = getelementptr i8, ptr %.01732.i, i64 2 - %38 = load i8, ptr %37, align 1 - %39 = and i8 %38, -64 - %40 = icmp eq i8 %39, -128 - br i1 %40, label %41, label %select.unfold.i - -41: ; preds = %36 - %cond.i.i = icmp eq i32 %33, 13 - %42 = and i8 %28, 44 - %.old41.i.i = icmp eq i8 %42, 32 +22: ; preds = %14 + %23 = and i32 %12, 240 + %24 = icmp eq i32 %23, 224 + br i1 %24, label %25, label %41 + +25: ; preds = %22 + %26 = getelementptr i8, ptr %.01732.i, i64 1 + %27 = load i8, ptr %26, align 1 + %28 = zext i8 %27 to i32 + %29 = and i32 %28, 192 + %30 = icmp eq i32 %29, 128 + br i1 %30, label %31, label %select.unfold.i + +31: ; preds = %25 + %32 = and i32 %12, 15 + %33 = and i32 %28, 32 + %34 = or disjoint i32 %33, %32 + %or.cond40.i.i = icmp eq i32 %34, 0 + br i1 %or.cond40.i.i, label %select.unfold.i, label %35 + +35: ; preds = %31 + %36 = getelementptr i8, ptr %.01732.i, i64 2 + %37 = load i8, ptr %36, align 1 + %38 = icmp slt i8 %37, -64 + br i1 %38, label %39, label %select.unfold.i + +39: ; preds = %35 + %cond.i.i = icmp eq i32 %32, 13 + %40 = and i8 %27, 44 + %.old41.i.i = icmp eq i8 %40, 32 %or.cond50.i.i = and i1 %cond.i.i, %.old41.i.i br i1 %or.cond50.i.i, label %select.unfold.i, label %utf_charcheck.exit.i -43: ; preds = %23 - %44 = and i32 %12, 248 - %45 = icmp eq i32 %44, 240 - br i1 %45, label %46, label %select.unfold.i - -46: ; preds = %43 - %47 = shl nuw nsw i32 %12, 2 - %48 = and i32 %47, 28 - %49 = getelementptr i8, ptr %.01732.i, i64 1 - %50 = load i8, ptr %49, align 1 - %51 = zext i8 %50 to i32 - %52 = lshr i32 %51, 4 - %53 = and i32 %52, 3 - %54 = and i32 %51, 192 - %55 = icmp eq i32 %54, 128 - %56 = add nsw i32 %48, -1 - %57 = add nsw i32 %56, %53 - %58 = icmp ult i32 %57, 16 - %or.cond7.i.i = select i1 %55, i1 %58, i1 false - br i1 %or.cond7.i.i, label %59, label %select.unfold.i - -59: ; preds = %46 - %60 = getelementptr i8, ptr %.01732.i, i64 2 - %61 = load i8, ptr %60, align 1 - %62 = zext i8 %61 to i32 - %63 = and i32 %62, 192 - %64 = icmp eq i32 %63, 128 - br i1 %64, label %65, label %select.unfold.i - -65: ; preds = %59 - %66 = getelementptr i8, ptr %.01732.i, i64 3 - %67 = load i8, ptr %66, align 1 - %68 = zext i8 %67 to i32 - %69 = and i32 %68, 192 - %70 = icmp eq i32 %69, 128 - br i1 %70, label %71, label %select.unfold.i - -71: ; preds = %65 - %72 = and i32 %51, 15 - %73 = icmp eq i32 %72, 15 - %74 = and i32 %62, 63 - %75 = icmp eq i32 %74, 63 - %or.cond45.i.i = and i1 %73, %75 - %76 = and i32 %68, 62 - %77 = icmp eq i32 %76, 62 - %or.cond48.i.i = and i1 %or.cond45.i.i, %77 +41: ; preds = %22 + %42 = and i32 %12, 248 + %43 = icmp eq i32 %42, 240 + br i1 %43, label %44, label %select.unfold.i + +44: ; preds = %41 + %45 = shl nuw nsw i32 %12, 2 + %46 = and i32 %45, 28 + %47 = getelementptr i8, ptr %.01732.i, i64 1 + %48 = load i8, ptr %47, align 1 + %49 = zext i8 %48 to i32 + %50 = lshr i32 %49, 4 + %51 = and i32 %50, 3 + %52 = and i32 %49, 192 + %53 = icmp eq i32 %52, 128 + %54 = add nsw i32 %46, -1 + %55 = add nsw i32 %54, %51 + %56 = icmp ult i32 %55, 16 + %or.cond7.i.i = select i1 %53, i1 %56, i1 false + br i1 %or.cond7.i.i, label %57, label %select.unfold.i + +57: ; preds = %44 + %58 = getelementptr i8, ptr %.01732.i, i64 2 + %59 = load i8, ptr %58, align 1 + %60 = zext i8 %59 to i32 + %61 = and i32 %60, 192 + %62 = icmp eq i32 %61, 128 + br i1 %62, label %63, label %select.unfold.i + +63: ; preds = %57 + %64 = getelementptr i8, ptr %.01732.i, i64 3 + %65 = load i8, ptr %64, align 1 + %66 = zext i8 %65 to i32 + %67 = and i32 %66, 192 + %68 = icmp eq i32 %67, 128 + br i1 %68, label %69, label %select.unfold.i + +69: ; preds = %63 + %70 = and i32 %49, 15 + %71 = icmp eq i32 %70, 15 + %72 = and i32 %60, 63 + %73 = icmp eq i32 %72, 63 + %or.cond45.i.i = and i1 %71, %73 + %74 = and i32 %66, 62 + %75 = icmp eq i32 %74, 62 + %or.cond48.i.i = and i1 %or.cond45.i.i, %75 br i1 %or.cond48.i.i, label %select.unfold.i, label %utf_charcheck.exit.i -utf_charcheck.exit.i: ; preds = %71, %41, %17, %.lr.ph.i - %.0.i.i = phi i32 [ 1, %.lr.ph.i ], [ 2, %17 ], [ 4, %71 ], [ 3, %41 ] +utf_charcheck.exit.i: ; preds = %69, %39, %17, %.lr.ph.i + %.0.i.i = phi i32 [ 1, %.lr.ph.i ], [ 2, %17 ], [ 4, %69 ], [ 3, %39 ] %.not23.i = icmp eq ptr %.01831.i, %.01732.i - br i1 %.not23.i, label %82, label %.preheader.i + br i1 %.not23.i, label %80, label %.preheader.i .preheader.i: ; preds = %utf_charcheck.exit.i, %.preheader.i - %.029.i = phi i32 [ %81, %.preheader.i ], [ 0, %utf_charcheck.exit.i ] - %.128.i = phi ptr [ %78, %.preheader.i ], [ %.01732.i, %utf_charcheck.exit.i ] - %.11927.i = phi ptr [ %80, %.preheader.i ], [ %.01831.i, %utf_charcheck.exit.i ] - %78 = getelementptr i8, ptr %.128.i, i64 1 - %79 = load i8, ptr %.128.i, align 1 - %80 = getelementptr i8, ptr %.11927.i, i64 1 - store i8 %79, ptr %.11927.i, align 1 - %81 = add nuw nsw i32 %.029.i, 1 - %exitcond.not.i = icmp eq i32 %81, %.0.i.i + %.029.i = phi i32 [ %79, %.preheader.i ], [ 0, %utf_charcheck.exit.i ] + %.128.i = phi ptr [ %76, %.preheader.i ], [ %.01732.i, %utf_charcheck.exit.i ] + %.11927.i = phi ptr [ %78, %.preheader.i ], [ %.01831.i, %utf_charcheck.exit.i ] + %76 = getelementptr i8, ptr %.128.i, i64 1 + %77 = load i8, ptr %.128.i, align 1 + %78 = getelementptr i8, ptr %.11927.i, i64 1 + store i8 %77, ptr %.11927.i, align 1 + %79 = add nuw nsw i32 %.029.i, 1 + %exitcond.not.i = icmp eq i32 %79, %.0.i.i br i1 %exitcond.not.i, label %.loopexit.i, label %.preheader.i, !llvm.loop !10 -82: ; preds = %utf_charcheck.exit.i - %83 = zext nneg i32 %.0.i.i to i64 - %84 = getelementptr i8, ptr %.01732.i, i64 %83 +80: ; preds = %utf_charcheck.exit.i + %81 = zext nneg i32 %.0.i.i to i64 + %82 = getelementptr i8, ptr %.01732.i, i64 %81 br label %.loopexit.i -select.unfold.i: ; preds = %71, %65, %59, %46, %43, %41, %36, %32, %26, %17 - %85 = getelementptr i8, ptr %.01732.i, i64 1 +select.unfold.i: ; preds = %69, %63, %57, %44, %41, %39, %35, %31, %25, %17 + %83 = getelementptr i8, ptr %.01732.i, i64 1 br label %.loopexit.i -.loopexit.i: ; preds = %.preheader.i, %select.unfold.i, %82 - %.220.i = phi ptr [ %84, %82 ], [ %.01831.i, %select.unfold.i ], [ %80, %.preheader.i ] - %.2.i = phi ptr [ %84, %82 ], [ %85, %select.unfold.i ], [ %78, %.preheader.i ] - %86 = load i8, ptr %.2.i, align 1 - %.not.i = icmp eq i8 %86, 0 +.loopexit.i: ; preds = %.preheader.i, %select.unfold.i, %80 + %.220.i = phi ptr [ %82, %80 ], [ %.01831.i, %select.unfold.i ], [ %78, %.preheader.i ] + %.2.i = phi ptr [ %82, %80 ], [ %83, %select.unfold.i ], [ %76, %.preheader.i ] + %84 = load i8, ptr %.2.i, align 1 + %.not.i = icmp eq i8 %84, 0 br i1 %.not.i, label %._crit_edge.i, label %.lr.ph.i, !llvm.loop !11 ._crit_edge.i: ; preds = %.loopexit.i %.not22.i = icmp eq ptr %.220.i, %.2.i - br i1 %.not22.i, label %mb_utf_validate.exit, label %87 + br i1 %.not22.i, label %mb_utf_validate.exit, label %85 -87: ; preds = %._crit_edge.i +85: ; preds = %._crit_edge.i store i8 0, ptr %.220.i, align 1 br label %mb_utf_validate.exit -mb_utf_validate.exit: ; preds = %87, %._crit_edge.i, %9, %pg_get_utf8_id.exit +mb_utf_validate.exit: ; preds = %85, %._crit_edge.i, %9, %pg_get_utf8_id.exit ret ptr %0 } diff --git a/bench/postgres/optimized/xlog.ll b/bench/postgres/optimized/xlog.ll index f599c56ed27..568a208d35d 100644 --- a/bench/postgres/optimized/xlog.ll +++ b/bench/postgres/optimized/xlog.ll @@ -9491,10 +9491,10 @@ define dso_local void @xlog_redo(ptr noundef %0) local_unnamed_addr #0 { 198: ; preds = %197 %199 = icmp eq i8 %16, -80 - switch i8 %16, label %.loopexit [ + switch i8 %16, label %289 [ i8 -80, label %200 i8 -96, label %200 - i8 -128, label %289 + i8 80, label %.loopexit i8 96, label %238 ] @@ -9682,51 +9682,55 @@ define dso_local void @xlog_redo(ptr noundef %0) local_unnamed_addr #0 { br label %.loopexit 289: ; preds = %198 - %290 = getelementptr inbounds i8, ptr %13, i64 72 - %291 = load ptr, ptr %290, align 8 - %.0.copyload = load i8, ptr %291, align 1 - %292 = trunc i8 %.0.copyload to i1 - br i1 %292, label %312, label %293 - -293: ; preds = %289 - %294 = load ptr, ptr @XLogCtl, align 8 - %295 = getelementptr inbounds i8, ptr %294, i64 440 - %296 = tail call i8 asm sideeffect "\09lock\09\09\09\0A\09xchgb\09$0,$1\09\0A", "=q,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i8) %295, i8 1, ptr nonnull elementtype(i8) %295) #26, !srcloc !8 - %.not = icmp eq i8 %296, 0 - br i1 %.not, label %301, label %297 - -297: ; preds = %293 - %298 = load ptr, ptr @XLogCtl, align 8 - %299 = getelementptr inbounds i8, ptr %298, i64 440 - %300 = tail call i32 @s_lock(ptr noundef nonnull %299, ptr noundef nonnull @.str.14, i32 noundef 8411, ptr noundef nonnull @__func__.xlog_redo) #26 - br label %301 - -301: ; preds = %293, %297 - %302 = load ptr, ptr @XLogCtl, align 8 - %303 = getelementptr inbounds i8, ptr %302, i64 432 - %304 = load i64, ptr %303, align 8 - %305 = getelementptr inbounds i8, ptr %0, i64 40 + %290 = icmp slt i8 %15, -112 + br i1 %290, label %291, label %.loopexit + +291: ; preds = %289 + %292 = getelementptr inbounds i8, ptr %13, i64 72 + %293 = load ptr, ptr %292, align 8 + %.0.copyload = load i8, ptr %293, align 1 + %294 = trunc i8 %.0.copyload to i1 + br i1 %294, label %314, label %295 + +295: ; preds = %291 + %296 = load ptr, ptr @XLogCtl, align 8 + %297 = getelementptr inbounds i8, ptr %296, i64 440 + %298 = tail call i8 asm sideeffect "\09lock\09\09\09\0A\09xchgb\09$0,$1\09\0A", "=q,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i8) %297, i8 1, ptr nonnull elementtype(i8) %297) #26, !srcloc !8 + %.not = icmp eq i8 %298, 0 + br i1 %.not, label %303, label %299 + +299: ; preds = %295 + %300 = load ptr, ptr @XLogCtl, align 8 + %301 = getelementptr inbounds i8, ptr %300, i64 440 + %302 = tail call i32 @s_lock(ptr noundef nonnull %301, ptr noundef nonnull @.str.14, i32 noundef 8411, ptr noundef nonnull @__func__.xlog_redo) #26 + br label %303 + +303: ; preds = %295, %299 + %304 = load ptr, ptr @XLogCtl, align 8 + %305 = getelementptr inbounds i8, ptr %304, i64 432 %306 = load i64, ptr %305, align 8 - %307 = icmp ult i64 %304, %306 - br i1 %307, label %308, label %309 + %307 = getelementptr inbounds i8, ptr %0, i64 40 + %308 = load i64, ptr %307, align 8 + %309 = icmp ult i64 %306, %308 + br i1 %309, label %310, label %311 -308: ; preds = %301 - store i64 %306, ptr %303, align 8 - br label %309 +310: ; preds = %303 + store i64 %308, ptr %305, align 8 + br label %311 -309: ; preds = %301, %308 +311: ; preds = %303, %310 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #26, !srcloc !74 - %310 = load ptr, ptr @XLogCtl, align 8 - %311 = getelementptr inbounds i8, ptr %310, i64 440 - store i8 0, ptr %311, align 8 - br label %312 - -312: ; preds = %309, %289 - %313 = and i8 %.0.copyload, 1 - store i8 %313, ptr @lastFullPageWrites, align 1 + %312 = load ptr, ptr @XLogCtl, align 8 + %313 = getelementptr inbounds i8, ptr %312, i64 440 + store i8 0, ptr %313, align 8 + br label %314 + +314: ; preds = %311, %291 + %315 = and i8 %.0.copyload, 1 + store i8 %315, ptr @lastFullPageWrites, align 1 br label %.loopexit -.loopexit: ; preds = %232, %211, %200, %198, %197, %197, %197, %1, %125, %312, %277, %188, %187, %21 +.loopexit: ; preds = %232, %211, %200, %289, %198, %197, %197, %197, %1, %125, %314, %277, %188, %187, %21 ret void } diff --git a/bench/postgres/optimized/xlogdesc.ll b/bench/postgres/optimized/xlogdesc.ll index 34ba547e0ee..5667fdf0ee5 100644 --- a/bench/postgres/optimized/xlogdesc.ll +++ b/bench/postgres/optimized/xlogdesc.ll @@ -114,30 +114,27 @@ define dso_local void @xlog_desc(ptr noundef %0, ptr nocapture noundef readonly %49 = load i32, ptr %48, align 8 %50 = select i1 %12, ptr @.str.8, ptr @.str.9 tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.5, i32 noundef %15, i32 noundef %16, i32 noundef %18, i32 noundef %20, ptr noundef nonnull %24, i32 noundef %28, i32 noundef %29, i32 noundef %31, i32 noundef %33, i32 noundef %35, i32 noundef %37, i32 noundef %39, i32 noundef %41, i32 noundef %43, i32 noundef %45, i32 noundef %47, i32 noundef %49, ptr noundef nonnull %50) #3 - br label %83 + br label %86 51: ; preds = %2 %.0.copyload20 = load i32, ptr %6, align 1 tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.10, i32 noundef %.0.copyload20) #3 - br label %83 + br label %86 52: ; preds = %2 %53 = getelementptr inbounds i8, ptr %6, i64 8 tail call void @appendStringInfoString(ptr noundef %0, ptr noundef nonnull %53) #3 - br label %83 + br label %86 54: ; preds = %2 %55 = and i8 %8, -32 %or.cond5 = icmp eq i8 %55, -96 - br i1 %or.cond5, label %83, label %56 + br i1 %or.cond5, label %86, label %56 56: ; preds = %54 - switch i8 %9, label %83 [ + switch i8 %9, label %73 [ i8 80, label %57 i8 96, label %61 - i8 -128, label %73 - i8 -112, label %76 - i8 -48, label %78 ] 57: ; preds = %56 @@ -146,7 +143,7 @@ define dso_local void @xlog_desc(ptr noundef %0, ptr nocapture noundef readonly %59 = trunc nuw i64 %58 to i32 %60 = trunc i64 %.0.copyload16 to i32 tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.11, i32 noundef %59, i32 noundef %60) #3 - br label %83 + br label %86 61: ; preds = %56 %.sroa.013.0.copyload = load i32, ptr %6, align 1 @@ -187,37 +184,47 @@ define dso_local void @xlog_desc(ptr noundef %0, ptr nocapture noundef readonly %71 = trunc i8 %.sroa.8.0.copyload to i1 %72 = select i1 %71, ptr @.str.14, ptr @.str.15 tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.13, i32 noundef %.sroa.013.0.copyload, i32 noundef %.sroa.214.0.copyload, i32 noundef %.sroa.315.0.copyload, i32 noundef %.sroa.4.0.copyload, i32 noundef %.sroa.5.0.copyload, ptr noundef nonnull %.0, ptr noundef nonnull %70, ptr noundef nonnull %72) #3 - br label %83 + br label %86 73: ; preds = %56 + %74 = icmp slt i8 %8, -112 + br i1 %74, label %75, label %78 + +75: ; preds = %73 %.0.copyload = load i8, ptr %6, align 1 - %74 = trunc i8 %.0.copyload to i1 - %75 = select i1 %74, ptr @.str.6, ptr @.str.7 - tail call void @appendStringInfoString(ptr noundef %0, ptr noundef nonnull %75) #3 - br label %83 + %76 = trunc i8 %.0.copyload to i1 + %77 = select i1 %76, ptr @.str.6, ptr @.str.7 + tail call void @appendStringInfoString(ptr noundef %0, ptr noundef nonnull %77) #3 + br label %86 + +78: ; preds = %73 + switch i8 %9, label %86 [ + i8 -112, label %79 + i8 -48, label %81 + ] -76: ; preds = %56 +79: ; preds = %78 %.sroa.07.0.copyload = load i64, ptr %6, align 1 %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8 %.sroa.2.0.copyload = load i32, ptr %.sroa.2.0..sroa_idx, align 1 %.sroa.38.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 12 %.sroa.38.0.copyload = load i32, ptr %.sroa.38.0..sroa_idx, align 1 - %77 = tail call ptr @timestamptz_to_str(i64 noundef %.sroa.07.0.copyload) #3 - tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.16, i32 noundef %.sroa.2.0.copyload, i32 noundef %.sroa.38.0.copyload, ptr noundef %77) #3 - br label %83 + %80 = tail call ptr @timestamptz_to_str(i64 noundef %.sroa.07.0.copyload) #3 + tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.16, i32 noundef %.sroa.2.0.copyload, i32 noundef %.sroa.38.0.copyload, ptr noundef %80) #3 + br label %86 -78: ; preds = %56 +81: ; preds = %78 %.sroa.0.0.copyload = load i64, ptr %6, align 1 %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8 %.sroa.3.0.copyload = load i64, ptr %.sroa.3.0..sroa_idx, align 1 - %79 = lshr i64 %.sroa.0.0.copyload, 32 - %80 = trunc nuw i64 %79 to i32 - %81 = trunc i64 %.sroa.0.0.copyload to i32 - %82 = tail call ptr @timestamptz_to_str(i64 noundef %.sroa.3.0.copyload) #3 - tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.17, i32 noundef %80, i32 noundef %81, ptr noundef %82) #3 - br label %83 - -83: ; preds = %56, %51, %54, %._crit_edge, %76, %78, %73, %57, %52, %11 + %82 = lshr i64 %.sroa.0.0.copyload, 32 + %83 = trunc nuw i64 %82 to i32 + %84 = trunc i64 %.sroa.0.0.copyload to i32 + %85 = tail call ptr @timestamptz_to_str(i64 noundef %.sroa.3.0.copyload) #3 + tail call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %0, ptr noundef nonnull @.str.17, i32 noundef %83, i32 noundef %84, ptr noundef %85) #3 + br label %86 + +86: ; preds = %78, %51, %54, %._crit_edge, %79, %81, %75, %57, %52, %11 ret void } diff --git a/bench/protobuf/optimized/writer.cc.ll b/bench/protobuf/optimized/writer.cc.ll index c3ef180b373..e37fb6c611b 100644 --- a/bench/protobuf/optimized/writer.cc.ll +++ b/bench/protobuf/optimized/writer.cc.ll @@ -250,8 +250,7 @@ _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit30.i: ; preds = %fo %.fr.i = freeze i8 %5 %sub.i24.i = add i64 %str.sroa.0.1, -1 %add.ptr.i26.i = getelementptr inbounds i8, ptr %str.sroa.5.1, i64 1 - %6 = and i8 %.fr.i, -64 - %cmp15.not.i = icmp eq i8 %6, -128 + %cmp15.not.i = icmp slt i8 %.fr.i, -64 br i1 %cmp15.not.i, label %if.end17.i, label %if.then4 if.end17.i: ; preds = %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit30.i @@ -271,8 +270,8 @@ _ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcS %str.sroa.0.3 = phi i64 [ %4, %for.end.i ], [ %sub.i.i, %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit.i ] %str.sroa.5.3 = phi ptr [ %scevgep96, %for.end.i ], [ %add.ptr.i.i, %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit.i ] %len.136.i = phi i64 [ %3, %for.end.i ], [ 1, %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit.i ] - %7 = phi i32 [ %or.i, %for.end.i ], [ %conv.i, %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit.i ] - switch i32 %7, label %for.body.i.i.i.i.i.i.i [ + %6 = phi i32 [ %or.i, %for.end.i ], [ %conv.i, %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit.i ] + switch i32 %6, label %for.body.i.i.i.i.i.i.i [ i32 10, label %if.then4 i32 13, label %sw.bb1.i i32 9, label %sw.bb3.i @@ -322,48 +321,48 @@ for.body.i.i.i.i.i.i.i: ; preds = %_ZN6google8protobuf %__first.addr.080.i.i.i.i.i.i.i.ptr = getelementptr inbounds i8, ptr @_ZZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEEE14kEscapedRanges, i64 %__first.addr.080.i.i.i.i.i.i.i.idx %__first.addr.0.val.i.i.i.i.i.i.i = load i64, ptr %__first.addr.080.i.i.i.i.i.i.i.ptr, align 16 %range.sroa.0.0.extract.trunc.i.i.i.i.i.i.i.i.i = trunc i64 %__first.addr.0.val.i.i.i.i.i.i.i to i32 - %cmp.not.i.i.i.i.i.i.i.i.i = icmp uge i32 %7, %range.sroa.0.0.extract.trunc.i.i.i.i.i.i.i.i.i + %cmp.not.i.i.i.i.i.i.i.i.i = icmp uge i32 %6, %range.sroa.0.0.extract.trunc.i.i.i.i.i.i.i.i.i %range.sroa.2.0.extract.shift.i.i.i.i.i.i.i.i.i = lshr i64 %__first.addr.0.val.i.i.i.i.i.i.i, 32 %range.sroa.2.0.extract.trunc.i.i.i.i.i.i.i.i.i = trunc nuw i64 %range.sroa.2.0.extract.shift.i.i.i.i.i.i.i.i.i to i32 - %cmp2.i.i.i.i.i.i.i.i.i = icmp ule i32 %7, %range.sroa.2.0.extract.trunc.i.i.i.i.i.i.i.i.i - %8 = select i1 %cmp.not.i.i.i.i.i.i.i.i.i, i1 %cmp2.i.i.i.i.i.i.i.i.i, i1 false - br i1 %8, label %if.end6, label %if.end.i.i.i.i.i.i.i + %cmp2.i.i.i.i.i.i.i.i.i = icmp ule i32 %6, %range.sroa.2.0.extract.trunc.i.i.i.i.i.i.i.i.i + %7 = select i1 %cmp.not.i.i.i.i.i.i.i.i.i, i1 %cmp2.i.i.i.i.i.i.i.i.i, i1 false + br i1 %7, label %if.end6, label %if.end.i.i.i.i.i.i.i if.end.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i.i.i %__first.addr.080.i.i.i.i.i.i.i.add91 = or disjoint i64 %__first.addr.080.i.i.i.i.i.i.i.idx, 8 %incdec.ptr.i.i.i.i.i.i.i.ptr = getelementptr inbounds i8, ptr @_ZZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEEE14kEscapedRanges, i64 %__first.addr.080.i.i.i.i.i.i.i.add91 %incdec.ptr.val.i.i.i.i.i.i.i = load i64, ptr %incdec.ptr.i.i.i.i.i.i.i.ptr, align 8 %range.sroa.0.0.extract.trunc.i.i33.i.i.i.i.i.i.i = trunc i64 %incdec.ptr.val.i.i.i.i.i.i.i to i32 - %cmp.not.i.i34.i.i.i.i.i.i.i = icmp uge i32 %7, %range.sroa.0.0.extract.trunc.i.i33.i.i.i.i.i.i.i + %cmp.not.i.i34.i.i.i.i.i.i.i = icmp uge i32 %6, %range.sroa.0.0.extract.trunc.i.i33.i.i.i.i.i.i.i %range.sroa.2.0.extract.shift.i.i35.i.i.i.i.i.i.i = lshr i64 %incdec.ptr.val.i.i.i.i.i.i.i, 32 %range.sroa.2.0.extract.trunc.i.i36.i.i.i.i.i.i.i = trunc nuw i64 %range.sroa.2.0.extract.shift.i.i35.i.i.i.i.i.i.i to i32 - %cmp2.i.i37.i.i.i.i.i.i.i = icmp ule i32 %7, %range.sroa.2.0.extract.trunc.i.i36.i.i.i.i.i.i.i - %9 = select i1 %cmp.not.i.i34.i.i.i.i.i.i.i, i1 %cmp2.i.i37.i.i.i.i.i.i.i, i1 false - br i1 %9, label %_ZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEE.exit, label %if.end4.i.i.i.i.i.i.i + %cmp2.i.i37.i.i.i.i.i.i.i = icmp ule i32 %6, %range.sroa.2.0.extract.trunc.i.i36.i.i.i.i.i.i.i + %8 = select i1 %cmp.not.i.i34.i.i.i.i.i.i.i, i1 %cmp2.i.i37.i.i.i.i.i.i.i, i1 false + br i1 %8, label %_ZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEE.exit, label %if.end4.i.i.i.i.i.i.i if.end4.i.i.i.i.i.i.i: ; preds = %if.end.i.i.i.i.i.i.i %__first.addr.080.i.i.i.i.i.i.i.add90 = or disjoint i64 %__first.addr.080.i.i.i.i.i.i.i.idx, 16 %incdec.ptr5.i.i.i.i.i.i.i.ptr = getelementptr inbounds i8, ptr @_ZZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEEE14kEscapedRanges, i64 %__first.addr.080.i.i.i.i.i.i.i.add90 %incdec.ptr5.val.i.i.i.i.i.i.i = load i64, ptr %incdec.ptr5.i.i.i.i.i.i.i.ptr, align 16 %range.sroa.0.0.extract.trunc.i.i38.i.i.i.i.i.i.i = trunc i64 %incdec.ptr5.val.i.i.i.i.i.i.i to i32 - %cmp.not.i.i39.i.i.i.i.i.i.i = icmp uge i32 %7, %range.sroa.0.0.extract.trunc.i.i38.i.i.i.i.i.i.i + %cmp.not.i.i39.i.i.i.i.i.i.i = icmp uge i32 %6, %range.sroa.0.0.extract.trunc.i.i38.i.i.i.i.i.i.i %range.sroa.2.0.extract.shift.i.i40.i.i.i.i.i.i.i = lshr i64 %incdec.ptr5.val.i.i.i.i.i.i.i, 32 %range.sroa.2.0.extract.trunc.i.i41.i.i.i.i.i.i.i = trunc nuw i64 %range.sroa.2.0.extract.shift.i.i40.i.i.i.i.i.i.i to i32 - %cmp2.i.i42.i.i.i.i.i.i.i = icmp ule i32 %7, %range.sroa.2.0.extract.trunc.i.i41.i.i.i.i.i.i.i - %10 = select i1 %cmp.not.i.i39.i.i.i.i.i.i.i, i1 %cmp2.i.i42.i.i.i.i.i.i.i, i1 false - br i1 %10, label %if.end6, label %if.end8.i.i.i.i.i.i.i + %cmp2.i.i42.i.i.i.i.i.i.i = icmp ule i32 %6, %range.sroa.2.0.extract.trunc.i.i41.i.i.i.i.i.i.i + %9 = select i1 %cmp.not.i.i39.i.i.i.i.i.i.i, i1 %cmp2.i.i42.i.i.i.i.i.i.i, i1 false + br i1 %9, label %if.end6, label %if.end8.i.i.i.i.i.i.i if.end8.i.i.i.i.i.i.i: ; preds = %if.end4.i.i.i.i.i.i.i %__first.addr.080.i.i.i.i.i.i.i.add = or disjoint i64 %__first.addr.080.i.i.i.i.i.i.i.idx, 24 %incdec.ptr9.i.i.i.i.i.i.i.ptr = getelementptr inbounds i8, ptr @_ZZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEEE14kEscapedRanges, i64 %__first.addr.080.i.i.i.i.i.i.i.add %incdec.ptr9.val.i.i.i.i.i.i.i = load i64, ptr %incdec.ptr9.i.i.i.i.i.i.i.ptr, align 8 %range.sroa.0.0.extract.trunc.i.i43.i.i.i.i.i.i.i = trunc i64 %incdec.ptr9.val.i.i.i.i.i.i.i to i32 - %cmp.not.i.i44.i.i.i.i.i.i.i = icmp uge i32 %7, %range.sroa.0.0.extract.trunc.i.i43.i.i.i.i.i.i.i + %cmp.not.i.i44.i.i.i.i.i.i.i = icmp uge i32 %6, %range.sroa.0.0.extract.trunc.i.i43.i.i.i.i.i.i.i %range.sroa.2.0.extract.shift.i.i45.i.i.i.i.i.i.i = lshr i64 %incdec.ptr9.val.i.i.i.i.i.i.i, 32 %range.sroa.2.0.extract.trunc.i.i46.i.i.i.i.i.i.i = trunc nuw i64 %range.sroa.2.0.extract.shift.i.i45.i.i.i.i.i.i.i to i32 - %cmp2.i.i47.i.i.i.i.i.i.i = icmp ule i32 %7, %range.sroa.2.0.extract.trunc.i.i46.i.i.i.i.i.i.i - %11 = select i1 %cmp.not.i.i44.i.i.i.i.i.i.i, i1 %cmp2.i.i47.i.i.i.i.i.i.i, i1 false - br i1 %11, label %if.end6, label %if.end12.i.i.i.i.i.i.i + %cmp2.i.i47.i.i.i.i.i.i.i = icmp ule i32 %6, %range.sroa.2.0.extract.trunc.i.i46.i.i.i.i.i.i.i + %10 = select i1 %cmp.not.i.i44.i.i.i.i.i.i.i, i1 %cmp2.i.i47.i.i.i.i.i.i.i, i1 false + br i1 %10, label %if.end6, label %if.end12.i.i.i.i.i.i.i if.end12.i.i.i.i.i.i.i: ; preds = %if.end8.i.i.i.i.i.i.i %__first.addr.080.i.i.i.i.i.i.i.add92 = add nuw nsw i64 %__first.addr.080.i.i.i.i.i.i.i.idx, 32 @@ -372,9 +371,9 @@ if.end12.i.i.i.i.i.i.i: ; preds = %if.end8.i.i.i.i.i.i br i1 %cmp.i.i.i.i.i.i.i, label %for.body.i.i.i.i.i.i.i, label %for.end.loopexit.i.i.i.i.i.i.i, !llvm.loop !10 for.end.loopexit.i.i.i.i.i.i.i: ; preds = %if.end12.i.i.i.i.i.i.i - %12 = add i32 %7, -917536 - %13 = icmp ult i32 %12, 96 - br i1 %13, label %if.end10, label %if.then + %11 = add i32 %6, -917536 + %12 = icmp ult i32 %11, 96 + br i1 %12, label %if.end10, label %if.then _ZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEE.exit: ; preds = %if.end.i.i.i.i.i.i.i %cmp.i.i.i.i1.not = icmp eq i64 %__first.addr.080.i.i.i.i.i.i.i.idx, 64 @@ -399,15 +398,15 @@ if.then4: ; preds = %_ZNKSt17basic_strin br label %while.cond.backedge if.end6: ; preds = %if.end8.i.i.i.i.i.i.i, %if.end4.i.i.i.i.i.i.i, %for.body.i.i.i.i.i.i.i, %_ZN6google8protobuf13json_internalL10MustEscapeEjRSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZN6google8protobuf13json_internalL17ConsumeUtf8ScalarERSt17basic_string_viewIcSt11char_traitsIcEE.exit - %cmp = icmp ult i32 %7, 65536 + %cmp = icmp ult i32 %6, 65536 br i1 %cmp, label %if.then8, label %if.end10 if.then8: ; preds = %if.end6 - %conv = zext nneg i32 %7 to i64 + %conv = zext nneg i32 %6 to i64 call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %hex.i) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %ref.tmp.i.i) - %14 = inttoptr i64 %conv to ptr - store ptr %14, ptr %ref.tmp.i.i, align 8 + %13 = inttoptr i64 %conv to ptr + store ptr %13, ptr %ref.tmp.i.i, align 8 store ptr @_ZN4absl12lts_2023080219str_format_internal13FormatArgImpl8DispatchItEEbNS2_4DataENS1_24FormatConversionSpecImplEPv, ptr %dispatcher_.i.i.i.i, align 8 %call3.i.i = call noundef i32 @_ZN4absl12lts_2023080219str_format_internal8SnprintFEPcmNS1_21UntypedFormatSpecImplENS0_4SpanIKNS1_13FormatArgImplEEE(ptr noundef nonnull %hex.i, i64 noundef 7, ptr nonnull @.str.5, i64 6, ptr nonnull %ref.tmp.i.i, i64 1) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %ref.tmp.i.i) @@ -417,17 +416,17 @@ if.then8: ; preds = %if.end6 br label %while.cond.backedge if.end10: ; preds = %for.end.loopexit.i.i.i.i.i.i.i, %if.end6 - %15 = and i32 %7, 1023 - %16 = or disjoint i32 %15, 56320 - %conv12 = zext nneg i32 %16 to i64 - %shr = lshr i32 %7, 10 + %14 = and i32 %6, 1023 + %15 = or disjoint i32 %14, 56320 + %conv12 = zext nneg i32 %15 to i64 + %shr = lshr i32 %6, 10 %narrow = add nuw nsw i32 %shr, 55232 call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %hex.i5) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %ref.tmp.i.i4) - %17 = and i32 %narrow, 65535 - %retval.sroa.0.0.insert.ext.i.i.i.i.i6 = zext nneg i32 %17 to i64 - %18 = inttoptr i64 %retval.sroa.0.0.insert.ext.i.i.i.i.i6 to ptr - store ptr %18, ptr %ref.tmp.i.i4, align 8 + %16 = and i32 %narrow, 65535 + %retval.sroa.0.0.insert.ext.i.i.i.i.i6 = zext nneg i32 %16 to i64 + %17 = inttoptr i64 %retval.sroa.0.0.insert.ext.i.i.i.i.i6 to ptr + store ptr %17, ptr %ref.tmp.i.i4, align 8 store ptr @_ZN4absl12lts_2023080219str_format_internal13FormatArgImpl8DispatchItEEbNS2_4DataENS1_24FormatConversionSpecImplEPv, ptr %dispatcher_.i.i.i.i7, align 8 %call3.i.i8 = call noundef i32 @_ZN4absl12lts_2023080219str_format_internal8SnprintFEPcmNS1_21UntypedFormatSpecImplENS0_4SpanIKNS1_13FormatArgImplEEE(ptr noundef nonnull %hex.i5, i64 noundef 7, ptr nonnull @.str.5, i64 6, ptr nonnull %ref.tmp.i.i4, i64 1) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %ref.tmp.i.i4) @@ -436,8 +435,8 @@ if.end10: ; preds = %for.end.loopexit.i. call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %hex.i5) call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %hex.i11) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %ref.tmp.i.i10) - %19 = inttoptr i64 %conv12 to ptr - store ptr %19, ptr %ref.tmp.i.i10, align 8 + %18 = inttoptr i64 %conv12 to ptr + store ptr %18, ptr %ref.tmp.i.i10, align 8 store ptr @_ZN4absl12lts_2023080219str_format_internal13FormatArgImpl8DispatchItEEbNS2_4DataENS1_24FormatConversionSpecImplEPv, ptr %dispatcher_.i.i.i.i13, align 8 %call3.i.i14 = call noundef i32 @_ZN4absl12lts_2023080219str_format_internal8SnprintFEPcmNS1_21UntypedFormatSpecImplENS0_4SpanIKNS1_13FormatArgImplEEE(ptr noundef nonnull %hex.i11, i64 noundef 7, ptr nonnull @.str.5, i64 6, ptr nonnull %ref.tmp.i.i10, i64 1) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %ref.tmp.i.i10) diff --git a/bench/proxygen/optimized/HPACKContext.cpp.ll b/bench/proxygen/optimized/HPACKContext.cpp.ll index 25199325364..3d0b33d53ee 100644 --- a/bench/proxygen/optimized/HPACKContext.cpp.ll +++ b/bench/proxygen/optimized/HPACKContext.cpp.ll @@ -527,29 +527,28 @@ lpad10: ; preds = %invoke.cont11, %inv cleanup.done: ; preds = %invoke.cont %4 = load i8, ptr %arrayidx.i.i.i.i, align 1 - %5 = and i8 %4, -64 - %cmp.i.i.i = icmp eq i8 %5, 0 + %cmp.i.i.i = icmp ult i8 %4, 64 br i1 %cmp.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i, label %if.end.i.i.i if.end.i.i.i: ; preds = %cleanup.done - %cmp.i.i.i.i = icmp eq i8 %5, -128 - %6 = load ptr, ptr %value.i, align 8 + %cmp.i.i.i.i = icmp slt i8 %4, -64 + %5 = load ptr, ptr %value.i, align 8 br i1 %cmp.i.i.i.i, label %if.end.sink.split.i.i.i.i, label %if.else.i.i.i.i if.else.i.i.i.i: ; preds = %if.end.i.i.i - %add.ptr.i.i.i.i.i.i = getelementptr inbounds i8, ptr %6, i64 -8 - %7 = atomicrmw sub ptr %add.ptr.i.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i.i = icmp eq i64 %7, 1 + %add.ptr.i.i.i.i.i.i = getelementptr inbounds i8, ptr %5, i64 -8 + %6 = atomicrmw sub ptr %add.ptr.i.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i.i = icmp eq i64 %6, 1 br i1 %cmp.i.i.i.i.i, label %if.end.sink.split.i.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i if.end.sink.split.i.i.i.i: ; preds = %if.else.i.i.i.i, %if.end.i.i.i - %add.ptr.i.i.sink.i.i.i.i = phi ptr [ %6, %if.end.i.i.i ], [ %add.ptr.i.i.i.i.i.i, %if.else.i.i.i.i ] + %add.ptr.i.i.sink.i.i.i.i = phi ptr [ %5, %if.end.i.i.i ], [ %add.ptr.i.i.i.i.i.i, %if.else.i.i.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i.i) #13 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i: ; preds = %if.end.sink.split.i.i.i.i, %if.else.i.i.i.i, %cleanup.done - %8 = load ptr, ptr %agg.tmp, align 8 - %cmp.i.i.i1.i = icmp eq ptr %8, null + %7 = load ptr, ptr %agg.tmp, align 8 + %cmp.i.i.i1.i = icmp eq ptr %7, null br i1 %cmp.i.i.i1.i, label %_ZN8proxygen11HPACKHeaderD2Ev.exit, label %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i.i _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i.i: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i @@ -557,29 +556,29 @@ _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i.i: ; preds = %_ZN5folly14 to label %call.i.i.i.i.noexc.i.i unwind label %terminate.lpad.i.i call.i.i.i.i.noexc.i.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i.i - %sub.ptr.lhs.cast.i.i.i.i.i.i = ptrtoint ptr %8 to i64 + %sub.ptr.lhs.cast.i.i.i.i.i.i = ptrtoint ptr %7 to i64 %sub.ptr.rhs.cast.i.i.i.i.i.i = ptrtoint ptr %call.i.i.i.i1.i.i to i64 %sub.ptr.sub.i.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i.i %sub.ptr.div.i.i.i.i.i.i = ashr exact i64 %sub.ptr.sub.i.i.i.i.i.i, 5 - %9 = add nsw i64 %sub.ptr.div.i.i.i.i.i.i, -89 - %10 = icmp ult i64 %9, -87 - br i1 %10, label %if.then.i.i.i, label %_ZN8proxygen11HPACKHeaderD2Ev.exit + %8 = add nsw i64 %sub.ptr.div.i.i.i.i.i.i, -89 + %9 = icmp ult i64 %8, -87 + br i1 %9, label %if.then.i.i.i, label %_ZN8proxygen11HPACKHeaderD2Ev.exit if.then.i.i.i: ; preds = %call.i.i.i.i.noexc.i.i - %11 = load ptr, ptr %agg.tmp, align 8 - %isnull.i.i.i = icmp eq ptr %11, null + %10 = load ptr, ptr %agg.tmp, align 8 + %isnull.i.i.i = icmp eq ptr %10, null br i1 %isnull.i.i.i, label %_ZN8proxygen11HPACKHeaderD2Ev.exit, label %delete.notnull.i.i.i delete.notnull.i.i.i: ; preds = %if.then.i.i.i - call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #13 - call void @_ZdlPv(ptr noundef nonnull %11) #14 + call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #13 + call void @_ZdlPv(ptr noundef nonnull %10) #14 br label %_ZN8proxygen11HPACKHeaderD2Ev.exit terminate.lpad.i.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i.i - %12 = landingpad { ptr, i32 } + %11 = landingpad { ptr, i32 } catch ptr null - %13 = extractvalue { ptr, i32 } %12, 0 - call void @__clang_call_terminate(ptr %13) #15 + %12 = extractvalue { ptr, i32 } %11, 0 + call void @__clang_call_terminate(ptr %12) #15 unreachable _ZN8proxygen11HPACKHeaderD2Ev.exit: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i, %call.i.i.i.i.noexc.i.i, %if.then.i.i.i, %delete.notnull.i.i.i @@ -608,30 +607,29 @@ define linkonce_odr void @_ZN8proxygen11HPACKHeaderD2Ev(ptr noundef nonnull alig entry: %arrayidx.i.i.i = getelementptr inbounds i8, ptr %this, i64 31 %0 = load i8, ptr %arrayidx.i.i.i, align 1 - %1 = and i8 %0, -64 - %cmp.i.i = icmp eq i8 %1, 0 + %cmp.i.i = icmp ult i8 %0, 64 br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %entry %value = getelementptr inbounds i8, ptr %this, i64 8 - %cmp.i.i.i = icmp eq i8 %1, -128 - %2 = load ptr, ptr %value, align 8 + %cmp.i.i.i = icmp slt i8 %0, -64 + %1 = load ptr, ptr %value, align 8 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i.i, label %if.else.i.i.i if.else.i.i.i: ; preds = %if.end.i.i - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %2, i64 -8 - %3 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i = icmp eq i64 %3, 1 + %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %1, i64 -8 + %2 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i = icmp eq i64 %2, 1 br i1 %cmp.i.i.i.i, label %if.end.sink.split.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i.i.i: ; preds = %if.else.i.i.i, %if.end.i.i - %add.ptr.i.i.sink.i.i.i = phi ptr [ %2, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] + %add.ptr.i.i.sink.i.i.i = phi ptr [ %1, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] tail call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i) #13 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit: ; preds = %entry, %if.else.i.i.i, %if.end.sink.split.i.i.i - %4 = load ptr, ptr %this, align 8 - %cmp.i.i.i1 = icmp eq ptr %4, null + %3 = load ptr, ptr %this, align 8 + %cmp.i.i.i1 = icmp eq ptr %3, null br i1 %cmp.i.i.i1, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit, label %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -639,29 +637,29 @@ _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i: ; preds = %_ZN5folly14ba to label %call.i.i.i.i.noexc.i unwind label %terminate.lpad.i call.i.i.i.i.noexc.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i - %sub.ptr.lhs.cast.i.i.i.i.i = ptrtoint ptr %4 to i64 + %sub.ptr.lhs.cast.i.i.i.i.i = ptrtoint ptr %3 to i64 %sub.ptr.rhs.cast.i.i.i.i.i = ptrtoint ptr %call.i.i.i.i1.i to i64 %sub.ptr.sub.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i %sub.ptr.div.i.i.i.i.i = ashr exact i64 %sub.ptr.sub.i.i.i.i.i, 5 - %5 = add nsw i64 %sub.ptr.div.i.i.i.i.i, -89 - %6 = icmp ult i64 %5, -87 - br i1 %6, label %if.then.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit + %4 = add nsw i64 %sub.ptr.div.i.i.i.i.i, -89 + %5 = icmp ult i64 %4, -87 + br i1 %5, label %if.then.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit if.then.i.i: ; preds = %call.i.i.i.i.noexc.i - %7 = load ptr, ptr %this, align 8 - %isnull.i.i = icmp eq ptr %7, null + %6 = load ptr, ptr %this, align 8 + %isnull.i.i = icmp eq ptr %6, null br i1 %isnull.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit, label %delete.notnull.i.i delete.notnull.i.i: ; preds = %if.then.i.i - tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #13 - tail call void @_ZdlPv(ptr noundef nonnull %7) #14 + tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #13 + tail call void @_ZdlPv(ptr noundef nonnull %6) #14 br label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit terminate.lpad.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i - %8 = landingpad { ptr, i32 } + %7 = landingpad { ptr, i32 } catch ptr null - %9 = extractvalue { ptr, i32 } %8, 0 - tail call void @__clang_call_terminate(ptr %9) #15 + %8 = extractvalue { ptr, i32 } %7, 0 + tail call void @__clang_call_terminate(ptr %8) #15 unreachable _ZN8proxygen15HPACKHeaderNameD2Ev.exit: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, %call.i.i.i.i.noexc.i, %if.then.i.i, %delete.notnull.i.i diff --git a/bench/proxygen/optimized/HPACKDecodeBuffer.cpp.ll b/bench/proxygen/optimized/HPACKDecodeBuffer.cpp.ll index 32449c337a6..b4fc9afeb88 100644 --- a/bench/proxygen/optimized/HPACKDecodeBuffer.cpp.ll +++ b/bench/proxygen/optimized/HPACKDecodeBuffer.cpp.ll @@ -1874,23 +1874,22 @@ _ZN5folly13fbstring_coreIcEC2EPKcmb.exit: ; preds = %_ZN5folly13fbstring call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %t.i) %arrayidx.i.i2 = getelementptr inbounds i8, ptr %ref.tmp, i64 23 %8 = load i8, ptr %arrayidx.i.i2, align 1 - %9 = and i8 %8, -64 - %cmp.i3 = icmp eq i8 %9, 0 + %cmp.i3 = icmp ult i8 %8, 64 br i1 %cmp.i3, label %if.end, label %if.end.i if.end.i: ; preds = %_ZN5folly13fbstring_coreIcEC2EPKcmb.exit - %cmp.i.i4 = icmp eq i8 %9, -128 - %10 = load ptr, ptr %ref.tmp, align 8 + %cmp.i.i4 = icmp slt i8 %8, -64 + %9 = load ptr, ptr %ref.tmp, align 8 br i1 %cmp.i.i4, label %if.end.sink.split.i.i, label %if.else.i.i5 if.else.i.i5: ; preds = %if.end.i - %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %10, i64 -8 - %11 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i = icmp eq i64 %11, 1 + %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %9, i64 -8 + %10 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i = icmp eq i64 %10, 1 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i, label %if.end if.end.sink.split.i.i: ; preds = %if.else.i.i5, %if.end.i - %add.ptr.i.i.sink.i.i = phi ptr [ %10, %if.end.i ], [ %add.ptr.i.i.i.i, %if.else.i.i5 ] + %add.ptr.i.i.sink.i.i = phi ptr [ %9, %if.end.i ], [ %add.ptr.i.i.i.i, %if.else.i.i5 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i) #21 br label %if.end @@ -2582,52 +2581,50 @@ invoke.cont: ; preds = %sw.bb.i call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %this, ptr noundef nonnull align 8 dereferenceable(24) %t.i, i64 24, i1 false) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %t.i) %10 = load i8, ptr %arrayidx.i.i.i, align 1 - %11 = and i8 %10, -64 - %cmp.i12 = icmp eq i8 %11, 0 + %cmp.i12 = icmp ult i8 %10, 64 br i1 %cmp.i12, label %if.end19, label %if.end.i13 if.end.i13: ; preds = %invoke.cont - %cmp.i.i = icmp eq i8 %11, -128 - %12 = load ptr, ptr %nascent, align 8 + %cmp.i.i = icmp slt i8 %10, -64 + %11 = load ptr, ptr %nascent, align 8 br i1 %cmp.i.i, label %if.end.sink.split.i.i, label %if.else.i.i if.else.i.i: ; preds = %if.end.i13 - %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %12, i64 -8 - %13 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i = icmp eq i64 %13, 1 + %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %11, i64 -8 + %12 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i = icmp eq i64 %12, 1 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i, label %if.end19 if.end.sink.split.i.i: ; preds = %if.else.i.i, %if.end.i13 - %add.ptr.i.i.sink.i.i = phi ptr [ %12, %if.end.i13 ], [ %add.ptr.i.i.i.i, %if.else.i.i ] + %add.ptr.i.i.sink.i.i = phi ptr [ %11, %if.end.i13 ], [ %add.ptr.i.i.i.i, %if.else.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i) #21 br label %if.end19 lpad: ; preds = %sw.bb.i - %14 = landingpad { ptr, i32 } + %13 = landingpad { ptr, i32 } cleanup - %15 = load i8, ptr %arrayidx.i.i.i, align 1 - %16 = and i8 %15, -64 - %cmp.i15 = icmp eq i8 %16, 0 + %14 = load i8, ptr %arrayidx.i.i.i, align 1 + %cmp.i15 = icmp ult i8 %14, 64 br i1 %cmp.i15, label %_ZN5folly13fbstring_coreIcED2Ev.exit23, label %if.end.i16 if.end.i16: ; preds = %lpad - %cmp.i.i17 = icmp eq i8 %16, -128 - %17 = load ptr, ptr %nascent, align 8 + %cmp.i.i17 = icmp slt i8 %14, -64 + %15 = load ptr, ptr %nascent, align 8 br i1 %cmp.i.i17, label %if.end.sink.split.i.i21, label %if.else.i.i18 if.else.i.i18: ; preds = %if.end.i16 - %add.ptr.i.i.i.i19 = getelementptr inbounds i8, ptr %17, i64 -8 - %18 = atomicrmw sub ptr %add.ptr.i.i.i.i19, i64 1 acq_rel, align 8 - %cmp.i.i.i20 = icmp eq i64 %18, 1 + %add.ptr.i.i.i.i19 = getelementptr inbounds i8, ptr %15, i64 -8 + %16 = atomicrmw sub ptr %add.ptr.i.i.i.i19, i64 1 acq_rel, align 8 + %cmp.i.i.i20 = icmp eq i64 %16, 1 br i1 %cmp.i.i.i20, label %if.end.sink.split.i.i21, label %_ZN5folly13fbstring_coreIcED2Ev.exit23 if.end.sink.split.i.i21: ; preds = %if.else.i.i18, %if.end.i16 - %add.ptr.i.i.sink.i.i22 = phi ptr [ %17, %if.end.i16 ], [ %add.ptr.i.i.i.i19, %if.else.i.i18 ] + %add.ptr.i.i.sink.i.i22 = phi ptr [ %15, %if.end.i16 ], [ %add.ptr.i.i.i.i19, %if.else.i.i18 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i22) #21 br label %_ZN5folly13fbstring_coreIcED2Ev.exit23 _ZN5folly13fbstring_coreIcED2Ev.exit23: ; preds = %lpad, %if.else.i.i18, %if.end.sink.split.i.i21 - resume { ptr, i32 } %14 + resume { ptr, i32 } %13 if.end19: ; preds = %if.end.sink.split.i.i, %if.else.i.i, %invoke.cont, %entry, %_ZN5folly12smartReallocEPvmmm.exit ret void diff --git a/bench/proxygen/optimized/HPACKDecoderBase.cpp.ll b/bench/proxygen/optimized/HPACKDecoderBase.cpp.ll index 73bbf90e1a9..4db91f6e468 100644 --- a/bench/proxygen/optimized/HPACKDecoderBase.cpp.ll +++ b/bench/proxygen/optimized/HPACKDecoderBase.cpp.ll @@ -1379,30 +1379,29 @@ define linkonce_odr void @_ZN8proxygen11HPACKHeaderD2Ev(ptr noundef nonnull alig entry: %arrayidx.i.i.i = getelementptr inbounds i8, ptr %this, i64 31 %0 = load i8, ptr %arrayidx.i.i.i, align 1 - %1 = and i8 %0, -64 - %cmp.i.i = icmp eq i8 %1, 0 + %cmp.i.i = icmp ult i8 %0, 64 br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %entry %value = getelementptr inbounds i8, ptr %this, i64 8 - %cmp.i.i.i = icmp eq i8 %1, -128 - %2 = load ptr, ptr %value, align 8 + %cmp.i.i.i = icmp slt i8 %0, -64 + %1 = load ptr, ptr %value, align 8 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i.i, label %if.else.i.i.i if.else.i.i.i: ; preds = %if.end.i.i - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %2, i64 -8 - %3 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i = icmp eq i64 %3, 1 + %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %1, i64 -8 + %2 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i = icmp eq i64 %2, 1 br i1 %cmp.i.i.i.i, label %if.end.sink.split.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i.i.i: ; preds = %if.else.i.i.i, %if.end.i.i - %add.ptr.i.i.sink.i.i.i = phi ptr [ %2, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] + %add.ptr.i.i.sink.i.i.i = phi ptr [ %1, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] tail call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i) #24 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit: ; preds = %entry, %if.else.i.i.i, %if.end.sink.split.i.i.i - %4 = load ptr, ptr %this, align 8 - %cmp.i.i.i1 = icmp eq ptr %4, null + %3 = load ptr, ptr %this, align 8 + %cmp.i.i.i1 = icmp eq ptr %3, null br i1 %cmp.i.i.i1, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit, label %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -1410,29 +1409,29 @@ _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i: ; preds = %_ZN5folly14ba to label %call.i.i.i.i.noexc.i unwind label %terminate.lpad.i call.i.i.i.i.noexc.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i - %sub.ptr.lhs.cast.i.i.i.i.i = ptrtoint ptr %4 to i64 + %sub.ptr.lhs.cast.i.i.i.i.i = ptrtoint ptr %3 to i64 %sub.ptr.rhs.cast.i.i.i.i.i = ptrtoint ptr %call.i.i.i.i1.i to i64 %sub.ptr.sub.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i %sub.ptr.div.i.i.i.i.i = ashr exact i64 %sub.ptr.sub.i.i.i.i.i, 5 - %5 = add nsw i64 %sub.ptr.div.i.i.i.i.i, -89 - %6 = icmp ult i64 %5, -87 - br i1 %6, label %if.then.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit + %4 = add nsw i64 %sub.ptr.div.i.i.i.i.i, -89 + %5 = icmp ult i64 %4, -87 + br i1 %5, label %if.then.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit if.then.i.i: ; preds = %call.i.i.i.i.noexc.i - %7 = load ptr, ptr %this, align 8 - %isnull.i.i = icmp eq ptr %7, null + %6 = load ptr, ptr %this, align 8 + %isnull.i.i = icmp eq ptr %6, null br i1 %isnull.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit, label %delete.notnull.i.i delete.notnull.i.i: ; preds = %if.then.i.i - tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #24 - tail call void @_ZdlPv(ptr noundef nonnull %7) #28 + tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #24 + tail call void @_ZdlPv(ptr noundef nonnull %6) #28 br label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit terminate.lpad.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i - %8 = landingpad { ptr, i32 } + %7 = landingpad { ptr, i32 } catch ptr null - %9 = extractvalue { ptr, i32 } %8, 0 - tail call void @__clang_call_terminate(ptr %9) #25 + %8 = extractvalue { ptr, i32 } %7, 0 + tail call void @__clang_call_terminate(ptr %8) #25 unreachable _ZN8proxygen15HPACKHeaderNameD2Ev.exit: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, %call.i.i.i.i.noexc.i, %if.then.i.i, %delete.notnull.i.i diff --git a/bench/proxygen/optimized/HTTPMessage.cpp.ll b/bench/proxygen/optimized/HTTPMessage.cpp.ll index ad14012bc29..30ae0827e1d 100644 --- a/bench/proxygen/optimized/HTTPMessage.cpp.ll +++ b/bench/proxygen/optimized/HTTPMessage.cpp.ll @@ -5208,23 +5208,22 @@ invoke.cont11: ; preds = %invoke.cont8 invoke.cont13: ; preds = %invoke.cont11 %arrayidx.i.i.i = getelementptr inbounds i8, ptr %ref.tmp10, i64 23 %5 = load i8, ptr %arrayidx.i.i.i, align 1 - %6 = and i8 %5, -64 - %cmp.i.i = icmp eq i8 %6, 0 + %cmp.i.i = icmp ult i8 %5, 64 br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %invoke.cont13 - %cmp.i.i.i = icmp eq i8 %6, -128 - %7 = load ptr, ptr %ref.tmp10, align 8 + %cmp.i.i.i = icmp slt i8 %5, -64 + %6 = load ptr, ptr %ref.tmp10, align 8 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i.i, label %if.else.i.i.i if.else.i.i.i: ; preds = %if.end.i.i - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %7, i64 -8 - %8 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i = icmp eq i64 %8, 1 + %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %6, i64 -8 + %7 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i = icmp eq i64 %7, 1 br i1 %cmp.i.i.i.i, label %if.end.sink.split.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i.i.i: ; preds = %if.else.i.i.i, %if.end.i.i - %add.ptr.i.i.sink.i.i.i = phi ptr [ %7, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] + %add.ptr.i.i.sink.i.i.i = phi ptr [ %6, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i) #23 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -5234,52 +5233,51 @@ _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.ex to label %nrvo.skipdtor unwind label %lpad15 lpad3: ; preds = %catch - %9 = landingpad { ptr, i32 } + %8 = landingpad { ptr, i32 } cleanup br label %ehcleanup17 lpad5: ; preds = %invoke.cont8, %invoke.cont6, %invoke.cont4 - %10 = landingpad { ptr, i32 } + %9 = landingpad { ptr, i32 } cleanup br label %ehcleanup lpad12: ; preds = %invoke.cont11 - %11 = landingpad { ptr, i32 } + %10 = landingpad { ptr, i32 } cleanup %arrayidx.i.i.i6 = getelementptr inbounds i8, ptr %ref.tmp10, i64 23 - %12 = load i8, ptr %arrayidx.i.i.i6, align 1 - %13 = and i8 %12, -64 - %cmp.i.i7 = icmp eq i8 %13, 0 + %11 = load i8, ptr %arrayidx.i.i.i6, align 1 + %cmp.i.i7 = icmp ult i8 %11, 64 br i1 %cmp.i.i7, label %ehcleanup, label %if.end.i.i8 if.end.i.i8: ; preds = %lpad12 - %cmp.i.i.i9 = icmp eq i8 %13, -128 - %14 = load ptr, ptr %ref.tmp10, align 8 + %cmp.i.i.i9 = icmp slt i8 %11, -64 + %12 = load ptr, ptr %ref.tmp10, align 8 br i1 %cmp.i.i.i9, label %if.end.sink.split.i.i.i13, label %if.else.i.i.i10 if.else.i.i.i10: ; preds = %if.end.i.i8 - %add.ptr.i.i.i.i.i11 = getelementptr inbounds i8, ptr %14, i64 -8 - %15 = atomicrmw sub ptr %add.ptr.i.i.i.i.i11, i64 1 acq_rel, align 8 - %cmp.i.i.i.i12 = icmp eq i64 %15, 1 + %add.ptr.i.i.i.i.i11 = getelementptr inbounds i8, ptr %12, i64 -8 + %13 = atomicrmw sub ptr %add.ptr.i.i.i.i.i11, i64 1 acq_rel, align 8 + %cmp.i.i.i.i12 = icmp eq i64 %13, 1 br i1 %cmp.i.i.i.i12, label %if.end.sink.split.i.i.i13, label %ehcleanup if.end.sink.split.i.i.i13: ; preds = %if.else.i.i.i10, %if.end.i.i8 - %add.ptr.i.i.sink.i.i.i14 = phi ptr [ %14, %if.end.i.i8 ], [ %add.ptr.i.i.i.i.i11, %if.else.i.i.i10 ] + %add.ptr.i.i.sink.i.i.i14 = phi ptr [ %12, %if.end.i.i8 ], [ %add.ptr.i.i.i.i.i11, %if.else.i.i.i10 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i14) #23 br label %ehcleanup ehcleanup: ; preds = %if.end.sink.split.i.i.i13, %if.else.i.i.i10, %lpad12, %lpad5 - %.pn = phi { ptr, i32 } [ %10, %lpad5 ], [ %11, %lpad12 ], [ %11, %if.else.i.i.i10 ], [ %11, %if.end.sink.split.i.i.i13 ] + %.pn = phi { ptr, i32 } [ %9, %lpad5 ], [ %10, %lpad12 ], [ %10, %if.else.i.i.i10 ], [ %10, %if.end.sink.split.i.i.i13 ] call void @_ZN6google10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %ref.tmp) #23 br label %ehcleanup17 lpad15: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit - %16 = landingpad { ptr, i32 } + %14 = landingpad { ptr, i32 } cleanup br label %ehcleanup19 ehcleanup17: ; preds = %ehcleanup, %lpad3 - %.pn.pn = phi { ptr, i32 } [ %.pn, %ehcleanup ], [ %9, %lpad3 ] + %.pn.pn = phi { ptr, i32 } [ %.pn, %ehcleanup ], [ %8, %lpad3 ] invoke void @__cxa_end_catch() to label %ehcleanup19 unwind label %terminate.lpad @@ -5288,16 +5286,16 @@ nrvo.skipdtor: ; preds = %call.i4.noexc, %_ZN ret void ehcleanup19: ; preds = %ehcleanup17, %lpad15, %lpad - %lpad.val23.merged = phi { ptr, i32 } [ %16, %lpad15 ], [ %.pn.pn, %ehcleanup17 ], [ %0, %lpad ] + %lpad.val23.merged = phi { ptr, i32 } [ %14, %lpad15 ], [ %.pn.pn, %ehcleanup17 ], [ %0, %lpad ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %agg.result) #23 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %val) #23 resume { ptr, i32 } %lpad.val23.merged terminate.lpad: ; preds = %ehcleanup17 - %17 = landingpad { ptr, i32 } + %15 = landingpad { ptr, i32 } catch ptr null - %18 = extractvalue { ptr, i32 } %17, 0 - call void @__clang_call_terminate(ptr %18) #36 + %16 = extractvalue { ptr, i32 } %15, 0 + call void @__clang_call_terminate(ptr %16) #36 unreachable } diff --git a/bench/proxygen/optimized/HeaderTable.cpp.ll b/bench/proxygen/optimized/HeaderTable.cpp.ll index 9125adb2762..23a7c91017c 100644 --- a/bench/proxygen/optimized/HeaderTable.cpp.ll +++ b/bench/proxygen/optimized/HeaderTable.cpp.ll @@ -599,23 +599,22 @@ if.end.i5.thread.i: ; preds = %_ZSt4swapIN8proxyge if.end.i5.i: ; preds = %_ZSt4swapIN8proxygen15HPACKHeaderNameEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_.exit %arrayidx.i.i.i.i6.phi.trans.insert.i = getelementptr inbounds i8, ptr %goner, i64 31 %.pre.i2 = load i8, ptr %arrayidx.i.i.i.i6.phi.trans.insert.i, align 1 - %6 = and i8 %.pre.i2, -64 - %cmp.i.i.i7.i = icmp eq i8 %6, 0 + %cmp.i.i.i7.i = icmp ult i8 %.pre.i2, 64 br i1 %cmp.i.i.i7.i, label %_ZSt4swapIN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS0_13fbstring_coreIcEEEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISB_ESt18is_move_assignableISB_EEE5valueEvE4typeERSB_SK_.exit, label %if.end.i.i.i8.i if.end.i.i.i8.i: ; preds = %if.end.i5.i - %cmp.i.i.i.i9.i = icmp eq i8 %6, -128 - %7 = load ptr, ptr %value3, align 8 + %cmp.i.i.i.i9.i = icmp slt i8 %.pre.i2, -64 + %6 = load ptr, ptr %value3, align 8 br i1 %cmp.i.i.i.i9.i, label %if.end.sink.split.i.i.i.i15.i, label %if.else.i.i.i.i10.i if.else.i.i.i.i10.i: ; preds = %if.end.i.i.i8.i - %add.ptr.i.i.i.i.i.i11.i = getelementptr inbounds i8, ptr %7, i64 -8 - %8 = atomicrmw sub ptr %add.ptr.i.i.i.i.i.i11.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i.i12.i = icmp eq i64 %8, 1 + %add.ptr.i.i.i.i.i.i11.i = getelementptr inbounds i8, ptr %6, i64 -8 + %7 = atomicrmw sub ptr %add.ptr.i.i.i.i.i.i11.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i.i12.i = icmp eq i64 %7, 1 br i1 %cmp.i.i.i.i.i12.i, label %if.end.sink.split.i.i.i.i15.i, label %_ZSt4swapIN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS0_13fbstring_coreIcEEEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISB_ESt18is_move_assignableISB_EEE5valueEvE4typeERSB_SK_.exit if.end.sink.split.i.i.i.i15.i: ; preds = %if.else.i.i.i.i10.i, %if.end.i.i.i8.i - %add.ptr.i.i.sink.i.i.i.i16.i = phi ptr [ %7, %if.end.i.i.i8.i ], [ %add.ptr.i.i.i.i.i.i11.i, %if.else.i.i.i.i10.i ] + %add.ptr.i.i.sink.i.i.i.i16.i = phi ptr [ %6, %if.end.i.i.i8.i ], [ %add.ptr.i.i.i.i.i.i11.i, %if.else.i.i.i.i10.i ] tail call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i.i16.i) #29 br label %_ZSt4swapIN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS0_13fbstring_coreIcEEEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISB_ESt18is_move_assignableISB_EEE5valueEvE4typeERSB_SK_.exit @@ -2216,30 +2215,29 @@ define linkonce_odr void @_ZN8proxygen11HPACKHeaderD2Ev(ptr noundef nonnull alig entry: %arrayidx.i.i.i = getelementptr inbounds i8, ptr %this, i64 31 %0 = load i8, ptr %arrayidx.i.i.i, align 1 - %1 = and i8 %0, -64 - %cmp.i.i = icmp eq i8 %1, 0 + %cmp.i.i = icmp ult i8 %0, 64 br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %entry %value = getelementptr inbounds i8, ptr %this, i64 8 - %cmp.i.i.i = icmp eq i8 %1, -128 - %2 = load ptr, ptr %value, align 8 + %cmp.i.i.i = icmp slt i8 %0, -64 + %1 = load ptr, ptr %value, align 8 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i.i, label %if.else.i.i.i if.else.i.i.i: ; preds = %if.end.i.i - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %2, i64 -8 - %3 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i = icmp eq i64 %3, 1 + %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %1, i64 -8 + %2 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i = icmp eq i64 %2, 1 br i1 %cmp.i.i.i.i, label %if.end.sink.split.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i.i.i: ; preds = %if.else.i.i.i, %if.end.i.i - %add.ptr.i.i.sink.i.i.i = phi ptr [ %2, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] + %add.ptr.i.i.sink.i.i.i = phi ptr [ %1, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] tail call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i) #29 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit: ; preds = %entry, %if.else.i.i.i, %if.end.sink.split.i.i.i - %4 = load ptr, ptr %this, align 8 - %cmp.i.i.i1 = icmp eq ptr %4, null + %3 = load ptr, ptr %this, align 8 + %cmp.i.i.i1 = icmp eq ptr %3, null br i1 %cmp.i.i.i1, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit, label %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -2247,29 +2245,29 @@ _ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i: ; preds = %_ZN5folly14ba to label %call.i.i.i.i.noexc.i unwind label %terminate.lpad.i call.i.i.i.i.noexc.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i - %sub.ptr.lhs.cast.i.i.i.i.i = ptrtoint ptr %4 to i64 + %sub.ptr.lhs.cast.i.i.i.i.i = ptrtoint ptr %3 to i64 %sub.ptr.rhs.cast.i.i.i.i.i = ptrtoint ptr %call.i.i.i.i1.i to i64 %sub.ptr.sub.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i %sub.ptr.div.i.i.i.i.i = ashr exact i64 %sub.ptr.sub.i.i.i.i.i, 5 - %5 = add nsw i64 %sub.ptr.div.i.i.i.i.i, -89 - %6 = icmp ult i64 %5, -87 - br i1 %6, label %if.then.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit + %4 = add nsw i64 %sub.ptr.div.i.i.i.i.i, -89 + %5 = icmp ult i64 %4, -87 + br i1 %5, label %if.then.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit if.then.i.i: ; preds = %call.i.i.i.i.noexc.i - %7 = load ptr, ptr %this, align 8 - %isnull.i.i = icmp eq ptr %7, null + %6 = load ptr, ptr %this, align 8 + %isnull.i.i = icmp eq ptr %6, null br i1 %isnull.i.i, label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit, label %delete.notnull.i.i delete.notnull.i.i: ; preds = %if.then.i.i - tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #29 - tail call void @_ZdlPv(ptr noundef nonnull %7) #30 + tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #29 + tail call void @_ZdlPv(ptr noundef nonnull %6) #30 br label %_ZN8proxygen15HPACKHeaderNameD2Ev.exit terminate.lpad.i: ; preds = %_ZNK8proxygen15HPACKHeaderName11isAllocatedEv.exit.i.i - %8 = landingpad { ptr, i32 } + %7 = landingpad { ptr, i32 } catch ptr null - %9 = extractvalue { ptr, i32 } %8, 0 - tail call void @__clang_call_terminate(ptr %9) #31 + %8 = extractvalue { ptr, i32 } %7, 0 + tail call void @__clang_call_terminate(ptr %8) #31 unreachable _ZN8proxygen15HPACKHeaderNameD2Ev.exit: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, %call.i.i.i.i.noexc.i, %if.then.i.i, %delete.notnull.i.i diff --git a/bench/proxygen/optimized/Huffman.cpp.ll b/bench/proxygen/optimized/Huffman.cpp.ll index f7897d7f11c..9c618a929f7 100644 --- a/bench/proxygen/optimized/Huffman.cpp.ll +++ b/bench/proxygen/optimized/Huffman.cpp.ll @@ -1728,52 +1728,50 @@ invoke.cont: ; preds = %sw.bb.i call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %this, ptr noundef nonnull align 8 dereferenceable(24) %t.i, i64 24, i1 false) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %t.i) %10 = load i8, ptr %arrayidx.i.i.i, align 1 - %11 = and i8 %10, -64 - %cmp.i12 = icmp eq i8 %11, 0 + %cmp.i12 = icmp ult i8 %10, 64 br i1 %cmp.i12, label %if.end20, label %if.end.i13 if.end.i13: ; preds = %invoke.cont - %cmp.i.i = icmp eq i8 %11, -128 - %12 = load ptr, ptr %nascent, align 8 + %cmp.i.i = icmp slt i8 %10, -64 + %11 = load ptr, ptr %nascent, align 8 br i1 %cmp.i.i, label %if.end.sink.split.i.i, label %if.else.i.i if.else.i.i: ; preds = %if.end.i13 - %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %12, i64 -8 - %13 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i = icmp eq i64 %13, 1 + %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %11, i64 -8 + %12 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i = icmp eq i64 %12, 1 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i, label %if.end20 if.end.sink.split.i.i: ; preds = %if.else.i.i, %if.end.i13 - %add.ptr.i.i.sink.i.i = phi ptr [ %12, %if.end.i13 ], [ %add.ptr.i.i.i.i, %if.else.i.i ] + %add.ptr.i.i.sink.i.i = phi ptr [ %11, %if.end.i13 ], [ %add.ptr.i.i.i.i, %if.else.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i) #27 br label %if.end20 lpad: ; preds = %sw.bb.i - %14 = landingpad { ptr, i32 } + %13 = landingpad { ptr, i32 } cleanup - %15 = load i8, ptr %arrayidx.i.i.i, align 1 - %16 = and i8 %15, -64 - %cmp.i15 = icmp eq i8 %16, 0 + %14 = load i8, ptr %arrayidx.i.i.i, align 1 + %cmp.i15 = icmp ult i8 %14, 64 br i1 %cmp.i15, label %_ZN5folly13fbstring_coreIcED2Ev.exit23, label %if.end.i16 if.end.i16: ; preds = %lpad - %cmp.i.i17 = icmp eq i8 %16, -128 - %17 = load ptr, ptr %nascent, align 8 + %cmp.i.i17 = icmp slt i8 %14, -64 + %15 = load ptr, ptr %nascent, align 8 br i1 %cmp.i.i17, label %if.end.sink.split.i.i21, label %if.else.i.i18 if.else.i.i18: ; preds = %if.end.i16 - %add.ptr.i.i.i.i19 = getelementptr inbounds i8, ptr %17, i64 -8 - %18 = atomicrmw sub ptr %add.ptr.i.i.i.i19, i64 1 acq_rel, align 8 - %cmp.i.i.i20 = icmp eq i64 %18, 1 + %add.ptr.i.i.i.i19 = getelementptr inbounds i8, ptr %15, i64 -8 + %16 = atomicrmw sub ptr %add.ptr.i.i.i.i19, i64 1 acq_rel, align 8 + %cmp.i.i.i20 = icmp eq i64 %16, 1 br i1 %cmp.i.i.i20, label %if.end.sink.split.i.i21, label %_ZN5folly13fbstring_coreIcED2Ev.exit23 if.end.sink.split.i.i21: ; preds = %if.else.i.i18, %if.end.i16 - %add.ptr.i.i.sink.i.i22 = phi ptr [ %17, %if.end.i16 ], [ %add.ptr.i.i.i.i19, %if.else.i.i18 ] + %add.ptr.i.i.sink.i.i22 = phi ptr [ %15, %if.end.i16 ], [ %add.ptr.i.i.i.i19, %if.else.i.i18 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i22) #27 br label %_ZN5folly13fbstring_coreIcED2Ev.exit23 _ZN5folly13fbstring_coreIcED2Ev.exit23: ; preds = %lpad, %if.else.i.i18, %if.end.sink.split.i.i21 - resume { ptr, i32 } %14 + resume { ptr, i32 } %13 if.end20: ; preds = %if.end.sink.split.i.i, %if.else.i.i, %invoke.cont, %entry, %_ZN5folly12smartReallocEPvmmm.exit ret void diff --git a/bench/qemu/optimized/hw_pci_msix.c.ll b/bench/qemu/optimized/hw_pci_msix.c.ll index f9851189074..92fb18211b4 100644 --- a/bench/qemu/optimized/hw_pci_msix.c.ll +++ b/bench/qemu/optimized/hw_pci_msix.c.ll @@ -1424,14 +1424,13 @@ if.end: ; preds = %entry %2 = getelementptr i8, ptr %0, i64 %conv %arrayidx = getelementptr i8, ptr %2, i64 3 %3 = load i8, ptr %arrayidx, align 1 - %4 = and i8 %3, -64 - %cmp = icmp eq i8 %4, -128 + %cmp = icmp slt i8 %3, -64 br i1 %cmp, label %for.cond.preheader, label %if.end11 for.cond.preheader: ; preds = %if.end %msix_entries_nr = getelementptr inbounds i8, ptr %dev, i64 1268 - %5 = load i32, ptr %msix_entries_nr, align 4 - %cmp546 = icmp sgt i32 %5, 0 + %4 = load i32, ptr %msix_entries_nr, align 4 + %cmp546 = icmp sgt i32 %4, 0 br i1 %cmp546, label %for.body.lr.ph, label %if.end11 for.body.lr.ph: ; preds = %for.cond.preheader @@ -1443,19 +1442,19 @@ for.body.lr.ph: ; preds = %for.cond.preheader for.body: ; preds = %for.body.lr.ph, %for.inc %indvars.iv53 = phi i32 [ -1, %for.body.lr.ph ], [ %indvars.iv.next54, %for.inc ] %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc ] - %6 = load i8, ptr %msix_function_masked.i.i, align 8 - %tobool.i.i = trunc i8 %6 to i1 - %7 = trunc nuw nsw i64 %indvars.iv to i32 - %mul.i.i.i = shl i32 %7, 4 - %8 = load i8, ptr @xen_allowed, align 1 - %tobool.i.i.i = trunc i8 %8 to i1 + %5 = load i8, ptr %msix_function_masked.i.i, align 8 + %tobool.i.i = trunc i8 %5 to i1 + %6 = trunc nuw nsw i64 %indvars.iv to i32 + %mul.i.i.i = shl i32 %6, 4 + %7 = load i8, ptr @xen_allowed, align 1 + %tobool.i.i.i = trunc i8 %7 to i1 br i1 %tobool.i.i.i, label %land.lhs.true.i.i.i, label %if.end.i.i.i land.lhs.true.i.i.i: ; preds = %for.body - %9 = load ptr, ptr %msix_table.i.i.i, align 8 + %8 = load ptr, ptr %msix_table.i.i.i, align 8 %add.i.i.i = or disjoint i32 %mul.i.i.i, 8 %idxprom.i.i.i = zext i32 %add.i.i.i to i64 - %arrayidx.i.i.i = getelementptr i8, ptr %9, i64 %idxprom.i.i.i + %arrayidx.i.i.i = getelementptr i8, ptr %8, i64 %idxprom.i.i.i %arrayidx.val.i.i.i = load i32, ptr %arrayidx.i.i.i, align 1 %call1.i.i.i = tail call i32 @xen_is_pirq_msi(i32 noundef %arrayidx.val.i.i.i) #14 %tobool2.not.i.i.i = icmp ne i32 %call1.i.i.i, 0 @@ -1466,25 +1465,25 @@ if.end.i.i.i: ; preds = %for.body br i1 %tobool.i.i, label %for.inc, label %lor.rhs.i.i.i lor.rhs.i.i.i: ; preds = %if.end.i.i.i, %land.lhs.true.i.i.i - %10 = load ptr, ptr %msix_table.i.i.i, align 8 + %9 = load ptr, ptr %msix_table.i.i.i, align 8 %add5.i.i.i = or disjoint i32 %mul.i.i.i, 12 %idxprom6.i.i.i = zext i32 %add5.i.i.i to i64 - %arrayidx7.i.i.i = getelementptr i8, ptr %10, i64 %idxprom6.i.i.i - %11 = load i8, ptr %arrayidx7.i.i.i, align 1 - %12 = and i8 %11, 1 - %tobool8.i.i.not.i = icmp eq i8 %12, 0 + %arrayidx7.i.i.i = getelementptr i8, ptr %9, i64 %idxprom6.i.i.i + %10 = load i8, ptr %arrayidx7.i.i.i, align 1 + %11 = and i8 %10, 1 + %tobool8.i.i.not.i = icmp eq i8 %11, 0 br i1 %tobool8.i.i.not.i, label %msix_set_notifier_for_vector.exit, label %for.inc msix_is_masked.exit.i: ; preds = %land.lhs.true.i.i.i br i1 %tobool2.not.i.i.i, label %msix_set_notifier_for_vector.exit, label %for.inc msix_set_notifier_for_vector.exit: ; preds = %lor.rhs.i.i.i, %msix_is_masked.exit.i - %13 = load ptr, ptr %msix_prepare_message.i.i, align 16 - %call.i.i = tail call { i64, i32 } %13(ptr noundef nonnull %dev, i32 noundef %7) #14 - %14 = extractvalue { i64, i32 } %call.i.i, 0 - %15 = extractvalue { i64, i32 } %call.i.i, 1 - %16 = load ptr, ptr %msix_vector_use_notifier, align 16 - %call2.i = tail call i32 %16(ptr noundef nonnull %dev, i32 noundef %7, i64 %14, i32 %15) #14 + %12 = load ptr, ptr %msix_prepare_message.i.i, align 16 + %call.i.i = tail call { i64, i32 } %12(ptr noundef nonnull %dev, i32 noundef %6) #14 + %13 = extractvalue { i64, i32 } %call.i.i, 0 + %14 = extractvalue { i64, i32 } %call.i.i, 1 + %15 = load ptr, ptr %msix_vector_use_notifier, align 16 + %call2.i = tail call i32 %15(ptr noundef nonnull %dev, i32 noundef %6, i64 %13, i32 %14) #14 %cmp7 = icmp slt i32 %call2.i, 0 br i1 %cmp7, label %while.cond.preheader, label %for.inc @@ -1493,14 +1492,14 @@ while.cond.preheader: ; preds = %msix_set_notifier_f br i1 %cmp1849.not, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %while.cond.preheader - %17 = zext i32 %indvars.iv53 to i64 + %16 = zext i32 %indvars.iv53 to i64 br label %while.body for.inc: ; preds = %if.end.i.i.i, %lor.rhs.i.i.i, %msix_is_masked.exit.i, %msix_set_notifier_for_vector.exit %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %18 = load i32, ptr %msix_entries_nr, align 4 - %19 = sext i32 %18 to i64 - %cmp5 = icmp slt i64 %indvars.iv.next, %19 + %17 = load i32, ptr %msix_entries_nr, align 4 + %18 = sext i32 %17 to i64 + %cmp5 = icmp slt i64 %indvars.iv.next, %18 %indvars.iv.next54 = add nsw i32 %indvars.iv53, 1 br i1 %cmp5, label %for.body, label %if.end11.loopexit, !llvm.loop !11 @@ -1509,31 +1508,31 @@ if.end11.loopexit: ; preds = %for.inc br label %if.end11 if.end11: ; preds = %if.end11.loopexit, %for.cond.preheader, %if.end - %20 = phi ptr [ %.pre, %if.end11.loopexit ], [ %poll_notifier, %for.cond.preheader ], [ %poll_notifier, %if.end ] - %tobool13.not = icmp eq ptr %20, null + %19 = phi ptr [ %.pre, %if.end11.loopexit ], [ %poll_notifier, %for.cond.preheader ], [ %poll_notifier, %if.end ] + %tobool13.not = icmp eq ptr %19, null br i1 %tobool13.not, label %return, label %if.then14 if.then14: ; preds = %if.end11 %msix_entries_nr16 = getelementptr inbounds i8, ptr %dev, i64 1268 - %21 = load i32, ptr %msix_entries_nr16, align 4 - tail call void %20(ptr noundef nonnull %dev, i32 noundef 0, i32 noundef %21) #14 + %20 = load i32, ptr %msix_entries_nr16, align 4 + tail call void %19(ptr noundef nonnull %dev, i32 noundef 0, i32 noundef %20) #14 br label %return while.body: ; preds = %while.body.preheader, %msix_unset_notifier_for_vector.exit - %indvars.iv56 = phi i64 [ %17, %while.body.preheader ], [ %indvars.iv.next57, %msix_unset_notifier_for_vector.exit ] - %22 = load i8, ptr %msix_function_masked.i.i, align 8 - %tobool.i.i23 = trunc i8 %22 to i1 - %23 = trunc nuw nsw i64 %indvars.iv56 to i32 - %mul.i.i.i24 = shl i32 %23, 4 - %24 = load i8, ptr @xen_allowed, align 1 - %tobool.i.i.i26 = trunc i8 %24 to i1 + %indvars.iv56 = phi i64 [ %16, %while.body.preheader ], [ %indvars.iv.next57, %msix_unset_notifier_for_vector.exit ] + %21 = load i8, ptr %msix_function_masked.i.i, align 8 + %tobool.i.i23 = trunc i8 %21 to i1 + %22 = trunc nuw nsw i64 %indvars.iv56 to i32 + %mul.i.i.i24 = shl i32 %22, 4 + %23 = load i8, ptr @xen_allowed, align 1 + %tobool.i.i.i26 = trunc i8 %23 to i1 br i1 %tobool.i.i.i26, label %land.lhs.true.i.i.i34, label %if.end.i.i.i27 land.lhs.true.i.i.i34: ; preds = %while.body - %25 = load ptr, ptr %msix_table.i.i.i, align 8 + %24 = load ptr, ptr %msix_table.i.i.i, align 8 %add.i.i.i35 = or disjoint i32 %mul.i.i.i24, 8 %idxprom.i.i.i36 = zext i32 %add.i.i.i35 to i64 - %arrayidx.i.i.i37 = getelementptr i8, ptr %25, i64 %idxprom.i.i.i36 + %arrayidx.i.i.i37 = getelementptr i8, ptr %24, i64 %idxprom.i.i.i36 %arrayidx.val.i.i.i38 = load i32, ptr %arrayidx.i.i.i37, align 1 %call1.i.i.i39 = tail call i32 @xen_is_pirq_msi(i32 noundef %arrayidx.val.i.i.i38) #14 %tobool2.not.i.i.i40 = icmp ne i32 %call1.i.i.i39, 0 @@ -1544,21 +1543,21 @@ if.end.i.i.i27: ; preds = %while.body br i1 %tobool.i.i23, label %msix_unset_notifier_for_vector.exit, label %lor.rhs.i.i.i28 lor.rhs.i.i.i28: ; preds = %if.end.i.i.i27, %land.lhs.true.i.i.i34 - %26 = load ptr, ptr %msix_table.i.i.i, align 8 + %25 = load ptr, ptr %msix_table.i.i.i, align 8 %add5.i.i.i29 = or disjoint i32 %mul.i.i.i24, 12 %idxprom6.i.i.i30 = zext i32 %add5.i.i.i29 to i64 - %arrayidx7.i.i.i31 = getelementptr i8, ptr %26, i64 %idxprom6.i.i.i30 - %27 = load i8, ptr %arrayidx7.i.i.i31, align 1 - %28 = and i8 %27, 1 - %tobool8.i.i.not.i32 = icmp eq i8 %28, 0 + %arrayidx7.i.i.i31 = getelementptr i8, ptr %25, i64 %idxprom6.i.i.i30 + %26 = load i8, ptr %arrayidx7.i.i.i31, align 1 + %27 = and i8 %26, 1 + %tobool8.i.i.not.i32 = icmp eq i8 %27, 0 br i1 %tobool8.i.i.not.i32, label %if.end.i33, label %msix_unset_notifier_for_vector.exit msix_is_masked.exit.i42: ; preds = %land.lhs.true.i.i.i34 br i1 %tobool2.not.i.i.i40, label %if.end.i33, label %msix_unset_notifier_for_vector.exit if.end.i33: ; preds = %msix_is_masked.exit.i42, %lor.rhs.i.i.i28 - %29 = load ptr, ptr %msix_vector_release_notifier, align 8 - tail call void %29(ptr noundef nonnull %dev, i32 noundef %23) #14 + %28 = load ptr, ptr %msix_vector_release_notifier, align 8 + tail call void %28(ptr noundef nonnull %dev, i32 noundef %22) #14 br label %msix_unset_notifier_for_vector.exit msix_unset_notifier_for_vector.exit: ; preds = %if.end.i.i.i27, %lor.rhs.i.i.i28, %msix_is_masked.exit.i42, %if.end.i33 @@ -1602,14 +1601,13 @@ if.end: ; preds = %land.lhs.true %4 = getelementptr i8, ptr %2, i64 %conv %arrayidx = getelementptr i8, ptr %4, i64 3 %5 = load i8, ptr %arrayidx, align 1 - %6 = and i8 %5, -64 - %cmp = icmp eq i8 %6, -128 + %cmp = icmp slt i8 %5, -64 br i1 %cmp, label %for.cond.preheader, label %if.end7 for.cond.preheader: ; preds = %if.end %msix_entries_nr = getelementptr inbounds i8, ptr %dev, i64 1268 - %7 = load i32, ptr %msix_entries_nr, align 4 - %cmp511 = icmp sgt i32 %7, 0 + %6 = load i32, ptr %msix_entries_nr, align 4 + %cmp511 = icmp sgt i32 %6, 0 br i1 %cmp511, label %for.body.lr.ph, label %if.end7 for.body.lr.ph: ; preds = %for.cond.preheader @@ -1619,19 +1617,19 @@ for.body.lr.ph: ; preds = %for.cond.preheader for.body: ; preds = %for.body.lr.ph, %msix_unset_notifier_for_vector.exit %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %msix_unset_notifier_for_vector.exit ] - %8 = load i8, ptr %msix_function_masked.i.i, align 8 - %tobool.i.i = trunc i8 %8 to i1 - %9 = trunc nuw nsw i64 %indvars.iv to i32 - %mul.i.i.i = shl i32 %9, 4 - %10 = load i8, ptr @xen_allowed, align 1 - %tobool.i.i.i = trunc i8 %10 to i1 + %7 = load i8, ptr %msix_function_masked.i.i, align 8 + %tobool.i.i = trunc i8 %7 to i1 + %8 = trunc nuw nsw i64 %indvars.iv to i32 + %mul.i.i.i = shl i32 %8, 4 + %9 = load i8, ptr @xen_allowed, align 1 + %tobool.i.i.i = trunc i8 %9 to i1 br i1 %tobool.i.i.i, label %land.lhs.true.i.i.i, label %if.end.i.i.i land.lhs.true.i.i.i: ; preds = %for.body - %11 = load ptr, ptr %msix_table.i.i.i, align 8 + %10 = load ptr, ptr %msix_table.i.i.i, align 8 %add.i.i.i = or disjoint i32 %mul.i.i.i, 8 %idxprom.i.i.i = zext i32 %add.i.i.i to i64 - %arrayidx.i.i.i = getelementptr i8, ptr %11, i64 %idxprom.i.i.i + %arrayidx.i.i.i = getelementptr i8, ptr %10, i64 %idxprom.i.i.i %arrayidx.val.i.i.i = load i32, ptr %arrayidx.i.i.i, align 1 %call1.i.i.i = tail call i32 @xen_is_pirq_msi(i32 noundef %arrayidx.val.i.i.i) #14 %tobool2.not.i.i.i = icmp ne i32 %call1.i.i.i, 0 @@ -1642,28 +1640,28 @@ if.end.i.i.i: ; preds = %for.body br i1 %tobool.i.i, label %msix_unset_notifier_for_vector.exit, label %lor.rhs.i.i.i lor.rhs.i.i.i: ; preds = %if.end.i.i.i, %land.lhs.true.i.i.i - %12 = load ptr, ptr %msix_table.i.i.i, align 8 + %11 = load ptr, ptr %msix_table.i.i.i, align 8 %add5.i.i.i = or disjoint i32 %mul.i.i.i, 12 %idxprom6.i.i.i = zext i32 %add5.i.i.i to i64 - %arrayidx7.i.i.i = getelementptr i8, ptr %12, i64 %idxprom6.i.i.i - %13 = load i8, ptr %arrayidx7.i.i.i, align 1 - %14 = and i8 %13, 1 - %tobool8.i.i.not.i = icmp eq i8 %14, 0 + %arrayidx7.i.i.i = getelementptr i8, ptr %11, i64 %idxprom6.i.i.i + %12 = load i8, ptr %arrayidx7.i.i.i, align 1 + %13 = and i8 %12, 1 + %tobool8.i.i.not.i = icmp eq i8 %13, 0 br i1 %tobool8.i.i.not.i, label %if.end.i, label %msix_unset_notifier_for_vector.exit msix_is_masked.exit.i: ; preds = %land.lhs.true.i.i.i br i1 %tobool2.not.i.i.i, label %if.end.i, label %msix_unset_notifier_for_vector.exit if.end.i: ; preds = %msix_is_masked.exit.i, %lor.rhs.i.i.i - %15 = load ptr, ptr %msix_vector_release_notifier, align 8 - tail call void %15(ptr noundef nonnull %dev, i32 noundef %9) #14 + %14 = load ptr, ptr %msix_vector_release_notifier, align 8 + tail call void %14(ptr noundef nonnull %dev, i32 noundef %8) #14 br label %msix_unset_notifier_for_vector.exit msix_unset_notifier_for_vector.exit: ; preds = %if.end.i.i.i, %lor.rhs.i.i.i, %msix_is_masked.exit.i, %if.end.i %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %16 = load i32, ptr %msix_entries_nr, align 4 - %17 = sext i32 %16 to i64 - %cmp5 = icmp slt i64 %indvars.iv.next, %17 + %15 = load i32, ptr %msix_entries_nr, align 4 + %16 = sext i32 %15 to i64 + %cmp5 = icmp slt i64 %indvars.iv.next, %16 br i1 %cmp5, label %for.body, label %if.end7, !llvm.loop !13 if.end7: ; preds = %msix_unset_notifier_for_vector.exit, %for.cond.preheader, %if.end diff --git a/bench/qemu/optimized/target_riscv_vector_helper.c.ll b/bench/qemu/optimized/target_riscv_vector_helper.c.ll index 3029e95a5ed..d4134d08cf3 100644 --- a/bench/qemu/optimized/target_riscv_vector_helper.c.ll +++ b/bench/qemu/optimized/target_riscv_vector_helper.c.ll @@ -72566,15 +72566,14 @@ lor.lhs.false3.i.i: ; preds = %lor.lhs.false.i.i lor.lhs.false7.i.i: ; preds = %lor.lhs.false3.i.i %cmp.i27.i.i = icmp ne i16 %12, 0 - %15 = and i16 %11, -1024 - %16 = icmp eq i16 %15, -32768 - %or.cond.not.i.i = and i1 %cmp.i27.i.i, %16 + %15 = icmp slt i16 %11, -31744 + %or.cond.not.i.i = and i1 %15, %cmp.i27.i.i br i1 %or.cond.not.i.i, label %if.then.i.i, label %if.end.i.i if.then.i.i: ; preds = %lor.lhs.false7.i.i, %lor.lhs.false3.i.i, %lor.lhs.false.i.i, %if.end13 - %17 = load i16, ptr %fp_status.i, align 2 - %18 = or i16 %17, 1 - store i16 %18, ptr %fp_status.i, align 2 + %16 = load i16, ptr %fp_status.i, align 2 + %17 = or i16 %16, 1 + store i16 %17, ptr %fp_status.i, align 2 %call14.i.i = tail call zeroext i16 @float16_default_nan(ptr noundef nonnull %fp_status.i) #10 br label %do_vfrsqrt7_v_h.exit @@ -72591,9 +72590,9 @@ if.end18.i.i: ; preds = %if.end.i.i br i1 %cmp.i28.i.i, label %if.then20.i.i, label %if.end28.i.i if.then20.i.i: ; preds = %if.end18.i.i - %19 = load i16, ptr %fp_status.i, align 2 - %20 = or i16 %19, 2 - store i16 %20, ptr %fp_status.i, align 2 + %18 = load i16, ptr %fp_status.i, align 2 + %19 = or i16 %18, 2 + store i16 %19, ptr %fp_status.i, align 2 %conv1.i.i.i = or disjoint i16 %11, 31744 br label %do_vfrsqrt7_v_h.exit @@ -72612,8 +72611,8 @@ if.end37.i.i: ; preds = %if.end28.i.i br i1 %or.cond.i, label %while.cond.preheader.i, label %frsqrt7.exit while.cond.preheader.i: ; preds = %if.end37.i.i - %21 = and i64 %conv38.i.i, 512 - %cmp574.i = icmp eq i64 %21, 0 + %20 = and i64 %conv38.i.i, 512 + %cmp574.i = icmp eq i64 %20, 0 br i1 %cmp574.i, label %while.body.i, label %while.end.i while.body.i: ; preds = %while.cond.preheader.i, %while.body.i @@ -72621,8 +72620,8 @@ while.body.i: ; preds = %while.cond.preheade %frac.175.i = phi i64 [ %shl.i, %while.body.i ], [ %and.i40.i, %while.cond.preheader.i ] %dec.i = add i64 %exp.176.i, -1 %shl.i = shl i64 %frac.175.i, 1 - %22 = and i64 %frac.175.i, 256 - %cmp5.i = icmp eq i64 %22, 0 + %21 = and i64 %frac.175.i, 256 + %cmp5.i = icmp eq i64 %21, 0 br i1 %cmp5.i, label %while.body.i, label %while.end.i, !llvm.loop !357 while.end.i: ; preds = %while.body.i, %while.cond.preheader.i @@ -72640,16 +72639,16 @@ frsqrt7.exit: ; preds = %if.end37.i.i, %whil %shr14.i = lshr i64 %frac.0.i, 4 %or.i = or disjoint i64 %shl10.i, %shr14.i %arrayidx.i23 = getelementptr [128 x i8], ptr @__const.frsqrt7.lookup_table, i64 0, i64 %or.i - %23 = load i8, ptr %arrayidx.i23, align 1 - %conv15.i = zext i8 %23 to i64 + %22 = load i8, ptr %arrayidx.i23, align 1 + %conv15.i = zext i8 %22 to i64 %shl18.i = shl nuw nsw i64 %conv15.i, 3 - %24 = and i64 %shl18.i, 1016 - %25 = shl i64 %exp.0.i, 9 - %26 = sub i64 22528, %25 - %and8.i.i = and i64 %26, 31744 + %23 = and i64 %shl18.i, 1016 + %24 = shl i64 %exp.0.i, 9 + %25 = sub i64 22528, %24 + %and8.i.i = and i64 %25, 31744 %shr.i.i = and i64 %conv38.i.i, 32768 %or.i.i = or disjoint i64 %and8.i.i, %shr.i.i - %or.i71.i = or disjoint i64 %or.i.i, %24 + %or.i71.i = or disjoint i64 %or.i.i, %23 %conv40.i.i = trunc nuw i64 %or.i71.i to i16 br label %do_vfrsqrt7_v_h.exit @@ -72759,15 +72758,14 @@ lor.lhs.false3.i.i: ; preds = %lor.lhs.false.i.i lor.lhs.false7.i.i: ; preds = %lor.lhs.false3.i.i %cmp.i30.i.i = icmp ne i32 %and.i.i.i22, 0 - %12 = and i32 %11, -8388608 - %13 = icmp eq i32 %12, -2147483648 - %or.cond.not.i.i = and i1 %cmp.i30.i.i, %13 + %12 = icmp slt i32 %11, -2139095040 + %or.cond.not.i.i = and i1 %12, %cmp.i30.i.i br i1 %or.cond.not.i.i, label %if.then.i.i, label %if.end.i.i if.then.i.i: ; preds = %lor.lhs.false7.i.i, %lor.lhs.false3.i.i, %lor.lhs.false.i.i, %if.end13 - %14 = load i16, ptr %fp_status.i, align 2 - %15 = or i16 %14, 1 - store i16 %15, ptr %fp_status.i, align 2 + %13 = load i16, ptr %fp_status.i, align 2 + %14 = or i16 %13, 1 + store i16 %14, ptr %fp_status.i, align 2 %call14.i.i = tail call i32 @float32_default_nan(ptr noundef nonnull %fp_status.i) #10 br label %do_vfrsqrt7_v_w.exit @@ -72784,9 +72782,9 @@ if.end18.i.i: ; preds = %if.end.i.i br i1 %cmp.i32.i.i, label %if.then20.i.i, label %if.end28.i.i if.then20.i.i: ; preds = %if.end18.i.i - %16 = load i16, ptr %fp_status.i, align 2 - %17 = or i16 %16, 2 - store i16 %17, ptr %fp_status.i, align 2 + %15 = load i16, ptr %fp_status.i, align 2 + %16 = or i16 %15, 2 + store i16 %16, ptr %fp_status.i, align 2 %or.i.i.i = or disjoint i32 %11, 2139095040 br label %do_vfrsqrt7_v_w.exit @@ -72805,8 +72803,8 @@ if.end37.i.i: ; preds = %if.end28.i.i br i1 %or.cond.i, label %while.cond.preheader.i, label %frsqrt7.exit while.cond.preheader.i: ; preds = %if.end37.i.i - %18 = and i64 %conv38.i.i, 4194304 - %cmp574.i = icmp eq i64 %18, 0 + %17 = and i64 %conv38.i.i, 4194304 + %cmp574.i = icmp eq i64 %17, 0 br i1 %cmp574.i, label %while.body.i, label %while.end.i while.body.i: ; preds = %while.cond.preheader.i, %while.body.i @@ -72814,8 +72812,8 @@ while.body.i: ; preds = %while.cond.preheade %frac.175.i = phi i64 [ %shl.i, %while.body.i ], [ %and.i40.i, %while.cond.preheader.i ] %dec.i = add i64 %exp.176.i, -1 %shl.i = shl i64 %frac.175.i, 1 - %19 = and i64 %frac.175.i, 2097152 - %cmp5.i = icmp eq i64 %19, 0 + %18 = and i64 %frac.175.i, 2097152 + %cmp5.i = icmp eq i64 %18, 0 br i1 %cmp5.i, label %while.body.i, label %while.end.i, !llvm.loop !357 while.end.i: ; preds = %while.body.i, %while.cond.preheader.i @@ -72833,16 +72831,16 @@ frsqrt7.exit: ; preds = %if.end37.i.i, %whil %shr14.i = lshr i64 %frac.0.i, 17 %or.i = or disjoint i64 %shl10.i, %shr14.i %arrayidx.i25 = getelementptr [128 x i8], ptr @__const.frsqrt7.lookup_table, i64 0, i64 %or.i - %20 = load i8, ptr %arrayidx.i25, align 1 - %conv15.i = zext i8 %20 to i64 + %19 = load i8, ptr %arrayidx.i25, align 1 + %conv15.i = zext i8 %19 to i64 %shl18.i = shl nuw nsw i64 %conv15.i, 16 - %21 = and i64 %shl18.i, 8323072 - %22 = shl i64 %exp.0.i, 22 - %23 = sub i64 1593835520, %22 - %and8.i.i = and i64 %23, 2139095040 + %20 = and i64 %shl18.i, 8323072 + %21 = shl i64 %exp.0.i, 22 + %22 = sub i64 1593835520, %21 + %and8.i.i = and i64 %22, 2139095040 %shr.i.i = and i64 %conv38.i.i, 2147483648 %or.i.i = or disjoint i64 %and8.i.i, %shr.i.i - %or.i71.i = or disjoint i64 %or.i.i, %21 + %or.i71.i = or disjoint i64 %or.i.i, %20 %conv40.i.i = trunc nuw i64 %or.i71.i to i32 br label %do_vfrsqrt7_v_w.exit @@ -72952,15 +72950,14 @@ lor.lhs.false3.i.i: ; preds = %lor.lhs.false.i.i lor.lhs.false7.i.i: ; preds = %lor.lhs.false3.i.i %cmp.i30.i.i = icmp ne i64 %and.i.i.i22, 0 - %12 = and i64 %11, -4503599627370496 - %13 = icmp eq i64 %12, -9223372036854775808 - %or.cond.not.i.i = and i1 %cmp.i30.i.i, %13 + %12 = icmp slt i64 %11, -9218868437227405312 + %or.cond.not.i.i = and i1 %12, %cmp.i30.i.i br i1 %or.cond.not.i.i, label %if.then.i.i, label %if.end.i.i if.then.i.i: ; preds = %lor.lhs.false7.i.i, %lor.lhs.false3.i.i, %lor.lhs.false.i.i, %if.end13 - %14 = load i16, ptr %fp_status.i, align 2 - %15 = or i16 %14, 1 - store i16 %15, ptr %fp_status.i, align 2 + %13 = load i16, ptr %fp_status.i, align 2 + %14 = or i16 %13, 1 + store i16 %14, ptr %fp_status.i, align 2 %call14.i.i = tail call i64 @float64_default_nan(ptr noundef nonnull %fp_status.i) #10 br label %do_vfrsqrt7_v_d.exit @@ -72977,9 +72974,9 @@ if.end18.i.i: ; preds = %if.end.i.i br i1 %cmp.i32.i.i, label %if.then20.i.i, label %if.end28.i.i if.then20.i.i: ; preds = %if.end18.i.i - %16 = load i16, ptr %fp_status.i, align 2 - %17 = or i16 %16, 2 - store i16 %17, ptr %fp_status.i, align 2 + %15 = load i16, ptr %fp_status.i, align 2 + %16 = or i16 %15, 2 + store i16 %16, ptr %fp_status.i, align 2 %or.i.i.i = or disjoint i64 %11, 9218868437227405312 br label %do_vfrsqrt7_v_d.exit @@ -72996,8 +72993,8 @@ if.end37.i.i: ; preds = %if.end28.i.i br i1 %or.cond.i, label %while.cond.preheader.i, label %frsqrt7.exit while.cond.preheader.i: ; preds = %if.end37.i.i - %18 = and i64 %11, 2251799813685248 - %cmp574.i = icmp eq i64 %18, 0 + %17 = and i64 %11, 2251799813685248 + %cmp574.i = icmp eq i64 %17, 0 br i1 %cmp574.i, label %while.body.i, label %while.end.i while.body.i: ; preds = %while.cond.preheader.i, %while.body.i @@ -73005,8 +73002,8 @@ while.body.i: ; preds = %while.cond.preheade %frac.175.i = phi i64 [ %shl.i, %while.body.i ], [ %and.i40.i, %while.cond.preheader.i ] %dec.i = add i64 %exp.176.i, -1 %shl.i = shl i64 %frac.175.i, 1 - %19 = and i64 %frac.175.i, 1125899906842624 - %cmp5.i = icmp eq i64 %19, 0 + %18 = and i64 %frac.175.i, 1125899906842624 + %cmp5.i = icmp eq i64 %18, 0 br i1 %cmp5.i, label %while.body.i, label %while.end.i, !llvm.loop !357 while.end.i: ; preds = %while.body.i, %while.cond.preheader.i @@ -73024,16 +73021,16 @@ frsqrt7.exit: ; preds = %if.end37.i.i, %whil %shr14.i = lshr i64 %frac.0.i, 46 %or.i = or disjoint i64 %shl10.i, %shr14.i %arrayidx.i25 = getelementptr [128 x i8], ptr @__const.frsqrt7.lookup_table, i64 0, i64 %or.i - %20 = load i8, ptr %arrayidx.i25, align 1 - %conv15.i = zext i8 %20 to i64 + %19 = load i8, ptr %arrayidx.i25, align 1 + %conv15.i = zext i8 %19 to i64 %shl18.i = shl nuw nsw i64 %conv15.i, 45 - %21 = and i64 %shl18.i, 4468415255281664 - %22 = shl i64 %exp.0.i, 51 - %23 = sub i64 6908521828386340864, %22 - %and8.i.i = and i64 %23, 9218868437227405312 + %20 = and i64 %shl18.i, 4468415255281664 + %21 = shl i64 %exp.0.i, 51 + %22 = sub i64 6908521828386340864, %21 + %and8.i.i = and i64 %22, 9218868437227405312 %shr.i.i = and i64 %11, -9223372036854775808 %or.i.i = or disjoint i64 %and8.i.i, %shr.i.i - %or.i71.i = or disjoint i64 %or.i.i, %21 + %or.i71.i = or disjoint i64 %or.i.i, %20 br label %do_vfrsqrt7_v_d.exit do_vfrsqrt7_v_d.exit: ; preds = %if.then.i.i, %if.then16.i.i, %if.then20.i.i, %if.end28.i.i, %frsqrt7.exit diff --git a/bench/regex-rs/optimized/4qhif1ofea978syx.ll b/bench/regex-rs/optimized/4qhif1ofea978syx.ll index ea38bf1d7e0..1ee8be31118 100644 --- a/bench/regex-rs/optimized/4qhif1ofea978syx.ll +++ b/bench/regex-rs/optimized/4qhif1ofea978syx.ll @@ -1313,7 +1313,7 @@ define noundef zeroext i1 @"_ZN63_$LT$regex_syntax..debug..Bytes$u20$as$u20$core define hidden range(i64 0, 9007194959773699) i64 @_ZN12regex_syntax5debug11utf8_decode17hba173251560b97f0E(ptr noalias noundef nonnull readonly align 1 %0, i64 noundef %1) unnamed_addr #0 { %3 = alloca { i64, [2 x i64] }, align 8 %4 = icmp eq i64 %1, 0 - br i1 %4, label %16, label %5 + br i1 %4, label %15, label %5 5: ; preds = %2 %6 = load i8, ptr %0, align 1, !noundef !4 @@ -1321,138 +1321,137 @@ define hidden range(i64 0, 9007194959773699) i64 @_ZN12regex_syntax5debug11utf8_ br i1 %7, label %.thread61, label %8 8: ; preds = %5 - %9 = and i8 %6, -64 - %10 = icmp eq i8 %9, -128 - br i1 %10, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43, label %11 + %9 = icmp ult i8 %6, -64 + br i1 %9, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43, label %10 -11: ; preds = %8 - %12 = icmp ult i8 %6, -32 - br i1 %12, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread, label %13 +10: ; preds = %8 + %11 = icmp ult i8 %6, -32 + br i1 %11, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread, label %12 -13: ; preds = %11 - %14 = icmp ult i8 %6, -16 - br i1 %14, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit +12: ; preds = %10 + %13 = icmp ult i8 %6, -16 + br i1 %13, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit -_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit: ; preds = %13 - %15 = icmp ult i8 %6, -8 - br i1 %15, label %.thread, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43 +_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit: ; preds = %12 + %14 = icmp ult i8 %6, -8 + br i1 %14, label %.thread, label %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43 -16: ; preds = %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43, %.thread61, %65, %2, %63 - %.sroa.7.sroa.0.0 = phi i64 [ %.sroa.7.sroa.0.2, %63 ], [ 0, %2 ], [ %.sroa.418.1.insert.ext, %65 ], [ %.sroa.420.4.insert.shift, %.thread61 ], [ %.sroa.4.1.insert.ext, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43 ] - %.sroa.0.0 = phi i64 [ %.sroa.0.2, %63 ], [ 2, %2 ], [ 1, %65 ], [ 0, %.thread61 ], [ 1, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43 ] +15: ; preds = %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43, %.thread61, %64, %2, %62 + %.sroa.7.sroa.0.0 = phi i64 [ %.sroa.7.sroa.0.2, %62 ], [ 0, %2 ], [ %.sroa.418.1.insert.ext, %64 ], [ %.sroa.420.4.insert.shift, %.thread61 ], [ %.sroa.4.1.insert.ext, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43 ] + %.sroa.0.0 = phi i64 [ %.sroa.0.2, %62 ], [ 2, %2 ], [ 1, %64 ], [ 0, %.thread61 ], [ 1, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43 ] %.sroa.7.0.insert.ext = shl nuw nsw i64 %.sroa.7.sroa.0.0, 8 %.sroa.0.0.insert.insert = add nuw nsw i64 %.sroa.7.0.insert.ext, %.sroa.0.0 ret i64 %.sroa.0.0.insert.insert -_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread: ; preds = %13, %11 - %.sroa.7.0.i.ph = phi i64 [ 3, %13 ], [ 2, %11 ] - %17 = icmp ugt i64 %.sroa.7.0.i.ph, %1 - br i1 %17, label %65, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" +_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread: ; preds = %12, %10 + %.sroa.7.0.i.ph = phi i64 [ 3, %12 ], [ 2, %10 ] + %16 = icmp ugt i64 %.sroa.7.0.i.ph, %1 + br i1 %16, label %64, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" .thread: ; preds = %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit - %18 = icmp ult i64 %1, 4 - br i1 %18, label %65, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" + %17 = icmp ult i64 %1, 4 + br i1 %17, label %64, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" _ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread43: ; preds = %8, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit %.sroa.4.1.insert.ext = zext i8 %6 to i64 - br label %16 + br label %15 "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit": ; preds = %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread, %.thread %.sroa.7.0.i424851 = phi i64 [ 4, %.thread ], [ %.sroa.7.0.i.ph, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread ] call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) call void @_ZN4core3str8converts9from_utf817hc5206d8edcf9d82eE(ptr noalias nocapture noundef nonnull sret({ i64, [2 x i64] }) align 8 dereferenceable(24) %3, ptr noalias noundef nonnull readonly align 1 %0, i64 noundef %.sroa.7.0.i424851) - %19 = load i64, ptr %3, align 8, !range !21, !noundef !4 - %trunc = trunc nuw i64 %19 to i1 - br i1 %trunc, label %64, label %20 + %18 = load i64, ptr %3, align 8, !range !21, !noundef !4 + %trunc = trunc nuw i64 %18 to i1 + br i1 %trunc, label %63, label %19 .thread61: ; preds = %5 %.sroa.420.4.insert.ext = zext nneg i8 %6 to i64 %.sroa.420.4.insert.shift = shl nuw nsw i64 %.sroa.420.4.insert.ext, 24 - br label %16 + br label %15 -20: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" - %21 = getelementptr inbounds i8, ptr %3, i64 8 - %22 = load ptr, ptr %21, align 8, !nonnull !4, !align !10, !noundef !4 - %23 = getelementptr inbounds i8, ptr %3, i64 16 - %24 = load i64, ptr %23, align 8, !noundef !4 - %25 = icmp eq i64 %24, 0 - br i1 %25, label %.thread55, label %26 - -26: ; preds = %20 - %27 = load i8, ptr %22, align 1, !noalias !161, !noundef !4 - %28 = icmp sgt i8 %27, -1 - br i1 %28, label %39, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i" - -"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i": ; preds = %26 - %29 = getelementptr inbounds i8, ptr %22, i64 1 - %30 = and i8 %27, 31 - %31 = zext nneg i8 %30 to i32 - %32 = icmp ne i64 %24, 1 - tail call void @llvm.assume(i1 %32) - %33 = load i8, ptr %29, align 1, !noalias !161, !noundef !4 - %34 = shl nuw nsw i32 %31, 6 - %35 = and i8 %33, 63 - %36 = zext nneg i8 %35 to i32 - %37 = or disjoint i32 %34, %36 - %38 = icmp ugt i8 %27, -33 - br i1 %38, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i", label %.thread56 - -39: ; preds = %26 - %40 = zext nneg i8 %27 to i32 +19: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" + %20 = getelementptr inbounds i8, ptr %3, i64 8 + %21 = load ptr, ptr %20, align 8, !nonnull !4, !align !10, !noundef !4 + %22 = getelementptr inbounds i8, ptr %3, i64 16 + %23 = load i64, ptr %22, align 8, !noundef !4 + %24 = icmp eq i64 %23, 0 + br i1 %24, label %.thread55, label %25 + +25: ; preds = %19 + %26 = load i8, ptr %21, align 1, !noalias !161, !noundef !4 + %27 = icmp sgt i8 %26, -1 + br i1 %27, label %38, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i" + +"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i": ; preds = %25 + %28 = getelementptr inbounds i8, ptr %21, i64 1 + %29 = and i8 %26, 31 + %30 = zext nneg i8 %29 to i32 + %31 = icmp ne i64 %23, 1 + tail call void @llvm.assume(i1 %31) + %32 = load i8, ptr %28, align 1, !noalias !161, !noundef !4 + %33 = shl nuw nsw i32 %30, 6 + %34 = and i8 %32, 63 + %35 = zext nneg i8 %34 to i32 + %36 = or disjoint i32 %33, %35 + %37 = icmp ugt i8 %26, -33 + br i1 %37, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i", label %.thread56 + +38: ; preds = %25 + %39 = zext nneg i8 %26 to i32 br label %.thread56 "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i" - %41 = getelementptr inbounds i8, ptr %22, i64 2 - %42 = icmp ne i64 %24, 2 - tail call void @llvm.assume(i1 %42) - %43 = load i8, ptr %41, align 1, !noalias !161, !noundef !4 - %44 = shl nuw nsw i32 %36, 6 - %45 = and i8 %43, 63 - %46 = zext nneg i8 %45 to i32 - %47 = or disjoint i32 %44, %46 - %48 = shl nuw nsw i32 %31, 12 - %49 = or disjoint i32 %47, %48 - %50 = icmp ugt i8 %27, -17 - br i1 %50, label %51, label %.thread56 - -51: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i" - %52 = getelementptr inbounds i8, ptr %22, i64 3 - %53 = icmp ne i64 %24, 3 - tail call void @llvm.assume(i1 %53) - %54 = load i8, ptr %52, align 1, !noalias !161, !noundef !4 - %55 = shl nuw nsw i32 %31, 18 - %56 = and i32 %55, 1835008 - %57 = shl nuw nsw i32 %47, 6 - %58 = and i8 %54, 63 - %59 = zext nneg i8 %58 to i32 - %60 = or disjoint i32 %57, %59 - %61 = or disjoint i32 %60, %56 - %62 = icmp eq i32 %61, 1114112 - br i1 %62, label %.thread55, label %.thread56 - -.thread55: ; preds = %20, %51 + %40 = getelementptr inbounds i8, ptr %21, i64 2 + %41 = icmp ne i64 %23, 2 + tail call void @llvm.assume(i1 %41) + %42 = load i8, ptr %40, align 1, !noalias !161, !noundef !4 + %43 = shl nuw nsw i32 %35, 6 + %44 = and i8 %42, 63 + %45 = zext nneg i8 %44 to i32 + %46 = or disjoint i32 %43, %45 + %47 = shl nuw nsw i32 %30, 12 + %48 = or disjoint i32 %46, %47 + %49 = icmp ugt i8 %26, -17 + br i1 %49, label %50, label %.thread56 + +50: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i" + %51 = getelementptr inbounds i8, ptr %21, i64 3 + %52 = icmp ne i64 %23, 3 + tail call void @llvm.assume(i1 %52) + %53 = load i8, ptr %51, align 1, !noalias !161, !noundef !4 + %54 = shl nuw nsw i32 %30, 18 + %55 = and i32 %54, 1835008 + %56 = shl nuw nsw i32 %46, 6 + %57 = and i8 %53, 63 + %58 = zext nneg i8 %57 to i32 + %59 = or disjoint i32 %56, %58 + %60 = or disjoint i32 %59, %55 + %61 = icmp eq i32 %60, 1114112 + br i1 %61, label %.thread55, label %.thread56 + +.thread55: ; preds = %19, %50 tail call void @_ZN4core9panicking5panic17hb837a5ebbbe5b188E(ptr noalias noundef nonnull readonly align 1 @anon.c99d10738715c65bad44182c6f678d15.42, i64 noundef 43, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.c99d10738715c65bad44182c6f678d15.43) #18 unreachable -.thread56: ; preds = %39, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i", %51 - %.sroa.4.0.i.ph58 = phi i32 [ %61, %51 ], [ %40, %39 ], [ %49, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i" ], [ %37, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i" ] +.thread56: ; preds = %38, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i", %50 + %.sroa.4.0.i.ph58 = phi i32 [ %60, %50 ], [ %39, %38 ], [ %48, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit15.i" ], [ %36, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17ha9763db3cafc62b3E.exit13.i" ] %.sroa.422.4.insert.ext = zext nneg i32 %.sroa.4.0.i.ph58 to i64 %.sroa.422.4.insert.shift = shl nuw nsw i64 %.sroa.422.4.insert.ext, 24 - br label %63 + br label %62 -63: ; preds = %64, %.thread56 - %.sroa.7.sroa.0.2 = phi i64 [ %.sroa.425.1.insert.ext, %64 ], [ %.sroa.422.4.insert.shift, %.thread56 ] - %.sroa.0.2 = phi i64 [ 1, %64 ], [ 0, %.thread56 ] +62: ; preds = %63, %.thread56 + %.sroa.7.sroa.0.2 = phi i64 [ %.sroa.425.1.insert.ext, %63 ], [ %.sroa.422.4.insert.shift, %.thread56 ] + %.sroa.0.2 = phi i64 [ 1, %63 ], [ 0, %.thread56 ] call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) - br label %16 + br label %15 -64: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" +63: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h6eec90936175538dE.exit" %.sroa.425.1.insert.ext = zext i8 %6 to i64 - br label %63 + br label %62 -65: ; preds = %.thread, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread +64: ; preds = %.thread, %_ZN12regex_syntax5debug11utf8_decode3len17h1a2bfcb4e11f38b4E.exit.thread %.sroa.418.1.insert.ext = zext i8 %6 to i64 - br label %16 + br label %15 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/ruby/optimized/cesu_8.ll b/bench/ruby/optimized/cesu_8.ll index ee4434b9255..5c22afd2887 100644 --- a/bench/ruby/optimized/cesu_8.ll +++ b/bench/ruby/optimized/cesu_8.ll @@ -542,74 +542,72 @@ define internal i32 @get_ctype_code_range(i32 noundef %0, ptr nocapture noundef ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define internal noundef ptr @left_adjust_char_head(ptr noundef readnone %0, ptr noundef %1, ptr nocapture readnone %2, ptr nocapture readnone %3) #5 { %.not = icmp ugt ptr %1, %0 - br i1 %.not, label %.preheader32, label %42 + br i1 %.not, label %.preheader32, label %40 .preheader32: ; preds = %4, %.preheader32 - %.024 = phi ptr [ %9, %.preheader32 ], [ %1, %4 ] + %.024 = phi ptr [ %8, %.preheader32 ], [ %1, %4 ] %5 = load i8, ptr %.024, align 1 - %6 = and i8 %5, -64 - %.not28 = icmp eq i8 %6, -128 - %7 = icmp ugt ptr %.024, %0 - %8 = and i1 %7, %.not28 - %9 = getelementptr inbounds i8, ptr %.024, i64 -1 - br i1 %8, label %.preheader32, label %10, !llvm.loop !6 - -10: ; preds = %.preheader32 - br i1 %7, label %11, label %41 - -11: ; preds = %10 - %12 = ptrtoint ptr %1 to i64 - %13 = ptrtoint ptr %.024 to i64 - %14 = sub i64 %12, %13 - %15 = icmp eq i64 %14, 2 - br i1 %15, label %16, label %41 - -16: ; preds = %11 - %17 = zext i8 %5 to i32 - %18 = shl nuw nsw i32 %17, 12 - %19 = getelementptr inbounds i8, ptr %.024, i64 1 - %20 = load i8, ptr %19, align 1 - %21 = and i8 %20, 48 - %22 = zext nneg i8 %21 to i32 - %23 = shl nuw nsw i32 %22, 6 - %.masked = and i32 %18, 61440 - %.mask = or disjoint i32 %23, %.masked - %24 = icmp eq i32 %.mask, 56320 - br i1 %24, label %.preheader, label %41 - -.preheader: ; preds = %16, %.preheader - %.024.pn = phi ptr [ %.0, %.preheader ], [ %.024, %16 ] + %.not28 = icmp slt i8 %5, -64 + %6 = icmp ugt ptr %.024, %0 + %7 = and i1 %6, %.not28 + %8 = getelementptr inbounds i8, ptr %.024, i64 -1 + br i1 %7, label %.preheader32, label %9, !llvm.loop !6 + +9: ; preds = %.preheader32 + br i1 %6, label %10, label %39 + +10: ; preds = %9 + %11 = ptrtoint ptr %1 to i64 + %12 = ptrtoint ptr %.024 to i64 + %13 = sub i64 %11, %12 + %14 = icmp eq i64 %13, 2 + br i1 %14, label %15, label %39 + +15: ; preds = %10 + %16 = zext i8 %5 to i32 + %17 = shl nuw nsw i32 %16, 12 + %18 = getelementptr inbounds i8, ptr %.024, i64 1 + %19 = load i8, ptr %18, align 1 + %20 = and i8 %19, 48 + %21 = zext nneg i8 %20 to i32 + %22 = shl nuw nsw i32 %21, 6 + %.masked = and i32 %17, 61440 + %.mask = or disjoint i32 %22, %.masked + %23 = icmp eq i32 %.mask, 56320 + br i1 %23, label %.preheader, label %39 + +.preheader: ; preds = %15, %.preheader + %.024.pn = phi ptr [ %.0, %.preheader ], [ %.024, %15 ] %.0 = getelementptr inbounds i8, ptr %.024.pn, i64 -1 - %25 = load i8, ptr %.0, align 1 - %26 = and i8 %25, -64 - %.not29 = icmp eq i8 %26, -128 - %27 = icmp ugt ptr %.0, %0 - %28 = and i1 %27, %.not29 - br i1 %28, label %.preheader, label %29, !llvm.loop !8 - -29: ; preds = %.preheader - %30 = ptrtoint ptr %.0 to i64 - %31 = sub i64 %13, %30 - %32 = icmp eq i64 %31, 3 - br i1 %32, label %33, label %41 - -33: ; preds = %29 - %34 = zext i8 %25 to i32 - %35 = shl nuw nsw i32 %34, 12 - %36 = load i8, ptr %.024.pn, align 1 - %37 = and i8 %36, 48 - %38 = zext nneg i8 %37 to i32 - %39 = shl nuw nsw i32 %38, 6 - %.masked31 = and i32 %35, 61440 - %.mask30 = or disjoint i32 %39, %.masked31 - %40 = icmp eq i32 %.mask30, 55296 - br i1 %40, label %42, label %41 - -41: ; preds = %29, %33, %16, %11, %10 - br label %42 - -42: ; preds = %33, %4, %41 - %.025 = phi ptr [ %.024, %41 ], [ %1, %4 ], [ %.0, %33 ] + %24 = load i8, ptr %.0, align 1 + %.not29 = icmp slt i8 %24, -64 + %25 = icmp ugt ptr %.0, %0 + %26 = and i1 %.not29, %25 + br i1 %26, label %.preheader, label %27, !llvm.loop !8 + +27: ; preds = %.preheader + %28 = ptrtoint ptr %.0 to i64 + %29 = sub i64 %12, %28 + %30 = icmp eq i64 %29, 3 + br i1 %30, label %31, label %39 + +31: ; preds = %27 + %32 = zext i8 %24 to i32 + %33 = shl nuw nsw i32 %32, 12 + %34 = load i8, ptr %.024.pn, align 1 + %35 = and i8 %34, 48 + %36 = zext nneg i8 %35 to i32 + %37 = shl nuw nsw i32 %36, 6 + %.masked31 = and i32 %33, 61440 + %.mask30 = or disjoint i32 %37, %.masked31 + %38 = icmp eq i32 %.mask30, 55296 + br i1 %38, label %40, label %39 + +39: ; preds = %27, %31, %15, %10, %9 + br label %40 + +40: ; preds = %31, %4, %39 + %.025 = phi ptr [ %.024, %39 ], [ %1, %4 ], [ %.0, %31 ] ret ptr %.025 } diff --git a/bench/ruby/optimized/utf8_mac.ll b/bench/ruby/optimized/utf8_mac.ll index d61c8bb13f0..1f4a279387b 100644 --- a/bench/ruby/optimized/utf8_mac.ll +++ b/bench/ruby/optimized/utf8_mac.ll @@ -113,7 +113,7 @@ from_utf8_mac_finish.exit34: ; preds = %.lr.ph.i.i30, %22 %47 = add nsw i64 %.0.lcssa.i.i33, 4 %48 = getelementptr i8, ptr %39, i64 3 store i8 %46, ptr %48, align 1 - br label %154 + br label %153 from_utf8_mac_finish.exit: ; preds = %.lr.ph.i.i, %5 %.0 = phi i64 [ 0, %5 ], [ %18, %.lr.ph.i.i ] @@ -294,18 +294,17 @@ get_info.exit.thread.i: ; preds = %get_info.exit.threa %148 = sext i32 %147 to i64 %149 = getelementptr inbounds [16 x i8], ptr %0, i64 0, i64 %148 %150 = load i8, ptr %149, align 1 - %151 = and i8 %150, -64 - %152 = icmp eq i8 %151, -128 - br i1 %152, label %get_info.exit.thread.i, label %buf_apply.exit, !llvm.loop !10 + %151 = icmp slt i8 %150, -64 + br i1 %151, label %get_info.exit.thread.i, label %buf_apply.exit, !llvm.loop !10 buf_apply.exit: ; preds = %127, %get_info.exit.thread.i, %139, %buf_push.exit, %72 %.0.i = phi i64 [ 0, %72 ], [ 0, %buf_push.exit ], [ %145, %139 ], [ %.0.i22.i, %get_info.exit.thread.i ], [ 0, %127 ] call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %6) - %153 = add i64 %.0.i, %.037 - br label %154 + %152 = add i64 %.0.i, %.037 + br label %153 -154: ; preds = %buf_apply.exit, %from_utf8_mac_finish.exit34 - %.028 = phi i64 [ %153, %buf_apply.exit ], [ %47, %from_utf8_mac_finish.exit34 ] +153: ; preds = %buf_apply.exit, %from_utf8_mac_finish.exit34 + %.028 = phi i64 [ %152, %buf_apply.exit ], [ %47, %from_utf8_mac_finish.exit34 ] ret i64 %.028 } diff --git a/bench/sentencepiece/optimized/structurally_valid.cc.ll b/bench/sentencepiece/optimized/structurally_valid.cc.ll index fd9528f623c..6961e4a97a6 100644 --- a/bench/sentencepiece/optimized/structurally_valid.cc.ll +++ b/bench/sentencepiece/optimized/structurally_valid.cc.ll @@ -29,7 +29,7 @@ declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #2 define noundef range(i32 240, 256) i32 @_ZN6google8protobuf8internal15UTF8GenericScanEPKNS1_19UTF8StateMachineObjEPKciPi(ptr nocapture noundef readonly %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #3 { store i32 0, ptr %3, align 4 %5 = icmp eq i32 %2, 0 - br i1 %5, label %142, label %6 + br i1 %5, label %140, label %6 6: ; preds = %4 %7 = getelementptr inbounds i8, ptr %0, i64 16 @@ -204,9 +204,8 @@ define noundef range(i32 240, 256) i32 @_ZN6google8protobuf8internal15UTF8Generi 123: ; preds = %.preheader112 %124 = load i8, ptr %121, align 1 - %125 = and i8 %124, -64 - %126 = icmp eq i8 %125, -128 - br i1 %126, label %.preheader112, label %.critedge2, !llvm.loop !8 + %125 = icmp slt i8 %124, -64 + br i1 %125, label %.preheader112, label %.critedge2, !llvm.loop !8 .thread.loopexit: ; preds = %109 %.pre = ptrtoint ptr %113 to i64 @@ -215,40 +214,39 @@ define noundef range(i32 240, 256) i32 @_ZN6google8protobuf8internal15UTF8Generi .thread: ; preds = %.critedge.thread, %.thread.loopexit %.pre-phi = phi i64 [ %.pre, %.thread.loopexit ], [ %25, %.critedge.thread ] %.4.lcssa = phi ptr [ %110, %.thread.loopexit ], [ %.2, %.critedge.thread ] - %127 = sub i64 %.pre-phi, %25 - %128 = trunc i64 %127 to i32 - %129 = load i32, ptr %26, align 4 - %130 = icmp ugt i32 %129, %128 - br i1 %130, label %.critedge2.thread, label %.preheader - -.preheader: ; preds = %.thread, %133 - %.8 = phi ptr [ %131, %133 ], [ %.4.lcssa, %.thread ] - %131 = getelementptr inbounds i8, ptr %.8, i64 -1 - %132 = icmp ugt ptr %131, %1 - br i1 %132, label %133, label %.critedge2.thread - -133: ; preds = %.preheader - %134 = load i8, ptr %131, align 1 - %135 = and i8 %134, -64 - %136 = icmp eq i8 %135, -128 - br i1 %136, label %.preheader, label %.critedge2.thread, !llvm.loop !9 + %126 = sub i64 %.pre-phi, %25 + %127 = trunc i64 %126 to i32 + %128 = load i32, ptr %26, align 4 + %129 = icmp ugt i32 %128, %127 + br i1 %129, label %.critedge2.thread, label %.preheader + +.preheader: ; preds = %.thread, %132 + %.8 = phi ptr [ %130, %132 ], [ %.4.lcssa, %.thread ] + %130 = getelementptr inbounds i8, ptr %.8, i64 -1 + %131 = icmp ugt ptr %130, %1 + br i1 %131, label %132, label %.critedge2.thread + +132: ; preds = %.preheader + %133 = load i8, ptr %130, align 1 + %134 = icmp slt i8 %133, -64 + br i1 %134, label %.preheader, label %.critedge2.thread, !llvm.loop !9 .critedge2: ; preds = %.preheader112, %123, %115 %.7 = phi ptr [ %.4135, %115 ], [ %121, %123 ], [ %121, %.preheader112 ] - %137 = icmp eq i8 %106, -3 - br i1 %137, label %27, label %.critedge2.thread - -.critedge2.thread: ; preds = %.critedge2, %.preheader, %133, %.thread - %.7111 = phi ptr [ %.4.lcssa, %.thread ], [ %131, %133 ], [ %131, %.preheader ], [ %.7, %.critedge2 ] - %.294110 = phi i32 [ 241, %.thread ], [ 240, %133 ], [ 240, %.preheader ], [ %107, %.critedge2 ] - %138 = ptrtoint ptr %.7111 to i64 - %139 = ptrtoint ptr %1 to i64 - %140 = sub i64 %138, %139 - %141 = trunc i64 %140 to i32 - store i32 %141, ptr %3, align 4 - br label %142 - -142: ; preds = %4, %.critedge2.thread + %135 = icmp eq i8 %106, -3 + br i1 %135, label %27, label %.critedge2.thread + +.critedge2.thread: ; preds = %.critedge2, %.preheader, %132, %.thread + %.7111 = phi ptr [ %.4.lcssa, %.thread ], [ %130, %132 ], [ %130, %.preheader ], [ %.7, %.critedge2 ] + %.294110 = phi i32 [ 241, %.thread ], [ 240, %132 ], [ 240, %.preheader ], [ %107, %.critedge2 ] + %136 = ptrtoint ptr %.7111 to i64 + %137 = ptrtoint ptr %1 to i64 + %138 = sub i64 %136, %137 + %139 = trunc i64 %138 to i32 + store i32 %139, ptr %3, align 4 + br label %140 + +140: ; preds = %4, %.critedge2.thread %.090 = phi i32 [ %.294110, %.critedge2.thread ], [ 241, %4 ] ret i32 %.090 } diff --git a/bench/simdjson/optimized/simdjson.cpp.ll b/bench/simdjson/optimized/simdjson.cpp.ll index e7e9402ffeb..462bdb73dde 100644 --- a/bench/simdjson/optimized/simdjson.cpp.ll +++ b/bench/simdjson/optimized/simdjson.cpp.ll @@ -2628,9 +2628,8 @@ if.then12.i.i.i: ; preds = %if.end.i.i.i %idxprom18.i.i.i = zext i32 %add.i.i.i to i64 %arrayidx19.i.i.i = getelementptr inbounds i8, ptr %_buf, i64 %idxprom18.i.i.i %4 = load i8, ptr %arrayidx19.i.i.i, align 1 - %5 = and i8 %4, -64 - %cmp.i.not.i.i.i = icmp eq i8 %5, -128 - br i1 %cmp.i.not.i.i.i, label %if.end37.i.i.i, label %if.end31.i.i + %cmp.i.i.i.i = icmp sgt i8 %4, -65 + br i1 %cmp.i.i.i.i, label %if.end31.i.i, label %if.end37.i.i.i if.end37.i.i.i: ; preds = %if.then12.i.i.i %cmp43.i.i.i = icmp ult i8 %3, -62 @@ -2652,18 +2651,16 @@ lor.lhs.false.i.i.i: ; preds = %if.then57.i.i.i %add64.i.i.i = add nuw i32 %add223.sink.i25.i.i, 1 %idxprom65.i.i.i = zext i32 %add64.i.i.i to i64 %arrayidx66.i.i.i = getelementptr inbounds i8, ptr %_buf, i64 %idxprom65.i.i.i - %6 = load i8, ptr %arrayidx66.i.i.i, align 1 - %7 = and i8 %6, -64 - %cmp.i2.i.i.i = icmp eq i8 %7, -128 + %5 = load i8, ptr %arrayidx66.i.i.i, align 1 + %cmp.i2.i.i.i = icmp slt i8 %5, -64 br i1 %cmp.i2.i.i.i, label %lor.rhs68.i.i.i, label %if.end31.i.i lor.rhs68.i.i.i: ; preds = %lor.lhs.false.i.i.i %idxprom72.i.i.i = zext i32 %add59.i.i.i to i64 %arrayidx73.i.i.i = getelementptr inbounds i8, ptr %_buf, i64 %idxprom72.i.i.i - %8 = load i8, ptr %arrayidx73.i.i.i, align 1 - %9 = and i8 %8, -64 - %cmp.i3.not.i.i.i = icmp eq i8 %9, -128 - br i1 %cmp.i3.not.i.i.i, label %if.end95.i.i.i, label %if.end31.i.i + %6 = load i8, ptr %arrayidx73.i.i.i, align 1 + %cmp.i3.i.i.i = icmp sgt i8 %6, -65 + br i1 %cmp.i3.i.i.i, label %if.end31.i.i, label %if.end95.i.i.i land.lhs.true85.i.i.i: ; preds = %if.then57.i.i.i br i1 %cmp.i4.not.i.i.i, label %land.lhs.true85.if.end91_crit_edge.i.i.i, label %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i @@ -2674,13 +2671,13 @@ land.lhs.true85.if.end91_crit_edge.i.i.i: ; preds = %land.lhs.true85.i.i if.end95.i.i.i: ; preds = %lor.rhs68.i.i.i %cmp101.i.i.i = icmp eq i8 %3, -32 - %cmp109.i.i.i = icmp ult i8 %6, -96 + %cmp109.i.i.i = icmp ult i8 %5, -96 %or.cond.i.i.i = and i1 %cmp101.i.i.i, %cmp109.i.i.i %cmp118.i.i.i = icmp eq i8 %3, -19 - %cmp126.i.i.i = icmp ugt i8 %6, -97 + %cmp126.i.i.i = icmp ugt i8 %5, -97 %or.cond = and i1 %cmp118.i.i.i, %cmp126.i.i.i - %10 = or i1 %or.cond.i.i.i, %or.cond - %scanner.sroa.44.11 = select i1 %10, i32 10, i32 %scanner.sroa.44.5 + %7 = or i1 %or.cond.i.i.i, %or.cond + %scanner.sroa.44.11 = select i1 %7, i32 10, i32 %scanner.sroa.44.5 %add131.i.i.i = add i32 %add223.sink.i25.i.i, 3 br label %if.end31.i.i @@ -2693,27 +2690,24 @@ lor.lhs.false137.i.i.i: ; preds = %if.end132.i.i.i %add140.i.i.i = add nuw i32 %add223.sink.i25.i.i, 1 %idxprom141.i.i.i = zext i32 %add140.i.i.i to i64 %arrayidx142.i.i.i = getelementptr inbounds i8, ptr %_buf, i64 %idxprom141.i.i.i - %11 = load i8, ptr %arrayidx142.i.i.i, align 1 - %12 = and i8 %11, -64 - %cmp.i5.i.i.i = icmp eq i8 %12, -128 + %8 = load i8, ptr %arrayidx142.i.i.i, align 1 + %cmp.i5.i.i.i = icmp slt i8 %8, -64 br i1 %cmp.i5.i.i.i, label %lor.lhs.false144.i.i.i, label %if.then163.i.i.i lor.lhs.false144.i.i.i: ; preds = %lor.lhs.false137.i.i.i %add147.i.i.i = add i32 %add223.sink.i25.i.i, 2 %idxprom148.i.i.i = zext i32 %add147.i.i.i to i64 %arrayidx149.i.i.i = getelementptr inbounds i8, ptr %_buf, i64 %idxprom148.i.i.i - %13 = load i8, ptr %arrayidx149.i.i.i, align 1 - %14 = and i8 %13, -64 - %cmp.i6.i.i.i = icmp eq i8 %14, -128 + %9 = load i8, ptr %arrayidx149.i.i.i, align 1 + %cmp.i6.i.i.i = icmp slt i8 %9, -64 br i1 %cmp.i6.i.i.i, label %lor.rhs151.i.i.i, label %if.then163.i.i.i lor.rhs151.i.i.i: ; preds = %lor.lhs.false144.i.i.i %idxprom155.i.i.i = zext i32 %add134.i.i.i to i64 %arrayidx156.i.i.i = getelementptr inbounds i8, ptr %_buf, i64 %idxprom155.i.i.i - %15 = load i8, ptr %arrayidx156.i.i.i, align 1 - %16 = and i8 %15, -64 - %cmp.i7.not.i.i.i = icmp eq i8 %16, -128 - br i1 %cmp.i7.not.i.i.i, label %if.end178.i.i.i, label %if.then163.i.i.i + %10 = load i8, ptr %arrayidx156.i.i.i, align 1 + %cmp.i7.i.i.i = icmp sgt i8 %10, -65 + br i1 %cmp.i7.i.i.i, label %if.then163.i.i.i, label %if.end178.i.i.i if.then163.i.i.i: ; preds = %lor.rhs151.i.i.i, %lor.lhs.false144.i.i.i, %lor.lhs.false137.i.i.i, %if.end132.i.i.i %add165.i.i.i = add i32 %add223.sink.i25.i.i, 2 @@ -2727,7 +2721,7 @@ if.end174.i.i.i: ; preds = %if.then163.i.i.i if.end178.i.i.i: ; preds = %lor.rhs151.i.i.i %cmp184.i.i.i = icmp eq i8 %3, -16 - %cmp192.i.i.i = icmp ult i8 %11, -112 + %cmp192.i.i.i = icmp ult i8 %8, -112 %or.cond11.i.i.i = and i1 %cmp184.i.i.i, %cmp192.i.i.i br i1 %or.cond11.i.i.i, label %if.end212.i.i.i.thread, label %if.end195.i.i.i @@ -2736,7 +2730,7 @@ if.end195.i.i.i: ; preds = %if.end178.i.i.i br i1 %cmp201.i.i.i, label %land.lhs.true202.i.i.i, label %if.end212.i.i.i land.lhs.true202.i.i.i: ; preds = %if.end195.i.i.i - %cmp209.i.i.i = icmp ugt i8 %11, -113 + %cmp209.i.i.i = icmp ugt i8 %8, -113 br i1 %cmp209.i.i.i, label %if.end212.i.i.i.thread, label %if.end221.i.i.i if.end212.i.i.i.thread: ; preds = %land.lhs.true202.i.i.i, %if.end178.i.i.i @@ -2768,7 +2762,7 @@ _ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringE %scanner.sroa.44.4 = phi i32 [ %scanner.sroa.44.2, %sw.bb.i ], [ %scanner.sroa.44.5, %land.rhs.i.i ], [ %scanner.sroa.44.5, %if.then163.i.i.i ], [ %scanner.sroa.44.5, %land.lhs.true85.i.i.i ], [ %scanner.sroa.44.6, %if.end31.i.i ] %.lcssa1.i.i = phi i32 [ %inc.i.i, %sw.bb.i ], [ %add223.sink.i25.i.i, %land.rhs.i.i ], [ %conv.i, %if.then163.i.i.i ], [ %conv.i, %land.lhs.true85.i.i.i ], [ %add223.sink.i.sink.i.i, %if.end31.i.i ] %cmp34.not.i.i = icmp uge i32 %.lcssa1.i.i, %conv.i - %17 = or i1 %unclosed_string.034.i, %cmp34.not.i.i + %11 = or i1 %unclosed_string.034.i, %cmp34.not.i.i br label %for.inc.i sw.bb6.i: ; preds = %for.body.i, %for.body.i, %for.body.i, %for.body.i, %for.body.i, %for.body.i @@ -2784,15 +2778,15 @@ sw.default.i: ; preds = %for.body.i br i1 %cmp1022.i, label %land.rhs.lr.ph.i, label %for.inc.i land.rhs.lr.ph.i: ; preds = %sw.default.i - %18 = zext i32 %add21.i to i64 + %12 = zext i32 %add21.i to i64 br label %land.rhs.i land.rhs.i: ; preds = %while.body.i, %land.rhs.lr.ph.i - %19 = phi i32 [ %scanner.sroa.35.0, %land.rhs.lr.ph.i ], [ %21, %while.body.i ] - %indvars.iv.i = phi i64 [ %18, %land.rhs.lr.ph.i ], [ %indvars.iv.next.i, %while.body.i ] + %13 = phi i32 [ %scanner.sroa.35.0, %land.rhs.lr.ph.i ], [ %15, %while.body.i ] + %indvars.iv.i = phi i64 [ %12, %land.rhs.lr.ph.i ], [ %indvars.iv.next.i, %while.body.i ] %arrayidx15.i = getelementptr inbounds i8, ptr %_buf, i64 %indvars.iv.i - %20 = load i8, ptr %arrayidx15.i, align 1 - switch i8 %20, label %while.body.i [ + %14 = load i8, ptr %arrayidx15.i, align 1 + switch i8 %14, label %while.body.i [ i8 123, label %for.inc.i i8 125, label %for.inc.i i8 91, label %for.inc.i @@ -2806,7 +2800,7 @@ land.rhs.i: ; preds = %while.body.i, %land ] while.body.i: ; preds = %land.rhs.i - %21 = trunc nuw i64 %indvars.iv.i to i32 + %15 = trunc nuw i64 %indvars.iv.i to i32 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %lftr.wideiv.i = trunc i64 %indvars.iv.next.i to i32 %exitcond.not.i = icmp eq i32 %conv.i, %lftr.wideiv.i @@ -2815,9 +2809,9 @@ while.body.i: ; preds = %land.rhs.i for.inc.i: ; preds = %while.body.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %land.rhs.i, %sw.default.i, %sw.bb6.i, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i, %for.body.i, %for.body.i, %for.body.i, %for.body.i %scanner.sroa.4.2 = phi ptr [ %incdec.ptr.i13.i, %sw.default.i ], [ %scanner.sroa.4.1, %for.body.i ], [ %scanner.sroa.4.1, %for.body.i ], [ %scanner.sroa.4.1, %for.body.i ], [ %scanner.sroa.4.1, %for.body.i ], [ %incdec.ptr.i10.i, %sw.bb6.i ], [ %incdec.ptr.i.i, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %land.rhs.i ], [ %incdec.ptr.i13.i, %while.body.i ] %scanner.sroa.44.3 = phi i32 [ %scanner.sroa.44.2, %sw.default.i ], [ %scanner.sroa.44.2, %for.body.i ], [ %scanner.sroa.44.2, %for.body.i ], [ %scanner.sroa.44.2, %for.body.i ], [ %scanner.sroa.44.2, %for.body.i ], [ %scanner.sroa.44.2, %sw.bb6.i ], [ %scanner.sroa.44.4, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %land.rhs.i ], [ %scanner.sroa.44.2, %while.body.i ] - %22 = phi i32 [ %scanner.sroa.35.0, %sw.default.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %sw.bb6.i ], [ %.lcssa1.i.i, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i ], [ %1, %while.body.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ], [ %19, %land.rhs.i ] - %unclosed_string.1.i = phi i1 [ %unclosed_string.034.i, %sw.default.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %sw.bb6.i ], [ %17, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %while.body.i ] - %inc19.i = add i32 %22, 1 + %16 = phi i32 [ %scanner.sroa.35.0, %sw.default.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %for.body.i ], [ %scanner.sroa.35.0, %sw.bb6.i ], [ %.lcssa1.i.i, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i ], [ %1, %while.body.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ], [ %13, %land.rhs.i ] + %unclosed_string.1.i = phi i1 [ %unclosed_string.034.i, %sw.default.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %for.body.i ], [ %unclosed_string.034.i, %sw.bb6.i ], [ %11, %_ZN8simdjson8fallback12_GLOBAL__N_16stage118structural_scanner15validate_stringEv.exit.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %land.rhs.i ], [ %unclosed_string.034.i, %while.body.i ] + %inc19.i = add i32 %16, 1 %cmp.i = icmp ult i32 %inc19.i, %conv.i br i1 %cmp.i, label %for.body.i, label %for.end.i, !llvm.loop !33 @@ -2830,9 +2824,9 @@ for.end.i: ; preds = %for.inc.i, %entry store i32 %conv.i, ptr %arrayidx23.i, align 4 %arrayidx25.i = getelementptr inbounds i8, ptr %scanner.sroa.4.0, i64 8 store i32 0, ptr %arrayidx25.i, align 4 - %23 = load ptr, ptr %structural_indexes.i, align 8 + %17 = load ptr, ptr %structural_indexes.i, align 8 %sub.ptr.lhs.cast.i = ptrtoint ptr %scanner.sroa.4.0 to i64 - %sub.ptr.rhs.cast.i = ptrtoint ptr %23 to i64 + %sub.ptr.rhs.cast.i = ptrtoint ptr %17 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub.ptr.div.i = lshr exact i64 %sub.ptr.sub.i, 2 %conv28.i = trunc i64 %sub.ptr.div.i to i32 @@ -2864,8 +2858,8 @@ if.end52.i: ; preds = %if.then41.i, %if.th br i1 %cmp55.i.not, label %if.then59.i, label %if.end67.i if.then59.i: ; preds = %if.end52.i - %24 = load i32, ptr %23, align 4 - %cmp63.i = icmp eq i32 %24, 0 + %18 = load i32, ptr %17, align 4 + %cmp63.i = icmp eq i32 %18, 0 br i1 %cmp63.i, label %invoke.cont2, label %if.else.i if.else.i: ; preds = %if.then59.i @@ -2888,19 +2882,19 @@ if.end79.i: ; preds = %if.then75.i, %if.th %call81.i = tail call fastcc noundef i32 @_ZN8simdjson8fallback12_GLOBAL__N_16stage124find_next_document_indexERNS0_25dom_parser_implementationE(ptr noundef nonnull align 8 dereferenceable(88) %this) store i32 %call81.i, ptr %n_structural_indexes.i, align 8 %conv88.i = zext i32 %call81.i to i64 - %arrayidx.i15.i = getelementptr inbounds i32, ptr %23, i64 %conv88.i - %25 = load i32, ptr %arrayidx.i15.i, align 4 + %arrayidx.i15.i = getelementptr inbounds i32, ptr %17, i64 %conv88.i + %19 = load i32, ptr %arrayidx.i15.i, align 4 %add94.i = add i32 %call81.i, 1 %conv95.i = zext i32 %add94.i to i64 - %arrayidx.i16.i = getelementptr inbounds i32, ptr %23, i64 %conv95.i - store i32 %25, ptr %arrayidx.i16.i, align 4 - %26 = load i32, ptr %n_structural_indexes.i, align 8 - %conv102.i = zext i32 %26 to i64 - %27 = load ptr, ptr %structural_indexes.i, align 8 - %arrayidx.i17.i = getelementptr inbounds i32, ptr %27, i64 %conv102.i + %arrayidx.i16.i = getelementptr inbounds i32, ptr %17, i64 %conv95.i + store i32 %19, ptr %arrayidx.i16.i, align 4 + %20 = load i32, ptr %n_structural_indexes.i, align 8 + %conv102.i = zext i32 %20 to i64 + %21 = load ptr, ptr %structural_indexes.i, align 8 + %arrayidx.i17.i = getelementptr inbounds i32, ptr %21, i64 %conv102.i store i32 %conv.i, ptr %arrayidx.i17.i, align 4 - %28 = load i32, ptr %n_structural_indexes.i, align 8 - %cmp106.i = icmp eq i32 %28, 0 + %22 = load i32, ptr %n_structural_indexes.i, align 8 + %cmp106.i = icmp eq i32 %22, 0 %spec.select44 = select i1 %cmp106.i, i32 12, i32 %scanner.sroa.44.0 br label %invoke.cont2 @@ -3015,10 +3009,9 @@ if.then13: ; preds = %if.else if.end17: ; preds = %if.then13 %arrayidx19 = getelementptr i8, ptr %arrayidx, i64 1 %2 = load i8, ptr %arrayidx19, align 1 - %3 = and i8 %2, -64 - %cmp22.not = icmp ne i8 %3, -128 - %4 = and i32 %conv, 30 - %cmp32 = icmp eq i32 %4, 0 + %cmp22.not = icmp sgt i8 %2, -65 + %3 = and i32 %conv, 30 + %cmp32 = icmp eq i32 %3, 0 %or.cond = or i1 %cmp32, %cmp22.not br i1 %or.cond, label %return, label %while.cond.backedge @@ -3034,17 +3027,16 @@ if.then40: ; preds = %if.else36 if.end44: ; preds = %if.then40 %arrayidx46 = getelementptr i8, ptr %arrayidx, i64 1 - %5 = load i8, ptr %arrayidx46, align 1 - %conv47 = zext i8 %5 to i32 + %4 = load i8, ptr %arrayidx46, align 1 + %conv47 = zext i8 %4 to i32 %and48 = and i32 %conv47, 192 %cmp49.not = icmp eq i32 %and48, 128 br i1 %cmp49.not, label %if.end51, label %return if.end51: ; preds = %if.end44 %arrayidx53 = getelementptr i8, ptr %arrayidx, i64 2 - %6 = load i8, ptr %arrayidx53, align 1 - %7 = and i8 %6, -64 - %cmp56.not = icmp eq i8 %7, -128 + %5 = load i8, ptr %arrayidx53, align 1 + %cmp56.not = icmp slt i8 %5, -64 br i1 %cmp56.not, label %if.end58, label %return if.end58: ; preds = %if.end51 @@ -3074,24 +3066,22 @@ if.then85: ; preds = %if.else81 if.end89: ; preds = %if.then85 %arrayidx91 = getelementptr i8, ptr %arrayidx, i64 1 - %8 = load i8, ptr %arrayidx91, align 1 - %conv92 = zext i8 %8 to i32 + %6 = load i8, ptr %arrayidx91, align 1 + %conv92 = zext i8 %6 to i32 %and93 = and i32 %conv92, 192 %cmp94.not = icmp eq i32 %and93, 128 br i1 %cmp94.not, label %if.end96, label %return if.end96: ; preds = %if.end89 %arrayidx98 = getelementptr i8, ptr %arrayidx, i64 2 - %9 = load i8, ptr %arrayidx98, align 1 - %10 = and i8 %9, -64 - %cmp101.not = icmp eq i8 %10, -128 + %7 = load i8, ptr %arrayidx98, align 1 + %cmp101.not = icmp slt i8 %7, -64 br i1 %cmp101.not, label %if.end103, label %return if.end103: ; preds = %if.end96 %arrayidx105 = getelementptr i8, ptr %arrayidx, i64 3 - %11 = load i8, ptr %arrayidx105, align 1 - %12 = and i8 %11, -64 - %cmp108.not = icmp eq i8 %12, -128 + %8 = load i8, ptr %arrayidx105, align 1 + %cmp108.not = icmp slt i8 %8, -64 br i1 %cmp108.not, label %if.end110, label %return if.end110: ; preds = %if.end103 @@ -3100,8 +3090,8 @@ if.end110: ; preds = %if.end103 %and117 = shl nuw nsw i32 %conv92, 12 %shl118 = and i32 %and117, 196608 %or119 = add nsw i32 %shl113, -1114112 - %13 = add nsw i32 %or119, %shl118 - %or.cond3 = icmp ult i32 %13, -1048576 + %9 = add nsw i32 %or119, %shl118 + %or.cond3 = icmp ult i32 %9, -1048576 br i1 %or.cond3, label %return, label %while.cond.backedge return: ; preds = %if.then13, %if.end17, %if.then40, %if.end44, %if.end51, %lor.lhs.false76, %if.end58, %if.then85, %if.end89, %if.end96, %if.end103, %if.end110, %if.else81, %while.cond.backedge, %entry diff --git a/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll b/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll index 47250f32d7a..9f191312abd 100644 --- a/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll +++ b/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll @@ -35921,8 +35921,7 @@ for.body.i: ; preds = %land.lhs.true, %for %num_code_points.07.i = phi i64 [ %num_code_points.1.i, %for.inc.i ], [ 0, %land.lhs.true ] %arrayidx.i = getelementptr inbounds i8, ptr %s.coerce0, i64 %i.08.i %1 = load i8, ptr %arrayidx.i, align 1 - %2 = and i8 %1, -64 - %cmp2.not.i = icmp eq i8 %2, -128 + %cmp2.not.i = icmp slt i8 %1, -64 br i1 %cmp2.not.i, label %for.inc.i, label %land.lhs.true.i land.lhs.true.i: ; preds = %for.body.i @@ -35939,10 +35938,10 @@ for.inc.i: ; preds = %land.lhs.true.i, %f if.end: ; preds = %for.inc.i, %land.lhs.true.i, %land.lhs.true, %entry %size.0 = phi i64 [ %s.coerce1, %land.lhs.true ], [ %s.coerce1, %entry ], [ %i.08.i, %land.lhs.true.i ], [ %s.coerce1, %for.inc.i ] %type = getelementptr inbounds i8, ptr %specs, i64 8 - %3 = load i8, ptr %type, align 4 - %cmp10 = icmp eq i8 %3, 18 - %4 = load i32, ptr %specs, align 4 - %cmp12.not = icmp eq i32 %4, 0 + %2 = load i8, ptr %type, align 4 + %cmp10 = icmp eq i8 %2, 18 + %3 = load i32, ptr %specs, align 4 + %cmp12.not = icmp eq i32 %3, 0 br i1 %cmp12.not, label %if.end24, label %if.then13 if.then13: ; preds = %if.end @@ -36010,22 +36009,22 @@ if.end21.i.i: ; preds = %do.body.i.i _ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %for.body.i.i, %do.body.i.i, %if.end21.i.i, %if.end8.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %decode.i.i) call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %buf.i.i) - %5 = load i64, ptr %num_code_points.i, align 8 + %4 = load i64, ptr %num_code_points.i, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %num_code_points.i) br label %if.end24 if.end24: ; preds = %if.then14, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %if.end - %width.0 = phi i64 [ %call18, %if.then14 ], [ %5, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %if.end ] + %width.0 = phi i64 [ %call18, %if.then14 ], [ %4, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %if.end ] %frombool = zext i1 %cmp10 to i8 store i8 %frombool, ptr %ref.tmp26, align 8 - %6 = getelementptr inbounds i8, ptr %ref.tmp26, i64 8 - store ptr %s.coerce0, ptr %6, align 8 + %5 = getelementptr inbounds i8, ptr %ref.tmp26, i64 8 + store ptr %s.coerce0, ptr %5, align 8 %s.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %ref.tmp26, i64 16 store i64 %s.coerce1, ptr %s.sroa.5.0..sroa_idx, align 8 - %7 = getelementptr inbounds i8, ptr %ref.tmp26, i64 24 - store ptr %s.coerce0, ptr %7, align 8 - %8 = getelementptr inbounds i8, ptr %ref.tmp26, i64 32 - store i64 %size.0, ptr %8, align 8 + %6 = getelementptr inbounds i8, ptr %ref.tmp26, i64 24 + store ptr %s.coerce0, ptr %6, align 8 + %7 = getelementptr inbounds i8, ptr %ref.tmp26, i64 32 + store i64 %size.0, ptr %7, align 8 %call31 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %out.coerce, ptr noundef nonnull align 4 dereferenceable(16) %specs, i64 noundef %size.0, i64 noundef %width.0, ptr noundef nonnull align 8 dereferenceable(40) %ref.tmp26) ret ptr %call31 } diff --git a/bench/spike/optimized/kdmabt16.ll b/bench/spike/optimized/kdmabt16.ll index 477d7b240ae..9380f998cba 100644 --- a/bench/spike/optimized/kdmabt16.ll +++ b/bench/spike/optimized/kdmabt16.ll @@ -180,9 +180,8 @@ define noundef i64 @_Z19fast_rv64i_kdmabt16P11processor_t6insn_tm(ptr nocapture %49 = trunc i64 %46 to i32 %50 = shl i32 %49, 16 %51 = trunc i64 %48 to i32 - %sext54 = and i32 %51, -65536 %52 = icmp ne i32 %50, -2147483648 - %53 = icmp ne i32 %sext54, -2147483648 + %53 = icmp sgt i32 %51, -2147418113 %54 = or i1 %52, %53 br i1 %54, label %55, label %60 @@ -337,9 +336,8 @@ define noundef i64 @_Z21logged_rv64i_kdmabt16P11processor_t6insn_tm(ptr noundef %49 = trunc i64 %46 to i32 %50 = shl i32 %49, 16 %51 = trunc i64 %48 to i32 - %sext57 = and i32 %51, -65536 %52 = icmp ne i32 %50, -2147483648 - %53 = icmp ne i32 %sext57, -2147483648 + %53 = icmp sgt i32 %51, -2147418113 %54 = or i1 %52, %53 br i1 %54, label %55, label %60 @@ -593,9 +591,8 @@ define noundef i64 @_Z19fast_rv64e_kdmabt16P11processor_t6insn_tm(ptr nocapture %70 = trunc i64 %67 to i32 %71 = shl i32 %70, 16 %72 = trunc i64 %69 to i32 - %sext62 = and i32 %72, -65536 %73 = icmp ne i32 %71, -2147483648 - %74 = icmp ne i32 %sext62, -2147483648 + %74 = icmp sgt i32 %72, -2147418113 %75 = or i1 %73, %74 br i1 %75, label %76, label %81 @@ -792,9 +789,8 @@ define noundef i64 @_Z21logged_rv64e_kdmabt16P11processor_t6insn_tm(ptr noundef %70 = trunc i64 %67 to i32 %71 = shl i32 %70, 16 %72 = trunc i64 %69 to i32 - %sext65 = and i32 %72, -65536 %73 = icmp ne i32 %71, -2147483648 - %74 = icmp ne i32 %sext65, -2147483648 + %74 = icmp sgt i32 %72, -2147418113 %75 = or i1 %73, %74 br i1 %75, label %76, label %81 diff --git a/bench/stockfish/optimized/movegen.ll b/bench/stockfish/optimized/movegen.ll index 28e1d8a86cb..100ea6d381d 100644 --- a/bench/stockfish/optimized/movegen.ll +++ b/bench/stockfish/optimized/movegen.ll @@ -4978,13 +4978,13 @@ define dso_local noundef ptr @_ZN9Stockfish8generateILNS_7GenTypeE5EEEPNS_7ExtMo 24: ; preds = %22, %20 %25 = phi ptr [ %21, %20 ], [ %23, %22 ] - %.not2731 = icmp eq ptr %1, %25 - br i1 %.not2731, label %._crit_edge, label %.lr.ph + %.not2730 = icmp eq ptr %1, %25 + br i1 %.not2730, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %24, %43 - %.033 = phi ptr [ %.1, %43 ], [ %25, %24 ] - %.02532 = phi ptr [ %.126, %43 ], [ %1, %24 ] - %26 = load i16, ptr %.02532, align 2 +.lr.ph: ; preds = %24, %42 + %.032 = phi ptr [ %.1, %42 ], [ %25, %24 ] + %.02531 = phi ptr [ %.126, %42 ], [ %1, %24 ] + %26 = load i16, ptr %.02531, align 2 %27 = lshr i16 %26, 6 %28 = and i16 %27, 63 %29 = zext nneg i16 %28 to i64 @@ -4994,33 +4994,32 @@ define dso_local noundef ptr @_ZN9Stockfish8generateILNS_7GenTypeE5EEEPNS_7ExtMo %.not28 = icmp ne i64 %32, 0 %33 = icmp eq i64 %17, %29 %or.cond = select i1 %.not28, i1 true, i1 %33 - %34 = and i16 %26, -16384 - %35 = icmp eq i16 %34, -32768 - %or.cond30 = or i1 %35, %or.cond - br i1 %or.cond30, label %36, label %41 - -36: ; preds = %.lr.ph - %37 = tail call noundef zeroext i1 @_ZNK9Stockfish8Position5legalENS_4MoveE(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %26) #8 - br i1 %37, label %41, label %38 - -38: ; preds = %36 - %39 = getelementptr inbounds i8, ptr %.033, i64 -8 - %40 = load i64, ptr %39, align 4 - store i64 %40, ptr %.02532, align 4 - br label %43 - -41: ; preds = %.lr.ph, %36 - %42 = getelementptr inbounds i8, ptr %.02532, i64 8 - br label %43 - -43: ; preds = %41, %38 - %.126 = phi ptr [ %42, %41 ], [ %.02532, %38 ] - %.1 = phi ptr [ %.033, %41 ], [ %39, %38 ] + %34 = icmp slt i16 %26, -16384 + %or.cond29 = or i1 %34, %or.cond + br i1 %or.cond29, label %35, label %40 + +35: ; preds = %.lr.ph + %36 = tail call noundef zeroext i1 @_ZNK9Stockfish8Position5legalENS_4MoveE(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %26) #8 + br i1 %36, label %40, label %37 + +37: ; preds = %35 + %38 = getelementptr inbounds i8, ptr %.032, i64 -8 + %39 = load i64, ptr %38, align 4 + store i64 %39, ptr %.02531, align 4 + br label %42 + +40: ; preds = %.lr.ph, %35 + %41 = getelementptr inbounds i8, ptr %.02531, i64 8 + br label %42 + +42: ; preds = %40, %37 + %.126 = phi ptr [ %41, %40 ], [ %.02531, %37 ] + %.1 = phi ptr [ %.032, %40 ], [ %38, %37 ] %.not27 = icmp eq ptr %.126, %.1 br i1 %.not27, label %._crit_edge, label %.lr.ph, !llvm.loop !102 -._crit_edge: ; preds = %43, %24 - %.0.lcssa = phi ptr [ %25, %24 ], [ %.1, %43 ] +._crit_edge: ; preds = %42, %24 + %.0.lcssa = phi ptr [ %25, %24 ], [ %.1, %42 ] ret ptr %.0.lcssa } diff --git a/bench/stockfish/optimized/tbprobe.ll b/bench/stockfish/optimized/tbprobe.ll index 39acee92f12..7bfba8d0bce 100644 --- a/bench/stockfish/optimized/tbprobe.ll +++ b/bench/stockfish/optimized/tbprobe.ll @@ -1988,28 +1988,27 @@ define internal fastcc noundef range(i32 -2, -2147483648) i32 @_ZN9Stockfish12_G %8 = ptrtoint ptr %4 to i64 %9 = sub i64 %7, %8 %10 = ashr exact i64 %9, 3 - %.not55 = icmp eq ptr %4, %6 - br i1 %.not55, label %._crit_edge.thread, label %.lr.ph + %.not52 = icmp eq ptr %4, %6 + br i1 %.not52, label %._crit_edge.thread, label %.lr.ph .lr.ph: ; preds = %2, %28 - %.04258 = phi i32 [ %.1, %28 ], [ -2, %2 ] - %.04357 = phi i64 [ %.144, %28 ], [ 0, %2 ] - %.04556 = phi ptr [ %29, %28 ], [ %4, %2 ] - %.sroa.04.0.copyload = load i16, ptr %.04556, align 4 + %.04255 = phi i32 [ %.1, %28 ], [ -2, %2 ] + %.04354 = phi i64 [ %.144, %28 ], [ 0, %2 ] + %.04553 = phi ptr [ %29, %28 ], [ %4, %2 ] + %.sroa.04.0.copyload = load i16, ptr %.04553, align 4 %11 = and i16 %.sroa.04.0.copyload, 63 %12 = zext nneg i16 %11 to i64 %13 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %12 %14 = load i32, ptr %13, align 4 %15 = icmp ne i32 %14, 0 %.not.i = icmp ult i16 %.sroa.04.0.copyload, -16384 - %or.cond.i.not50 = and i1 %.not.i, %15 - %16 = and i16 %.sroa.04.0.copyload, -16384 - %17 = icmp eq i16 %16, -32768 - %or.cond = or i1 %17, %or.cond.i.not50 - br i1 %or.cond, label %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread, label %28 - -_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %.lr.ph - %18 = add i64 %.04357, 1 + %or.cond.not.i = and i1 %.not.i, %15 + %16 = icmp slt i16 %.sroa.04.0.copyload, -16384 + %spec.select.i = or i1 %16, %or.cond.not.i + br i1 %spec.select.i, label %17, label %28 + +17: ; preds = %.lr.ph + %18 = add i64 %.04354, 1 %19 = call noundef zeroext i1 @_ZNK9Stockfish8Position11gives_checkENS_4MoveE(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.04.0.copyload) #24 call void @_ZN9Stockfish8Position7do_moveENS_4MoveERNS_9StateInfoEb(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.04.0.copyload, ptr noundef nonnull align 64 dereferenceable(11264) %3, i1 noundef zeroext %19) #24 %20 = call fastcc noundef i32 @_ZN9Stockfish12_GLOBAL__N_16searchILb0EEENS_10Tablebases8WDLScoreERNS_8PositionEPNS2_10ProbeStateE(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef %1) @@ -2019,18 +2018,18 @@ _ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %.lr.ph %23 = icmp eq i32 %22, 0 br i1 %23, label %.loopexit, label %24 -24: ; preds = %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread - %25 = icmp slt i32 %.04258, %21 +24: ; preds = %17 + %25 = icmp slt i32 %.04255, %21 br i1 %25, label %26, label %28 26: ; preds = %24 %27 = icmp slt i32 %20, -1 br i1 %27, label %.loopexit.sink.split, label %28 -28: ; preds = %.lr.ph, %24, %26 - %.144 = phi i64 [ %18, %26 ], [ %18, %24 ], [ %.04357, %.lr.ph ] - %.1 = phi i32 [ %21, %26 ], [ %.04258, %24 ], [ %.04258, %.lr.ph ] - %29 = getelementptr inbounds i8, ptr %.04556, i64 8 +28: ; preds = %24, %26, %.lr.ph + %.144 = phi i64 [ %18, %26 ], [ %18, %24 ], [ %.04354, %.lr.ph ] + %.1 = phi i32 [ %21, %26 ], [ %.04255, %24 ], [ %.04255, %.lr.ph ] + %29 = getelementptr inbounds i8, ptr %.04553, i64 8 %.not = icmp eq ptr %29, %6 br i1 %.not, label %._crit_edge, label %.lr.ph @@ -2041,32 +2040,32 @@ _ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %.lr.ph br i1 %32, label %.thread, label %._crit_edge.thread ._crit_edge.thread: ; preds = %2, %._crit_edge - %.042.lcssa62 = phi i32 [ %.1, %._crit_edge ], [ -2, %2 ] + %.042.lcssa59 = phi i32 [ %.1, %._crit_edge ], [ -2, %2 ] %33 = call fastcc noundef i32 @_ZN9Stockfish12_GLOBAL__N_111probe_tableILNS0_6TBTypeE0ENS_10Tablebases8WDLScoreEEET0_RKNS_8PositionEPNS3_10ProbeStateES4_(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef %1) %34 = load i32, ptr %1, align 4 %35 = icmp eq i32 %34, 0 br i1 %35, label %.loopexit, label %36 36: ; preds = %._crit_edge.thread - %.not47 = icmp slt i32 %.042.lcssa62, %33 + %.not47 = icmp slt i32 %.042.lcssa59, %33 br i1 %.not47, label %.loopexit.sink.split, label %.thread .thread: ; preds = %._crit_edge, %36 - %.042.lcssa6367 = phi i32 [ %.042.lcssa62, %36 ], [ %.1, %._crit_edge ] + %.042.lcssa6064 = phi i32 [ %.042.lcssa59, %36 ], [ %.1, %._crit_edge ] %37 = phi i1 [ false, %36 ], [ true, %._crit_edge ] - %38 = icmp sgt i32 %.042.lcssa6367, 0 + %38 = icmp sgt i32 %.042.lcssa6064, 0 %39 = or i1 %38, %37 %40 = select i1 %39, i32 2, i32 1 br label %.loopexit.sink.split .loopexit.sink.split: ; preds = %26, %36, %.thread %.sink = phi i32 [ %40, %.thread ], [ 1, %36 ], [ 2, %26 ] - %.0.ph = phi i32 [ %.042.lcssa6367, %.thread ], [ %33, %36 ], [ 2, %26 ] + %.0.ph = phi i32 [ %.042.lcssa6064, %.thread ], [ %33, %36 ], [ 2, %26 ] store i32 %.sink, ptr %1, align 4 br label %.loopexit -.loopexit: ; preds = %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread, %.loopexit.sink.split, %._crit_edge.thread - %.0 = phi i32 [ 0, %._crit_edge.thread ], [ %.0.ph, %.loopexit.sink.split ], [ 0, %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread ] +.loopexit: ; preds = %17, %.loopexit.sink.split, %._crit_edge.thread + %.0 = phi i32 [ 0, %._crit_edge.thread ], [ %.0.ph, %.loopexit.sink.split ], [ 0, %17 ] ret i32 %.0 } @@ -2431,13 +2430,13 @@ _ZN9Stockfish12_GLOBAL__N_19PairsDataD2Ev.exit.i.i.i: ; preds = %164, %_ZNSt6vec %194 = trunc i8 %192 to i1 %195 = select i1 %194, i32 3, i32 2 %196 = getelementptr inbounds i8, ptr %191, i64 128 - %spec.select197 = select i1 %189, i32 0, i32 %195 + %spec.select195 = select i1 %189, i32 0, i32 %195 br label %select.unfold.i.i.i select.unfold.i.i.i: ; preds = %.lr.ph.i.i.i.i, %215 %indvars.iv.i.i.i.i = phi i64 [ %indvars.iv.next.i.i.i.i, %215 ], [ 1, %.lr.ph.i.i.i.i ] %.0647.i.i.i.i = phi i32 [ %.165.i.i.i.i, %215 ], [ 0, %.lr.ph.i.i.i.i ] - %.0674.i.i.i.i = phi i32 [ %197, %215 ], [ %spec.select197, %.lr.ph.i.i.i.i ] + %.0674.i.i.i.i = phi i32 [ %197, %215 ], [ %spec.select195, %.lr.ph.i.i.i.i ] %197 = add nsw i32 %.0674.i.i.i.i, -1 %198 = icmp sgt i32 %.0674.i.i.i.i, 1 br i1 %198, label %206, label %199 @@ -3662,80 +3661,79 @@ _ZN9Stockfish12_GLOBAL__N_111probe_tableILNS0_6TBTypeE1EiEET0_RKNS_8PositionEPNS %780 = getelementptr inbounds i8, ptr %18, i64 2048 %781 = call noundef ptr @_ZN9Stockfish8generateILNS_7GenTypeE5EEEPNS_7ExtMoveERKNS_8PositionES3_(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef nonnull %18) #24 store ptr %781, ptr %780, align 8 - %.not60121 = icmp eq ptr %18, %781 - br i1 %.not60121, label %._crit_edge.thread, label %.lr.ph + %.not60119 = icmp eq ptr %18, %781 + br i1 %.not60119, label %._crit_edge.thread, label %.lr.ph .lr.ph: ; preds = %779 %782 = getelementptr inbounds i8, ptr %0, i64 848 %783 = getelementptr inbounds i8, ptr %19, i64 2048 - %.lobit.neg.i70 = ashr i32 %20, 31 - %784 = or i32 %.lobit.neg.i70, 1 + %.lobit.neg.i71 = ashr i32 %20, 31 + %784 = or i32 %.lobit.neg.i71, 1 br label %787 785: ; preds = %831 - %786 = getelementptr inbounds i8, ptr %.056122, i64 8 + %786 = getelementptr inbounds i8, ptr %.056120, i64 8 %.not60 = icmp eq ptr %786, %781 br i1 %.not60, label %._crit_edge, label %787 787: ; preds = %.lr.ph, %785 - %.055123 = phi i32 [ 65535, %.lr.ph ], [ %.2, %785 ] - %.056122 = phi ptr [ %18, %.lr.ph ], [ %786, %785 ] - %.sroa.06.0.copyload = load i16, ptr %.056122, align 4 + %.055121 = phi i32 [ 65535, %.lr.ph ], [ %.2, %785 ] + %.056120 = phi ptr [ %18, %.lr.ph ], [ %786, %785 ] + %.sroa.06.0.copyload = load i16, ptr %.056120, align 4 %788 = and i16 %.sroa.06.0.copyload, 63 %789 = zext nneg i16 %788 to i64 %790 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %789 %791 = load i32, ptr %790, align 4 %792 = icmp ne i32 %791, 0 %.not.i63 = icmp ult i16 %.sroa.06.0.copyload, -16384 - %or.cond.i.not81 = and i1 %.not.i63, %792 - %793 = and i16 %.sroa.06.0.copyload, -16384 - %794 = icmp eq i16 %793, -32768 - %or.cond80 = or i1 %794, %or.cond.i.not81 - br i1 %or.cond80, label %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread, label %795 - -795: ; preds = %787 - %796 = lshr i16 %.sroa.06.0.copyload, 6 - %797 = and i16 %796, 63 - %798 = zext nneg i16 %797 to i64 - %799 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %798 - %800 = load i32, ptr %799, align 4 - %801 = and i32 %800, 7 - %802 = icmp eq i32 %801, 1 - br label %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread - -_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %787, %795 - %803 = phi i1 [ %802, %795 ], [ true, %787 ] + %or.cond.not.i = and i1 %.not.i63, %792 + %793 = icmp slt i16 %.sroa.06.0.copyload, -16384 + %spec.select.i64 = or i1 %793, %or.cond.not.i + br i1 %spec.select.i64, label %802, label %794 + +794: ; preds = %787 + %795 = lshr i16 %.sroa.06.0.copyload, 6 + %796 = and i16 %795, 63 + %797 = zext nneg i16 %796 to i64 + %798 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %797 + %799 = load i32, ptr %798, align 4 + %800 = and i32 %799, 7 + %801 = icmp eq i32 %800, 1 + br label %802 + +802: ; preds = %794, %787 + %803 = phi i1 [ true, %787 ], [ %801, %794 ] %804 = call noundef zeroext i1 @_ZNK9Stockfish8Position11gives_checkENS_4MoveE(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.06.0.copyload) #24 call void @_ZN9Stockfish8Position7do_moveENS_4MoveERNS_9StateInfoEb(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.06.0.copyload, ptr noundef nonnull align 64 dereferenceable(11264) %17, i1 noundef zeroext %804) #24 br i1 %803, label %805, label %811 -805: ; preds = %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread +805: ; preds = %802 %806 = call fastcc noundef i32 @_ZN9Stockfish12_GLOBAL__N_16searchILb0EEENS_10Tablebases8WDLScoreERNS_8PositionEPNS2_10ProbeStateE(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef nonnull %1) switch i32 %806, label %807 [ i32 2, label %.critedge.thread - i32 1, label %.fold.split.i64 + i32 1, label %.fold.split.i65 ] 807: ; preds = %805 %808 = icmp eq i32 %806, -1 %809 = icmp eq i32 %806, -2 %810 = sext i1 %809 to i32 - br i1 %808, label %.critedge.thread, label %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 + br i1 %808, label %.critedge.thread, label %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66 -.fold.split.i64: ; preds = %805 +.fold.split.i65: ; preds = %805 br label %.critedge.thread -811: ; preds = %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread +811: ; preds = %802 %812 = call noundef i32 @_ZN9Stockfish10Tablebases9probe_dtzERNS_8PositionEPNS0_10ProbeStateE(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef nonnull %1) - br label %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 + br label %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66 -_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65: ; preds = %807, %811 +_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66: ; preds = %807, %811 %.pn = phi i32 [ %812, %811 ], [ %810, %807 ] %813 = sub nsw i32 0, %.pn %814 = icmp eq i32 %.pn, -1 br i1 %814, label %815, label %.critedge -815: ; preds = %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 +815: ; preds = %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66 %816 = load ptr, ptr %782, align 8 %817 = getelementptr inbounds i8, ptr %816, i64 48 %818 = load i64, ptr %817, align 16 @@ -3746,40 +3744,40 @@ _ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 %820 = call noundef ptr @_ZN9Stockfish8generateILNS_7GenTypeE5EEEPNS_7ExtMoveERKNS_8PositionES3_(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef nonnull %19) #24 store ptr %820, ptr %783, align 8 %821 = icmp eq ptr %820, %19 - %spec.select = select i1 %821, i32 1, i32 %.055123 + %spec.select = select i1 %821, i32 1, i32 %.055121 br label %.critedge -.critedge: ; preds = %819, %815, %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 - %822 = phi i32 [ 1, %815 ], [ %813, %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 ], [ 1, %819 ] - %.1 = phi i32 [ %.055123, %815 ], [ %.055123, %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit65 ], [ %spec.select, %819 ] +.critedge: ; preds = %819, %815, %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66 + %822 = phi i32 [ 1, %815 ], [ %813, %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66 ], [ 1, %819 ] + %.1 = phi i32 [ %.055121, %815 ], [ %.055121, %_ZN9Stockfish12_GLOBAL__N_118dtz_before_zeroingENS_10Tablebases8WDLScoreE.exit66 ], [ %spec.select, %819 ] br i1 %803, label %.critedge.thread, label %823 823: ; preds = %.critedge - %.lobit.neg.i66 = ashr i32 %822, 31 + %.lobit.neg.i67 = ashr i32 %822, 31 %isnotnull.i = icmp ne i32 %822, 0 %isnotnull.zext.i = zext i1 %isnotnull.i to i32 - %824 = or i32 %.lobit.neg.i66, %isnotnull.zext.i + %824 = or i32 %.lobit.neg.i67, %isnotnull.zext.i %825 = sub nsw i32 %824, %.pn br label %.critedge.thread -.critedge.thread: ; preds = %805, %.fold.split.i64, %807, %823, %.critedge - %.177 = phi i32 [ %.1, %.critedge ], [ %.1, %823 ], [ %.055123, %807 ], [ %.055123, %.fold.split.i64 ], [ %.055123, %805 ] - %.054 = phi i32 [ %822, %.critedge ], [ %825, %823 ], [ 101, %807 ], [ -101, %.fold.split.i64 ], [ -1, %805 ] - %826 = icmp slt i32 %.054, %.177 +.critedge.thread: ; preds = %805, %.fold.split.i65, %807, %823, %.critedge + %.178 = phi i32 [ %.1, %.critedge ], [ %.1, %823 ], [ %.055121, %807 ], [ %.055121, %.fold.split.i65 ], [ %.055121, %805 ] + %.054 = phi i32 [ %822, %.critedge ], [ %825, %823 ], [ 101, %807 ], [ -101, %.fold.split.i65 ], [ -1, %805 ] + %826 = icmp slt i32 %.054, %.178 br i1 %826, label %827, label %831 827: ; preds = %.critedge.thread - %.lobit.neg.i67 = ashr i32 %.054, 31 - %isnotnull.i68 = icmp ne i32 %.054, 0 - %isnotnull.zext.i69 = zext i1 %isnotnull.i68 to i32 - %828 = or i32 %.lobit.neg.i67, %isnotnull.zext.i69 + %.lobit.neg.i68 = ashr i32 %.054, 31 + %isnotnull.i69 = icmp ne i32 %.054, 0 + %isnotnull.zext.i70 = zext i1 %isnotnull.i69 to i32 + %828 = or i32 %.lobit.neg.i68, %isnotnull.zext.i70 %829 = icmp eq i32 %828, %784 - %spec.select62 = select i1 %829, i32 %.054, i32 %.177 + %spec.select62 = select i1 %829, i32 %.054, i32 %.178 %830 = freeze i32 %spec.select62 br label %831 831: ; preds = %827, %.critedge.thread - %.2 = phi i32 [ %.177, %.critedge.thread ], [ %830, %827 ] + %.2 = phi i32 [ %.178, %.critedge.thread ], [ %830, %827 ] call void @_ZN9Stockfish8Position9undo_moveENS_4MoveE(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.06.0.copyload) #24 %832 = load i32, ptr %1, align 4 %833 = icmp eq i32 %832, 0 @@ -3808,38 +3806,37 @@ define internal fastcc noundef range(i32 -2147483647, 4094) i32 @_ZN9Stockfish12 %8 = ptrtoint ptr %4 to i64 %9 = sub i64 %7, %8 %10 = ashr exact i64 %9, 3 - %.not59 = icmp eq ptr %4, %6 - br i1 %.not59, label %._crit_edge.thread, label %.lr.ph + %.not56 = icmp eq ptr %4, %6 + br i1 %.not56, label %._crit_edge.thread, label %.lr.ph .lr.ph: ; preds = %2, %35 - %.04562 = phi i32 [ %.1, %35 ], [ -2, %2 ] - %.04661 = phi i64 [ %.147, %35 ], [ 0, %2 ] - %.04860 = phi ptr [ %36, %35 ], [ %4, %2 ] - %.sroa.05.0.copyload = load i16, ptr %.04860, align 4 + %.04559 = phi i32 [ %.1, %35 ], [ -2, %2 ] + %.04658 = phi i64 [ %.147, %35 ], [ 0, %2 ] + %.04857 = phi ptr [ %36, %35 ], [ %4, %2 ] + %.sroa.05.0.copyload = load i16, ptr %.04857, align 4 %11 = and i16 %.sroa.05.0.copyload, 63 %12 = zext nneg i16 %11 to i64 %13 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %12 %14 = load i32, ptr %13, align 4 %15 = icmp ne i32 %14, 0 %.not.i = icmp ult i16 %.sroa.05.0.copyload, -16384 - %or.cond.i.not54 = and i1 %.not.i, %15 - %16 = and i16 %.sroa.05.0.copyload, -16384 - %17 = icmp eq i16 %16, -32768 - %or.cond = or i1 %17, %or.cond.i.not54 - br i1 %or.cond, label %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread, label %18 - -18: ; preds = %.lr.ph - %19 = lshr i16 %.sroa.05.0.copyload, 6 - %20 = and i16 %19, 63 - %21 = zext nneg i16 %20 to i64 - %22 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %21 - %23 = load i32, ptr %22, align 4 - %24 = and i32 %23, 7 - %.not51 = icmp eq i32 %24, 1 - br i1 %.not51, label %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread, label %35 + %or.cond.not.i = and i1 %.not.i, %15 + %16 = icmp slt i16 %.sroa.05.0.copyload, -16384 + %spec.select.i = or i1 %16, %or.cond.not.i + br i1 %spec.select.i, label %24, label %17 + +17: ; preds = %.lr.ph + %18 = lshr i16 %.sroa.05.0.copyload, 6 + %19 = and i16 %18, 63 + %20 = zext nneg i16 %19 to i64 + %21 = getelementptr inbounds [64 x i32], ptr %0, i64 0, i64 %20 + %22 = load i32, ptr %21, align 4 + %23 = and i32 %22, 7 + %.not51 = icmp eq i32 %23, 1 + br i1 %.not51, label %24, label %35 -_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %.lr.ph, %18 - %25 = add i64 %.04661, 1 +24: ; preds = %17, %.lr.ph + %25 = add i64 %.04658, 1 %26 = call noundef zeroext i1 @_ZNK9Stockfish8Position11gives_checkENS_4MoveE(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.05.0.copyload) #24 call void @_ZN9Stockfish8Position7do_moveENS_4MoveERNS_9StateInfoEb(ptr noundef nonnull align 8 dereferenceable(865) %0, i16 %.sroa.05.0.copyload, ptr noundef nonnull align 64 dereferenceable(11264) %3, i1 noundef zeroext %26) #24 %27 = call fastcc noundef i32 @_ZN9Stockfish12_GLOBAL__N_16searchILb0EEENS_10Tablebases8WDLScoreERNS_8PositionEPNS2_10ProbeStateE(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef %1) @@ -3849,18 +3846,18 @@ _ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %.lr.ph, %18 %30 = icmp eq i32 %29, 0 br i1 %30, label %.loopexit, label %31 -31: ; preds = %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread - %32 = icmp slt i32 %.04562, %28 +31: ; preds = %24 + %32 = icmp slt i32 %.04559, %28 br i1 %32, label %33, label %35 33: ; preds = %31 %34 = icmp slt i32 %27, -1 br i1 %34, label %.loopexit.sink.split, label %35 -35: ; preds = %31, %33, %18 - %.147 = phi i64 [ %25, %33 ], [ %25, %31 ], [ %.04661, %18 ] - %.1 = phi i32 [ %28, %33 ], [ %.04562, %31 ], [ %.04562, %18 ] - %36 = getelementptr inbounds i8, ptr %.04860, i64 8 +35: ; preds = %31, %33, %17 + %.147 = phi i64 [ %25, %33 ], [ %25, %31 ], [ %.04658, %17 ] + %.1 = phi i32 [ %28, %33 ], [ %.04559, %31 ], [ %.04559, %17 ] + %36 = getelementptr inbounds i8, ptr %.04857, i64 8 %.not = icmp eq ptr %36, %6 br i1 %.not, label %._crit_edge, label %.lr.ph @@ -3871,32 +3868,32 @@ _ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread: ; preds = %.lr.ph, %18 br i1 %39, label %.thread, label %._crit_edge.thread ._crit_edge.thread: ; preds = %2, %._crit_edge - %.045.lcssa66 = phi i32 [ %.1, %._crit_edge ], [ -2, %2 ] + %.045.lcssa63 = phi i32 [ %.1, %._crit_edge ], [ -2, %2 ] %40 = call fastcc noundef i32 @_ZN9Stockfish12_GLOBAL__N_111probe_tableILNS0_6TBTypeE0ENS_10Tablebases8WDLScoreEEET0_RKNS_8PositionEPNS3_10ProbeStateES4_(ptr noundef nonnull align 8 dereferenceable(865) %0, ptr noundef %1) %41 = load i32, ptr %1, align 4 %42 = icmp eq i32 %41, 0 br i1 %42, label %.loopexit, label %43 43: ; preds = %._crit_edge.thread - %.not50 = icmp slt i32 %.045.lcssa66, %40 + %.not50 = icmp slt i32 %.045.lcssa63, %40 br i1 %.not50, label %.loopexit.sink.split, label %.thread .thread: ; preds = %._crit_edge, %43 - %.045.lcssa6771 = phi i32 [ %.045.lcssa66, %43 ], [ %.1, %._crit_edge ] + %.045.lcssa6468 = phi i32 [ %.045.lcssa63, %43 ], [ %.1, %._crit_edge ] %44 = phi i1 [ false, %43 ], [ true, %._crit_edge ] - %45 = icmp sgt i32 %.045.lcssa6771, 0 + %45 = icmp sgt i32 %.045.lcssa6468, 0 %46 = or i1 %45, %44 %47 = select i1 %46, i32 2, i32 1 br label %.loopexit.sink.split .loopexit.sink.split: ; preds = %33, %43, %.thread %.sink = phi i32 [ %47, %.thread ], [ 1, %43 ], [ 2, %33 ] - %.0.ph = phi i32 [ %.045.lcssa6771, %.thread ], [ %40, %43 ], [ 2, %33 ] + %.0.ph = phi i32 [ %.045.lcssa6468, %.thread ], [ %40, %43 ], [ 2, %33 ] store i32 %.sink, ptr %1, align 4 br label %.loopexit -.loopexit: ; preds = %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread, %.loopexit.sink.split, %._crit_edge.thread - %.0 = phi i32 [ 0, %._crit_edge.thread ], [ %.0.ph, %.loopexit.sink.split ], [ 0, %_ZNK9Stockfish8Position7captureENS_4MoveE.exit.thread ] +.loopexit: ; preds = %24, %.loopexit.sink.split, %._crit_edge.thread + %.0 = phi i32 [ 0, %._crit_edge.thread ], [ %.0.ph, %.loopexit.sink.split ], [ 0, %24 ] ret i32 %.0 } diff --git a/bench/tev/optimized/Channel.cpp.ll b/bench/tev/optimized/Channel.cpp.ll index 7b12fefc032..9d751dbb6da 100644 --- a/bench/tev/optimized/Channel.cpp.ll +++ b/bench/tev/optimized/Channel.cpp.ll @@ -40605,118 +40605,117 @@ define linkonce_odr dso_local ptr @_ZN3fmt2v96detail5writeIcNS0_8appenderEEET0_S %14 = icmp ugt i64 %2, %13 br i1 %14, label %.lr.ph.i, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit -.lr.ph.i: ; preds = %12, %21 - %.0815.i = phi i64 [ %22, %21 ], [ 0, %12 ] - %.0914.i = phi i64 [ %.1.i, %21 ], [ 0, %12 ] +.lr.ph.i: ; preds = %12, %20 + %.0815.i = phi i64 [ %21, %20 ], [ 0, %12 ] + %.0914.i = phi i64 [ %.1.i, %20 ], [ 0, %12 ] %15 = getelementptr inbounds i8, ptr %1, i64 %.0815.i %16 = load i8, ptr %15, align 1 - %17 = and i8 %16, -64 - %.not11.i = icmp eq i8 %17, -128 - br i1 %.not11.i, label %21, label %18 - -18: ; preds = %.lr.ph.i - %19 = add i64 %.0914.i, 1 - %20 = icmp ugt i64 %19, %13 - br i1 %20, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %21 - -21: ; preds = %18, %.lr.ph.i - %.1.i = phi i64 [ %19, %18 ], [ %.0914.i, %.lr.ph.i ] - %22 = add nuw i64 %.0815.i, 1 - %.not.i = icmp eq i64 %22, %2 + %.not11.i = icmp slt i8 %16, -64 + br i1 %.not11.i, label %20, label %17 + +17: ; preds = %.lr.ph.i + %18 = add i64 %.0914.i, 1 + %19 = icmp ugt i64 %18, %13 + br i1 %19, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %20 + +20: ; preds = %17, %.lr.ph.i + %.1.i = phi i64 [ %18, %17 ], [ %.0914.i, %.lr.ph.i ] + %21 = add nuw i64 %.0815.i, 1 + %.not.i = icmp eq i64 %21, %2 br i1 %.not.i, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %.lr.ph.i, !llvm.loop !545 -_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %21, %18, %12, %4 - %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %18 ], [ %2, %21 ] - %23 = getelementptr inbounds i8, ptr %3, i64 8 - %24 = load i8, ptr %23, align 4 - %25 = icmp eq i8 %24, 18 - %26 = load i32, ptr %3, align 4 - %.not = icmp eq i32 %26, 0 - br i1 %.not, label %55, label %27 +_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %20, %17, %12, %4 + %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %17 ], [ %2, %20 ] + %22 = getelementptr inbounds i8, ptr %3, i64 8 + %23 = load i8, ptr %22, align 4 + %24 = icmp eq i8 %23, 18 + %25 = load i32, ptr %3, align 4 + %.not = icmp eq i32 %25, 0 + br i1 %.not, label %54, label %26 -27: ; preds = %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - br i1 %25, label %28, label %30 +26: ; preds = %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + br i1 %24, label %27, label %29 -28: ; preds = %27 - %29 = tail call i64 @_ZN3fmt2v96detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) - br label %55 +27: ; preds = %26 + %28 = tail call i64 @_ZN3fmt2v96detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) + br label %54 -30: ; preds = %27 +29: ; preds = %26 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) store i64 0, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) store ptr %7, ptr %5, align 8 - %31 = icmp ugt i64 %.0, 3 - br i1 %31, label %32, label %.loopexit28.i.i + %30 = icmp ugt i64 %.0, 3 + br i1 %30, label %31, label %.loopexit28.i.i -32: ; preds = %30 - %33 = getelementptr inbounds i8, ptr %1, i64 %.0 - %34 = getelementptr inbounds i8, ptr %33, i64 -3 - br label %35 +31: ; preds = %29 + %32 = getelementptr inbounds i8, ptr %1, i64 %.0 + %33 = getelementptr inbounds i8, ptr %32, i64 -3 + br label %34 + +34: ; preds = %36, %31 + %.1.i.i = phi ptr [ %1, %31 ], [ %37, %36 ] + %35 = icmp ult ptr %.1.i.i, %33 + br i1 %35, label %36, label %.loopexit28.i.i -35: ; preds = %37, %32 - %.1.i.i = phi ptr [ %1, %32 ], [ %38, %37 ] - %36 = icmp ult ptr %.1.i.i, %34 - br i1 %36, label %37, label %.loopexit28.i.i - -37: ; preds = %35 - %38 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) - %.not24.i.i = icmp eq ptr %38, null - br i1 %.not24.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %35, !llvm.loop !546 - -.loopexit28.i.i: ; preds = %35, %30 - %.0.i.i = phi ptr [ %1, %30 ], [ %.1.i.i, %35 ] - %39 = getelementptr inbounds i8, ptr %1, i64 %.0 - %40 = ptrtoint ptr %39 to i64 - %41 = ptrtoint ptr %.0.i.i to i64 - %42 = sub i64 %40, %41 - %.not.i.i = icmp eq ptr %39, %.0.i.i - br i1 %.not.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %43 - -43: ; preds = %.loopexit28.i.i +36: ; preds = %34 + %37 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) + %.not24.i.i = icmp eq ptr %37, null + br i1 %.not24.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %34, !llvm.loop !546 + +.loopexit28.i.i: ; preds = %34, %29 + %.0.i.i = phi ptr [ %1, %29 ], [ %.1.i.i, %34 ] + %38 = getelementptr inbounds i8, ptr %1, i64 %.0 + %39 = ptrtoint ptr %38 to i64 + %40 = ptrtoint ptr %.0.i.i to i64 + %41 = sub i64 %39, %40 + %.not.i.i = icmp eq ptr %38, %.0.i.i + br i1 %.not.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %42 + +42: ; preds = %.loopexit28.i.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %6, i8 0, i64 7, i1 false) - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %42, i1 false) - %44 = ptrtoint ptr %6 to i64 - br label %45 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %41, i1 false) + %43 = ptrtoint ptr %6 to i64 + br label %44 -45: ; preds = %47, %43 - %.019.i.i = phi ptr [ %6, %43 ], [ %46, %47 ] - %.2.i.i = phi ptr [ %.0.i.i, %43 ], [ %51, %47 ] - %46 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) - %.not23.i.i = icmp eq ptr %46, null - br i1 %.not23.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %47 +44: ; preds = %46, %42 + %.019.i.i = phi ptr [ %6, %42 ], [ %45, %46 ] + %.2.i.i = phi ptr [ %.0.i.i, %42 ], [ %50, %46 ] + %45 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) + %.not23.i.i = icmp eq ptr %45, null + br i1 %.not23.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %46 -47: ; preds = %45 - %48 = ptrtoint ptr %46 to i64 - %49 = ptrtoint ptr %.019.i.i to i64 - %50 = sub i64 %48, %49 - %51 = getelementptr inbounds i8, ptr %.2.i.i, i64 %50 - %52 = sub i64 %48, %44 - %53 = icmp slt i64 %52, %42 - br i1 %53, label %45, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !547 +46: ; preds = %44 + %47 = ptrtoint ptr %45 to i64 + %48 = ptrtoint ptr %.019.i.i to i64 + %49 = sub i64 %47, %48 + %50 = getelementptr inbounds i8, ptr %.2.i.i, i64 %49 + %51 = sub i64 %47, %43 + %52 = icmp slt i64 %51, %41 + br i1 %52, label %44, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !547 -_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %37, %45, %47, %.loopexit28.i.i +_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %36, %44, %46, %.loopexit28.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) - %54 = load i64, ptr %7, align 8 + %53 = load i64, ptr %7, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) - br label %55 + br label %54 -55: ; preds = %28, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - %.019 = phi i64 [ %29, %28 ], [ %54, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] - %56 = zext i1 %25 to i8 - store i8 %56, ptr %8, align 8 - %57 = getelementptr inbounds i8, ptr %8, i64 8 - store ptr %1, ptr %57, align 8 +54: ; preds = %27, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + %.019 = phi i64 [ %28, %27 ], [ %53, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] + %55 = zext i1 %24 to i8 + store i8 %55, ptr %8, align 8 + %56 = getelementptr inbounds i8, ptr %8, i64 8 + store ptr %1, ptr %56, align 8 %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 16 store i64 %2, ptr %.sroa.5.0..sroa_idx, align 8 - %58 = getelementptr inbounds i8, ptr %8, i64 24 - store ptr %1, ptr %58, align 8 - %59 = getelementptr inbounds i8, ptr %8, i64 32 - store i64 %.0, ptr %59, align 8 - %60 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) - ret ptr %60 + %57 = getelementptr inbounds i8, ptr %8, i64 24 + store ptr %1, ptr %57, align 8 + %58 = getelementptr inbounds i8, ptr %8, i64 32 + store i64 %.0, ptr %58, align 8 + %59 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) + ret ptr %59 } ; Function Attrs: mustprogress uwtable diff --git a/bench/tev/optimized/ImageCanvas.cpp.ll b/bench/tev/optimized/ImageCanvas.cpp.ll index 0f7b273e8a1..1f2651557d5 100644 --- a/bench/tev/optimized/ImageCanvas.cpp.ll +++ b/bench/tev/optimized/ImageCanvas.cpp.ll @@ -56999,118 +56999,117 @@ define linkonce_odr dso_local ptr @_ZN3fmt2v96detail5writeIcNS0_8appenderEEET0_S %14 = icmp ugt i64 %2, %13 br i1 %14, label %.lr.ph.i, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit -.lr.ph.i: ; preds = %12, %21 - %.0815.i = phi i64 [ %22, %21 ], [ 0, %12 ] - %.0914.i = phi i64 [ %.1.i, %21 ], [ 0, %12 ] +.lr.ph.i: ; preds = %12, %20 + %.0815.i = phi i64 [ %21, %20 ], [ 0, %12 ] + %.0914.i = phi i64 [ %.1.i, %20 ], [ 0, %12 ] %15 = getelementptr inbounds i8, ptr %1, i64 %.0815.i %16 = load i8, ptr %15, align 1 - %17 = and i8 %16, -64 - %.not11.i = icmp eq i8 %17, -128 - br i1 %.not11.i, label %21, label %18 - -18: ; preds = %.lr.ph.i - %19 = add i64 %.0914.i, 1 - %20 = icmp ugt i64 %19, %13 - br i1 %20, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %21 - -21: ; preds = %18, %.lr.ph.i - %.1.i = phi i64 [ %19, %18 ], [ %.0914.i, %.lr.ph.i ] - %22 = add nuw i64 %.0815.i, 1 - %.not.i = icmp eq i64 %22, %2 + %.not11.i = icmp slt i8 %16, -64 + br i1 %.not11.i, label %20, label %17 + +17: ; preds = %.lr.ph.i + %18 = add i64 %.0914.i, 1 + %19 = icmp ugt i64 %18, %13 + br i1 %19, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %20 + +20: ; preds = %17, %.lr.ph.i + %.1.i = phi i64 [ %18, %17 ], [ %.0914.i, %.lr.ph.i ] + %21 = add nuw i64 %.0815.i, 1 + %.not.i = icmp eq i64 %21, %2 br i1 %.not.i, label %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %.lr.ph.i, !llvm.loop !977 -_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %21, %18, %12, %4 - %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %18 ], [ %2, %21 ] - %23 = getelementptr inbounds i8, ptr %3, i64 8 - %24 = load i8, ptr %23, align 4 - %25 = icmp eq i8 %24, 18 - %26 = load i32, ptr %3, align 4 - %.not = icmp eq i32 %26, 0 - br i1 %.not, label %55, label %27 +_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %20, %17, %12, %4 + %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %17 ], [ %2, %20 ] + %22 = getelementptr inbounds i8, ptr %3, i64 8 + %23 = load i8, ptr %22, align 4 + %24 = icmp eq i8 %23, 18 + %25 = load i32, ptr %3, align 4 + %.not = icmp eq i32 %25, 0 + br i1 %.not, label %54, label %26 -27: ; preds = %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - br i1 %25, label %28, label %30 +26: ; preds = %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + br i1 %24, label %27, label %29 -28: ; preds = %27 - %29 = tail call i64 @_ZN3fmt2v96detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) - br label %55 +27: ; preds = %26 + %28 = tail call i64 @_ZN3fmt2v96detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) + br label %54 -30: ; preds = %27 +29: ; preds = %26 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) store i64 0, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) store ptr %7, ptr %5, align 8 - %31 = icmp ugt i64 %.0, 3 - br i1 %31, label %32, label %.loopexit28.i.i + %30 = icmp ugt i64 %.0, 3 + br i1 %30, label %31, label %.loopexit28.i.i -32: ; preds = %30 - %33 = getelementptr inbounds i8, ptr %1, i64 %.0 - %34 = getelementptr inbounds i8, ptr %33, i64 -3 - br label %35 +31: ; preds = %29 + %32 = getelementptr inbounds i8, ptr %1, i64 %.0 + %33 = getelementptr inbounds i8, ptr %32, i64 -3 + br label %34 -35: ; preds = %37, %32 - %.1.i.i = phi ptr [ %1, %32 ], [ %38, %37 ] - %36 = icmp ult ptr %.1.i.i, %34 - br i1 %36, label %37, label %.loopexit28.i.i +34: ; preds = %36, %31 + %.1.i.i = phi ptr [ %1, %31 ], [ %37, %36 ] + %35 = icmp ult ptr %.1.i.i, %33 + br i1 %35, label %36, label %.loopexit28.i.i -37: ; preds = %35 - %38 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) - %.not24.i.i = icmp eq ptr %38, null - br i1 %.not24.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %35, !llvm.loop !978 - -.loopexit28.i.i: ; preds = %35, %30 - %.0.i.i = phi ptr [ %1, %30 ], [ %.1.i.i, %35 ] - %39 = getelementptr inbounds i8, ptr %1, i64 %.0 - %40 = ptrtoint ptr %39 to i64 - %41 = ptrtoint ptr %.0.i.i to i64 - %42 = sub i64 %40, %41 - %.not.i.i = icmp eq ptr %39, %.0.i.i - br i1 %.not.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %43 - -43: ; preds = %.loopexit28.i.i +36: ; preds = %34 + %37 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) + %.not24.i.i = icmp eq ptr %37, null + br i1 %.not24.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %34, !llvm.loop !978 + +.loopexit28.i.i: ; preds = %34, %29 + %.0.i.i = phi ptr [ %1, %29 ], [ %.1.i.i, %34 ] + %38 = getelementptr inbounds i8, ptr %1, i64 %.0 + %39 = ptrtoint ptr %38 to i64 + %40 = ptrtoint ptr %.0.i.i to i64 + %41 = sub i64 %39, %40 + %.not.i.i = icmp eq ptr %38, %.0.i.i + br i1 %.not.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %42 + +42: ; preds = %.loopexit28.i.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %6, i8 0, i64 7, i1 false) - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %42, i1 false) - %44 = ptrtoint ptr %6 to i64 - br label %45 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %41, i1 false) + %43 = ptrtoint ptr %6 to i64 + br label %44 -45: ; preds = %47, %43 - %.019.i.i = phi ptr [ %6, %43 ], [ %46, %47 ] - %.2.i.i = phi ptr [ %.0.i.i, %43 ], [ %51, %47 ] - %46 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) - %.not23.i.i = icmp eq ptr %46, null - br i1 %.not23.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %47 +44: ; preds = %46, %42 + %.019.i.i = phi ptr [ %6, %42 ], [ %45, %46 ] + %.2.i.i = phi ptr [ %.0.i.i, %42 ], [ %50, %46 ] + %45 = call noundef ptr @_ZZN3fmt2v96detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) + %.not23.i.i = icmp eq ptr %45, null + br i1 %.not23.i.i, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %46 -47: ; preds = %45 - %48 = ptrtoint ptr %46 to i64 - %49 = ptrtoint ptr %.019.i.i to i64 - %50 = sub i64 %48, %49 - %51 = getelementptr inbounds i8, ptr %.2.i.i, i64 %50 - %52 = sub i64 %48, %44 - %53 = icmp slt i64 %52, %42 - br i1 %53, label %45, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !979 +46: ; preds = %44 + %47 = ptrtoint ptr %45 to i64 + %48 = ptrtoint ptr %.019.i.i to i64 + %49 = sub i64 %47, %48 + %50 = getelementptr inbounds i8, ptr %.2.i.i, i64 %49 + %51 = sub i64 %47, %43 + %52 = icmp slt i64 %51, %41 + br i1 %52, label %44, label %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !979 -_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %37, %45, %47, %.loopexit28.i.i +_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %36, %44, %46, %.loopexit28.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) - %54 = load i64, ptr %7, align 8 + %53 = load i64, ptr %7, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) - br label %55 + br label %54 -55: ; preds = %28, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - %.019 = phi i64 [ %29, %28 ], [ %54, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] - %56 = zext i1 %25 to i8 - store i8 %56, ptr %8, align 8 - %57 = getelementptr inbounds i8, ptr %8, i64 8 - store ptr %1, ptr %57, align 8 +54: ; preds = %27, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + %.019 = phi i64 [ %28, %27 ], [ %53, %_ZN3fmt2v96detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt2v96detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] + %55 = zext i1 %24 to i8 + store i8 %55, ptr %8, align 8 + %56 = getelementptr inbounds i8, ptr %8, i64 8 + store ptr %1, ptr %56, align 8 %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 16 store i64 %2, ptr %.sroa.5.0..sroa_idx, align 8 - %58 = getelementptr inbounds i8, ptr %8, i64 24 - store ptr %1, ptr %58, align 8 - %59 = getelementptr inbounds i8, ptr %8, i64 32 - store i64 %.0, ptr %59, align 8 - %60 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) - ret ptr %60 + %57 = getelementptr inbounds i8, ptr %8, i64 24 + store ptr %1, ptr %57, align 8 + %58 = getelementptr inbounds i8, ptr %8, i64 32 + store i64 %.0, ptr %58, align 8 + %59 = call ptr @_ZN3fmt2v96detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_18basic_format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) + ret ptr %59 } ; Function Attrs: mustprogress uwtable diff --git a/bench/vcpkg/optimized/sourceparagraph.cpp.ll b/bench/vcpkg/optimized/sourceparagraph.cpp.ll index 9a0d3c69f6f..19a42e51863 100644 --- a/bench/vcpkg/optimized/sourceparagraph.cpp.ll +++ b/bench/vcpkg/optimized/sourceparagraph.cpp.ll @@ -16733,118 +16733,117 @@ define linkonce_odr dso_local ptr @_ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_ %14 = icmp ugt i64 %2, %13 br i1 %14, label %.lr.ph.i, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit -.lr.ph.i: ; preds = %12, %21 - %.0815.i = phi i64 [ %22, %21 ], [ 0, %12 ] - %.0914.i = phi i64 [ %.1.i, %21 ], [ 0, %12 ] +.lr.ph.i: ; preds = %12, %20 + %.0815.i = phi i64 [ %21, %20 ], [ 0, %12 ] + %.0914.i = phi i64 [ %.1.i, %20 ], [ 0, %12 ] %15 = getelementptr inbounds i8, ptr %1, i64 %.0815.i %16 = load i8, ptr %15, align 1 - %17 = and i8 %16, -64 - %.not11.i = icmp eq i8 %17, -128 - br i1 %.not11.i, label %21, label %18 - -18: ; preds = %.lr.ph.i - %19 = add i64 %.0914.i, 1 - %20 = icmp ugt i64 %19, %13 - br i1 %20, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %21 - -21: ; preds = %18, %.lr.ph.i - %.1.i = phi i64 [ %19, %18 ], [ %.0914.i, %.lr.ph.i ] - %22 = add nuw i64 %.0815.i, 1 - %.not.i = icmp eq i64 %22, %2 + %.not11.i = icmp slt i8 %16, -64 + br i1 %.not11.i, label %20, label %17 + +17: ; preds = %.lr.ph.i + %18 = add i64 %.0914.i, 1 + %19 = icmp ugt i64 %18, %13 + br i1 %19, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %20 + +20: ; preds = %17, %.lr.ph.i + %.1.i = phi i64 [ %18, %17 ], [ %.0914.i, %.lr.ph.i ] + %21 = add nuw i64 %.0815.i, 1 + %.not.i = icmp eq i64 %21, %2 br i1 %.not.i, label %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit, label %.lr.ph.i, !llvm.loop !335 -_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %21, %18, %12, %4 - %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %18 ], [ %2, %21 ] - %23 = getelementptr inbounds i8, ptr %3, i64 8 - %24 = load i8, ptr %23, align 4 - %25 = icmp eq i8 %24, 18 - %26 = load i32, ptr %3, align 4 - %.not = icmp eq i32 %26, 0 - br i1 %.not, label %54, label %27 +_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit: ; preds = %20, %17, %12, %4 + %.0 = phi i64 [ %2, %12 ], [ %2, %4 ], [ %.0815.i, %17 ], [ %2, %20 ] + %22 = getelementptr inbounds i8, ptr %3, i64 8 + %23 = load i8, ptr %22, align 4 + %24 = icmp eq i8 %23, 18 + %25 = load i32, ptr %3, align 4 + %.not = icmp eq i32 %25, 0 + br i1 %.not, label %53, label %26 -27: ; preds = %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - br i1 %25, label %28, label %30 +26: ; preds = %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + br i1 %24, label %27, label %29 -28: ; preds = %27 - %29 = tail call i64 @_ZN3fmt3v106detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) - br label %54 +27: ; preds = %26 + %28 = tail call i64 @_ZN3fmt3v106detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE(i64 0, ptr %1, i64 %2) + br label %53 -30: ; preds = %27 +29: ; preds = %26 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) store i64 0, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) store ptr %7, ptr %5, align 8 - %31 = icmp ugt i64 %.0, 3 - br i1 %31, label %32, label %.loopexit28.i.i - -32: ; preds = %30 - %33 = getelementptr inbounds i8, ptr %1, i64 %.0 - %34 = getelementptr inbounds i8, ptr %33, i64 -3 - br label %35 + %30 = icmp ugt i64 %.0, 3 + br i1 %30, label %31, label %.loopexit28.i.i -35: ; preds = %37, %32 - %.1.i.i = phi ptr [ %1, %32 ], [ %38, %37 ] - %36 = icmp ult ptr %.1.i.i, %34 - br i1 %36, label %37, label %.loopexit28.i.i +31: ; preds = %29 + %32 = getelementptr inbounds i8, ptr %1, i64 %.0 + %33 = getelementptr inbounds i8, ptr %32, i64 -3 + br label %34 -37: ; preds = %35 - %38 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) - %.not24.i.i = icmp eq ptr %38, null - br i1 %.not24.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %35, !llvm.loop !336 +34: ; preds = %36, %31 + %.1.i.i = phi ptr [ %1, %31 ], [ %37, %36 ] + %35 = icmp ult ptr %.1.i.i, %33 + br i1 %35, label %36, label %.loopexit28.i.i -.loopexit28.i.i: ; preds = %35, %30 - %.0.i.i = phi ptr [ %1, %30 ], [ %.1.i.i, %35 ] - %39 = getelementptr inbounds i8, ptr %1, i64 %.0 - %40 = ptrtoint ptr %39 to i64 - %41 = ptrtoint ptr %.0.i.i to i64 - %42 = sub i64 %40, %41 - %.not.i.i = icmp eq ptr %39, %.0.i.i +36: ; preds = %34 + %37 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %.1.i.i, ptr noundef %.1.i.i) + %.not24.i.i = icmp eq ptr %37, null + br i1 %.not24.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %34, !llvm.loop !336 + +.loopexit28.i.i: ; preds = %34, %29 + %.0.i.i = phi ptr [ %1, %29 ], [ %.1.i.i, %34 ] + %38 = getelementptr inbounds i8, ptr %1, i64 %.0 + %39 = ptrtoint ptr %38 to i64 + %40 = ptrtoint ptr %.0.i.i to i64 + %41 = sub i64 %39, %40 + %.not.i.i = icmp eq ptr %38, %.0.i.i br i1 %.not.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i _ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i: ; preds = %.loopexit28.i.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %6, i8 0, i64 7, i1 false) - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %42, i1 false) - %43 = ptrtoint ptr %6 to i64 - br label %44 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %6, ptr align 1 %.0.i.i, i64 %41, i1 false) + %42 = ptrtoint ptr %6 to i64 + br label %43 -44: ; preds = %46, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i - %.019.i.i = phi ptr [ %6, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %45, %46 ] - %.2.i.i = phi ptr [ %.0.i.i, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %50, %46 ] - %45 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) - %.not23.i.i = icmp eq ptr %45, null - br i1 %.not23.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %46 +43: ; preds = %45, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i + %.019.i.i = phi ptr [ %6, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %44, %45 ] + %.2.i.i = phi ptr [ %.0.i.i, %_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_.exit.i.i ], [ %49, %45 ] + %44 = call noundef ptr @_ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %.019.i.i, ptr noundef %.2.i.i) + %.not23.i.i = icmp eq ptr %44, null + br i1 %.not23.i.i, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, label %45 -46: ; preds = %44 - %47 = ptrtoint ptr %45 to i64 - %48 = ptrtoint ptr %.019.i.i to i64 - %49 = sub i64 %47, %48 - %50 = getelementptr inbounds i8, ptr %.2.i.i, i64 %49 - %51 = sub i64 %47, %43 - %52 = icmp slt i64 %51, %42 - br i1 %52, label %44, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !337 +45: ; preds = %43 + %46 = ptrtoint ptr %44 to i64 + %47 = ptrtoint ptr %.019.i.i to i64 + %48 = sub i64 %46, %47 + %49 = getelementptr inbounds i8, ptr %.2.i.i, i64 %48 + %50 = sub i64 %46, %42 + %51 = icmp slt i64 %50, %41 + br i1 %51, label %43, label %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, !llvm.loop !337 -_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %37, %44, %46, %.loopexit28.i.i +_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit: ; preds = %36, %43, %45, %.loopexit28.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) - %53 = load i64, ptr %7, align 8 + %52 = load i64, ptr %7, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) - br label %54 + br label %53 -54: ; preds = %28, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit - %.019 = phi i64 [ %29, %28 ], [ %53, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] - %55 = zext i1 %25 to i8 - store i8 %55, ptr %8, align 8 - %56 = getelementptr inbounds i8, ptr %8, i64 8 - store ptr %1, ptr %56, align 8 +53: ; preds = %27, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit + %.019 = phi i64 [ %28, %27 ], [ %52, %_ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE.exit ], [ 0, %_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm.exit ] + %54 = zext i1 %24 to i8 + store i8 %54, ptr %8, align 8 + %55 = getelementptr inbounds i8, ptr %8, i64 8 + store ptr %1, ptr %55, align 8 %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 16 store i64 %2, ptr %.sroa.5.0..sroa_idx, align 8 - %57 = getelementptr inbounds i8, ptr %8, i64 24 - store ptr %1, ptr %57, align 8 - %58 = getelementptr inbounds i8, ptr %8, i64 32 - store i64 %.0, ptr %58, align 8 - %59 = call ptr @_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) - ret ptr %59 + %56 = getelementptr inbounds i8, ptr %8, i64 24 + store ptr %1, ptr %56, align 8 + %57 = getelementptr inbounds i8, ptr %8, i64 32 + store i64 %.0, ptr %57, align 8 + %58 = call ptr @_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_(ptr %0, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %.0, i64 noundef %.019, ptr noundef nonnull align 8 dereferenceable(40) %8) + ret ptr %58 } ; Function Attrs: mustprogress uwtable diff --git a/bench/velox/optimized/StackTrace.cpp.ll b/bench/velox/optimized/StackTrace.cpp.ll index bf7e850d120..1918cc3a876 100644 --- a/bench/velox/optimized/StackTrace.cpp.ll +++ b/bench/velox/optimized/StackTrace.cpp.ll @@ -945,23 +945,22 @@ _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.ex store i8 0, ptr %ref.tmp.i.i, align 8 %arrayidx.i.i.i9.i.i = getelementptr inbounds i8, ptr %ref.tmp2.i.i, i64 23 %4 = load i8, ptr %arrayidx.i.i.i9.i.i, align 1 - %5 = and i8 %4, -64 - %cmp.i.i10.i.i = icmp eq i8 %5, 0 + %cmp.i.i10.i.i = icmp ult i8 %4, 64 br i1 %cmp.i.i10.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit18.i.i, label %if.end.i.i11.i.i if.end.i.i11.i.i: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit.i.i - %cmp.i.i.i12.i.i = icmp eq i8 %5, -128 - %6 = load ptr, ptr %ref.tmp2.i.i, align 8 + %cmp.i.i.i12.i.i = icmp slt i8 %4, -64 + %5 = load ptr, ptr %ref.tmp2.i.i, align 8 br i1 %cmp.i.i.i12.i.i, label %if.end.sink.split.i.i.i16.i.i, label %if.else.i.i.i13.i.i if.else.i.i.i13.i.i: ; preds = %if.end.i.i11.i.i - %add.ptr.i.i.i.i.i14.i.i = getelementptr inbounds i8, ptr %6, i64 -8 - %7 = atomicrmw sub ptr %add.ptr.i.i.i.i.i14.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i15.i.i = icmp eq i64 %7, 1 + %add.ptr.i.i.i.i.i14.i.i = getelementptr inbounds i8, ptr %5, i64 -8 + %6 = atomicrmw sub ptr %add.ptr.i.i.i.i.i14.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i15.i.i = icmp eq i64 %6, 1 br i1 %cmp.i.i.i.i15.i.i, label %if.end.sink.split.i.i.i16.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit18.i.i if.end.sink.split.i.i.i16.i.i: ; preds = %if.else.i.i.i13.i.i, %if.end.i.i11.i.i - %add.ptr.i.i.sink.i.i.i17.i.i = phi ptr [ %6, %if.end.i.i11.i.i ], [ %add.ptr.i.i.i.i.i14.i.i, %if.else.i.i.i13.i.i ] + %add.ptr.i.i.sink.i.i.i17.i.i = phi ptr [ %5, %if.end.i.i11.i.i ], [ %add.ptr.i.i.i.i.i14.i.i, %if.else.i.i.i13.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i17.i.i) #23 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit18.i.i @@ -972,19 +971,19 @@ _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.ex init.end.i.i: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit18.i.i, %init.check.i.i, %if.end.i2 %bt_vector_.i.i = getelementptr inbounds i8, ptr %this, i64 32 %_M_finish.i.i.i = getelementptr inbounds i8, ptr %this, i64 8 - %8 = load ptr, ptr %_M_finish.i.i.i, align 8 - %9 = load ptr, ptr %this, align 8 - %sub.ptr.lhs.cast.i.i.i = ptrtoint ptr %8 to i64 - %sub.ptr.rhs.cast.i.i.i = ptrtoint ptr %9 to i64 + %7 = load ptr, ptr %_M_finish.i.i.i, align 8 + %8 = load ptr, ptr %this, align 8 + %sub.ptr.lhs.cast.i.i.i = ptrtoint ptr %7 to i64 + %sub.ptr.rhs.cast.i.i.i = ptrtoint ptr %8 to i64 %sub.ptr.sub.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i, %sub.ptr.rhs.cast.i.i.i %sub.ptr.div.i.i.i = ashr exact i64 %sub.ptr.sub.i.i.i, 3 invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %bt_vector_.i.i, i64 noundef %sub.ptr.div.i.i.i) to label %.noexc.i unwind label %lpad.i .noexc.i: ; preds = %init.end.i.i - %10 = load ptr, ptr %this, align 8 - %11 = load ptr, ptr %_M_finish.i.i.i, align 8 - %cmp.i.not39.i.i = icmp eq ptr %10, %11 + %9 = load ptr, ptr %this, align 8 + %10 = load ptr, ptr %_M_finish.i.i.i, align 8 + %cmp.i.not39.i.i = icmp eq ptr %9, %10 br i1 %cmp.i.not39.i.i, label %invoke.cont.i, label %invoke.cont16.lr.ph.i.i invoke.cont16.lr.ph.i.i: ; preds = %.noexc.i @@ -996,19 +995,19 @@ invoke.cont16.lr.ph.i.i: ; preds = %.noexc.i invoke.cont16.i.i: ; preds = %cleanup.i.i, %invoke.cont16.lr.ph.i.i %frame.041.i.i = phi i64 [ 0, %invoke.cont16.lr.ph.i.i ], [ %frame.1.i.i, %cleanup.i.i ] - %__begin3.sroa.0.040.i.i = phi ptr [ %10, %invoke.cont16.lr.ph.i.i ], [ %incdec.ptr.i.i.i, %cleanup.i.i ] + %__begin3.sroa.0.040.i.i = phi ptr [ %9, %invoke.cont16.lr.ph.i.i ], [ %incdec.ptr.i.i.i, %cleanup.i.i ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23 %call.i20.i.i = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23 %call3.i.i.i = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23 - %12 = load ptr, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", align 8 - %13 = load i8, ptr getelementptr inbounds (i8, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", i64 23), align 1 - %cmp.i.i.i.i21.i.i = icmp ult i8 %13, 64 - %cond.i.i.i.i.i.i = select i1 %cmp.i.i.i.i21.i.i, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", ptr %12 - %14 = load i64, ptr getelementptr inbounds (i8, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", i64 8), align 8 - %conv.i.i.i.i.i = zext i8 %13 to i64 + %11 = load ptr, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", align 8 + %12 = load i8, ptr getelementptr inbounds (i8, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", i64 23), align 1 + %cmp.i.i.i.i21.i.i = icmp ult i8 %12, 64 + %cond.i.i.i.i.i.i = select i1 %cmp.i.i.i.i21.i.i, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", ptr %11 + %13 = load i64, ptr getelementptr inbounds (i8, ptr @"_ZZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname", i64 8), align 8 + %conv.i.i.i.i.i = zext i8 %12 to i64 %sub.i.i.i.i.i = sub nsw i64 23, %conv.i.i.i.i.i - %cmp.i.i.i22.i.i = icmp ult i8 %13, 24 - %cond.i.i.i.i.i = select i1 %cmp.i.i.i22.i.i, i64 %sub.i.i.i.i.i, i64 %14 + %cmp.i.i.i22.i.i = icmp ult i8 %12, 24 + %cond.i.i.i.i.i = select i1 %cmp.i.i.i22.i.i, i64 %sub.i.i.i.i.i, i64 %13 %cmp.not.i.i.i = icmp ult i64 %call3.i.i.i, %cond.i.i.i.i.i br i1 %cmp.not.i.i.i, label %.noexc.i.i, label %land.rhs.i.i.i.i @@ -1022,42 +1021,41 @@ _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i.i: ; preds = %land.rhs.i.i.i. br i1 %cmp.i.i.i24.i.i, label %cleanup.i.i, label %.noexc.i.i lpad.i.i: ; preds = %init.i.i - %15 = landingpad { ptr, i32 } + %14 = landingpad { ptr, i32 } cleanup br label %ehcleanup.i.i lpad3.i.i: ; preds = %invoke.cont.i.i - %16 = landingpad { ptr, i32 } + %15 = landingpad { ptr, i32 } cleanup %arrayidx.i.i.i25.i.i = getelementptr inbounds i8, ptr %ref.tmp2.i.i, i64 23 - %17 = load i8, ptr %arrayidx.i.i.i25.i.i, align 1 - %18 = and i8 %17, -64 - %cmp.i.i26.i.i = icmp eq i8 %18, 0 + %16 = load i8, ptr %arrayidx.i.i.i25.i.i, align 1 + %cmp.i.i26.i.i = icmp ult i8 %16, 64 br i1 %cmp.i.i26.i.i, label %ehcleanup.i.i, label %if.end.i.i27.i.i if.end.i.i27.i.i: ; preds = %lpad3.i.i - %cmp.i.i.i28.i.i = icmp eq i8 %18, -128 - %19 = load ptr, ptr %ref.tmp2.i.i, align 8 + %cmp.i.i.i28.i.i = icmp slt i8 %16, -64 + %17 = load ptr, ptr %ref.tmp2.i.i, align 8 br i1 %cmp.i.i.i28.i.i, label %if.end.sink.split.i.i.i32.i.i, label %if.else.i.i.i29.i.i if.else.i.i.i29.i.i: ; preds = %if.end.i.i27.i.i - %add.ptr.i.i.i.i.i30.i.i = getelementptr inbounds i8, ptr %19, i64 -8 - %20 = atomicrmw sub ptr %add.ptr.i.i.i.i.i30.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i31.i.i = icmp eq i64 %20, 1 + %add.ptr.i.i.i.i.i30.i.i = getelementptr inbounds i8, ptr %17, i64 -8 + %18 = atomicrmw sub ptr %add.ptr.i.i.i.i.i30.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i31.i.i = icmp eq i64 %18, 1 br i1 %cmp.i.i.i.i31.i.i, label %if.end.sink.split.i.i.i32.i.i, label %ehcleanup.i.i if.end.sink.split.i.i.i32.i.i: ; preds = %if.else.i.i.i29.i.i, %if.end.i.i27.i.i - %add.ptr.i.i.sink.i.i.i33.i.i = phi ptr [ %19, %if.end.i.i27.i.i ], [ %add.ptr.i.i.i.i.i30.i.i, %if.else.i.i.i29.i.i ] + %add.ptr.i.i.sink.i.i.i33.i.i = phi ptr [ %17, %if.end.i.i27.i.i ], [ %add.ptr.i.i.i.i.i30.i.i, %if.else.i.i.i29.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i33.i.i) #23 br label %ehcleanup.i.i ehcleanup.i.i: ; preds = %if.end.sink.split.i.i.i32.i.i, %if.else.i.i.i29.i.i, %lpad3.i.i, %lpad.i.i - %.pn.i.i = phi { ptr, i32 } [ %15, %lpad.i.i ], [ %16, %lpad3.i.i ], [ %16, %if.else.i.i.i29.i.i ], [ %16, %if.end.sink.split.i.i.i32.i.i ] + %.pn.i.i = phi { ptr, i32 } [ %14, %lpad.i.i ], [ %15, %lpad3.i.i ], [ %15, %if.else.i.i.i29.i.i ], [ %15, %if.end.sink.split.i.i.i32.i.i ] call void @__cxa_guard_abort(ptr nonnull @"_ZGVZZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvENK3$_0clEvE6myname") #23 br label %lpad.body.i lpad12.i.i: ; preds = %.noexc.i.i - %21 = landingpad { ptr, i32 } + %19 = landingpad { ptr, i32 } cleanup br label %ehcleanup27.i.i @@ -1066,28 +1064,28 @@ lpad12.i.i: ; preds = %.noexc.i.i call void @llvm.experimental.noalias.scope.decl(metadata !12) %call.i.i.i.i.i = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23, !noalias !12 %call2.i.i.i.i.i = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23, !noalias !12 - %22 = ptrtoint ptr %call.i.i.i.i.i to i64 + %20 = ptrtoint ptr %call.i.i.i.i.i to i64 store i64 %frame.041.i.i, ptr %ref.tmp.i.i.i, align 16, !alias.scope !12 - store i64 %22, ptr %arrayinit.element.i.i.i.i, align 16, !alias.scope !12 + store i64 %20, ptr %arrayinit.element.i.i.i.i, align 16, !alias.scope !12 store i64 %call2.i.i.i.i.i, ptr %ref.tmp5.i.sroa.2.0.arrayinit.element.i.sroa_idx.i.i.i, align 8, !alias.scope !12 invoke void @_ZN3fmt2v87vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE(ptr nonnull sret(%"class.std::__cxx11::basic_string") align 8 %ref.tmp20.i.i, ptr nonnull @.str.13, i64 11, i64 212, ptr nonnull %ref.tmp.i.i.i) to label %invoke.cont23.i.i unwind label %lpad12.i.i invoke.cont23.i.i: ; preds = %.noexc.i.i - %23 = load ptr, ptr %_M_finish.i.i.i.i, align 8 - %24 = load ptr, ptr %_M_end_of_storage.i.i.i.i, align 8 - %cmp.not.i.i.i.i = icmp eq ptr %23, %24 + %21 = load ptr, ptr %_M_finish.i.i.i.i, align 8 + %22 = load ptr, ptr %_M_end_of_storage.i.i.i.i, align 8 + %cmp.not.i.i.i.i = icmp eq ptr %21, %22 br i1 %cmp.not.i.i.i.i, label %if.else.i.i.i.i, label %if.then.i.i.i.i if.then.i.i.i.i: ; preds = %invoke.cont23.i.i - call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp20.i.i) #23 - %25 = load ptr, ptr %_M_finish.i.i.i.i, align 8 - %incdec.ptr.i.i.i.i = getelementptr inbounds i8, ptr %25, i64 32 + call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp20.i.i) #23 + %23 = load ptr, ptr %_M_finish.i.i.i.i, align 8 + %incdec.ptr.i.i.i.i = getelementptr inbounds i8, ptr %23, i64 32 store ptr %incdec.ptr.i.i.i.i, ptr %_M_finish.i.i.i.i, align 8 br label %invoke.cont25.i.i if.else.i.i.i.i: ; preds = %invoke.cont23.i.i - invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_(ptr noundef nonnull align 8 dereferenceable(24) %bt_vector_.i.i, ptr %23, ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp20.i.i) + invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_(ptr noundef nonnull align 8 dereferenceable(24) %bt_vector_.i.i, ptr %21, ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp20.i.i) to label %invoke.cont25.i.i unwind label %lpad24.i.i invoke.cont25.i.i: ; preds = %if.else.i.i.i.i, %if.then.i.i.i.i @@ -1098,17 +1096,17 @@ cleanup.i.i: ; preds = %invoke.cont25.i.i, %frame.1.i.i = phi i64 [ %inc.i.i, %invoke.cont25.i.i ], [ %frame.041.i.i, %land.rhs.i.i.i.i ], [ %frame.041.i.i, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i.i ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23 %incdec.ptr.i.i.i = getelementptr inbounds i8, ptr %__begin3.sroa.0.040.i.i, i64 8 - %cmp.i.not.i.i = icmp eq ptr %incdec.ptr.i.i.i, %11 + %cmp.i.not.i.i = icmp eq ptr %incdec.ptr.i.i.i, %10 br i1 %cmp.i.not.i.i, label %invoke.cont.i, label %invoke.cont16.i.i lpad24.i.i: ; preds = %if.else.i.i.i.i - %26 = landingpad { ptr, i32 } + %24 = landingpad { ptr, i32 } cleanup call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %ref.tmp20.i.i) #23 br label %ehcleanup27.i.i ehcleanup27.i.i: ; preds = %lpad24.i.i, %lpad12.i.i - %.pn5.i.i = phi { ptr, i32 } [ %26, %lpad24.i.i ], [ %21, %lpad12.i.i ] + %.pn5.i.i = phi { ptr, i32 } [ %24, %lpad24.i.i ], [ %19, %lpad12.i.i ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %framename.i.i) #23 br label %lpad.body.i @@ -1126,27 +1124,27 @@ cleanup.i: ; preds = %invoke.cont.i, %if. to label %"_ZN5folly9call_onceINS_15basic_once_flagINS_15SharedMutexImplILb0EvSt6atomicNS_24SharedMutexPolicyDefaultEEES3_EEZNK8facebook5velox7process10StackTrace11toStrVectorB5cxx11EvE3$_0JEEEvRT_OT0_DpOT1_.exit" unwind label %terminate.lpad.i.i terminate.lpad.i.i: ; preds = %cleanup.i - %27 = landingpad { ptr, i32 } + %25 = landingpad { ptr, i32 } catch ptr null - %28 = extractvalue { ptr, i32 } %27, 0 - call void @__clang_call_terminate(ptr %28) #27 + %26 = extractvalue { ptr, i32 } %25, 0 + call void @__clang_call_terminate(ptr %26) #27 unreachable lpad.i: ; preds = %init.end.i.i - %29 = landingpad { ptr, i32 } + %27 = landingpad { ptr, i32 } cleanup br label %lpad.body.i lpad.body.i: ; preds = %lpad.i, %ehcleanup27.i.i, %ehcleanup.i.i - %eh.lpad-body.i = phi { ptr, i32 } [ %29, %lpad.i ], [ %.pn5.i.i, %ehcleanup27.i.i ], [ %.pn.i.i, %ehcleanup.i.i ] + %eh.lpad-body.i = phi { ptr, i32 } [ %27, %lpad.i ], [ %.pn5.i.i, %ehcleanup27.i.i ], [ %.pn.i.i, %ehcleanup.i.i ] invoke void @_ZN5folly15SharedMutexImplILb0EvSt6atomicNS_24SharedMutexPolicyDefaultEE6unlockEv(ptr noundef nonnull align 4 dereferenceable(4) %mutex_.i) to label %_ZNSt10lock_guardIN5folly15SharedMutexImplILb0EvSt6atomicNS0_24SharedMutexPolicyDefaultEEEED2Ev.exit4.i unwind label %terminate.lpad.i2.i terminate.lpad.i2.i: ; preds = %lpad.body.i - %30 = landingpad { ptr, i32 } + %28 = landingpad { ptr, i32 } catch ptr null - %31 = extractvalue { ptr, i32 } %30, 0 - call void @__clang_call_terminate(ptr %31) #27 + %29 = extractvalue { ptr, i32 } %28, 0 + call void @__clang_call_terminate(ptr %29) #27 unreachable _ZNSt10lock_guardIN5folly15SharedMutexImplILb0EvSt6atomicNS0_24SharedMutexPolicyDefaultEEEED2Ev.exit4.i: ; preds = %lpad.body.i @@ -1717,31 +1715,29 @@ lpad.i: ; preds = %entry cleanup call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %ref.tmp.i) #23 %4 = load i8, ptr %arrayidx.i.i.i.i.i, align 1 - %5 = and i8 %4, -64 - %cmp.i.i4 = icmp eq i8 %5, 0 + %cmp.i.i4 = icmp ult i8 %4, 64 br i1 %cmp.i.i4, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit12, label %if.end.i.i5 invoke.cont: ; preds = %entry call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %ref.tmp.i) #23 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ref.tmp.i) - %6 = load i8, ptr %arrayidx.i.i.i.i.i, align 1 - %7 = and i8 %6, -64 - %cmp.i.i = icmp eq i8 %7, 0 + %5 = load i8, ptr %arrayidx.i.i.i.i.i, align 1 + %cmp.i.i = icmp ult i8 %5, 64 br i1 %cmp.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %invoke.cont - %cmp.i.i.i1 = icmp eq i8 %7, -128 - %8 = load ptr, ptr %ref.tmp, align 8 + %cmp.i.i.i1 = icmp slt i8 %5, -64 + %6 = load ptr, ptr %ref.tmp, align 8 br i1 %cmp.i.i.i1, label %if.end.sink.split.i.i.i, label %if.else.i.i.i if.else.i.i.i: ; preds = %if.end.i.i - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %8, i64 -8 - %9 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i2 = icmp eq i64 %9, 1 + %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %6, i64 -8 + %7 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i2 = icmp eq i64 %7, 1 br i1 %cmp.i.i.i.i2, label %if.end.sink.split.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i.i.i: ; preds = %if.else.i.i.i, %if.end.i.i - %add.ptr.i.i.sink.i.i.i = phi ptr [ %8, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] + %add.ptr.i.i.sink.i.i.i = phi ptr [ %6, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i) #23 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -1749,18 +1745,18 @@ _ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.ex ret void if.end.i.i5: ; preds = %lpad.i - %cmp.i.i.i6 = icmp eq i8 %5, -128 - %10 = load ptr, ptr %ref.tmp, align 8 + %cmp.i.i.i6 = icmp slt i8 %4, -64 + %8 = load ptr, ptr %ref.tmp, align 8 br i1 %cmp.i.i.i6, label %if.end.sink.split.i.i.i10, label %if.else.i.i.i7 if.else.i.i.i7: ; preds = %if.end.i.i5 - %add.ptr.i.i.i.i.i8 = getelementptr inbounds i8, ptr %10, i64 -8 - %11 = atomicrmw sub ptr %add.ptr.i.i.i.i.i8, i64 1 acq_rel, align 8 - %cmp.i.i.i.i9 = icmp eq i64 %11, 1 + %add.ptr.i.i.i.i.i8 = getelementptr inbounds i8, ptr %8, i64 -8 + %9 = atomicrmw sub ptr %add.ptr.i.i.i.i.i8, i64 1 acq_rel, align 8 + %cmp.i.i.i.i9 = icmp eq i64 %9, 1 br i1 %cmp.i.i.i.i9, label %if.end.sink.split.i.i.i10, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit12 if.end.sink.split.i.i.i10: ; preds = %if.else.i.i.i7, %if.end.i.i5 - %add.ptr.i.i.sink.i.i.i11 = phi ptr [ %10, %if.end.i.i5 ], [ %add.ptr.i.i.i.i.i8, %if.else.i.i.i7 ] + %add.ptr.i.i.sink.i.i.i11 = phi ptr [ %8, %if.end.i.i5 ], [ %add.ptr.i.i.i.i.i8, %if.else.i.i.i7 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i11) #23 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit12 @@ -2883,52 +2879,50 @@ invoke.cont: ; preds = %sw.bb.i call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %this, ptr noundef nonnull align 8 dereferenceable(24) %t.i, i64 24, i1 false) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %t.i) %11 = load i8, ptr %arrayidx.i.i.i, align 1 - %12 = and i8 %11, -64 - %cmp.i14 = icmp eq i8 %12, 0 + %cmp.i14 = icmp ult i8 %11, 64 br i1 %cmp.i14, label %if.end21, label %if.end.i15 if.end.i15: ; preds = %invoke.cont - %cmp.i.i = icmp eq i8 %12, -128 - %13 = load ptr, ptr %nascent, align 8 + %cmp.i.i = icmp slt i8 %11, -64 + %12 = load ptr, ptr %nascent, align 8 br i1 %cmp.i.i, label %if.end.sink.split.i.i, label %if.else.i.i if.else.i.i: ; preds = %if.end.i15 - %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %13, i64 -8 - %14 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i = icmp eq i64 %14, 1 + %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %12, i64 -8 + %13 = atomicrmw sub ptr %add.ptr.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i = icmp eq i64 %13, 1 br i1 %cmp.i.i.i, label %if.end.sink.split.i.i, label %if.end21 if.end.sink.split.i.i: ; preds = %if.else.i.i, %if.end.i15 - %add.ptr.i.i.sink.i.i = phi ptr [ %13, %if.end.i15 ], [ %add.ptr.i.i.i.i, %if.else.i.i ] + %add.ptr.i.i.sink.i.i = phi ptr [ %12, %if.end.i15 ], [ %add.ptr.i.i.i.i, %if.else.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i) #23 br label %if.end21 lpad: ; preds = %sw.bb.i - %15 = landingpad { ptr, i32 } + %14 = landingpad { ptr, i32 } cleanup - %16 = load i8, ptr %arrayidx.i.i.i, align 1 - %17 = and i8 %16, -64 - %cmp.i17 = icmp eq i8 %17, 0 + %15 = load i8, ptr %arrayidx.i.i.i, align 1 + %cmp.i17 = icmp ult i8 %15, 64 br i1 %cmp.i17, label %_ZN5folly13fbstring_coreIcED2Ev.exit25, label %if.end.i18 if.end.i18: ; preds = %lpad - %cmp.i.i19 = icmp eq i8 %17, -128 - %18 = load ptr, ptr %nascent, align 8 + %cmp.i.i19 = icmp slt i8 %15, -64 + %16 = load ptr, ptr %nascent, align 8 br i1 %cmp.i.i19, label %if.end.sink.split.i.i23, label %if.else.i.i20 if.else.i.i20: ; preds = %if.end.i18 - %add.ptr.i.i.i.i21 = getelementptr inbounds i8, ptr %18, i64 -8 - %19 = atomicrmw sub ptr %add.ptr.i.i.i.i21, i64 1 acq_rel, align 8 - %cmp.i.i.i22 = icmp eq i64 %19, 1 + %add.ptr.i.i.i.i21 = getelementptr inbounds i8, ptr %16, i64 -8 + %17 = atomicrmw sub ptr %add.ptr.i.i.i.i21, i64 1 acq_rel, align 8 + %cmp.i.i.i22 = icmp eq i64 %17, 1 br i1 %cmp.i.i.i22, label %if.end.sink.split.i.i23, label %_ZN5folly13fbstring_coreIcED2Ev.exit25 if.end.sink.split.i.i23: ; preds = %if.else.i.i20, %if.end.i18 - %add.ptr.i.i.sink.i.i24 = phi ptr [ %18, %if.end.i18 ], [ %add.ptr.i.i.i.i21, %if.else.i.i20 ] + %add.ptr.i.i.sink.i.i24 = phi ptr [ %16, %if.end.i18 ], [ %add.ptr.i.i.i.i21, %if.else.i.i20 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i24) #23 br label %_ZN5folly13fbstring_coreIcED2Ev.exit25 _ZN5folly13fbstring_coreIcED2Ev.exit25: ; preds = %lpad, %if.else.i.i20, %if.end.sink.split.i.i23 - resume { ptr, i32 } %15 + resume { ptr, i32 } %14 if.end21: ; preds = %if.end.sink.split.i.i, %if.else.i.i, %invoke.cont, %entry, %_ZN5folly12smartReallocEPvmmm.exit ret void diff --git a/bench/velox/optimized/Type.cpp.ll b/bench/velox/optimized/Type.cpp.ll index 98044336b05..bf4d5c7f676 100644 --- a/bench/velox/optimized/Type.cpp.ll +++ b/bench/velox/optimized/Type.cpp.ll @@ -10680,23 +10680,22 @@ invoke.cont5: ; preds = %invoke.cont3 invoke.cont7: ; preds = %invoke.cont5 %6 = load i8, ptr %arrayidx.i.i.i.i.i, align 1 - %7 = and i8 %6, -64 - %cmp.i.i3 = icmp eq i8 %7, 0 + %cmp.i.i3 = icmp ult i8 %6, 64 br i1 %cmp.i.i3, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, label %if.end.i.i if.end.i.i: ; preds = %invoke.cont7 - %cmp.i.i.i4 = icmp eq i8 %7, -128 - %8 = load ptr, ptr %ref.tmp, align 8 + %cmp.i.i.i4 = icmp slt i8 %6, -64 + %7 = load ptr, ptr %ref.tmp, align 8 br i1 %cmp.i.i.i4, label %if.end.sink.split.i.i.i, label %if.else.i.i.i if.else.i.i.i: ; preds = %if.end.i.i - %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %8, i64 -8 - %9 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i.i5 = icmp eq i64 %9, 1 + %add.ptr.i.i.i.i.i = getelementptr inbounds i8, ptr %7, i64 -8 + %8 = atomicrmw sub ptr %add.ptr.i.i.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i.i5 = icmp eq i64 %8, 1 br i1 %cmp.i.i.i.i5, label %if.end.sink.split.i.i.i, label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit if.end.sink.split.i.i.i: ; preds = %if.else.i.i.i, %if.end.i.i - %add.ptr.i.i.sink.i.i.i = phi ptr [ %8, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] + %add.ptr.i.i.sink.i.i.i = phi ptr [ %7, %if.end.i.i ], [ %add.ptr.i.i.i.i.i, %if.else.i.i.i ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i) #39 br label %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit @@ -10709,36 +10708,35 @@ invoke.cont9: ; preds = %_ZN5folly14basic_fb ret void lpad: ; preds = %_ZN5folly14basic_fbstringIcSt11char_traitsIcESaIcENS_13fbstring_coreIcEEED2Ev.exit, %invoke.cont, %entry - %10 = landingpad { ptr, i32 } + %9 = landingpad { ptr, i32 } cleanup br label %ehcleanup lpad4: ; preds = %invoke.cont3, %invoke.cont5 - %11 = landingpad { ptr, i32 } + %10 = landingpad { ptr, i32 } cleanup - %12 = load i8, ptr %arrayidx.i.i.i.i.i, align 1 - %13 = and i8 %12, -64 - %cmp.i.i7 = icmp eq i8 %13, 0 + %11 = load i8, ptr %arrayidx.i.i.i.i.i, align 1 + %cmp.i.i7 = icmp ult i8 %11, 64 br i1 %cmp.i.i7, label %ehcleanup, label %if.end.i.i8 if.end.i.i8: ; preds = %lpad4 - %cmp.i.i.i9 = icmp eq i8 %13, -128 - %14 = load ptr, ptr %ref.tmp, align 8 + %cmp.i.i.i9 = icmp slt i8 %11, -64 + %12 = load ptr, ptr %ref.tmp, align 8 br i1 %cmp.i.i.i9, label %if.end.sink.split.i.i.i13, label %if.else.i.i.i10 if.else.i.i.i10: ; preds = %if.end.i.i8 - %add.ptr.i.i.i.i.i11 = getelementptr inbounds i8, ptr %14, i64 -8 - %15 = atomicrmw sub ptr %add.ptr.i.i.i.i.i11, i64 1 acq_rel, align 8 - %cmp.i.i.i.i12 = icmp eq i64 %15, 1 + %add.ptr.i.i.i.i.i11 = getelementptr inbounds i8, ptr %12, i64 -8 + %13 = atomicrmw sub ptr %add.ptr.i.i.i.i.i11, i64 1 acq_rel, align 8 + %cmp.i.i.i.i12 = icmp eq i64 %13, 1 br i1 %cmp.i.i.i.i12, label %if.end.sink.split.i.i.i13, label %ehcleanup if.end.sink.split.i.i.i13: ; preds = %if.else.i.i.i10, %if.end.i.i8 - %add.ptr.i.i.sink.i.i.i14 = phi ptr [ %14, %if.end.i.i8 ], [ %add.ptr.i.i.i.i.i11, %if.else.i.i.i10 ] + %add.ptr.i.i.sink.i.i.i14 = phi ptr [ %12, %if.end.i.i8 ], [ %add.ptr.i.i.i.i.i11, %if.else.i.i.i10 ] call void @free(ptr noundef %add.ptr.i.i.sink.i.i.i14) #39 br label %ehcleanup ehcleanup: ; preds = %if.end.sink.split.i.i.i13, %if.else.i.i.i10, %lpad4, %lpad - %.pn = phi { ptr, i32 } [ %10, %lpad ], [ %11, %lpad4 ], [ %11, %if.else.i.i.i10 ], [ %11, %if.end.sink.split.i.i.i13 ] + %.pn = phi { ptr, i32 } [ %9, %lpad ], [ %10, %lpad4 ], [ %10, %if.else.i.i.i10 ], [ %10, %if.end.sink.split.i.i.i13 ] call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %out) #39 resume { ptr, i32 } %.pn } diff --git a/bench/velox/optimized/Utf8Utils.cpp.ll b/bench/velox/optimized/Utf8Utils.cpp.ll index e45c330a10f..cb54b0eac9c 100644 --- a/bench/velox/optimized/Utf8Utils.cpp.ll +++ b/bench/velox/optimized/Utf8Utils.cpp.ll @@ -65,22 +65,21 @@ if.end18: ; preds = %if.end10 if.end21: ; preds = %if.end18 %arrayidx22 = getelementptr inbounds i8, ptr %input, i64 2 %2 = load i8, ptr %arrayidx22, align 1 - %3 = and i8 %2, -64 - %cmp25 = icmp eq i8 %3, -128 + %cmp25 = icmp slt i8 %2, -64 br i1 %cmp25, label %if.end27, label %return if.end27: ; preds = %if.end21 br i1 %cmp28, label %if.then29, label %if.end47 if.then29: ; preds = %if.end27 - %4 = and i8 %input.val, 15 - %and32 = zext nneg i8 %4 to i32 + %3 = and i8 %input.val, 15 + %and32 = zext nneg i8 %3 to i32 %shl33 = shl nuw nsw i32 %and32, 12 %and35 = shl nsw i32 %conv, 6 %shl36 = and i32 %and35, 4032 %or37 = or disjoint i32 %shl36, %shl33 %cmp41 = icmp ugt i32 %or37, 55295 - %cmp42 = icmp ult i8 %4, 14 + %cmp42 = icmp ult i8 %3, 14 %or.cond = and i1 %cmp42, %cmp41 br i1 %or.cond, label %return, label %if.end44 @@ -95,23 +94,22 @@ if.end47: ; preds = %if.end27 if.end50: ; preds = %if.end47 %arrayidx51 = getelementptr inbounds i8, ptr %input, i64 3 - %5 = load i8, ptr %arrayidx51, align 1 - %6 = and i8 %5, -64 - %cmp54 = icmp eq i8 %6, -128 + %4 = load i8, ptr %arrayidx51, align 1 + %cmp54 = icmp slt i8 %4, -64 br i1 %cmp54, label %if.end56, label %return if.end56: ; preds = %if.end50 br i1 %cmp57, label %if.then58, label %if.end79 if.then58: ; preds = %if.end56 - %7 = and i8 %input.val, 7 - %and61 = zext nneg i8 %7 to i32 + %5 = and i8 %input.val, 7 + %and61 = zext nneg i8 %5 to i32 %shl62 = shl nuw nsw i32 %and61, 18 %and64 = shl nsw i32 %conv, 12 %shl65 = and i32 %and64, 196608 %or66 = add nsw i32 %shl62, -65536 - %8 = add nsw i32 %or66, %shl65 - %or.cond1 = icmp ult i32 %8, 1048576 + %6 = add nsw i32 %or66, %shl65 + %or.cond1 = icmp ult i32 %6, 1048576 %. = select i1 %or.cond1, i32 4, i32 -4 br label %return @@ -121,9 +119,8 @@ if.end79: ; preds = %if.end56 if.end82: ; preds = %if.end79 %arrayidx83 = getelementptr inbounds i8, ptr %input, i64 4 - %9 = load i8, ptr %arrayidx83, align 1 - %10 = and i8 %9, -64 - %cmp86 = icmp eq i8 %10, -128 + %7 = load i8, ptr %arrayidx83, align 1 + %cmp86 = icmp slt i8 %7, -64 br i1 %cmp86, label %if.end88, label %return if.end88: ; preds = %if.end82 @@ -133,9 +130,8 @@ if.end88: ; preds = %if.end82 if.end94: ; preds = %if.end88 %arrayidx95 = getelementptr inbounds i8, ptr %input, i64 5 - %11 = load i8, ptr %arrayidx95, align 1 - %12 = and i8 %11, -64 - %cmp98 = icmp eq i8 %12, -128 + %8 = load i8, ptr %arrayidx95, align 1 + %cmp98 = icmp slt i8 %8, -64 %spec.select = select i1 %cmp98, i32 -6, i32 -5 br label %return diff --git a/bench/wireshark/optimized/packet-bgp.c.ll b/bench/wireshark/optimized/packet-bgp.c.ll index 9448034d34d..61c10ef812d 100644 --- a/bench/wireshark/optimized/packet-bgp.c.ll +++ b/bench/wireshark/optimized/packet-bgp.c.ll @@ -10976,8 +10976,7 @@ save_afi_safi_data.exit.i: ; preds = %255, %240 %291 = load i32, ptr @hf_bgp_route_refresh_orf_entry_action, align 4 %292 = call ptr @proto_tree_add_item(ptr noundef %290, i32 noundef %291, ptr noundef %0, i32 noundef %.191.i, i32 noundef 1, i32 noundef 0) #4 %293 = call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef %.191.i) #4 - %.mask.i = and i8 %293, -64 - %294 = icmp eq i8 %.mask.i, -128 + %294 = icmp slt i8 %293, -64 br i1 %294, label %295, label %298 295: ; preds = %.lr.ph.i72 @@ -11076,7 +11075,7 @@ define internal fastcc range(i32 0, 256) i32 @decode_mp_next_hop_ipv6(ptr nounde %6 = alloca %struct.e_in6_addr, align 1 %7 = alloca [46 x i8], align 16 %trunc = trunc nuw i32 %4 to i8 - switch i8 %trunc, label %30 [ + switch i8 %trunc, label %28 [ i8 16, label %8 i8 32, label %14 ] @@ -11088,7 +11087,7 @@ define internal fastcc range(i32 0, 256) i32 @decode_mp_next_hop_ipv6(ptr nounde %12 = load ptr, ptr %11, align 8 %13 = tail call ptr @tvb_address_to_str(ptr noundef %12, ptr noundef %0, i32 noundef 3, i32 noundef 1) #4 tail call void @wmem_strbuf_append(ptr noundef %3, ptr noundef %13) #4 - br label %30 + br label %28 14: ; preds = %5 %15 = load i32, ptr @hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv6, align 4 @@ -11104,22 +11103,21 @@ define internal fastcc range(i32 0, 256) i32 @decode_mp_next_hop_ipv6(ptr nounde %22 = getelementptr inbounds i8, ptr %6, i64 1 %.val25 = load i8, ptr %22, align 1 %23 = icmp eq i8 %.val, -2 - %24 = and i8 %.val25, -64 - %25 = icmp eq i8 %24, -128 - %26 = select i1 %23, i1 %25, i1 false - br i1 %26, label %29, label %27 + %24 = icmp slt i8 %.val25, -64 + %spec.select.i = select i1 %23, i1 %24, i1 false + br i1 %spec.select.i, label %27, label %25 -27: ; preds = %14 - %28 = call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %2, ptr noundef %21, ptr noundef nonnull @ei_bgp_next_hop_ipv6_scope, ptr noundef nonnull @.str.1771) #4 - br label %29 +25: ; preds = %14 + %26 = call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %2, ptr noundef %21, ptr noundef nonnull @ei_bgp_next_hop_ipv6_scope, ptr noundef nonnull @.str.1771) #4 + br label %27 -29: ; preds = %27, %14 +27: ; preds = %25, %14 call void @ip6_to_str_buf(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 46) #4 call void (ptr, ptr, ...) @wmem_strbuf_append_printf(ptr noundef %3, ptr noundef nonnull @.str.1772, ptr noundef nonnull %7) #4 - br label %30 + br label %28 -30: ; preds = %8, %29, %5 - %.0 = phi i32 [ 0, %5 ], [ %4, %29 ], [ %4, %8 ] +28: ; preds = %8, %27, %5 + %.0 = phi i32 [ 0, %5 ], [ %4, %27 ], [ %4, %8 ] ret i32 %.0 } @@ -11165,7 +11163,7 @@ define internal fastcc range(i32 0, 256) i32 @decode_mp_next_hop_vpn_ipv6(ptr no %8 = alloca [46 x i8], align 16 store i64 0, ptr %6, align 8 %trunc = trunc nuw i32 %4 to i8 - switch i8 %trunc, label %55 [ + switch i8 %trunc, label %53 [ i8 24, label %9 i8 48, label %23 ] @@ -11191,7 +11189,7 @@ define internal fastcc range(i32 0, 256) i32 @decode_mp_next_hop_vpn_ipv6(ptr no %21 = load ptr, ptr %10, align 8 %22 = call ptr @tvb_address_to_str(ptr noundef %21, ptr noundef %0, i32 noundef 3, i32 noundef 9) #4 call void (ptr, ptr, ...) @wmem_strbuf_append_printf(ptr noundef %3, ptr noundef nonnull @.str.1775, ptr noundef %22) #4 - br label %55 + br label %53 23: ; preds = %5 %24 = getelementptr inbounds i8, ptr %2, i64 408 @@ -11235,22 +11233,21 @@ define internal fastcc range(i32 0, 256) i32 @decode_mp_next_hop_vpn_ipv6(ptr no %47 = getelementptr inbounds i8, ptr %7, i64 1 %.val69 = load i8, ptr %47, align 1 %48 = icmp eq i8 %.val, -2 - %49 = and i8 %.val69, -64 - %50 = icmp eq i8 %49, -128 - %51 = select i1 %48, i1 %50, i1 false - br i1 %51, label %54, label %52 + %49 = icmp slt i8 %.val69, -64 + %spec.select.i = select i1 %48, i1 %49, i1 false + br i1 %spec.select.i, label %52, label %50 -52: ; preds = %44 - %53 = call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %2, ptr noundef %46, ptr noundef nonnull @ei_bgp_next_hop_ipv6_scope, ptr noundef nonnull @.str.1771) #4 - br label %54 +50: ; preds = %44 + %51 = call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %2, ptr noundef %46, ptr noundef nonnull @ei_bgp_next_hop_ipv6_scope, ptr noundef nonnull @.str.1771) #4 + br label %52 -54: ; preds = %52, %44 +52: ; preds = %50, %44 call void @ip6_to_str_buf(ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef 46) #4 call void (ptr, ptr, ...) @wmem_strbuf_append_printf(ptr noundef %3, ptr noundef nonnull @.str.1772, ptr noundef nonnull %8) #4 - br label %55 + br label %53 -55: ; preds = %18, %54, %5 - %.0 = phi i32 [ 0, %5 ], [ %4, %54 ], [ %4, %18 ] +53: ; preds = %18, %52, %5 + %.0 = phi i32 [ 0, %5 ], [ %4, %52 ], [ %4, %18 ] ret i32 %.0 } diff --git a/bench/wireshark/optimized/packet-rohc.c.ll b/bench/wireshark/optimized/packet-rohc.c.ll index 756738402a2..b317ed61144 100644 --- a/bench/wireshark/optimized/packet-rohc.c.ll +++ b/bench/wireshark/optimized/packet-rohc.c.ll @@ -2264,48 +2264,47 @@ define internal fastcc void @get_self_describing_var_len_val(ptr noundef %0, ptr %10 = load i32, ptr @hf_rohc_var_len, align 4 %11 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %10, ptr noundef %0, i32 noundef %6, i32 noundef 1, i32 noundef 0) #7 %12 = or disjoint i32 %6, 1 - br label %32 + br label %31 13: ; preds = %5 - %14 = and i8 %7, -64 - %15 = icmp eq i8 %14, -128 - br i1 %15, label %16, label %21 + %14 = icmp slt i8 %7, -64 + br i1 %14, label %15, label %20 -16: ; preds = %13 +15: ; preds = %13 store i8 2, ptr %4, align 1 - %17 = load i32, ptr @hf_rohc_var_len, align 4 - %18 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %17, ptr noundef %0, i32 noundef %6, i32 noundef 2, i32 noundef 0) #7 - %19 = or disjoint i32 %6, 2 - %20 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef %2) #7 - br label %32 + %16 = load i32, ptr @hf_rohc_var_len, align 4 + %17 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %16, ptr noundef %0, i32 noundef %6, i32 noundef 2, i32 noundef 0) #7 + %18 = or disjoint i32 %6, 2 + %19 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef %2) #7 + br label %31 -21: ; preds = %13 +20: ; preds = %13 %trunc = and i8 %7, -32 - switch i8 %trunc, label %32 [ - i8 -64, label %22 - i8 -32, label %27 + switch i8 %trunc, label %31 [ + i8 -64, label %21 + i8 -32, label %26 ] -22: ; preds = %21 +21: ; preds = %20 store i8 3, ptr %4, align 1 - %23 = load i32, ptr @hf_rohc_var_len, align 4 - %24 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %23, ptr noundef %0, i32 noundef %6, i32 noundef 3, i32 noundef 0) #7 - %25 = or disjoint i32 %6, 3 - %26 = tail call i32 @tvb_get_ntoh24(ptr noundef %0, i32 noundef %2) #7 - br label %32 + %22 = load i32, ptr @hf_rohc_var_len, align 4 + %23 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %22, ptr noundef %0, i32 noundef %6, i32 noundef 3, i32 noundef 0) #7 + %24 = or disjoint i32 %6, 3 + %25 = tail call i32 @tvb_get_ntoh24(ptr noundef %0, i32 noundef %2) #7 + br label %31 -27: ; preds = %21 +26: ; preds = %20 store i8 4, ptr %4, align 1 - %28 = load i32, ptr @hf_rohc_var_len, align 4 - %29 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %28, ptr noundef %0, i32 noundef %6, i32 noundef 3, i32 noundef 0) #7 - %30 = or disjoint i32 %6, 3 - %31 = tail call i32 @tvb_get_ntohl(ptr noundef %0, i32 noundef %2) #7 - br label %32 - -32: ; preds = %21, %16, %27, %22, %9 - %.039 = phi i32 [ 7, %9 ], [ 14, %16 ], [ 21, %22 ], [ 29, %27 ], [ 0, %21 ] - %.0 = phi i32 [ %12, %9 ], [ %19, %16 ], [ %25, %22 ], [ %30, %27 ], [ %6, %21 ] - %33 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %3, ptr noundef %0, i32 noundef %.0, i32 noundef %.039, i32 noundef 0) #7 + %27 = load i32, ptr @hf_rohc_var_len, align 4 + %28 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %27, ptr noundef %0, i32 noundef %6, i32 noundef 3, i32 noundef 0) #7 + %29 = or disjoint i32 %6, 3 + %30 = tail call i32 @tvb_get_ntohl(ptr noundef %0, i32 noundef %2) #7 + br label %31 + +31: ; preds = %20, %15, %26, %21, %9 + %.039 = phi i32 [ 7, %9 ], [ 14, %15 ], [ 21, %21 ], [ 29, %26 ], [ 0, %20 ] + %.0 = phi i32 [ %12, %9 ], [ %18, %15 ], [ %24, %21 ], [ %29, %26 ], [ %6, %20 ] + %32 = tail call ptr @proto_tree_add_bits_item(ptr noundef %1, i32 noundef %3, ptr noundef %0, i32 noundef %.0, i32 noundef %.039, i32 noundef 0) #7 ret void } diff --git a/bench/yaml-cpp/optimized/emitterutils.cpp.ll b/bench/yaml-cpp/optimized/emitterutils.cpp.ll index b7a2462e5f8..08e79955325 100644 --- a/bench/yaml-cpp/optimized/emitterutils.cpp.ll +++ b/bench/yaml-cpp/optimized/emitterutils.cpp.ll @@ -1058,28 +1058,27 @@ for.body.i: ; preds = %if.end20.i, %if.end lor.lhs.false.i: ; preds = %for.body.i %5 = load i8, ptr %i.sroa.0.1, align 1 - %6 = and i8 %5, -64 - %cmp.i35.i = icmp eq i8 %6, -128 + %cmp.i35.i = icmp slt i8 %5, -64 br i1 %cmp.i35.i, label %if.end20.i, label %if.else if.end20.i: ; preds = %lor.lhs.false.i %shl21.i = shl i32 %codePoint.1, 6 - %7 = and i8 %5, 63 - %and24.i = zext nneg i8 %7 to i32 + %6 = and i8 %5, 63 + %and24.i = zext nneg i8 %6 to i32 %or.i = or disjoint i32 %shl21.i, %and24.i %cmp15.i = icmp ugt i32 %nBytes.058.in.i, 2 br i1 %cmp15.i, label %for.body.i, label %for.end.i, !llvm.loop !9 for.end.i: ; preds = %if.end20.i %cmp27.i = icmp sgt i32 %or.i, 1114111 - %8 = and i32 %codePoint.1, 67108832 - %or.cond.i = icmp eq i32 %8, 864 + %7 = and i32 %codePoint.1, 67108832 + %or.cond.i = icmp eq i32 %7, 864 %or.cond59.i = or i1 %or.cond.i, %cmp27.i %and33.i = and i32 %or.i, 65534 %cmp34.i = icmp eq i32 %and33.i, 65534 %or.cond60.i = or i1 %or.cond59.i, %cmp34.i - %9 = add i32 %or.i, -64976 - %or.cond31.i = icmp ult i32 %9, 32 + %8 = add i32 %or.i, -64976 + %or.cond31.i = icmp ult i32 %8, 32 %or.cond61.i = or i1 %or.cond31.i, %or.cond60.i br i1 %or.cond61.i, label %if.else, label %for.body @@ -1309,28 +1308,27 @@ for.body.i: ; preds = %if.end20.i, %if.end lor.lhs.false.i: ; preds = %for.body.i %5 = load i8, ptr %i.sroa.0.1, align 1 - %6 = and i8 %5, -64 - %cmp.i35.i = icmp eq i8 %6, -128 + %cmp.i35.i = icmp slt i8 %5, -64 br i1 %cmp.i35.i, label %if.end20.i, label %if.else23 if.end20.i: ; preds = %lor.lhs.false.i %shl21.i = shl i32 %codePoint.1, 6 - %7 = and i8 %5, 63 - %and24.i = zext nneg i8 %7 to i32 + %6 = and i8 %5, 63 + %and24.i = zext nneg i8 %6 to i32 %or.i = or disjoint i32 %shl21.i, %and24.i %cmp15.i = icmp ugt i32 %nBytes.058.in.i, 2 br i1 %cmp15.i, label %for.body.i, label %for.end.i, !llvm.loop !9 for.end.i: ; preds = %if.end20.i %cmp27.i = icmp sgt i32 %or.i, 1114111 - %8 = and i32 %codePoint.1, 67108832 - %or.cond.i = icmp eq i32 %8, 864 + %7 = and i32 %codePoint.1, 67108832 + %or.cond.i = icmp eq i32 %7, 864 %or.cond59.i = or i1 %or.cond.i, %cmp27.i %and33.i = and i32 %or.i, 65534 %cmp34.i = icmp eq i32 %and33.i, 65534 %or.cond60.i = or i1 %or.cond59.i, %cmp34.i - %9 = add i32 %or.i, -64976 - %or.cond31.i = icmp ult i32 %9, 32 + %8 = add i32 %or.i, -64976 + %or.cond31.i = icmp ult i32 %8, 32 %or.cond61.i = or i1 %or.cond31.i, %or.cond60.i br i1 %or.cond61.i, label %if.else23, label %for.body @@ -1377,8 +1375,8 @@ sw.bb17: ; preds = %for.body sw.default: ; preds = %for.body %cmp = icmp slt i32 %codePoint.243, 32 - %10 = add nsw i32 %codePoint.243, -128 - %or.cond = icmp ult i32 %10, 33 + %9 = add nsw i32 %codePoint.243, -128 + %or.cond = icmp ult i32 %9, 33 %or.cond18 = select i1 %cmp, i1 true, i1 %or.cond br i1 %or.cond18, label %if.then, label %if.else @@ -1407,9 +1405,9 @@ for.body.i19: ; preds = %for.body.i19, %if.t %and.i21 = and i32 %shr.i, 15 %idxprom.i = zext nneg i32 %and.i21 to i64 %arrayidx.i = getelementptr inbounds [17 x i8], ptr @_ZZN4YAML5Utils12_GLOBAL__N_130WriteDoubleQuoteEscapeSequenceERNS_15ostream_wrapperEiNS_14StringEscaping5valueEE9hexDigits, i64 0, i64 %idxprom.i - %11 = load i8, ptr %arrayidx.i, align 1 + %10 = load i8, ptr %arrayidx.i, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %ch.addr.i.i) - store i8 %11, ptr %ch.addr.i.i, align 1 + store i8 %10, ptr %ch.addr.i.i, align 1 call void @_ZN4YAML15ostream_wrapper5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(57) %out, ptr noundef nonnull %ch.addr.i.i, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch.addr.i.i) %dec.i = add nsw i32 %digits.128.i, -1 @@ -1442,9 +1440,9 @@ for.body.i25: ; preds = %for.body.i25, %if.t %and.i30 = and i32 %shr.i29, 15 %idxprom.i31 = zext nneg i32 %and.i30 to i64 %arrayidx.i32 = getelementptr inbounds [17 x i8], ptr @_ZZN4YAML5Utils12_GLOBAL__N_130WriteDoubleQuoteEscapeSequenceERNS_15ostream_wrapperEiNS_14StringEscaping5valueEE9hexDigits, i64 0, i64 %idxprom.i31 - %12 = load i8, ptr %arrayidx.i32, align 1 + %11 = load i8, ptr %arrayidx.i32, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %ch.addr.i.i24) - store i8 %12, ptr %ch.addr.i.i24, align 1 + store i8 %11, ptr %ch.addr.i.i24, align 1 call void @_ZN4YAML15ostream_wrapper5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(57) %out, ptr noundef nonnull %ch.addr.i.i24, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch.addr.i.i24) %dec.i33 = add nsw i32 %digits.128.i26, -1 @@ -1598,28 +1596,27 @@ for.body.i: ; preds = %if.end20.i, %if.end lor.lhs.false.i: ; preds = %for.body.i %5 = load i8, ptr %i.sroa.0.1, align 1 - %6 = and i8 %5, -64 - %cmp.i35.i = icmp eq i8 %6, -128 + %cmp.i35.i = icmp slt i8 %5, -64 br i1 %cmp.i35.i, label %if.end20.i, label %if.else if.end20.i: ; preds = %lor.lhs.false.i %shl21.i = shl i32 %codePoint.1, 6 - %7 = and i8 %5, 63 - %and24.i = zext nneg i8 %7 to i32 + %6 = and i8 %5, 63 + %and24.i = zext nneg i8 %6 to i32 %or.i = or disjoint i32 %shl21.i, %and24.i %cmp15.i = icmp ugt i32 %nBytes.058.in.i, 2 br i1 %cmp15.i, label %for.body.i, label %for.end.i, !llvm.loop !9 for.end.i: ; preds = %if.end20.i %cmp27.i = icmp sgt i32 %or.i, 1114111 - %8 = and i32 %codePoint.1, 67108832 - %or.cond.i = icmp eq i32 %8, 864 + %7 = and i32 %codePoint.1, 67108832 + %or.cond.i = icmp eq i32 %7, 864 %or.cond59.i = or i1 %or.cond.i, %cmp27.i %and33.i = and i32 %or.i, 65534 %cmp34.i = icmp eq i32 %and33.i, 65534 %or.cond60.i = or i1 %or.cond59.i, %cmp34.i - %9 = add i32 %or.i, -64976 - %or.cond31.i = icmp ult i32 %9, 32 + %8 = add i32 %or.i, -64976 + %or.cond31.i = icmp ult i32 %8, 32 %or.cond61.i = or i1 %or.cond31.i, %or.cond60.i br i1 %or.cond61.i, label %if.else, label %for.body @@ -1636,8 +1633,8 @@ if.then: ; preds = %for.body if.else: ; preds = %lor.lhs.false.i, %for.body.i, %for.end.i, %for.body.thread, %for.body %i.sroa.0.31222 = phi ptr [ %incdec.ptr.i.i, %for.body.thread ], [ %i.sroa.0.312, %for.body ], [ %scevgep34, %for.end.i ], [ %scevgep, %for.body.i ], [ %i.sroa.0.1, %lor.lhs.false.i ] %codePoint.21320 = phi i32 [ 65533, %for.body.thread ], [ %codePoint.213, %for.body ], [ 65533, %for.end.i ], [ 65533, %for.body.i ], [ 65533, %lor.lhs.false.i ] - %10 = load i64, ptr %m_col.i.i, align 8 - %cmp3.i = icmp ult i64 %10, %indent + %9 = load i64, ptr %m_col.i.i, align 8 + %cmp3.i = icmp ult i64 %9, %indent br i1 %cmp3.i, label %while.body.i, label %_ZN4YAMLlsERNS_15ostream_wrapperERKNS_8IndentToE.exit while.body.i: ; preds = %if.else, %while.body.i @@ -1645,8 +1642,8 @@ while.body.i: ; preds = %if.else, %while.bod store i8 32, ptr %ch.addr.i.i, align 1 call void @_ZN4YAML15ostream_wrapper5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(57) %out, ptr noundef nonnull %ch.addr.i.i, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch.addr.i.i) - %11 = load i64, ptr %m_col.i.i, align 8 - %cmp.i = icmp ult i64 %11, %indent + %10 = load i64, ptr %m_col.i.i, align 8 + %cmp.i = icmp ult i64 %10, %indent br i1 %cmp.i, label %while.body.i, label %_ZN4YAMLlsERNS_15ostream_wrapperERKNS_8IndentToE.exit, !llvm.loop !13 _ZN4YAMLlsERNS_15ostream_wrapperERKNS_8IndentToE.exit: ; preds = %while.body.i, %if.else @@ -1836,28 +1833,27 @@ for.body.i8: ; preds = %if.end20.i, %if.end lor.lhs.false.i: ; preds = %for.body.i8 %6 = load i8, ptr %i.sroa.0.1, align 1 - %7 = and i8 %6, -64 - %cmp.i35.i = icmp eq i8 %7, -128 + %cmp.i35.i = icmp slt i8 %6, -64 br i1 %cmp.i35.i, label %if.end20.i, label %if.else if.end20.i: ; preds = %lor.lhs.false.i %shl21.i = shl i32 %codePoint.1, 6 - %8 = and i8 %6, 63 - %and24.i = zext nneg i8 %8 to i32 + %7 = and i8 %6, 63 + %and24.i = zext nneg i8 %7 to i32 %or.i = or disjoint i32 %shl21.i, %and24.i %cmp15.i = icmp ugt i32 %nBytes.058.in.i, 2 br i1 %cmp15.i, label %for.body.i8, label %for.end.i, !llvm.loop !9 for.end.i: ; preds = %if.end20.i %cmp27.i = icmp sgt i32 %or.i, 1114111 - %9 = and i32 %codePoint.1, 67108832 - %or.cond.i = icmp eq i32 %9, 864 + %8 = and i32 %codePoint.1, 67108832 + %or.cond.i = icmp eq i32 %8, 864 %or.cond59.i = or i1 %or.cond.i, %cmp27.i %and33.i = and i32 %or.i, 65534 %cmp34.i = icmp eq i32 %and33.i, 65534 %or.cond60.i = or i1 %or.cond59.i, %cmp34.i - %10 = add i32 %or.i, -64976 - %or.cond31.i = icmp ult i32 %10, 32 + %9 = add i32 %or.i, -64976 + %or.cond31.i = icmp ult i32 %9, 32 %or.cond61.i = or i1 %or.cond31.i, %or.cond60.i br i1 %or.cond61.i, label %if.else, label %for.body @@ -1869,8 +1865,8 @@ for.body: ; preds = %for.end.i, %if.then if.then: ; preds = %for.body call void @_ZN4YAML15ostream_wrapper5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(57) %out, ptr noundef nonnull @.str.11, i64 noundef 1) - %11 = load i64, ptr %m_col.i, align 8 - %cmp3.i = icmp ult i64 %11, %0 + %10 = load i64, ptr %m_col.i, align 8 + %cmp3.i = icmp ult i64 %10, %0 br i1 %cmp3.i, label %while.body.i, label %_ZN4YAMLlsERNS_15ostream_wrapperERKNS_8IndentToE.exit while.body.i: ; preds = %if.then, %while.body.i @@ -1878,8 +1874,8 @@ while.body.i: ; preds = %if.then, %while.bod store i8 32, ptr %ch.addr.i.i9, align 1 call void @_ZN4YAML15ostream_wrapper5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(57) %out, ptr noundef nonnull %ch.addr.i.i9, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch.addr.i.i9) - %12 = load i64, ptr %m_col.i, align 8 - %cmp.i10 = icmp ult i64 %12, %0 + %11 = load i64, ptr %m_col.i, align 8 + %cmp.i10 = icmp ult i64 %11, %0 br i1 %cmp.i10, label %while.body.i, label %_ZN4YAMLlsERNS_15ostream_wrapperERKNS_8IndentToE.exit, !llvm.loop !13 _ZN4YAMLlsERNS_15ostream_wrapperERKNS_8IndentToE.exit: ; preds = %while.body.i, %if.then @@ -1995,28 +1991,27 @@ for.body.i: ; preds = %if.end20.i, %if.end lor.lhs.false.i: ; preds = %for.body.i %5 = load i8, ptr %i.sroa.0.1, align 1 - %6 = and i8 %5, -64 - %cmp.i35.i = icmp eq i8 %6, -128 + %cmp.i35.i = icmp slt i8 %5, -64 br i1 %cmp.i35.i, label %if.end20.i, label %_ZN4YAML5Utils12_GLOBAL__N_112IsAnchorCharEi.exit if.end20.i: ; preds = %lor.lhs.false.i %shl21.i = shl i32 %codePoint.1, 6 - %7 = and i8 %5, 63 - %and24.i = zext nneg i8 %7 to i32 + %6 = and i8 %5, 63 + %and24.i = zext nneg i8 %6 to i32 %or.i = or disjoint i32 %shl21.i, %and24.i %cmp15.i = icmp ugt i32 %nBytes.058.in.i, 2 br i1 %cmp15.i, label %for.body.i, label %for.end.i, !llvm.loop !9 for.end.i: ; preds = %if.end20.i %cmp27.i = icmp sgt i32 %or.i, 1114111 - %8 = and i32 %codePoint.1, 67108832 - %or.cond.i = icmp eq i32 %8, 864 + %7 = and i32 %codePoint.1, 67108832 + %or.cond.i = icmp eq i32 %7, 864 %or.cond59.i = or i1 %or.cond.i, %cmp27.i %and33.i = and i32 %or.i, 65534 %cmp34.i = icmp eq i32 %and33.i, 65534 %or.cond60.i = or i1 %or.cond59.i, %cmp34.i - %9 = add i32 %or.i, -64976 - %or.cond31.i = icmp ult i32 %9, 32 + %8 = add i32 %or.i, -64976 + %or.cond31.i = icmp ult i32 %8, 32 %or.cond61.i = or i1 %or.cond31.i, %or.cond60.i br i1 %or.cond61.i, label %_ZN4YAML5Utils12_GLOBAL__N_112IsAnchorCharEi.exit, label %for.body @@ -2049,14 +2044,14 @@ _ZN4YAML5Utils12_GLOBAL__N_112IsAnchorCharEi.exit: ; preds = %lor.lhs.false.i, % %codePoint.211253137 = phi i32 [ 65533, %if.end.i2.thread ], [ %codePoint.211, %if.end.i2 ], [ 65533, %for.end.i ], [ 65533, %for.body.i ], [ 65533, %lor.lhs.false.i ] %i.sroa.0.312243236 = phi ptr [ %incdec.ptr.i.i, %if.end.i2.thread ], [ %i.sroa.0.312, %if.end.i2 ], [ %scevgep71, %for.end.i ], [ %i.sroa.0.1, %lor.lhs.false.i ], [ %scevgep, %for.body.i ] %cmp5.i = icmp ugt i32 %codePoint.211253137, 159 - %10 = and i32 %codePoint.211253137, 2147481600 - %or.cond.i3 = icmp ne i32 %10, 55296 + %9 = and i32 %codePoint.211253137, 2147481600 + %or.cond.i3 = icmp ne i32 %9, 55296 %or.cond11.not15.i = and i1 %cmp5.i, %or.cond.i3 %and.i4 = and i32 %codePoint.211253137, 65534 %cmp12.i = icmp ne i32 %and.i4, 65534 %or.cond12.not14.i = and i1 %cmp12.i, %or.cond11.not15.i - %11 = add nsw i32 %codePoint.211253137, -65008 - %or.cond1.i = icmp ult i32 %11, -32 + %10 = add nsw i32 %codePoint.211253137, -65008 + %or.cond1.i = icmp ult i32 %10, -32 %or.cond13.not.i = select i1 %or.cond12.not14.i, i1 %or.cond1.i, i1 false br i1 %or.cond13.not.i, label %if.end, label %return diff --git a/bench/yyjson/optimized/yyjson.c.ll b/bench/yyjson/optimized/yyjson.c.ll index 783aa01dc7a..7aab64a788e 100644 --- a/bench/yyjson/optimized/yyjson.c.ll +++ b/bench/yyjson/optimized/yyjson.c.ll @@ -29118,10 +29118,10 @@ if.then17.i: ; preds = %if.end.i8302 br i1 %or.cond.i, label %for.body.i272.i, label %lor.lhs.false25.critedge.i for.body.i272.i: ; preds = %if.then17.i, %if.end15.i276.i - %cur.addr.i256.0175.i = phi ptr [ %incdec.ptr.i277.i, %if.end15.i276.i ], [ %spec.select.i, %if.then17.i ] - %str.addr.i258.0174.i = phi ptr [ %incdec.ptr16.i278.i, %if.end15.i276.i ], [ @.str.75, %if.then17.i ] - %2203 = load i8, ptr %cur.addr.i256.0175.i, align 1 - %2204 = load i8, ptr %str.addr.i258.0174.i, align 1 + %cur.addr.i256.0178.i = phi ptr [ %incdec.ptr.i277.i, %if.end15.i276.i ], [ %spec.select.i, %if.then17.i ] + %str.addr.i258.0177.i = phi ptr [ %incdec.ptr16.i278.i, %if.end15.i276.i ], [ @.str.75, %if.then17.i ] + %2203 = load i8, ptr %cur.addr.i256.0178.i, align 1 + %2204 = load i8, ptr %str.addr.i258.0177.i, align 1 %cmp8.i275.not.i = icmp eq i8 %2203, %2204 %conv7.i274.i = zext i8 %2204 to i32 %conv.i273.i = zext i8 %2203 to i32 @@ -29131,8 +29131,8 @@ for.body.i272.i: ; preds = %if.then17.i, %if.en br i1 %or.cond144.i, label %if.end15.i276.i, label %lor.lhs.false25.critedge.i if.end15.i276.i: ; preds = %for.body.i272.i - %incdec.ptr.i277.i = getelementptr inbounds i8, ptr %cur.addr.i256.0175.i, i64 1 - %incdec.ptr16.i278.i = getelementptr inbounds i8, ptr %str.addr.i258.0174.i, i64 1 + %incdec.ptr.i277.i = getelementptr inbounds i8, ptr %cur.addr.i256.0178.i, i64 1 + %incdec.ptr16.i278.i = getelementptr inbounds i8, ptr %str.addr.i258.0177.i, i64 1 %cmp6.i270.i = icmp ult ptr %incdec.ptr.i277.i, %end.0 br i1 %cmp6.i270.i, label %for.body.i272.i, label %.loopexit, !llvm.loop !86 @@ -29143,10 +29143,10 @@ lor.lhs.false25.critedge.i: ; preds = %for.body.i272.i, %i br i1 %or.cond145.i, label %for.body.i233.i, label %if.end31.i for.body.i233.i: ; preds = %lor.lhs.false25.critedge.i, %if.end15.i237.i - %cur.addr.i217.0177.i = phi ptr [ %incdec.ptr.i238.i, %if.end15.i237.i ], [ %spec.select.i, %lor.lhs.false25.critedge.i ] - %str.addr.i219.0176.i = phi ptr [ %incdec.ptr16.i239.i, %if.end15.i237.i ], [ @.str.76, %lor.lhs.false25.critedge.i ] - %2205 = load i8, ptr %cur.addr.i217.0177.i, align 1 - %2206 = load i8, ptr %str.addr.i219.0176.i, align 1 + %cur.addr.i217.0180.i = phi ptr [ %incdec.ptr.i238.i, %if.end15.i237.i ], [ %spec.select.i, %lor.lhs.false25.critedge.i ] + %str.addr.i219.0179.i = phi ptr [ %incdec.ptr16.i239.i, %if.end15.i237.i ], [ @.str.76, %lor.lhs.false25.critedge.i ] + %2205 = load i8, ptr %cur.addr.i217.0180.i, align 1 + %2206 = load i8, ptr %str.addr.i219.0179.i, align 1 %cmp8.i236.not.i = icmp eq i8 %2205, %2206 %conv7.i235.i = zext i8 %2206 to i32 %conv.i234.i = zext i8 %2205 to i32 @@ -29156,8 +29156,8 @@ for.body.i233.i: ; preds = %lor.lhs.false25.cri br i1 %or.cond146.i, label %if.end15.i237.i, label %if.end31.i if.end15.i237.i: ; preds = %for.body.i233.i - %incdec.ptr.i238.i = getelementptr inbounds i8, ptr %cur.addr.i217.0177.i, i64 1 - %incdec.ptr16.i239.i = getelementptr inbounds i8, ptr %str.addr.i219.0176.i, i64 1 + %incdec.ptr.i238.i = getelementptr inbounds i8, ptr %cur.addr.i217.0180.i, i64 1 + %incdec.ptr16.i239.i = getelementptr inbounds i8, ptr %str.addr.i219.0179.i, i64 1 %cmp6.i231.i = icmp ult ptr %incdec.ptr.i238.i, %end.0 br i1 %cmp6.i231.i, label %for.body.i233.i, label %.loopexit, !llvm.loop !86 @@ -33248,10 +33248,10 @@ if.then17.i.i: ; preds = %if.end.i1604.i br i1 %or.cond.i.i, label %for.body.i272.i.i, label %lor.lhs.false25.critedge.i.i for.body.i272.i.i: ; preds = %if.then17.i.i, %if.end15.i276.i.i - %cur.addr.i256.0175.i.i = phi ptr [ %incdec.ptr.i277.i.i, %if.end15.i276.i.i ], [ %spec.select.i.i, %if.then17.i.i ] - %str.addr.i258.0174.i.i = phi ptr [ %incdec.ptr16.i278.i.i, %if.end15.i276.i.i ], [ @.str.75, %if.then17.i.i ] - %2621 = load i8, ptr %cur.addr.i256.0175.i.i, align 1 - %2622 = load i8, ptr %str.addr.i258.0174.i.i, align 1 + %cur.addr.i256.0178.i.i = phi ptr [ %incdec.ptr.i277.i.i, %if.end15.i276.i.i ], [ %spec.select.i.i, %if.then17.i.i ] + %str.addr.i258.0177.i.i = phi ptr [ %incdec.ptr16.i278.i.i, %if.end15.i276.i.i ], [ @.str.75, %if.then17.i.i ] + %2621 = load i8, ptr %cur.addr.i256.0178.i.i, align 1 + %2622 = load i8, ptr %str.addr.i258.0177.i.i, align 1 %cmp8.i275.not.i.i = icmp eq i8 %2621, %2622 %conv7.i274.i.i = zext i8 %2622 to i32 %conv.i273.i.i = zext i8 %2621 to i32 @@ -33261,8 +33261,8 @@ for.body.i272.i.i: ; preds = %if.then17.i.i, %if. br i1 %or.cond144.i.i, label %if.end15.i276.i.i, label %lor.lhs.false25.critedge.i.i if.end15.i276.i.i: ; preds = %for.body.i272.i.i - %incdec.ptr.i277.i.i = getelementptr inbounds i8, ptr %cur.addr.i256.0175.i.i, i64 1 - %incdec.ptr16.i278.i.i = getelementptr inbounds i8, ptr %str.addr.i258.0174.i.i, i64 1 + %incdec.ptr.i277.i.i = getelementptr inbounds i8, ptr %cur.addr.i256.0178.i.i, i64 1 + %incdec.ptr16.i278.i.i = getelementptr inbounds i8, ptr %str.addr.i258.0177.i.i, i64 1 %cmp6.i270.i.i = icmp ult ptr %incdec.ptr.i277.i.i, %end.0 br i1 %cmp6.i270.i.i, label %for.body.i272.i.i, label %if.then203.i, !llvm.loop !86 @@ -33273,10 +33273,10 @@ lor.lhs.false25.critedge.i.i: ; preds = %for.body.i272.i.i, br i1 %or.cond145.i.i, label %for.body.i233.i.i, label %if.else210.i for.body.i233.i.i: ; preds = %lor.lhs.false25.critedge.i.i, %if.end15.i237.i.i - %cur.addr.i217.0177.i.i = phi ptr [ %incdec.ptr.i238.i.i, %if.end15.i237.i.i ], [ %spec.select.i.i, %lor.lhs.false25.critedge.i.i ] - %str.addr.i219.0176.i.i = phi ptr [ %incdec.ptr16.i239.i.i, %if.end15.i237.i.i ], [ @.str.76, %lor.lhs.false25.critedge.i.i ] - %2623 = load i8, ptr %cur.addr.i217.0177.i.i, align 1 - %2624 = load i8, ptr %str.addr.i219.0176.i.i, align 1 + %cur.addr.i217.0180.i.i = phi ptr [ %incdec.ptr.i238.i.i, %if.end15.i237.i.i ], [ %spec.select.i.i, %lor.lhs.false25.critedge.i.i ] + %str.addr.i219.0179.i.i = phi ptr [ %incdec.ptr16.i239.i.i, %if.end15.i237.i.i ], [ @.str.76, %lor.lhs.false25.critedge.i.i ] + %2623 = load i8, ptr %cur.addr.i217.0180.i.i, align 1 + %2624 = load i8, ptr %str.addr.i219.0179.i.i, align 1 %cmp8.i236.not.i.i = icmp eq i8 %2623, %2624 %conv7.i235.i.i = zext i8 %2624 to i32 %conv.i234.i.i = zext i8 %2623 to i32 @@ -33286,8 +33286,8 @@ for.body.i233.i.i: ; preds = %lor.lhs.false25.cri br i1 %or.cond146.i.i, label %if.end15.i237.i.i, label %if.else210.i if.end15.i237.i.i: ; preds = %for.body.i233.i.i - %incdec.ptr.i238.i.i = getelementptr inbounds i8, ptr %cur.addr.i217.0177.i.i, i64 1 - %incdec.ptr16.i239.i.i = getelementptr inbounds i8, ptr %str.addr.i219.0176.i.i, i64 1 + %incdec.ptr.i238.i.i = getelementptr inbounds i8, ptr %cur.addr.i217.0180.i.i, i64 1 + %incdec.ptr16.i239.i.i = getelementptr inbounds i8, ptr %str.addr.i219.0179.i.i, i64 1 %cmp6.i231.i.i = icmp ult ptr %incdec.ptr.i238.i.i, %end.0 br i1 %cmp6.i231.i.i, label %for.body.i233.i.i, label %if.then203.i, !llvm.loop !86 @@ -33382,10 +33382,10 @@ if.then17.i1641.i: ; preds = %do.body293.thread.i br i1 %or.cond.i1648.i, label %for.body.i272.i1674.i, label %lor.lhs.false25.critedge.i1649.i for.body.i272.i1674.i: ; preds = %if.then17.i1641.i, %if.end15.i276.i1683.i - %cur.addr.i256.0175.i1675.i = phi ptr [ %incdec.ptr.i277.i1684.i, %if.end15.i276.i1683.i ], [ %spec.select.i1644.i, %if.then17.i1641.i ] - %str.addr.i258.0174.i1676.i = phi ptr [ %incdec.ptr16.i278.i1685.i, %if.end15.i276.i1683.i ], [ @.str.75, %if.then17.i1641.i ] - %2626 = load i8, ptr %cur.addr.i256.0175.i1675.i, align 1 - %2627 = load i8, ptr %str.addr.i258.0174.i1676.i, align 1 + %cur.addr.i256.0178.i1675.i = phi ptr [ %incdec.ptr.i277.i1684.i, %if.end15.i276.i1683.i ], [ %spec.select.i1644.i, %if.then17.i1641.i ] + %str.addr.i258.0177.i1676.i = phi ptr [ %incdec.ptr16.i278.i1685.i, %if.end15.i276.i1683.i ], [ @.str.75, %if.then17.i1641.i ] + %2626 = load i8, ptr %cur.addr.i256.0178.i1675.i, align 1 + %2627 = load i8, ptr %str.addr.i258.0177.i1676.i, align 1 %cmp8.i275.not.i1677.i = icmp eq i8 %2626, %2627 %conv7.i274.i1678.i = zext i8 %2627 to i32 %conv.i273.i1679.i = zext i8 %2626 to i32 @@ -33395,8 +33395,8 @@ for.body.i272.i1674.i: ; preds = %if.then17.i1641.i, br i1 %or.cond144.i1682.i, label %if.end15.i276.i1683.i, label %lor.lhs.false25.critedge.i1649.i if.end15.i276.i1683.i: ; preds = %for.body.i272.i1674.i - %incdec.ptr.i277.i1684.i = getelementptr inbounds i8, ptr %cur.addr.i256.0175.i1675.i, i64 1 - %incdec.ptr16.i278.i1685.i = getelementptr inbounds i8, ptr %str.addr.i258.0174.i1676.i, i64 1 + %incdec.ptr.i277.i1684.i = getelementptr inbounds i8, ptr %cur.addr.i256.0178.i1675.i, i64 1 + %incdec.ptr16.i278.i1685.i = getelementptr inbounds i8, ptr %str.addr.i258.0177.i1676.i, i64 1 %cmp6.i270.i1686.i = icmp ult ptr %incdec.ptr.i277.i1684.i, %end.0 br i1 %cmp6.i270.i1686.i, label %for.body.i272.i1674.i, label %if.then311.i8358, !llvm.loop !86 @@ -33407,10 +33407,10 @@ lor.lhs.false25.critedge.i1649.i: ; preds = %for.body.i272.i1674 br i1 %or.cond145.i1652.i, label %for.body.i233.i1661.i, label %if.else302.i8359 for.body.i233.i1661.i: ; preds = %lor.lhs.false25.critedge.i1649.i, %if.end15.i237.i1670.i - %cur.addr.i217.0177.i1662.i = phi ptr [ %incdec.ptr.i238.i1671.i, %if.end15.i237.i1670.i ], [ %spec.select.i1644.i, %lor.lhs.false25.critedge.i1649.i ] - %str.addr.i219.0176.i1663.i = phi ptr [ %incdec.ptr16.i239.i1672.i, %if.end15.i237.i1670.i ], [ @.str.76, %lor.lhs.false25.critedge.i1649.i ] - %2628 = load i8, ptr %cur.addr.i217.0177.i1662.i, align 1 - %2629 = load i8, ptr %str.addr.i219.0176.i1663.i, align 1 + %cur.addr.i217.0180.i1662.i = phi ptr [ %incdec.ptr.i238.i1671.i, %if.end15.i237.i1670.i ], [ %spec.select.i1644.i, %lor.lhs.false25.critedge.i1649.i ] + %str.addr.i219.0179.i1663.i = phi ptr [ %incdec.ptr16.i239.i1672.i, %if.end15.i237.i1670.i ], [ @.str.76, %lor.lhs.false25.critedge.i1649.i ] + %2628 = load i8, ptr %cur.addr.i217.0180.i1662.i, align 1 + %2629 = load i8, ptr %str.addr.i219.0179.i1663.i, align 1 %cmp8.i236.not.i1664.i = icmp eq i8 %2628, %2629 %conv7.i235.i1665.i = zext i8 %2629 to i32 %conv.i234.i1666.i = zext i8 %2628 to i32 @@ -33420,8 +33420,8 @@ for.body.i233.i1661.i: ; preds = %lor.lhs.false25.cri br i1 %or.cond146.i1669.i, label %if.end15.i237.i1670.i, label %if.else302.i8359 if.end15.i237.i1670.i: ; preds = %for.body.i233.i1661.i - %incdec.ptr.i238.i1671.i = getelementptr inbounds i8, ptr %cur.addr.i217.0177.i1662.i, i64 1 - %incdec.ptr16.i239.i1672.i = getelementptr inbounds i8, ptr %str.addr.i219.0176.i1663.i, i64 1 + %incdec.ptr.i238.i1671.i = getelementptr inbounds i8, ptr %cur.addr.i217.0180.i1662.i, i64 1 + %incdec.ptr16.i239.i1672.i = getelementptr inbounds i8, ptr %str.addr.i219.0179.i1663.i, i64 1 %cmp6.i231.i1673.i = icmp ult ptr %incdec.ptr.i238.i1671.i, %end.0 br i1 %cmp6.i231.i1673.i, label %for.body.i233.i1661.i, label %if.then311.i8358, !llvm.loop !86 @@ -33457,10 +33457,10 @@ for.body.i.i.preheader.i: ; preds = %if.end.i1691.i br label %for.body.i.i.i for.body.i.i.i: ; preds = %if.end15.i.i.i, %for.body.i.i.preheader.i - %cur.addr.i.0179.i.i = phi ptr [ %incdec.ptr.i.i.i, %if.end15.i.i.i ], [ %add.ptr45.i.i, %for.body.i.i.preheader.i ] - %str.addr.i.0178.i.i = phi ptr [ %incdec.ptr16.i.i.i, %if.end15.i.i.i ], [ @.str.75, %for.body.i.i.preheader.i ] - %2631 = load i8, ptr %cur.addr.i.0179.i.i, align 1 - %2632 = load i8, ptr %str.addr.i.0178.i.i, align 1 + %cur.addr.i.0182.i.i = phi ptr [ %incdec.ptr.i.i.i, %if.end15.i.i.i ], [ %add.ptr45.i.i, %for.body.i.i.preheader.i ] + %str.addr.i.0181.i.i = phi ptr [ %incdec.ptr16.i.i.i, %if.end15.i.i.i ], [ @.str.75, %for.body.i.i.preheader.i ] + %2631 = load i8, ptr %cur.addr.i.0182.i.i, align 1 + %2632 = load i8, ptr %str.addr.i.0181.i.i, align 1 %cmp8.i.not.i.i = icmp eq i8 %2631, %2632 %conv7.i.i.i = zext i8 %2632 to i32 %conv.i.i.i = zext i8 %2631 to i32 @@ -33470,18 +33470,18 @@ for.body.i.i.i: ; preds = %if.end15.i.i.i, %fo br i1 %or.cond150.i.i, label %if.end15.i.i.i, label %if.then334.i if.end15.i.i.i: ; preds = %for.body.i.i.i - %incdec.ptr.i.i.i = getelementptr inbounds i8, ptr %cur.addr.i.0179.i.i, i64 1 - %incdec.ptr16.i.i.i = getelementptr inbounds i8, ptr %str.addr.i.0178.i.i, i64 1 + %incdec.ptr.i.i.i = getelementptr inbounds i8, ptr %cur.addr.i.0182.i.i, i64 1 + %incdec.ptr16.i.i.i = getelementptr inbounds i8, ptr %str.addr.i.0181.i.i, i64 1 %exitcond.not.i.i = icmp eq ptr %incdec.ptr.i.i.i, %end.0 br i1 %exitcond.not.i.i, label %if.then334.i, label %for.body.i.i.i, !llvm.loop !86 if.then334.i: ; preds = %for.body.i.i.i, %if.end15.i.i.i, %if.end.i1691.i - %end186.i1688.sink.in.i = phi ptr [ %2614, %if.end.i1691.i ], [ %2614, %for.body.i.i.i ], [ %end.0, %if.end15.i.i.i ] + %end189.i1688.sink.in.i = phi ptr [ %2614, %if.end.i1691.i ], [ %2614, %for.body.i.i.i ], [ %end.0, %if.end15.i.i.i ] %.sink2248.i = phi i32 [ 4, %if.end.i1691.i ], [ 4, %for.body.i.i.i ], [ 5, %if.end15.i.i.i ] %.str.57.sink2247.i = phi ptr [ @.str.61, %if.end.i1691.i ], [ @.str.61, %for.body.i.i.i ], [ @.str.57, %if.end15.i.i.i ] - %end186.i1688.sink.i = ptrtoint ptr %end186.i1688.sink.in.i to i64 + %end189.i1688.sink.i = ptrtoint ptr %end189.i1688.sink.in.i to i64 %sub.ptr.rhs.cast320.i = ptrtoint ptr %cur.0 to i64 - %sub.ptr.sub321.i = sub i64 %end186.i1688.sink.i, %sub.ptr.rhs.cast320.i + %sub.ptr.sub321.i = sub i64 %end189.i1688.sink.i, %sub.ptr.rhs.cast320.i store i64 %sub.ptr.sub321.i, ptr %err.addr.0.sroa.phi7619.v.sroa.sel.v.sroa.sel, align 8 store i32 %.sink2248.i, ptr %err.addr.0.sroa.phi7619.v, align 8 store ptr %.str.57.sink2247.i, ptr %err.addr.0.sroa.phi7622.v.sroa.sel.v.sroa.sel, align 8 @@ -57929,7 +57929,7 @@ declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #19 ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define internal fastcc zeroext i1 @is_truncated_end(ptr noundef readnone %hdr, ptr noundef %cur, ptr noundef %end, i32 noundef range(i32 2, 12) %code, i32 noundef %flg) unnamed_addr #20 { entry: - %end186 = ptrtoint ptr %end to i64 + %end189 = ptrtoint ptr %end to i64 %cmp.not = icmp ult ptr %cur, %end br i1 %cmp.not, label %if.end, label %return @@ -57952,7 +57952,7 @@ if.then2: ; preds = %if.end if.then2.i403: ; preds = %if.then2 %sub.ptr.rhs.cast.i405 = ptrtoint ptr %cur to i64 - %sub.ptr.sub.i406 = sub i64 %end186, %sub.ptr.rhs.cast.i405 + %sub.ptr.sub.i406 = sub i64 %end189, %sub.ptr.rhs.cast.i405 %bcmp = tail call i32 @bcmp(ptr %cur, ptr nonnull @.str.71, i64 %sub.ptr.sub.i406) %cmp4.i408 = icmp eq i32 %bcmp, 0 br i1 %cmp4.i408, label %return, label %lor.lhs.false @@ -57964,7 +57964,7 @@ lor.lhs.false: ; preds = %if.then2, %if.then2 if.then2.i364: ; preds = %lor.lhs.false %sub.ptr.rhs.cast.i366 = ptrtoint ptr %cur to i64 - %sub.ptr.sub.i367 = sub i64 %end186, %sub.ptr.rhs.cast.i366 + %sub.ptr.sub.i367 = sub i64 %end189, %sub.ptr.rhs.cast.i366 %bcmp142 = tail call i32 @bcmp(ptr %cur, ptr nonnull @.str.74, i64 %sub.ptr.sub.i367) %cmp4.i369 = icmp eq i32 %bcmp142, 0 br i1 %cmp4.i369, label %return, label %lor.lhs.false4 @@ -57974,7 +57974,7 @@ lor.lhs.false4: ; preds = %lor.lhs.false, %if. if.then2.i325: ; preds = %lor.lhs.false4 %sub.ptr.rhs.cast.i327 = ptrtoint ptr %cur to i64 - %sub.ptr.sub.i328 = sub i64 %end186, %sub.ptr.rhs.cast.i327 + %sub.ptr.sub.i328 = sub i64 %end189, %sub.ptr.rhs.cast.i327 %bcmp143 = tail call i32 @bcmp(ptr %cur, ptr nonnull @.str.73, i64 %sub.ptr.sub.i328) %cmp4.i330 = icmp eq i32 %bcmp143, 0 br i1 %cmp4.i330, label %return, label %if.then14 @@ -57996,10 +57996,10 @@ if.then17: ; preds = %if.then14 br i1 %or.cond, label %for.body.i272, label %lor.lhs.false25.critedge for.body.i272: ; preds = %if.then17, %if.end15.i276 - %cur.addr.i256.0175 = phi ptr [ %incdec.ptr.i277, %if.end15.i276 ], [ %spec.select, %if.then17 ] - %str.addr.i258.0174 = phi ptr [ %incdec.ptr16.i278, %if.end15.i276 ], [ @.str.75, %if.then17 ] - %2 = load i8, ptr %cur.addr.i256.0175, align 1 - %3 = load i8, ptr %str.addr.i258.0174, align 1 + %cur.addr.i256.0178 = phi ptr [ %incdec.ptr.i277, %if.end15.i276 ], [ %spec.select, %if.then17 ] + %str.addr.i258.0177 = phi ptr [ %incdec.ptr16.i278, %if.end15.i276 ], [ @.str.75, %if.then17 ] + %2 = load i8, ptr %cur.addr.i256.0178, align 1 + %3 = load i8, ptr %str.addr.i258.0177, align 1 %cmp8.i275.not = icmp eq i8 %2, %3 %conv7.i274 = zext i8 %3 to i32 %conv.i273 = zext i8 %2 to i32 @@ -58009,8 +58009,8 @@ for.body.i272: ; preds = %if.then17, %if.end1 br i1 %or.cond144, label %if.end15.i276, label %lor.lhs.false25.critedge if.end15.i276: ; preds = %for.body.i272 - %incdec.ptr.i277 = getelementptr inbounds i8, ptr %cur.addr.i256.0175, i64 1 - %incdec.ptr16.i278 = getelementptr inbounds i8, ptr %str.addr.i258.0174, i64 1 + %incdec.ptr.i277 = getelementptr inbounds i8, ptr %cur.addr.i256.0178, i64 1 + %incdec.ptr16.i278 = getelementptr inbounds i8, ptr %str.addr.i258.0177, i64 1 %cmp6.i270 = icmp ult ptr %incdec.ptr.i277, %end br i1 %cmp6.i270, label %for.body.i272, label %return, !llvm.loop !86 @@ -58021,10 +58021,10 @@ lor.lhs.false25.critedge: ; preds = %for.body.i272, %if. br i1 %or.cond145, label %for.body.i233, label %if.end31 for.body.i233: ; preds = %lor.lhs.false25.critedge, %if.end15.i237 - %cur.addr.i217.0177 = phi ptr [ %incdec.ptr.i238, %if.end15.i237 ], [ %spec.select, %lor.lhs.false25.critedge ] - %str.addr.i219.0176 = phi ptr [ %incdec.ptr16.i239, %if.end15.i237 ], [ @.str.76, %lor.lhs.false25.critedge ] - %4 = load i8, ptr %cur.addr.i217.0177, align 1 - %5 = load i8, ptr %str.addr.i219.0176, align 1 + %cur.addr.i217.0180 = phi ptr [ %incdec.ptr.i238, %if.end15.i237 ], [ %spec.select, %lor.lhs.false25.critedge ] + %str.addr.i219.0179 = phi ptr [ %incdec.ptr16.i239, %if.end15.i237 ], [ @.str.76, %lor.lhs.false25.critedge ] + %4 = load i8, ptr %cur.addr.i217.0180, align 1 + %5 = load i8, ptr %str.addr.i219.0179, align 1 %cmp8.i236.not = icmp eq i8 %4, %5 %conv7.i235 = zext i8 %5 to i32 %conv.i234 = zext i8 %4 to i32 @@ -58034,15 +58034,15 @@ for.body.i233: ; preds = %lor.lhs.false25.cri br i1 %or.cond146, label %if.end15.i237, label %if.end31 if.end15.i237: ; preds = %for.body.i233 - %incdec.ptr.i238 = getelementptr inbounds i8, ptr %cur.addr.i217.0177, i64 1 - %incdec.ptr16.i239 = getelementptr inbounds i8, ptr %str.addr.i219.0176, i64 1 + %incdec.ptr.i238 = getelementptr inbounds i8, ptr %cur.addr.i217.0180, i64 1 + %incdec.ptr16.i239 = getelementptr inbounds i8, ptr %str.addr.i219.0179, i64 1 %cmp6.i231 = icmp ult ptr %incdec.ptr.i238, %end br i1 %cmp6.i231, label %for.body.i233, label %return, !llvm.loop !86 if.end31: ; preds = %for.body.i233, %if.end.if.end31_crit_edge, %lor.lhs.false25.critedge %and.i.pre-phi = phi i1 [ %0, %if.end.if.end31_crit_edge ], [ false, %lor.lhs.false25.critedge ], [ false, %for.body.i233 ] %cur.addr.0 = phi ptr [ %cur, %if.end.if.end31_crit_edge ], [ %spec.select, %lor.lhs.false25.critedge ], [ %spec.select, %for.body.i233 ] - %cur.addr.0187 = ptrtoint ptr %cur.addr.0 to i64 + %cur.addr.0190 = ptrtoint ptr %cur.addr.0 to i64 %cmp32 = icmp ne i32 %code, 4 %or.cond147 = or i1 %cmp32, %and.i.pre-phi %add.ptr = getelementptr inbounds i8, ptr %hdr, i64 3 @@ -58059,15 +58059,15 @@ land.lhs.true: ; preds = %if.end31 br i1 %or.cond149, label %for.body.i.preheader, label %return for.body.i.preheader: ; preds = %land.lhs.true - %6 = sub i64 %end186, %cur.addr.0187 + %6 = sub i64 %end189, %cur.addr.0190 %scevgep = getelementptr i8, ptr %cur.addr.0, i64 %6 br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %if.end15.i - %cur.addr.i.0179 = phi ptr [ %incdec.ptr.i, %if.end15.i ], [ %add.ptr45, %for.body.i.preheader ] - %str.addr.i.0178 = phi ptr [ %incdec.ptr16.i, %if.end15.i ], [ @.str.75, %for.body.i.preheader ] - %7 = load i8, ptr %cur.addr.i.0179, align 1 - %8 = load i8, ptr %str.addr.i.0178, align 1 + %cur.addr.i.0182 = phi ptr [ %incdec.ptr.i, %if.end15.i ], [ %add.ptr45, %for.body.i.preheader ] + %str.addr.i.0181 = phi ptr [ %incdec.ptr16.i, %if.end15.i ], [ @.str.75, %for.body.i.preheader ] + %7 = load i8, ptr %cur.addr.i.0182, align 1 + %8 = load i8, ptr %str.addr.i.0181, align 1 %cmp8.i.not = icmp eq i8 %7, %8 %conv7.i = zext i8 %8 to i32 %conv.i = zext i8 %7 to i32 @@ -58077,20 +58077,20 @@ for.body.i: ; preds = %for.body.i.preheade br i1 %or.cond150, label %if.end15.i, label %if.end51 if.end15.i: ; preds = %for.body.i - %incdec.ptr.i = getelementptr inbounds i8, ptr %cur.addr.i.0179, i64 1 - %incdec.ptr16.i = getelementptr inbounds i8, ptr %str.addr.i.0178, i64 1 + %incdec.ptr.i = getelementptr inbounds i8, ptr %cur.addr.i.0182, i64 1 + %incdec.ptr16.i = getelementptr inbounds i8, ptr %str.addr.i.0181, i64 1 %exitcond.not = icmp eq ptr %incdec.ptr.i, %scevgep br i1 %exitcond.not, label %return, label %for.body.i, !llvm.loop !86 if.end51: ; preds = %for.body.i, %if.then14, %if.end31 - %cur.addr.0166 = phi ptr [ %cur.addr.0, %if.end31 ], [ %cur, %if.then14 ], [ %cur.addr.0, %for.body.i ] + %cur.addr.0169 = phi ptr [ %cur.addr.0, %if.end31 ], [ %cur, %if.then14 ], [ %cur.addr.0, %for.body.i ] %cmp52 = icmp eq i32 %code, 10 br i1 %cmp52, label %if.then54, label %return if.then54: ; preds = %if.end51 - %sub.ptr.rhs.cast = ptrtoint ptr %cur.addr.0166 to i64 - %sub.ptr.sub = sub i64 %end186, %sub.ptr.rhs.cast - %9 = load i8, ptr %cur.addr.0166, align 1 + %sub.ptr.rhs.cast = ptrtoint ptr %cur.addr.0169 to i64 + %sub.ptr.sub = sub i64 %end189, %sub.ptr.rhs.cast + %9 = load i8, ptr %cur.addr.0169, align 1 %conv55 = zext i8 %9 to i32 %cmp56 = icmp eq i8 %9, 92 br i1 %cmp56, label %if.then58, label %if.end80 @@ -58104,41 +58104,39 @@ if.end62: ; preds = %if.then58 br i1 %cmp63, label %if.then65, label %return if.then65: ; preds = %if.end62 - %incdec.ptr66 = getelementptr inbounds i8, ptr %cur.addr.0166, i64 1 + %incdec.ptr66 = getelementptr inbounds i8, ptr %cur.addr.0169, i64 1 %10 = load i8, ptr %incdec.ptr66, align 1 %cmp68.not = icmp eq i8 %10, 117 br i1 %cmp68.not, label %if.end71, label %return if.end71: ; preds = %if.then65 - %incdec.ptr72 = getelementptr inbounds i8, ptr %cur.addr.0166, i64 2 - %cmp73180 = icmp ult ptr %incdec.ptr72, %end - br i1 %cmp73180, label %for.body.preheader, label %return + %incdec.ptr72 = getelementptr inbounds i8, ptr %cur.addr.0169, i64 2 + %cmp73183 = icmp ult ptr %incdec.ptr72, %end + br i1 %cmp73183, label %for.body.preheader, label %return for.body.preheader: ; preds = %if.end71 - %scevgep188 = getelementptr i8, ptr %cur.addr.0166, i64 %sub.ptr.sub + %scevgep191 = getelementptr i8, ptr %cur.addr.0169, i64 %sub.ptr.sub br label %for.body for.body: ; preds = %for.body, %for.body.preheader - %cur.addr.2181 = phi ptr [ %incdec.ptr72, %for.body.preheader ], [ %incdec.ptr78, %for.body ] - %11 = load i8, ptr %cur.addr.2181, align 1 + %cur.addr.2184 = phi ptr [ %incdec.ptr72, %for.body.preheader ], [ %incdec.ptr78, %for.body ] + %11 = load i8, ptr %cur.addr.2184, align 1 %idxprom.i.i = zext i8 %11 to i64 %arrayidx.i.i = getelementptr inbounds [256 x i8], ptr @char_table, i64 0, i64 %idxprom.i.i %12 = load i8, ptr %arrayidx.i.i, align 1 %cmp.i.i.not = icmp slt i8 %12, 0 - %incdec.ptr78 = getelementptr inbounds i8, ptr %cur.addr.2181, i64 1 - %exitcond189.not = icmp ne ptr %incdec.ptr78, %scevgep188 - %or.cond196.not = select i1 %cmp.i.i.not, i1 %exitcond189.not, i1 false - br i1 %or.cond196.not, label %for.body, label %return, !llvm.loop !98 + %incdec.ptr78 = getelementptr inbounds i8, ptr %cur.addr.2184, i64 1 + %exitcond192.not = icmp ne ptr %incdec.ptr78, %scevgep191 + %or.cond199.not = select i1 %cmp.i.i.not, i1 %exitcond192.not, i1 false + br i1 %or.cond199.not, label %for.body, label %return, !llvm.loop !98 if.end80: ; preds = %if.then54 %tobool82.not = icmp sgt i8 %9, -1 br i1 %tobool82.not, label %return, label %if.then83 if.then83: ; preds = %if.end80 - %arrayidx84 = getelementptr inbounds i8, ptr %cur.addr.0166, i64 1 + %arrayidx84 = getelementptr inbounds i8, ptr %cur.addr.0169, i64 1 %13 = load i8, ptr %arrayidx84, align 1 - %arrayidx85 = getelementptr inbounds i8, ptr %cur.addr.0166, i64 2 - %14 = load i8, ptr %arrayidx85, align 1 switch i64 %sub.ptr.sub, label %return [ i64 1, label %if.then88 i64 2, label %if.then120 @@ -58150,11 +58148,11 @@ if.then88: ; preds = %if.then83 %cmp91 = icmp eq i32 %and90, 192 %and95 = and i32 %conv55, 30 %cmp96.not = icmp ne i32 %and95, 0 - %or.cond151.not170 = and i1 %cmp91, %cmp96.not + %or.cond151.not173 = and i1 %cmp91, %cmp96.not %and101 = and i32 %conv55, 240 %cmp102 = icmp eq i32 %and101, 224 - %or.cond157 = or i1 %cmp102, %or.cond151.not170 - br i1 %or.cond157, label %return, label %if.end105 + %or.cond160 = or i1 %cmp102, %or.cond151.not173 + br i1 %or.cond160, label %return, label %if.end105 if.end105: ; preds = %if.then88 %and107 = and i32 %conv55, 248 @@ -58167,8 +58165,7 @@ if.end105: ; preds = %if.then88 if.then120: ; preds = %if.then83 %and122 = and i32 %conv55, 240 %cmp123 = icmp eq i32 %and122, 224 - %15 = and i8 %13, -64 - %cmp128 = icmp eq i8 %15, -128 + %cmp128 = icmp slt i8 %13, -64 %or.cond153 = select i1 %cmp123, i1 %cmp128, i1 false br i1 %or.cond153, label %if.then130, label %if.end142 @@ -58180,7 +58177,7 @@ if.then130: ; preds = %if.then120 %or = or disjoint i8 %shr, %shl %cmp137 = icmp ne i8 %or, 0 %cmp140 = icmp ne i8 %or, 27 - %16 = and i1 %cmp137, %cmp140 + %14 = and i1 %cmp137, %cmp140 br label %return if.end142: ; preds = %if.then120 @@ -58195,35 +58192,33 @@ if.then152: ; preds = %if.end142 %and158 = lshr i8 %13, 4 %shr159 = and i8 %and158, 3 %or160 = add nsw i8 %shl156, -1 - %17 = add nsw i8 %or160, %shr159 - %18 = icmp ult i8 %17, 16 + %15 = add nsw i8 %or160, %shr159 + %16 = icmp ult i8 %15, 16 br label %return if.then174: ; preds = %if.then83 + %arrayidx85 = getelementptr inbounds i8, ptr %cur.addr.0169, i64 2 + %17 = load i8, ptr %arrayidx85, align 1 %and176.old = and i32 %conv55, 248 %cmp177.old = icmp eq i32 %and176.old, 240 - br i1 %cmp177.old, label %land.lhs.true179, label %return + %cmp182.old = icmp slt i8 %13, -64 + %or.cond157 = select i1 %cmp177.old, i1 %cmp182.old, i1 false + %cmp187 = icmp slt i8 %17, -64 + %or.cond158 = select i1 %or.cond157, i1 %cmp187, i1 false + br i1 %or.cond158, label %if.then189, label %return -land.lhs.true179: ; preds = %if.then174 - %19 = and i8 %13, -64 - %cmp182 = icmp eq i8 %19, -128 - %20 = and i8 %14, -64 - %cmp187 = icmp eq i8 %20, -128 - %or.cond156 = select i1 %cmp182, i1 %cmp187, i1 false - br i1 %or.cond156, label %if.then189, label %return - -if.then189: ; preds = %land.lhs.true179 +if.then189: ; preds = %if.then174 %and192 = shl i8 %9, 2 %shl193 = and i8 %and192, 28 %and195 = lshr i8 %13, 4 %shr196 = and i8 %and195, 3 %or197 = add nsw i8 %shl193, -1 - %21 = add nsw i8 %or197, %shr196 - %22 = icmp ult i8 %21, 16 + %18 = add nsw i8 %or197, %shr196 + %19 = icmp ult i8 %18, 16 br label %return -return: ; preds = %if.end15.i276, %if.end15.i237, %if.end15.i, %for.body, %if.end71, %if.end105, %if.end142, %land.lhs.true, %if.end51, %land.lhs.true179, %if.then174, %if.end80, %if.then83, %if.then88, %if.end62, %if.then65, %if.then58, %if.then2.i403, %if.then2.i364, %if.then2.i325, %entry, %if.then189, %if.then152, %if.then130 - %retval.0 = phi i1 [ %16, %if.then130 ], [ %18, %if.then152 ], [ %22, %if.then189 ], [ true, %entry ], [ true, %if.then2.i325 ], [ true, %if.then2.i364 ], [ true, %if.then2.i403 ], [ true, %if.then58 ], [ false, %if.then65 ], [ false, %if.end62 ], [ true, %if.then88 ], [ false, %if.then83 ], [ false, %if.end80 ], [ false, %if.then174 ], [ false, %land.lhs.true179 ], [ false, %if.end51 ], [ false, %land.lhs.true ], [ %or.cond152, %if.end105 ], [ false, %if.end142 ], [ true, %if.end71 ], [ %cmp.i.i.not, %for.body ], [ true, %if.end15.i ], [ true, %if.end15.i237 ], [ true, %if.end15.i276 ] +return: ; preds = %if.end15.i276, %if.end15.i237, %if.end15.i, %for.body, %if.end71, %if.end142, %if.end105, %land.lhs.true, %if.end51, %if.then174, %if.end80, %if.then83, %if.then88, %if.end62, %if.then65, %if.then58, %if.then2.i403, %if.then2.i364, %if.then2.i325, %entry, %if.then189, %if.then152, %if.then130 + %retval.0 = phi i1 [ %14, %if.then130 ], [ %16, %if.then152 ], [ %19, %if.then189 ], [ true, %entry ], [ true, %if.then2.i325 ], [ true, %if.then2.i364 ], [ true, %if.then2.i403 ], [ true, %if.then58 ], [ false, %if.then65 ], [ false, %if.end62 ], [ true, %if.then88 ], [ false, %if.then83 ], [ false, %if.end80 ], [ false, %if.then174 ], [ false, %if.end51 ], [ false, %land.lhs.true ], [ %or.cond152, %if.end105 ], [ false, %if.end142 ], [ true, %if.end71 ], [ %cmp.i.i.not, %for.body ], [ true, %if.end15.i ], [ true, %if.end15.i237 ], [ true, %if.end15.i276 ] ret i1 %retval.0 } diff --git a/bench/z3/optimized/goal.cpp.ll b/bench/z3/optimized/goal.cpp.ll index 28beed97ea8..2795e40073a 100644 --- a/bench/z3/optimized/goal.cpp.ll +++ b/bench/z3/optimized/goal.cpp.ll @@ -9495,10 +9495,8 @@ define hidden noundef zeroext i1 @_ZNK4goal15unsat_preservedEv(ptr nocapture nou entry: %m_precision.i = getelementptr inbounds i8, ptr %this, i64 120 %bf.load.i = load i32, ptr %m_precision.i, align 8 - %cmp = icmp ult i32 %bf.load.i, 1073741824 - %bf.lshr.i.mask = and i32 %bf.load.i, -1073741824 - %cmp3 = icmp eq i32 %bf.lshr.i.mask, -2147483648 - %spec.select = or i1 %cmp, %cmp3 + %0 = and i32 %bf.load.i, 1073741824 + %spec.select = icmp eq i32 %0, 0 ret i1 %spec.select } @@ -9570,19 +9568,8 @@ define hidden noundef zeroext i1 @_ZNK4goal16is_decided_unsatEv(ptr nocapture no entry: %m_inconsistent.i = getelementptr inbounds i8, ptr %this, i64 120 %bf.load.i = load i32, ptr %m_inconsistent.i, align 8 - %0 = and i32 %bf.load.i, 536870912 - %tobool.i.not = icmp eq i32 %0, 0 - br i1 %tobool.i.not, label %land.end, label %land.rhs - -land.rhs: ; preds = %entry - %cmp.i = icmp ult i32 %bf.load.i, 1073741824 - %bf.lshr.i.mask.i = and i32 %bf.load.i, -1073741824 - %cmp3.i = icmp eq i32 %bf.lshr.i.mask.i, -2147483648 - %spec.select.i = or i1 %cmp.i, %cmp3.i - br label %land.end - -land.end: ; preds = %land.rhs, %entry - %1 = phi i1 [ false, %entry ], [ %spec.select.i, %land.rhs ] + %0 = and i32 %bf.load.i, 1610612736 + %1 = icmp eq i32 %0, 536870912 ret i1 %1 } @@ -9651,20 +9638,13 @@ _ZNK4goal14is_decided_satEv.exit: ; preds = %entry, %_ZNK4goal4s lor.rhs: ; preds = %_ZNK4goal4sizeEv.exit.i.lor.rhs_crit_edge, %_ZNK4goal14is_decided_satEv.exit %bf.load.i.i = phi i32 [ %bf.load.i.i.pre, %_ZNK4goal4sizeEv.exit.i.lor.rhs_crit_edge ], [ %bf.load.i.i.i, %_ZNK4goal14is_decided_satEv.exit ] - %9 = and i32 %bf.load.i.i, 536870912 - %tobool.i.not.i = icmp eq i32 %9, 0 - br i1 %tobool.i.not.i, label %lor.end, label %land.rhs.i1 - -land.rhs.i1: ; preds = %lor.rhs - %cmp.i.i2 = icmp ult i32 %bf.load.i.i, 1073741824 - %bf.lshr.i.mask.i.i3 = and i32 %bf.load.i.i, -1073741824 - %cmp3.i.i4 = icmp eq i32 %bf.lshr.i.mask.i.i3, -2147483648 - %spec.select.i.i5 = or i1 %cmp.i.i2, %cmp3.i.i4 + %9 = and i32 %bf.load.i.i, 1610612736 + %10 = icmp eq i32 %9, 536870912 br label %lor.end -lor.end: ; preds = %land.rhs.i1, %lor.rhs, %_ZNK4goal14is_decided_satEv.exit - %10 = phi i1 [ true, %_ZNK4goal14is_decided_satEv.exit ], [ false, %lor.rhs ], [ %spec.select.i.i5, %land.rhs.i1 ] - ret i1 %10 +lor.end: ; preds = %lor.rhs, %_ZNK4goal14is_decided_satEv.exit + %11 = phi i1 [ true, %_ZNK4goal14is_decided_satEv.exit ], [ %10, %lor.rhs ] + ret i1 %11 } ; Function Attrs: mustprogress uwtable diff --git a/bench/zxing/optimized/Utf.cpp.ll b/bench/zxing/optimized/Utf.cpp.ll index fb93f9e0054..29805c4bdc5 100644 --- a/bench/zxing/optimized/Utf.cpp.ll +++ b/bench/zxing/optimized/Utf.cpp.ll @@ -76,7 +76,7 @@ _ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit. .lr.ph.i.i: ; preds = %3, %.critedge.i.i %.018.i.i = phi i64 [ %.1.i.i, %.critedge.i.i ], [ 0, %3 ] - %.01317.i.i = phi i64 [ %26, %.critedge.i.i ], [ 0, %3 ] + %.01317.i.i = phi i64 [ %25, %.critedge.i.i ], [ 0, %3 ] %5 = getelementptr inbounds i8, ptr %2, i64 %.018.i.i %6 = load i8, ptr %5, align 1 %7 = icmp sgt i8 %6, -1 @@ -118,90 +118,89 @@ _ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit. 21: ; preds = %.preheader.i.i %22 = getelementptr inbounds i8, ptr %2, i64 %.2.i.i %23 = load i8, ptr %22, align 1 - %24 = and i8 %23, -64 - %25 = icmp eq i8 %24, -128 - br i1 %25, label %.preheader.i.i, label %.critedge.i.i, !llvm.loop !4 + %24 = icmp slt i8 %23, -64 + br i1 %24, label %.preheader.i.i, label %.critedge.i.i, !llvm.loop !4 .critedge.i.i: ; preds = %21, %18, %16, %14, %8 %.1.i.i = phi i64 [ %9, %8 ], [ %19, %18 ], [ %17, %16 ], [ %15, %14 ], [ %.2.i.i, %21 ] - %26 = add i64 %.01317.i.i, 1 - %27 = icmp ult i64 %.1.i.i, %1 - br i1 %27, label %.lr.ph.i.i, label %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i, !llvm.loop !6 + %25 = add i64 %.01317.i.i, 1 + %26 = icmp ult i64 %.1.i.i, %1 + br i1 %26, label %.lr.ph.i.i, label %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i, !llvm.loop !6 _ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i: ; preds = %.critedge.i.i - %28 = add i64 %26, %4 + %27 = add i64 %25, %4 br label %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i.invoke _ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i.invoke: ; preds = %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.i, %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i - %29 = phi i64 [ %28, %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i ], [ %31, %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.i ] - invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %29) + %28 = phi i64 [ %27, %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i ], [ %30, %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.i ] + invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %28) to label %.lr.ph.preheader.i unwind label %.loopexit.split-lp _ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.i: ; preds = %.preheader.i.i - %30 = add i64 %4, 1 - %31 = add i64 %30, %.01317.i.i + %29 = add i64 %4, 1 + %30 = add i64 %29, %.01317.i.i br label %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i.invoke .lr.ph.preheader.i: ; preds = %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i.invoke - %32 = getelementptr inbounds i8, ptr %2, i64 %1 + %31 = getelementptr inbounds i8, ptr %2, i64 %1 br label %.lr.ph.i .lr.ph.i: ; preds = %.noexc4, %.lr.ph.preheader.i - %.023.i = phi ptr [ %55, %.noexc4 ], [ %2, %.lr.ph.preheader.i ] - %.01622.i = phi i8 [ %53, %.noexc4 ], [ 0, %.lr.ph.preheader.i ] - %.01721.i = phi i32 [ %47, %.noexc4 ], [ 0, %.lr.ph.preheader.i ] - %33 = load i8, ptr %.023.i, align 1 - %34 = zext i8 %33 to i64 - %35 = getelementptr inbounds [364 x i8], ptr @_ZZN5ZXing10Utf8DecodeEhRhRDiE9kUtf8Data, i64 0, i64 %34 - %36 = load i8, ptr %35, align 1 + %.023.i = phi ptr [ %54, %.noexc4 ], [ %2, %.lr.ph.preheader.i ] + %.01622.i = phi i8 [ %52, %.noexc4 ], [ 0, %.lr.ph.preheader.i ] + %.01721.i = phi i32 [ %46, %.noexc4 ], [ 0, %.lr.ph.preheader.i ] + %32 = load i8, ptr %.023.i, align 1 + %33 = zext i8 %32 to i64 + %34 = getelementptr inbounds [364 x i8], ptr @_ZZN5ZXing10Utf8DecodeEhRhRDiE9kUtf8Data, i64 0, i64 %33 + %35 = load i8, ptr %34, align 1 %.not.i10.i = icmp eq i8 %.01622.i, 0 - br i1 %.not.i10.i, label %42, label %37 + br i1 %.not.i10.i, label %41, label %36 -37: ; preds = %.lr.ph.i - %38 = and i8 %33, 63 - %39 = zext nneg i8 %38 to i32 - %40 = shl i32 %.01721.i, 6 - %41 = or disjoint i32 %40, %39 +36: ; preds = %.lr.ph.i + %37 = and i8 %32, 63 + %38 = zext nneg i8 %37 to i32 + %39 = shl i32 %.01721.i, 6 + %40 = or disjoint i32 %39, %38 br label %_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i -42: ; preds = %.lr.ph.i - %43 = zext nneg i8 %36 to i32 - %44 = lshr i32 255, %43 - %45 = zext i8 %33 to i32 - %46 = and i32 %44, %45 +41: ; preds = %.lr.ph.i + %42 = zext nneg i8 %35 to i32 + %43 = lshr i32 255, %42 + %44 = zext i8 %32 to i32 + %45 = and i32 %43, %44 br label %_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i -_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i: ; preds = %42, %37 - %47 = phi i32 [ %41, %37 ], [ %46, %42 ] - %48 = zext i8 %.01622.i to i64 - %49 = zext i8 %36 to i64 - %50 = or disjoint i64 %48, 256 - %51 = add nuw nsw i64 %50, %49 - %52 = getelementptr inbounds [364 x i8], ptr @_ZZN5ZXing10Utf8DecodeEhRhRDiE9kUtf8Data, i64 0, i64 %51 - %53 = load i8, ptr %52, align 1 - %.not9.i = icmp eq i8 %53, 0 - br i1 %.not9.i, label %54, label %.noexc4 - -54: ; preds = %_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i - invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9push_backEw(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef signext %47) +_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i: ; preds = %41, %36 + %46 = phi i32 [ %40, %36 ], [ %45, %41 ] + %47 = zext i8 %.01622.i to i64 + %48 = zext i8 %35 to i64 + %49 = or disjoint i64 %47, 256 + %50 = add nuw nsw i64 %49, %48 + %51 = getelementptr inbounds [364 x i8], ptr @_ZZN5ZXing10Utf8DecodeEhRhRDiE9kUtf8Data, i64 0, i64 %50 + %52 = load i8, ptr %51, align 1 + %.not9.i = icmp eq i8 %52, 0 + br i1 %.not9.i, label %53, label %.noexc4 + +53: ; preds = %_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i + invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9push_backEw(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef signext %46) to label %.noexc4 unwind label %.loopexit -.noexc4: ; preds = %54, %_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i - %55 = getelementptr inbounds i8, ptr %.023.i, i64 1 - %.not.i = icmp eq ptr %55, %32 +.noexc4: ; preds = %53, %_ZN5ZXing10Utf8DecodeEhRhRDi.exit.i + %54 = getelementptr inbounds i8, ptr %.023.i, i64 1 + %.not.i = icmp eq ptr %54, %31 br i1 %.not.i, label %_ZN5ZXingL14AppendFromUtf8ESt17basic_string_viewIhSt11char_traitsIhEERNSt7__cxx1112basic_stringIwS1_IwESaIwEEE.exit, label %.lr.ph.i -.loopexit: ; preds = %54 +.loopexit: ; preds = %53 %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %56 + br label %55 .loopexit.split-lp: ; preds = %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread27.i.invoke, %_ZN5ZXingL19Utf8CountCodePointsESt17basic_string_viewIhSt11char_traitsIhEE.exit.thread.i %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup - br label %56 + br label %55 -56: ; preds = %.loopexit.split-lp, %.loopexit +55: ; preds = %.loopexit.split-lp, %.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] tail call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4 resume { ptr, i32 } %lpad.phi diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index 820278fb20a..b56b385ff57 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/110880 # Please rebase manually # git fetch origin