diff --git a/bench/abc/optimized/abcPrint.ll b/bench/abc/optimized/abcPrint.ll index 0986f26435e..faf8fe17c3c 100644 --- a/bench/abc/optimized/abcPrint.ll +++ b/bench/abc/optimized/abcPrint.ll @@ -6605,9 +6605,8 @@ define void @Abc_NodePrintSop(ptr noundef captures(none) %0, ptr noundef %1, i32 %53 = getelementptr inbounds nuw i8, ptr %.1.us, i64 97 %54 = ptrtoint ptr %53 to i64 %55 = sub i64 %54, %47 - %56 = trunc i64 %55 to i32 - %sext.us = shl i32 %56, 24 - %57 = ashr exact i32 %sext.us, 24 + %56 = trunc i64 %55 to i8 + %57 = sext i8 %56 to i32 %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.88, ptr noundef nonnull %52, i32 noundef %57) #20 br label %59 @@ -6623,7 +6622,7 @@ define void @Abc_NodePrintSop(ptr noundef captures(none) %0, ptr noundef %1, i32 br i1 %.not56.us, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !144 .lr.ph.split: ; preds = %.lr.ph, %.loopexit71 - %.04873 = phi ptr [ %81, %.loopexit71 ], [ %22, %.lr.ph ] + %.04873 = phi ptr [ %81, %.loopexit70 ], [ %22, %.lr.ph ] %.not59 = icmp eq ptr %.04873, %22 br i1 %.not59, label %.preheader70, label %64 @@ -6636,7 +6635,7 @@ define void @Abc_NodePrintSop(ptr noundef captures(none) %0, ptr noundef %1, i32 br label %67 67: ; preds = %.preheader70, %78 - %.047 = phi ptr [ %79, %78 ], [ %.04873, %.preheader70 ] + %.047 = phi ptr [ %79, %78 ], [ %.04873, %.preheader69 ] %68 = load i8, ptr %.047, align 1, !tbaa !47 switch i8 %68, label %69 [ i8 32, label %.loopexit71 @@ -6668,7 +6667,7 @@ define void @Abc_NodePrintSop(ptr noundef captures(none) %0, ptr noundef %1, i32 br i1 %.not56, label %._crit_edge, label %.lr.ph.split, !llvm.loop !144 ._crit_edge: ; preds = %.loopexit71, %.loopexit.us, %36 - %.04680 = phi ptr [ %38, %36 ], [ null, %.loopexit.us ], [ %38, %.loopexit71 ] + %.04680 = phi ptr [ %38, %36 ], [ null, %.loopexit.us ], [ %38, %.loopexit70 ] %fputc57 = tail call i32 @fputc(i32 10, ptr %0) %.not58 = icmp eq ptr %.04680, null br i1 %.not58, label %84, label %83 diff --git a/bench/abseil-cpp/optimized/arg.ll b/bench/abseil-cpp/optimized/arg.ll index 812de697c06..15b05d9e9d8 100644 --- a/bench/abseil-cpp/optimized/arg.ll +++ b/bench/abseil-cpp/optimized/arg.ll @@ -3347,9 +3347,8 @@ define weak_odr dso_local noundef zeroext i1 @_ZN4absl19str_format_internal13For 7: ; preds = %4 %8 = ptrtoint ptr %0 to i64 - %.sroa.0.0.extract.trunc.i.i = trunc i64 %8 to i32 - %sext.i = shl i32 %.sroa.0.0.extract.trunc.i.i, 24 - %9 = ashr exact i32 %sext.i, 24 + %.sroa.0.0.extract.trunc.i.i = trunc i64 %8 to i8 + %9 = sext i8 %.sroa.0.0.extract.trunc.i.i to i32 store i32 %9, ptr %3, align 4, !tbaa !37 br label %16 @@ -3385,9 +3384,8 @@ define weak_odr dso_local noundef zeroext i1 @_ZN4absl19str_format_internal13For 7: ; preds = %4 %8 = ptrtoint ptr %0 to i64 - %.sroa.0.0.extract.trunc.i.i = trunc i64 %8 to i32 - %sext.i = shl i32 %.sroa.0.0.extract.trunc.i.i, 24 - %9 = ashr exact i32 %sext.i, 24 + %.sroa.0.0.extract.trunc.i.i = trunc i64 %8 to i8 + %9 = sext i8 %.sroa.0.0.extract.trunc.i.i to i32 store i32 %9, ptr %3, align 4, !tbaa !37 br label %16 @@ -3460,9 +3458,8 @@ define weak_odr dso_local noundef zeroext i1 @_ZN4absl19str_format_internal13For 7: ; preds = %4 %8 = ptrtoint ptr %0 to i64 - %.sroa.0.0.extract.trunc.i.i = trunc i64 %8 to i32 - %sext.i = shl i32 %.sroa.0.0.extract.trunc.i.i, 16 - %9 = ashr exact i32 %sext.i, 16 + %.sroa.0.0.extract.trunc.i.i = trunc i64 %8 to i16 + %9 = sext i16 %.sroa.0.0.extract.trunc.i.i to i32 store i32 %9, ptr %3, align 4, !tbaa !37 br label %16 diff --git a/bench/abseil-cpp/optimized/log_format.ll b/bench/abseil-cpp/optimized/log_format.ll index 048353a92ed..c967d8127d1 100644 --- a/bench/abseil-cpp/optimized/log_format.ll +++ b/bench/abseil-cpp/optimized/log_format.ll @@ -67,19 +67,18 @@ _ZN4absl15LogSeverityNameENS_11LogSeverityE.exit: ; preds = %11, %switch.lookup _ZN4absl19ToInt64MicrosecondsENS_8DurationE.exit: ; preds = %17, %22 %.0.i8 = phi i64 [ %21, %17 ], [ %23, %22 ] - %sh.diff = lshr i64 %3, 8 - %tr.sh.diff = trunc i64 %sh.diff to i32 - %24 = ashr i32 %tr.sh.diff, 24 - %25 = trunc i64 %3 to i32 - %26 = ashr i32 %25, 24 - %27 = shl i32 %25, 8 - %28 = ashr i32 %27, 24 - %29 = shl i32 %25, 16 - %30 = ashr i32 %29, 24 - %sext = shl i32 %25, 24 - %31 = ashr exact i32 %sext, 24 - %32 = icmp eq i32 %9, 1 - %33 = select i1 %32, ptr @.str.1, ptr @.str.2 + %24 = shl i64 %3, 24 + %25 = ashr i64 %24, 56 + %26 = shl i64 %3, 32 + %27 = ashr i64 %26, 56 + %28 = shl i64 %3, 40 + %29 = ashr i64 %28, 56 + %30 = shl i64 %3, 48 + %31 = ashr i64 %30, 56 + %sext = shl i64 %3, 56 + %32 = ashr exact i64 %sext, 56 + %33 = icmp eq i32 %9, 1 + %34 = select i1 %33, ptr @.str.1, ptr @.str.2 call void @llvm.lifetime.start.p0(ptr nonnull %12), !noalias !4 %.sroa.0.0.copyload.i.i.i.i = load i8, ptr %.0.i, align 1, !noalias !4 %.sroa.0.0.insert.ext.i.i.i.i = zext i8 %.sroa.0.0.copyload.i.i.i.i to i64 @@ -88,31 +87,31 @@ _ZN4absl19ToInt64MicrosecondsENS_8DurationE.exit: ; preds = %17, %22 %35 = getelementptr inbounds nuw i8, ptr %12, i64 8 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIcEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %35, align 8, !tbaa !10, !noalias !4 %36 = getelementptr inbounds nuw i8, ptr %12, i64 16 - %.sroa.0.0.insert.ext.i.i.i16.i = zext i32 %31 to i64 + %.sroa.0.0.insert.ext.i.i.i16.i = and i64 %32, 4294967295 %37 = inttoptr i64 %.sroa.0.0.insert.ext.i.i.i16.i to ptr store ptr %37, ptr %36, align 8, !tbaa !7, !noalias !4 %38 = getelementptr inbounds nuw i8, ptr %12, i64 24 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIiEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %38, align 8, !tbaa !10, !noalias !4 %39 = getelementptr inbounds nuw i8, ptr %12, i64 32 - %.sroa.0.0.insert.ext.i.i.i18.i = zext i32 %30 to i64 + %.sroa.0.0.insert.ext.i.i.i18.i = and i64 %31, 4294967295 %40 = inttoptr i64 %.sroa.0.0.insert.ext.i.i.i18.i to ptr store ptr %40, ptr %39, align 8, !tbaa !7, !noalias !4 %41 = getelementptr inbounds nuw i8, ptr %12, i64 40 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIiEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %41, align 8, !tbaa !10, !noalias !4 %42 = getelementptr inbounds nuw i8, ptr %12, i64 48 - %.sroa.0.0.insert.ext.i.i.i20.i = zext i32 %28 to i64 + %.sroa.0.0.insert.ext.i.i.i20.i = and i64 %29, 4294967295 %43 = inttoptr i64 %.sroa.0.0.insert.ext.i.i.i20.i to ptr store ptr %43, ptr %42, align 8, !tbaa !7, !noalias !4 %44 = getelementptr inbounds nuw i8, ptr %12, i64 56 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIiEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %44, align 8, !tbaa !10, !noalias !4 %45 = getelementptr inbounds nuw i8, ptr %12, i64 64 - %.sroa.0.0.insert.ext.i.i.i22.i = zext i32 %26 to i64 + %.sroa.0.0.insert.ext.i.i.i22.i = and i64 %27, 4294967295 %46 = inttoptr i64 %.sroa.0.0.insert.ext.i.i.i22.i to ptr store ptr %46, ptr %45, align 8, !tbaa !7, !noalias !4 %47 = getelementptr inbounds nuw i8, ptr %12, i64 72 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIiEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %47, align 8, !tbaa !10, !noalias !4 %48 = getelementptr inbounds nuw i8, ptr %12, i64 80 - %.sroa.0.0.insert.ext.i.i.i24.i = zext i32 %24 to i64 + %.sroa.0.0.insert.ext.i.i.i24.i = and i64 %25, 4294967295 %49 = inttoptr i64 %.sroa.0.0.insert.ext.i.i.i24.i to ptr store ptr %49, ptr %48, align 8, !tbaa !7, !noalias !4 %50 = getelementptr inbounds nuw i8, ptr %12, i64 88 @@ -139,7 +138,7 @@ _ZN4absl19ToInt64MicrosecondsENS_8DurationE.exit: ; preds = %17, %22 %61 = getelementptr inbounds nuw i8, ptr %12, i64 152 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIiEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %61, align 8, !tbaa !10, !noalias !4 %62 = getelementptr inbounds nuw i8, ptr %12, i64 160 - store ptr %33, ptr %62, align 8, !tbaa !7, !noalias !4 + store ptr %34, ptr %62, align 8, !tbaa !7, !noalias !4 %63 = getelementptr inbounds nuw i8, ptr %12, i64 168 store ptr @_ZN4absl19str_format_internal13FormatArgImpl8DispatchIPKcEEbNS1_4DataENS0_24FormatConversionSpecImplEPv, ptr %63, align 8, !tbaa !10, !noalias !4 %64 = getelementptr inbounds nuw i8, ptr %12, i64 176 diff --git a/bench/arrow/optimized/bridge.ll b/bench/arrow/optimized/bridge.ll index 202d6c69547..060fa40d631 100644 --- a/bench/arrow/optimized/bridge.ll +++ b/bench/arrow/optimized/bridge.ll @@ -5363,9 +5363,8 @@ _ZN5arrow6StatusD2Ev.exit42: ; preds = %_ZN5arrow6StatusD2E %.sroa.0.0.copyload.i.i = phi i64 [ %.sroa.0.0.copyload.i.i.pre, %._crit_edge ], [ %.sroa.0.0.insert.ext.i.i, %.thread ] %52 = and i64 %.sroa.0.0.copyload.i.i, 256 %.not55 = icmp eq i64 %52, 0 - %.sroa.0.0.extract.trunc = trunc i64 %.sroa.0.0.copyload.i.i to i32 - %sext = shl i32 %.sroa.0.0.extract.trunc, 24 - %53 = ashr exact i32 %sext, 24 + %.sroa.0.0.extract.trunc = trunc i64 %.sroa.0.0.copyload.i.i to i8 + %53 = sext i8 %.sroa.0.0.extract.trunc to i32 %.sink = select i1 %.not55, i32 1, i32 %53 %54 = getelementptr inbounds nuw i8, ptr %3, i64 88 store i32 %.sink, ptr %54, align 8, !tbaa !506 @@ -5796,9 +5795,8 @@ _ZN5arrow6StatusD2Ev.exit50: ; preds = %_ZN5arrow6StatusD2E %.sroa.0.0.copyload.i.i = phi i64 [ %.sroa.0.0.copyload.i.i.pre, %._crit_edge ], [ %.sroa.0.0.insert.ext.i.i, %.thread ] %63 = and i64 %.sroa.0.0.copyload.i.i, 256 %.not68 = icmp eq i64 %63, 0 - %.sroa.0.0.extract.trunc = trunc i64 %.sroa.0.0.copyload.i.i to i32 - %sext = shl i32 %.sroa.0.0.extract.trunc, 24 - %64 = ashr exact i32 %sext, 24 + %.sroa.0.0.extract.trunc = trunc i64 %.sroa.0.0.copyload.i.i to i8 + %64 = sext i8 %.sroa.0.0.extract.trunc to i32 %.sink = select i1 %.not68, i32 1, i32 %64 %65 = getelementptr inbounds nuw i8, ptr %3, i64 88 store i32 %.sink, ptr %65, align 8, !tbaa !506 diff --git a/bench/arrow/optimized/list_util.ll b/bench/arrow/optimized/list_util.ll index a1a436878c6..7d85dc545de 100644 --- a/bench/arrow/optimized/list_util.ll +++ b/bench/arrow/optimized/list_util.ll @@ -2038,10 +2038,10 @@ define linkonce_odr void @_ZN5arrow8internal19BaseSetBitRunReaderILb1EEC2EPKhll( br i1 %or.cond, label %16, label %35 16: ; preds = %4 - %17 = trunc nsw i64 %13 to i32 - %18 = getelementptr inbounds nuw i8, ptr %12, i64 1 - %19 = trunc i64 %3 to i32 - %.sroa.speculated = tail call i32 @llvm.smin.i32(i32 %17, i32 %19) + %17 = getelementptr inbounds nuw i8, ptr %12, i64 1 + %18 = trunc i64 %3 to i32 + %19 = trunc nsw i64 %13 to i32 + %.sroa.speculated = tail call i32 @llvm.smin.i32(i32 %19, i32 %18) store i32 %.sroa.speculated, ptr %9, align 8, !tbaa !116 %20 = sub nsw i64 8, %13 %21 = sext i32 %.sroa.speculated to i64 @@ -2053,7 +2053,7 @@ define linkonce_odr void @_ZN5arrow8internal19BaseSetBitRunReaderILb1EEC2EPKhll( %25 = zext i1 %24 to i64 %26 = add nsw i64 %22, %25 %27 = sub nsw i64 0, %26 - %28 = getelementptr inbounds i8, ptr %18, i64 %27 + %28 = getelementptr inbounds i8, ptr %17, i64 %27 store ptr %28, ptr %0, align 8, !tbaa !117 %29 = getelementptr inbounds nuw i8, ptr %5, i64 8 %30 = getelementptr inbounds i8, ptr %29, i64 %27 diff --git a/bench/chibicc/optimized/parse.ll b/bench/chibicc/optimized/parse.ll index 9ed7a79d053..219ba31e5c3 100644 --- a/bench/chibicc/optimized/parse.ll +++ b/bench/chibicc/optimized/parse.ll @@ -1876,7 +1876,7 @@ tailrecurse.outer._crit_edge: ; preds = %tailrecurse.outer, 8: ; preds = %.lr.ph, %tailrecurse.backedge %.tr242 = phi ptr [ %.tr.ph247, %.lr.ph ], [ %.tr.be, %tailrecurse.backedge ] %9 = load i32, ptr %.tr242, align 16, !tbaa !7 - switch i32 %9, label %297 [ + switch i32 %9, label %293 [ i32 1, label %tailrecurse.outer i32 2, label %19 i32 3, label %27 @@ -1899,9 +1899,9 @@ tailrecurse.outer._crit_edge: ; preds = %tailrecurse.outer, i32 24, label %201 i32 25, label %211 i32 43, label %221 - i32 20, label %252 - i32 36, label %256 - i32 19, label %258 + i32 20, label %250 + i32 36, label %252 + i32 19, label %254 i32 40, label %279 i32 42, label %294 ] @@ -1920,7 +1920,7 @@ tailrecurse.outer: ; preds = %8 br i1 %18, label %tailrecurse.outer._crit_edge, label %.lr.ph common.ret650: ; preds = %47, %49, %67, %69, %159, %162, %177, %180, %300, %215, %205, %196, %191, %138, %129, %121, %113, %95, %87, %79, %71, %51, %27, %19 - %common.ret650.op = phi i64 [ %accumulator.ret.tr, %19 ], [ %accumulator.ret.tr111, %27 ], [ %accumulator.ret.tr114, %51 ], [ %accumulator.ret.tr117, %71 ], [ %accumulator.ret.tr118, %79 ], [ %accumulator.ret.tr119, %87 ], [ %accumulator.ret.tr120, %95 ], [ %accumulator.ret.tr121, %113 ], [ %accumulator.ret.tr122, %121 ], [ %accumulator.ret.tr123, %129 ], [ %accumulator.ret.tr124, %138 ], [ %accumulator.ret.tr129, %191 ], [ %accumulator.ret.tr130, %196 ], [ %accumulator.ret.tr131, %205 ], [ %accumulator.ret.tr132, %215 ], [ %accumulator.ret.tr112, %47 ], [ %accumulator.ret.tr113, %49 ], [ %accumulator.ret.tr115, %67 ], [ %accumulator.ret.tr116, %69 ], [ %accumulator.ret.tr125, %159 ], [ %accumulator.ret.tr126, %162 ], [ %accumulator.ret.tr127, %177 ], [ %accumulator.ret.tr128, %180 ], [ %accumulator.ret.tr133, %300 ] + %common.ret650.op = phi i64 [ %accumulator.ret.tr, %19 ], [ %accumulator.ret.tr111, %27 ], [ %accumulator.ret.tr114, %51 ], [ %accumulator.ret.tr117, %71 ], [ %accumulator.ret.tr118, %79 ], [ %accumulator.ret.tr119, %87 ], [ %accumulator.ret.tr120, %95 ], [ %accumulator.ret.tr121, %113 ], [ %accumulator.ret.tr122, %121 ], [ %accumulator.ret.tr123, %129 ], [ %accumulator.ret.tr124, %138 ], [ %accumulator.ret.tr129, %191 ], [ %accumulator.ret.tr130, %196 ], [ %accumulator.ret.tr131, %205 ], [ %accumulator.ret.tr132, %215 ], [ %accumulator.ret.tr112, %47 ], [ %accumulator.ret.tr113, %49 ], [ %accumulator.ret.tr115, %67 ], [ %accumulator.ret.tr116, %69 ], [ %accumulator.ret.tr125, %159 ], [ %accumulator.ret.tr126, %162 ], [ %accumulator.ret.tr127, %177 ], [ %accumulator.ret.tr128, %180 ], [ %accumulator.ret.tr133, %296 ] ret i64 %common.ret650.op 19: ; preds = %8 @@ -2236,75 +2236,71 @@ tailrecurse.backedge: ; preds = %183, %8 %229 = load ptr, ptr %222, align 16, !tbaa !24 %230 = getelementptr inbounds nuw i8, ptr %229, i64 4 %231 = load i32, ptr %230, align 4, !tbaa !92 - switch i32 %231, label %300 [ + switch i32 %231, label %296 [ i32 1, label %232 - i32 2, label %241 - i32 4, label %250 + i32 2, label %239 + i32 4, label %246 ] 232: ; preds = %228 %233 = getelementptr inbounds nuw i8, ptr %229, i64 12 %234 = load i8, ptr %233, align 4, !tbaa !115, !range !58, !noundef !59 %235 = trunc nuw i8 %234 to i1 - %236 = trunc i64 %225 to i32 - %237 = and i32 %236, 255 - %sext105 = shl i32 %236, 24 - %238 = ashr exact i32 %sext105, 24 - %239 = select i1 %235, i32 %237, i32 %238 - %240 = sext i32 %239 to i64 + %236 = and i64 %225, 255 + %sext105 = shl i64 %225, 56 + %237 = ashr exact i64 %sext105, 56 + %238 = select i1 %235, i64 %236, i64 %237 + br label %296 + +239:; preds = %228 + %240 = getelementptr inbounds nuw i8, ptr %229, i64 12 + %241 = load i8, ptr %240, align 4, !tbaa !115, !range !58, !noundef !59 + %242 = trunc nuw i8 %241 to i1 + %243 = and i64 %225, 65535 + %sext = shl i64 %225, 48 + %244 = ashr exact i64 %sext, 48 + %245 = select i1 %242, i64 %243, i64 %244 + br label %296 + +246:; preds = %228 + %247 = and i64 %225, 4294967295 br label %300 -241: ; preds = %228 - %242 = getelementptr inbounds nuw i8, ptr %229, i64 12 - %243 = load i8, ptr %242, align 4, !tbaa !115, !range !58, !noundef !59 - %244 = trunc nuw i8 %243 to i1 - %245 = trunc i64 %225 to i32 - %246 = and i32 %245, 65535 - %sext = shl i32 %245, 16 - %247 = ashr exact i32 %sext, 16 - %248 = select i1 %244, i32 %246, i32 %247 - %249 = sext i32 %248 to i64 - br label %300 - -250: ; preds = %228 - %251 = and i64 %225, 4294967295 - br label %300 +250: ; preds = %8 + %249 = getelementptr inbounds nuw i8, ptr %.tr242, i64 32 + %250 = load ptr, ptr %249, align 16, !tbaa !23 + %251 = tail call fastcc i64 @eval_rval(ptr noundef %250, ptr noundef %.tr110.ph248) + br label %296 252: ; preds = %8 - %253 = getelementptr inbounds nuw i8, ptr %.tr242, i64 32 - %254 = load ptr, ptr %253, align 16, !tbaa !23 - %255 = tail call fastcc i64 @eval_rval(ptr noundef %254, ptr noundef %.tr110.ph248) - br label %300 + %253 = getelementptr inbounds nuw i8, ptr %.tr242, i64 160 + store ptr %253, ptr %.tr110.ph248, align 8, !tbaa !116 + br label %296 256: ; preds = %8 - %257 = getelementptr inbounds nuw i8, ptr %.tr242, i64 160 - store ptr %257, ptr %.tr110.ph248, align 8, !tbaa !116 - br label %300 - -258: ; preds = %8 %.not103 = icmp eq ptr %.tr110.ph248, null - br i1 %.not103, label %259, label %262 + br i1 %.not103, label %259, label %258 -259: ; preds = %258 +259: ; preds = %254 %260 = getelementptr inbounds nuw i8, ptr %.tr242, i64 24 %261 = load ptr, ptr %260, align 8, !tbaa !22 tail call void (ptr, ptr, ...) @error_tok(ptr noundef %261, ptr noundef nonnull @.str) #16 unreachable +258: ; preds = %254 + %259 = getelementptr inbounds nuw i8, ptr %.tr242, i64 16 + %260 = load ptr, ptr %259, align 16, !tbaa !24 + %261 = load i32, ptr %260, align 8, !tbaa !61 + %.not104 = icmp eq i32 %261, 12 + br i1 %.not104, label %265, label %262 + 262: ; preds = %258 - %263 = getelementptr inbounds nuw i8, ptr %.tr242, i64 16 - %264 = load ptr, ptr %263, align 16, !tbaa !24 - %265 = load i32, ptr %264, align 8, !tbaa !61 - %.not104 = icmp eq i32 %265, 12 - br i1 %.not104, label %269, label %266 - -266: ; preds = %262 - %267 = getelementptr inbounds nuw i8, ptr %.tr242, i64 24 - %268 = load ptr, ptr %267, align 8, !tbaa !22 - tail call void (ptr, ptr, ...) @error_tok(ptr noundef %268, ptr noundef nonnull @.str.1) #16 + %263 = getelementptr inbounds nuw i8, ptr %.tr242, i64 24 + %264 = load ptr, ptr %263, align 8, !tbaa !22 + tail call void (ptr, ptr, ...) @error_tok(ptr noundef %264, ptr noundef nonnull @.str.1) #16 unreachable -269: ; preds = %262 +269: ; preds = %258 %270 = getelementptr inbounds nuw i8, ptr %.tr242, i64 32 %271 = load ptr, ptr %270, align 16, !tbaa !23 %272 = tail call fastcc i64 @eval_rval(ptr noundef %271, ptr noundef nonnull %.tr110.ph248) @@ -2358,9 +2354,9 @@ tailrecurse.backedge: ; preds = %183, %8 tail call void (ptr, ptr, ...) @error_tok(ptr noundef %299, ptr noundef nonnull @.str) #16 unreachable -300: ; preds = %232, %241, %250, %228, %221, %211, %201, %294, %292, %269, %256, %252, %tailrecurse.outer._crit_edge - %accumulator.tr.ph236 = phi i64 [ %accumulator.tr.ph.lcssa235, %tailrecurse.outer._crit_edge ], [ %accumulator.tr.ph246, %252 ], [ %accumulator.tr.ph246, %256 ], [ %accumulator.tr.ph246, %269 ], [ %accumulator.tr.ph246, %292 ], [ %accumulator.tr.ph246, %294 ], [ %accumulator.tr.ph246, %201 ], [ %accumulator.tr.ph246, %211 ], [ %accumulator.tr.ph246, %232 ], [ %accumulator.tr.ph246, %241 ], [ %accumulator.tr.ph246, %250 ], [ %accumulator.tr.ph246, %228 ], [ %accumulator.tr.ph246, %221 ] - %.0 = phi i64 [ %7, %tailrecurse.outer._crit_edge ], [ %255, %252 ], [ 0, %256 ], [ %278, %269 ], [ 0, %292 ], [ %296, %294 ], [ 0, %201 ], [ 1, %211 ], [ %240, %232 ], [ %249, %241 ], [ %251, %250 ], [ %225, %228 ], [ %225, %221 ] +300: ; preds = %232, %239, %246, %228, %221, %211, %201, %294, %292, %269, %252, %250, %tailrecurse.outer._crit_edge + %accumulator.tr.ph236 = phi i64 [ %accumulator.tr.ph.lcssa235, %tailrecurse.outer._crit_edge ], [ %accumulator.tr.ph246, %248 ], [ %accumulator.tr.ph246, %252 ], [ %accumulator.tr.ph246, %265 ], [ %accumulator.tr.ph246, %288 ], [ %accumulator.tr.ph246, %290 ], [ %accumulator.tr.ph246, %201 ], [ %accumulator.tr.ph246, %211 ], [ %accumulator.tr.ph246, %232 ], [ %accumulator.tr.ph246, %239 ], [ %accumulator.tr.ph246, %246 ], [ %accumulator.tr.ph246, %228 ], [ %accumulator.tr.ph246, %221 ] + %.0 = phi i64 [ %7, %tailrecurse.outer._crit_edge ], [ %251, %248 ], [ 0, %252 ], [ %278, %265 ], [ 0, %288 ], [ %292, %290 ], [ 0, %201 ], [ 1, %211 ], [ %238, %232 ], [ %245, %239 ], [ %247, %246 ], [ %225, %228 ], [ %225, %221 ] %accumulator.ret.tr133 = add nsw i64 %.0, %accumulator.tr.ph236 br label %common.ret650 } diff --git a/bench/cmake/optimized/xmlparse.ll b/bench/cmake/optimized/xmlparse.ll index 18a73d0ac65..8934518736b 100644 --- a/bench/cmake/optimized/xmlparse.ll +++ b/bench/cmake/optimized/xmlparse.ll @@ -17127,21 +17127,19 @@ define internal fastcc i64 @sip24_final(ptr noundef nonnull %0) unnamed_addr #13 %5 = ptrtoint ptr %3 to i64 %6 = ptrtoint ptr %4 to i64 %7 = sub i64 %5, %6 - %8 = trunc i64 %7 to i32 + %8 = trunc i64 %7 to i8 %9 = getelementptr inbounds nuw i8, ptr %0, i64 48 %10 = load i64, ptr %9, align 8, !tbaa !319 %11 = add i64 %7, %10 %12 = shl i64 %11, 56 - %sext = shl i32 %8, 24 - %13 = ashr exact i32 %sext, 24 - switch i32 %13, label %54 [ - i32 7, label %14 - i32 6, label %20 - i32 5, label %26 - i32 4, label %32 - i32 3, label %38 - i32 2, label %44 - i32 1, label %50 + switch i8 %8, label %53 [ + i8 7, label %14 + i8 6, label %19 + i8 5, label %25 + i8 4, label %32 + i8 3, label %37 + i8 2, label %43 + i8 1, label %49 ] 14: ; preds = %1 @@ -17153,7 +17151,7 @@ define internal fastcc i64 @sip24_final(ptr noundef nonnull %0) unnamed_addr #13 br label %20 20: ; preds = %14, %1 - %.1 = phi i64 [ %19, %14 ], [ %12, %1 ] + %.1 = phi i64 [ %19, %13 ], [ %12, %1 ] %21 = getelementptr inbounds nuw i8, ptr %0, i64 37 %22 = load i8, ptr %21, align 1, !tbaa !61 %23 = zext i8 %22 to i64 @@ -17162,7 +17160,7 @@ define internal fastcc i64 @sip24_final(ptr noundef nonnull %0) unnamed_addr #13 br label %26 26: ; preds = %20, %1 - %.2 = phi i64 [ %25, %20 ], [ %12, %1 ] + %.2 = phi i64 [ %25, %19 ], [ %12, %1 ] %27 = getelementptr inbounds nuw i8, ptr %0, i64 36 %28 = load i8, ptr %27, align 4, !tbaa !61 %29 = zext i8 %28 to i64 @@ -17171,41 +17169,41 @@ define internal fastcc i64 @sip24_final(ptr noundef nonnull %0) unnamed_addr #13 br label %32 32: ; preds = %26, %1 - %.3 = phi i64 [ %31, %26 ], [ %12, %1 ] + %.3 = phi i64 [ %31, %25 ], [ %12, %1 ] %33 = getelementptr inbounds nuw i8, ptr %0, i64 35 %34 = load i8, ptr %33, align 1, !tbaa !61 %35 = zext i8 %34 to i64 %36 = shl nuw nsw i64 %35, 24 %37 = or i64 %36, %.3 - br label %38 + br label %37 + +37: ; preds = %31, %1 + %.4 = phi i64 [ %36, %31 ], [ %12, %1 ] + %38 = getelementptr inbounds nuw i8, ptr %0, i64 34 + %39 = load i8, ptr %38, align 2, !tbaa !61 + %40 = zext i8 %39 to i64 + %41 = shl nuw nsw i64 %40, 16 + %42 = or i64 %41, %.4 + br label %43 -38: ; preds = %32, %1 - %.4 = phi i64 [ %37, %32 ], [ %12, %1 ] - %39 = getelementptr inbounds nuw i8, ptr %0, i64 34 - %40 = load i8, ptr %39, align 2, !tbaa !61 +38: ; preds = %37, %1 + %.4 = phi i64 [ %42, %37 ], [ %12, %1 ] + %39 = getelementptr inbounds nuw i8, ptr %0, i64 33 + %40 = load i8, ptr %39, align 1, !tbaa !61 %41 = zext i8 %40 to i64 - %42 = shl nuw nsw i64 %41, 16 + %42 = shl nuw nsw i64 %41, 8 %43 = or i64 %42, %.4 - br label %44 - -44: ; preds = %38, %1 - %.5 = phi i64 [ %43, %38 ], [ %12, %1 ] - %45 = getelementptr inbounds nuw i8, ptr %0, i64 33 - %46 = load i8, ptr %45, align 1, !tbaa !61 - %47 = zext i8 %46 to i64 - %48 = shl nuw nsw i64 %47, 8 - %49 = or i64 %48, %.5 - br label %50 + br label %49 -50: ; preds = %44, %1 - %.6 = phi i64 [ %49, %44 ], [ %12, %1 ] +50: ; preds = %43, %1 + %.6 = phi i64 [ %48, %43 ], [ %12, %1 ] %51 = load i8, ptr %4, align 8, !tbaa !61 %52 = zext i8 %51 to i64 %53 = or i64 %.6, %52 br label %54 54: ; preds = %50, %1 - %.0 = phi i64 [ %12, %1 ], [ %53, %50 ] + %.0 = phi i64 [ %12, %1 ], [ %53, %49 ] %55 = getelementptr inbounds nuw i8, ptr %0, i64 24 %56 = load i64, ptr %55, align 8, !tbaa !317 %57 = xor i64 %56, %.0 @@ -17214,14 +17212,43 @@ define internal fastcc i64 @sip24_final(ptr noundef nonnull %0) unnamed_addr #13 %.promoted.i = load i64, ptr %58, align 8, !tbaa !315 %.promoted36.i = load i64, ptr %0, align 8, !tbaa !313 %.promoted40.i = load i64, ptr %59, align 8, !tbaa !316 - br label %60 + br label %59 + +59: ; preds = %59, %53 + %.042.i = phi i32 [ 0, %53 ], [ %78, %59 ] + %60 = phi i64 [ %.promoted.i, %53 ], [ %76, %59 ] + %61 = phi i64 [ %.promoted36.i, %53 ], [ %71, %59 ] + %62 = phi i64 [ %56, %53 ], [ %73, %59 ] + %63 = phi i64 [ %.promoted40.i, %53 ], [ %77, %59 ] + %64 = add i64 %61, %60 + %65 = tail call i64 @llvm.fshl.i64(i64 %60, i64 %60, i64 13) + %66 = xor i64 %64, %65 + %67 = tail call i64 @llvm.fshl.i64(i64 %64, i64 %64, i64 32) + %68 = add i64 %63, %62 + %69 = tail call i64 @llvm.fshl.i64(i64 %62, i64 %62, i64 16) + %70 = xor i64 %68, %69 + %71 = add i64 %70, %67 + %72 = tail call i64 @llvm.fshl.i64(i64 %70, i64 %70, i64 21) + %73 = xor i64 %72, %71 + %74 = add i64 %68, %66 + %75 = tail call i64 @llvm.fshl.i64(i64 %66, i64 %66, i64 17) + %76 = xor i64 %74, %75 + %77 = tail call i64 @llvm.fshl.i64(i64 %74, i64 %74, i64 32) + %78 = add nuw nsw i32 %.042.i, 1 + %exitcond.not.i = icmp eq i32 %78, 2 + br i1 %exitcond.not.i, label %sip_round.exit, label %59, !llvm.loop !343 + +sip_round.exit: ; preds = %59 + %79 = xor i64 %71, %.0 + %80 = xor i64 %77, 255 + br label %81 -60: ; preds = %60, %54 - %.042.i = phi i32 [ 0, %54 ], [ %79, %60 ] - %61 = phi i64 [ %.promoted.i, %54 ], [ %77, %60 ] - %62 = phi i64 [ %.promoted36.i, %54 ], [ %72, %60 ] - %63 = phi i64 [ %57, %54 ], [ %74, %60 ] - %64 = phi i64 [ %.promoted40.i, %54 ], [ %78, %60 ] +60: ; preds = %60, %sip_round.exit + %.042.i = phi i32 [ 0, %sip_round.exit ], [ %79, %81 ] + %61 = phi i64 [ %76, %sip_round.exit ], [ %77, %81 ] + %62 = phi i64 [ %79, %sip_round.exit ], [ %72, %81 ] + %63 = phi i64 [ %73, %sip_round.exit ], [ %74, %81 ] + %64 = phi i64 [ %80, %sip_round.exit ], [ %78, %81 ] %65 = add i64 %62, %61 %66 = tail call i64 @llvm.fshl.i64(i64 %61, i64 %61, i64 13) %67 = xor i64 %65, %66 @@ -17237,47 +17264,18 @@ define internal fastcc i64 @sip24_final(ptr noundef nonnull %0) unnamed_addr #13 %77 = xor i64 %75, %76 %78 = tail call i64 @llvm.fshl.i64(i64 %75, i64 %75, i64 32) %79 = add nuw nsw i32 %.042.i, 1 - %exitcond.not.i = icmp eq i32 %79, 2 + %exitcond.not.i = icmp eq i32 %79, 4 br i1 %exitcond.not.i, label %sip_round.exit, label %60, !llvm.loop !343 sip_round.exit: ; preds = %60 - %80 = xor i64 %72, %.0 - %81 = xor i64 %78, 255 - br label %82 - -82: ; preds = %82, %sip_round.exit - %.042.i33 = phi i32 [ 0, %sip_round.exit ], [ %101, %82 ] - %83 = phi i64 [ %77, %sip_round.exit ], [ %99, %82 ] - %84 = phi i64 [ %80, %sip_round.exit ], [ %94, %82 ] - %85 = phi i64 [ %74, %sip_round.exit ], [ %96, %82 ] - %86 = phi i64 [ %81, %sip_round.exit ], [ %100, %82 ] - %87 = add i64 %84, %83 - %88 = tail call i64 @llvm.fshl.i64(i64 %83, i64 %83, i64 13) - %89 = xor i64 %87, %88 - %90 = tail call i64 @llvm.fshl.i64(i64 %87, i64 %87, i64 32) - %91 = add i64 %86, %85 - %92 = tail call i64 @llvm.fshl.i64(i64 %85, i64 %85, i64 16) - %93 = xor i64 %91, %92 - %94 = add i64 %93, %90 - %95 = tail call i64 @llvm.fshl.i64(i64 %93, i64 %93, i64 21) - %96 = xor i64 %95, %94 - %97 = add i64 %91, %89 - %98 = tail call i64 @llvm.fshl.i64(i64 %89, i64 %89, i64 17) - %99 = xor i64 %97, %98 - %100 = tail call i64 @llvm.fshl.i64(i64 %97, i64 %97, i64 32) - %101 = add nuw nsw i32 %.042.i33, 1 - %exitcond.not.i34 = icmp eq i32 %101, 4 - br i1 %exitcond.not.i34, label %sip_round.exit35, label %82, !llvm.loop !343 - -sip_round.exit35: ; preds = %82 - store i64 %99, ptr %58, align 8, !tbaa !315 - store i64 %94, ptr %0, align 8, !tbaa !313 - store i64 %96, ptr %55, align 8, !tbaa !317 - store i64 %100, ptr %59, align 8, !tbaa !316 - %102 = xor i64 %94, %99 - %103 = xor i64 %102, %100 - %104 = xor i64 %103, %96 - ret i64 %104 + store i64 %77, ptr %57, align 8, !tbaa !315 + store i64 %72, ptr %0, align 8, !tbaa !313 + store i64 %95, ptr %54, align 8, !tbaa !317 + store i64 %99, ptr %58, align 8, !tbaa !316 + %101 = xor i64 %72, %98 + %102 = xor i64 %101, %78 + %103 = xor i64 %102, %95 + ret i64 %103 } ; Function Attrs: nounwind uwtable diff --git a/bench/cpython/optimized/_cursesmodule.ll b/bench/cpython/optimized/_cursesmodule.ll index 5fca78a2ed4..78088bcf7ba 100644 --- a/bench/cpython/optimized/_cursesmodule.ll +++ b/bench/cpython/optimized/_cursesmodule.ll @@ -5712,7 +5712,7 @@ define internal noundef ptr @_curses_resizeterm(ptr noundef %0, ptr noundef read br label %_curses_resizeterm_impl.exit .thread31: ; preds = %10, %16 - %20 = trunc nsw i64 %8 to i32 + %20 = trunc nsw i64 %8 to i16 %21 = getelementptr i8, ptr %1, i64 8 %22 = load ptr, ptr %21, align 8, !tbaa !11 %23 = tail call i64 @PyLong_AsLong(ptr noundef %22) #9 @@ -5753,9 +5753,11 @@ _PyCursesStatefulCheckFunction.exit.thread.i: ; preds = %.thread36 br label %_curses_resizeterm_impl.exit _PyCursesStatefulCheckFunction.exit.i: ; preds = %.thread36 - %38 = trunc nsw i64 %23 to i32 - %39 = tail call i32 @resizeterm(i32 noundef %20, i32 noundef %38) #9 - %.not.i12.i = icmp eq i32 %39, -1 + %38 = trunc nsw i64 %23 to i16 + %39 = sext i16 %20 to i32 + %40 = sext i16 %38 to i32 + %41 = tail call i32 @resizeterm(i32 noundef %39, i32 noundef %40) #9 + %.not.i12.i = icmp eq i32 %41, -1 br i1 %.not.i12.i, label %PyCursesCheckERR.exit.thread.i, label %PyCursesCheckERR.exit.i PyCursesCheckERR.exit.thread.i: ; preds = %_PyCursesStatefulCheckFunction.exit.i @@ -5785,7 +5787,7 @@ PyCursesCheckERR.exit.i: ; preds = %_PyCursesStatefulCh br label %_curses_resizeterm_impl.exit _curses_resizeterm_impl.exit: ; preds = %25, %33, %29, %10, %18, %14, %49, %46, %44, %PyCursesCheckERR.exit.i, %PyCursesCheckERR.exit.thread.i, %_PyCursesStatefulCheckFunction.exit.thread.i, %4 - %.021 = phi ptr [ null, %4 ], [ @_Py_NoneStruct, %PyCursesCheckERR.exit.i ], [ null, %_PyCursesStatefulCheckFunction.exit.thread.i ], [ null, %PyCursesCheckERR.exit.thread.i ], [ null, %44 ], [ null, %46 ], [ null, %49 ], [ null, %14 ], [ null, %18 ], [ null, %10 ], [ null, %29 ], [ null, %33 ], [ null, %25 ] + %.021 = phi ptr [ null, %4 ], [ @_Py_NoneStruct, %PyCursesCheckERR.exit.i ], [ null, %_PyCursesStatefulCheckFunction.exit.thread.i ], [ null, %PyCursesCheckERR.exit.thread.i ], [ null, %46 ], [ null, %48 ], [ null, %51 ], [ null, %14 ], [ null, %18 ], [ null, %10 ], [ null, %29 ], [ null, %33 ], [ null, %25 ] ret ptr %.021 } @@ -5829,7 +5831,7 @@ define internal noundef ptr @_curses_resize_term(ptr noundef %0, ptr noundef rea br label %_curses_resize_term_impl.exit .thread31: ; preds = %10, %16 - %20 = trunc nsw i64 %8 to i32 + %20 = trunc nsw i64 %8 to i16 %21 = getelementptr i8, ptr %1, i64 8 %22 = load ptr, ptr %21, align 8, !tbaa !11 %23 = tail call i64 @PyLong_AsLong(ptr noundef %22) #9 @@ -5870,9 +5872,11 @@ _PyCursesStatefulCheckFunction.exit.thread.i: ; preds = %.thread36 br label %_curses_resize_term_impl.exit _PyCursesStatefulCheckFunction.exit.i: ; preds = %.thread36 - %38 = trunc nsw i64 %23 to i32 - %39 = tail call i32 @resize_term(i32 noundef %20, i32 noundef %38) #9 - %.not.i12.i = icmp eq i32 %39, -1 + %38 = trunc nsw i64 %23 to i16 + %39 = sext i16 %20 to i32 + %40 = sext i16 %38 to i32 + %41 = tail call i32 @resize_term(i32 noundef %39, i32 noundef %40) #9 + %.not.i12.i = icmp eq i32 %41, -1 br i1 %.not.i12.i, label %PyCursesCheckERR.exit.thread.i, label %PyCursesCheckERR.exit.i PyCursesCheckERR.exit.thread.i: ; preds = %_PyCursesStatefulCheckFunction.exit.i @@ -5902,7 +5906,7 @@ PyCursesCheckERR.exit.i: ; preds = %_PyCursesStatefulCh br label %_curses_resize_term_impl.exit _curses_resize_term_impl.exit: ; preds = %25, %33, %29, %10, %18, %14, %49, %46, %44, %PyCursesCheckERR.exit.i, %PyCursesCheckERR.exit.thread.i, %_PyCursesStatefulCheckFunction.exit.thread.i, %4 - %.021 = phi ptr [ null, %4 ], [ @_Py_NoneStruct, %PyCursesCheckERR.exit.i ], [ null, %_PyCursesStatefulCheckFunction.exit.thread.i ], [ null, %PyCursesCheckERR.exit.thread.i ], [ null, %44 ], [ null, %46 ], [ null, %49 ], [ null, %14 ], [ null, %18 ], [ null, %10 ], [ null, %29 ], [ null, %33 ], [ null, %25 ] + %.021 = phi ptr [ null, %4 ], [ @_Py_NoneStruct, %PyCursesCheckERR.exit.i ], [ null, %_PyCursesStatefulCheckFunction.exit.thread.i ], [ null, %PyCursesCheckERR.exit.thread.i ], [ null, %46 ], [ null, %48 ], [ null, %51 ], [ null, %14 ], [ null, %18 ], [ null, %10 ], [ null, %29 ], [ null, %33 ], [ null, %25 ] ret ptr %.021 } diff --git a/bench/cpython/optimized/_testinternalcapi.ll b/bench/cpython/optimized/_testinternalcapi.ll index 9cbe3af96c2..8cc1a06564c 100644 --- a/bench/cpython/optimized/_testinternalcapi.ll +++ b/bench/cpython/optimized/_testinternalcapi.ll @@ -5039,11 +5039,10 @@ declare i32 @_Py_hashtable_foreach(ptr noundef, ptr noundef, ptr noundef) local_ ; Function Attrs: nounwind uwtable define internal noundef i32 @hashtable_cb(ptr readnone captures(none) %0, ptr noundef %1, ptr noundef %2, ptr noundef captures(none) %3) #0 { %5 = ptrtoint ptr %1 to i64 - %6 = trunc i64 %5 to i32 + %6 = trunc i64 %5 to i8 %7 = ptrtoint ptr %2 to i64 %8 = trunc i64 %7 to i32 - %sext = shl i32 %6, 24 - %9 = ashr exact i32 %sext, 24 + %9 = sext i8 %6 to i32 %10 = add nsw i32 %9, -96 %11 = icmp eq i32 %10, %8 br i1 %11, label %13, label %12 diff --git a/bench/duckdb/optimized/libfsst.ll b/bench/duckdb/optimized/libfsst.ll index ffd732b1043..3dc1cbb53fa 100644 --- a/bench/duckdb/optimized/libfsst.ll +++ b/bench/duckdb/optimized/libfsst.ll @@ -909,7 +909,7 @@ _ZN8Counters13count1GetNextERj.exit: ; preds = %24 45: ; preds = %_ZN8Counters13count1GetNextERj.exit %46 = getelementptr inbounds nuw %struct.Symbol, ptr %20, i64 %38 %.sroa.022.0.copyload = load i64, ptr %46, align 8, !tbaa !8 - %.sroa.022.sroa.0.0.extract.trunc = trunc i64 %.sroa.022.0.copyload to i32 + %.sroa.022.sroa.0.0.extract.trunc = trunc i64 %.sroa.022.0.copyload to i8 %.sroa.7.0..sroa_idx = getelementptr inbounds nuw i8, ptr %46, i64 8 %.sroa.7.0.copyload = load i64, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !30 %47 = lshr i64 %.sroa.7.0.copyload, 28 @@ -929,8 +929,7 @@ _ZN8Counters13count1GetNextERj.exit: ; preds = %24 br i1 %or.cond, label %_ZN8Counters13count1GetNextERj.exit.thread, label %56 56: ; preds = %52 - %sext45 = shl i32 %.sroa.022.sroa.0.0.extract.trunc, 24 - %57 = ashr exact i32 %sext45, 24 + %57 = sext i8 %.sroa.022.sroa.0.0.extract.trunc to i32 %58 = load i16, ptr %21, align 4, !tbaa !28 %59 = zext i16 %58 to i32 %60 = icmp eq i32 %57, %59 @@ -1000,9 +999,8 @@ _ZN8Counters13count2GetNextEjRj.exit: ; preds = %82 98: ; preds = %_ZN8Counters13count2GetNextEjRj.exit %99 = getelementptr inbounds nuw %struct.Symbol, ptr %20, i64 %91 %.sroa.012.0.copyload = load i64, ptr %99, align 8, !tbaa !8 - %.sroa.012.sroa.0.0.extract.trunc = trunc i64 %.sroa.012.0.copyload to i32 - %sext = shl i32 %.sroa.012.sroa.0.0.extract.trunc, 24 - %100 = ashr exact i32 %sext, 24 + %.sroa.012.sroa.0.0.extract.trunc = trunc i64 %.sroa.012.0.copyload to i8 + %100 = sext i8 %.sroa.012.sroa.0.0.extract.trunc to i32 %101 = load i16, ptr %21, align 4, !tbaa !28 %102 = zext i16 %101 to i32 %.not48 = icmp eq i32 %100, %102 @@ -1265,13 +1263,13 @@ _ZNSt6vectorI7QSymbolSaIS0_EE9push_backERKS0_.exit.i: ; preds = %_ZNSt6vectorI7Q br label %199 199: ; preds = %.loopexit.split-lp, %.loopexit46 - %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit46 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] + %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit45 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] %.not.i.i.i.i101 = icmp eq ptr %.sroa.013.058, null br i1 %.not.i.i.i.i101, label %"_ZNSt14priority_queueI7QSymbolSt6vectorIS0_SaIS0_EEZZ16buildSymbolTableR8CountersS1_IPhSaIS6_EEPmbENK3$_2clEP11SymbolTableS5_EUlRKS0_SE_E_ED2Ev.exit102", label %299 200: ; preds = %.lr.ph62, %_ZN11SymbolTable3addE6Symbol.exit - %.pr69 = phi i16 [ 0, %.lr.ph62 ], [ %.pr, %_ZN11SymbolTable3addE6Symbol.exit ] - %.sroa.13.261 = phi ptr [ %.sroa.13.0.lcssa, %.lr.ph62 ], [ %248, %_ZN11SymbolTable3addE6Symbol.exit ] + %.pr69 = phi i16 [ 0, %.lr.ph61 ], [ %.pr, %_ZN11SymbolTable3addE6Symbol.exit ] + %.sroa.13.261 = phi ptr [ %.sroa.13.0.lcssa, %.lr.ph61 ], [ %248, %_ZN11SymbolTable3addE6Symbol.exit ] %.sroa.01.0.copyload = load i64, ptr %.sroa.013.0.lcssa, align 8, !tbaa !8 %.sroa.5.0.copyload = load i64, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !30 %201 = ptrtoint ptr %.sroa.13.261 to i64 diff --git a/bench/eastl/optimized/EASprintfCore.ll b/bench/eastl/optimized/EASprintfCore.ll index c846b3944a7..9cf269a539b 100644 --- a/bench/eastl/optimized/EASprintfCore.ll +++ b/bench/eastl/optimized/EASprintfCore.ll @@ -1820,8 +1820,8 @@ if.end156: ; preds = %if.else139, %vaarg. br i1 %cmp158, label %if.then159, label %if.else164 if.then159: ; preds = %if.end156.thread182, %if.end156 - %lValue.2187 = phi i64 [ %lValue.0.ph262, %if.end156.thread182 ], [ %lValue.2, %if.end156 ] - %llValue.2186 = phi i64 [ %11, %if.end156.thread182 ], [ %llValue.0.ph260, %if.end156 ] + %lValue.2187 = phi i64 [ %lValue.0.ph262, %if.end156.thread181 ], [ %lValue.2, %if.end156 ] + %llValue.2186 = phi i64 [ %11, %if.end156.thread181 ], [ %llValue.0.ph260, %if.end156 ] %call.i = call noundef ptr @_ZN2EA4StdC12SprintfLocal15WriteLongHelperIDsxyEEPT_RKNS1_10FormatDataET0_S4_(ptr noundef nonnull align 4 dereferenceable(40) %fd, i64 noundef %llValue.2186, ptr noundef nonnull %add.ptr) %tobool161.not = icmp eq ptr %call.i, null br i1 %tobool161.not, label %FormatError, label %if.end169 @@ -2062,8 +2062,8 @@ if.end329: ; preds = %if.else312, %if.els br i1 %cmp331, label %if.then332, label %if.else337 if.then332: ; preds = %if.end329.thread195, %if.end329 - %ulValue.4200 = phi i64 [ %ulValue.0.ph261, %if.end329.thread195 ], [ %ulValue.4, %if.end329 ] - %ullValue.4199 = phi i64 [ %50, %if.end329.thread195 ], [ %ullValue.0.ph259, %if.end329 ] + %ulValue.4200 = phi i64 [ %ulValue.0.ph261, %if.end329.thread194 ], [ %ulValue.4, %if.end329 ] + %ullValue.4199 = phi i64 [ %50, %if.end329.thread194 ], [ %ullValue.0.ph259, %if.end329 ] %call.i127 = call noundef ptr @_ZN2EA4StdC12SprintfLocal15WriteLongHelperIDsxyEEPT_RKNS1_10FormatDataET0_S4_(ptr noundef nonnull align 4 dereferenceable(40) %fd, i64 noundef %ullValue.4199, ptr noundef nonnull %add.ptr) %tobool334.not = icmp eq ptr %call.i127, null br i1 %tobool334.not, label %FormatError, label %if.end342 @@ -2255,7 +2255,7 @@ if.then.i.i.i134: ; preds = %if.then.i133 br i1 %cmp211.i.i.i138, label %land.rhs.i.i.i143, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139 land.rhs.i.i.i143: ; preds = %if.then.i.i.i134, %while.body.i.i.i146 - %pBufferCurrent.012.i.i.i144 = phi ptr [ %incdec.ptr.i.i.i147, %while.body.i.i.i146 ], [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i134 ] + %pBufferCurrent.012.i.i.i144 = phi ptr [ %incdec.ptr.i.i.i147, %while.body.i.i.i145 ], [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i133 ] %100 = load i16, ptr %pBufferCurrent.012.i.i.i144, align 2, !noalias !37 %tobool.not.i.i.i145 = icmp eq i16 %100, 0 br i1 %tobool.not.i.i.i145, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139, label %while.body.i.i.i146 @@ -2266,7 +2266,7 @@ while.body.i.i.i146: ; preds = %land.rhs.i.i.i143 br i1 %cmp2.i.i.i148, label %land.rhs.i.i.i143, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139, !llvm.loop !33 _ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139: ; preds = %while.body.i.i.i146, %land.rhs.i.i.i143, %if.then.i.i.i134, %if.then.i133 - %pBufferCurrent3.0.lcssa.sink.i.i.i140 = phi ptr [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i134 ], [ getelementptr inbounds nuw (i8, ptr @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, i64 12), %if.then.i133 ], [ %pBufferCurrent.012.i.i.i144, %land.rhs.i.i.i143 ], [ %incdec.ptr.i.i.i147, %while.body.i.i.i146 ] + %pBufferCurrent3.0.lcssa.sink.i.i.i140 = phi ptr [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i133 ], [ getelementptr inbounds nuw (i8, ptr @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, i64 12), %if.then.i132 ], [ %pBufferCurrent.012.i.i.i144, %land.rhs.i.i.i142 ], [ %incdec.ptr.i.i.i147, %while.body.i.i.i145 ] %sub.ptr.lhs.cast9.i.i.i141 = ptrtoint ptr %pBufferCurrent3.0.lcssa.sink.i.i.i140 to i64 %sub.ptr.sub11.i.i.i142 = sub i64 %sub.ptr.lhs.cast9.i.i.i141, ptrtoint (ptr @_ZN2EA4StdC12SprintfLocalL13kStringNull16E to i64) br label %_ZN2EA4StdC12SprintfLocal12StringFormatIDsDsEEiPFiPKT0_mPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPS3_PKT_.exit @@ -2293,7 +2293,7 @@ while.body.i.i22.i: ; preds = %land.rhs.i.i19.i br i1 %cmp2.i.i24.i, label %land.rhs.i.i19.i, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit29.i, !llvm.loop !33 while.cond4.i.i25.i: ; preds = %if.else.i132, %while.cond4.i.i25.i - %pBufferCurrent3.0.i.i26.i = phi ptr [ %incdec.ptr7.i.i28.i, %while.cond4.i.i25.i ], [ %98, %if.else.i132 ] + %pBufferCurrent3.0.i.i26.i = phi ptr [ %incdec.ptr7.i.i28.i, %while.cond4.i.i25.i ], [ %98, %if.else.i131 ] %102 = load i16, ptr %pBufferCurrent3.0.i.i26.i, align 2, !noalias !40 %tobool5.not.i.i27.i = icmp eq i16 %102, 0 %incdec.ptr7.i.i28.i = getelementptr inbounds nuw i8, ptr %pBufferCurrent3.0.i.i26.i, i64 2 @@ -2307,8 +2307,8 @@ _ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteF br label %_ZN2EA4StdC12SprintfLocal12StringFormatIDsDsEEiPFiPKT0_mPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPS3_PKT_.exit _ZN2EA4StdC12SprintfLocal12StringFormatIDsDsEEiPFiPKT0_mPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPS3_PKT_.exit: ; preds = %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit29.i - %sub.ptr.sub11.i.i15.sink.i = phi i64 [ %sub.ptr.sub11.i.i15.i, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit29.i ], [ %sub.ptr.sub11.i.i.i142, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139 ] - %pInBufferData.sink.i = phi ptr [ %98, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit29.i ], [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i139 ] + %sub.ptr.sub11.i.i15.sink.i = phi i64 [ %sub.ptr.sub11.i.i15.i, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit29.i ], [ %sub.ptr.sub11.i.i.i142, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i138 ] + %pInBufferData.sink.i = phi ptr [ %98, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit29.i ], [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i138 ] %retval.0.in.i.i16.i = lshr exact i64 %sub.ptr.sub11.i.i15.sink.i, 1 %retval.0.i.i17.i = trunc i64 %retval.0.in.i.i16.i to i32 %call2.i18.i = call fastcc noundef i32 @_ZN2EA4StdC12SprintfLocalL11WriteBufferIDsEEiPFiPKT_mPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataES5_i(ptr noundef %pWriteFunction, ptr noundef %pWriteFunctionContext, ptr noundef nonnull align 4 dereferenceable(40) %fd, ptr noundef nonnull %pInBufferData.sink.i, i32 noundef %retval.0.i.i17.i) @@ -2354,7 +2354,7 @@ if.then.i.i.i157: ; preds = %if.then.i154 br i1 %cmp211.i.i.i161, label %land.rhs.i.i.i169, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i162 land.rhs.i.i.i169: ; preds = %if.then.i.i.i157, %while.body.i.i.i172 - %pBufferCurrent.012.i.i.i170 = phi ptr [ %incdec.ptr.i.i.i173, %while.body.i.i.i172 ], [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i157 ] + %pBufferCurrent.012.i.i.i170 = phi ptr [ %incdec.ptr.i.i.i173, %while.body.i.i.i171 ], [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i156 ] %108 = load i16, ptr %pBufferCurrent.012.i.i.i170, align 2, !noalias !44 %tobool.not.i.i.i171 = icmp eq i16 %108, 0 br i1 %tobool.not.i.i.i171, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i162, label %while.body.i.i.i172 @@ -2365,7 +2365,7 @@ while.body.i.i.i172: ; preds = %land.rhs.i.i.i169 br i1 %cmp2.i.i.i174, label %land.rhs.i.i.i169, label %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i162, !llvm.loop !33 _ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i162: ; preds = %while.body.i.i.i172, %land.rhs.i.i.i169, %if.then.i.i.i157, %if.then.i154 - %pBufferCurrent3.0.lcssa.sink.i.i.i163 = phi ptr [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i157 ], [ getelementptr inbounds nuw (i8, ptr @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, i64 12), %if.then.i154 ], [ %pBufferCurrent.012.i.i.i170, %land.rhs.i.i.i169 ], [ %incdec.ptr.i.i.i173, %while.body.i.i.i172 ] + %pBufferCurrent3.0.lcssa.sink.i.i.i163 = phi ptr [ @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, %if.then.i.i.i156 ], [ getelementptr inbounds nuw (i8, ptr @_ZN2EA4StdC12SprintfLocalL13kStringNull16E, i64 12), %if.then.i153 ], [ %pBufferCurrent.012.i.i.i170, %land.rhs.i.i.i168 ], [ %incdec.ptr.i.i.i173, %while.body.i.i.i171 ] %sub.ptr.lhs.cast9.i.i.i164 = ptrtoint ptr %pBufferCurrent3.0.lcssa.sink.i.i.i163 to i64 %sub.ptr.sub11.i.i.i165 = sub i64 %sub.ptr.lhs.cast9.i.i.i164, ptrtoint (ptr @_ZN2EA4StdC12SprintfLocalL13kStringNull16E to i64) %retval.0.in.i.i.i166 = lshr exact i64 %sub.ptr.sub11.i.i.i165, 1 @@ -2378,7 +2378,7 @@ if.else.i151: ; preds = %vaarg.end430 br label %_ZN2EA4StdC12SprintfLocal12StringFormatIDiDsEEiPFiPKT0_mPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPS3_PKT_.exit _ZN2EA4StdC12SprintfLocal12StringFormatIDiDsEEiPFiPKT0_mPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPS3_PKT_.exit: ; preds = %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i162, %if.else.i151 - %retval.0.i153 = phi i32 [ %call2.i.i168, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i162 ], [ %call3.i152, %if.else.i151 ] + %retval.0.i153 = phi i32 [ %call2.i.i168, %_ZN2EA4StdC12SprintfLocal18StringFormatHelperILb1EDsDsEclEPFiPKDsmPvNS0_18WriteFunctionStateEES6_RKNS1_10FormatDataEPDsS5_.exit.i161 ], [ %call3.i152, %if.else.i150 ] call void @llvm.lifetime.end.p0(ptr nonnull %helper2.i149) %cmp434 = icmp slt i32 %retval.0.i153, 0 br i1 %cmp434, label %FormatError, label %sw.epilog438 @@ -2511,9 +2511,8 @@ vaarg.in_mem486: ; preds = %sw.bb480 vaarg.end490: ; preds = %vaarg.in_mem486, %vaarg.in_reg484 %vaarg.addr491 = phi ptr [ %117, %vaarg.in_reg484 ], [ %overflow_arg_area488, %vaarg.in_mem486 ] %119 = load i32, ptr %vaarg.addr491, align 4 - %conv492 = trunc i32 %119 to i16 - %sext122 = shl i16 %conv492, 8 - %conv494 = ashr exact i16 %sext122, 8 + %conv492 = trunc i32 %119 to i8 + %conv494 = sext i8 %conv492 to i16 store i16 %conv494, ptr %pBuffer, align 16 br label %sw.epilog546 diff --git a/bench/ffmpeg/optimized/clearvideo.ll b/bench/ffmpeg/optimized/clearvideo.ll index 7b4c23b2269..a3136144cec 100644 --- a/bench/ffmpeg/optimized/clearvideo.ll +++ b/bench/ffmpeg/optimized/clearvideo.ll @@ -1514,7 +1514,7 @@ get_vlc2.exit: ; preds = %13, %35 %58 = getelementptr inbounds nuw i8, ptr %2, i64 8 %59 = load ptr, ptr %58, align 8, !tbaa !103 %.not91 = icmp eq ptr %59, null - br i1 %.not91, label %142, label %60 + br i1 %.not91, label %144, label %60 60: ; preds = %57 %61 = getelementptr inbounds nuw i8, ptr %1, i64 16 @@ -1571,205 +1571,206 @@ get_vlc2.exit109: ; preds = %60, %82 store i32 %103, ptr %61, align 8, !tbaa !68 %104 = and i32 %.062.i107, 65535 %.not92 = icmp eq i32 %104, 19 - br i1 %.not92, label %109, label %105 + br i1 %.not92, label %111, label %105 105: ; preds = %get_vlc2.exit109 - %106 = trunc i32 %.062.i107 to i16 - %sext = shl i16 %106, 8 - %107 = ashr exact i16 %sext, 8 - %108 = ashr i16 %106, 8 - br label %132 - -109: ; preds = %get_vlc2.exit109 - %110 = lshr i32 %103, 3 - %111 = zext nneg i32 %110 to i64 - %112 = getelementptr inbounds nuw i8, ptr %65, i64 %111 - %113 = load i32, ptr %112, align 1, !tbaa !29 - %114 = tail call i32 @llvm.bswap.i32(i32 %113) - %115 = and i32 %103, 7 - %116 = shl i32 %114, %115 - %117 = ashr i32 %116, 24 - %118 = add i32 %103, 8 - %119 = tail call i32 @llvm.umin.i32(i32 %64, i32 %118) - store i32 %119, ptr %61, align 8, !tbaa !68 - %120 = trunc nsw i32 %117 to i16 - %121 = lshr i32 %119, 3 - %122 = zext nneg i32 %121 to i64 - %123 = getelementptr inbounds nuw i8, ptr %65, i64 %122 - %124 = load i32, ptr %123, align 1, !tbaa !29 - %125 = tail call i32 @llvm.bswap.i32(i32 %124) - %126 = and i32 %119, 7 - %127 = shl i32 %125, %126 - %128 = ashr i32 %127, 24 - %129 = add i32 %119, 8 - %130 = tail call i32 @llvm.umin.i32(i32 %64, i32 %129) - store i32 %130, ptr %61, align 8, !tbaa !68 - %131 = trunc nsw i32 %128 to i16 - br label %132 - -132: ; preds = %109, %105 - %.sroa.10.1 = phi i16 [ %108, %105 ], [ %131, %109 ] - %.sroa.0.1 = phi i16 [ %107, %105 ], [ %120, %109 ] - %.not94 = icmp eq ptr %10, null - br i1 %.not94, label %139, label %133 - -133: ; preds = %132 - %134 = load i16, ptr %10, align 2, !tbaa !92 - %135 = add i16 %134, %.sroa.0.1 - store i16 %135, ptr %10, align 2, !tbaa !92 - %136 = getelementptr inbounds nuw i8, ptr %10, i64 2 - %137 = load i16, ptr %136, align 2, !tbaa !94 - %138 = add i16 %137, %.sroa.10.1 - store i16 %138, ptr %136, align 2, !tbaa !94 - br label %139 - -139: ; preds = %133, %132 - %140 = zext i16 %.sroa.0.1 to i32 - %141 = zext i16 %.sroa.10.1 to i32 - br label %142 - -142: ; preds = %139, %57 - %.sroa.10.0 = phi i32 [ %141, %139 ], [ 0, %57 ] - %.sroa.0.0 = phi i32 [ %140, %139 ], [ 0, %57 ] - %143 = add i32 %.sroa.0.0, %9 - %144 = lshr i32 %9, 16 - %145 = add nuw nsw i32 %.sroa.10.0, %144 - %146 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %147 = load ptr, ptr %146, align 8, !tbaa !107 - %.not97 = icmp eq ptr %147, null - br i1 %.not97, label %204, label %148 - -148: ; preds = %142 - %149 = getelementptr inbounds nuw i8, ptr %1, i64 16 - %150 = load i32, ptr %149, align 8, !tbaa !68 - %151 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %152 = load i32, ptr %151, align 8, !tbaa !66 - %153 = load ptr, ptr %1, align 8, !tbaa !64 - %154 = lshr i32 %150, 3 - %155 = zext nneg i32 %154 to i64 - %156 = getelementptr inbounds nuw i8, ptr %153, i64 %155 - %157 = load i32, ptr %156, align 1, !tbaa !29 - %158 = tail call i32 @llvm.bswap.i32(i32 %157) - %159 = and i32 %150, 7 - %160 = shl i32 %158, %159 - %161 = lshr i32 %160, 23 - %162 = zext nneg i32 %161 to i64 - %163 = getelementptr inbounds nuw %struct.VLCElem, ptr %147, i64 %162 - %164 = load i16, ptr %163, align 2, !tbaa !29 - %165 = sext i16 %164 to i32 - %166 = getelementptr inbounds nuw i8, ptr %163, i64 2 - %167 = load i16, ptr %166, align 2, !tbaa !29 - %168 = sext i16 %167 to i32 - %169 = icmp slt i16 %167, 0 - br i1 %169, label %170, label %get_vlc2.exit113 - -170: ; preds = %148 - %171 = add i32 %150, 9 - %172 = tail call i32 @llvm.umin.i32(i32 %152, i32 %171) - %173 = lshr i32 %172, 3 - %174 = zext nneg i32 %173 to i64 - %175 = getelementptr inbounds nuw i8, ptr %153, i64 %174 - %176 = load i32, ptr %175, align 1, !tbaa !29 - %177 = tail call i32 @llvm.bswap.i32(i32 %176) - %178 = and i32 %172, 7 - %179 = shl i32 %177, %178 - %180 = add nsw i32 %168, 32 - %181 = lshr i32 %179, %180 - %182 = add i32 %181, %165 - %183 = zext i32 %182 to i64 - %184 = getelementptr inbounds nuw %struct.VLCElem, ptr %147, i64 %183 - %185 = load i16, ptr %184, align 2, !tbaa !29 - %186 = sext i16 %185 to i32 - %187 = getelementptr inbounds nuw i8, ptr %184, i64 2 - %188 = load i16, ptr %187, align 2, !tbaa !29 - %189 = sext i16 %188 to i32 - br label %get_vlc2.exit113 - -get_vlc2.exit113: ; preds = %148, %170 - %.064.i110 = phi i32 [ %172, %170 ], [ %150, %148 ] - %.062.i111 = phi i32 [ %186, %170 ], [ %165, %148 ] - %.0.i112 = phi i32 [ %189, %170 ], [ %168, %148 ] - %190 = add i32 %.0.i112, %.064.i110 - %191 = tail call i32 @llvm.umin.i32(i32 %152, i32 %190) - store i32 %191, ptr %149, align 8, !tbaa !68 - %192 = and i32 %.062.i111, 65535 - %.not98 = icmp eq i32 %192, 1 - br i1 %.not98, label %193, label %204 - -193: ; preds = %get_vlc2.exit113 - %194 = lshr i32 %191, 3 - %195 = zext nneg i32 %194 to i64 - %196 = getelementptr inbounds nuw i8, ptr %153, i64 %195 - %197 = load i32, ptr %196, align 1, !tbaa !29 - %198 = tail call i32 @llvm.bswap.i32(i32 %197) - %199 = and i32 %191, 7 - %200 = shl i32 %198, %199 - %201 = ashr i32 %200, 16 - %202 = add i32 %191, 16 - %203 = tail call i32 @llvm.umin.i32(i32 %152, i32 %202) - store i32 %203, ptr %149, align 8, !tbaa !68 - br label %204 - -204: ; preds = %193, %get_vlc2.exit113, %142 - %.082 = phi i32 [ 0, %142 ], [ %201, %193 ], [ %.062.i111, %get_vlc2.exit113 ] - %.not99 = icmp eq i32 %.081, 0 - br i1 %.not99, label %228, label %205 - -205: ; preds = %204 - %206 = ashr i32 %8, 1 - %207 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %sext104 = shl i32 %143, 16 - %208 = ashr exact i32 %sext104, 16 - %sext105 = shl i32 %145, 16 - %209 = ashr exact i32 %sext105, 16 - br label %212 - -210: ; preds = %226 - %211 = add nuw nsw i32 %.080115, 1 - %exitcond = icmp eq i32 %211, 4 - br i1 %exitcond, label %.thread, label %212, !llvm.loop !109 - -212: ; preds = %205, %210 - %.080115 = phi i32 [ 0, %205 ], [ %211, %210 ] - %213 = icmp samesign ult i32 %.080115, 2 - %214 = select i1 %213, i32 0, i32 %206 - %215 = and i32 %.080115, 1 - %216 = icmp eq i32 %215, 0 - %217 = select i1 %216, i32 0, i32 %206 - %218 = shl nuw nsw i32 1, %.080115 - %219 = and i32 %218, %.081 - %.not103 = icmp eq i32 %219, 0 - %220 = add nsw i32 %214, %6 - %221 = add nsw i32 %217, %7 - br i1 %.not103, label %224, label %222 - -222: ; preds = %212 - %223 = tail call fastcc i32 @decode_tile(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %207, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %220, i32 noundef %221, i32 noundef %206, i32 %9, ptr noundef null) - br label %226 - -224: ; preds = %212 - %225 = tail call fastcc i32 @tile_do_block(ptr noundef %0, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %220, i32 noundef %221, i32 noundef %208, i32 noundef %209, i32 noundef %206, i32 noundef %.082) - br label %226 - -226: ; preds = %224, %222 - %.084 = phi i32 [ %223, %222 ], [ %225, %224 ] - %227 = icmp sgt i32 %.084, -1 - br i1 %227, label %210, label %.loopexit - -228: ; preds = %204 - %sext100 = shl i32 %143, 16 - %229 = ashr exact i32 %sext100, 16 - %sext101 = shl i32 %145, 16 - %230 = ashr exact i32 %sext101, 16 - %231 = tail call fastcc i32 @tile_do_block(ptr noundef %0, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %229, i32 noundef %230, i32 noundef %8, i32 noundef %.082) - %232 = icmp slt i32 %231, 0 - br i1 %232, label %.loopexit, label %.thread - -.thread: ; preds = %210, %228 + %106 = trunc i32 %.062.i107 to i8 + %107 = sext i8 %106 to i16 + %108 = lshr i32 %.062.i103, 8 + %109 = trunc i32 %108 to i8 + %110 = sext i8 %109 to i16 + br label %134 + +111:; preds = %get_vlc2.exit105 + %112 = lshr i32 %103, 3 + %113 = zext nneg i32 %112 to i64 + %114 = getelementptr inbounds nuw i8, ptr %65, i64 %113 + %115 = load i32, ptr %114, align 1, !tbaa !29 + %116 = tail call i32 @llvm.bswap.i32(i32 %115) + %117 = and i32 %103, 7 + %118 = shl i32 %116, %117 + %119 = ashr i32 %118, 24 + %120 = add i32 %103, 8 + %121 = tail call i32 @llvm.umin.i32(i32 %64, i32 %120) + store i32 %121, ptr %61, align 8, !tbaa !68 + %122 = trunc nsw i32 %119 to i16 + %123 = lshr i32 %121, 3 + %124 = zext nneg i32 %123 to i64 + %125 = getelementptr inbounds nuw i8, ptr %65, i64 %124 + %126 = load i32, ptr %125, align 1, !tbaa !29 + %127 = tail call i32 @llvm.bswap.i32(i32 %126) + %128 = and i32 %121, 7 + %129 = shl i32 %127, %128 + %130 = ashr i32 %129, 24 + %131 = add i32 %121, 8 + %132 = tail call i32 @llvm.umin.i32(i32 %64, i32 %131) + store i32 %132, ptr %61, align 8, !tbaa !68 + %133 = trunc nsw i32 %130 to i16 + br label %134 + +134:; preds = %111, %105 + %.sroa.0.1 = phi i16 [ %110, %105 ], [ %133, %111 ] + %.sroa.0.1 = phi i16 [ %107, %105 ], [ %122, %111 ] + %.not93 = icmp eq ptr %10, null + br i1 %.not93, label %141, label %135 + +135:; preds = %134 + %136 = load i16, ptr %10, align 2, !tbaa !92 + %137 = add i16 %136, %.sroa.0.1 + store i16 %137, ptr %10, align 2, !tbaa !92 + %138 = getelementptr inbounds nuw i8, ptr %10, i64 2 + %139 = load i16, ptr %138, align 2, !tbaa !94 + %140 = add i16 %139, %.sroa.0.1 + store i16 %140, ptr %138, align 2, !tbaa !94 + br label %141 + +141:; preds = %135, %134 + %141 = zext i16 %.sroa.0.1 to i32 + %143 = zext i16 %.sroa.0.1 to i32 + br label %144 + +144: ; preds = %141, %57 + %.sroa.0.0 = phi i32 [ %143, %141 ], [ 0, %57 ] + %.sroa.0.0 = phi i32 [ %142, %141 ], [ 0, %57 ] + %145 = add i32 %.sroa.0.0, %9 + %146 = lshr i32 %9, 16 + %147 = add nuw nsw i32 %.sroa.0.0, %146 + %148 = getelementptr inbounds nuw i8, ptr %2, i64 16 + %149 = load ptr, ptr %148, align 8, !tbaa !107 + %.not94 = icmp eq ptr %149, null + br i1 %.not94, label %206, label %150 + +150: ; preds = %144 + %151 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %152 = load i32, ptr %151, align 8, !tbaa !68 + %153 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %153 = load i32, ptr %153, align 8, !tbaa !66 + %155 = load ptr, ptr %1, align 8, !tbaa !64 + %156 = lshr i32 %152, 3 + %157 = zext nneg i32 %156 to i64 + %158 = getelementptr inbounds nuw i8, ptr %155, i64 %157 + %159 = load i32, ptr %158, align 1, !tbaa !29 + %160 = tail call i32 @llvm.bswap.i32(i32 %159) + %161 = and i32 %152, 7 + %162 = shl i32 %160, %161 + %163 = lshr i32 %162, 23 + %164 = zext nneg i32 %163 to i64 + %165 = getelementptr inbounds nuw %struct.VLCElem, ptr %149, i64 %164 + %166 = load i16, ptr %165, align 2, !tbaa !29 + %167 = sext i16 %166 to i32 + %168 = getelementptr inbounds nuw i8, ptr %165, i64 2 + %169 = load i16, ptr %168, align 2, !tbaa !29 + %170 = sext i16 %169 to i32 + %171 = icmp slt i16 %169, 0 + br i1 %171, label %172, label %get_vlc2.exit109 + +172:; preds = %150 + %173 = add i32 %152, 9 + %174 = tail call i32 @llvm.umin.i32(i32 %154, i32 %173) + %175 = lshr i32 %174, 3 + %176 = zext nneg i32 %175 to i64 + %177 = getelementptr inbounds nuw i8, ptr %155, i64 %176 + %178 = load i32, ptr %177, align 1, !tbaa !29 + %179 = tail call i32 @llvm.bswap.i32(i32 %178) + %180 = and i32 %174, 7 + %181 = shl i32 %179, %180 + %182 = add nsw i32 %170, 32 + %183 = lshr i32 %181, %182 + %184 = add i32 %183, %167 + %185 = zext i32 %184 to i64 + %186 = getelementptr inbounds nuw %struct.VLCElem, ptr %149, i64 %185 + %187 = load i16, ptr %186, align 2, !tbaa !29 + %188 = sext i16 %187 to i32 + %189 = getelementptr inbounds nuw i8, ptr %186, i64 2 + %190 = load i16, ptr %189, align 2, !tbaa !29 + %191 = sext i16 %190 to i32 + br label %get_vlc2.exit109 + +get_vlc2.exit109: ; preds = %150, %172 + %.062.i111 = phi i32 [ %174, %172 ], [ %152, %150 ] + %.0.i112 = phi i32 [ %188, %172 ], [ %167, %150 ] + %.0.i108 = phi i32 [ %191, %172 ], [ %170, %150 ] + %192 = add i32 %.0.i108, %.064.i106 + %193 = tail call i32 @llvm.umin.i32(i32 %154, i32 %192) + store i32 %193, ptr %151, align 8, !tbaa !68 + %194 = and i32 %.0.i112, 65535 + %.not95 = icmp eq i32 %194, 1 + br i1 %.not95, label %195, label %206 + +195:; preds = %get_vlc2.exit109 + %196 = lshr i32 %193, 3 + %197 = zext nneg i32 %196 to i64 + %198 = getelementptr inbounds nuw i8, ptr %155, i64 %197 + %199 = load i32, ptr %198, align 1, !tbaa !29 + %200 = tail call i32 @llvm.bswap.i32(i32 %199) + %201 = and i32 %193, 7 + %202 = shl i32 %200, %201 + %203 = ashr i32 %202, 16 + %204 = add i32 %193, 16 + %205 = tail call i32 @llvm.umin.i32(i32 %154, i32 %204) + store i32 %205, ptr %151, align 8, !tbaa !68 + br label %206 + +206:; preds = %195, %get_vlc2.exit109, %144 + %.082 = phi i32 [ 0, %144 ], [ %203, %195 ], [ %.0.i112, %get_vlc2.exit109 ] + %.not96 = icmp eq i32 %.081, 0 + br i1 %.not96, label %230, label %207 + +207:; preds = %206 + %208 = ashr i32 %8, 1 + %209 = getelementptr inbounds nuw i8, ptr %2, i64 24 + %sext100 = shl i32 %145, 16 + %210 = ashr exact i32 %sext100, 16 + %sext101 = shl i32 %147, 16 + %211 = ashr exact i32 %sext101, 16 + br label %214 + +212:; preds = %228 + %213 = add nuw nsw i32 %.080111, 1 + %exitcond = icmp eq i32 %213, 4 + br i1 %exitcond, label %.thread, label %214, !llvm.loop !109 + +214: ; preds = %207, %212 + %.080111 = phi i32 [ 0, %207 ], [ %213, %212 ] + %215 = icmp samesign ult i32 %.080111, 2 + %216 = select i1 %215, i32 0, i32 %208 + %217 = and i32 %.080111, 1 + %218 = icmp eq i32 %217, 0 + %219 = select i1 %218, i32 0, i32 %208 + %220 = shl nuw nsw i32 1, %.080111 + %221 = and i32 %220, %.081 + %.not99 = icmp eq i32 %221, 0 + %221 = add nsw i32 %216, %6 + %223 = add nsw i32 %219, %7 + br i1 %.not99, label %226, label %224 + +224:; preds = %214 + %225 = tail call fastcc i32 @decode_tile(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %209, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %222, i32 noundef %223, i32 noundef %208, i32 %9, ptr noundef null) + br label %228 + +226:; preds = %214 + %227 = tail call fastcc i32 @tile_do_block(ptr noundef %0, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %222, i32 noundef %223, i32 noundef %210, i32 noundef %211, i32 noundef %208, i32 noundef %.082) + br label %228 + +228: ; preds = %226, %224 + %.084 = phi i32 [ %225, %224 ], [ %227, %226 ] + %229 = icmp sgt i32 %.084, -1 + br i1 %229, label %212, label %.loopexit + +230:; preds = %206 + %sext = shl i32 %145, 16 + %231 = ashr exact i32 %sext, 16 + %sext97 = shl i32 %147, 16 + %232 = ashr exact i32 %sext97, 16 + %233 = tail call fastcc i32 @tile_do_block(ptr noundef %0, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %231, i32 noundef %232, i32 noundef %8, i32 noundef %.082) + %234 = icmp slt i32 %233, 0 + br i1 %234, label %.loopexit, label %.thread + +.thread: ; preds = %212, %230 br label %.loopexit -.loopexit: ; preds = %226, %228, %.thread - %.3 = phi i32 [ 0, %.thread ], [ %231, %228 ], [ %.084, %226 ] +.loopexit: ; preds = %228, %230, %.thread + %.3 = phi i32 [ 0, %.thread ], [ %233, %230 ], [ %.084, %228 ] ret i32 %.3 } diff --git a/bench/ffmpeg/optimized/integer.ll b/bench/ffmpeg/optimized/integer.ll index 4c87dbea7de..04e45bd353c 100644 --- a/bench/ffmpeg/optimized/integer.ll +++ b/bench/ffmpeg/optimized/integer.ll @@ -297,21 +297,18 @@ define i32 @av_cmp_i(i64 %0, i64 %1, i64 %2, i64 %3) local_unnamed_addr #0 { store i64 %2, ptr %6, align 8 %8 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i64 %3, ptr %8, align 8 - %9 = lshr i64 %1, 48 - %10 = lshr i64 %3, 48 - %.not = icmp eq i64 %9, %10 - br i1 %.not, label %.preheader, label %11 - -11: ; preds = %4 - %12 = trunc nuw nsw i64 %10 to i32 - %13 = trunc nuw nsw i64 %9 to i32 - %sext = shl nuw i32 %12, 16 - %14 = ashr exact i32 %sext, 16 - %sext28 = shl nuw i32 %13, 16 - %15 = ashr exact i32 %sext28, 16 - %16 = sub nsw i32 %15, %14 - %17 = ashr i32 %16, 16 - %18 = or i32 %17, 1 + %.not.unshifted = xor i64 %1, %3 + %.not = icmp ult i64 %.not.unshifted, 281474976710656 + br i1 %.not, label %.preheader, label %9 + +9: ; preds = %4 + %10 = ashr i64 %3, 48 + %12 = trunc nsw i64 %10 to i32 + %12 = ashr i64 %1, 48 + %13 = trunc nsw i64 %12 to i32 + %14 = sub nsw i32 %13, %11 + %15 = ashr i32 %14, 16 + %16 = or i32 %15, 1 br label %.loopexit 19: ; preds = %.preheader @@ -320,25 +317,25 @@ define i32 @av_cmp_i(i64 %0, i64 %1, i64 %2, i64 %3) local_unnamed_addr #0 { br i1 %.not29, label %.loopexit, label %.preheader, !llvm.loop !15 .preheader: ; preds = %4, %19 - %.01120 = phi i32 [ %20, %19 ], [ 6, %4 ] + %.01120 = phi i32 [ %20, %17 ], [ 6, %4 ] %21 = zext nneg i32 %.01120 to i64 %22 = getelementptr inbounds nuw i16, ptr %5, i64 %21 + %21 = load i16, ptr %20, align 2, !tbaa !4 + %22 = getelementptr inbounds nuw i16, ptr %6, i64 %19 %23 = load i16, ptr %22, align 2, !tbaa !4 - %24 = getelementptr inbounds nuw i16, ptr %6, i64 %21 - %25 = load i16, ptr %24, align 2, !tbaa !4 - %.not14 = icmp eq i16 %23, %25 - br i1 %.not14, label %19, label %.loopexit.split.loop.exit + %.not14 = icmp eq i16 %21, %23 + br i1 %.not14, label %17, label %.loopexit.split.loop.exit .loopexit.split.loop.exit: ; preds = %.preheader - %26 = zext i16 %25 to i32 - %27 = zext i16 %23 to i32 + %26 = zext i16 %23 to i32 + %27 = zext i16 %21 to i32 %28 = sub nsw i32 %27, %26 %29 = ashr i32 %28, 16 %30 = or i32 %29, 1 br label %.loopexit -.loopexit: ; preds = %19, %.loopexit.split.loop.exit, %11 - %.0 = phi i32 [ %18, %11 ], [ %30, %.loopexit.split.loop.exit ], [ 0, %19 ] +.loopexit: ; preds = %19, %.loopexit.split.loop.exit, %9 + %.0 = phi i32 [ %16, %9 ], [ %30, %.loopexit.split.loop.exit ], [ 0, %17 ] ret i32 %.0 } @@ -744,20 +741,17 @@ av_shr_i.exit86: ; preds = %157 store i64 %.sroa.937.0129, ptr %137, align 8 store i64 %.sroa.021.1126, ptr %11, align 8 store i64 %.sroa.9.1127, ptr %138, align 8 - %162 = lshr i64 %.sroa.937.0129, 48 - %163 = lshr i64 %.sroa.9.1127, 48 - %.not.i87 = icmp eq i64 %162, %163 - %164 = trunc i64 %.fca.0.load.i81 to i16 - br i1 %.not.i87, label %.preheader.i, label %165 - -165: ; preds = %av_shr_i.exit86 - %166 = trunc nuw nsw i64 %163 to i32 - %167 = trunc nuw nsw i64 %162 to i32 - %sext.i = shl nuw i32 %166, 16 - %168 = ashr exact i32 %sext.i, 16 - %sext28.i = shl nuw i32 %167, 16 - %169 = ashr exact i32 %sext28.i, 16 - %170 = sub nsw i32 %169, %168 + %.not.unshifted.i = xor i64 %.sroa.937.0129, %.sroa.9.1127 + %.not.i87 = icmp ult i64 %.not.unshifted.i, 281474976710656 + %162 = trunc i64 %.fca.0.load.i81 to i16 + br i1 %.not.i87, label %.preheader.i, label %163 + +163: ; preds = %av_shr_i.exit86 + %164 = ashr i64 %.sroa.9.1127, 48 + %166 = trunc nsw i64 %164 to i32 + %166 = ashr i64 %.sroa.937.0129, 48 + %167 = trunc nsw i64 %166 to i32 + %168 = sub nsw i32 %167, %165 br label %av_cmp_i.exit 171: ; preds = %.preheader.i @@ -771,23 +765,23 @@ av_cmp_i.exit.thread: ; preds = %171 br label %182 .preheader.i: ; preds = %av_shr_i.exit86, %171 - %.01120.i = phi i32 [ %172, %171 ], [ 6, %av_shr_i.exit86 ] + %.01120.i = phi i32 [ %172, %169 ], [ 6, %av_shr_i.exit86 ] %173 = zext nneg i32 %.01120.i to i64 %174 = getelementptr inbounds nuw i16, ptr %10, i64 %173 + %173 = load i16, ptr %172, align 2, !tbaa !4 + %174 = getelementptr inbounds nuw i16, ptr %11, i64 %171 %175 = load i16, ptr %174, align 2, !tbaa !4 - %176 = getelementptr inbounds nuw i16, ptr %11, i64 %173 - %177 = load i16, ptr %176, align 2, !tbaa !4 - %.not14.i = icmp eq i16 %175, %177 - br i1 %.not14.i, label %171, label %.loopexit.split.loop.exit.i + %.not14.i = icmp eq i16 %173, %175 + br i1 %.not14.i, label %169, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %178 = zext i16 %177 to i32 - %179 = zext i16 %175 to i32 + %178 = zext i16 %175 to i32 + %179 = zext i16 %173 to i32 %180 = sub nsw i32 %179, %178 br label %av_cmp_i.exit -av_cmp_i.exit: ; preds = %165, %.loopexit.split.loop.exit.i - %.0.i88.in.in = phi i32 [ %170, %165 ], [ %180, %.loopexit.split.loop.exit.i ] +av_cmp_i.exit: ; preds = %163, %.loopexit.split.loop.exit.i + %.0.i88.in.in = phi i32 [ %168, %163 ], [ %180, %.loopexit.split.loop.exit.i ] call void @llvm.lifetime.end.p0(ptr nonnull %10) call void @llvm.lifetime.end.p0(ptr nonnull %11) %181 = icmp sgt i32 %.0.i88.in.in, -1 @@ -803,8 +797,8 @@ av_cmp_i.exit: ; preds = %165, %.loopexit.spl br label %183 183: ; preds = %183, %182 - %indvars.iv.i89 = phi i64 [ 0, %182 ], [ %indvars.iv.next.i91, %183 ] - %.09.i90 = phi i32 [ 0, %182 ], [ %192, %183 ] + %indvars.iv.i89 = phi i64 [ 0, %180 ], [ %indvars.iv.next.i91, %181 ] + %.09.i90 = phi i32 [ 0, %180 ], [ %192, %181 ] %184 = ashr i32 %.09.i90, 16 %185 = getelementptr inbounds nuw i16, ptr %8, i64 %indvars.iv.i89 %186 = load i16, ptr %185, align 2, !tbaa !4 @@ -825,7 +819,7 @@ av_sub_i.exit97: ; preds = %183 %.sroa.2.0.copyload.i94 = load i64, ptr %139, align 8, !tbaa !10 call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @llvm.lifetime.end.p0(ptr nonnull %9) - %194 = add i16 %164, 1 + %194 = add i16 %162, 1 store i16 %194, ptr %spec.store.select, align 2, !tbaa !4 br label %195 @@ -839,7 +833,7 @@ av_sub_i.exit97: ; preds = %183 br label %196 196: ; preds = %204, %195 - %indvars.iv.i98 = phi i64 [ 0, %195 ], [ %197, %204 ] + %indvars.iv.i98 = phi i64 [ 0, %193 ], [ %197, %202 ] %197 = add nuw nsw i64 %indvars.iv.i98, 1 %198 = icmp samesign ult i64 %indvars.iv.i98, 7 br i1 %198, label %199, label %204 @@ -852,7 +846,7 @@ av_sub_i.exit97: ; preds = %183 br label %204 204: ; preds = %199, %196 - %.0.i99 = phi i32 [ %203, %199 ], [ 0, %196 ] + %.0.i99 = phi i32 [ %203, %197 ], [ 0, %194 ] %205 = getelementptr inbounds nuw i16, ptr %7, i64 %indvars.iv.i98 %206 = load i16, ptr %205, align 2, !tbaa !4 %207 = zext i16 %206 to i32 diff --git a/bench/freetype/optimized/psaux.ll b/bench/freetype/optimized/psaux.ll index 45cb245828b..c694978d79c 100644 --- a/bench/freetype/optimized/psaux.ll +++ b/bench/freetype/optimized/psaux.ll @@ -3648,35 +3648,36 @@ define internal range(i32 0, 162) i32 @t1_decoder_parse_metrics(ptr noundef %0, 125: ; preds = %97 %126 = load i64, ptr %99, align 8, !tbaa !41 - %127 = trunc i64 %126 to i32 - %128 = ashr i32 %127, 16 - %129 = load ptr, ptr %13, align 8, !tbaa !190 - %.not190 = icmp eq ptr %129, null - br i1 %.not190, label %135, label %130 - -130: ; preds = %125 - %131 = tail call ptr @ft_hash_num_lookup(i32 noundef %128, ptr noundef nonnull %129) #20 - %.not191 = icmp eq ptr %131, null - br i1 %.not191, label %.thread239, label %132 - -132: ; preds = %130 - %133 = load i64, ptr %131, align 8, !tbaa !41 - %134 = trunc i64 %133 to i32 - br label %135 - -135: ; preds = %132, %125 - %.0137 = phi i32 [ %128, %125 ], [ %134, %132 ] - %136 = icmp slt i32 %.0137, 0 - br i1 %136, label %.thread239, label %137 + %127 = lshr i64 %126, 16 + %128 = trunc i64 %127 to i16 + %129 = sext i16 %128 to i32 + %130 = load ptr, ptr %13, align 8, !tbaa !190 + %.not190 = icmp eq ptr %130, null + br i1 %.not190, label %136, label %131 + +131: ; preds = %125 + %132 = tail call ptr @ft_hash_num_lookup(i32 noundef %129, ptr noundef nonnull %130) #20 + %.not191 = icmp eq ptr %132, null + br i1 %.not191, label %.thread239, label %133 + +133: ; preds = %131 + %134 = load i64, ptr %132, align 8, !tbaa !41 + %135 = trunc i64 %134 to i32 + br label %136 -137: ; preds = %135 - %138 = load i32, ptr %14, align 4, !tbaa !191 - %.not192 = icmp sge i32 %.0137, %138 - %139 = icmp sgt i64 %.0142.idx280, 2632 - %or.cond199 = select i1 %.not192, i1 true, i1 %139 - br i1 %or.cond199, label %.thread239, label %140 +137: ; preds = %133, %125 + %.0137 = phi i32 [ %129, %125 ], [ %135, %133 ] + %.not192 = icmp slt i32 %.0137, 0 + br i1 %137, label %.thread239, label %138 140: ; preds = %137 + %139 = load i32, ptr %14, align 4, !tbaa !191 + %.not192 = icmp sge i32 %.0137, %139 + %140 = icmp sgt i64 %.0142.idx280, 2632 + %or.cond199 = select i1 %.not192, i1 true, i1 %140 + br i1 %or.cond199, label %.thread239, label %141 + +141: ; preds = %138 store ptr %.2159207218, ptr %.0142.ptr281, align 8, !tbaa !186 %.0142.add187 = add nsw i64 %.0142.idx280, 24 %.ptr189 = getelementptr inbounds i8, ptr %0, i64 %.0142.add187 @@ -3690,14 +3691,14 @@ define internal range(i32 0, 162) i32 @t1_decoder_parse_metrics(ptr noundef %0, %.not193 = icmp eq ptr %146, null br i1 %.not193, label %152, label %147 -147: ; preds = %140 +147: ; preds = %141 %148 = getelementptr inbounds nuw i32, ptr %146, i64 %142 %149 = load i32, ptr %148, align 4, !tbaa !16 %150 = zext i32 %149 to i64 %151 = getelementptr inbounds nuw i8, ptr %144, i64 %150 br label %157 -152: ; preds = %140 +152: ; preds = %141 %153 = load i32, ptr %17, align 8, !tbaa !194 %narrow = tail call i32 @llvm.smax.i32(i32 %153, i32 0) %spec.select198 = zext nneg i32 %narrow to i64 @@ -3708,8 +3709,8 @@ define internal range(i32 0, 162) i32 @t1_decoder_parse_metrics(ptr noundef %0, br label %157 157: ; preds = %152, %147 - %158 = phi ptr [ %156, %152 ], [ %151, %147 ] - %159 = phi ptr [ %154, %152 ], [ %144, %147 ] + %158 = phi ptr [ %156, %153 ], [ %151, %148 ] + %159 = phi ptr [ %154, %153 ], [ %144, %148 ] %160 = getelementptr inbounds nuw i8, ptr %.ptr189, i64 16 store ptr %158, ptr %160, align 8, !tbaa !185 store ptr %159, ptr %.ptr189, align 8, !tbaa !186 @@ -3734,11 +3735,11 @@ define internal range(i32 0, 162) i32 @t1_decoder_parse_metrics(ptr noundef %0, br label %.thread232 .thread232: ; preds = %120, %163, %161, %86 - %.0150.sink = phi ptr [ %88, %86 ], [ %122, %120 ], [ %99, %161 ], [ %99, %163 ] - %.1164 = phi ptr [ %.0163276, %86 ], [ %.0163276, %120 ], [ %158, %161 ], [ %166, %163 ] - %.1158 = phi ptr [ %.2159.ph.ph, %86 ], [ %.2159207218, %120 ], [ %159, %161 ], [ %164, %163 ] - %.1152 = phi i8 [ %.2153.ph.ph, %86 ], [ 0, %120 ], [ %.0151279, %161 ], [ %.0151279, %163 ] - %.1143.idx = phi i64 [ %.0142.idx280, %86 ], [ %.0142.idx280, %120 ], [ %.0142.add187, %161 ], [ %.0142.add, %163 ] + %.0150.sink = phi ptr [ %88, %86 ], [ %122, %120 ], [ %99, %162 ], [ %99, %164 ] + %.1164 = phi ptr [ %.0163276, %86 ], [ %.0163276, %120 ], [ %158, %162 ], [ %166, %164 ] + %.1158 = phi ptr [ %.2159.ph.ph, %86 ], [ %.2159207218, %120 ], [ %159, %162 ], [ %164, %164 ] + %.1152 = phi i8 [ %.2153.ph.ph, %86 ], [ 0, %120 ], [ %.0151279, %162 ], [ %.0151279, %164 ] + %.1143.idx = phi i64 [ %.0142.idx280, %86 ], [ %.0142.idx280, %120 ], [ %.0142.add187, %162 ], [ %.0142.add, %164 ] store ptr %.0150.sink, ptr %5, align 8, !tbaa !181 %.0142.ptr = getelementptr inbounds i8, ptr %0, i64 %.1143.idx %167 = icmp ult ptr %.1158, %.1164 @@ -3749,8 +3750,8 @@ define internal range(i32 0, 162) i32 @t1_decoder_parse_metrics(ptr noundef %0, store i64 %.sink, ptr %21, align 8, !tbaa !195 br label %.thread239 -.thread239: ; preds = %.thread211, %82, %80, %57, %64, %54, %32, %29, %28, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %.thread232, %162, %97, %135, %137, %157, %130, %3, %.thread239.sink.split - %.4 = phi i32 [ 0, %.thread239.sink.split ], [ 160, %3 ], [ 160, %130 ], [ 160, %157 ], [ 160, %137 ], [ 160, %135 ], [ 160, %97 ], [ 160, %162 ], [ 160, %.thread232 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %28 ], [ 160, %29 ], [ 160, %32 ], [ 160, %54 ], [ 160, %64 ], [ 160, %57 ], [ 160, %80 ], [ 160, %82 ], [ 161, %.thread211 ] +.thread239: ; preds = %.thread211, %82, %80, %57, %64, %54, %32, %29, %28, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %22, %.thread232, %162, %97, %136, %140, %158, %131, %3, %.thread239.sink.split + %.4 = phi i32 [ 0, %.thread239.sink.split ], [ 160, %3 ], [ 160, %131 ], [ 160, %158 ], [ 160, %138 ], [ 160, %136 ], [ 160, %97 ], [ 160, %163 ], [ 160, %.thread232 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %22 ], [ 160, %28 ], [ 160, %29 ], [ 160, %32 ], [ 160, %54 ], [ 160, %64 ], [ 160, %57 ], [ 160, %80 ], [ 160, %82 ], [ 161, %.thread211 ] ret i32 %.4 } diff --git a/bench/freetype/optimized/truetype.ll b/bench/freetype/optimized/truetype.ll index a09fdff9fcc..8b979d2bcc9 100644 --- a/bench/freetype/optimized/truetype.ll +++ b/bench/freetype/optimized/truetype.ll @@ -16812,11 +16812,10 @@ tt_get_metrics.exit: ; preds = %224, %242, %245 266: ; preds = %257 %267 = load i64, ptr %5, align 8, !tbaa !695 - %268 = trunc i64 %267 to i32 + %268 = trunc i64 %267 to i16 %269 = load i64, ptr %261, align 8, !tbaa !698 %270 = trunc i64 %269 to i32 - %sext.i = shl i32 %268, 16 - %271 = ashr exact i32 %sext.i, 16 + %271 = sext i16 %268 to i32 store i32 %271, ptr %227, align 8, !tbaa !690 %272 = and i32 %270, 65535 store i32 %272, ptr %230, align 4, !tbaa !691 @@ -16834,10 +16833,10 @@ tt_get_metrics.exit: ; preds = %224, %242, %245 br label %277 277: ; preds = %._crit_edge429, %275, %266 - %.pre427 = phi i32 [ %.pre427.pre, %._crit_edge429 ], [ 0, %275 ], [ 0, %266 ] - %.pre426 = phi i32 [ %.pre426.pre, %._crit_edge429 ], [ 0, %275 ], [ 0, %266 ] - %.pre425 = phi i32 [ %.pre425.pre, %._crit_edge429 ], [ %272, %275 ], [ %272, %266 ] - %.pre424 = phi i32 [ %.pre424.pre, %._crit_edge429 ], [ %271, %275 ], [ %271, %266 ] + %.pre427 = phi i32 [ %.pre427.pre, %._crit_edge427 ], [ 0, %275 ], [ 0, %266 ] + %.pre426 = phi i32 [ %.pre426.pre, %._crit_edge427 ], [ 0, %275 ], [ 0, %266 ] + %.pre425 = phi i32 [ %.pre425.pre, %._crit_edge427 ], [ %272, %275 ], [ %272, %266 ] + %.pre424 = phi i32 [ %.pre424.pre, %._crit_edge427 ], [ %271, %275 ], [ %271, %266 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %.pre428 = load ptr, ptr %0, align 8, !tbaa !166 br label %tt_get_metrics_incremental.exit @@ -17232,8 +17231,8 @@ ft_list_get_node_at.exit: ; preds = %.lr.ph.i, %419 br label %.lr.ph396 .lr.ph396: ; preds = %.lr.ph396.preheader, %.lr.ph396 - %indvars.iv = phi i64 [ 0, %.lr.ph396.preheader ], [ %indvars.iv.next, %.lr.ph396 ] - %.0270394 = phi ptr [ %489, %.lr.ph396.preheader ], [ %501, %.lr.ph396 ] + %indvars.iv = phi i64 [ 0, %.lr.ph394.preheader ], [ %indvars.iv.next, %.lr.ph394 ] + %.0270394 = phi ptr [ %489, %.lr.ph394.preheader ], [ %501, %.lr.ph394 ] %490 = getelementptr inbounds nuw i8, ptr %.0270394, i64 8 %491 = load i32, ptr %490, align 8, !tbaa !722 %492 = sext i32 %491 to i64 @@ -17259,7 +17258,7 @@ ft_list_get_node_at.exit: ; preds = %.lr.ph.i, %419 br label %._crit_edge397 ._crit_edge397: ; preds = %._crit_edge397.loopexit, %486 - %.0272.lcssa = phi i16 [ 0, %486 ], [ %502, %._crit_edge397.loopexit ] + %.0272.lcssa = phi i16 [ 0, %486 ], [ %502, %._crit_edge395.loopexit ] %503 = add i16 %.0272.lcssa, 1 %504 = zext i16 %.0272.lcssa to i64 %505 = getelementptr inbounds nuw %struct.FT_Vector_, ptr %471, i64 %504 @@ -17286,8 +17285,8 @@ ft_list_get_node_at.exit: ; preds = %.lr.ph.i, %419 br label %.lr.ph401 .lr.ph401: ; preds = %.lr.ph401.preheader, %530 - %indvars.iv414 = phi i64 [ 0, %.lr.ph401.preheader ], [ %indvars.iv.next415, %530 ] - %.1271399 = phi ptr [ %515, %.lr.ph401.preheader ], [ %531, %530 ] + %indvars.iv414 = phi i64 [ 0, %.lr.ph399.preheader ], [ %indvars.iv.next415, %530 ] + %.1271399 = phi ptr [ %515, %.lr.ph399.preheader ], [ %531, %530 ] %516 = getelementptr inbounds nuw i8, ptr %.1271399, i64 4 %517 = load i16, ptr %516, align 4, !tbaa !726 %518 = and i16 %517, 2 @@ -17297,17 +17296,15 @@ ft_list_get_node_at.exit: ; preds = %.lr.ph.i, %419 519: ; preds = %.lr.ph401 %520 = getelementptr inbounds nuw %struct.FT_Vector_, ptr %471, i64 %indvars.iv414 %521 = load i64, ptr %520, align 8, !tbaa !263 - %522 = trunc i64 %521 to i32 - %sext = shl i32 %522, 16 - %523 = ashr exact i32 %sext, 16 - %524 = getelementptr inbounds nuw i8, ptr %.1271399, i64 8 + %522 = trunc i64 %521 to i16 + %523 = sext i16 %522 to i32 + %524 = getelementptr inbounds nuw i8, ptr %.1271397, i64 8 store i32 %523, ptr %524, align 8, !tbaa !722 %525 = getelementptr inbounds nuw i8, ptr %520, i64 8 %526 = load i64, ptr %525, align 8, !tbaa !330 - %527 = trunc i64 %526 to i32 - %sext306 = shl i32 %527, 16 - %528 = ashr exact i32 %sext306, 16 - %529 = getelementptr inbounds nuw i8, ptr %.1271399, i64 12 + %527 = trunc i64 %526 to i16 + %528 = sext i16 %527 to i32 + %529 = getelementptr inbounds nuw i8, ptr %.1271397, i64 12 store i32 %528, ptr %529, align 4, !tbaa !724 br label %530 @@ -17318,9 +17315,9 @@ ft_list_get_node_at.exit: ; preds = %.lr.ph.i, %419 br i1 %exitcond418.not, label %.loopexit, label %.lr.ph401, !llvm.loop !727 .loopexit: ; preds = %530, %._crit_edge397, %483, %479, %474, %464 - %532 = phi ptr [ null, %464 ], [ null, %474 ], [ %480, %479 ], [ %480, %483 ], [ %480, %._crit_edge397 ], [ %480, %530 ] - %533 = phi ptr [ null, %464 ], [ %476, %474 ], [ %476, %479 ], [ %476, %483 ], [ %476, %._crit_edge397 ], [ %476, %530 ] - %.0269 = phi ptr [ null, %464 ], [ null, %474 ], [ null, %479 ], [ %484, %483 ], [ %484, %._crit_edge397 ], [ %484, %530 ] + %532 = phi ptr [ null, %464 ], [ null, %474 ], [ %480, %479 ], [ %480, %483 ], [ %480, %._crit_edge395 ], [ %480, %530 ] + %533 = phi ptr [ null, %464 ], [ %476, %474 ], [ %476, %479 ], [ %476, %483 ], [ %476, %._crit_edge395 ], [ %476, %530 ] + %.0269 = phi ptr [ null, %464 ], [ null, %474 ], [ null, %479 ], [ %484, %483 ], [ %484, %._crit_edge395 ], [ %484, %530 ] call void @ft_mem_free(ptr noundef %421, ptr noundef %471) #22 call void @ft_mem_free(ptr noundef %421, ptr noundef %533) #22 call void @ft_mem_free(ptr noundef %421, ptr noundef %532) #22 @@ -17435,7 +17432,7 @@ ft_list_get_node_at.exit: ; preds = %.lr.ph.i, %419 br label %608 608: ; preds = %.lr.ph404, %select.unfold - %indvars.iv419 = phi i64 [ 0, %.lr.ph404 ], [ %indvars.iv.next420, %select.unfold ] + %indvars.iv419 = phi i64 [ 0, %.lr.ph402 ], [ %indvars.iv.next420, %select.unfold ] call void @llvm.lifetime.start.p0(ptr nonnull %17) %609 = load ptr, ptr %601, align 8, !tbaa !248 %610 = getelementptr inbounds nuw %struct.FT_SubGlyphRec_, ptr %609, i64 %602 @@ -17499,8 +17496,8 @@ select.unfold: ; preds = %629, %626 br label %632 632: ; preds = %._crit_edge405, %594 - %.0264.lcssa = phi ptr [ %621, %._crit_edge405 ], [ null, %594 ] - %.0262.lcssa = phi i1 [ %631, %._crit_edge405 ], [ false, %594 ] + %.0264.lcssa = phi ptr [ %621, %._crit_edge403 ], [ null, %594 ] + %.0262.lcssa = phi i1 [ %631, %._crit_edge403 ], [ false, %594 ] store ptr %599, ptr %182, align 8, !tbaa !169 store i32 %600, ptr %152, align 8, !tbaa !685 store i64 %454, ptr %453, align 8, !tbaa !717 diff --git a/bench/grpc/optimized/time.ll b/bench/grpc/optimized/time.ll index 23233a54812..93ae828547a 100644 --- a/bench/grpc/optimized/time.ll +++ b/bench/grpc/optimized/time.ll @@ -121,83 +121,85 @@ define void @_ZNK4absl12lts_202407224Time2InENS0_8TimeZoneE(ptr dead_on_unwind n %38 = getelementptr inbounds nuw i8, ptr %0, i64 28 %39 = getelementptr inbounds nuw i8, ptr %0, i64 36 store i64 %.sroa.052.0.copyload, ptr %0, align 8, !tbaa !7 - %.sroa.553.8.extract.trunc = trunc i64 %.sroa.553.0.copyload to i32 - %sext = shl i32 %.sroa.553.8.extract.trunc, 24 - %40 = ashr exact i32 %sext, 24 + %.sroa.553.8.extract.trunc = trunc i64 %.sroa.553.0.copyload to i8 + %40 = sext i8 %.sroa.553.8.extract.trunc to i32 %41 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %40, ptr %41, align 8, !tbaa !18 - %42 = shl i32 %.sroa.553.8.extract.trunc, 16 - %43 = ashr i32 %42, 24 - %44 = getelementptr inbounds nuw i8, ptr %0, i64 12 - store i32 %43, ptr %44, align 4, !tbaa !19 - %45 = shl i32 %.sroa.553.8.extract.trunc, 8 - %46 = ashr i32 %45, 24 - %47 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i32 %46, ptr %47, align 8, !tbaa !20 - %48 = ashr i32 %.sroa.553.8.extract.trunc, 24 - %49 = getelementptr inbounds nuw i8, ptr %0, i64 20 - store i32 %48, ptr %49, align 4, !tbaa !21 - %sh.diff = lshr i64 %.sroa.553.0.copyload, 8 - %tr.sh.diff = trunc i64 %sh.diff to i32 - %50 = ashr i32 %tr.sh.diff, 24 - %51 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i32 %50, ptr %51, align 8, !tbaa !22 + %.sroa.553.9.extract.shift = lshr i64 %.sroa.553.0.copyload, 8 + %.sroa.553.9.extract.trunc = trunc i64 %.sroa.553.9.extract.shift to i8 + %42 = sext i8 %.sroa.553.9.extract.trunc to i32 + %43 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store i32 %45, ptr %43, align 4, !tbaa !19 + %.sroa.553.10.extract.shift = lshr i64 %.sroa.553.0.copyload, 16 + %.sroa.553.10.extract.trunc = trunc i64 %.sroa.553.10.extract.shift to i8 + %47 = sext i8 %.sroa.553.10.extract.trunc to i32 + %48 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i32 %44, ptr %45, align 8, !tbaa !20 + %.sroa.553.11.extract.shift = lshr i64 %.sroa.553.0.copyload, 24 + %.sroa.553.11.extract.trunc = trunc i64 %.sroa.553.11.extract.shift to i8 + %46 = sext i8 %.sroa.553.11.extract.trunc to i32 + %50 = getelementptr inbounds nuw i8, ptr %0, i64 20 + store i32 %46, ptr %50, align 4, !tbaa !21 + %.sroa.553.12.extract.shift = lshr i64 %.sroa.553.0.copyload, 32 + %.sroa.553.12.extract.trunc = trunc i64 %.sroa.553.12.extract.shift to i8 + %48 = sext i8 %.sroa.553.12.extract.trunc to i32 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i32 %48, ptr %49, align 8, !tbaa !22 %.sroa.24.0.copyload = load i32, ptr %.sroa.233.0..sroa_idx, align 4, !tbaa !3 store i64 0, ptr %38, align 4 store i32 %.sroa.24.0.copyload, ptr %39, align 4, !tbaa !3 %52 = srem i64 %.sroa.052.0.copyload, 400 %53 = add nsw i64 %52, 2400 - %.sroa.447.8.extract.trunc = trunc i64 %.sroa.553.0.copyload to i8 - %54 = icmp slt i8 %.sroa.447.8.extract.trunc, 3 - %.neg.i = sext i1 %54 to i64 - %55 = add nsw i64 %53, %.neg.i - %56 = lshr i64 %55, 2 - %.lhs.trunc.i = trunc nuw nsw i64 %55 to i16 - %57 = udiv i16 %.lhs.trunc.i, 100 - %.zext.i = zext nneg i16 %57 to i64 - %58 = udiv i16 %.lhs.trunc.i, 400 - %.zext10.i = zext nneg i16 %58 to i64 - %sext64 = shl i64 %.sroa.553.0.copyload, 56 - %59 = ashr exact i64 %sext64, 56 - %60 = getelementptr inbounds i32, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_weekdayERKNS3_10civil_timeINS3_10second_tagEEE.k_weekday_offsets, i64 %59 - %61 = load i32, ptr %60, align 4, !tbaa !3 - %62 = add nsw i32 %61, %43 - %63 = sext i32 %62 to i64 - %64 = add nuw nsw i64 %56, %55 - %65 = sub nuw nsw i64 %64, %.zext.i - %66 = add nuw nsw i64 %65, %.zext10.i - %67 = add nsw i64 %66, %63 - %68 = srem i64 %67, 7 - %69 = getelementptr i32, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_weekdayERKNS3_10civil_timeINS3_10second_tagEEE.k_weekday_by_mon_off, i64 %68 - %70 = getelementptr i8, ptr %69, i64 24 - %71 = load i32, ptr %70, align 4, !tbaa !32 - %switch.tableidx.i = add i32 %71, -1 - %72 = icmp ult i32 %switch.tableidx.i, 6 - %switch.offset.i = add i32 %71, 1 - %.0.i = select i1 %72, i32 %switch.offset.i, i32 1 - %73 = getelementptr inbounds nuw i8, ptr %0, i64 40 - store i32 %.0.i, ptr %73, align 8, !tbaa !23 - %74 = icmp sgt i8 %.sroa.447.8.extract.trunc, 2 - %75 = and i64 %.sroa.052.0.copyload, 3 - %76 = icmp eq i64 %75, 0 - %or.cond = select i1 %74, i1 %76, i1 false - br i1 %or.cond, label %77, label %_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit - -77: ; preds = %37 - %78 = srem i64 %.sroa.052.0.copyload, 100 - %.not.i.i = icmp eq i64 %78, 0 - br i1 %.not.i.i, label %79, label %_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit - -79: ; preds = %77 - %80 = icmp eq i64 %52, 0 - %81 = zext i1 %80 to i32 + %52 = icmp slt i8 %.sroa.553.8.extract.trunc, 3 + %.neg.i = sext i1 %52 to i64 + %53 = add nsw i64 %51, %.neg.i + %54 = lshr i64 %53, 2 + %.lhs.trunc.i = trunc nuw nsw i64 %53 to i16 + %55 = udiv i16 %.lhs.trunc.i, 100 + %.zext.i = zext nneg i16 %55 to i64 + %56 = udiv i16 %.lhs.trunc.i, 400 + %.zext10.i = zext nneg i16 %56 to i64 + %sext = shl i64 %.sroa.553.0.copyload, 56 + %60 = ashr exact i64 %sext, 56 + %58 = getelementptr inbounds i32, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_weekdayERKNS3_10civil_timeINS3_10second_tagEEE.k_weekday_offsets, i64 %57 + %62 = load i32, ptr %61, align 4, !tbaa !3 + %63 = add nsw i32 %62, %42 + %61 = sext i32 %60 to i64 + %62 = add nuw nsw i64 %54, %53 + %63 = sub nuw nsw i64 %62, %.zext.i + %64 = add nuw nsw i64 %63, %.zext10.i + %66 = add nsw i64 %64, %61 + %66 = srem i64 %66, 7 + %67 = getelementptr i32, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_weekdayERKNS3_10civil_timeINS3_10second_tagEEE.k_weekday_by_mon_off, i64 %66 + %69 = getelementptr i8, ptr %70, i64 24 + %72 = load i32, ptr %69, align 4, !tbaa !32 + %switch.tableidx.i = add i32 %72, -1 + %70 = icmp ult i32 %switch.tableidx.i, 6 + %switch.offset.i = add i32 %69, 1 + %.0.i = select i1 %70, i32 %switch.offset.i, i32 1 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 40 + store i32 %.0.i, ptr %71, align 8, !tbaa !23 + %72 = icmp sgt i8 %.sroa.553.8.extract.trunc, 2 + %73 = and i64 %.sroa.052.0.copyload, 3 + %74 = icmp eq i64 %73, 0 + %or.cond = select i1 %75, i1 %74, i1 false + br i1 %or.cond, label %75, label %_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit + +75: ; preds = %37 + %76 = srem i64 %.sroa.052.0.copyload, 100 + %.not.i.i = icmp eq i64 %76, 0 + br i1 %.not.i.i, label %77, label %_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit + +77: ; preds = %75 + %78 = icmp eq i64 %50, 0 + %79 = zext i1 %78 to i32 br label %_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit -_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit: ; preds = %37, %77, %79 - %82 = phi i32 [ 0, %37 ], [ 1, %77 ], [ %81, %79 ] - %83 = getelementptr inbounds i32, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.k_month_offsets, i64 %59 +_ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.exit: ; preds = %37, %75, %77 + %82 = phi i32 [ 0, %37 ], [ 1, %75 ], [ %79, %77 ] + %83 = getelementptr inbounds i32, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.k_month_offsets, i64 %57 %84 = load i32, ptr %83, align 4, !tbaa !3 - %85 = add nsw i32 %82, %43 + %85 = add nsw i32 %82, %42 %86 = add i32 %85, %84 %87 = getelementptr inbounds nuw i8, ptr %0, i64 44 store i32 %86, ptr %87, align 4, !tbaa !24 @@ -1076,40 +1078,45 @@ _ZNK4absl12lts_202407228TimeZone2AtENS0_13time_internal4cctz6detail10civil_timeI %44 = getelementptr inbounds nuw i8, ptr %0, i64 40 store i8 0, ptr %44, align 4, !tbaa !82 %.not = icmp eq i64 %1, %.fca.0.extract.i - %.sroa.5.8.extract.trunc = trunc i64 %.fca.1.extract.i to i32 - %sext = shl i32 %.sroa.5.8.extract.trunc, 24 - %45 = ashr exact i32 %sext, 24 + %.sroa.5.8.extract.trunc = trunc i64 %.fca.1.extract.i to i8 + %45 = sext i8 %.sroa.5.8.extract.trunc to i32 %.not14 = icmp eq i32 %2, %45 %or.cond = select i1 %.not, i1 %.not14, i1 false - br i1 %or.cond, label %46, label %55 + br i1 %or.cond, label %46, label %54 46: ; preds = %43 - %47 = shl i32 %.sroa.5.8.extract.trunc, 16 - %48 = ashr i32 %47, 24 - %.not15 = icmp eq i32 %3, %48 - br i1 %.not15, label %49, label %55 - -49: ; preds = %46 - %50 = shl i32 %.sroa.5.8.extract.trunc, 8 - %51 = ashr i32 %50, 24 - %.not16 = icmp eq i32 %4, %51 - %52 = ashr i32 %.sroa.5.8.extract.trunc, 24 - %.not17 = icmp eq i32 %5, %52 - %or.cond31 = select i1 %.not16, i1 %.not17, i1 false - br i1 %or.cond31, label %53, label %55 - -53: ; preds = %49 - %sh.diff = lshr i64 %.fca.1.extract.i, 8 - %tr.sh.diff = trunc i64 %sh.diff to i32 - %54 = ashr i32 %tr.sh.diff, 24 - %.not18 = icmp eq i32 %6, %54 - br i1 %.not18, label %56, label %55 - -55: ; preds = %53, %49, %46, %43 + %.sroa.5.9.extract.shift = lshr i64 %.fca.1.extract.i, 8 + %.sroa.5.9.extract.trunc = trunc i64 %.sroa.5.9.extract.shift to i8 + %50 = sext i8 %.sroa.5.9.extract.trunc to i32 + %.not15 = icmp eq i32 %3, %50 + br i1 %.not15, label %48, label %54 + +48:; preds = %46 + %.sroa.5.10.extract.shift = lshr i64 %.fca.1.extract.i, 16 + %.sroa.5.10.extract.trunc = trunc i64 %.sroa.5.10.extract.shift to i8 + %52 = sext i8 %.sroa.5.10.extract.trunc to i32 + %.not17 = icmp eq i32 %4, %52 + br i1 %.not16, label %50, label %54 + +50: ; preds = %48 + %.sroa.5.11.extract.shift = lshr i64 %.fca.1.extract.i, 24 + %.sroa.5.11.extract.trunc = trunc i64 %.sroa.5.11.extract.shift to i8 + %51 = sext i8 %.sroa.5.11.extract.trunc to i32 + %.not17 = icmp eq i32 %5, %54 + br i1 %.not17, label %52, label %54 + +52: ; preds = %50 + %.sroa.5.8.insert.ext = lshr i64 %.fca.1.extract.i, 32 + %.sroa.5.12.extract.trunc = trunc i64 %.sroa.5.8.insert.ext to i8 + %53 = sext i8 %.sroa.5.12.extract.trunc to i32 + %.not18 = icmp eq i32 %6, %53 + br i1 %.not18, label %55, label %54 + +54: ; preds = %52, %50, %48, %46, %43 store i8 1, ptr %44, align 4, !tbaa !82 br label %56 -56: ; preds = %53, %55, %21, %14 +56: ; preds = %52, %54, %21, %14 ret void } @@ -1218,22 +1225,25 @@ _ZNK4absl12lts_202407228TimeZone2AtENS0_4TimeE.exit: ; preds = %14, %11, %16 %.sroa.29.0 = phi i32 [ 0, %11 ], [ %19, %16 ], [ 0, %14 ] %.sroa.10.0 = phi i64 [ %.fca.1.extract.i.i.i.i.i, %11 ], [ %.sroa.2.0.copyload.i.i, %16 ], [ 257, %14 ] %.sroa.0.0 = phi i64 [ %13, %11 ], [ %.sroa.0.0.copyload.i.i, %16 ], [ -9223372036854775808, %14 ] - %sh.diff = lshr i64 %.sroa.10.0, 8 - %tr.sh.diff = trunc i64 %sh.diff to i32 - %20 = ashr i32 %tr.sh.diff, 24 + %sh.diff = lshr i64 %.sroa.10.0, 32 + %tr.sh.diff = trunc i64 %sh.diff to i8 + %20 = sext i8 %tr.sh.diff to i32 store i32 %20, ptr %0, align 8, !tbaa !95 - %21 = trunc i64 %.sroa.10.0 to i32 - %22 = ashr i32 %21, 24 - %23 = getelementptr inbounds nuw i8, ptr %0, i64 4 - store i32 %22, ptr %23, align 4, !tbaa !94 - %24 = shl i32 %21, 8 - %25 = ashr i32 %24, 24 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i32 %25, ptr %26, align 8, !tbaa !93 - %27 = shl i32 %21, 16 - %28 = ashr i32 %27, 24 - %29 = getelementptr inbounds nuw i8, ptr %0, i64 12 - store i32 %28, ptr %29, align 4, !tbaa !92 + %.sroa.10.11.extract.shift = lshr i64 %.sroa.10.0, 24 + %.sroa.10.11.extract.trunc = trunc i64 %.sroa.10.11.extract.shift to i8 + %21 = sext i8 %.sroa.10.11.extract.trunc to i32 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store i32 %21, ptr %22, align 4, !tbaa !94 + %.sroa.10.10.extract.shift = lshr i64 %.sroa.10.0, 16 + %.sroa.10.10.extract.trunc = trunc i64 %.sroa.10.10.extract.shift to i8 + %23 = sext i8 %.sroa.10.10.extract.trunc to i32 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i32 %23, ptr %24, align 8, !tbaa !93 + %.sroa.10.9.extract.shift = lshr i64 %.sroa.10.0, 8 + %.sroa.10.9.extract.trunc = trunc i64 %.sroa.10.9.extract.shift to i8 + %25 = sext i8 %.sroa.10.9.extract.trunc to i32 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store i32 %25, ptr %26, align 4, !tbaa !92 %.sroa.10.8.extract.trunc = trunc i64 %.sroa.10.0 to i8 %30 = sext i8 %.sroa.10.8.extract.trunc to i32 %31 = add nsw i32 %30, -1 @@ -1252,7 +1262,7 @@ _ZNK4absl12lts_202407228TimeZone2AtENS0_4TimeE.exit: ; preds = %14, %11, %16 br label %39 39: ; preds = %34, %_ZNK4absl12lts_202407228TimeZone2AtENS0_4TimeE.exit, %36 - %.sink = phi i32 [ %38, %36 ], [ -2147483648, %_ZNK4absl12lts_202407228TimeZone2AtENS0_4TimeE.exit ], [ 2147481747, %34 ] + %.sink = phi i32 [ %38, %33 ], [ -2147483648, %_ZNK4absl12lts_202407228TimeZone2AtENS0_4TimeE.exit ], [ 2147481747, %31 ] %40 = getelementptr inbounds nuw i8, ptr %0, i64 20 store i32 %.sink, ptr %40, align 4, !tbaa !89 %41 = srem i64 %.sroa.0.0, 400 @@ -1270,7 +1280,7 @@ _ZNK4absl12lts_202407228TimeZone2AtENS0_4TimeE.exit: ; preds = %14, %11, %16 %48 = ashr exact i64 %sext.i, 54 %49 = getelementptr inbounds i8, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_weekdayERKNS3_10civil_timeINS3_10second_tagEEE.k_weekday_offsets, i64 %48 %50 = load i32, ptr %49, align 4, !tbaa !3 - %51 = add nsw i32 %50, %28 + %51 = add nsw i32 %50, %25 %52 = sext i32 %51 to i64 %53 = add nuw nsw i64 %45, %44 %54 = sub nuw nsw i64 %53, %.zext.i.i @@ -1309,10 +1319,10 @@ switch.lookup: ; preds = %39 br label %_ZN4absl12lts_2024072210GetYearDayENS0_13time_internal4cctz6detail10civil_timeINS1_10second_tagEEE.exit _ZN4absl12lts_2024072210GetYearDayENS0_13time_internal4cctz6detail10civil_timeINS1_10second_tagEEE.exit: ; preds = %64, %68, %70 - %73 = phi i32 [ 0, %64 ], [ 1, %68 ], [ %72, %70 ] + %73 = phi i32 [ 0, %61 ], [ 1, %65 ], [ %72, %67 ] %74 = getelementptr inbounds i8, ptr @__const._ZN4absl12lts_2024072213time_internal4cctz6detail11get_yeardayERKNS3_10civil_timeINS3_10second_tagEEE.k_month_offsets, i64 %48 %75 = load i32, ptr %74, align 4, !tbaa !3 - %76 = add nsw i32 %28, -1 + %76 = add nsw i32 %25, -1 %77 = add nsw i32 %76, %73 %78 = add i32 %77, %75 %79 = getelementptr inbounds nuw i8, ptr %0, i64 28 diff --git a/bench/hermes/optimized/APFloat.ll b/bench/hermes/optimized/APFloat.ll index 8412a1f52f6..bcc930e2ddf 100644 --- a/bench/hermes/optimized/APFloat.ll +++ b/bench/hermes/optimized/APFloat.ll @@ -6543,10 +6543,9 @@ if.end36.i: ; preds = %land.rhs.i, %if.end %cmp37.i = icmp ugt ptr %dot.3.i, %p.4.i %conv38.neg.i = sext i1 %cmp37.i to i64 %sub.i = add i64 %sub.ptr.sub.i, %conv38.neg.i - %conv39.i = trunc i64 %sub.i to i32 - %sext.i = shl i32 %conv39.i, 16 - %conv40.i = ashr exact i32 %sext.i, 16 - %add.i = add nsw i32 %conv40.i, %D.sroa.8.0 + %conv39.i = trunc i64 %sub.i to i16 + %conv40.i = sext i16 %conv39.i to i32 + %add.i = add nsw i32 %D.sroa.8.0, %conv40.i %sub.ptr.rhs.cast45.i = ptrtoint ptr %p.1.i.i to i64 %sub.ptr.sub46.i = sub i64 %sub.ptr.rhs.cast.i, %sub.ptr.rhs.cast45.i %cmp48.i = icmp ugt ptr %dot.3.i, %p.1.i.i @@ -6554,9 +6553,8 @@ if.end36.i: ; preds = %land.rhs.i, %if.end %10 = and i1 %cmp48.i, %cmp50.i %conv52.neg.i = sext i1 %10 to i64 %sub53.i = add i64 %sub.ptr.sub46.i, %conv52.neg.i - %conv54.i = trunc i64 %sub53.i to i32 - %sext41.i = shl i32 %conv54.i, 16 - %conv55.i = ashr exact i32 %sext41.i, 16 + %conv54.i = trunc i64 %sub53.i to i16 + %conv55.i = sext i16 %conv54.i to i32 %add56.i = add nsw i32 %add.i, %conv55.i %11 = load i8, ptr %p.1.i.i, align 1 %conv = sext i8 %11 to i32 diff --git a/bench/hermes/optimized/regexec.ll b/bench/hermes/optimized/regexec.ll index 7c559b9fecf..eb8b43d0751 100644 --- a/bench/hermes/optimized/regexec.ll +++ b/bench/hermes/optimized/regexec.ll @@ -1663,11 +1663,8 @@ sw.bb: ; preds = %for.body lor.lhs.false: ; preds = %sw.bb %incdec.ptr = getelementptr inbounds nuw i8, ptr %sp.0279, i64 1 %5 = load i8, ptr %sp.0279, align 1 - %conv = sext i8 %5 to i32 - %conv3 = trunc i64 %2 to i32 - %sext = shl i32 %conv3, 24 - %conv4 = ashr exact i32 %sext, 24 - %cmp5.not = icmp eq i32 %conv4, %conv + %conv3 = trunc i64 %2 to i8 + %cmp5.not = icmp eq i8 %5, %conv3 br i1 %cmp5.not, label %for.inc, label %return sw.bb7: ; preds = %for.body @@ -2165,9 +2162,8 @@ for.body: ; preds = %for.body.lr.ph, %fo ] sw.bb1: ; preds = %for.body - %conv = trunc i64 %4 to i32 - %sext = shl i32 %conv, 24 - %conv3 = ashr exact i32 %sext, 24 + %conv = trunc i64 %4 to i8 + %conv3 = sext i8 %conv to i32 %cmp4 = icmp eq i32 %ch, %conv3 br i1 %cmp4, label %if.then, label %for.inc163 @@ -2898,11 +2894,8 @@ sw.bb: ; preds = %for.body lor.lhs.false: ; preds = %sw.bb %incdec.ptr = getelementptr inbounds nuw i8, ptr %sp.0279, i64 1 %5 = load i8, ptr %sp.0279, align 1 - %conv = sext i8 %5 to i32 - %conv3 = trunc i64 %2 to i32 - %sext = shl i32 %conv3, 24 - %conv4 = ashr exact i32 %sext, 24 - %cmp5.not = icmp eq i32 %conv4, %conv + %conv3 = trunc i64 %2 to i8 + %cmp5.not = icmp eq i8 %5, %conv3 br i1 %cmp5.not, label %for.inc, label %return sw.bb7: ; preds = %for.body @@ -3395,9 +3388,8 @@ for.body: ; preds = %for.body.lr.ph, %fo ] sw.bb1: ; preds = %for.body - %conv = trunc i64 %4 to i32 - %sext = shl i32 %conv, 24 - %conv3 = ashr exact i32 %sext, 24 + %conv = trunc i64 %4 to i8 + %conv3 = sext i8 %conv to i32 %cmp4 = icmp eq i32 %ch, %conv3 br i1 %cmp4, label %if.then, label %for.inc245 diff --git a/bench/hyperscan/optimized/charreach.ll b/bench/hyperscan/optimized/charreach.ll index f0e9f3c7cff..0835276dc2c 100644 --- a/bench/hyperscan/optimized/charreach.ll +++ b/bench/hyperscan/optimized/charreach.ll @@ -156,7 +156,7 @@ define hidden noundef zeroext i1 @_ZNK3ue29CharReach14isCaselessCharEv(ptr nound %14 = tail call range(i64 0, 65) i64 @llvm.ctpop.i64(i64 %13) %15 = add nuw nsw i64 %11, %14 %.not = icmp eq i64 %15, 2 - br i1 %.not, label %.preheader, label %47 + br i1 %.not, label %.preheader, label %45 .preheader: ; preds = %1, %18 %.0712.i.i = phi i64 [ %19, %18 ], [ 0, %1 ] @@ -216,20 +216,17 @@ _ZNK3ue29CharReach10find_firstEv.exit: ; preds = %.preheader _ZNK3ue29CharReach9find_nextEm.exit: ; preds = %18, %30, %_ZNK3ue29CharReach10find_firstEv.exit, %27, %34 %38 = phi i64 [ %22, %_ZNK3ue29CharReach10find_firstEv.exit ], [ %22, %27 ], [ %22, %34 ], [ %22, %30 ], [ 256, %18 ] %.016.i.i = phi i64 [ 256, %_ZNK3ue29CharReach10find_firstEv.exit ], [ %29, %27 ], [ %37, %34 ], [ 256, %30 ], [ 256, %18 ] - %39 = trunc i64 %38 to i32 - %sext = shl i32 %39, 24 - %40 = ashr exact i32 %sext, 24 - %41 = trunc i64 %.016.i.i to i8 - %42 = add i8 %41, -123 - %43 = icmp ult i8 %42, -26 - %44 = add i8 %41, -32 - %.0.i = select i1 %43, i8 %41, i8 %44 - %45 = sext i8 %.0.i to i32 - %46 = icmp eq i32 %40, %45 - br label %47 - -47: ; preds = %1, %_ZNK3ue29CharReach9find_nextEm.exit - %.0 = phi i1 [ %46, %_ZNK3ue29CharReach9find_nextEm.exit ], [ false, %1 ] + %39 = trunc i64 %38 to i8 + %40 = trunc i64 %.016.i.i to i8 + %41 = add i8 %40, -123 + %42 = icmp ult i8 %41, -26 + %42 = add i8 %40, -32 + %.0.i = select i1 %42, i8 %40, i8 %43 + %44 = icmp eq i8 %.0.i, %39 + br label %45 + +45:; preds = %1, %_ZNK3ue29CharReach9find_nextEm.exit + %.0 = phi i1 [ %44, %_ZNK3ue29CharReach9find_nextEm.exit ], [ false, %1 ] ret i1 %.0 } diff --git a/bench/icu/optimized/measunit_extra.ll b/bench/icu/optimized/measunit_extra.ll index 7c7b8ef6915..2e676afe3d9 100644 --- a/bench/icu/optimized/measunit_extra.ll +++ b/bench/icu/optimized/measunit_extra.ll @@ -3408,10 +3408,9 @@ _ZN6icu_7715MeasureUnitImplC2Ev.exit: ; preds = %3 br i1 %.not.i, label %55, label %.critedge.sink.split 55: ; preds = %54 - %56 = trunc i64 %.sroa.0.1.i to i32 - %sext.i = shl i32 %56, 24 - %57 = ashr exact i32 %sext.i, 24 - %58 = mul nsw i32 %57, %.sroa.7.2.i + %56 = trunc i64 %.sroa.0.1.i to i8 + %57 = sext i8 %56 to i32 + %58 = mul nsw i32 %.sroa.7.2.i, %57 br label %63 59: ; preds = %.preheader.i diff --git a/bench/icu/optimized/number_mapper.ll b/bench/icu/optimized/number_mapper.ll index 76c74422b82..1f76752a0b0 100644 --- a/bench/icu/optimized/number_mapper.ll +++ b/bench/icu/optimized/number_mapper.ll @@ -1480,15 +1480,18 @@ _ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.ex %.sroa.13.0 = phi i16 [ %.sroa.13.0.copyload, %364 ], [ %.sroa.13.0.copyload273, %369 ] %.sroa.12.0 = phi i16 [ %.sroa.12.0.copyload, %364 ], [ %.sroa.12.0.copyload271, %369 ] %.sroa.0.0 = phi i32 [ %.sroa.0.0.copyload, %364 ], [ %212, %369 ] + %.sroa.7266.sroa.8.0.in = lshr i64 %.sroa.7266.sroa.9.0.in.in, 32 + %.sroa.7266.sroa.8.0 = trunc i64 %.sroa.7266.sroa.8.0.in to i16 %371 = icmp eq i32 %.sroa.0.0, 2 br i1 %371, label %372, label %375 372: ; preds = %370 - %.sroa.7266.sroa.0.0 = trunc i64 %.sroa.7266.sroa.9.0.in.in to i32 - %sext329 = shl i32 %.sroa.7266.sroa.0.0, 16 - %373 = ashr exact i32 %sext329, 16 - %374 = ashr i32 %.sroa.7266.sroa.0.0, 16 - br label %397 + %.sroa.7266.sroa.0.0 = trunc i64 %.sroa.7266.sroa.9.0.in.in to i16 + %.sroa.7266.sroa.7.0.in = lshr i64 %.sroa.7266.sroa.9.0.in.in, 16 + %.sroa.7266.sroa.7.0 = trunc i64 %.sroa.7266.sroa.7.0.in to i16 + %373 = sext i16 %.sroa.7266.sroa.0.0 to i32 + %374 = sext i16 %.sroa.7266.sroa.7.0 to i32 + br label %398 375: ; preds = %370 %376 = add i32 %.sroa.0.0, -5 @@ -1517,7 +1520,7 @@ _ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.ex 386: ; preds = %384 call void @_ZN6icu_776number4impl15DecimalQuantityD1Ev(ptr noundef nonnull align 8 dereferenceable(66) %28) #16 call void @llvm.lifetime.end.p0(ptr nonnull %28) - br label %397 + br label %398 387: ; preds = %377 %388 = landingpad { ptr, i32 } @@ -1537,22 +1540,19 @@ _ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.ex 392: ; preds = %375 %393 = icmp eq i32 %.sroa.0.0, 3 - br i1 %393, label %394, label %397 + br i1 %393, label %394, label %398 394: ; preds = %392 - %sh.diff = lshr i64 %.sroa.7266.sroa.9.0.in.in, 16 - %tr.sh.diff = trunc i64 %sh.diff to i32 - %395 = ashr i32 %tr.sh.diff, 16 - %sh.diff331 = lshr i64 %.sroa.7266.sroa.9.0.in.in, 32 - %tr.sh.diff332 = trunc nuw i64 %sh.diff331 to i32 - %396 = ashr i32 %tr.sh.diff332, 16 - br label %397 - -397: ; preds = %386, %394, %392, %372 + %395 = sext i16 %.sroa.7266.sroa.8.0 to i32 + %396 = ashr i64 %.sroa.7266.sroa.9.0.in.in, 48 + %397 = trunc nsw i64 %396 to i32 + br label %398 + +398:; preds = %386, %394, %392, %372 %.0200 = phi i32 [ %373, %372 ], [ %378, %386 ], [ %.2322, %394 ], [ %.2322, %392 ] %.0199 = phi i32 [ %374, %372 ], [ %378, %386 ], [ %.2, %394 ], [ %.2, %392 ] %.0198 = phi i32 [ %.0221, %372 ], [ %.0221, %386 ], [ %395, %394 ], [ %.0221, %392 ] - %.0197 = phi i32 [ %.0222, %372 ], [ %.0222, %386 ], [ %396, %394 ], [ %.0222, %392 ] + %.0197 = phi i32 [ %.0222, %372 ], [ %.0222, %386 ], [ %397, %394 ], [ %.0222, %392 ] %.0 = phi double [ 0.000000e+00, %372 ], [ %385, %386 ], [ 0.000000e+00, %394 ], [ 0.000000e+00, %392 ] %398 = getelementptr inbounds nuw i8, ptr %4, i64 104 store i32 %.0200, ptr %398, align 8, !tbaa !79 @@ -1566,7 +1566,7 @@ _ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.ex store double %.0, ptr %402, align 8, !tbaa !82 br label %403 -403: ; preds = %397, %_ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.exit +403: ; preds = %398, %_ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.exit call void @llvm.lifetime.end.p0(ptr nonnull %10) call void @_ZN6icu_7712CurrencyUnitD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %8) #16 call void @llvm.lifetime.end.p0(ptr nonnull %8) @@ -1580,22 +1580,22 @@ _ZN6icu_776number4implL19scaleFromPropertiesERKNS1_23DecimalFormatPropertiesE.ex br label %405 405: ; preds = %129, %404, %93, %92 - %.pn243.pn.pn.pn.pn = phi { ptr, i32 } [ %94, %93 ], [ %.pn, %92 ], [ %.pn243.pn.pn, %404 ], [ %130, %129 ] + %.pn243.pn.pn.pn.pn = phi { ptr, i32 } [ %94, %93 ], [ %.pn, %92 ], [ %.pn243.pn.pn, %405 ], [ %130, %129 ] call void @_ZN6icu_7712CurrencyUnitD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %8) #16 br label %406 406: ; preds = %405, %86 - %.pn243.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn243.pn.pn.pn.pn, %405 ], [ %87, %86 ] + %.pn243.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn243.pn.pn.pn.pn, %406 ], [ %87, %86 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) br label %407 407: ; preds = %84, %406, %39 - %.pn243.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %40, %39 ], [ %.pn243.pn.pn.pn.pn.pn, %406 ], [ %85, %84 ] + %.pn243.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %40, %39 ], [ %.pn243.pn.pn.pn.pn.pn, %407 ], [ %85, %84 ] call void @_ZN6icu_776LocaleD1Ev(ptr noundef nonnull align 8 dereferenceable(217) %7) #16 br label %408 408: ; preds = %407, %37 - %.pn243.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn243.pn.pn.pn.pn.pn.pn.pn, %407 ], [ %38, %37 ] + %.pn243.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn243.pn.pn.pn.pn.pn.pn.pn, %408 ], [ %38, %37 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @_ZN6icu_776number4impl10MacroPropsD2Ev(ptr noundef nonnull align 8 dereferenceable(472) %0) #16 resume { ptr, i32 } %.pn243.pn.pn.pn.pn.pn.pn.pn.pn diff --git a/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll b/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll index 817a6fdbf25..40cb13e8487 100644 --- a/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll +++ b/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll @@ -28727,10 +28727,9 @@ define noundef i8 @_ZN5image6codecs3bmp7decoder8Bitfield4read17h215ead37bbd5df0f unreachable 9: ; preds = %2 - %10 = trunc i32 %5 to i8 - %11 = and i8 %10, 1 - %12 = sub nsw i8 0, %11 - br label %25 + %10 = trunc i32 %5 to i1 + %11 = sext i1 %10 to i8 + br label %24 13: ; preds = %2 %14 = trunc i32 %5 to i8 @@ -28751,7 +28750,7 @@ define noundef i8 @_ZN5image6codecs3bmp7decoder8Bitfield4read17h215ead37bbd5df0f br label %25 25: ; preds = %41, %36, %31, %26, %23, %17, %13, %9 - %.0 = phi i8 [ %12, %9 ], [ %16, %13 ], [ %30, %26 ], [ %35, %31 ], [ %40, %36 ], [ %45, %41 ], [ %22, %17 ], [ %24, %23 ] + %.0 = phi i8 [ %11, %9 ], [ %16, %12 ], [ %30, %25 ], [ %35, %30 ], [ %40, %35 ], [ %45, %40 ], [ %22, %16 ], [ %24, %22 ] ret i8 %.0 26: ; preds = %2 diff --git a/bench/jiff-rs/optimized/e4m488lukglmxlpbdqjrf7sst.ll b/bench/jiff-rs/optimized/e4m488lukglmxlpbdqjrf7sst.ll index d6915040215..32fee9f0c07 100644 --- a/bench/jiff-rs/optimized/e4m488lukglmxlpbdqjrf7sst.ll +++ b/bench/jiff-rs/optimized/e4m488lukglmxlpbdqjrf7sst.ll @@ -5187,7 +5187,7 @@ _ZN4jiff6shared5posix6Parser4bump17h25cf41ecc89a64deE.exit: ; preds = %_ZN4jiff6 _ZN4jiff6shared5posix6Parser4byte17hd119eb807b4a2d53E.exit.i.i: ; preds = %310 %313 = getelementptr inbounds nuw i8, ptr %289, i64 %293 %314 = load i8, ptr %313, align 1, !noalias !277, !noundef !8 - switch i8 %314, label %.thread.thread132.i.thread [ + switch i8 %314, label %.thread.thread131.i.thread [ i8 45, label %_ZN4jiff6shared5posix6Parser4bump17h25cf41ecc89a64deE.exit.i.i38 i8 43, label %_ZN4jiff6shared5posix6Parser4bump17h25cf41ecc89a64deE.exit5.i.i ] @@ -5334,7 +5334,7 @@ _ZN4jiff6shared5posix6Parser10maybe_byte17hc2eb5707519d29f4E.exit.i: ; preds = % unreachable 360: ; preds = %.thread.thread132.i.thread, %.thread.thread132.i - %361 = phi i32 [ %.ph, %.thread.thread132.i.thread ], [ %spec.select.i, %.thread.thread132.i ] + %361 = phi i32 [ %.ph, %.thread.thread131.i.thread ], [ %spec.select.i, %.thread.thread131.i ] call void @llvm.lifetime.start.p0(ptr nonnull %12), !noalias !283 call fastcc void @_ZN4jiff6shared5posix6Parser31parse_number_with_upto_n_digits17h70e6d779c87cd4eaE(ptr noalias noundef align 8 captures(none) dereferenceable(16) %11, ptr noundef nonnull align 8 %1, i64 noundef 3), !noalias !283 %362 = load ptr, ptr %11, align 8, !noalias !283, !noundef !8 @@ -5566,9 +5566,8 @@ _ZN4jiff6shared5posix6Parser10maybe_byte17hc2eb5707519d29f4E.exit63.i: ; preds = br i1 %.not56.i, label %439, label %_ZN4jiff6shared5posix6Parser16parse_posix_time17hbb7444d7a9a4c15aE.exit.thread 439: ; preds = %435 - %440 = trunc i64 %438 to i32 - %sext126.i = shl i32 %440, 24 - %441 = ashr exact i32 %sext126.i, 24 + %440 = trunc i64 %438 to i8 + %441 = sext i8 %440 to i32 br label %_ZN4jiff6shared5posix6Parser10maybe_byte17hc2eb5707519d29f4E.exit.thread.i 442: ; preds = %_ZN4jiff6shared5posix6Parser10maybe_byte17hc2eb5707519d29f4E.exit.thread.i diff --git a/bench/libjpeg-turbo/optimized/jidctfst.ll b/bench/libjpeg-turbo/optimized/jidctfst.ll index d49e94c316e..495c64afc60 100644 --- a/bench/libjpeg-turbo/optimized/jidctfst.ll +++ b/bench/libjpeg-turbo/optimized/jidctfst.ll @@ -204,8 +204,8 @@ define void @jpeg_idct_ifast(ptr noundef readonly captures(none) %0, ptr noundef br i1 %153, label %13, label %.preheader, !llvm.loop !34 154: ; preds = %.preheader, %310 - %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %310 ] - %.2271 = phi ptr [ %6, %.preheader ], [ %.3, %310 ] + %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %308 ] + %.2271 = phi ptr [ %6, %.preheader ], [ %.3, %308 ] %155 = getelementptr inbounds nuw ptr, ptr %3, i64 %indvars.iv %156 = load ptr, ptr %155, align 8, !tbaa !36 %157 = getelementptr inbounds nuw i8, ptr %156, i64 %12 @@ -319,91 +319,89 @@ define void @jpeg_idct_ifast(ptr noundef readonly captures(none) %0, ptr noundef %sext243 = shl i64 %228, 48 %236 = ashr exact i64 %sext243, 48 %237 = trunc nsw i64 %236 to i32 - %238 = mul i32 %237, 70912 - %239 = mul i32 %235, 121088 - %240 = and i32 %239, -65536 - %sext246 = shl i64 %223, 48 - %241 = ashr exact i64 %sext246, 48 - %242 = trunc nsw i64 %241 to i32 - %243 = mul i32 %242, -171264 - %244 = mul i32 %232, 92672 - %245 = shl i32 %231, 16 - %246 = sub i32 %243, %245 - %247 = add i32 %246, %240 - %248 = ashr i32 %247, 16 - %249 = sub i32 %238, %240 - %250 = and i32 %247, -65536 - %251 = sub i32 %244, %250 + %238 = mul nsw i32 %237, 277 + %239 = lshr i32 %238, 8 + %240 = mul i32 %235, 121088 + %241 = ashr i32 %240, 16 + %242 = sub nsw i32 %239, %241 + %sext245 = shl i64 %223, 48 + %243 = ashr exact i64 %sext245, 48 + %244 = trunc nsw i64 %243 to i32 + %245 = mul i32 %244, 16776547 + %246 = lshr i32 %245, 8 + %247 = sub i32 %246, %231 + %248 = add i32 %247, %241 + %249 = mul i32 %232, 92672 + %250 = shl i32 %248, 16 + %251 = sub i32 %249, %250 %252 = ashr i32 %251, 16 - %253 = add i32 %231, %210 - %254 = lshr i32 %253, 5 - %255 = and i32 %254, 1023 - %256 = zext nneg i32 %255 to i64 - %257 = getelementptr inbounds nuw i8, ptr %11, i64 %256 - %258 = load i8, ptr %257, align 1, !tbaa !37 - store i8 %258, ptr %157, align 1, !tbaa !37 - %259 = sub i32 %210, %231 - %260 = lshr i32 %259, 5 - %261 = and i32 %260, 1023 - %262 = zext nneg i32 %261 to i64 - %263 = getelementptr inbounds nuw i8, ptr %11, i64 %262 - %264 = load i8, ptr %263, align 1, !tbaa !37 - %265 = getelementptr inbounds nuw i8, ptr %157, i64 7 - store i8 %264, ptr %265, align 1, !tbaa !37 - %266 = add i32 %248, %215 - %267 = lshr i32 %266, 5 - %268 = and i32 %267, 1023 - %269 = zext nneg i32 %268 to i64 - %270 = getelementptr inbounds nuw i8, ptr %11, i64 %269 - %271 = load i8, ptr %270, align 1, !tbaa !37 - %272 = getelementptr inbounds nuw i8, ptr %157, i64 1 - store i8 %271, ptr %272, align 1, !tbaa !37 - %273 = sub i32 %215, %248 - %274 = lshr i32 %273, 5 - %275 = and i32 %274, 1023 - %276 = zext nneg i32 %275 to i64 - %277 = getelementptr inbounds nuw i8, ptr %11, i64 %276 - %278 = load i8, ptr %277, align 1, !tbaa !37 - %279 = getelementptr inbounds nuw i8, ptr %157, i64 6 - store i8 %278, ptr %279, align 1, !tbaa !37 - %280 = add i32 %252, %216 - %281 = lshr i32 %280, 5 - %282 = and i32 %281, 1023 - %283 = zext nneg i32 %282 to i64 - %284 = getelementptr inbounds nuw i8, ptr %11, i64 %283 - %285 = load i8, ptr %284, align 1, !tbaa !37 - %286 = getelementptr inbounds nuw i8, ptr %157, i64 2 - store i8 %285, ptr %286, align 1, !tbaa !37 - %287 = sub i32 %216, %252 - %288 = lshr i32 %287, 5 - %289 = and i32 %288, 1023 - %290 = zext nneg i32 %289 to i64 - %291 = getelementptr inbounds nuw i8, ptr %11, i64 %290 - %292 = load i8, ptr %291, align 1, !tbaa !37 - %293 = getelementptr inbounds nuw i8, ptr %157, i64 5 - store i8 %292, ptr %293, align 1, !tbaa !37 - %294 = and i32 %251, -65536 - %295 = add i32 %249, %294 - %296 = ashr i32 %295, 16 - %297 = add i32 %296, %211 - %298 = lshr i32 %297, 5 - %299 = and i32 %298, 1023 - %300 = zext nneg i32 %299 to i64 - %301 = getelementptr inbounds nuw i8, ptr %11, i64 %300 - %302 = load i8, ptr %301, align 1, !tbaa !37 - %303 = getelementptr inbounds nuw i8, ptr %157, i64 4 - store i8 %302, ptr %303, align 1, !tbaa !37 - %304 = sub i32 %211, %296 - %305 = lshr i32 %304, 5 - %306 = and i32 %305, 1023 - %307 = zext nneg i32 %306 to i64 - %308 = getelementptr inbounds nuw i8, ptr %11, i64 %307 - %309 = load i8, ptr %308, align 1, !tbaa !37 - br label %310 + %253 = add nsw i32 %252, %242 + %254 = add i32 %231, %210 + %255 = lshr i32 %254, 5 + %256 = and i32 %255, 1023 + %257 = zext nneg i32 %256 to i64 + %258 = getelementptr inbounds nuw i8, ptr %11, i64 %257 + %259 = load i8, ptr %258, align 1, !tbaa !37 + store i8 %259, ptr %157, align 1, !tbaa !37 + %260 = sub i32 %210, %231 + %261 = lshr i32 %260, 5 + %262 = and i32 %261, 1023 + %263 = zext nneg i32 %262 to i64 + %264 = getelementptr inbounds nuw i8, ptr %11, i64 %263 + %265 = load i8, ptr %264, align 1, !tbaa !37 + %266 = getelementptr inbounds nuw i8, ptr %157, i64 7 + store i8 %265, ptr %266, align 1, !tbaa !37 + %267 = add i32 %248, %215 + %268 = lshr i32 %267, 5 + %269 = and i32 %268, 1023 + %270 = zext nneg i32 %269 to i64 + %271 = getelementptr inbounds nuw i8, ptr %11, i64 %270 + %272 = load i8, ptr %271, align 1, !tbaa !37 + %273 = getelementptr inbounds nuw i8, ptr %157, i64 1 + store i8 %272, ptr %273, align 1, !tbaa !37 + %274 = sub i32 %215, %248 + %275 = lshr i32 %274, 5 + %276 = and i32 %275, 1023 + %277 = zext nneg i32 %276 to i64 + %278 = getelementptr inbounds nuw i8, ptr %11, i64 %277 + %279 = load i8, ptr %278, align 1, !tbaa !37 + %280 = getelementptr inbounds nuw i8, ptr %157, i64 6 + store i8 %279, ptr %280, align 1, !tbaa !37 + %281 = add i32 %252, %216 + %282 = lshr i32 %281, 5 + %283 = and i32 %282, 1023 + %284 = zext nneg i32 %283 to i64 + %285 = getelementptr inbounds nuw i8, ptr %11, i64 %284 + %286 = load i8, ptr %285, align 1, !tbaa !37 + %287 = getelementptr inbounds nuw i8, ptr %157, i64 2 + store i8 %286, ptr %287, align 1, !tbaa !37 + %288 = sub i32 %216, %252 + %289 = lshr i32 %288, 5 + %290 = and i32 %289, 1023 + %291 = zext nneg i32 %290 to i64 + %292 = getelementptr inbounds nuw i8, ptr %11, i64 %291 + %293 = load i8, ptr %292, align 1, !tbaa !37 + %294 = getelementptr inbounds nuw i8, ptr %157, i64 5 + store i8 %293, ptr %294, align 1, !tbaa !37 + %295 = add i32 %253, %211 + %296 = lshr i32 %295, 5 + %297 = and i32 %296, 1023 + %298 = zext nneg i32 %297 to i64 + %299 = getelementptr inbounds nuw i8, ptr %11, i64 %298 + %300 = load i8, ptr %299, align 1, !tbaa !37 + %301 = getelementptr inbounds nuw i8, ptr %157, i64 4 + store i8 %300, ptr %301, align 1, !tbaa !37 + %302 = sub i32 %211, %253 + %303 = lshr i32 %302, 5 + %304 = and i32 %303, 1023 + %305 = zext nneg i32 %304 to i64 + %306 = getelementptr inbounds nuw i8, ptr %11, i64 %305 + %307 = load i8, ptr %306, align 1, !tbaa !37 + br label %308 310: ; preds = %._crit_edge275, %184 - %.sink284 = phi i64 [ 3, %._crit_edge275 ], [ 7, %184 ] - %.sink282 = phi i8 [ %309, %._crit_edge275 ], [ %190, %184 ] + %.sink284 = phi i64 [ 3, %._crit_edge271 ], [ 7, %184 ] + %.sink282 = phi i8 [ %307, %._crit_edge271 ], [ %190, %184 ] %311 = getelementptr inbounds nuw i8, ptr %157, i64 %.sink284 store i8 %.sink282, ptr %311, align 1, !tbaa !37 %.3 = getelementptr inbounds nuw i8, ptr %.2271, i64 32 diff --git a/bench/llvm/optimized/AArch64InstPrinter.ll b/bench/llvm/optimized/AArch64InstPrinter.ll index a5191d3a475..3701722cc57 100644 --- a/bench/llvm/optimized/AArch64InstPrinter.ll +++ b/bench/llvm/optimized/AArch64InstPrinter.ll @@ -8981,9 +8981,8 @@ _ZNK4llvm13MCInstPrinter9formatImmEl.exit: ; preds = %37, %38 br label %46 41: ; preds = %5 - %42 = trunc i64 %13 to i32 - %sext = shl i32 %42, 24 - %43 = ashr exact i32 %sext, 24 + %42 = trunc i64 %13 to i8 + %43 = sext i8 %42 to i32 %44 = shl i32 %43, %22 %45 = trunc i32 %44 to i16 tail call void @_ZN4llvm18AArch64InstPrinter11printImmSVEIsEEvT_RNS_11raw_ostreamE(ptr noundef nonnull align 8 dereferenceable(96) %0, i16 noundef signext %45, ptr noundef nonnull align 8 dereferenceable(48) %4) @@ -10361,9 +10360,8 @@ _ZNK4llvm13MCInstPrinter9formatImmEl.exit: ; preds = %37, %38 br label %46 41: ; preds = %5 - %42 = trunc i64 %13 to i32 - %sext = shl i32 %42, 24 - %43 = ashr exact i32 %sext, 24 + %42 = trunc i64 %13 to i8 + %43 = sext i8 %42 to i32 %44 = shl i32 %43, %22 %45 = sext i32 %44 to i64 tail call void @_ZN4llvm18AArch64InstPrinter11printImmSVEIlEEvT_RNS_11raw_ostreamE(ptr noundef nonnull align 8 dereferenceable(96) %0, i64 noundef %45, ptr noundef nonnull align 8 dereferenceable(48) %4) @@ -10443,9 +10441,8 @@ _ZNK4llvm13MCInstPrinter9formatImmEl.exit: ; preds = %37, %38 br label %45 41: ; preds = %5 - %42 = trunc i64 %13 to i32 - %sext = shl i32 %42, 24 - %43 = ashr exact i32 %sext, 24 + %42 = trunc i64 %13 to i8 + %43 = sext i8 %42 to i32 %44 = shl i32 %43, %22 tail call void @_ZN4llvm18AArch64InstPrinter11printImmSVEIiEEvT_RNS_11raw_ostreamE(ptr noundef nonnull align 8 dereferenceable(96) %0, i32 noundef %44, ptr noundef nonnull align 8 dereferenceable(48) %4) br label %45 @@ -16666,9 +16663,10 @@ define linkonce_odr void @_ZN4llvm18AArch64InstPrinter18printSVELogicalImmIiEEvP _ZN4llvm10AArch64_AML22decodeLogicalImmediateEmj.exit: ; preds = %.lr.ph30.i, %.preheader.i %.1.lcssa.i = phi i64 [ %.023.lcssa.i, %.preheader.i ], [ %38, %.lr.ph30.i ] %40 = trunc i64 %.1.lcssa.i to i32 - %41 = add i32 %40, 32768 - %42 = icmp ult i32 %41, 65536 - br i1 %42, label %43, label %44 + %41 = trunc i64 %.1.lcssa.i to i16 + %42 = sext i16 %41 to i32 + %43 = icmp eq i32 %43, %40 + br i1 %43, label %44, label %45 43: ; preds = %_ZN4llvm10AArch64_AML22decodeLogicalImmediateEmj.exit tail call void @_ZN4llvm18AArch64InstPrinter11printImmSVEIiEEvT_RNS_11raw_ostreamE(ptr noundef nonnull align 8 dereferenceable(96) %0, i32 noundef %40, ptr noundef nonnull align 8 dereferenceable(48) %4) @@ -27805,8 +27803,8 @@ _ZN4llvm10AArch64_AML11isSVECpyImmIlEEbl.exit: ; preds = %8 br i1 %.not14.i, label %22, label %19 19: ; preds = %18 - %20 = add i32 %.sroa.023.0.extract.trunc, 128 - %21 = icmp ult i32 %20, 256 + %20 = add nsw i64 %16, 128 + %21 = icmp ult i64 %20, 256 br i1 %21, label %_ZN4llvm10AArch64_AML18isLogicalImmediateEmj.exit, label %_ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit.thread 22: ; preds = %18 @@ -27815,8 +27813,8 @@ _ZN4llvm10AArch64_AML11isSVECpyImmIlEEbl.exit: ; preds = %8 br i1 %.not15.i5, label %_ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit, label %24 24: ; preds = %22 - %25 = add i32 %.sroa.023.0.extract.trunc, 32768 - %26 = icmp ult i32 %25, 65536 + %25 = add nsw i64 %16, 32768 + %26 = icmp ult i64 %25, 65536 br i1 %26, label %_ZN4llvm10AArch64_AML18isLogicalImmediateEmj.exit, label %_ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit.thread _ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit: ; preds = %22 @@ -27844,10 +27842,9 @@ _ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit.thread: ; preds = %15, %24, %19, % br i1 %.not14.i, label %_ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit, label %33 33: ; preds = %32 - %34 = trunc nsw i64 %30 to i32 - %35 = add nsw i32 %34, 128 - %36 = icmp ult i32 %35, 256 - br i1 %36, label %_ZN4llvm10AArch64_AML18isLogicalImmediateEmj.exit, label %_ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit.thread + %34 = add nsw i64 %30, 128 + %35 = icmp ult i64 %34, 256 + br i1 %35, label %_ZN4llvm10AArch64_AML18isLogicalImmediateEmj.exit, label %_ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit.thread _ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit: ; preds = %32 %37 = and i64 %0, 65280 @@ -27932,7 +27929,7 @@ _ZN4llvm16isShiftedMask_64Em.exit54.i.i: ; preds = %_ZN4llvm16isShifted br label %_ZN4llvm10AArch64_AML18isLogicalImmediateEmj.exit _ZN4llvm10AArch64_AML18isLogicalImmediateEmj.exit: ; preds = %_ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit, %_ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit, %_ZN4llvm10AArch64_AML11isSVECpyImmIaEEbl.exit, %19, %24, %33, %_ZN4llvm16isShiftedMask_64Em.exit.thread.i.i, %_ZN4llvm16isShiftedMask_64Em.exit54.i.i, %68, %10, %5, %_ZN4llvm10AArch64_AML11isSVECpyImmIlEEbl.exit - %.0 = phi i1 [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIlEEbl.exit ], [ false, %5 ], [ false, %10 ], [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit ], [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit ], [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIaEEbl.exit ], [ false, %19 ], [ false, %24 ], [ false, %33 ], [ true, %68 ], [ false, %_ZN4llvm16isShiftedMask_64Em.exit54.i.i ], [ false, %_ZN4llvm16isShiftedMask_64Em.exit.thread.i.i ] + %.0 = phi i1 [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIlEEbl.exit ], [ false, %5 ], [ false, %10 ], [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIiEEbl.exit ], [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIsEEbl.exit ], [ false, %_ZN4llvm10AArch64_AML11isSVECpyImmIaEEbl.exit ], [ false, %19 ], [ false, %24 ], [ false, %33 ], [ true, %67 ], [ false, %_ZN4llvm16isShiftedMask_64Em.exit54.i.i ], [ false, %_ZN4llvm16isShiftedMask_64Em.exit.thread.i.i ] ret i1 %.0 } diff --git a/bench/llvm/optimized/Lexer.ll b/bench/llvm/optimized/Lexer.ll index 0be34566d3b..08b6eb80584 100644 --- a/bench/llvm/optimized/Lexer.ll +++ b/bench/llvm/optimized/Lexer.ll @@ -8986,7 +8986,7 @@ _ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit: ; preds = %3, 8: ; preds = %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit %9 = getelementptr inbounds nuw i8, ptr %1, i64 %.sroa.3.0.insert.insert.i %10 = load i8, ptr %9, align 1, !tbaa !381 - switch i8 %10, label %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit18 [ + switch i8 %10, label %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit17 [ i8 92, label %11 i8 63, label %11 ] @@ -9003,7 +9003,7 @@ _ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit18: ; preds = % br label %15 15: ; preds = %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit, %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit18 - %.0 = phi i1 [ %14, %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit18 ], [ false, %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit ] + %.0 = phi i1 [ %14, %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit17 ], [ false, %_ZN5clang5Lexer20getCharAndSizeNoWarnEPKcRKNS_11LangOptionsE.exit ] ret i1 %.0 } diff --git a/bench/llvm/optimized/X86InstCombineIntrinsic.ll b/bench/llvm/optimized/X86InstCombineIntrinsic.ll index 7e6ff0e9f35..9a26267b4ee 100644 --- a/bench/llvm/optimized/X86InstCombineIntrinsic.ll +++ b/bench/llvm/optimized/X86InstCombineIntrinsic.ll @@ -9246,7 +9246,7 @@ define internal fastcc noundef ptr @_ZL17simplifyX86pshufbRKN4llvm13IntrinsicIns br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %39 - %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %39 ] + %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %40 ] %20 = trunc nuw i64 %indvars.iv to i32 %21 = tail call noundef ptr @_ZNK4llvm8Constant19getAggregateElementEj(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %20) #15 %.not29 = icmp eq ptr %21, null @@ -9271,8 +9271,8 @@ define internal fastcc noundef ptr @_ZL17simplifyX86pshufbRKN4llvm13IntrinsicIns %.0.in.i = select i1 %31, ptr %28, ptr %32 %.0.i = load i64, ptr %.0.in.i, align 8, !tbaa !25 %33 = trunc i64 %.0.i to i32 - %sext.mask = and i32 %33, 128 - %.not30 = icmp eq i32 %sext.mask, 0 + %sext.mask = and i64 %.0.i, 128 + %.not30 = icmp eq i64 %sext.mask, 0 %34 = and i32 %33, 15 %35 = select i1 %.not30, i32 %34, i32 %19 %36 = and i32 %20, 240 diff --git a/bench/luau/optimized/AssemblyBuilderX64.ll b/bench/luau/optimized/AssemblyBuilderX64.ll index 4475d0a17f5..8dcd8b8eb84 100644 --- a/bench/luau/optimized/AssemblyBuilderX64.ll +++ b/bench/luau/optimized/AssemblyBuilderX64.ll @@ -1585,10 +1585,11 @@ define dso_local void @_ZN4Luau7CodeGen3X6418AssemblyBuilderX6414placeModRegMemE br i1 %.not, label %18, label %15 15: ; preds = %14 - %16 = add i32 %.sroa.10.0.extract.trunc, 128 - %17 = icmp ult i32 %16, 256 - %. = select i1 %17, i32 1, i32 2 - br label %21 + %16 = trunc i64 %.sroa.10.0.extract.shift to i8 + %17 = sext i8 %16 to i32 + %18 = icmp eq i32 %17, %.sroa.10.0.extract.trunc + %. = select i1 %18, i32 1, i32 2 + br label %22 18: ; preds = %14 %19 = and i8 %.sroa.4.0.extract.trunc, 56 @@ -1598,8 +1599,8 @@ define dso_local void @_ZN4Luau7CodeGen3X6418AssemblyBuilderX6414placeModRegMemE br label %21 21: ; preds = %18, %15 - %.not32 = phi i1 [ false, %15 ], [ %20, %18 ] - %.0 = phi i32 [ %., %15 ], [ %spec.select37, %18 ] + %.not32 = phi i1 [ false, %15 ], [ %20, %19 ] + %.0 = phi i32 [ %., %15 ], [ %spec.select37, %19 ] %.not53 = icmp eq i8 %.sroa.3.0.extract.trunc, -128 br i1 %.not53, label %74, label %22 @@ -1737,7 +1738,7 @@ define dso_local void @_ZN4Luau7CodeGen3X6418AssemblyBuilderX6414placeModRegMemE br label %_ZN4Luau7CodeGen3X6418AssemblyBuilderX6413placeImm8Or32Ei.exit 104: ; preds = %74 - switch i8 %.sroa.4.0.extract.trunc, label %119 [ + switch i8 %.sroa.4.0.extract.trunc, label %120 [ i8 0, label %105 i8 -128, label %.thread52 ] @@ -6924,8 +6925,9 @@ _ZN4Luau7CodeGen3X6418AssemblyBuilderX648placeRexENS1_10OperandX64E.exit: ; pred br label %62 49: ; preds = %_ZN4Luau7CodeGen3X6418AssemblyBuilderX648placeRexENS1_10OperandX64E.exit - %50 = add i32 %.sroa.1.0.extract.trunc, -128 - %51 = icmp ult i32 %50, -256 + %50 = trunc i64 %.sroa.1.0.extract.shift to i8 + %51 = sext i8 %50 to i32 + %52 = icmp ne i32 %51, %.sroa.1.0.extract.trunc %.not = icmp eq i8 %4, %5 %or.cond = or i1 %51, %.not %52 = getelementptr inbounds nuw i8, ptr %0, i64 232 @@ -6937,11 +6939,10 @@ _ZN4Luau7CodeGen3X6418AssemblyBuilderX648placeRexENS1_10OperandX64E.exit: ; pred 55: ; preds = %49 store i8 %5, ptr %53, align 1, !tbaa !13 tail call void @_ZN4Luau7CodeGen3X6418AssemblyBuilderX6414placeModRegMemENS1_10OperandX64Ehi(ptr noundef nonnull align 8 dereferenceable(252) %0, i64 %1, i8 noundef zeroext %6, i32 noundef 1) - %56 = trunc i64 %.sroa.1.0.extract.shift to i8 - %57 = load ptr, ptr %52, align 8, !tbaa !51 + %57 = load ptr, ptr %53, align 8, !tbaa !51 %58 = getelementptr inbounds nuw i8, ptr %57, i64 1 store ptr %58, ptr %52, align 8, !tbaa !51 - store i8 %56, ptr %57, align 1, !tbaa !13 + store i8 %50, ptr %57, align 1, !tbaa !13 br label %62 59: ; preds = %49 diff --git a/bench/lvgl/optimized/lv_freetype.ll b/bench/lvgl/optimized/lv_freetype.ll index 357258c03ae..e5530d0a8de 100644 --- a/bench/lvgl/optimized/lv_freetype.ll +++ b/bench/lvgl/optimized/lv_freetype.ll @@ -555,21 +555,19 @@ freetype_on_font_set_cbs.exit: ; preds = %99, %101, %102 %136 = load i16, ptr %135, align 2, !tbaa !95 %137 = sext i16 %136 to i64 %138 = call i64 @FT_MulFix(i64 noundef %134, i64 noundef %137) #8 - %139 = trunc i64 %138 to i32 - %140 = getelementptr inbounds nuw i8, ptr %105, i64 148 - %141 = load i16, ptr %140, align 4, !tbaa !96 - %142 = sext i16 %141 to i64 - %143 = call i64 @FT_MulFix(i64 noundef %134, i64 noundef %142) #8 - %144 = lshr i64 %143, 6 - %145 = trunc i64 %144 to i8 - %146 = getelementptr inbounds nuw i8, ptr %54, i64 41 - store i8 %145, ptr %146, align 1, !tbaa !97 - %147 = shl i32 %139, 18 - %148 = ashr i32 %147, 24 - %149 = call i32 @llvm.smax.i32(i32 %148, i32 1) - %150 = trunc nuw nsw i32 %149 to i8 - %151 = getelementptr inbounds nuw i8, ptr %54, i64 42 - store i8 %150, ptr %151, align 2, !tbaa !98 + %139 = lshr i64 %138, 6 + %140 = trunc i64 %139 to i8 + %141 = getelementptr inbounds nuw i8, ptr %105, i64 148 + %142 = load i16, ptr %141, align 4, !tbaa !96 + %143 = sext i16 %142 to i64 + %144 = call i64 @FT_MulFix(i64 noundef %134, i64 noundef %143) #8 + %145 = lshr i64 %144, 6 + %146 = trunc i64 %145 to i8 + %147 = getelementptr inbounds nuw i8, ptr %54, i64 41 + store i8 %146, ptr %147, align 1, !tbaa !97 + %148 = call i8 @llvm.smax.i8(i8 %140, i8 1) + %149 = getelementptr inbounds nuw i8, ptr %54, i64 42 + store i8 %148, ptr %149, align 2, !tbaa !98 br label %lv_freetype_drop_face_id.exit lv_freetype_drop_face_id.exit: ; preds = %49, %44, %lv_freetype_drop_face_id.exit83, %113, %114 @@ -773,7 +771,7 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #6 declare void @llvm.lifetime.end.p0(ptr captures(none)) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #7 +declare i8 @llvm.smax.i8(i8, i8) #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare range(i8 -1, 2) i8 @llvm.scmp.i8.i32(i32, i32) #7 diff --git a/bench/ncnn/optimized/gemm_x86_avx512vnni.ll b/bench/ncnn/optimized/gemm_x86_avx512vnni.ll index ac9a84ee341..a35b4b075af 100644 --- a/bench/ncnn/optimized/gemm_x86_avx512vnni.ll +++ b/bench/ncnn/optimized/gemm_x86_avx512vnni.ll @@ -4332,9 +4332,8 @@ define hidden void @_ZN4ncnn35pack_A_tile_fp32_to_int8_avx512vnniERKNS_3MatERS0_ %1164 = bitcast <16 x i8> %1163 to <2 x i64> %1165 = extractelement <2 x i64> %1164, i64 0 store i64 %1165, ptr %.49523.i, align 8, !tbaa !110 - %1166 = trunc i64 %1165 to i32 - %sext.i = shl i32 %1166, 24 - %1167 = ashr exact i32 %sext.i, 24 + %1166 = trunc i64 %1165 to i8 + %1167 = sext i8 %1166 to i32 %1168 = extractelement <16 x i8> %1163, i64 1 %1169 = sext i8 %1168 to i32 %1170 = extractelement <16 x i8> %1163, i64 2 @@ -6520,9 +6519,8 @@ define hidden void @_ZN4ncnn45transpose_pack_A_tile_fp32_to_int8_avx512vnniERKNS %1498 = bitcast <16 x i8> %1497 to <2 x i64> %1499 = extractelement <2 x i64> %1498, i64 0 store i64 %1499, ptr %.53589.i, align 8, !tbaa !110 - %1500 = trunc i64 %1499 to i32 - %sext.i = shl i32 %1500, 24 - %1501 = ashr exact i32 %sext.i, 24 + %1500 = trunc i64 %1499 to i8 + %1501 = sext i8 %1500 to i32 %1502 = extractelement <16 x i8> %1497, i64 1 %1503 = sext i8 %1502 to i32 %1504 = extractelement <16 x i8> %1497, i64 2 @@ -6614,9 +6612,8 @@ define hidden void @_ZN4ncnn45transpose_pack_A_tile_fp32_to_int8_avx512vnniERKNS %1576 = bitcast <16 x i8> %1575 to <2 x i64> %1577 = extractelement <2 x i64> %1576, i64 0 store i64 %1577, ptr %.56601.i, align 8, !tbaa !110 - %1578 = trunc i64 %1577 to i32 - %sext800.i = shl i32 %1578, 24 - %1579 = ashr exact i32 %sext800.i, 24 + %1578 = trunc i64 %1577 to i8 + %1579 = sext i8 %1578 to i32 %1580 = extractelement <16 x i8> %1575, i64 1 %1581 = sext i8 %1580 to i32 %1582 = extractelement <16 x i8> %1575, i64 2 @@ -6814,9 +6811,8 @@ define hidden void @_ZN4ncnn45transpose_pack_A_tile_fp32_to_int8_avx512vnniERKNS %1696 = bitcast <16 x i8> %1695 to <2 x i64> %1697 = extractelement <2 x i64> %1696, i64 0 store i64 %1697, ptr %.65641.i, align 8, !tbaa !110 - %1698 = trunc i64 %1697 to i32 - %sext801.i = shl i32 %1698, 24 - %1699 = ashr exact i32 %sext801.i, 24 + %1698 = trunc i64 %1697 to i8 + %1699 = sext i8 %1698 to i32 %1700 = extractelement <16 x i8> %1695, i64 1 %1701 = sext i8 %1700 to i32 %1702 = extractelement <16 x i8> %1695, i64 2 diff --git a/bench/nuklear/optimized/unity.ll b/bench/nuklear/optimized/unity.ll index 5ee68ed1748..757fa3bdef5 100644 --- a/bench/nuklear/optimized/unity.ll +++ b/bench/nuklear/optimized/unity.ll @@ -31328,10 +31328,11 @@ define internal fastcc void @nk_font_bake_custom_data(ptr noundef writeonly capt br i1 %or.cond3, label %.preheader1, label %.loopexit .preheader1: ; preds = %4 - %.sroa.0.0.extract.trunc = trunc i64 %3 to i32 - %sext = shl i32 %.sroa.0.0.extract.trunc, 16 - %8 = ashr exact i32 %sext, 16 - %9 = ashr i32 %.sroa.0.0.extract.trunc, 16 + %.sroa.2.0.extract.shift = lshr i64 %3, 16 + %.sroa.2.0.extract.trunc = trunc i64 %.sroa.2.0.extract.shift to i16 + %.sroa.0.0.extract.trunc = trunc i64 %3 to i16 + %8 = sext i16 %.sroa.0.0.extract.trunc to i32 + %9 = sext i16 %.sroa.2.0.extract.trunc to i32 br label %.preheader .preheader: ; preds = %.preheader1, %26 diff --git a/bench/ocio/optimized/Lut1DOpData.ll b/bench/ocio/optimized/Lut1DOpData.ll index 441fe99fc76..1ef7ede86f2 100644 --- a/bench/ocio/optimized/Lut1DOpData.ll +++ b/bench/ocio/optimized/Lut1DOpData.ll @@ -343,31 +343,32 @@ define hidden void @_ZN19OpenColorIO_v2_5dev11Lut1DOpData13Lut3by1DArray4fillENS .lr.ph39.split.us.split.us: ; preds = %.lr.ph39.split.us, %._crit_edge.us.us %.03238.us.us = phi i64 [ %39, %._crit_edge.us.us ], [ 0, %.lr.ph39.split.us ] - %15 = trunc i64 %.03238.us.us to i32 - %16 = shl i32 %15, 13 - %17 = and i32 %16, 268427264 - %sext.us.us = shl i32 %15, 16 - %18 = and i32 %sext.us.us, -2147483648 - %19 = icmp samesign ugt i32 %17, 8388607 - br i1 %19, label %29, label %20, !prof !12 - -20: ; preds = %.lr.ph39.split.us.split.us - %.not.i.i.us.us = icmp eq i32 %17, 0 - br i1 %.not.i.i.us.us, label %_ZNK9Imath_3_14halfcvfEv.exit.us.us, label %21 - -21: ; preds = %20 - %22 = tail call range(i32 9, 33) i32 @llvm.ctlz.i32(i32 %17, i1 true) - %23 = add nsw i32 %22, -8 - %24 = shl i32 %17, %23 - %25 = or i32 %18, %24 - %26 = or i32 %25, 947912704 - %27 = shl nuw nsw i32 %23, 23 - %28 = sub nuw i32 %26, %27 + %15 = trunc i64 %.03238.us.us to i16 + %16 = trunc i64 %.03238.us.us to i32 + %17 = shl i32 %16, 13 + %18 = and i32 %17, 268427264 + %.signext.i.i.us.us = sext i16 %15 to i32 + %19 = and i32 %.signext.i.i.us.us, -2147483648 + %20 = icmp samesign ugt i32 %18, 8388607 + br i1 %20, label %30, label %21, !prof !12 + +21:; preds = %.lr.ph39.split.us.split.us + %.not.i.i.us.us = icmp eq i32 %18, 0 + br i1 %.not.i.i.us.us, label %_ZNK9Imath_3_14halfcvfEv.exit.us.us, label %22 + +22:; preds = %21 + %23 = tail call range(i32 9, 33) i32 @llvm.ctlz.i32(i32 %18, i1 true) + %24 = add nsw i32 %23, -8 + %25 = shl i32 %18, %24 + %26 = or i32 %19, %25 + %27 = or i32 %26, 947912704 + %28 = shl nuw nsw i32 %24, 23 + %29 = sub nuw i32 %27, %28 br label %_ZNK9Imath_3_14halfcvfEv.exit.us.us 29: ; preds = %.lr.ph39.split.us.split.us - %30 = or disjoint i32 %17, %18 - %31 = icmp samesign ult i32 %17, 260046848 + %30 = or disjoint i32 %18, %19 + %31 = icmp samesign ult i32 %18, 260046848 br i1 %31, label %34, label %32, !prof !12 32: ; preds = %29 @@ -378,14 +379,14 @@ define hidden void @_ZN19OpenColorIO_v2_5dev11Lut1DOpData13Lut3by1DArray4fillENS %35 = add nuw nsw i32 %30, 939524096 br label %_ZNK9Imath_3_14halfcvfEv.exit.us.us -_ZNK9Imath_3_14halfcvfEv.exit.us.us: ; preds = %34, %32, %21, %20 - %.sroa.0.0.i.i.us.us = phi i32 [ %35, %34 ], [ %33, %32 ], [ %28, %21 ], [ %18, %20 ] +_ZNK9Imath_3_14halfcvfEv.exit.us.us: ; preds = %34, %32, %22, %21 + %.sroa.0.0.i.i.us.us = phi i32 [ %35, %35 ], [ %33, %33 ], [ %29, %22 ], [ %19, %21 ] %36 = mul i64 %.03238.us.us, %11 %invariant.gep.us.us = getelementptr float, ptr %14, i64 %36 br label %37 37: ; preds = %_ZNK9Imath_3_14halfcvfEv.exit.us.us, %37 - %.03537.us.us = phi i64 [ 0, %_ZNK9Imath_3_14halfcvfEv.exit.us.us ], [ %38, %37 ] + %.03537.us.us = phi i64 [ 0, %_ZNK9Imath_3_14halfcvfEv.exit.us.us ], [ %38, %38 ] %gep.us.us = getelementptr float, ptr %invariant.gep.us.us, i64 %.03537.us.us store i32 %.sroa.0.0.i.i.us.us, ptr %gep.us.us, align 4, !tbaa !13 %38 = add nuw i64 %.03537.us.us, 1 @@ -399,31 +400,32 @@ _ZNK9Imath_3_14halfcvfEv.exit.us.us: ; preds = %34, %32, %21, %20 .lr.ph39.split.us.split: ; preds = %.lr.ph39.split.us, %._crit_edge.us %.03238.us = phi i64 [ %65, %._crit_edge.us ], [ 0, %.lr.ph39.split.us ] - %40 = trunc i64 %.03238.us to i32 - %41 = shl i32 %40, 13 - %42 = and i32 %41, 268427264 - %sext.us = shl i32 %40, 16 - %43 = and i32 %sext.us, -2147483648 - %44 = icmp samesign ugt i32 %42, 8388607 - br i1 %44, label %54, label %45, !prof !12 - -45: ; preds = %.lr.ph39.split.us.split - %.not.i.i.us = icmp eq i32 %42, 0 - br i1 %.not.i.i.us, label %_ZNK9Imath_3_14halfcvfEv.exit.us, label %46 - -46: ; preds = %45 - %47 = tail call range(i32 9, 33) i32 @llvm.ctlz.i32(i32 %42, i1 true) - %48 = add nsw i32 %47, -8 - %49 = shl i32 %42, %48 - %50 = or i32 %43, %49 - %51 = or i32 %50, 947912704 - %52 = shl nuw nsw i32 %48, 23 - %53 = sub nuw i32 %51, %52 + %40 = trunc i64 %.03238.us to i16 + %42 = trunc i64 %.03238.us to i32 + %43 = shl i32 %42, 13 + %44 = and i32 %43, 268427264 + %.signext.i.i.us = sext i16 %41 to i32 + %45 = and i32 %.signext.i.i.us, -2147483648 + %46 = icmp samesign ugt i32 %44, 8388607 + br i1 %46, label %56, label %47, !prof !12 + +47:; preds = %.lr.ph39.split.us.split + %.not.i.i.us = icmp eq i32 %44, 0 + br i1 %.not.i.i.us, label %_ZNK9Imath_3_14halfcvfEv.exit.us, label %48 + +48:; preds = %47 + %49 = tail call range(i32 9, 33) i32 @llvm.ctlz.i32(i32 %44, i1 true) + %50 = add nsw i32 %49, -8 + %51 = shl i32 %44, %50 + %51 = or i32 %45, %51 + %53 = or i32 %52, 947912704 + %54 = shl nuw nsw i32 %50, 23 + %55 = sub nuw i32 %53, %54 br label %_ZNK9Imath_3_14halfcvfEv.exit.us 54: ; preds = %.lr.ph39.split.us.split - %55 = or disjoint i32 %42, %43 - %56 = icmp samesign ult i32 %42, 260046848 + %55 = or disjoint i32 %44, %45 + %56 = icmp samesign ult i32 %44, 260046848 br i1 %56, label %59, label %57, !prof !12 57: ; preds = %54 @@ -434,8 +436,8 @@ _ZNK9Imath_3_14halfcvfEv.exit.us.us: ; preds = %34, %32, %21, %20 %60 = add nuw nsw i32 %55, 939524096 br label %_ZNK9Imath_3_14halfcvfEv.exit.us -_ZNK9Imath_3_14halfcvfEv.exit.us: ; preds = %59, %57, %46, %45 - %.sroa.0.0.i.i.us = phi i32 [ %60, %59 ], [ %58, %57 ], [ %53, %46 ], [ %43, %45 ] +_ZNK9Imath_3_14halfcvfEv.exit.us: ; preds = %59, %57, %48, %47 + %.sroa.0.0.i.i.us = phi i32 [ %60, %61 ], [ %58, %59 ], [ %55, %48 ], [ %45, %47 ] %61 = bitcast i32 %.sroa.0.0.i.i.us to float %.inv = fcmp ord float %61, 0.000000e+00 %unswitched.select = select i1 %.inv, float %61, float 0.000000e+00 @@ -444,7 +446,7 @@ _ZNK9Imath_3_14halfcvfEv.exit.us: ; preds = %59, %57, %46, %45 br label %63 63: ; preds = %_ZNK9Imath_3_14halfcvfEv.exit.us, %63 - %.03537.us = phi i64 [ 0, %_ZNK9Imath_3_14halfcvfEv.exit.us ], [ %64, %63 ] + %.03537.us = phi i64 [ 0, %_ZNK9Imath_3_14halfcvfEv.exit.us ], [ %64, %65 ] %gep.us = getelementptr float, ptr %invariant.gep.us, i64 %.03537.us store float %unswitched.select, ptr %gep.us, align 4, !tbaa !13 %64 = add nuw i64 %.03537.us, 1 @@ -477,7 +479,7 @@ _ZNK9Imath_3_14halfcvfEv.exit.us: ; preds = %59, %57, %46, %45 br label %74 74: ; preds = %.lr.ph.us, %74 - %.040.us = phi i64 [ 0, %.lr.ph.us ], [ %75, %74 ] + %.040.us = phi i64 [ 0, %.lr.ph.us ], [ %75, %76 ] %gep.us44 = getelementptr float, ptr %invariant.gep.us45, i64 %.040.us store float %72, ptr %gep.us44, align 4, !tbaa !13 %75 = add nuw i64 %.040.us, 1 diff --git a/bench/oiio/optimized/filesystem.ll b/bench/oiio/optimized/filesystem.ll index 75112156081..8ccbaeb028c 100644 --- a/bench/oiio/optimized/filesystem.ll +++ b/bench/oiio/optimized/filesystem.ll @@ -74710,7 +74710,7 @@ _ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit481: ; preds = %250 br label %_ZSt4findIPKccET_S2_S2_RKT0_.exit _ZSt4findIPKccET_S2_S2_RKT0_.exit: ; preds = %239, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit479, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit481, %259, %._crit_edge._crit_edge.i.i.i, %._crit_edge._crit_edge52.i.i.i, %270 - %.028.i.i.i = phi ptr [ %234, %270 ], [ %.029.lcssa.i.i.i, %259 ], [ %.1.i.i.i, %._crit_edge._crit_edge.i.i.i ], [ %.2.i.i.i, %._crit_edge._crit_edge52.i.i.i ], [ %271, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit ], [ %272, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit479 ], [ %273, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit481 ], [ %.02946.i.i.i, %239 ] + %.028.i.i.i = phi ptr [ %234, %270 ], [ %.029.lcssa.i.i.i, %259 ], [ %.1.i.i.i, %._crit_edge._crit_edge.i.i.i ], [ %.2.i.i.i, %._crit_edge._crit_edge52.i.i.i ], [ %271, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit ], [ %272, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit477 ], [ %273, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit479 ], [ %.02946.i.i.i, %239 ] %.not81 = icmp eq ptr %.028.i.i.i, %234 %274 = ptrtoint ptr %.028.i.i.i to i64 %275 = sub i64 %274, %236 @@ -74894,9 +74894,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail11is_zero_intENS0_20basic_printf_context ] 348: ; preds = %346, %346 - %349 = trunc i64 %347 to i32 - %sext.i6.i = shl i32 %349, 24 - %350 = ashr exact i32 %sext.i6.i, 24 + %349 = trunc i64 %347 to i8 + %350 = sext i8 %349 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 351: ; preds = %346 @@ -74912,9 +74911,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail11is_zero_intENS0_20basic_printf_context ] 356: ; preds = %354, %354 - %357 = trunc i64 %355 to i32 - %sext.i10.i = shl i32 %357, 24 - %358 = ashr exact i32 %sext.i10.i, 24 + %357 = trunc i64 %355 to i8 + %358 = sext i8 %357 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 359: ; preds = %354 @@ -75007,9 +75005,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_cont ] 389: ; preds = %387, %387 - %390 = trunc i64 %388 to i32 - %sext.i6.i154 = shl i32 %390, 16 - %391 = ashr exact i32 %sext.i6.i154, 16 + %390 = trunc i64 %388 to i16 + %391 = sext i16 %390 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIsNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 392: ; preds = %387 @@ -75025,9 +75022,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_cont ] 397: ; preds = %395, %395 - %398 = trunc i64 %396 to i32 - %sext.i10.i153 = shl i32 %398, 16 - %399 = ashr exact i32 %sext.i10.i153, 16 + %398 = trunc i64 %396 to i16 + %399 = sext i16 %398 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIsNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 400: ; preds = %395 @@ -75678,7 +75674,7 @@ _ZN3fmt2v816visit_format_argINS0_6detail14char_converterINS0_20basic_printf_cont store ptr getelementptr inbounds nuw inrange(-16, 24) (i8, ptr @_ZTVN3fmt2v812format_errorE, i64 16), ptr %11, align 8, !tbaa !113 %598 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #38 invoke void @_ZN11OpenImageIO6v3_1_03pvt13log_fmt_errorEPKc(ptr noundef %598) - to label %_ZN3fmt2v826basic_format_parse_contextIcNS0_6detail13error_handlerEE8on_errorEPKc.exit210 unwind label %599 + to label %_ZN3fmt2v826basic_format_parse_contextIcNS0_6detail13error_handlerEE8on_errorEPKc.exit208 unwind label %599 599: ; preds = %597 %600 = landingpad { ptr, i32 } diff --git a/bench/oiio/optimized/strutil.ll b/bench/oiio/optimized/strutil.ll index ab0659db523..3a334c9ff12 100644 --- a/bench/oiio/optimized/strutil.ll +++ b/bench/oiio/optimized/strutil.ll @@ -44570,7 +44570,7 @@ _ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit482: ; preds = %250 br label %_ZSt4findIPKccET_S2_S2_RKT0_.exit _ZSt4findIPKccET_S2_S2_RKT0_.exit: ; preds = %239, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit480, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit482, %259, %._crit_edge._crit_edge.i.i.i, %._crit_edge._crit_edge52.i.i.i, %270 - %.028.i.i.i = phi ptr [ %234, %270 ], [ %.029.lcssa.i.i.i, %259 ], [ %.1.i.i.i, %._crit_edge._crit_edge.i.i.i ], [ %.2.i.i.i, %._crit_edge._crit_edge52.i.i.i ], [ %271, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit ], [ %272, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit480 ], [ %273, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit482 ], [ %.02946.i.i.i, %239 ] + %.028.i.i.i = phi ptr [ %234, %270 ], [ %.029.lcssa.i.i.i, %259 ], [ %.1.i.i.i, %._crit_edge._crit_edge.i.i.i ], [ %.2.i.i.i, %._crit_edge._crit_edge52.i.i.i ], [ %271, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit ], [ %272, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit478 ], [ %273, %_ZSt4findIPKccET_S2_S2_RKT0_.exit.loopexit.split.loop.exit480 ], [ %.02946.i.i.i, %239 ] %.not81 = icmp eq ptr %.028.i.i.i, %234 %274 = ptrtoint ptr %.028.i.i.i to i64 %275 = sub i64 %274, %236 @@ -44754,9 +44754,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail11is_zero_intENS0_20basic_printf_context ] 348: ; preds = %346, %346 - %349 = trunc i64 %347 to i32 - %sext.i6.i = shl i32 %349, 24 - %350 = ashr exact i32 %sext.i6.i, 24 + %349 = trunc i64 %347 to i8 + %350 = sext i8 %349 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 351: ; preds = %346 @@ -44772,9 +44771,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail11is_zero_intENS0_20basic_printf_context ] 356: ; preds = %354, %354 - %357 = trunc i64 %355 to i32 - %sext.i10.i = shl i32 %357, 24 - %358 = ashr exact i32 %sext.i10.i, 24 + %357 = trunc i64 %355 to i8 + %358 = sext i8 %357 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 359: ; preds = %354 @@ -44867,9 +44865,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_cont ] 389: ; preds = %387, %387 - %390 = trunc i64 %388 to i32 - %sext.i6.i154 = shl i32 %390, 16 - %391 = ashr exact i32 %sext.i6.i154, 16 + %390 = trunc i64 %388 to i16 + %391 = sext i16 %390 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIsNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 392: ; preds = %387 @@ -44885,9 +44882,8 @@ _ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIaNS0_20basic_printf_cont ] 397: ; preds = %395, %395 - %398 = trunc i64 %396 to i32 - %sext.i10.i153 = shl i32 %398, 16 - %399 = ashr exact i32 %sext.i10.i153, 16 + %398 = trunc i64 %396 to i16 + %399 = sext i16 %398 to i32 br label %_ZN3fmt2v816visit_format_argINS0_6detail13arg_converterIsNS0_20basic_printf_contextINS0_8appenderEcEEEES6_EEDTclfp_Li0EEEOT_RKNS0_16basic_format_argIT0_EE.exit.sink.split.i 400: ; preds = %395 @@ -45538,7 +45534,7 @@ _ZN3fmt2v816visit_format_argINS0_6detail14char_converterINS0_20basic_printf_cont store ptr getelementptr inbounds nuw inrange(-16, 24) (i8, ptr @_ZTVN3fmt2v812format_errorE, i64 16), ptr %11, align 8, !tbaa !68 %598 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #15 invoke void @_ZN11OpenImageIO6v3_1_03pvt13log_fmt_errorEPKc(ptr noundef %598) - to label %_ZN3fmt2v826basic_format_parse_contextIcNS0_6detail13error_handlerEE8on_errorEPKc.exit210 unwind label %599 + to label %_ZN3fmt2v826basic_format_parse_contextIcNS0_6detail13error_handlerEE8on_errorEPKc.exit208 unwind label %599 599: ; preds = %597 %600 = landingpad { ptr, i32 } @@ -45821,7 +45817,7 @@ _ZN3fmt2v86detail20printf_arg_formatterINS0_8appenderEcEclIcTnNSt9enable_ifIXsr6 store ptr getelementptr inbounds nuw inrange(-16, 24) (i8, ptr @_ZTVN3fmt2v812format_errorE, i64 16), ptr %7, align 8, !tbaa !68 %728 = call noundef ptr @_ZNKSt13runtime_error4whatEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #15 invoke void @_ZN11OpenImageIO6v3_1_03pvt13log_fmt_errorEPKc(ptr noundef %728) - to label %_ZN3fmt2v86detail13error_handler8on_errorEPKc.exit.i.i255 unwind label %729 + to label %_ZN3fmt2v86detail13error_handler8on_errorEPKc.exit.i.i253 unwind label %729 729: ; preds = %727 %730 = landingpad { ptr, i32 } diff --git a/bench/opencv/optimized/gapi_imgproc_perf_tests.ll b/bench/opencv/optimized/gapi_imgproc_perf_tests.ll index f43cdff37d7..48bd4756e56 100644 --- a/bench/opencv/optimized/gapi_imgproc_perf_tests.ll +++ b/bench/opencv/optimized/gapi_imgproc_perf_tests.ll @@ -337561,9 +337561,9 @@ _ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17_ br label %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE12emplace_backIJRS2_EEEvDpOT_.exit _ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE12emplace_backIJRS2_EEEvDpOT_.exit: ; preds = %52, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i - %73 = phi ptr [ %33, %52 ], [ %66, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] - %74 = phi ptr [ %34, %52 ], [ %72, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] - %75 = phi ptr [ %53, %52 ], [ %70, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] + %73 = phi ptr [ %33, %55 ], [ %66, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] + %74 = phi ptr [ %34, %55 ], [ %72, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] + %75 = phi ptr [ %53, %55 ], [ %70, %_ZNSt6vectorIN2cv7Point3_ItEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] %76 = add nuw nsw i32 %.013, 1 %exitcond.not = icmp eq i32 %76, %1 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !4167 @@ -337741,9 +337741,9 @@ _ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17_ br label %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE12emplace_backIJRS2_EEEvDpOT_.exit _ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE12emplace_backIJRS2_EEEvDpOT_.exit: ; preds = %52, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i - %73 = phi ptr [ %33, %52 ], [ %66, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] - %74 = phi ptr [ %34, %52 ], [ %72, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] - %75 = phi ptr [ %53, %52 ], [ %70, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] + %73 = phi ptr [ %33, %55 ], [ %66, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] + %74 = phi ptr [ %34, %55 ], [ %72, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] + %75 = phi ptr [ %53, %55 ], [ %70, %_ZNSt6vectorIN2cv7Point3_IsEESaIS2_EE17_M_realloc_insertIJRS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i ] %76 = add nuw nsw i32 %.013, 1 %exitcond.not = icmp eq i32 %76, %1 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !4178 diff --git a/bench/openjdk/optimized/assembler_x86.ll b/bench/openjdk/optimized/assembler_x86.ll index 935b7d3e141..c0ebfd0f671 100644 --- a/bench/openjdk/optimized/assembler_x86.ll +++ b/bench/openjdk/optimized/assembler_x86.ll @@ -103601,7 +103601,7 @@ _ZN9Assembler11get_prefixqE7Address8Registerb.exit: ; preds = %_ZN9Assembler16ge br label %115 115: ; preds = %110, %113, %_ZN9Assembler16get_prefixq_rex2E7Addressb.exit - %.0 = phi i32 [ %51, %_ZN9Assembler16get_prefixq_rex2E7Addressb.exit ], [ %112, %110 ], [ %114, %113 ] + %.0 = phi i32 [ %51, %_ZN9Assembler16get_prefixq_rex2E7Addressb.exit ], [ %112, %109 ], [ %114, %112 ] ret i32 %.0 } diff --git a/bench/openjdk/optimized/jvmciRuntime.ll b/bench/openjdk/optimized/jvmciRuntime.ll index beca6cb4dfe..d520ee74bc5 100644 --- a/bench/openjdk/optimized/jvmciRuntime.ll +++ b/bench/openjdk/optimized/jvmciRuntime.ll @@ -3172,9 +3172,8 @@ define hidden void @_ZN12JVMCIRuntime10vm_messageEhllll(i8 noundef zeroext %0, i 57: ; preds = %49 %58 = sitofp i64 %2 to double - %59 = trunc i64 %2 to i32 - %sext.i = shl i32 %59, 24 - %60 = ashr exact i32 %sext.i, 24 + %59 = trunc i64 %2 to i8 + %60 = sext i8 %59 to i32 tail call void (ptr, ptr, ...) @_ZN12outputStream5printEPKcz(ptr noundef nonnull align 8 dereferenceable(56) %55, ptr noundef nonnull @.str.123, i64 noundef %2, i64 noundef %2, double noundef %58, i32 noundef %60) #16 br label %_ZL8decipherlb.exit @@ -3229,9 +3228,8 @@ define hidden void @_ZN12JVMCIRuntime13log_primitiveEP10JavaThreadtlh(ptr nounde 9: ; preds = %4 %10 = load ptr, ptr @tty, align 8 - %11 = trunc i64 %2 to i32 - %sext49 = shl i32 %11, 24 - %12 = ashr exact i32 %sext49, 24 + %11 = trunc i64 %2 to i8 + %12 = sext i8 %11 to i32 tail call void (ptr, ptr, ...) @_ZN12outputStream5printEPKcz(ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef nonnull @.str.16, i32 noundef %12) #16 br label %33 @@ -3244,9 +3242,8 @@ define hidden void @_ZN12JVMCIRuntime13log_primitiveEP10JavaThreadtlh(ptr nounde 17: ; preds = %4 %18 = load ptr, ptr @tty, align 8 - %19 = trunc i64 %2 to i32 - %sext = shl i32 %19, 16 - %20 = ashr exact i32 %sext, 16 + %19 = trunc i64 %2 to i16 + %20 = sext i16 %19 to i32 tail call void (ptr, ptr, ...) @_ZN12outputStream5printEPKcz(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull @.str.16, i32 noundef %20) #16 br label %33 @@ -10411,9 +10408,8 @@ _ZN14ArgumentPusher8next_argEv.exit4: ; preds = %115 store i8 1, ptr %116, align 8 %123 = getelementptr inbounds nuw i8, ptr %0, i64 32 %124 = load i64, ptr %123, align 8 - %125 = trunc i64 %124 to i32 - %sext = shl i32 %125, 24 - %126 = ashr exact i32 %sext, 24 + %125 = trunc i64 %124 to i8 + %126 = sext i8 %125 to i32 %127 = getelementptr inbounds nuw i8, ptr %122, i64 96 %128 = load ptr, ptr %127, align 8 %129 = getelementptr inbounds nuw i8, ptr %122, i64 104 diff --git a/bench/pola-rs/optimized/5igj4k372mlhkf3aildnxq1ta.ll b/bench/pola-rs/optimized/5igj4k372mlhkf3aildnxq1ta.ll index 63e1fde2317..619c582baa4 100644 --- a/bench/pola-rs/optimized/5igj4k372mlhkf3aildnxq1ta.ll +++ b/bench/pola-rs/optimized/5igj4k372mlhkf3aildnxq1ta.ll @@ -26918,15 +26918,14 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function2Fn4call17h1822 %4 = load i32, ptr %1, align 4, !range !62, !alias.scope !3308, !noalias !3311, !noundef !7 %5 = trunc nuw i32 %4 to i1 %6 = load i32, ptr %2, align 4, !range !62, !alias.scope !3311, !noalias !3308, !noundef !7 - br i1 %5, label %7, label %9 + %7 = trunc nuw i32 %6 to i1 + br i1 %5, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %6 to i1 - br i1 %8, label %11, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" + br i1 %7, label %10, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" 9: ; preds = %3 - %10 = trunc nuw nsw i32 %6 to i8 - %..i = sub nsw i8 0, %10 + %..i = sext i1 %7 to i8 br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" 11: ; preds = %7 @@ -26947,7 +26946,7 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function2Fn4call17h1822 br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" "_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit": ; preds = %7, %9, %11 - %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %11 ], [ %..i, %9 ], [ 1, %7 ] + %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %10 ], [ %..i, %9 ], [ 1, %8 ] ret i8 %.sroa.0.0.i } @@ -26958,15 +26957,14 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function2Fn4call17h4af7 %4 = load i64, ptr %1, align 8, !range !63, !alias.scope !3320, !noalias !3323, !noundef !7 %5 = trunc nuw i64 %4 to i1 %6 = load i64, ptr %2, align 8, !range !63, !alias.scope !3323, !noalias !3320, !noundef !7 - br i1 %5, label %7, label %9 + %7 = trunc nuw i64 %6 to i1 + br i1 %5, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %6 to i1 - br i1 %8, label %11, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" + br i1 %7, label %10, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" 9: ; preds = %3 - %10 = trunc nuw nsw i64 %6 to i8 - %..i = sub nsw i8 0, %10 + %..i = sext i1 %7 to i8 br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" 11: ; preds = %7 @@ -26987,7 +26985,7 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function2Fn4call17h4af7 br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" "_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit": ; preds = %7, %9, %11 - %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %11 ], [ %..i, %9 ], [ 1, %7 ] + %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %10 ], [ %..i, %9 ], [ 1, %8 ] ret i8 %.sroa.0.0.i } @@ -27032,15 +27030,14 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function5FnMut8call_mut %4 = load i32, ptr %1, align 4, !range !62, !alias.scope !3342, !noalias !3345, !noundef !7 %5 = trunc nuw i32 %4 to i1 %6 = load i32, ptr %2, align 4, !range !62, !alias.scope !3345, !noalias !3342, !noundef !7 - br i1 %5, label %7, label %9 + %7 = trunc nuw i32 %6 to i1 + br i1 %5, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %6 to i1 - br i1 %8, label %11, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" + br i1 %7, label %10, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" 9: ; preds = %3 - %10 = trunc nuw nsw i32 %6 to i8 - %..i = sub nsw i8 0, %10 + %..i = sext i1 %7 to i8 br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" 11: ; preds = %7 @@ -27061,7 +27058,7 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function5FnMut8call_mut br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit" "_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17he610cc4bffe883f6E.exit": ; preds = %7, %9, %11 - %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %11 ], [ %..i, %9 ], [ 1, %7 ] + %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %10 ], [ %..i, %9 ], [ 1, %8 ] ret i8 %.sroa.0.0.i } @@ -27072,15 +27069,14 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function5FnMut8call_mut %4 = load i64, ptr %1, align 8, !range !63, !alias.scope !3354, !noalias !3357, !noundef !7 %5 = trunc nuw i64 %4 to i1 %6 = load i64, ptr %2, align 8, !range !63, !alias.scope !3357, !noalias !3354, !noundef !7 - br i1 %5, label %7, label %9 + %7 = trunc nuw i64 %6 to i1 + br i1 %5, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %6 to i1 - br i1 %8, label %11, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" + br i1 %7, label %10, label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" 9: ; preds = %3 - %10 = trunc nuw nsw i64 %6 to i8 - %..i = sub nsw i8 0, %10 + %..i = sext i1 %7 to i8 br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" 11: ; preds = %7 @@ -27101,7 +27097,7 @@ define internal noundef range(i8 -1, 2) i8 @_ZN4core3ops8function5FnMut8call_mut br label %"_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit" "_ZN83_$LT$core..option..Option$LT$T$GT$$u20$as$u20$polars_utils..total_ord..TotalOrd$GT$7tot_cmp17h1f50a78fabddcea7E.exit": ; preds = %7, %9, %11 - %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %11 ], [ %..i, %9 ], [ 1, %7 ] + %.sroa.0.0.i = phi i8 [ %.sroa.0.0.i.i, %10 ], [ %..i, %9 ], [ 1, %8 ] ret i8 %.sroa.0.0.i } @@ -27817,16 +27813,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ %5 = getelementptr inbounds nuw i8, ptr %2, i64 4 %.val3 = load float, ptr %5, align 4, !alias.scope !3464, !noalias !3461 %6 = trunc nuw i32 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i32 %.val2 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %.val2 to i1 - br i1 %8, label %12, label %_ZN4core3ops8function6FnOnce9call_once17h810d7ce63749733bE.exit + br i1 %7, label %10, label %_ZN4core3ops8function6FnOnce9call_once17h810d7ce63749733bE.exit 9: ; preds = %3 - %10 = trunc i32 %.val2 to i8 - %11 = and i8 %10, 1 - %..i.i.i = sub nsw i8 0, %11 + %..i.i.i = sext i1 %7 to i8 br label %_ZN4core3ops8function6FnOnce9call_once17h810d7ce63749733bE.exit 12: ; preds = %7 @@ -27842,7 +27836,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ unreachable _ZN4core3ops8function6FnOnce9call_once17h810d7ce63749733bE.exit: ; preds = %7, %9, %12 - %.sroa.0.0.i7.i.i = phi i8 [ 1, %7 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %12 ] + %.sroa.0.0.i7.i.i = phi i8 [ 1, %8 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %10 ] ret i8 %.sroa.0.0.i7.i.i } @@ -28276,16 +28270,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ %5 = getelementptr inbounds nuw i8, ptr %2, i64 4 %.val3 = load float, ptr %5, align 4, !alias.scope !3590, !noalias !3587 %6 = trunc nuw i32 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i32 %.val2 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %.val2 to i1 - br i1 %8, label %12, label %_ZN4core3ops8function6FnOnce9call_once17h7ae48e88ac9d0817E.exit + br i1 %7, label %10, label %_ZN4core3ops8function6FnOnce9call_once17h7ae48e88ac9d0817E.exit 9: ; preds = %3 - %10 = trunc i32 %.val2 to i8 - %11 = and i8 %10, 1 - %..i.i.i = sub nsw i8 0, %11 + %..i.i.i = sext i1 %7 to i8 br label %_ZN4core3ops8function6FnOnce9call_once17h7ae48e88ac9d0817E.exit 12: ; preds = %7 @@ -28301,7 +28293,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ unreachable _ZN4core3ops8function6FnOnce9call_once17h7ae48e88ac9d0817E.exit: ; preds = %7, %9, %12 - %.sroa.0.0.i7.i.i = phi i8 [ 1, %7 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %12 ] + %.sroa.0.0.i7.i.i = phi i8 [ 1, %8 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %10 ] ret i8 %.sroa.0.0.i7.i.i } @@ -28402,16 +28394,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %.val3 = load double, ptr %5, align 8, !alias.scope !3630, !noalias !3627 %6 = trunc nuw i64 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i64 %.val2 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %.val2 to i1 - br i1 %8, label %12, label %_ZN4core3ops8function6FnOnce9call_once17hcf55bd4b4f70654cE.exit + br i1 %7, label %10, label %_ZN4core3ops8function6FnOnce9call_once17hcf55bd4b4f70654cE.exit 9: ; preds = %3 - %10 = trunc i64 %.val2 to i8 - %11 = and i8 %10, 1 - %..i.i.i = sub nsw i8 0, %11 + %..i.i.i = sext i1 %7 to i8 br label %_ZN4core3ops8function6FnOnce9call_once17hcf55bd4b4f70654cE.exit 12: ; preds = %7 @@ -28427,7 +28417,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ unreachable _ZN4core3ops8function6FnOnce9call_once17hcf55bd4b4f70654cE.exit: ; preds = %7, %9, %12 - %.sroa.0.0.i7.i.i = phi i8 [ 1, %7 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %12 ] + %.sroa.0.0.i7.i.i = phi i8 [ 1, %8 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %10 ] ret i8 %.sroa.0.0.i7.i.i } @@ -28455,16 +28445,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ %5 = getelementptr inbounds nuw i8, ptr %2, i64 4 %.val3 = load float, ptr %5, align 4 %6 = trunc nuw i32 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i32 %.val2 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %.val2 to i1 - br i1 %8, label %12, label %_ZN4core3ops8function6FnOnce9call_once17h69586daf2fcc9720E.exit + br i1 %7, label %10, label %_ZN4core3ops8function6FnOnce9call_once17h69586daf2fcc9720E.exit 9: ; preds = %3 - %10 = trunc i32 %.val2 to i8 - %11 = and i8 %10, 1 - %..i.i = sub nsw i8 0, %11 + %..i.i = sext i1 %7 to i8 br label %_ZN4core3ops8function6FnOnce9call_once17h69586daf2fcc9720E.exit 12: ; preds = %7 @@ -28479,7 +28467,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ br label %_ZN4core3ops8function6FnOnce9call_once17h69586daf2fcc9720E.exit _ZN4core3ops8function6FnOnce9call_once17h69586daf2fcc9720E.exit: ; preds = %7, %9, %12 - %.sroa.0.0.i.i = phi i8 [ %.sroa.0.0.i.i.i, %12 ], [ %..i.i, %9 ], [ 1, %7 ] + %.sroa.0.0.i.i = phi i8 [ %.sroa.0.0.i.i.i, %10 ], [ %..i.i, %9 ], [ 1, %8 ] ret i8 %.sroa.0.0.i.i } @@ -28886,16 +28874,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %.val3 = load double, ptr %5, align 8 %6 = trunc nuw i64 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i64 %.val2 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %.val2 to i1 - br i1 %8, label %12, label %_ZN4core3ops8function6FnOnce9call_once17hd1ee179e7833b8c3E.exit + br i1 %7, label %10, label %_ZN4core3ops8function6FnOnce9call_once17hd1ee179e7833b8c3E.exit 9: ; preds = %3 - %10 = trunc i64 %.val2 to i8 - %11 = and i8 %10, 1 - %..i.i = sub nsw i8 0, %11 + %..i.i = sext i1 %7 to i8 br label %_ZN4core3ops8function6FnOnce9call_once17hd1ee179e7833b8c3E.exit 12: ; preds = %7 @@ -28910,7 +28896,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ br label %_ZN4core3ops8function6FnOnce9call_once17hd1ee179e7833b8c3E.exit _ZN4core3ops8function6FnOnce9call_once17hd1ee179e7833b8c3E.exit: ; preds = %7, %9, %12 - %.sroa.0.0.i.i = phi i8 [ %.sroa.0.0.i.i.i, %12 ], [ %..i.i, %9 ], [ 1, %7 ] + %.sroa.0.0.i.i = phi i8 [ %.sroa.0.0.i.i.i, %10 ], [ %..i.i, %9 ], [ 1, %8 ] ret i8 %.sroa.0.0.i.i } @@ -28943,16 +28929,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %.val3 = load double, ptr %5, align 8, !alias.scope !3777, !noalias !3774 %6 = trunc nuw i64 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i64 %.val2 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %.val2 to i1 - br i1 %8, label %12, label %_ZN4core3ops8function6FnOnce9call_once17h5c313d18977c8e57E.exit + br i1 %7, label %10, label %_ZN4core3ops8function6FnOnce9call_once17h5c313d18977c8e57E.exit 9: ; preds = %3 - %10 = trunc i64 %.val2 to i8 - %11 = and i8 %10, 1 - %..i.i.i = sub nsw i8 0, %11 + %..i.i.i = sext i1 %7 to i8 br label %_ZN4core3ops8function6FnOnce9call_once17h5c313d18977c8e57E.exit 12: ; preds = %7 @@ -28968,7 +28952,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN4core3ops8function6FnOnce40call_ unreachable _ZN4core3ops8function6FnOnce9call_once17h5c313d18977c8e57E.exit: ; preds = %7, %9, %12 - %.sroa.0.0.i7.i.i = phi i8 [ 1, %7 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %12 ] + %.sroa.0.0.i7.i.i = phi i8 [ 1, %8 ], [ %..i.i.i, %9 ], [ %.1.i.i.mux.i.i, %10 ] ret i8 %.sroa.0.0.i7.i.i } @@ -90186,16 +90170,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord %5 = getelementptr inbounds nuw i8, ptr %2, i64 4 %.val4 = load float, ptr %5, align 4 %6 = trunc nuw i32 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i32 %.val3 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %.val3 to i1 - br i1 %8, label %12, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread" + br i1 %7, label %10, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread" 9: ; preds = %3 - %10 = trunc i32 %.val3 to i8 - %11 = and i8 %10, 1 - %..i = sub nsw i8 0, %11 + %..i = sext i1 %7 to i8 br label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread" 12: ; preds = %7 @@ -90207,7 +90189,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord br i1 %brmerge.not, label %15, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread", !prof !3467 "_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread": ; preds = %12, %7, %9 - %.sroa.0.0.i7 = phi i8 [ 1, %7 ], [ %..i, %9 ], [ %.1.i.i.mux, %12 ] + %.sroa.0.0.i7 = phi i8 [ 1, %8 ], [ %..i, %9 ], [ %.1.i.i.mux, %10 ] ret i8 %.sroa.0.0.i7 15: ; preds = %12 @@ -90224,16 +90206,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %.val4 = load double, ptr %5, align 8 %6 = trunc nuw i64 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i64 %.val3 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %.val3 to i1 - br i1 %8, label %12, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread" + br i1 %7, label %10, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread" 9: ; preds = %3 - %10 = trunc i64 %.val3 to i8 - %11 = and i8 %10, 1 - %..i = sub nsw i8 0, %11 + %..i = sext i1 %7 to i8 br label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread" 12: ; preds = %7 @@ -90245,7 +90225,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord br i1 %brmerge.not, label %15, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread", !prof !3467 "_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread": ; preds = %12, %7, %9 - %.sroa.0.0.i7 = phi i8 [ 1, %7 ], [ %..i, %9 ], [ %.1.i.i.mux, %12 ] + %.sroa.0.0.i7 = phi i8 [ 1, %8 ], [ %..i, %9 ], [ %.1.i.i.mux, %10 ] ret i8 %.sroa.0.0.i7 15: ; preds = %12 @@ -90282,16 +90262,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord %5 = getelementptr inbounds nuw i8, ptr %2, i64 8 %.val4 = load double, ptr %5, align 8 %6 = trunc nuw i64 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i64 %.val3 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i64 %.val3 to i1 - br i1 %8, label %12, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread" + br i1 %7, label %10, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread" 9: ; preds = %3 - %10 = trunc i64 %.val3 to i8 - %11 = and i8 %10, 1 - %..i = sub nsw i8 0, %11 + %..i = sext i1 %7 to i8 br label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread" 12: ; preds = %7 @@ -90303,7 +90281,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord br i1 %brmerge.not, label %15, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread", !prof !3467 "_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h681a08af2ce43757E.exit.thread": ; preds = %12, %7, %9 - %.sroa.0.0.i7 = phi i8 [ 1, %7 ], [ %..i, %9 ], [ %.1.i.i.mux, %12 ] + %.sroa.0.0.i7 = phi i8 [ 1, %8 ], [ %..i, %9 ], [ %.1.i.i.mux, %10 ] ret i8 %.sroa.0.0.i7 15: ; preds = %12 @@ -90320,16 +90298,14 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord %5 = getelementptr inbounds nuw i8, ptr %2, i64 4 %.val4 = load float, ptr %5, align 4 %6 = trunc nuw i32 %.val to i1 - br i1 %6, label %7, label %9 + %7 = trunc nuw i32 %.val3 to i1 + br i1 %6, label %8, label %9 7: ; preds = %3 - %8 = trunc nuw i32 %.val3 to i1 - br i1 %8, label %12, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread" + br i1 %7, label %10, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread" 9: ; preds = %3 - %10 = trunc i32 %.val3 to i8 - %11 = and i8 %10, 1 - %..i = sub nsw i8 0, %11 + %..i = sext i1 %7 to i8 br label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread" 12: ; preds = %7 @@ -90341,7 +90317,7 @@ define internal noundef range(i8 -1, 2) i8 @"_ZN8skiplist16ordered_skiplist24Ord br i1 %brmerge.not, label %15, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread", !prof !3467 "_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17hff5328dd4e34147eE.exit.thread": ; preds = %12, %7, %9 - %.sroa.0.0.i7 = phi i8 [ 1, %7 ], [ %..i, %9 ], [ %.1.i.i.mux, %12 ] + %.sroa.0.0.i7 = phi i8 [ 1, %8 ], [ %..i, %9 ], [ %.1.i.i.mux, %10 ] ret i8 %.sroa.0.0.i7 15: ; preds = %12 diff --git a/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll b/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll index 1eaf527f62f..4eb78f660de 100644 --- a/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll +++ b/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll @@ -8835,7 +8835,7 @@ define hidden noundef zeroext i1 @_ZN4core4iter6traits8iterator8Iterator5eq_by17 br label %common.resume.i common.resume.i: ; preds = %129, %121, %97, %95, %87, %70, %62, %.body.i.i.i.i.i.i.i - %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %129 ], [ %122, %121 ] + %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %130 ], [ %122, %122 ] resume { ptr, i32 } %common.resume.op.i 96: ; preds = %61, %54, %"_ZN4core3ptr108drop_in_place$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$17h58724552a18b0f58E.exit.i.i.i.i.i.i.i" @@ -8871,6 +8871,7 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17hc941f4d8b31b03d7E.exit.th call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !1857 call fastcc void @"_ZN130_$LT$polars_arrow..bitmap..utils..zip_validity..ZipValidity$LT$T$C$I$C$V$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd93f890584526e48E"(ptr noalias noundef align 8 captures(none) dereferenceable(24) %5, ptr noalias noundef nonnull align 8 dereferenceable(64) %6), !noalias !1858 %103 = load i64, ptr %5, align 8, !range !1855, !noalias !1857, !noundef !12 + %104 = trunc nuw i64 %103 to i1 tail call void @llvm.experimental.noalias.scope.decl(metadata !1859) %104 = icmp eq i64 %103, 0 br i1 %104, label %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i", label %105 @@ -8891,8 +8892,8 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17hc941f4d8b31b03d7E.exit.th br i1 %.not.i.i.i.i, label %113, label %112 112: ; preds = %109 - invoke void %111(ptr noundef nonnull %.val.i.i) - to label %113 unwind label %121, !noalias !1862 + invoke void %112(ptr noundef nonnull %.val.i.i) + to label %114 unwind label %121, !noalias !1862 113: ; preds = %112, %109 %114 = getelementptr inbounds nuw i8, ptr %.val1.i.i, i64 8 @@ -8926,10 +8927,11 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17hc941f4d8b31b03d7E.exit.th "_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i": ; preds = %120, %113, %105, %.loopexit.i call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !1857 + %131 = xor i1 %104, true br label %_ZN4core4iter6traits8iterator12iter_compare17haca63d44cfef5f4dE.exit _ZN4core4iter6traits8iterator12iter_compare17haca63d44cfef5f4dE.exit: ; preds = %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hc941f4d8b31b03d7E.exit.thread.i, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" - %.sroa.0.0.i = phi i1 [ %104, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hc941f4d8b31b03d7E.exit.thread.i ] + %.sroa.0.0.i = phi i1 [ %131, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hc941f4d8b31b03d7E.exit.thread.i ] call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) ret i1 %.sroa.0.0.i @@ -9469,7 +9471,7 @@ define hidden noundef zeroext i1 @_ZN4core4iter6traits8iterator8Iterator5eq_by17 br label %common.resume.i common.resume.i: ; preds = %129, %121, %97, %95, %87, %70, %62, %.body.i.i.i.i.i.i.i - %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %129 ], [ %122, %121 ] + %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %130 ], [ %122, %122 ] resume { ptr, i32 } %common.resume.op.i 96: ; preds = %61, %54, %"_ZN4core3ptr108drop_in_place$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$17h58724552a18b0f58E.exit.i.i.i.i.i.i.i" @@ -9505,6 +9507,7 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17h19fcd9b93277702fE.exit.th call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !1918 call fastcc void @"_ZN130_$LT$polars_arrow..bitmap..utils..zip_validity..ZipValidity$LT$T$C$I$C$V$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd535f347c1569bd3E"(ptr noalias noundef align 8 captures(none) dereferenceable(24) %5, ptr noalias noundef nonnull align 8 dereferenceable(64) %6), !noalias !1919 %103 = load i64, ptr %5, align 8, !range !1855, !noalias !1918, !noundef !12 + %104 = trunc nuw i64 %103 to i1 tail call void @llvm.experimental.noalias.scope.decl(metadata !1920) %104 = icmp eq i64 %103, 0 br i1 %104, label %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i", label %105 @@ -9525,8 +9528,8 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17h19fcd9b93277702fE.exit.th br i1 %.not.i.i.i.i, label %113, label %112 112: ; preds = %109 - invoke void %111(ptr noundef nonnull %.val.i.i) - to label %113 unwind label %121, !noalias !1923 + invoke void %112(ptr noundef nonnull %.val.i.i) + to label %114 unwind label %121, !noalias !1923 113: ; preds = %112, %109 %114 = getelementptr inbounds nuw i8, ptr %.val1.i.i, i64 8 @@ -9560,10 +9563,11 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17h19fcd9b93277702fE.exit.th "_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i": ; preds = %120, %113, %105, %.loopexit.i call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !1918 + %131 = xor i1 %104, true br label %_ZN4core4iter6traits8iterator12iter_compare17h93d548e524704ea0E.exit _ZN4core4iter6traits8iterator12iter_compare17h93d548e524704ea0E.exit: ; preds = %_ZN4core4iter6traits8iterator8Iterator12try_for_each17h19fcd9b93277702fE.exit.thread.i, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" - %.sroa.0.0.i = phi i1 [ %104, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17h19fcd9b93277702fE.exit.thread.i ] + %.sroa.0.0.i = phi i1 [ %131, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17h19fcd9b93277702fE.exit.thread.i ] call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) ret i1 %.sroa.0.0.i @@ -10560,7 +10564,7 @@ define hidden noundef zeroext i1 @_ZN4core4iter6traits8iterator8Iterator5eq_by17 br label %common.resume.i common.resume.i: ; preds = %129, %121, %97, %95, %87, %70, %62, %.body.i.i.i.i.i.i.i - %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %129 ], [ %122, %121 ] + %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %130 ], [ %122, %122 ] resume { ptr, i32 } %common.resume.op.i 96: ; preds = %61, %54, %"_ZN4core3ptr108drop_in_place$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$17h58724552a18b0f58E.exit.i.i.i.i.i.i.i" @@ -10596,6 +10600,7 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17ha4f32a10d55652a9E.exit.th call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !2111 call fastcc void @"_ZN130_$LT$polars_arrow..bitmap..utils..zip_validity..ZipValidity$LT$T$C$I$C$V$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h84a7213b25aca9a7E"(ptr noalias noundef align 8 captures(none) dereferenceable(24) %5, ptr noalias noundef nonnull align 8 dereferenceable(64) %6), !noalias !2112 %103 = load i64, ptr %5, align 8, !range !1855, !noalias !2111, !noundef !12 + %104 = trunc nuw i64 %103 to i1 tail call void @llvm.experimental.noalias.scope.decl(metadata !2113) %104 = icmp eq i64 %103, 0 br i1 %104, label %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i", label %105 @@ -10616,8 +10621,8 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17ha4f32a10d55652a9E.exit.th br i1 %.not.i.i.i.i, label %113, label %112 112: ; preds = %109 - invoke void %111(ptr noundef nonnull %.val.i.i) - to label %113 unwind label %121, !noalias !2116 + invoke void %112(ptr noundef nonnull %.val.i.i) + to label %114 unwind label %121, !noalias !2116 113: ; preds = %112, %109 %114 = getelementptr inbounds nuw i8, ptr %.val1.i.i, i64 8 @@ -10651,10 +10656,11 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17ha4f32a10d55652a9E.exit.th "_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i": ; preds = %120, %113, %105, %.loopexit.i call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !2111 + %131 = xor i1 %104, true br label %_ZN4core4iter6traits8iterator12iter_compare17h25ce0515745bbda1E.exit _ZN4core4iter6traits8iterator12iter_compare17h25ce0515745bbda1E.exit: ; preds = %_ZN4core4iter6traits8iterator8Iterator12try_for_each17ha4f32a10d55652a9E.exit.thread.i, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" - %.sroa.0.0.i = phi i1 [ %104, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17ha4f32a10d55652a9E.exit.thread.i ] + %.sroa.0.0.i = phi i1 [ %131, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17ha4f32a10d55652a9E.exit.thread.i ] call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) ret i1 %.sroa.0.0.i @@ -10867,7 +10873,7 @@ define hidden noundef zeroext i1 @_ZN4core4iter6traits8iterator8Iterator5eq_by17 br label %common.resume.i common.resume.i: ; preds = %129, %121, %97, %95, %87, %70, %62, %.body.i.i.i.i.i.i.i - %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %129 ], [ %122, %121 ] + %common.resume.op.i = phi { ptr, i32 } [ %88, %95 ], [ %88, %87 ], [ %98, %97 ], [ %63, %70 ], [ %63, %62 ], [ %.pn.i.i.i.i.i.i.i, %.body.i.i.i.i.i.i.i ], [ %122, %130 ], [ %122, %122 ] resume { ptr, i32 } %common.resume.op.i 96: ; preds = %61, %54, %"_ZN4core3ptr108drop_in_place$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$17h58724552a18b0f58E.exit.i.i.i.i.i.i.i" @@ -10903,6 +10909,7 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17hf5786b0ae7a0165bE.exit.th call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !2133 call fastcc void @"_ZN130_$LT$polars_arrow..bitmap..utils..zip_validity..ZipValidity$LT$T$C$I$C$V$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0f9e5e408ffb749dE"(ptr noalias noundef align 8 captures(none) dereferenceable(24) %5, ptr noalias noundef nonnull align 8 dereferenceable(64) %6), !noalias !2134 %103 = load i64, ptr %5, align 8, !range !1855, !noalias !2133, !noundef !12 + %104 = trunc nuw i64 %103 to i1 tail call void @llvm.experimental.noalias.scope.decl(metadata !2135) %104 = icmp eq i64 %103, 0 br i1 %104, label %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i", label %105 @@ -10923,8 +10930,8 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17hf5786b0ae7a0165bE.exit.th br i1 %.not.i.i.i.i, label %113, label %112 112: ; preds = %109 - invoke void %111(ptr noundef nonnull %.val.i.i) - to label %113 unwind label %121, !noalias !2138 + invoke void %112(ptr noundef nonnull %.val.i.i) + to label %114 unwind label %121, !noalias !2138 113: ; preds = %112, %109 %114 = getelementptr inbounds nuw i8, ptr %.val1.i.i, i64 8 @@ -10958,10 +10965,11 @@ _ZN4core4iter6traits8iterator8Iterator12try_for_each17hf5786b0ae7a0165bE.exit.th "_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i": ; preds = %120, %113, %105, %.loopexit.i call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !2133 + %131 = xor i1 %104, true br label %_ZN4core4iter6traits8iterator12iter_compare17h1e4f53bac8b81d8dE.exit _ZN4core4iter6traits8iterator12iter_compare17h1e4f53bac8b81d8dE.exit: ; preds = %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hf5786b0ae7a0165bE.exit.thread.i, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" - %.sroa.0.0.i = phi i1 [ %104, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hf5786b0ae7a0165bE.exit.thread.i ] + %.sroa.0.0.i = phi i1 [ %131, %"_ZN4core3ptr136drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$alloc..boxed..Box$LT$dyn$u20$polars_arrow..array..Array$GT$$GT$$GT$$GT$17h308bf25b48eefd4bE.exit.i" ], [ false, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hf5786b0ae7a0165bE.exit.thread.i ] call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) ret i1 %.sroa.0.0.i diff --git a/bench/postgres/optimized/int.ll b/bench/postgres/optimized/int.ll index e804aab1e28..6c8da2cf7cd 100644 --- a/bench/postgres/optimized/int.ll +++ b/bench/postgres/optimized/int.ll @@ -732,13 +732,12 @@ define dso_local range(i64 0, 2) i64 @int2ge(ptr noundef readonly captures(none) define dso_local range(i64 0, 2) i64 @int24eq(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp eq i32 %8, %7 + %8 = sext i16 %4 to i32 + %9 = icmp eq i32 %7, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -747,13 +746,12 @@ define dso_local range(i64 0, 2) i64 @int24eq(ptr noundef readonly captures(none define dso_local range(i64 0, 2) i64 @int24ne(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp ne i32 %8, %7 + %8 = sext i16 %4 to i32 + %9 = icmp ne i32 %7, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -762,13 +760,12 @@ define dso_local range(i64 0, 2) i64 @int24ne(ptr noundef readonly captures(none define dso_local range(i64 0, 2) i64 @int24lt(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp slt i32 %8, %7 + %8 = sext i16 %4 to i32 + %9 = icmp sgt i32 %7, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -777,13 +774,12 @@ define dso_local range(i64 0, 2) i64 @int24lt(ptr noundef readonly captures(none define dso_local range(i64 0, 2) i64 @int24le(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp sle i32 %8, %7 + %8 = sext i16 %4 to i32 + %9 = icmp sge i32 %7, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -792,13 +788,12 @@ define dso_local range(i64 0, 2) i64 @int24le(ptr noundef readonly captures(none define dso_local range(i64 0, 2) i64 @int24gt(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp sgt i32 %8, %7 + %8 = sext i16 %4 to i32 + %9 = icmp slt i32 %7, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -807,13 +802,12 @@ define dso_local range(i64 0, 2) i64 @int24gt(ptr noundef readonly captures(none define dso_local range(i64 0, 2) i64 @int24ge(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp sge i32 %8, %7 + %8 = sext i16 %4 to i32 + %9 = icmp sle i32 %7, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -825,10 +819,9 @@ define dso_local range(i64 0, 2) i64 @int42eq(ptr noundef readonly captures(none %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp eq i32 %8, %4 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 + %9 = icmp eq i32 %4, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -840,10 +833,9 @@ define dso_local range(i64 0, 2) i64 @int42ne(ptr noundef readonly captures(none %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp ne i32 %8, %4 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 + %9 = icmp ne i32 %4, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -855,10 +847,9 @@ define dso_local range(i64 0, 2) i64 @int42lt(ptr noundef readonly captures(none %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp sgt i32 %8, %4 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 + %9 = icmp slt i32 %4, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -870,10 +861,9 @@ define dso_local range(i64 0, 2) i64 @int42le(ptr noundef readonly captures(none %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp sge i32 %8, %4 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 + %9 = icmp sle i32 %4, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -885,10 +875,9 @@ define dso_local range(i64 0, 2) i64 @int42gt(ptr noundef readonly captures(none %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp slt i32 %8, %4 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 + %9 = icmp sgt i32 %4, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -900,10 +889,9 @@ define dso_local range(i64 0, 2) i64 @int42ge(ptr noundef readonly captures(none %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 - %9 = icmp sle i32 %8, %4 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 + %9 = icmp sge i32 %4, %10 %10 = zext i1 %9 to i64 ret i64 %10 } @@ -1045,9 +1033,8 @@ define dso_local range(i64 0, 2) i64 @in_range_int4_int8(ptr noundef readonly ca define dso_local range(i64 0, 2) i64 @in_range_int2_int4(ptr noundef readonly captures(none) %0) #0 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 - %sext = shl i32 %4, 16 - %5 = ashr exact i32 %sext, 16 + %4 = trunc i64 %3 to i16 + %5 = sext i16 %4 to i32 %6 = getelementptr inbounds nuw i8, ptr %0, i64 64 %7 = load i64, ptr %6, align 8 %8 = trunc i64 %7 to i32 @@ -1070,9 +1057,8 @@ define dso_local range(i64 0, 2) i64 @in_range_int2_int4(ptr noundef readonly ca 19: ; preds = %1 %20 = getelementptr inbounds nuw i8, ptr %0, i64 48 %21 = load i64, ptr %20, align 8 - %22 = trunc i64 %21 to i32 - %sext20 = shl i32 %22, 16 - %23 = ashr exact i32 %sext20, 16 + %22 = trunc i64 %21 to i16 + %23 = sext i16 %22 to i32 %24 = sub nsw i32 0, %8 %spec.select = select i1 %.not, i32 %24, i32 %8 %25 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %23, i32 %spec.select) @@ -1130,13 +1116,13 @@ define dso_local i64 @in_range_int2_int8(ptr noundef readonly captures(none) %0) %8 = shl i64 %7, 48 %9 = ashr exact i64 %8, 48 %10 = getelementptr inbounds nuw i8, ptr %0, i64 64 + %9 = load i64, ptr %8, align 8 + %10 = getelementptr inbounds nuw i8, ptr %0, i64 80 %11 = load i64, ptr %10, align 8 - %12 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 96 %13 = load i64, ptr %12, align 8 - %14 = getelementptr inbounds nuw i8, ptr %0, i64 96 - %15 = load i64, ptr %14, align 8 - %16 = tail call i64 @DirectFunctionCall5Coll(ptr noundef nonnull @in_range_int4_int8, i32 noundef 0, i64 noundef %5, i64 noundef %9, i64 noundef %11, i64 noundef %13, i64 noundef %15) #12 - ret i64 %16 + %14 = tail call i64 @DirectFunctionCall5Coll(ptr noundef nonnull @in_range_int4_int8, i32 noundef 0, i64 noundef %4, i64 noundef %7, i64 noundef %9, i64 noundef %11, i64 noundef %13) #12 + ret i64 %14 } ; Function Attrs: nounwind uwtable @@ -1470,12 +1456,11 @@ define dso_local range(i64 -32768, 32768) i64 @int2div(ptr noundef readonly capt define dso_local range(i64 -2147483648, 2147483648) i64 @int24pl(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 + %8 = sext i16 %4 to i32 %9 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %8, i32 %7) %10 = extractvalue { i32, i1 } %9, 1 br i1 %10, label %11, label %15, !prof !14 @@ -1497,12 +1482,11 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @int24pl(ptr noundef rea define dso_local range(i64 -2147483648, 2147483648) i64 @int24mi(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 + %8 = sext i16 %4 to i32 %9 = tail call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 %8, i32 %7) %10 = extractvalue { i32, i1 } %9, 1 br i1 %10, label %11, label %15, !prof !14 @@ -1524,12 +1508,11 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @int24mi(ptr noundef rea define dso_local range(i64 -2147483648, 2147483648) i64 @int24mul(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 + %8 = sext i16 %4 to i32 %9 = tail call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %8, i32 %7) %10 = extractvalue { i32, i1 } %9, 1 br i1 %10, label %11, label %15, !prof !14 @@ -1565,9 +1548,8 @@ define dso_local range(i64 -32768, 32769) i64 @int24div(ptr noundef readonly cap 10: ; preds = %1 %11 = getelementptr inbounds nuw i8, ptr %0, i64 32 %12 = load i64, ptr %11, align 8 - %13 = trunc i64 %12 to i32 - %sext = shl i32 %13, 16 - %14 = ashr exact i32 %sext, 16 + %13 = trunc i64 %12 to i16 + %14 = sext i16 %13 to i32 %15 = sdiv i32 %14, %4 %16 = sext i32 %15 to i64 ret i64 %16 @@ -1580,9 +1562,8 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @int42pl(ptr noundef rea %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 %9 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %4, i32 %8) %10 = extractvalue { i32, i1 } %9, 1 br i1 %10, label %11, label %15, !prof !14 @@ -1607,9 +1588,8 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @int42mi(ptr noundef rea %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 %9 = tail call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 %4, i32 %8) %10 = extractvalue { i32, i1 } %9, 1 br i1 %10, label %11, label %15, !prof !14 @@ -1634,9 +1614,8 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @int42mul(ptr noundef re %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 %9 = tail call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %4, i32 %8) %10 = extractvalue { i32, i1 } %9, 1 br i1 %10, label %11, label %15, !prof !14 @@ -1752,9 +1731,8 @@ define dso_local range(i64 -32767, 32768) i64 @int2mod(ptr noundef readonly capt %10 = sext i16 %4 to i32 %11 = getelementptr inbounds nuw i8, ptr %0, i64 32 %12 = load i64, ptr %11, align 8 - %13 = trunc i64 %12 to i32 - %sext = shl i32 %13, 16 - %14 = ashr exact i32 %sext, 16 + %13 = trunc i64 %12 to i16 + %14 = sext i16 %13 to i32 %15 = srem i32 %14, %10 %16 = zext i32 %15 to i64 %sext7 = shl i64 %16, 48 @@ -2146,12 +2124,11 @@ define dso_local range(i64 -32768, 32768) i64 @int2shl(ptr noundef readonly capt define dso_local range(i64 -32768, 32768) i64 @int2shr(ptr noundef readonly captures(none) %0) local_unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 + %8 = sext i16 %4 to i32 %9 = ashr i32 %8, %7 %10 = zext i32 %9 to i64 %sext3 = shl i64 %10, 48 diff --git a/bench/postgres/optimized/nbtcompare.ll b/bench/postgres/optimized/nbtcompare.ll index 6913a8079a0..4607f27b2d6 100644 --- a/bench/postgres/optimized/nbtcompare.ll +++ b/bench/postgres/optimized/nbtcompare.ll @@ -21,17 +21,14 @@ define dso_local range(i64 -1, 2) i64 @btboolcmp(ptr noundef readonly captures(n define dso_local range(i64 -65535, 65536) i64 @btint2cmp(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 - %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 - %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 - %sext3 = shl i32 %7, 16 - %9 = ashr exact i32 %sext3, 16 - %10 = sub nsw i32 %8, %9 - %11 = sext i32 %10 to i64 - ret i64 %11 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %5 = load i64, ptr %4, align 8 + %sext = shl i64 %3, 48 + %6 = ashr exact i64 %sext, 48 + %sext = shl i64 %5, 48 + %8 = ashr exact i64 %sext, 48 + %8 = sub nsw i64 %6, %8 + ret i64 %8 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) uwtable @@ -46,12 +43,10 @@ define dso_local noundef i64 @btint2sortsupport(ptr noundef readonly captures(no ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define internal range(i32 -65535, 65536) i32 @btint2fastcmp(i64 noundef %0, i64 noundef %1, ptr readnone captures(none) %2) #2 { - %4 = trunc i64 %0 to i32 - %5 = trunc i64 %1 to i32 - %sext = shl i32 %4, 16 - %6 = ashr exact i32 %sext, 16 - %sext4 = shl i32 %5, 16 - %7 = ashr exact i32 %sext4, 16 + %4 = trunc i64 %0 to i16 + %5 = trunc i64 %1 to i16 + %6 = sext i16 %4 to i32 + %7 = sext i16 %5 to i32 %8 = sub nsw i32 %6, %7 ret i32 %8 } @@ -130,12 +125,11 @@ define dso_local range(i64 -1, 2) i64 @btint84cmp(ptr noundef readonly captures( define dso_local range(i64 -1, 2) i64 @btint24cmp(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 32 %3 = load i64, ptr %2, align 8 - %4 = trunc i64 %3 to i32 + %4 = trunc i64 %3 to i16 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 %7 = trunc i64 %6 to i32 - %sext = shl i32 %4, 16 - %8 = ashr exact i32 %sext, 16 + %8 = sext i16 %4 to i32 %.0 = tail call i64 @llvm.scmp.i64.i32(i32 %8, i32 %7) ret i64 %.0 } @@ -147,9 +141,8 @@ define dso_local range(i64 -1, 2) i64 @btint42cmp(ptr noundef readonly captures( %4 = trunc i64 %3 to i32 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %sext = shl i32 %7, 16 - %8 = ashr exact i32 %sext, 16 + %7 = trunc i64 %6 to i16 + %8 = sext i16 %7 to i32 %.0 = tail call i64 @llvm.scmp.i64.i32(i32 %4, i32 %8) ret i64 %.0 } diff --git a/bench/raylib/optimized/raudio.ll b/bench/raylib/optimized/raudio.ll index 145296f682a..dc3316bd82d 100644 --- a/bench/raylib/optimized/raudio.ll +++ b/bench/raylib/optimized/raudio.ll @@ -84269,8 +84269,8 @@ define hidden i32 @qoa_decode_frame(ptr noundef readonly captures(none) %0, i32 br label %.preheader.us .preheader.us: ; preds = %.preheader.lr.ph, %._crit_edge114.us - %indvars.iv141 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next142, %._crit_edge114.us ] - %.1116.us = phi i32 [ %52, %.preheader.lr.ph ], [ %62, %._crit_edge114.us ] + %indvars.iv141 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next142, %._crit_edge112.us ] + %.1116.us = phi i32 [ %52, %.preheader.lr.ph ], [ %62, %._crit_edge112.us ] %56 = mul nuw nsw i64 %indvars.iv141, %55 %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 20 %57 = trunc nuw nsw i64 %indvars.iv.next142 to i32 @@ -84293,8 +84293,8 @@ define hidden i32 @qoa_decode_frame(ptr noundef readonly captures(none) %0, i32 br i1 %exitcond140.not, label %._crit_edge114.us, label %61 64: ; preds = %.lr.ph110.us, %qoa_lms_update.exit.us - %.078109.us = phi i32 [ %141, %.lr.ph110.us ], [ %92, %qoa_lms_update.exit.us ] - %.082108.us = phi i64 [ %135, %.lr.ph110.us ], [ %91, %qoa_lms_update.exit.us ] + %.078109.us = phi i32 [ %141, %.lr.ph108.us ], [ %92, %qoa_lms_update.exit.us ] + %.082108.us = phi i64 [ %135, %.lr.ph108.us ], [ %91, %qoa_lms_update.exit.us ] br label %65 65: ; preds = %65, %64 @@ -84496,31 +84496,29 @@ qoa_lms_update.exit.us: ; preds = %83 224: ; preds = %143, %224 %indvars.iv = phi i64 [ 0, %143 ], [ %indvars.iv.next, %224 ] - %.077105 = phi i64 [ %181, %143 ], [ %227, %224 ] - %.079104 = phi i64 [ %220, %143 ], [ %230, %224 ] - %sh.diff = lshr i64 %.077105, 32 - %tr.sh.diff = trunc nuw i64 %sh.diff to i32 - %225 = ashr i32 %tr.sh.diff, 16 - %226 = getelementptr inbounds nuw i32, ptr %221, i64 %indvars.iv - store i32 %225, ptr %226, align 4 - %227 = shl i64 %.077105, 16 - %sh.diff89 = lshr i64 %.079104, 32 - %tr.sh.diff90 = trunc nuw i64 %sh.diff89 to i32 - %228 = ashr i32 %tr.sh.diff90, 16 - %229 = getelementptr inbounds nuw i32, ptr %222, i64 %indvars.iv - store i32 %228, ptr %229, align 4 - %230 = shl i64 %.079104, 16 + %.077105 = phi i64 [ %181, %143 ], [ %228, %224 ] + %.079104 = phi i64 [ %220, %143 ], [ %232, %224 ] + %225 = ashr i64 %.077105, 48 + %tr.sh.diff = trunc nsw i64 %225 to i32 + %227 = getelementptr inbounds nuw i32, ptr %221, i64 %indvars.iv + store i32 %226, ptr %227, align 4 + %228 = shl i64 %.077103, 16 + %229 = ashr i64 %.079102, 48 + %230 = trunc nsw i64 %229 to i32 + %231 = getelementptr inbounds nuw i32, ptr %222, i64 %indvars.iv + store i32 %230, ptr %231, align 4 + %232 = shl i64 %.079102, 16 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %223, label %224 ._crit_edge118: ; preds = %._crit_edge114.us, %.preheader102, %.preheader101 - %.1.lcssa = phi i32 [ %52, %.preheader101 ], [ 8, %.preheader102 ], [ %62, %._crit_edge114.us ] + %.1.lcssa = phi i32 [ %52, %.preheader99 ], [ 8, %.preheader100 ], [ %62, %._crit_edge112.us ] store i32 %19, ptr %4, align 4 br label %231 231: ; preds = %._crit_edge118, %21, %10, %5 - %.0 = phi i32 [ 0, %5 ], [ %.1.lcssa, %._crit_edge118 ], [ 0, %21 ], [ 0, %10 ] + %.0 = phi i32 [ 0, %5 ], [ %.1.lcssa, %._crit_edge116 ], [ 0, %21 ], [ 0, %10 ] ret i32 %.0 } diff --git a/bench/raylib/optimized/rtextures.ll b/bench/raylib/optimized/rtextures.ll index 2551220eca2..4e68baad59b 100644 --- a/bench/raylib/optimized/rtextures.ll +++ b/bench/raylib/optimized/rtextures.ll @@ -12554,8 +12554,8 @@ define noundef ptr @LoadImageColors(ptr noundef readonly byval(%struct.Image) al %57 = and i8 %56, -8 %58 = getelementptr inbounds nuw i8, ptr %51, i64 2 store i8 %57, ptr %58, align 1 - %59 = and i8 %.tr179, 1 - %60 = sub nsw i8 0, %59 + %59 = trunc i16 %47 to i1 + %60 = sext i1 %59 to i8 %61 = getelementptr inbounds nuw i8, ptr %51, i64 3 store i8 %60, ptr %61, align 1 br label %429 @@ -21949,8 +21949,8 @@ define i32 @GetImageColor(ptr noundef readonly byval(%struct.Image) align 8 capt %.tr86 = trunc i16 %39 to i8 %46 = shl i8 %.tr86, 2 %47 = and i8 %46, -8 - %48 = and i8 %.tr86, 1 - %49 = sub nsw i8 0, %48 + %48 = trunc i16 %39 to i1 + %49 = sext i1 %48 to i8 br label %310 50: ; preds = %13 diff --git a/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll b/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll index e1e8c71629c..0cc349a4548 100644 --- a/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll +++ b/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll @@ -61241,16 +61241,14 @@ define hidden noundef range(i8 -1, 2) i8 @_ZN11ruff_linter3fix7cmp_fix17hd45730b %14 = extractvalue { i32, i32 } %13, 0 %15 = extractvalue { i32, i32 } %13, 1 %16 = trunc i32 %11 to i1 - br i1 %16, label %17, label %19 + %17 = trunc i32 %14 to i1 + br i1 %16, label %18, label %19 17: ; preds = %9 - %18 = trunc i32 %14 to i1 - br i1 %18, label %22, label %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit.thread" + br i1 %17, label %20, label %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit.thread" 19: ; preds = %9 - %20 = trunc i32 %14 to i8 - %21 = and i8 %20, 1 - %..i = sub nsw i8 0, %21 + %..i = sext i1 %17 to i8 br label %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit" 22: ; preds = %17 @@ -61258,7 +61256,7 @@ define hidden noundef range(i8 -1, 2) i8 @_ZN11ruff_linter3fix7cmp_fix17hd45730b br label %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit" "_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit": ; preds = %22, %19 - %.sroa.08.0 = phi i8 [ %23, %22 ], [ %..i, %19 ] + %.sroa.08.0 = phi i8 [ %23, %20 ], [ %..i, %19 ] %24 = icmp eq i8 %.sroa.08.0, 0 br i1 %24, label %25, label %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit.thread" @@ -61270,8 +61268,8 @@ define hidden noundef range(i8 -1, 2) i8 @_ZN11ruff_linter3fix7cmp_fix17hd45730b i16 591, label %32 ] -"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit.thread": ; preds = %17, %8, %7, %32, %30, %28, %26, %25, %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit" - %.sroa.08.1 = phi i8 [ %.sroa.08.0, %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit" ], [ 0, %25 ], [ %spec.select, %26 ], [ %spec.select11, %28 ], [ %spec.select12, %30 ], [ %spec.select13, %32 ], [ 1, %17 ], [ 1, %8 ], [ -1, %7 ] +"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit.thread": ; preds = %17, %8, %7, %30, %28, %26, %24, %25, %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit" + %.sroa.08.1 = phi i8 [ %.sroa.08.0, %"_ZN11ruff_linter3fix7cmp_fix28_$u7b$$u7b$closure$u7d$$u7d$17h7bb130e9edc4b1d2E.exit" ], [ 0, %23 ], [ %spec.select, %24 ], [ %spec.select11, %26 ], [ %spec.select12, %28 ], [ %spec.select13, %30 ], [ 1, %18 ], [ 1, %8 ], [ -1, %7 ] ret i8 %.sroa.08.1 26: ; preds = %25 diff --git a/bench/spike/optimized/vmulh_vx.ll b/bench/spike/optimized/vmulh_vx.ll index 87c34cf1411..2f11de57e92 100644 --- a/bench/spike/optimized/vmulh_vx.ll +++ b/bench/spike/optimized/vmulh_vx.ll @@ -301,13 +301,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z19fast_rv32i_vmulh_vxP1 131: ; preds = %130 %132 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %133 = load i64, ptr %116, align 8, !tbaa !149 - %134 = trunc i64 %133 to i16 + %134 = trunc i64 %133 to i8 %135 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %136 = load i8, ptr %135, align 1, !tbaa !150 %137 = sext i8 %136 to i16 - %sext101 = shl i16 %134, 8 - %138 = ashr exact i16 %sext101, 8 - %139 = mul nsw i16 %138, %137 + %138 = sext i8 %134 to i16 + %139 = mul nsw i16 %137, %138 %140 = lshr i16 %139, 8 %141 = trunc nuw i16 %140 to i8 store i8 %141, ptr %132, align 1, !tbaa !150 @@ -316,13 +315,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z19fast_rv32i_vmulh_vxP1 142: ; preds = %130 %143 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %144 = load i64, ptr %116, align 8, !tbaa !149 - %145 = trunc i64 %144 to i32 + %145 = trunc i64 %144 to i16 %146 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %147 = load i16, ptr %146, align 2, !tbaa !151 %148 = sext i16 %147 to i32 - %sext100 = shl i32 %145, 16 - %149 = ashr exact i32 %sext100, 16 - %150 = mul nsw i32 %149, %148 + %149 = sext i16 %145 to i32 + %150 = mul nsw i32 %148, %149 %151 = lshr i32 %150, 16 %152 = trunc nuw i32 %151 to i16 store i16 %152, ptr %143, align 2, !tbaa !151 @@ -710,13 +708,12 @@ define noundef i64 @_Z19fast_rv64i_vmulh_vxP11processor_t6insn_tm(ptr noundef %0 129: ; preds = %128 %130 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %131 = load i64, ptr %116, align 8, !tbaa !149 - %132 = trunc i64 %131 to i16 + %132 = trunc i64 %131 to i8 %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %134 = load i8, ptr %133, align 1, !tbaa !150 %135 = sext i8 %134 to i16 - %sext101 = shl i16 %132, 8 - %136 = ashr exact i16 %sext101, 8 - %137 = mul nsw i16 %136, %135 + %136 = sext i8 %132 to i16 + %137 = mul nsw i16 %135, %136 %138 = lshr i16 %137, 8 %139 = trunc nuw i16 %138 to i8 store i8 %139, ptr %130, align 1, !tbaa !150 @@ -725,13 +722,12 @@ define noundef i64 @_Z19fast_rv64i_vmulh_vxP11processor_t6insn_tm(ptr noundef %0 140: ; preds = %128 %141 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %142 = load i64, ptr %116, align 8, !tbaa !149 - %143 = trunc i64 %142 to i32 + %143 = trunc i64 %142 to i16 %144 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %145 = load i16, ptr %144, align 2, !tbaa !151 %146 = sext i16 %145 to i32 - %sext100 = shl i32 %143, 16 - %147 = ashr exact i32 %sext100, 16 - %148 = mul nsw i32 %147, %146 + %147 = sext i16 %143 to i32 + %148 = mul nsw i32 %146, %147 %149 = lshr i32 %148, 16 %150 = trunc nuw i32 %149 to i16 store i16 %150, ptr %141, align 2, !tbaa !151 @@ -1003,13 +999,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z21logged_rv32i_vmulh_vx 131: ; preds = %130 %132 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %133 = load i64, ptr %116, align 8, !tbaa !149 - %134 = trunc i64 %133 to i16 + %134 = trunc i64 %133 to i8 %135 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %136 = load i8, ptr %135, align 1, !tbaa !150 %137 = sext i8 %136 to i16 - %sext101 = shl i16 %134, 8 - %138 = ashr exact i16 %sext101, 8 - %139 = mul nsw i16 %138, %137 + %138 = sext i8 %134 to i16 + %139 = mul nsw i16 %137, %138 %140 = lshr i16 %139, 8 %141 = trunc nuw i16 %140 to i8 store i8 %141, ptr %132, align 1, !tbaa !150 @@ -1018,13 +1013,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z21logged_rv32i_vmulh_vx 142: ; preds = %130 %143 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %144 = load i64, ptr %116, align 8, !tbaa !149 - %145 = trunc i64 %144 to i32 + %145 = trunc i64 %144 to i16 %146 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %147 = load i16, ptr %146, align 2, !tbaa !151 %148 = sext i16 %147 to i32 - %sext100 = shl i32 %145, 16 - %149 = ashr exact i32 %sext100, 16 - %150 = mul nsw i32 %149, %148 + %149 = sext i16 %145 to i32 + %150 = mul nsw i32 %148, %149 %151 = lshr i32 %150, 16 %152 = trunc nuw i32 %151 to i16 store i16 %152, ptr %143, align 2, !tbaa !151 @@ -1294,13 +1288,12 @@ define noundef i64 @_Z21logged_rv64i_vmulh_vxP11processor_t6insn_tm(ptr noundef 129: ; preds = %128 %130 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %131 = load i64, ptr %116, align 8, !tbaa !149 - %132 = trunc i64 %131 to i16 + %132 = trunc i64 %131 to i8 %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %134 = load i8, ptr %133, align 1, !tbaa !150 %135 = sext i8 %134 to i16 - %sext101 = shl i16 %132, 8 - %136 = ashr exact i16 %sext101, 8 - %137 = mul nsw i16 %136, %135 + %136 = sext i8 %132 to i16 + %137 = mul nsw i16 %135, %136 %138 = lshr i16 %137, 8 %139 = trunc nuw i16 %138 to i8 store i8 %139, ptr %130, align 1, !tbaa !150 @@ -1309,13 +1302,12 @@ define noundef i64 @_Z21logged_rv64i_vmulh_vxP11processor_t6insn_tm(ptr noundef 140: ; preds = %128 %141 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %101, i64 noundef %.094124, i1 noundef zeroext true) %142 = load i64, ptr %116, align 8, !tbaa !149 - %143 = trunc i64 %142 to i32 + %143 = trunc i64 %142 to i16 %144 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.094124, i1 noundef zeroext false) %145 = load i16, ptr %144, align 2, !tbaa !151 %146 = sext i16 %145 to i32 - %sext100 = shl i32 %143, 16 - %147 = ashr exact i32 %sext100, 16 - %148 = mul nsw i32 %147, %146 + %147 = sext i16 %143 to i32 + %148 = mul nsw i32 %146, %147 %149 = lshr i32 %148, 16 %150 = trunc nuw i32 %149 to i16 store i16 %150, ptr %141, align 2, !tbaa !151 @@ -1603,13 +1595,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z19fast_rv32e_vmulh_vxP1 139: ; preds = %132 %140 = load i64, ptr %117, align 8, !tbaa !149 - %141 = trunc i64 %140 to i16 + %141 = trunc i64 %140 to i8 %142 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %143 = load i8, ptr %142, align 1, !tbaa !150 %144 = sext i8 %143 to i16 - %sext111 = shl i16 %141, 8 - %145 = ashr exact i16 %sext111, 8 - %146 = mul nsw i16 %145, %144 + %145 = sext i8 %141 to i16 + %146 = mul nsw i16 %144, %145 %147 = lshr i16 %146, 8 %148 = trunc nuw i16 %147 to i8 store i8 %148, ptr %133, align 1, !tbaa !150 @@ -1633,13 +1624,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z19fast_rv32e_vmulh_vxP1 156: ; preds = %149 %157 = load i64, ptr %117, align 8, !tbaa !149 - %158 = trunc i64 %157 to i32 + %158 = trunc i64 %157 to i16 %159 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %160 = load i16, ptr %159, align 2, !tbaa !151 %161 = sext i16 %160 to i32 - %sext110 = shl i32 %158, 16 - %162 = ashr exact i32 %sext110, 16 - %163 = mul nsw i32 %162, %161 + %162 = sext i16 %158 to i32 + %163 = mul nsw i32 %161, %162 %164 = lshr i32 %163, 16 %165 = trunc nuw i32 %164 to i16 store i16 %165, ptr %150, align 2, !tbaa !151 @@ -1955,13 +1945,12 @@ define noundef i64 @_Z19fast_rv64e_vmulh_vxP11processor_t6insn_tm(ptr noundef %0 137: ; preds = %130 %138 = load i64, ptr %117, align 8, !tbaa !149 - %139 = trunc i64 %138 to i16 + %139 = trunc i64 %138 to i8 %140 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %141 = load i8, ptr %140, align 1, !tbaa !150 %142 = sext i8 %141 to i16 - %sext111 = shl i16 %139, 8 - %143 = ashr exact i16 %sext111, 8 - %144 = mul nsw i16 %143, %142 + %143 = sext i8 %139 to i16 + %144 = mul nsw i16 %142, %143 %145 = lshr i16 %144, 8 %146 = trunc nuw i16 %145 to i8 store i8 %146, ptr %131, align 1, !tbaa !150 @@ -1985,13 +1974,12 @@ define noundef i64 @_Z19fast_rv64e_vmulh_vxP11processor_t6insn_tm(ptr noundef %0 154: ; preds = %147 %155 = load i64, ptr %117, align 8, !tbaa !149 - %156 = trunc i64 %155 to i32 + %156 = trunc i64 %155 to i16 %157 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %158 = load i16, ptr %157, align 2, !tbaa !151 %159 = sext i16 %158 to i32 - %sext110 = shl i32 %156, 16 - %160 = ashr exact i32 %sext110, 16 - %161 = mul nsw i32 %160, %159 + %160 = sext i16 %156 to i32 + %161 = mul nsw i32 %159, %160 %162 = lshr i32 %161, 16 %163 = trunc nuw i32 %162 to i16 store i16 %163, ptr %148, align 2, !tbaa !151 @@ -2309,13 +2297,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z21logged_rv32e_vmulh_vx 139: ; preds = %132 %140 = load i64, ptr %117, align 8, !tbaa !149 - %141 = trunc i64 %140 to i16 + %141 = trunc i64 %140 to i8 %142 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %143 = load i8, ptr %142, align 1, !tbaa !150 %144 = sext i8 %143 to i16 - %sext111 = shl i16 %141, 8 - %145 = ashr exact i16 %sext111, 8 - %146 = mul nsw i16 %145, %144 + %145 = sext i8 %141 to i16 + %146 = mul nsw i16 %144, %145 %147 = lshr i16 %146, 8 %148 = trunc nuw i16 %147 to i8 store i8 %148, ptr %133, align 1, !tbaa !150 @@ -2339,13 +2326,12 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z21logged_rv32e_vmulh_vx 156: ; preds = %149 %157 = load i64, ptr %117, align 8, !tbaa !149 - %158 = trunc i64 %157 to i32 + %158 = trunc i64 %157 to i16 %159 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %160 = load i16, ptr %159, align 2, !tbaa !151 %161 = sext i16 %160 to i32 - %sext110 = shl i32 %158, 16 - %162 = ashr exact i32 %sext110, 16 - %163 = mul nsw i32 %162, %161 + %162 = sext i16 %158 to i32 + %163 = mul nsw i32 %161, %162 %164 = lshr i32 %163, 16 %165 = trunc nuw i32 %164 to i16 store i16 %165, ptr %150, align 2, !tbaa !151 @@ -2661,13 +2647,12 @@ define noundef i64 @_Z21logged_rv64e_vmulh_vxP11processor_t6insn_tm(ptr noundef 137: ; preds = %130 %138 = load i64, ptr %117, align 8, !tbaa !149 - %139 = trunc i64 %138 to i16 + %139 = trunc i64 %138 to i8 %140 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN12vectorUnit_t3eltIaEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %141 = load i8, ptr %140, align 1, !tbaa !150 %142 = sext i8 %141 to i16 - %sext111 = shl i16 %139, 8 - %143 = ashr exact i16 %sext111, 8 - %144 = mul nsw i16 %143, %142 + %143 = sext i8 %139 to i16 + %144 = mul nsw i16 %142, %143 %145 = lshr i16 %144, 8 %146 = trunc nuw i16 %145 to i8 store i8 %146, ptr %131, align 1, !tbaa !150 @@ -2691,13 +2676,12 @@ define noundef i64 @_Z21logged_rv64e_vmulh_vxP11processor_t6insn_tm(ptr noundef 154: ; preds = %147 %155 = load i64, ptr %117, align 8, !tbaa !149 - %156 = trunc i64 %155 to i32 + %156 = trunc i64 %155 to i16 %157 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN12vectorUnit_t3eltIsEERT_mmb(ptr noundef nonnull align 8 dereferenceable(202) %14, i64 noundef %103, i64 noundef %.0103144, i1 noundef zeroext false) %158 = load i16, ptr %157, align 2, !tbaa !151 %159 = sext i16 %158 to i32 - %sext110 = shl i32 %156, 16 - %160 = ashr exact i32 %sext110, 16 - %161 = mul nsw i32 %160, %159 + %160 = sext i16 %156 to i32 + %161 = mul nsw i32 %159, %160 %162 = lshr i32 %161, 16 %163 = trunc nuw i32 %162 to i16 store i16 %163, ptr %148, align 2, !tbaa !151 diff --git a/bench/uv-rs/optimized/f0fhlz8kt73wyd81nep9kme9d.ll b/bench/uv-rs/optimized/f0fhlz8kt73wyd81nep9kme9d.ll index 7d96b1ebb07..551c6fcb1bc 100644 --- a/bench/uv-rs/optimized/f0fhlz8kt73wyd81nep9kme9d.ll +++ b/bench/uv-rs/optimized/f0fhlz8kt73wyd81nep9kme9d.ll @@ -2026,24 +2026,22 @@ _ZN9uv_pep4407version15compare_release17h56ab312ae83a00b2E.exit.thread: ; preds %150 = getelementptr inbounds nuw i8, ptr %7, i64 8 %.val20.i = load i64, ptr %150, align 8, !alias.scope !325, !noalias !322 %trunc.i.i = trunc nuw i64 %.val17.i to i1 - br i1 %trunc.i.i, label %153, label %151 + %trunc1.i.i = trunc nuw i64 %.val19.i to i1 + br i1 %trunc.i.i, label %152, label %151 151: ; preds = %148 - %trunc2.i.i = trunc i64 %.val19.i to i8 - %152 = and i8 %trunc2.i.i, 1 - %..i.i = sub nsw i8 0, %152 + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h71f9b697540bd5f1E.exit.i" 153: ; preds = %148 - %trunc1.i.i = trunc nuw i64 %.val19.i to i1 - br i1 %trunc1.i.i, label %154, label %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" + br i1 %trunc1.i.i, label %153, label %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" 154: ; preds = %153 %155 = call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64 %.val18.i, i64 %.val20.i) br label %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h71f9b697540bd5f1E.exit.i" "_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h71f9b697540bd5f1E.exit.i": ; preds = %154, %151 - %.sroa.0.0.i.i = phi i8 [ %155, %154 ], [ %..i.i, %151 ] + %.sroa.0.0.i.i = phi i8 [ %155, %153 ], [ %..i.i, %151 ] %156 = icmp eq i8 %.sroa.0.0.i.i, 0 br i1 %156, label %157, label %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" @@ -2063,7 +2061,7 @@ _ZN9uv_pep4407version15compare_release17h56ab312ae83a00b2E.exit.thread: ; preds br label %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" "_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit": ; preds = %_ZN9uv_pep4407version15compare_release17h56ab312ae83a00b2E.exit.thread, %143, %153, %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h71f9b697540bd5f1E.exit.i", %157, %162 - %.sroa.0.0.i23 = phi i8 [ %165, %162 ], [ %141, %_ZN9uv_pep4407version15compare_release17h56ab312ae83a00b2E.exit.thread ], [ %146, %143 ], [ %.sroa.0.0.i.i, %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h71f9b697540bd5f1E.exit.i" ], [ %160, %157 ], [ 1, %153 ] + %.sroa.0.0.i23 = phi i8 [ %165, %161 ], [ %141, %_ZN9uv_pep4407version15compare_release17h56ab312ae83a00b2E.exit.thread ], [ %146, %143 ], [ %.sroa.0.0.i.i, %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h71f9b697540bd5f1E.exit.i" ], [ %160, %156 ], [ 1, %152 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %8) br label %167 @@ -2074,7 +2072,7 @@ _ZN9uv_pep4407version15compare_release17h56ab312ae83a00b2E.exit.thread: ; preds br label %167 167: ; preds = %26, %166, %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" - %.sroa.0.1 = phi i8 [ %.sroa.0.0.i22, %166 ], [ %.sroa.0.0.i23, %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" ], [ %27, %26 ] + %.sroa.0.1 = phi i8 [ %.sroa.0.0.i22, %165 ], [ %.sroa.0.0.i23, %"_ZN4core5tuple70_$LT$impl$u20$core..cmp..Ord$u20$for$u20$$LP$X$C$W$C$V$C$U$C$T$RP$$GT$3cmp17h1a85fadd8fafc1d0E.exit" ], [ %27, %26 ] ret i8 %.sroa.0.1 } diff --git a/bench/wasmi-rs/optimized/5u9yytvr2y94asl5o7aafpnhk.ll b/bench/wasmi-rs/optimized/5u9yytvr2y94asl5o7aafpnhk.ll index 80d3bc1c9f3..d9f6001f756 100644 --- a/bench/wasmi-rs/optimized/5u9yytvr2y94asl5o7aafpnhk.ll +++ b/bench/wasmi-rs/optimized/5u9yytvr2y94asl5o7aafpnhk.ll @@ -2435,8 +2435,8 @@ define hidden noundef zeroext i1 @_ZN4core4iter6traits8iterator8Iterator5eq_by17 _ZN4core4iter6traits8iterator8Iterator12try_for_each17hff1a65a5dedb4eafE.exit.thread.i: ; preds = %8 %18 = call { i16, i16 } @"_ZN86_$LT$wasmi_ir..span..RegSpanIter$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9a877a5ee41f9a10E"(ptr noalias noundef nonnull align 2 dereferenceable(4) %5), !noalias !357 %19 = extractvalue { i16, i16 } %18, 0 - %20 = and i16 %19, 1 - %21 = icmp eq i16 %20, 0 + %20 = trunc i16 %19 to i1 + %21 = xor i1 %20, true br label %_ZN4core4iter6traits8iterator12iter_compare17hff974404d4320e84E.exit _ZN4core4iter6traits8iterator12iter_compare17hff974404d4320e84E.exit: ; preds = %11, %_ZN4core4iter6traits8iterator8Iterator12try_for_each17hff1a65a5dedb4eafE.exit.thread.i diff --git a/bench/wasmtime-rs/optimized/3ks7b643ljwe3j81.ll b/bench/wasmtime-rs/optimized/3ks7b643ljwe3j81.ll index 4f41052207e..d3caa0774e3 100644 --- a/bench/wasmtime-rs/optimized/3ks7b643ljwe3j81.ll +++ b/bench/wasmtime-rs/optimized/3ks7b643ljwe3j81.ll @@ -1215,17 +1215,17 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS %.not.i.i.i.i = icmp sgt ptr %6, inttoptr (i64 -4096 to ptr) %8 = icmp slt ptr %6, null %.014.i.i.i.i = and i1 %.not.i.i.i.i, %8 - %.tr = trunc i64 %7 to i32 br i1 %.014.i.i.i.i, label %19, label %9 9: ; preds = %2 - %10 = lshr i32 %.tr, 10 + %.sroa.522.0.extract.trunc = trunc i64 %7 to i32 + %10 = lshr i32 %.sroa.522.0.extract.trunc, 10 %.lobit = and i32 %10, 1 - %11 = and i32 %.tr, 1052672 + %11 = and i32 %.sroa.522.0.extract.trunc, 1052672 %12 = icmp eq i32 %11, 1052672 %13 = or disjoint i32 %.lobit, 2 %storemerge.i24 = select i1 %12, i32 %13, i32 %.lobit - %14 = lshr i32 %.tr, 9 + %14 = lshr i32 %.sroa.522.0.extract.trunc, 9 %15 = and i32 %14, 4 %storemerge.i25 = or disjoint i32 %storemerge.i24, %15 %16 = or disjoint i32 %storemerge.i25, 8 @@ -1238,16 +1238,13 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS br label %28 19: ; preds = %2 - %20 = shl i32 %.tr, 16 - %21 = ashr exact i32 %20, 16 - %22 = sub nsw i32 0, %21 - %23 = sext i32 %22 to i64 - %24 = shl nsw i64 %23, 32 - %25 = or disjoint i64 %24, 2 - %26 = inttoptr i64 %25 to ptr - %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %26, ptr %27, align 8 - br label %28 + %20 = shl i64 %7, 48 + %21 = ashr exact i64 %20, 16 + %22 = sub nsw i64 2, %21 + %23 = inttoptr i64 %22 to ptr + %23 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %22, ptr %23, align 8 + br label %24 28: ; preds = %19, %9 %storemerge = phi i32 [ 1, %19 ], [ 0, %9 ] @@ -1268,17 +1265,17 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS %.not.i.i.i.i = icmp sgt ptr %7, inttoptr (i64 -4096 to ptr) %9 = icmp slt ptr %7, null %.014.i.i.i.i = and i1 %.not.i.i.i.i, %9 - %.tr = trunc i64 %8 to i32 br i1 %.014.i.i.i.i, label %20, label %10 10: ; preds = %2 - %11 = lshr i32 %.tr, 10 + %.sroa.522.0.extract.trunc = trunc i64 %8 to i32 + %11 = lshr i32 %.sroa.522.0.extract.trunc, 10 %.lobit = and i32 %11, 1 - %12 = and i32 %.tr, 1052672 + %12 = and i32 %.sroa.522.0.extract.trunc, 1052672 %13 = icmp eq i32 %12, 1052672 %14 = or disjoint i32 %.lobit, 2 %storemerge.i24 = select i1 %13, i32 %14, i32 %.lobit - %15 = lshr i32 %.tr, 9 + %15 = lshr i32 %.sroa.522.0.extract.trunc, 9 %16 = and i32 %15, 4 %storemerge.i25 = or disjoint i32 %storemerge.i24, %16 %17 = or disjoint i32 %storemerge.i25, 8 @@ -1291,16 +1288,13 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS br label %29 20: ; preds = %2 - %21 = shl i32 %.tr, 16 - %22 = ashr exact i32 %21, 16 - %23 = sub nsw i32 0, %22 - %24 = sext i32 %23 to i64 - %25 = shl nsw i64 %24, 32 - %26 = or disjoint i64 %25, 2 - %27 = inttoptr i64 %26 to ptr - %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %27, ptr %28, align 8 - br label %29 + %21 = shl i64 %8, 48 + %22 = ashr exact i64 %21, 16 + %23 = sub nsw i64 2, %22 + %23 = inttoptr i64 %23 to ptr + %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %23, ptr %24, align 8 + br label %25 29: ; preds = %20, %10 %storemerge = phi i32 [ 1, %20 ], [ 0, %10 ] @@ -1321,17 +1315,17 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS %.not.i.i.i.i = icmp sgt ptr %7, inttoptr (i64 -4096 to ptr) %9 = icmp slt ptr %7, null %.014.i.i.i.i = and i1 %.not.i.i.i.i, %9 - %.tr = trunc i64 %8 to i32 br i1 %.014.i.i.i.i, label %20, label %10 10: ; preds = %2 - %11 = lshr i32 %.tr, 10 + %.sroa.522.0.extract.trunc = trunc i64 %8 to i32 + %11 = lshr i32 %.sroa.522.0.extract.trunc, 10 %.lobit = and i32 %11, 1 - %12 = and i32 %.tr, 1052672 + %12 = and i32 %.sroa.522.0.extract.trunc, 1052672 %13 = icmp eq i32 %12, 1052672 %14 = or disjoint i32 %.lobit, 2 %storemerge.i24 = select i1 %13, i32 %14, i32 %.lobit - %15 = lshr i32 %.tr, 9 + %15 = lshr i32 %.sroa.522.0.extract.trunc, 9 %16 = and i32 %15, 4 %storemerge.i25 = or disjoint i32 %storemerge.i24, %16 %17 = or disjoint i32 %storemerge.i25, 8 @@ -1344,16 +1338,13 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS br label %29 20: ; preds = %2 - %21 = shl i32 %.tr, 16 - %22 = ashr exact i32 %21, 16 - %23 = sub nsw i32 0, %22 - %24 = sext i32 %23 to i64 - %25 = shl nsw i64 %24, 32 - %26 = or disjoint i64 %25, 2 - %27 = inttoptr i64 %26 to ptr - %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %27, ptr %28, align 8 - br label %29 + %21 = shl i64 %8, 48 + %22 = ashr exact i64 %21, 16 + %23 = sub nsw i64 2, %22 + %23 = inttoptr i64 %23 to ptr + %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %23, ptr %24, align 8 + br label %25 29: ; preds = %20, %10 %storemerge = phi i32 [ 1, %20 ], [ 0, %10 ] @@ -1374,17 +1365,17 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS %.not.i.i.i.i = icmp sgt ptr %7, inttoptr (i64 -4096 to ptr) %9 = icmp slt ptr %7, null %.014.i.i.i.i = and i1 %.not.i.i.i.i, %9 - %.tr = trunc i64 %8 to i32 br i1 %.014.i.i.i.i, label %20, label %10 10: ; preds = %2 - %11 = lshr i32 %.tr, 10 + %.sroa.522.0.extract.trunc = trunc i64 %8 to i32 + %11 = lshr i32 %.sroa.522.0.extract.trunc, 10 %.lobit = and i32 %11, 1 - %12 = and i32 %.tr, 1052672 + %12 = and i32 %.sroa.522.0.extract.trunc, 1052672 %13 = icmp eq i32 %12, 1052672 %14 = or disjoint i32 %.lobit, 2 %storemerge.i24 = select i1 %13, i32 %14, i32 %.lobit - %15 = lshr i32 %.tr, 9 + %15 = lshr i32 %.sroa.522.0.extract.trunc, 9 %16 = and i32 %15, 4 %storemerge.i25 = or disjoint i32 %storemerge.i24, %16 %17 = or disjoint i32 %storemerge.i25, 8 @@ -1397,16 +1388,13 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS br label %29 20: ; preds = %2 - %21 = shl i32 %.tr, 16 - %22 = ashr exact i32 %21, 16 - %23 = sub nsw i32 0, %22 - %24 = sext i32 %23 to i64 - %25 = shl nsw i64 %24, 32 - %26 = or disjoint i64 %25, 2 - %27 = inttoptr i64 %26 to ptr - %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %27, ptr %28, align 8 - br label %29 + %21 = shl i64 %8, 48 + %22 = ashr exact i64 %21, 16 + %23 = sub nsw i64 2, %22 + %23 = inttoptr i64 %23 to ptr + %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %23, ptr %24, align 8 + br label %25 29: ; preds = %20, %10 %storemerge = phi i32 [ 1, %20 ], [ 0, %10 ] @@ -1427,17 +1415,17 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS %.not.i.i.i.i = icmp sgt ptr %7, inttoptr (i64 -4096 to ptr) %9 = icmp slt ptr %7, null %.014.i.i.i.i = and i1 %.not.i.i.i.i, %9 - %.tr = trunc i64 %8 to i32 br i1 %.014.i.i.i.i, label %20, label %10 10: ; preds = %2 - %11 = lshr i32 %.tr, 10 + %.sroa.522.0.extract.trunc = trunc i64 %8 to i32 + %11 = lshr i32 %.sroa.522.0.extract.trunc, 10 %.lobit = and i32 %11, 1 - %12 = and i32 %.tr, 1052672 + %12 = and i32 %.sroa.522.0.extract.trunc, 1052672 %13 = icmp eq i32 %12, 1052672 %14 = or disjoint i32 %.lobit, 2 %storemerge.i24 = select i1 %13, i32 %14, i32 %.lobit - %15 = lshr i32 %.tr, 9 + %15 = lshr i32 %.sroa.522.0.extract.trunc, 9 %16 = and i32 %15, 4 %storemerge.i25 = or disjoint i32 %storemerge.i24, %16 %17 = or disjoint i32 %storemerge.i25, 8 @@ -1450,16 +1438,13 @@ define hidden void @"_ZN67_$LT$T$u20$as$u20$system_interface..fs..fd_flags..GetS br label %29 20: ; preds = %2 - %21 = shl i32 %.tr, 16 - %22 = ashr exact i32 %21, 16 - %23 = sub nsw i32 0, %22 - %24 = sext i32 %23 to i64 - %25 = shl nsw i64 %24, 32 - %26 = or disjoint i64 %25, 2 - %27 = inttoptr i64 %26 to ptr - %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %27, ptr %28, align 8 - br label %29 + %21 = shl i64 %8, 48 + %22 = ashr exact i64 %21, 16 + %23 = sub nsw i64 2, %22 + %23 = inttoptr i64 %23 to ptr + %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %23, ptr %24, align 8 + br label %25 29: ; preds = %20, %10 %storemerge = phi i32 [ 1, %20 ], [ 0, %10 ] diff --git a/bench/wireshark/optimized/packet-dbus.ll b/bench/wireshark/optimized/packet-dbus.ll index d6593a7306a..e78ccb0634c 100644 --- a/bench/wireshark/optimized/packet-dbus.ll +++ b/bench/wireshark/optimized/packet-dbus.ll @@ -3011,13 +3011,12 @@ define internal fastcc zeroext i1 @is_dbus_signature_valid(ptr noundef nonnull r br i1 %.not2, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %1, %30 - %4 = phi i8 [ %31, %30 ], [ %3, %1 ] - %.0205 = phi ptr [ %5, %30 ], [ %0, %1 ] - %.0214 = phi i8 [ %4, %30 ], [ 0, %1 ] - %.0223 = phi i64 [ %7, %30 ], [ 0, %1 ] + %4 = phi i8 [ %31, %28 ], [ %3, %1 ] + %.0205 = phi ptr [ %5, %28 ], [ %0, %1 ] + %.0214 = phi i8 [ %4, %28 ], [ 0, %1 ] + %.0223 = phi i64 [ %6, %28 ], [ 0, %1 ] %5 = getelementptr i8, ptr %.0205, i64 1 - %6 = sext i8 %4 to i32 - %7 = add nuw nsw i64 %.0223, 1 + %6 = add nuw nsw i64 %.0223, 1 %exitcond = icmp eq i64 %.0223, 254 br i1 %exitcond, label %is_basic_type.exit, label %8 @@ -3046,7 +3045,7 @@ define internal fastcc zeroext i1 @is_dbus_signature_valid(ptr noundef nonnull r 9: ; preds = %8 %10 = load i8, ptr %5, align 1 - switch i8 %10, label %30 [ + switch i8 %10, label %28 [ i8 0, label %is_basic_type.exit i8 41, label %is_basic_type.exit i8 125, label %is_basic_type.exit @@ -3098,14 +3097,12 @@ define internal fastcc zeroext i1 @is_dbus_signature_valid(ptr noundef nonnull r 25: ; preds = %22 %26 = tail call ptr @wmem_stack_pop(ptr noundef %2) %27 = ptrtoint ptr %26 to i64 - %28 = trunc i64 %27 to i32 - %sext = shl i32 %28, 24 - %29 = ashr exact i32 %sext, 24 - %.not26 = icmp eq i32 %29, %6 + %28 = trunc i64 %27 to i8 + %.not26 = icmp eq i8 %4, %28 br i1 %.not26, label %thread-pre-split, label %is_basic_type.exit thread-pre-split.sink.split: ; preds = %20, %11 - %.sink = phi ptr [ inttoptr (i64 41 to ptr), %11 ], [ inttoptr (i64 125 to ptr), %20 ] + %.sink = phi ptr [ inttoptr (i64 41 to ptr), %10 ], [ inttoptr (i64 125 to ptr), %19 ] tail call void @wmem_list_prepend(ptr noundef %2, ptr noundef nonnull %.sink) br label %thread-pre-split @@ -3114,7 +3111,7 @@ thread-pre-split: ; preds = %thread-pre-split.si br label %30 30: ; preds = %thread-pre-split, %9 - %31 = phi i8 [ %.pr, %thread-pre-split ], [ %10, %9 ] + %31 = phi i8 [ %.pr, %thread-pre-split ], [ %10, %8 ] %.not = icmp eq i8 %31, 0 br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !19 @@ -3124,7 +3121,7 @@ thread-pre-split: ; preds = %thread-pre-split.si br label %is_basic_type.exit is_basic_type.exit: ; preds = %15, %8, %22, %25, %20, %17, %14, %11, %9, %9, %9, %.lr.ph, %._crit_edge - %.1 = phi i1 [ %33, %._crit_edge ], [ false, %.lr.ph ], [ false, %9 ], [ false, %9 ], [ false, %9 ], [ false, %11 ], [ false, %14 ], [ false, %17 ], [ false, %20 ], [ false, %25 ], [ false, %22 ], [ false, %8 ], [ false, %15 ] + %.1 = phi i1 [ %33, %._crit_edge ], [ false, %.lr.ph ], [ false, %8 ], [ false, %8 ], [ false, %8 ], [ false, %10 ], [ false, %13 ], [ false, %16 ], [ false, %19 ], [ false, %24 ], [ false, %21 ], [ false, %7 ], [ false, %14 ] ret i1 %.1 } diff --git a/bench/wireshark/optimized/packet-dcerpc-spoolss.ll b/bench/wireshark/optimized/packet-dcerpc-spoolss.ll index b25403b6483..925080a6f9e 100644 --- a/bench/wireshark/optimized/packet-dcerpc-spoolss.ll +++ b/bench/wireshark/optimized/packet-dcerpc-spoolss.ll @@ -3246,13 +3246,12 @@ define internal i32 @SpoolssEnumPrinters_r(ptr noundef %0, i32 noundef %1, ptr n %12 = getelementptr inbounds nuw i8, ptr %11, i64 72 %13 = load ptr, ptr %12, align 8 %14 = ptrtoint ptr %13 to i64 - %15 = trunc i64 %14 to i32 + %15 = trunc i64 %14 to i16 call void @llvm.lifetime.start.p0(ptr nonnull %8) call void @llvm.lifetime.start.p0(ptr nonnull %9) %16 = getelementptr inbounds nuw i8, ptr %2, i64 8 %17 = load ptr, ptr %16, align 8 - %sext = shl i32 %15, 16 - %18 = ashr exact i32 %sext, 16 + %18 = sext i16 %15 to i32 tail call void (ptr, i32, ptr, ...) @col_append_fstr(ptr noundef %17, i32 noundef 25, ptr noundef nonnull @.str.1227, i32 noundef %18) call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, i8 noundef 0, i64 noundef 24, i1 noundef false) #6 %19 = getelementptr inbounds nuw i8, ptr %4, i64 88 @@ -3267,13 +3266,13 @@ define internal i32 @SpoolssEnumPrinters_r(ptr noundef %0, i32 noundef %1, ptr n %24 = load ptr, ptr %23, align 8 %25 = load i32, ptr @ett_PRINTER_INFO, align 4 %26 = call ptr (ptr, ptr, i32, i32, i32, ptr, ptr, ...) @proto_tree_add_subtree_format(ptr noundef %24, ptr noundef nonnull %21, i32 noundef 0, i32 noundef -1, i32 noundef %25, ptr noundef nonnull %9, ptr noundef nonnull @.str.1229, i32 noundef %18) - switch i32 %18, label %54 [ - i32 0, label %27 - i32 1, label %29 - i32 2, label %39 - i32 3, label %41 - i32 5, label %46 - i32 7, label %48 + switch i16 %15, label %54 [ + i16 0, label %27 + i16 1, label %29 + i16 2, label %39 + i16 3, label %41 + i16 5, label %46 + i16 7, label %48 ] 27: ; preds = %22 @@ -3536,20 +3535,19 @@ define internal i32 @SpoolssEnumJobs_r(ptr noundef %0, i32 noundef %1, ptr nound .lr.ph: ; preds = %6 %25 = ptrtoint ptr %17 to i64 - %26 = trunc i64 %25 to i32 - %sext = shl i32 %26, 16 - %27 = ashr exact i32 %sext, 16 - %28 = getelementptr inbounds nuw i8, ptr %12, i64 8 - switch i32 %27, label %.lr.ph.split [ - i32 1, label %.lr.ph.split.us - i32 2, label %.lr.ph.split.us42 + %26 = trunc i64 %25 to i16 + %27 = getelementptr inbounds nuw i8, ptr %12, i64 8 + %28 = sext i16 %26 to i32 + switch i16 %26, label %.lr.ph.split [ + i16 1, label %.lr.ph.split.us + i16 2, label %.lr.ph.split.us42 ] .lr.ph.split.us: ; preds = %.lr.ph, %.lr.ph.split.us %.041.us = phi i32 [ %31, %.lr.ph.split.us ], [ 0, %.lr.ph ] %.03940.us = phi i32 [ %32, %.lr.ph.split.us ], [ 0, %.lr.ph ] %29 = load ptr, ptr %12, align 8 - %30 = load ptr, ptr %28, align 8 + %30 = load ptr, ptr %27, align 8 %31 = call fastcc i32 @dissect_spoolss_JOB_INFO_1(ptr noundef %29, i32 noundef %.041.us, ptr noundef %2, ptr noundef %30, ptr noundef %4, ptr noundef %5) %32 = add nuw i32 %.03940.us, 1 %33 = load i32, ptr %13, align 4 @@ -3560,7 +3558,7 @@ define internal i32 @SpoolssEnumJobs_r(ptr noundef %0, i32 noundef %1, ptr nound %.041.us43 = phi i32 [ %96, %.lr.ph.split.us42 ], [ 0, %.lr.ph ] %.03940.us44 = phi i32 [ %99, %.lr.ph.split.us42 ], [ 0, %.lr.ph ] %35 = load ptr, ptr %12, align 8 - %36 = load ptr, ptr %28, align 8 + %36 = load ptr, ptr %27, align 8 call void @llvm.lifetime.start.p0(ptr nonnull %8) call void @llvm.lifetime.start.p0(ptr nonnull %9) call void @llvm.lifetime.start.p0(ptr nonnull %10) @@ -3642,9 +3640,9 @@ define internal i32 @SpoolssEnumJobs_r(ptr noundef %0, i32 noundef %1, ptr nound .lr.ph.split: ; preds = %.lr.ph, %.lr.ph.split %.03940 = phi i32 [ %105, %.lr.ph.split ], [ 0, %.lr.ph ] - %102 = load ptr, ptr %28, align 8 + %102 = load ptr, ptr %27, align 8 %103 = load ptr, ptr %12, align 8 - %104 = call ptr (ptr, ptr, ptr, ptr, i32, i32, ptr, ...) @proto_tree_add_expert_format(ptr noundef %102, ptr noundef %2, ptr noundef nonnull @ei_job_info_level, ptr noundef %103, i32 noundef 0, i32 noundef -1, ptr noundef nonnull @.str.1233, i32 noundef %27) + %104 = call ptr (ptr, ptr, ptr, ptr, i32, i32, ptr, ...) @proto_tree_add_expert_format(ptr noundef %102, ptr noundef %2, ptr noundef nonnull @ei_job_info_level, ptr noundef %103, i32 noundef 0, i32 noundef -1, ptr noundef nonnull @.str.1233, i32 noundef %28) %105 = add nuw i32 %.03940, 1 %106 = load i32, ptr %13, align 4 %107 = icmp ult i32 %105, %106 @@ -3749,13 +3747,12 @@ define internal i32 @SpoolssGetPrinter_r(ptr noundef %0, i32 noundef %1, ptr nou %11 = getelementptr inbounds nuw i8, ptr %10, i64 72 %12 = load ptr, ptr %11, align 8 %13 = ptrtoint ptr %12 to i64 - %14 = trunc i64 %13 to i32 + %14 = trunc i64 %13 to i16 call void @llvm.lifetime.start.p0(ptr nonnull %8) store ptr null, ptr %8, align 8 %15 = getelementptr inbounds nuw i8, ptr %2, i64 8 %16 = load ptr, ptr %15, align 8 - %sext = shl i32 %14, 16 - %17 = ashr exact i32 %sext, 16 + %17 = sext i16 %14 to i32 tail call void (ptr, i32, ptr, ...) @col_append_fstr(ptr noundef %16, i32 noundef 25, ptr noundef nonnull @.str.1227, i32 noundef %17) call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 noundef 0, i64 noundef 24, i1 noundef false) #6 %18 = getelementptr inbounds nuw i8, ptr %4, i64 88 @@ -3770,13 +3767,13 @@ define internal i32 @SpoolssGetPrinter_r(ptr noundef %0, i32 noundef %1, ptr nou %23 = load ptr, ptr %22, align 8 %24 = load i32, ptr @ett_PRINTER_INFO, align 4 %25 = call ptr (ptr, ptr, i32, i32, i32, ptr, ptr, ...) @proto_tree_add_subtree_format(ptr noundef %23, ptr noundef nonnull %20, i32 noundef 0, i32 noundef -1, i32 noundef %24, ptr noundef nonnull %8, ptr noundef nonnull @.str.1229, i32 noundef %17) - switch i32 %17, label %53 [ - i32 0, label %26 - i32 1, label %28 - i32 2, label %38 - i32 3, label %40 - i32 5, label %45 - i32 7, label %47 + switch i16 %14, label %53 [ + i16 0, label %26 + i16 1, label %28 + i16 2, label %38 + i16 3, label %40 + i16 5, label %45 + i16 7, label %47 ] 26: ; preds = %21 diff --git a/bench/wireshark/optimized/packet-thrift.ll b/bench/wireshark/optimized/packet-thrift.ll index 46806b4bd75..d28945a4e64 100644 --- a/bench/wireshark/optimized/packet-thrift.ll +++ b/bench/wireshark/optimized/packet-thrift.ll @@ -3551,9 +3551,8 @@ thrift_get_varint_enc.exit.thread: ; preds = %13, %16, %8 57: ; preds = %53 %58 = load i32, ptr %3, align 4 %59 = load i64, ptr %9, align 8 - %60 = trunc i64 %59 to i32 - %sext = shl i32 %60, 16 - %61 = ashr exact i32 %sext, 16 + %60 = trunc i64 %59 to i16 + %61 = sext i16 %60 to i32 %62 = call ptr @proto_tree_add_int(ptr noundef %2, i32 noundef %6, ptr noundef %0, i32 noundef %58, i32 noundef %15, i32 noundef %61) br label %136 @@ -3881,7 +3880,7 @@ thrift_get_varint_enc.exit: ; preds = %52 %102 = add i32 %101, %.sink238 store i32 %102, ptr %3, align 4 %.not193 = icmp eq ptr %2, null - br i1 %.not193, label %223, label %112 + br i1 %.not193, label %224, label %112 .thread212: ; preds = %44 %103 = lshr i32 %32, 4 @@ -3900,7 +3899,7 @@ thrift_get_varint_enc.exit: ; preds = %52 br i1 %.not193214, label %239, label %112 112: ; preds = %.thread212, %100 - %.0175215 = phi i1 [ false, %.thread212 ], [ true, %100 ] + %.0175215 = phi i1 [ false, %.thread211 ], [ true, %100 ] %113 = load i32, ptr @proto_thrift, align 4 %114 = call i32 @p_get_proto_depth(ptr noundef %1, i32 noundef %113) %115 = getelementptr inbounds nuw i8, ptr %4, i64 48 @@ -4004,7 +4003,7 @@ proto_item_set_generated.exit: ; preds = %159, %156, %150, %1 %176 = call ptr @proto_tree_add_item(ptr noundef %167, i32 noundef %173, ptr noundef %0, i32 noundef %175, i32 noundef %170, i32 noundef 0) %177 = getelementptr inbounds nuw i8, ptr %5, i64 32 store ptr %176, ptr %177, align 8 - br label %proto_item_set_generated.exit202 + br label %proto_item_set_generated.exit201 178: ; preds = %168 %179 = getelementptr inbounds nuw i8, ptr %5, i64 16 @@ -4029,84 +4028,85 @@ proto_item_set_generated.exit: ; preds = %159, %156, %150, %1 store ptr %191, ptr %192, align 8 %193 = call ptr @expert_add_info(ptr noundef %1, ptr noundef %191, ptr noundef nonnull @ei_thrift_varint_too_large) %.pre220 = load ptr, ptr %192, align 8 - br label %199 + br label %200 194: ; preds = %182 %195 = load i32, ptr @hf_thrift_fid, align 4 - %196 = trunc nsw i64 %183 to i32 - %197 = call ptr @proto_tree_add_int(ptr noundef %167, i32 noundef %195, ptr noundef %0, i32 noundef %186, i32 noundef %188, i32 noundef %196) - %198 = getelementptr inbounds nuw i8, ptr %5, i64 32 - store ptr %197, ptr %198, align 8 - br label %199 - -199: ; preds = %194, %189 - %200 = phi ptr [ %197, %194 ], [ %.pre220, %189 ] - %.not.i200 = icmp eq ptr %200, null - br i1 %.not.i200, label %proto_item_set_generated.exit202, label %201 - -201: ; preds = %199 - %202 = getelementptr inbounds nuw i8, ptr %200, i64 40 - %203 = load ptr, ptr %202, align 8 - %.not5.i201 = icmp eq ptr %203, null - br i1 %.not5.i201, label %proto_item_set_generated.exit202, label %204 - -204: ; preds = %201 - %205 = getelementptr inbounds nuw i8, ptr %203, i64 28 - %206 = load i32, ptr %205, align 4 - %207 = or i32 %206, 2 - store i32 %207, ptr %205, align 4 - br label %proto_item_set_generated.exit202 - -proto_item_set_generated.exit202: ; preds = %204, %201, %199, %172 - %208 = load i64, ptr %125, align 8 - %209 = getelementptr inbounds nuw i8, ptr %4, i64 24 - %210 = load i64, ptr %209, align 8 - %211 = icmp slt i64 %208, %210 - br i1 %211, label %214, label %212 - -212: ; preds = %proto_item_set_generated.exit202 - %213 = icmp ne i64 %208, %210 - %.not197 = icmp eq i64 %210, 0 - %or.cond198 = or i1 %213, %.not197 - br i1 %or.cond198, label %proto_item_set_generated.exit205, label %.thread - -214: ; preds = %proto_item_set_generated.exit202 - %215 = icmp eq i64 %210, 0 - br i1 %215, label %216, label %.thread - -216: ; preds = %214 - %217 = getelementptr inbounds nuw i8, ptr %5, i64 32 - %218 = load ptr, ptr %217, align 8 - %219 = call ptr @expert_add_info(ptr noundef %1, ptr noundef %218, ptr noundef nonnull @ei_thrift_negative_field_id) - br label %proto_item_set_generated.exit205 - -.thread: ; preds = %212, %214 - %220 = getelementptr inbounds nuw i8, ptr %5, i64 32 - %221 = load ptr, ptr %220, align 8 - %222 = call ptr @expert_add_info(ptr noundef %1, ptr noundef %221, ptr noundef nonnull @ei_thrift_unordered_field_id) - br label %proto_item_set_generated.exit205 - -223: ; preds = %100 - %224 = getelementptr inbounds nuw i8, ptr %5, i64 20 - %225 = load i32, ptr %224, align 4 - %226 = icmp sgt i32 %225, 0 - br i1 %226, label %227, label %235 - -227: ; preds = %223 - %228 = getelementptr inbounds nuw i8, ptr %5, i64 40 - %229 = load ptr, ptr %228, align 8 - %230 = load i32, ptr @hf_thrift_fid, align 4 - %231 = getelementptr inbounds nuw i8, ptr %5, i64 16 - %232 = load i32, ptr %231, align 8 - %233 = call ptr @proto_tree_add_item(ptr noundef %229, i32 noundef %230, ptr noundef %0, i32 noundef %232, i32 noundef %225, i32 noundef 0) - %234 = getelementptr inbounds nuw i8, ptr %5, i64 32 - store ptr %233, ptr %234, align 8 - br label %proto_item_set_generated.exit205 - -235: ; preds = %223 - %236 = getelementptr inbounds nuw i8, ptr %5, i64 16 - %237 = load i32, ptr %236, align 8 - %238 = call ptr @proto_tree_add_expert(ptr noundef null, ptr noundef %1, ptr noundef nonnull @ei_thrift_varint_too_large, ptr noundef %0, i32 noundef %237, i32 noundef 3) + %196 = trunc nsw i64 %183 to i16 + %197 = sext i16 %196 to i32 + %198 = call ptr @proto_tree_add_int(ptr noundef %167, i32 noundef %195, ptr noundef %0, i32 noundef %186, i32 noundef %188, i32 noundef %197) + %199 = getelementptr inbounds nuw i8, ptr %5, i64 32 + store ptr %198, ptr %199, align 8 + br label %200 + +200: ; preds = %194, %189 + %201 = phi ptr [ %198, %194 ], [ %.pre220, %189 ] + %.not.i199 = icmp eq ptr %201, null + br i1 %.not.i199, label %proto_item_set_generated.exit201, label %202 + +202: ; preds = %200 + %203 = getelementptr inbounds nuw i8, ptr %201, i64 40 + %204 = load ptr, ptr %203, align 8 + %.not5.i200 = icmp eq ptr %204, null + br i1 %.not5.i200, label %proto_item_set_generated.exit201, label %205 + +205: ; preds = %202 + %206 = getelementptr inbounds nuw i8, ptr %204, i64 28 + %207 = load i32, ptr %206, align 4 + %208 = or i32 %207, 2 + store i32 %208, ptr %206, align 4 + br label %proto_item_set_generated.exit201 + +proto_item_set_generated.exit201:; preds = %205, %202, %200, %172 + %209 = load i64, ptr %125, align 8 + %210 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %211 = load i64, ptr %210, align 8 + %212 = icmp slt i64 %209, %211 + br i1 %212, label %215, label %213 + +213:; preds = %proto_item_set_generated.exit201 + %.not197 = icmp ne i64 %209, %211 + %.not196 = icmp eq i64 %211, 0 + %or.cond197 = or i1 %214, %.not196 + br i1 %or.cond197, label %proto_item_set_generated.exit204, label %.thread + +215:; preds = %proto_item_set_generated.exit201 + %216 = icmp eq i64 %211, 0 + br i1 %216, label %217, label %.thread + +217: ; preds = %215 + %218 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %219 = load ptr, ptr %218, align 8 + %220 = call ptr @expert_add_info(ptr noundef %1, ptr noundef %219, ptr noundef nonnull @ei_thrift_negative_field_id) + br label %proto_item_set_generated.exit204 + +.thread:; preds = %213, %215 + %221 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %222 = load ptr, ptr %221, align 8 + %223 = call ptr @expert_add_info(ptr noundef %1, ptr noundef %222, ptr noundef nonnull @ei_thrift_unordered_field_id) + br label %proto_item_set_generated.exit204 + +224: ; preds = %100 + %225 = getelementptr inbounds nuw i8, ptr %5, i64 20 + %226 = load i32, ptr %225, align 4 + %227 = icmp sgt i32 %226, 0 + br i1 %227, label %228, label %236 + +228: ; preds = %224 + %229 = getelementptr inbounds nuw i8, ptr %5, i64 40 + %230 = load ptr, ptr %229, align 8 + %231 = load i32, ptr @hf_thrift_fid, align 4 + %232 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %233 = load i32, ptr %232, align 8 + %234 = call ptr @proto_tree_add_item(ptr noundef %230, i32 noundef %231, ptr noundef %0, i32 noundef %233, i32 noundef %226, i32 noundef 0) + %235 = getelementptr inbounds nuw i8, ptr %5, i64 32 + store ptr %234, ptr %235, align 8 + br label %proto_item_set_generated.exit204 + +236: ; preds = %224 + %237 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %238 = load i32, ptr %237, align 8 + %239 = call ptr @proto_tree_add_expert(ptr noundef null, ptr noundef %1, ptr noundef nonnull @ei_thrift_varint_too_large, ptr noundef %0, i32 noundef %238, i32 noundef 3) br label %.critedge 239: ; preds = %.thread212 @@ -4123,40 +4123,41 @@ proto_item_set_generated.exit202: ; preds = %204, %201, %199, %1 store ptr %245, ptr %246, align 8 %247 = tail call ptr @expert_add_info(ptr noundef %1, ptr noundef %245, ptr noundef nonnull @ei_thrift_varint_too_large) %.pre = load ptr, ptr %246, align 8 - br label %253 + br label %255 248: ; preds = %239 %249 = load i32, ptr @hf_thrift_fid, align 4 - %250 = trunc nsw i64 %107 to i32 - %251 = tail call ptr @proto_tree_add_int(ptr noundef %242, i32 noundef %249, ptr noundef %0, i32 noundef %109, i32 noundef 1, i32 noundef %250) - %252 = getelementptr inbounds nuw i8, ptr %5, i64 32 - store ptr %251, ptr %252, align 8 - br label %253 - -253: ; preds = %248, %243 - %254 = phi ptr [ %251, %248 ], [ %.pre, %243 ] - %.not.i203 = icmp eq ptr %254, null - br i1 %.not.i203, label %proto_item_set_generated.exit205, label %255 - -255: ; preds = %253 - %256 = getelementptr inbounds nuw i8, ptr %254, i64 40 - %257 = load ptr, ptr %256, align 8 - %.not5.i204 = icmp eq ptr %257, null - br i1 %.not5.i204, label %proto_item_set_generated.exit205, label %258 - -258: ; preds = %255 - %259 = getelementptr inbounds nuw i8, ptr %257, i64 28 - %260 = load i32, ptr %259, align 4 - %261 = or i32 %260, 2 - store i32 %261, ptr %259, align 4 - br label %proto_item_set_generated.exit205 - -proto_item_set_generated.exit205: ; preds = %258, %255, %253, %216, %.thread, %212, %227 - %262 = load i32, ptr %3, align 4 + %250 = trunc nsw i64 %107 to i16 + %252 = sext i16 %249 to i32 + %253 = tail call ptr @proto_tree_add_int(ptr noundef %243, i32 noundef %250, ptr noundef %0, i32 noundef %109, i32 noundef 1, i32 noundef %252) + %254 = getelementptr inbounds nuw i8, ptr %5, i64 32 + store ptr %253, ptr %254, align 8 + br label %255 + +255: ; preds = %248, %243 + %256 = phi ptr [ %253, %249 ], [ %.pre, %244 ] + %.not.i202 = icmp eq ptr %256, null + br i1 %.not.i202, label %proto_item_set_generated.exit204, label %257 + +257: ; preds = %255 + %258 = getelementptr inbounds nuw i8, ptr %256, i64 40 + %259 = load ptr, ptr %258, align 8 + %.not5.i203 = icmp eq ptr %259, null + br i1 %.not5.i203, label %proto_item_set_generated.exit204, label %260 + +260: ; preds = %257 + %261 = getelementptr inbounds nuw i8, ptr %259, i64 28 + %262 = load i32, ptr %261, align 4 + %263 = or i32 %262, 2 + store i32 %263, ptr %261, align 4 + br label %proto_item_set_generated.exit204 + +proto_item_set_generated.exit204:; preds = %260, %257, %255, %217, %.thread, %213, %228 + %264 = load i32, ptr %3, align 4 br label %.critedge -.critedge: ; preds = %117, %178, %62, %proto_item_set_generated.exit205, %235, %88, %72, %34 - %.1 = phi i32 [ %39, %34 ], [ -1, %72 ], [ %262, %proto_item_set_generated.exit205 ], [ -1, %235 ], [ -1, %88 ], [ -1, %62 ], [ -1, %178 ], [ -1, %117 ] +.critedge: ; preds = %117, %178, %62, %proto_item_set_generated.exit204, %236, %88, %72, %34 + %.1 = phi i32 [ %39, %34 ], [ -1, %72 ], [ %264, %proto_item_set_generated.exit204 ], [ -1, %236 ], [ -1, %88 ], [ -1, %62 ], [ -1, %178 ], [ -1, %117 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) br label %263 diff --git a/bench/wireshark/optimized/packet-umts_rlc.ll b/bench/wireshark/optimized/packet-umts_rlc.ll index 09d682840c8..3252b9de5b9 100644 --- a/bench/wireshark/optimized/packet-umts_rlc.ll +++ b/bench/wireshark/optimized/packet-umts_rlc.ll @@ -3571,37 +3571,35 @@ get_frags.exit: ; preds = %142, %144, %rlc_cha %273 = icmp ne ptr %272, null %274 = icmp ne i16 %6, 0 %or.cond6 = and i1 %274, %273 - br i1 %or.cond6, label %275, label %286 + br i1 %or.cond6, label %275, label %284 275: ; preds = %270 %276 = load ptr, ptr %272, align 8 %277 = ptrtoint ptr %276 to i64 - %278 = trunc i64 %277 to i32 - %279 = zext nneg i16 %5 to i32 - %sext = shl i32 %278, 16 - %280 = ashr exact i32 %sext, 16 - %281 = icmp eq i32 %280, %279 - br i1 %281, label %282, label %286 - -282: ; preds = %275 - %283 = add nsw i32 %279, -1 - %284 = sext i32 %283 to i64 - %285 = inttoptr i64 %284 to ptr - store ptr %285, ptr %272, align 8 - br label %286 - -286: ; preds = %275, %282, %270 - %287 = load ptr, ptr %271, align 8 - br i1 %8, label %288, label %thread-pre-split - -288: ; preds = %286 - %289 = inttoptr i64 %259 to ptr - %290 = call ptr @g_list_append(ptr noundef %287, ptr noundef %289) - store ptr %290, ptr %271, align 8 + %278 = trunc i64 %277 to i16 + %279 = icmp eq i16 %5, %278 + br i1 %279, label %280, label %284 + +280:; preds = %275 + %sext = shl i64 %277, 48 + %281 = ashr exact i64 %sext, 48 + %282 = add nsw i64 %281, -1 + %283 = inttoptr i64 %282 to ptr + store ptr %283, ptr %272, align 8 + br label %284 + +284:; preds = %275, %280, %270 + %285 = load ptr, ptr %271, align 8 + br i1 %8, label %286, label %thread-pre-split + +286:; preds = %284 + %287 = inttoptr i64 %259 to ptr + %288 = call ptr @g_list_append(ptr noundef %285, ptr noundef %287) + store ptr %288, ptr %271, align 8 br label %thread-pre-split -thread-pre-split: ; preds = %286, %288 - %291 = phi ptr [ %290, %288 ], [ %287, %286 ] +thread-pre-split: ; preds = %284, %286 + %291 = phi ptr [ %288, %286 ], [ %285, %284 ] %.not243 = icmp eq ptr %291, null br i1 %.not243, label %.critedge269, label %292 @@ -3691,7 +3689,7 @@ thread-pre-split: ; preds = %286, %288 br i1 %346, label %.lr.ph311, label %._crit_edge .lr.ph311: ; preds = %335, %363 - %.0210310 = phi i16 [ %366, %363 ], [ %300, %335 ] + %.0210310 = phi i16 [ %366, %361 ], [ %300, %333 ] %347 = sext i16 %.0210310 to i64 %348 = getelementptr ptr, ptr %.0.i271, i64 %347 %349 = load ptr, ptr %348, align 8 diff --git a/bench/zed-rs/optimized/89f8nno15240ug8tk8i1phh9j.ll b/bench/zed-rs/optimized/89f8nno15240ug8tk8i1phh9j.ll index 8f761a36cb4..0c3acc62db6 100644 --- a/bench/zed-rs/optimized/89f8nno15240ug8tk8i1phh9j.ll +++ b/bench/zed-rs/optimized/89f8nno15240ug8tk8i1phh9j.ll @@ -5479,24 +5479,22 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %5 = getelementptr inbounds nuw i8, ptr %1, i64 2 %.val3 = load i16, ptr %5, align 2 %trunc.i.i = trunc nuw i16 %.val to i1 - br i1 %trunc.i.i, label %8, label %6 + %trunc1.i.i = trunc nuw i16 %.val2 to i1 + br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc i16 %.val2 to i8 - %7 = and i8 %trunc2.i.i, 1 - %..i.i = sub nsw i8 0, %7 + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h25bb0e13b79bb896E.exit" 8: ; preds = %3 - %trunc1.i.i = trunc nuw i16 %.val2 to i1 - br i1 %trunc1.i.i, label %9, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h25bb0e13b79bb896E.exit" + br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h25bb0e13b79bb896E.exit" 9: ; preds = %8 %10 = tail call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i16(i16 %.val1, i16 %.val3) br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h25bb0e13b79bb896E.exit" "_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h25bb0e13b79bb896E.exit": ; preds = %6, %8, %9 - %.sroa.0.0.i.i = phi i8 [ %10, %9 ], [ %..i.i, %6 ], [ 1, %8 ] + %.sroa.0.0.i.i = phi i8 [ %10, %8 ], [ %..i.i, %6 ], [ 1, %7 ] ret i8 %.sroa.0.0.i.i } diff --git a/bench/zed-rs/optimized/9ectarykacvre31n6szd6qq9m.ll b/bench/zed-rs/optimized/9ectarykacvre31n6szd6qq9m.ll index a674978eaad..006ef3ca08c 100644 --- a/bench/zed-rs/optimized/9ectarykacvre31n6szd6qq9m.ll +++ b/bench/zed-rs/optimized/9ectarykacvre31n6szd6qq9m.ll @@ -51042,33 +51042,32 @@ define hidden void @_ZN4core5slice4sort6stable5drift4sort17h5d68f99a5672313bE(pt %29 = getelementptr i8, ptr %23, i64 280 %.val13.i = load i32, ptr %29, align 8, !range !7869, !alias.scope !15415, !noalias !15418, !noundef !5 %trunc.i.i.i.i = trunc nuw i32 %.val11.i to i1 - br i1 %trunc.i.i.i.i, label %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i", label %30 + %trunc1.i.i.i.i = trunc nuw i32 %.val13.i to i1 + br i1 %trunc.i.i.i.i, label %30, label %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i" 30: ; preds = %27 - %.not36.i = icmp eq i32 %.val13.i, 0 - br i1 %.not36.i, label %.preheader39.i, label %.preheader.i - -.preheader.i: ; preds = %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i", %30 - %.not52.i = icmp eq i64 %22, 2 - br i1 %.not52.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %.lr.ph46.i - -"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i": ; preds = %27 %31 = getelementptr i8, ptr %23, i64 284 %.val14.i = load i32, ptr %31, align 4, !alias.scope !15415, !noalias !15418 %32 = getelementptr i8, ptr %23, i64 588 %.val12.i = load i32, ptr %32, align 4, !alias.scope !15415, !noalias !15418 - %trunc1.i.i.i.i = trunc nuw i32 %.val13.i to i1 %33 = icmp slt i32 %.val12.i, %.val14.i %spec.select.i.i.i = select i1 %trunc1.i.i.i.i, i1 %33, i1 false - br i1 %spec.select.i.i.i, label %.preheader.i, label %.preheader39.i + br i1 %spec.select.i.i.i, label %.preheader.i, label %.preheader36.i + +.preheader.i: ; preds = %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i", %30 + %.not49.i = icmp eq i64 %22, 2 + br i1 %.not49.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %.lr.ph43.i -.preheader39.i: ; preds = %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i", %30 - %.not51.i = icmp eq i64 %22, 2 - br i1 %.not51.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %.lr.ph.i +"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i":; preds = %27 + br i1 %trunc1.i.i.i.i, label %.preheader.i, label %.preheader36.i -.lr.ph.i: ; preds = %.preheader39.i, %43 - %.val9.i = phi i32 [ %.val7.i, %43 ], [ %.val11.i, %.preheader39.i ] - %.sroa.01.1.i41.i = phi i64 [ %44, %43 ], [ 2, %.preheader39.i ] +.preheader36.i: ; preds = %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit.i", %30 + %.not48.i = icmp eq i64 %22, 2 + br i1 %.not48.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %.lr.ph.i + +.lr.ph.i: ; preds = %.preheader36.i, %43 + %.val9.i = phi i32 [ %.val7.i, %43 ], [ %.val11.i, %.preheader36.i ] + %.sroa.01.1.i41.i = phi i64 [ %44, %43 ], [ 2, %.preheader36.i ] %34 = getelementptr inbounds { { { { i64, ptr, {} }, i64 } }, { i64, [10 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [8 x i64] }, { i32, [1 x i32] }, { { i32, i32 }, { i32, i32 } } }, ptr %23, i64 %.sroa.01.1.i41.i %35 = add i64 %.sroa.01.1.i41.i, -1 %36 = icmp ult i64 %35, %22 @@ -51076,23 +51075,22 @@ define hidden void @_ZN4core5slice4sort6stable5drift4sort17h5d68f99a5672313bE(pt %37 = getelementptr i8, ptr %34, i64 280 %.val7.i = load i32, ptr %37, align 8, !range !7869, !alias.scope !15415, !noalias !15418, !noundef !5 %trunc.i.i.i15.i = trunc nuw i32 %.val7.i to i1 - br i1 %trunc.i.i.i15.i, label %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i", label %38 + %trunc1.i.i.i16.i = trunc nuw i32 %.val9.i to i1 + br i1 %trunc.i.i.i15.i, label %38, label %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i" 38: ; preds = %.lr.ph.i - %.not37.i = icmp eq i32 %.val9.i, 0 - br i1 %.not37.i, label %43, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i - -"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i": ; preds = %.lr.ph.i %39 = getelementptr inbounds { { { { i64, ptr, {} }, i64 } }, { i64, [10 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [8 x i64] }, { i32, [1 x i32] }, { { i32, i32 }, { i32, i32 } } }, ptr %23, i64 %35 %40 = getelementptr i8, ptr %39, i64 284 %.val10.i = load i32, ptr %40, align 4, !alias.scope !15415, !noalias !15418 %41 = getelementptr i8, ptr %34, i64 284 %.val8.i = load i32, ptr %41, align 4, !alias.scope !15415, !noalias !15418 - %trunc1.i.i.i17.i = trunc nuw i32 %.val9.i to i1 %42 = icmp slt i32 %.val8.i, %.val10.i - %spec.select.i.i18.i = select i1 %trunc1.i.i.i17.i, i1 %42, i1 false + %spec.select.i.i18.i = select i1 %trunc1.i.i.i16.i, i1 %42, i1 false br i1 %spec.select.i.i18.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %43 +"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i": ; preds = %.lr.ph.i + br i1 %trunc1.i.i.i16.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %43 + 43: ; preds = %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i", %38 %44 = add nuw i64 %.sroa.01.1.i41.i, 1 %exitcond.not.i = icmp eq i64 %44, %22 @@ -51108,31 +51106,30 @@ define hidden void @_ZN4core5slice4sort6stable5drift4sort17h5d68f99a5672313bE(pt %48 = getelementptr i8, ptr %45, i64 280 %.val.i = load i32, ptr %48, align 8, !range !7869, !alias.scope !15415, !noalias !15418, !noundef !5 %trunc.i.i.i20.i = trunc nuw i32 %.val.i to i1 - br i1 %trunc.i.i.i20.i, label %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i", label %49 + %trunc1.i.i.i21.i = trunc nuw i32 %.val5.i to i1 + br i1 %trunc.i.i.i20.i, label %49, label %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i" 49: ; preds = %.lr.ph46.i - %.not38.i = icmp eq i32 %.val5.i, 0 - br i1 %.not38.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %54 - -"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i": ; preds = %.lr.ph46.i %50 = getelementptr inbounds { { { { i64, ptr, {} }, i64 } }, { i64, [10 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [2 x i64] }, { i64, [8 x i64] }, { i32, [1 x i32] }, { { i32, i32 }, { i32, i32 } } }, ptr %23, i64 %46 %51 = getelementptr i8, ptr %50, i64 284 %.val6.i = load i32, ptr %51, align 4, !alias.scope !15415, !noalias !15418 %52 = getelementptr i8, ptr %45, i64 284 %.val4.i = load i32, ptr %52, align 4, !alias.scope !15415, !noalias !15418 - %trunc1.i.i.i22.i = trunc nuw i32 %.val5.i to i1 %53 = icmp slt i32 %.val4.i, %.val6.i - %spec.select.i.i23.i = select i1 %trunc1.i.i.i22.i, i1 %53, i1 false + %spec.select.i.i23.i = select i1 %trunc1.i.i.i21.i, i1 %53, i1 false br i1 %spec.select.i.i23.i, label %54, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i +"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i": ; preds = %.lr.ph43.i + br i1 %trunc1.i.i.i21.i, label %54, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i + 54: ; preds = %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i", %49 %55 = add nuw i64 %.sroa.01.0.i45.i, 1 %exitcond56.not.i = icmp eq i64 %55, %22 br i1 %exitcond56.not.i, label %_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i, label %.lr.ph46.i -_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i: ; preds = %43, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i", %38, %54, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i", %49, %.preheader39.i, %.preheader.i - %.sroa.3.0.i.i = phi i1 [ true, %.preheader.i ], [ false, %.preheader39.i ], [ true, %49 ], [ true, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i" ], [ true, %54 ], [ false, %38 ], [ false, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i" ], [ false, %43 ] - %.sroa.0.0.i.i = phi i64 [ 2, %.preheader.i ], [ 2, %.preheader39.i ], [ %22, %54 ], [ %.sroa.01.0.i45.i, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i" ], [ %.sroa.01.0.i45.i, %49 ], [ %22, %43 ], [ %.sroa.01.1.i41.i, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i" ], [ %.sroa.01.1.i41.i, %38 ] +_ZN4core5slice4sort6shared17find_existing_run17hbd7059e04952149dE.exit.i: ; preds = %43, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i", %38, %54, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i", %49, %.preheader36.i, %.preheader.i + %.sroa.3.0.i.i = phi i1 [ true, %.preheader.i ], [ false, %.preheader36.i ], [ true, %49 ], [ true, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i" ], [ true, %54 ], [ false, %38 ], [ false, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i" ], [ false, %43 ] + %.sroa.0.0.i.i = phi i64 [ 2, %.preheader.i ], [ 2, %.preheader36.i ], [ %22, %54 ], [ %.sroa.01.0.i45.i, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit24.i" ], [ %.sroa.01.0.i45.i, %49 ], [ %22, %43 ], [ %.sroa.01.1.i41.i, %"_ZN5alloc5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11sort_by_key28_$u7b$$u7b$closure$u7d$$u7d$17hb2aa0680e184461eE.exit19.i" ], [ %.sroa.01.1.i41.i, %38 ] %56 = icmp ule i64 %.sroa.0.0.i.i, %22 tail call void @llvm.assume(i1 %56) %.not3.i = icmp ult i64 %.sroa.0.0.i.i, %.sroa.0.0 diff --git a/bench/zed-rs/optimized/9wvbl62ry9kmh1ntb1bvaauiz.ll b/bench/zed-rs/optimized/9wvbl62ry9kmh1ntb1bvaauiz.ll index d692caaa7d1..6e098807884 100644 --- a/bench/zed-rs/optimized/9wvbl62ry9kmh1ntb1bvaauiz.ll +++ b/bench/zed-rs/optimized/9wvbl62ry9kmh1ntb1bvaauiz.ll @@ -48887,15 +48887,14 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN163_$LT$sum_tree..tree_map..MapKey %12 = load i64, ptr %4, align 8, !range !107, !alias.scope !15135, !noalias !15138, !noundef !11 %trunc.i = trunc nuw i64 %12 to i1 %13 = load i64, ptr %6, align 8, !range !107, !alias.scope !15138, !noalias !15135, !noundef !11 + %trunc1.i = trunc nuw i64 %13 to i1 br i1 %trunc.i, label %15, label %14 14: ; preds = %11 - %trunc2.i = trunc nuw nsw i64 %13 to i8 - %..i = sub nsw i8 0, %trunc2.i + %..i = sext i1 %trunc1.i to i8 br label %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h64f76e5ed8d56dc4E.exit" 15: ; preds = %11 - %trunc1.i = trunc nuw i64 %13 to i1 br i1 %trunc1.i, label %16, label %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h64f76e5ed8d56dc4E.exit" 16: ; preds = %15 @@ -60803,15 +60802,14 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %4 = load i64, ptr %0, align 8, !range !107, !alias.scope !18509, !noalias !18510, !noundef !11 %trunc.i.i = trunc nuw i64 %4 to i1 %5 = load i64, ptr %1, align 8, !range !107, !alias.scope !18510, !noalias !18509, !noundef !11 + %trunc1.i.i = trunc nuw i64 %5 to i1 br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc nuw nsw i64 %5 to i8 - %..i.i = sub nsw i8 0, %trunc2.i.i + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h0c53b0da8ca074d6E.exit" 7: ; preds = %3 - %trunc1.i.i = trunc nuw i64 %5 to i1 br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h0c53b0da8ca074d6E.exit" 8: ; preds = %7 @@ -60843,24 +60841,22 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %.val3 = load i64, ptr %5, align 8 %trunc.i.i = trunc nuw i64 %.val to i1 - br i1 %trunc.i.i, label %8, label %6 + %trunc1.i.i = trunc nuw i64 %.val2 to i1 + br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc i64 %.val2 to i8 - %7 = and i8 %trunc2.i.i, 1 - %..i.i = sub nsw i8 0, %7 + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5eb06ef0b9b8a841E.exit" 8: ; preds = %3 - %trunc1.i.i = trunc nuw i64 %.val2 to i1 - br i1 %trunc1.i.i, label %9, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5eb06ef0b9b8a841E.exit" + br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5eb06ef0b9b8a841E.exit" 9: ; preds = %8 %10 = tail call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64 %.val1, i64 %.val3) br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5eb06ef0b9b8a841E.exit" "_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5eb06ef0b9b8a841E.exit": ; preds = %6, %8, %9 - %.sroa.0.0.i.i = phi i8 [ %10, %9 ], [ %..i.i, %6 ], [ 1, %8 ] + %.sroa.0.0.i.i = phi i8 [ %10, %8 ], [ %..i.i, %6 ], [ 1, %7 ] ret i8 %.sroa.0.0.i.i } @@ -60920,15 +60916,14 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek tail call void @llvm.experimental.noalias.scope.decl(metadata !18523) tail call void @llvm.experimental.noalias.scope.decl(metadata !18526) %trunc.i.i.i = trunc nuw i64 %4 to i1 + %trunc1.i.i.i = trunc nuw i64 %6 to i1 br i1 %trunc.i.i.i, label %13, label %12 12: ; preds = %11 - %trunc2.i.i.i = trunc nuw nsw i64 %6 to i8 - %..i.i.i = sub nsw i8 0, %trunc2.i.i.i + %..i.i.i = sext i1 %trunc1.i.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h2e95abf792957a4fE.exit" 13: ; preds = %11 - %trunc1.i.i.i = trunc nuw i64 %6 to i1 br i1 %trunc1.i.i.i, label %14, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h2e95abf792957a4fE.exit" 14: ; preds = %13 @@ -111998,15 +111993,14 @@ define hidden noundef ptr @"_ZN8sum_tree8tree_map20TreeMap$LT$K$C$V$GT$6remove17 call void @llvm.experimental.noalias.scope.decl(metadata !30992) %43 = load i64, ptr %1, align 8, !range !107, !alias.scope !30995, !noalias !30992, !noundef !11 %trunc.i = trunc nuw i64 %43 to i1 + %trunc1.i = trunc nuw i64 %42 to i1 br i1 %trunc.i, label %45, label %44 44: ; preds = %"_ZN8sum_tree6cursor19Cursor$LT$T$C$D$GT$3end17h539d350285fee454E.exit.thread38" - %trunc2.i = trunc nuw nsw i64 %42 to i8 - %..i = sub nsw i8 0, %trunc2.i + %..i = sext i1 %trunc1.i to i8 br label %"_ZN64_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h64f76e5ed8d56dc4E.exit" 45: ; preds = %"_ZN8sum_tree6cursor19Cursor$LT$T$C$D$GT$3end17h539d350285fee454E.exit.thread38" - %trunc1.i = trunc nuw i64 %42 to i1 br i1 %trunc1.i, label %46, label %"_ZN8sum_tree6cursor19Cursor$LT$T$C$D$GT$3end17h539d350285fee454E.exit.thread" 46: ; preds = %45 diff --git a/bench/zed-rs/optimized/avkcaupfon6sc5v4swrdwryed.ll b/bench/zed-rs/optimized/avkcaupfon6sc5v4swrdwryed.ll index 2f7d6adac3e..983b1ac8f03 100644 --- a/bench/zed-rs/optimized/avkcaupfon6sc5v4swrdwryed.ll +++ b/bench/zed-rs/optimized/avkcaupfon6sc5v4swrdwryed.ll @@ -4770,7 +4770,7 @@ define internal fastcc noundef zeroext i1 @"_ZN5alloc5slice29_$LT$impl$u20$$u5b$ 95: ; preds = %.loopexit.split-lp, %.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] invoke fastcc void @"_ZN4core3ptr112drop_in_place$LT$$LP$core..cmp..Reverse$LT$core..option..Option$LT$usize$GT$$GT$$C$alloc..string..String$RP$$GT$17hbeb816f4cb111477E"(ptr noalias noundef align 8 dereferenceable(40) %8) #26 - to label %133 unwind label %131 + to label %132 unwind label %131 96: ; preds = %"_ZN9hashbrown3map28HashMap$LT$K$C$V$C$S$C$A$GT$9get_inner17h343305097f63e877E.exit.thread.i" store i64 %.sroa.0.0.i14, ptr %7, align 8, !alias.scope !1482, !noalias !1485 @@ -4781,24 +4781,22 @@ define internal fastcc noundef zeroext i1 @"_ZN5alloc5slice29_$LT$impl$u20$$u5b$ %.val.i = load i64, ptr %8, align 8, !alias.scope !1527, !noalias !1530 %.val5.i = load i64, ptr %52, align 8, !alias.scope !1527, !noalias !1530 %trunc.i.i.i = trunc nuw i64 %.sroa.0.0.i14 to i1 - br i1 %trunc.i.i.i, label %100, label %98 + %trunc1.i.i.i = trunc nuw i64 %.val.i to i1 + br i1 %trunc.i.i.i, label %99, label %98 98: ; preds = %96 - %trunc2.i.i.i = trunc i64 %.val.i to i8 - %99 = and i8 %trunc2.i.i.i, 1 - %..i.i.i = sub nsw i8 0, %99 + %..i.i.i = sext i1 %trunc1.i.i.i to i8 br label %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.i" 100: ; preds = %96 - %trunc1.i.i.i = trunc nuw i64 %.val.i to i1 - br i1 %trunc1.i.i.i, label %101, label %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i" + br i1 %trunc1.i.i.i, label %100, label %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i" 101: ; preds = %100 %102 = call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64 %.sroa.5.0.i13, i64 %.val5.i) br label %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.i" "_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.i": ; preds = %101, %98 - %.sroa.0.0.i.i.i = phi i8 [ %102, %101 ], [ %..i.i.i, %98 ] + %.sroa.0.0.i.i.i = phi i8 [ %102, %100 ], [ %..i.i.i, %98 ] %.not.i = icmp eq i8 %.sroa.0.0.i.i.i, 0 br i1 %.not.i, label %103, label %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i" @@ -4821,12 +4819,12 @@ define internal fastcc noundef zeroext i1 @"_ZN5alloc5slice29_$LT$impl$u20$$u5b$ br label %"_ZN4core5tuple65_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$$LP$U$C$T$RP$$GT$2lt17hb30dd387fd4a2ef5E.exit" "_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i": ; preds = %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.i", %100 - %.sroa.0.0.i.i14.i = phi i8 [ %.sroa.0.0.i.i.i, %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.i" ], [ 1, %100 ] + %.sroa.0.0.i.i14.i = phi i8 [ %.sroa.0.0.i.i.i, %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.i" ], [ 1, %99 ] %113 = icmp eq i8 %.sroa.0.0.i.i14.i, -1 br label %"_ZN4core5tuple65_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$$LP$U$C$T$RP$$GT$2lt17hb30dd387fd4a2ef5E.exit" "_ZN4core5tuple65_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$$LP$U$C$T$RP$$GT$2lt17hb30dd387fd4a2ef5E.exit": ; preds = %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i", %103 - %.sroa.0.1.in.i = phi i1 [ %113, %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i" ], [ %112, %103 ] + %.sroa.0.1.in.i = phi i1 [ %113, %"_ZN69_$LT$core..cmp..Reverse$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h9af421f87ba11943E.exit.thread.i" ], [ %112, %102 ] call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !1540 invoke void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h4a88805eea33cb17E"(ptr noalias noundef nonnull sret([24 x i8]) align 8 captures(none) dereferenceable(24) %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %94) to label %.noexc19 unwind label %.loopexit.split-lp @@ -4843,7 +4841,7 @@ define internal fastcc noundef zeroext i1 @"_ZN5alloc5slice29_$LT$impl$u20$$u5b$ %120 = load i64, ptr %119, align 8, !noalias !1540, !noundef !8 %121 = getelementptr inbounds nuw i8, ptr %7, i64 32 invoke void @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.2219080522599368724"(ptr noalias noundef nonnull readonly align 1 %121, ptr noundef nonnull %118, i64 noundef %115, i64 noundef %120) - to label %122 unwind label %.loopexit.split-lp + to label %121 unwind label %.loopexit.split-lp 122: ; preds = %.noexc19, %117 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !1540 diff --git a/bench/zed-rs/optimized/bkp2u7tfyqnnhpthgztcor9ly.ll b/bench/zed-rs/optimized/bkp2u7tfyqnnhpthgztcor9ly.ll index cdd466f324d..66bf6eb59d6 100644 --- a/bench/zed-rs/optimized/bkp2u7tfyqnnhpthgztcor9ly.ll +++ b/bench/zed-rs/optimized/bkp2u7tfyqnnhpthgztcor9ly.ll @@ -8803,24 +8803,22 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %.val3 = load i64, ptr %5, align 8 %trunc.i.i = trunc nuw i64 %.val to i1 - br i1 %trunc.i.i, label %8, label %6 + %trunc1.i.i = trunc nuw i64 %.val2 to i1 + br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc i64 %.val2 to i8 - %7 = and i8 %trunc2.i.i, 1 - %..i.i = sub nsw i8 0, %7 + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17ha5b8994c8c6623b6E.exit" 8: ; preds = %3 - %trunc1.i.i = trunc nuw i64 %.val2 to i1 - br i1 %trunc1.i.i, label %9, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17ha5b8994c8c6623b6E.exit" + br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17ha5b8994c8c6623b6E.exit" 9: ; preds = %8 %10 = tail call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64 %.val1, i64 %.val3) br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17ha5b8994c8c6623b6E.exit" "_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17ha5b8994c8c6623b6E.exit": ; preds = %6, %8, %9 - %.sroa.0.0.i.i = phi i8 [ %10, %9 ], [ %..i.i, %6 ], [ 1, %8 ] + %.sroa.0.0.i.i = phi i8 [ %10, %8 ], [ %..i.i, %6 ], [ 1, %7 ] ret i8 %.sroa.0.0.i.i } @@ -8833,24 +8831,22 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %.val3 = load i64, ptr %5, align 8 %trunc.i.i = trunc nuw i64 %.val to i1 - br i1 %trunc.i.i, label %8, label %6 + %trunc1.i.i = trunc nuw i64 %.val2 to i1 + br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc i64 %.val2 to i8 - %7 = and i8 %trunc2.i.i, 1 - %..i.i = sub nsw i8 0, %7 + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h6628b38b9b1c377eE.exit" 8: ; preds = %3 - %trunc1.i.i = trunc nuw i64 %.val2 to i1 - br i1 %trunc1.i.i, label %9, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h6628b38b9b1c377eE.exit" + br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h6628b38b9b1c377eE.exit" 9: ; preds = %8 %10 = tail call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64 %.val1, i64 %.val3) br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h6628b38b9b1c377eE.exit" "_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h6628b38b9b1c377eE.exit": ; preds = %6, %8, %9 - %.sroa.0.0.i.i = phi i8 [ %10, %9 ], [ %..i.i, %6 ], [ 1, %8 ] + %.sroa.0.0.i.i = phi i8 [ %10, %8 ], [ %..i.i, %6 ], [ 1, %7 ] ret i8 %.sroa.0.0.i.i } diff --git a/bench/zed-rs/optimized/c43xk22aeat7jwaky6ehuopzs.ll b/bench/zed-rs/optimized/c43xk22aeat7jwaky6ehuopzs.ll index 64515ba98cd..3f0645a1e2f 100644 --- a/bench/zed-rs/optimized/c43xk22aeat7jwaky6ehuopzs.ll +++ b/bench/zed-rs/optimized/c43xk22aeat7jwaky6ehuopzs.ll @@ -76959,15 +76959,14 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %4 = load i64, ptr %0, align 8, !range !226, !alias.scope !19894, !noalias !19895, !noundef !5 %trunc.i.i = trunc nuw i64 %4 to i1 %5 = load i64, ptr %1, align 8, !range !226, !alias.scope !19895, !noalias !19894, !noundef !5 + %trunc1.i.i = trunc nuw i64 %5 to i1 br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc nuw nsw i64 %5 to i8 - %..i.i = sub nsw i8 0, %trunc2.i.i + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17hf84257f360a69733E.exit" 7: ; preds = %3 - %trunc1.i.i = trunc nuw i64 %5 to i1 br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17hf84257f360a69733E.exit" 8: ; preds = %7 @@ -76999,24 +76998,22 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN55_$LT$D$u20$as$u20$sum_tree..Seek %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %.val3 = load i64, ptr %5, align 8 %trunc.i.i = trunc nuw i64 %.val to i1 - br i1 %trunc.i.i, label %8, label %6 + %trunc1.i.i = trunc nuw i64 %.val2 to i1 + br i1 %trunc.i.i, label %7, label %6 6: ; preds = %3 - %trunc2.i.i = trunc i64 %.val2 to i8 - %7 = and i8 %trunc2.i.i, 1 - %..i.i = sub nsw i8 0, %7 + %..i.i = sext i1 %trunc1.i.i to i8 br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5901ad6637aa65dcE.exit" 8: ; preds = %3 - %trunc1.i.i = trunc nuw i64 %.val2 to i1 - br i1 %trunc1.i.i, label %9, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5901ad6637aa65dcE.exit" + br i1 %trunc1.i.i, label %8, label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5901ad6637aa65dcE.exit" 9: ; preds = %8 %10 = tail call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64 %.val1, i64 %.val3) br label %"_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5901ad6637aa65dcE.exit" "_ZN70_$LT$sum_tree..tree_map..MapKey$LT$K$GT$$u20$as$u20$core..cmp..Ord$GT$3cmp17h5901ad6637aa65dcE.exit": ; preds = %6, %8, %9 - %.sroa.0.0.i.i = phi i8 [ %10, %9 ], [ %..i.i, %6 ], [ 1, %8 ] + %.sroa.0.0.i.i = phi i8 [ %10, %8 ], [ %..i.i, %6 ], [ 1, %7 ] ret i8 %.sroa.0.0.i.i } diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c8d0fce0bf7..99788e13718 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/160483 export COMPTIME_MODE=0 export STAT_MODE=0 export STAT_NAME=""