diff --git a/bench/abc/optimized/amapLiberty.ll b/bench/abc/optimized/amapLiberty.ll index cef4159f06d..3b0ad2ec0f0 100644 --- a/bench/abc/optimized/amapLiberty.ll +++ b/bench/abc/optimized/amapLiberty.ll @@ -3917,10 +3917,10 @@ define internal fastcc i64 @Amap_LibertyUpdateHead(ptr noundef captures(none) %0 %10 = getelementptr inbounds nuw i8, ptr %0, i64 20 br label %11 -11: ; preds = %.lr.ph, %Amap_LibertyCharIsSpace.exit - %.028 = phi ptr [ %9, %.lr.ph ], [ %23, %Amap_LibertyCharIsSpace.exit ] - %.02227 = phi ptr [ null, %.lr.ph ], [ %22, %Amap_LibertyCharIsSpace.exit ] - %.02326 = phi ptr [ null, %.lr.ph ], [ %.sink, %Amap_LibertyCharIsSpace.exit ] +11: ; preds = %.lr.ph, %Amap_LibertyCharIsSpace.exit.thread + %.028 = phi ptr [ %9, %.lr.ph ], [ %25, %Amap_LibertyCharIsSpace.exit.thread ] + %.02227 = phi ptr [ null, %.lr.ph ], [ %24, %Amap_LibertyCharIsSpace.exit.thread ] + %.02326 = phi ptr [ null, %.lr.ph ], [ %.12435, %Amap_LibertyCharIsSpace.exit.thread ] %12 = load i8, ptr %.028, align 1, !tbaa !16 %13 = icmp eq i8 %12, 10 br i1 %13, label %14, label %17 @@ -3934,29 +3934,40 @@ define internal fastcc i64 @Amap_LibertyUpdateHead(ptr noundef captures(none) %0 17: ; preds = %14, %11 %18 = phi i8 [ %.pr, %14 ], [ %12, %11 ] - switch i8 %18, label %19 [ - i8 32, label %Amap_LibertyCharIsSpace.exit - i8 13, label %Amap_LibertyCharIsSpace.exit - i8 10, label %Amap_LibertyCharIsSpace.exit - i8 9, label %Amap_LibertyCharIsSpace.exit - i8 92, label %Amap_LibertyCharIsSpace.exit - ] - -19: ; preds = %17 + %.fr = freeze i8 %18 + %switch.tableidx = add i8 %.fr, -9 + %19 = icmp ult i8 %switch.tableidx, 24 + br i1 %19, label %switch.hole_check, label %Amap_LibertyCharIsSpace.exit + +switch.hole_check:; preds = %17 + %switch.maskindex = zext nneg i8 %switch.tableidx to i32 + %switch.shifted = lshr i32 8388627, %switch.maskindex + %switch.lobit = trunc i32 %switch.shifted to i1 + br i1 %switch.lobit, label %Amap_LibertyCharIsSpace.exit.thread, label %Amap_LibertyCharIsSpace.exit.thread36 + +Amap_LibertyCharIsSpace.exit.thread36: ; preds = %switch.hole_check %20 = icmp eq ptr %.02326, null %21 = select i1 %20, ptr %.028, ptr %.02326 - br label %Amap_LibertyCharIsSpace.exit - -Amap_LibertyCharIsSpace.exit: ; preds = %17, %17, %17, %17, %17, %19 - %.sink = phi ptr [ %21, %19 ], [ %.02326, %17 ], [ %.02326, %17 ], [ %.02326, %17 ], [ %.02326, %17 ], [ %.02326, %17 ] - %22 = phi ptr [ %.028, %19 ], [ %.02227, %17 ], [ %.02227, %17 ], [ %.02227, %17 ], [ %.02227, %17 ], [ %.02227, %17 ] - %23 = getelementptr inbounds nuw i8, ptr %.028, i64 1 - %24 = icmp ult ptr %23, %7 - br i1 %24, label %11, label %._crit_edge, !llvm.loop !63 - -._crit_edge: ; preds = %Amap_LibertyCharIsSpace.exit, %2 - %.023.lcssa = phi ptr [ null, %2 ], [ %.sink, %Amap_LibertyCharIsSpace.exit ] - %.022.lcssa = phi ptr [ null, %2 ], [ %22, %Amap_LibertyCharIsSpace.exit ] + br label %Amap_LibertyCharIsSpace.exit.thread + +Amap_LibertyCharIsSpace.exit: ; preds = %17 + %21 = icmp ne i8 %.fr, 92 + %22 = icmp eq ptr %.02326, null + %23 = select i1 %21, i1 %22, i1 false + %.124 = select i1 %23, ptr %.028, ptr %.02326 + %spec.select = select i1 %21, ptr %.028, ptr %.02227 + br label %Amap_LibertyCharIsSpace.exit.thread + +Amap_LibertyCharIsSpace.exit.thread:; preds = %Amap_LibertyCharIsSpace.exit, %switch.hole_check, %Amap_LibertyCharIsSpace.exit.thread36 + %.022.lcssa = phi ptr [ %21, %Amap_LibertyCharIsSpace.exit.thread36 ], [ %.02326, %switch.hole_check ], [ %.124, %Amap_LibertyCharIsSpace.exit ] + %24 = phi ptr [ %.028, %Amap_LibertyCharIsSpace.exit.thread36 ], [ %.02227, %switch.hole_check ], [ %spec.select, %Amap_LibertyCharIsSpace.exit ] + %25 = getelementptr inbounds nuw i8, ptr %.028, i64 1 + %26 = icmp ult ptr %25, %7 + br i1 %26, label %11, label %._crit_edge, !llvm.loop !63 + +._crit_edge: ; preds = %Amap_LibertyCharIsSpace.exit.thread, %2 + %.023.lcssa = phi ptr [ null, %2 ], [ %.12435, %Amap_LibertyCharIsSpace.exit.thread ] + %.022.lcssa = phi ptr [ null, %2 ], [ %24, %Amap_LibertyCharIsSpace.exit.thread ] %.sroa.3.0.extract.shift = lshr i64 %1, 32 %25 = icmp eq ptr %.023.lcssa, null %26 = icmp eq ptr %.022.lcssa, null diff --git a/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll b/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll index 2dbecf44c35..a0b148d2e3e 100644 --- a/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll +++ b/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll @@ -11306,8 +11306,10 @@ define internal fastcc noundef range(i32 0, 2) i32 @_ZN6brotli3enc6encode23Injec %26 = or i32 %25, %22 %27 = getelementptr inbounds nuw i8, ptr %0, i64 120 %28 = load i32, ptr %27, align 8, !range !1072, !alias.scope !1069, !noundef !12 - %switch.i = icmp samesign ugt i32 %28, 1 - br i1 %switch.i, label %.thread28.i, label %29 + %switch.cast.i = trunc nuw nsw i32 %28 to i3 + %switch.downshift.i = lshr exact i3 -4, %switch.cast.i + %switch.masked.i = trunc i3 %switch.downshift.i to i1 + br i1 %switch.masked.i, label %.thread28.i, label %29 29: ; preds = %19 %30 = getelementptr inbounds nuw i8, ptr %0, i64 304 diff --git a/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll b/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll index 67a4bc50fbf..403ca0dc111 100644 --- a/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll +++ b/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll @@ -670,43 +670,47 @@ define noundef zeroext i1 @_ZN7anki_io5error11FileIoError12is_not_found17h637f7f %3 = ptrtoint ptr %.val to i64 %4 = and i64 %3, 3 switch i64 %4, label %default.unreachable [ - i64 2, label %6 - i64 3, label %5 - i64 0, label %7 - i64 1, label %10 + i64 2, label %5 + i64 3, label %6 + i64 0, label %10 + i64 1, label %13 ] default.unreachable: ; preds = %1 unreachable 5: ; preds = %1 - %switch = icmp ult ptr %.val, inttoptr (i64 4294967296 to ptr) - %spec.select = select i1 %switch, i8 0, i8 13 - br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit - -6: ; preds = %1 %.mask = and i64 %3, -4294967296 %switch.selectcmp = icmp eq i64 %.mask, 8589934592 %switch.select = select i1 %switch.selectcmp, i8 0, i8 13 br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit 7: ; preds = %1 - %8 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %9 = load i8, ptr %8, align 8, !range !183, !noundef !4 + %7 = lshr i64 %3, 32 + %8 = trunc nuw i64 %7 to i32 + %spec.select43.i.i.i = tail call i32 @llvm.umin.i32(i32 %8, i32 41) + %spec.select.i.i.i = trunc nuw nsw i32 %spec.select43.i.i.i to i8 + %9 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + tail call void @llvm.assume(i1 %9) br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit 10: ; preds = %1 - %11 = getelementptr i8, ptr %.val, i64 -1 - %12 = icmp ne ptr %11, null - tail call void @llvm.assume(i1 %12) - %13 = getelementptr i8, ptr %.val, i64 15 - %14 = load i8, ptr %13, align 8, !range !183, !noundef !4 + %11 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %12 = load i8, ptr %11, align 8, !range !183, !noundef !4 br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit -_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit: ; preds = %5, %6, %7, %10 - %.0.i = phi i8 [ %9, %7 ], [ %14, %10 ], [ %spec.select, %5 ], [ %switch.select, %6 ] - %15 = icmp eq i8 %.0.i, 0 - ret i1 %15 +_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit: ; preds = %1 + %14 = getelementptr i8, ptr %.val, i64 -1 + %15 = icmp ne ptr %14, null + tail call void @llvm.assume(i1 %15) + %16 = getelementptr i8, ptr %.val, i64 15 + %17 = load i8, ptr %16, align 8, !range !183, !noundef !4 + br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit + +_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit: ; preds = %5, %6, %10, %13 + %.0.i = phi i8 [ %spec.select.i.i.i, %6 ], [ %12, %10 ], [ %17, %13 ], [ %switch.select, %5 ] + %18 = icmp eq i8 %.0.i, 0 + ret i1 %18 } ; Function Attrs: nonlazybind uwtable @@ -1023,6 +1027,9 @@ declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_add ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #10 + attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -1033,8 +1040,9 @@ attributes #6 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inli attributes #7 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #8 = { nocallback nofree nounwind nonlazybind willreturn memory(argmem: read) } attributes #9 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #10 = { cold } -attributes #11 = { cold noreturn nounwind } +attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #11 = { cold } +attributes #12 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/arrow/optimized/message.ll b/bench/arrow/optimized/message.ll index 80b3ad4fe35..a1a4b48e344 100644 --- a/bench/arrow/optimized/message.ll +++ b/bench/arrow/optimized/message.ll @@ -1436,7 +1436,7 @@ _ZNK5arrow3ipc7Message11MessageImpl8metadataEv.exit: ; preds = %2, %11, %14 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none) uwtable -define noundef range(i32 0, 6) i32 @_ZNK5arrow3ipc7Message4typeEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(8) %0) local_unnamed_addr #5 align 2 { +define noundef range(i32 0, 257) i32 @_ZNK5arrow3ipc7Message4typeEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(8) %0) local_unnamed_addr #5 align 2 { %2 = load ptr, ptr %0, align 8, !tbaa !15 %3 = getelementptr inbounds nuw i8, ptr %2, i64 16 %4 = load ptr, ptr %3, align 8, !tbaa !72 @@ -1458,14 +1458,16 @@ _ZNK3org6apache5arrow7flatbuf7Message11header_typeEv.exit.i: ; preds = %_ZNK22ar %13 = zext i16 %12 to i64 %14 = getelementptr inbounds nuw i8, ptr %4, i64 %13 %15 = load i8, ptr %14, align 1, !tbaa !22 - %switch.tableidx = add i8 %15, -1 - %16 = icmp ult i8 %switch.tableidx, 5 - %switch.offset = zext nneg i8 %15 to i32 - %spec.select = select i1 %16, i32 %switch.offset, i32 0 + %.fr.i = freeze i8 %15 + %16 = add i8 %.fr.i, -1 + %17 = icmp ult i8 %16, 5 + %switch.idx.cast.i = zext nneg i8 %16 to i32 + %switch.offset.i = add nuw nsw i32 %switch.idx.cast.i, 1 + %spec.select.i = select i1 %17, i32 %switch.offset.i, i32 0 br label %_ZNK5arrow3ipc7Message11MessageImpl4typeEv.exit -_ZNK5arrow3ipc7Message11MessageImpl4typeEv.exit: ; preds = %_ZNK3org6apache5arrow7flatbuf7Message11header_typeEv.exit.i, %1, %_ZNK22arrow_vendored_private11flatbuffers5Table22GetOptionalFieldOffsetEt.exit.i.i.i - %.0.i = phi i32 [ 0, %_ZNK22arrow_vendored_private11flatbuffers5Table22GetOptionalFieldOffsetEt.exit.i.i.i ], [ 0, %1 ], [ %spec.select, %_ZNK3org6apache5arrow7flatbuf7Message11header_typeEv.exit.i ] +_ZNK5arrow3ipc7Message11MessageImpl4typeEv.exit: ; preds = %1, %_ZNK22arrow_vendored_private11flatbuffers5Table22GetOptionalFieldOffsetEt.exit.i.i.i, %_ZNK3org6apache5arrow7flatbuf7Message11header_typeEv.exit.i + %.0.i = phi i32 [ 0, %_ZNK22arrow_vendored_private11flatbuffers5Table22GetOptionalFieldOffsetEt.exit.i.i.i ], [ 0, %1 ], [ %spec.select.i, %_ZNK3org6apache5arrow7flatbuf7Message11header_typeEv.exit.i ] ret i32 %.0.i } diff --git a/bench/bullet3/optimized/btCollisionDispatcher.ll b/bench/bullet3/optimized/btCollisionDispatcher.ll index 0e8af24415b..bcf57b8be24 100644 --- a/bench/bullet3/optimized/btCollisionDispatcher.ll +++ b/bench/bullet3/optimized/btCollisionDispatcher.ll @@ -764,52 +764,54 @@ define dso_local noundef zeroext i1 @_ZN21btCollisionDispatcher13needsResponseEP define dso_local noundef zeroext i1 @_ZN21btCollisionDispatcher14needsCollisionEPK17btCollisionObjectS2_(ptr nonnull readnone align 8 captures(none) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #0 align 2 { %4 = getelementptr inbounds nuw i8, ptr %1, i64 240 %5 = load i32, ptr %4, align 8, !tbaa !100 - switch i32 %5, label %_ZNK17btCollisionObject8isActiveEv.exit.thread [ - i32 6, label %_ZNK17btCollisionObject8isActiveEv.exit - i32 2, label %_ZNK17btCollisionObject8isActiveEv.exit - i32 5, label %_ZNK17btCollisionObject8isActiveEv.exit - ] - -_ZNK17btCollisionObject8isActiveEv.exit: ; preds = %3, %3, %3 - %6 = getelementptr inbounds nuw i8, ptr %2, i64 240 - %7 = load i32, ptr %6, align 8, !tbaa !100 - switch i32 %7, label %_ZNK17btCollisionObject8isActiveEv.exit.thread [ - i32 6, label %_ZNK17btCollisionObject8isActiveEv.exit6 - i32 2, label %_ZNK17btCollisionObject8isActiveEv.exit6 - i32 5, label %_ZNK17btCollisionObject8isActiveEv.exit6 - ] - -_ZNK17btCollisionObject8isActiveEv.exit.thread: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit, %3 - %8 = getelementptr inbounds nuw i8, ptr %1, i64 312 - %9 = load i32, ptr %8, align 8, !tbaa !101 - %.not.i = icmp eq i32 %9, 0 - br i1 %.not.i, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit - -_ZNK17btCollisionObject16checkCollideWithEPKS_.exit: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit.thread - %10 = load ptr, ptr %1, align 8, !tbaa !4 - %11 = getelementptr inbounds nuw i8, ptr %10, i64 24 - %12 = load ptr, ptr %11, align 8 - %13 = tail call noundef zeroext i1 %12(ptr noundef nonnull align 8 dereferenceable(372) %1, ptr noundef %2) - br i1 %13, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread, label %20 - -_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit.thread, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit - %14 = getelementptr inbounds nuw i8, ptr %2, i64 312 + %6 = icmp ugt i32 %5, 6 + %switch.cast.i = trunc i32 %5 to i7 + %switch.downshift.i = lshr i7 27, %switch.cast.i + %switch.masked.i = trunc i7 %switch.downshift.i to i1 + %7 = select i1 %6, i1 true, i1 %switch.masked.i + br i1 %7, label %13, label %8 + +_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread: ; preds = %3 + %14 = getelementptr inbounds nuw i8, ptr %2, i64 240 + %10 = load i32, ptr %9, align 8, !tbaa !100 + %11 = icmp ugt i32 %10, 6 + %switch.cast.i6 = trunc i32 %10 to i7 + %switch.downshift.i7 = lshr i7 27, %switch.cast.i6 + %switch.masked.i8 = trunc i7 %switch.downshift.i7 to i1 + %12 = select i1 %11, i1 true, i1 %switch.masked.i8 + br i1 %12, label %13, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11.thread + +13: ; preds = %8, %3 + %14 = getelementptr inbounds nuw i8, ptr %1, i64 312 %15 = load i32, ptr %14, align 8, !tbaa !101 %.not.i7 = icmp eq i32 %15, 0 - br i1 %.not.i7, label %_ZNK17btCollisionObject8isActiveEv.exit6, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9 + br i1 %.not.i7, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9 -_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9: ; preds = %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread - %16 = load ptr, ptr %2, align 8, !tbaa !4 +_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9: ; preds = %13 + %16 = load ptr, ptr %1, align 8, !tbaa !4 %17 = getelementptr inbounds nuw i8, ptr %16, i64 24 %18 = load ptr, ptr %17, align 8 - %19 = tail call noundef zeroext i1 %18(ptr noundef nonnull align 8 dereferenceable(372) %2, ptr noundef nonnull %1) - br i1 %19, label %_ZNK17btCollisionObject8isActiveEv.exit6, label %20 + %19 = tail call noundef zeroext i1 %18(ptr noundef nonnull align 8 dereferenceable(372) %1, ptr noundef %2) + br i1 %19, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread, label %20 + +_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread: ; preds = %13, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit + %20 = getelementptr inbounds nuw i8, ptr %2, i64 312 + %21 = load i32, ptr %20, align 8, !tbaa !101 + %.not.i9 = icmp eq i32 %21, 0 + br i1 %.not.i9, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11.thread, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11 + +_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11: ; preds = %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread + %22 = load ptr, ptr %2, align 8, !tbaa !4 + %23 = getelementptr inbounds nuw i8, ptr %22, i64 24 + %24 = load ptr, ptr %23, align 8 + %25 = tail call noundef zeroext i1 %24(ptr noundef nonnull align 8 dereferenceable(372) %2, ptr noundef nonnull %1) + br i1 %25, label %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11.thread, label %26 -20: ; preds = %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit +20: ; preds = %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit br label %_ZNK17btCollisionObject8isActiveEv.exit6 -_ZNK17btCollisionObject8isActiveEv.exit6: ; preds = %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread, %_ZNK17btCollisionObject8isActiveEv.exit, %_ZNK17btCollisionObject8isActiveEv.exit, %_ZNK17btCollisionObject8isActiveEv.exit, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9, %20 - %.0 = phi i1 [ true, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit9 ], [ false, %20 ], [ false, %_ZNK17btCollisionObject8isActiveEv.exit ], [ false, %_ZNK17btCollisionObject8isActiveEv.exit ], [ false, %_ZNK17btCollisionObject8isActiveEv.exit ], [ true, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread ] +_ZNK17btCollisionObject8isActiveEv.exit6: ; preds = %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread, %8, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11, %20 + %.0 = phi i1 [ true, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit11 ], [ false, %26 ], [ false, %8 ], [ true, %_ZNK17btCollisionObject16checkCollideWithEPKS_.exit.thread ] ret i1 %.0 } diff --git a/bench/bullet3/optimized/btCollisionWorld.ll b/bench/bullet3/optimized/btCollisionWorld.ll index ac9ccca756d..df808075fe5 100644 --- a/bench/bullet3/optimized/btCollisionWorld.ll +++ b/bench/bullet3/optimized/btCollisionWorld.ll @@ -930,41 +930,42 @@ define dso_local void @_ZN16btCollisionWorld11updateAabbsEv(ptr noundef nonnull ret void 8: ; preds = %.lr.ph, %_ZNK17btCollisionObject8isActiveEv.exit - %9 = phi i32 [ %4, %.lr.ph ], [ %20, %_ZNK17btCollisionObject8isActiveEv.exit ] - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %_ZNK17btCollisionObject8isActiveEv.exit ] + %9 = phi i32 [ %4, %.lr.ph ], [ %20, %23 ] + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %23 ] %10 = load ptr, ptr %6, align 8, !tbaa !15 %11 = getelementptr inbounds nuw ptr, ptr %10, i64 %indvars.iv %12 = load ptr, ptr %11, align 8, !tbaa !41 %13 = load i8, ptr %7, align 8, !tbaa !40, !range !54, !noundef !65 %14 = trunc nuw i8 %13 to i1 - br i1 %14, label %_ZNK17btCollisionObject8isActiveEv.exit.thread, label %15 + br i1 %14, label %20, label %15 15: ; preds = %8 %16 = getelementptr inbounds nuw i8, ptr %12, i64 240 %17 = load i32, ptr %16, align 8, !tbaa !69 - switch i32 %17, label %_ZNK17btCollisionObject8isActiveEv.exit.thread [ - i32 6, label %_ZNK17btCollisionObject8isActiveEv.exit - i32 2, label %_ZNK17btCollisionObject8isActiveEv.exit - i32 5, label %_ZNK17btCollisionObject8isActiveEv.exit - ] - -_ZNK17btCollisionObject8isActiveEv.exit.thread: ; preds = %15, %8 + %18 = icmp ugt i32 %17, 6 + %switch.cast.i = trunc i32 %17 to i7 + %switch.downshift.i = lshr i7 27, %switch.cast.i + %switch.masked.i = trunc i7 %switch.downshift.i to i1 + %19 = select i1 %18, i1 true, i1 %switch.masked.i + br i1 %19, label %20, label %23 + +20: ; preds = %15, %8 invoke void @_ZN16btCollisionWorld16updateSingleAabbEP17btCollisionObject(ptr noundef nonnull align 8 dereferenceable(121) %0, ptr noundef %12) - to label %_ZNK17btCollisionObject8isActiveEv.exit.thread._ZNK17btCollisionObject8isActiveEv.exit_crit_edge unwind label %18 + to label %._crit_edge9 unwind label %18 -_ZNK17btCollisionObject8isActiveEv.exit.thread._ZNK17btCollisionObject8isActiveEv.exit_crit_edge: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit.thread +_ZNK17btCollisionObject8isActiveEv.exit.thread._ZNK17btCollisionObject8isActiveEv.exit_crit_edge: ; preds = %20 %.pre = load i32, ptr %3, align 4, !tbaa !16 br label %_ZNK17btCollisionObject8isActiveEv.exit -18: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit.thread +18: ; preds = %20 %19 = landingpad { ptr, i32 } cleanup call void @_ZN14CProfileSampleD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #22 call void @llvm.lifetime.end.p0(ptr nonnull %2) resume { ptr, i32 } %19 -_ZNK17btCollisionObject8isActiveEv.exit: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit.thread._ZNK17btCollisionObject8isActiveEv.exit_crit_edge, %15, %15, %15 - %20 = phi i32 [ %.pre, %_ZNK17btCollisionObject8isActiveEv.exit.thread._ZNK17btCollisionObject8isActiveEv.exit_crit_edge ], [ %9, %15 ], [ %9, %15 ], [ %9, %15 ] +_ZNK17btCollisionObject8isActiveEv.exit: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit.thread._ZNK17btCollisionObject8isActiveEv.exit_crit_edge, %15 + %20 = phi i32 [ %.pre, %._crit_edge9 ], [ %9, %15 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %21 = sext i32 %20 to i64 %22 = icmp slt i64 %indvars.iv.next, %21 diff --git a/bench/bullet3/optimized/btSimulationIslandManager.ll b/bench/bullet3/optimized/btSimulationIslandManager.ll index 608929774e5..7388a64f367 100644 --- a/bench/bullet3/optimized/btSimulationIslandManager.ll +++ b/bench/bullet3/optimized/btSimulationIslandManager.ll @@ -1043,9 +1043,9 @@ _ZN20btAlignedObjectArrayIP20btPersistentManifoldE9quickSortI33btPersistentManif %smax = call i32 @llvm.smax.i32(i32 %9, i32 %69) br label %70 -70: ; preds = %64, %_ZNK17btCollisionObject8isActiveEv.exit - %indvars.iv = phi i64 [ %66, %64 ], [ %indvars.iv.next, %_ZNK17btCollisionObject8isActiveEv.exit ] - %.05198 = phi i1 [ true, %64 ], [ %113, %_ZNK17btCollisionObject8isActiveEv.exit ] +70: ; preds = %64, %104 + %indvars.iv = phi i64 [ %66, %64 ], [ %indvars.iv.next, %104 ] + %.05198 = phi i1 [ true, %64 ], [ %spec.select, %104 ] %71 = load ptr, ptr %55, align 8, !tbaa !70 %72 = getelementptr inbounds %struct.btElement, ptr %71, i64 %indvars.iv %73 = load i32, ptr %72, align 4, !tbaa !55 @@ -1143,17 +1143,13 @@ _ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i: ; preds store i32 %109, ptr %57, align 4, !tbaa !23 %110 = getelementptr inbounds nuw i8, ptr %81, i64 240 %111 = load i32, ptr %110, align 8, !tbaa !72 - switch i32 %111, label %112 [ - i32 6, label %_ZNK17btCollisionObject8isActiveEv.exit - i32 2, label %_ZNK17btCollisionObject8isActiveEv.exit - i32 5, label %_ZNK17btCollisionObject8isActiveEv.exit - ] - -112: ; preds = %104 - br label %_ZNK17btCollisionObject8isActiveEv.exit - -_ZNK17btCollisionObject8isActiveEv.exit: ; preds = %104, %104, %104, %112 - %113 = phi i1 [ false, %112 ], [ %.05198, %104 ], [ %.05198, %104 ], [ %.05198, %104 ] + %112 = icmp ugt i32 %111, 6 + %switch.cast.i = trunc i32 %111 to i7 + %switch.downshift.i = lshr i7 27, %switch.cast.i + %switch.masked.i = trunc i7 %switch.downshift.i to i1 + %113 = select i1 %112, i1 true, i1 %switch.masked.i + %not. = xor i1 %113, true + %spec.select = select i1 %not., i1 %.05198, i1 false %indvars.iv.next = add nsw i64 %indvars.iv, 1 %114 = icmp slt i64 %indvars.iv.next, %62 br i1 %114, label %70, label %.critedge, !llvm.loop !88 @@ -1167,9 +1163,9 @@ _ZNK17btCollisionObject8isActiveEv.exit: ; preds = %104, %104, %104, %1 %117 = trunc nsw i64 %indvars.iv to i32 br label %.critedge -.critedge: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit, %.critedge.split.loop.exit119 - %.051.lcssa = phi i1 [ %.05198, %.critedge.split.loop.exit119 ], [ %113, %_ZNK17btCollisionObject8isActiveEv.exit ] - %.0.lcssa = phi i32 [ %117, %.critedge.split.loop.exit119 ], [ %smax, %_ZNK17btCollisionObject8isActiveEv.exit ] +.critedge: ; preds = %104, %.critedge.split.loop.exit119 + %.051.lcssa = phi i1 [ %.05198, %.critedge.split.loop.exit119 ], [ %spec.select, %104 ] + %.0.lcssa = phi i32 [ %117, %.critedge.split.loop.exit119 ], [ %smax, %104 ] %118 = icmp slt i32 %.059100, %38 br i1 %118, label %119, label %155 diff --git a/bench/c3c/optimized/sema_casts.ll b/bench/c3c/optimized/sema_casts.ll index e8aa7176448..60bd6cd29c4 100644 --- a/bench/c3c/optimized/sema_casts.ll +++ b/bench/c3c/optimized/sema_casts.ll @@ -2499,29 +2499,27 @@ define internal noundef zeroext i1 @rule_ptr_to_interface(ptr noundef readonly c 15: ; preds = %11, %4 %.030 = phi i32 [ %14, %11 ], [ %9, %4 ] - switch i32 %.030, label %.critedge [ - i32 26, label %16 - i32 27, label %16 - i32 24, label %16 - i32 32, label %16 - i32 30, label %16 - i32 29, label %16 - ] - -16: ; preds = %15, %15, %15, %15, %15, %15 - %17 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %16 = icmp ult i32 %.030, 33 + %switch.cast = zext nneg i32 %.030 to i33 + %switch.downshift = lshr i33 -2466250752, %switch.cast + %switch.masked = trunc i33 %switch.downshift to i1 + %.0 = select i1 %16, i1 %switch.masked, i1 false + br i1 %.0, label %17, label %.loopexit + +17: ; preds = %15 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %19 = load ptr, ptr %18, align 8 + %17 = getelementptr inbounds nuw i8, ptr %19, i64 56 %18 = load ptr, ptr %17, align 8 - %19 = getelementptr inbounds nuw i8, ptr %18, i64 56 + %19 = getelementptr inbounds nuw i8, ptr %8, i64 56 %20 = load ptr, ptr %19, align 8 - %21 = getelementptr inbounds nuw i8, ptr %8, i64 56 + %21 = getelementptr inbounds nuw i8, ptr %23, i64 80 %22 = load ptr, ptr %21, align 8 - %23 = getelementptr inbounds nuw i8, ptr %22, i64 80 - %24 = load ptr, ptr %23, align 8 - %.not = icmp eq ptr %24, null - br i1 %.not, label %.critedge, label %25 + %.not = icmp eq ptr %22, null + br i1 %.not, label %.loopexit, label %26 -25: ; preds = %16 - %26 = getelementptr inbounds i8, ptr %24, i64 -8 +25: ; preds = %17 + %26 = getelementptr inbounds i8, ptr %25, i64 -8 %27 = load i32, ptr %26, align 4 %.not36 = icmp eq i32 %27, 0 br i1 %.not36, label %.critedge, label %.lr.ph.preheader @@ -2536,8 +2534,8 @@ define internal noundef zeroext i1 @rule_ptr_to_interface(ptr noundef readonly c br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !7 .lr.ph: ; preds = %.lr.ph.preheader, %28 - %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %28 ] - %29 = getelementptr inbounds nuw ptr, ptr %24, i64 %indvars.iv + %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %29 ] + %29 = getelementptr inbounds nuw ptr, ptr %25, i64 %indvars.iv %30 = load ptr, ptr %29, align 8 %31 = load ptr, ptr %0, align 8 %32 = tail call zeroext i1 @sema_resolve_type_info(ptr noundef %31, ptr noundef %30, i32 noundef 2) #10 @@ -2546,10 +2544,10 @@ define internal noundef zeroext i1 @rule_ptr_to_interface(ptr noundef readonly c 33: ; preds = %.lr.ph %34 = getelementptr inbounds nuw i8, ptr %30, i64 8 %35 = load ptr, ptr %34, align 8 - %36 = icmp eq ptr %35, %20 + %36 = icmp eq ptr %35, %21 br i1 %36, label %.loopexit, label %28 -.critedge: ; preds = %28, %16, %25, %15 +.critedge: ; preds = %28, %17, %25, %15 br i1 %2, label %.loopexit, label %37 37: ; preds = %.critedge @@ -2566,7 +2564,7 @@ define internal noundef zeroext i1 @rule_ptr_to_interface(ptr noundef readonly c br label %.loopexit .loopexit: ; preds = %33, %.lr.ph, %.critedge, %3, %37 - %.032 = phi i1 [ false, %37 ], [ true, %3 ], [ false, %.critedge ], [ %32, %.lr.ph ], [ %32, %33 ] + %.032 = phi i1 [ false, %38 ], [ true, %3 ], [ false, %.loopexit ], [ %32, %.lr.ph ], [ %32, %34 ] ret i1 %.032 } @@ -2850,7 +2848,7 @@ define internal zeroext i1 @rule_sa_to_ptr(ptr noundef readonly captures(none) % unreachable switch.lookup: ; preds = %29 - %switch.cast = trunc nuw i32 %switch.tableidx to i4 + %switch.cast = trunc nuw nsw i32 %switch.tableidx to i4 %switch.downshift = lshr i4 -4, %switch.cast %switch.masked = trunc i4 %switch.downshift to i1 %40 = getelementptr i8, ptr %0, i64 8 diff --git a/bench/c3c/optimized/stringutils.ll b/bench/c3c/optimized/stringutils.ll index 3a71e13370d..bae9e3798be 100644 --- a/bench/c3c/optimized/stringutils.ll +++ b/bench/c3c/optimized/stringutils.ll @@ -401,59 +401,24 @@ scan_past_underscore.exit: ; preds = %2 %7 = icmp ult i8 %6, 26 br i1 %7, label %.preheader, label %scan_past_underscore.exit.thread -.preheader: ; preds = %scan_past_underscore.exit, %.preheader.backedge - %.pn = phi ptr [ %.0, %.preheader.backedge ], [ %.0.i, %scan_past_underscore.exit ] +.preheader: ; preds = %scan_past_underscore.exit, %9 + %.pn = phi ptr [ %.0, %9 ], [ %.0.i, %scan_past_underscore.exit ] %.0 = getelementptr inbounds nuw i8, ptr %.pn, i64 1 %8 = load i8, ptr %.0, align 1 - switch i8 %8, label %scan_past_underscore.exit.thread [ - i8 0, label %scan_past_underscore.exit.thread.loopexit - i8 65, label %.preheader.backedge - i8 66, label %.preheader.backedge - i8 67, label %.preheader.backedge - i8 68, label %.preheader.backedge - i8 69, label %.preheader.backedge - i8 70, label %.preheader.backedge - i8 71, label %.preheader.backedge - i8 72, label %.preheader.backedge - i8 73, label %.preheader.backedge - i8 74, label %.preheader.backedge - i8 75, label %.preheader.backedge - i8 76, label %.preheader.backedge - i8 77, label %.preheader.backedge - i8 78, label %.preheader.backedge - i8 79, label %.preheader.backedge - i8 80, label %.preheader.backedge - i8 81, label %.preheader.backedge - i8 82, label %.preheader.backedge - i8 83, label %.preheader.backedge - i8 84, label %.preheader.backedge - i8 85, label %.preheader.backedge - i8 86, label %.preheader.backedge - i8 87, label %.preheader.backedge - i8 88, label %.preheader.backedge - i8 89, label %.preheader.backedge - i8 90, label %.preheader.backedge - i8 48, label %.preheader.backedge - i8 49, label %.preheader.backedge - i8 50, label %.preheader.backedge - i8 51, label %.preheader.backedge - i8 52, label %.preheader.backedge - i8 53, label %.preheader.backedge - i8 54, label %.preheader.backedge - i8 55, label %.preheader.backedge - i8 56, label %.preheader.backedge - i8 57, label %.preheader.backedge - i8 95, label %.preheader.backedge - ] - -.preheader.backedge: ; preds = %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader, %.preheader - br label %.preheader, !llvm.loop !16 + %.not8 = icmp eq i8 %8, 0 + br i1 %.not8, label %scan_past_underscore.exit.thread, label %9 scan_past_underscore.exit.thread.loopexit: ; preds = %.preheader - br label %scan_past_underscore.exit.thread + %switch.tableidx.i = add i8 %8, -48 + %10 = icmp ult i8 %switch.tableidx.i, 48 + %switch.cast.i = zext nneg i8 %switch.tableidx.i to i48 + %switch.downshift.i = lshr i48 -131941395463169, %switch.cast.i + %switch.masked.i = trunc i48 %switch.downshift.i to i1 + %.0.i9 = select i1 %10, i1 %switch.masked.i, i1 false + br i1 %.0.i9, label %.preheader, label %scan_past_underscore.exit.thread, !llvm.loop !16 scan_past_underscore.exit.thread: ; preds = %2, %.preheader, %scan_past_underscore.exit.thread.loopexit, %scan_past_underscore.exit - %.06 = phi i1 [ false, %scan_past_underscore.exit ], [ true, %scan_past_underscore.exit.thread.loopexit ], [ false, %.preheader ], [ false, %2 ] + %.06 = phi i1 [ false, %scan_past_underscore.exit ], [ %.not8, %9 ], [ %.not8, %.preheader ], [ false, %2 ] ret i1 %.06 } diff --git a/bench/ceres/optimized/solver.ll b/bench/ceres/optimized/solver.ll index a5f034c85d6..96a6be5c71a 100644 --- a/bench/ceres/optimized/solver.ll +++ b/bench/ceres/optimized/solver.ll @@ -13061,22 +13061,17 @@ _ZN5Eigen6MatrixIdLin1ELi1ELi0ELin1ELi1EEC2ERKS1_.exit.i: ; preds = %_ZN5Eigen8i 417: ; preds = %410 %418 = getelementptr inbounds nuw i8, ptr %3, i64 4 %419 = load i32, ptr %418, align 4, !tbaa !220 - switch i32 %419, label %_ZNK5ceres6Solver7Summary16IsSolutionUsableEv.exit.i [ - i32 0, label %420 - i32 1, label %420 - i32 3, label %420 - ] - -420: ; preds = %417, %417, %417 - %421 = load ptr, ptr %397, align 8, !tbaa !389 - br label %_ZNK5ceres6Solver7Summary16IsSolutionUsableEv.exit.i - -_ZNK5ceres6Solver7Summary16IsSolutionUsableEv.exit.i: ; preds = %420, %417 - %422 = phi ptr [ %421, %420 ], [ %.0.i.i.i.i42.i, %417 ] - %423 = invoke noundef zeroext i1 @_ZN5ceres8internal7Program28StateVectorToParameterBlocksEPKd(ptr noundef nonnull align 8 dereferenceable(56) %373, ptr noundef %422) + %420 = icmp ult i32 %419, 4 + %switch.cast.i.i.i = trunc i32 %419 to i4 + %switch.downshift.i.i.i = lshr i4 -5, %switch.cast.i.i.i + %switch.masked.i.i.i = trunc i4 %switch.downshift.i.i.i to i1 + %421 = select i1 %420, i1 %switch.masked.i.i.i, i1 false + %422 = load ptr, ptr %397, align 8 + %spec.select = select i1 %421, ptr %422, ptr %.0.i.i.i.i42.i + %423 = invoke noundef zeroext i1 @_ZN5ceres8internal7Program28StateVectorToParameterBlocksEPKd(ptr noundef nonnull align 8 dereferenceable(56) %373, ptr noundef %spec.select) to label %424 unwind label %432 -424: ; preds = %_ZNK5ceres6Solver7Summary16IsSolutionUsableEv.exit.i +424: ; preds = %417 invoke void @_ZN5ceres8internal7Program34CopyParameterBlockStateToUserStateEv(ptr noundef nonnull align 8 dereferenceable(56) %373) to label %425 unwind label %432 @@ -13102,7 +13097,7 @@ _ZNSt10unique_ptrIN5ceres8internal9MinimizerESt14default_deleteIS2_EED2Ev.exit.i cleanup br label %_ZNSt10unique_ptrIN5ceres8internal9MinimizerESt14default_deleteIS2_EED2Ev.exit35.i -432: ; preds = %424, %_ZNK5ceres6Solver7Summary16IsSolutionUsableEv.exit.i, %410 +432: ; preds = %424, %417, %410 %433 = landingpad { ptr, i32 } cleanup %434 = load ptr, ptr %17, align 8, !tbaa !391 @@ -18073,15 +18068,14 @@ declare noundef ptr @_ZN5ceres22LineSearchTypeToStringENS_14LineSearchTypeE(i32 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @_ZNK5ceres6Solver7Summary16IsSolutionUsableEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(512) %0) local_unnamed_addr #16 align 2 { -_ZN5ceres8internal16IsSolutionUsableINS_6Solver7SummaryEEEbRKT_.exit: - %1 = getelementptr inbounds nuw i8, ptr %0, i64 4 - %2 = load i32, ptr %1, align 4, !tbaa !220 - %3 = icmp ult i32 %2, 4 - %switch.cast = trunc i32 %2 to i4 - %switch.downshift = lshr i4 -5, %switch.cast - %switch.masked = trunc i4 %switch.downshift to i1 - %4 = select i1 %3, i1 %switch.masked, i1 false - ret i1 %4 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 4 + %3 = load i32, ptr %2, align 4, !tbaa !220 + %4 = icmp ult i32 %3, 4 + %switch.cast.i = trunc i32 %3 to i4 + %switch.downshift.i = lshr i4 -5, %switch.cast.i + %switch.masked.i = trunc i4 %switch.downshift.i to i1 + %5 = select i1 %4, i1 %switch.masked.i, i1 false + ret i1 %5 } ; Function Attrs: mustprogress uwtable diff --git a/bench/chibicc/optimized/type.ll b/bench/chibicc/optimized/type.ll index 05f20223e18..d27461d4c6f 100644 --- a/bench/chibicc/optimized/type.ll +++ b/bench/chibicc/optimized/type.ll @@ -47,15 +47,17 @@ define dso_local zeroext i1 @is_integer(ptr noundef readonly captures(none) %0) ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local zeroext i1 @is_flonum(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { -switch.edge: - %1 = load i32, ptr %0, align 8, !tbaa !7 - %.off = add i32 %1, -6 - %switch = icmp ult i32 %.off, 3 - ret i1 %switch + %2 = load i32, ptr %0, align 8, !tbaa !7 + %3 = icmp ult i32 %2, 9 + %switch.cast = trunc i32 %2 to i9 + %switch.downshift = lshr i9 -64, %switch.cast + %switch.masked = trunc i9 %switch.downshift to i1 + %4 = select i1 %3, i1 %switch.masked, i1 false + ret i1 %4 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable -define dso_local noundef zeroext i1 @is_numeric(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { +define dso_local zeroext i1 @is_numeric(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = load i32, ptr %0, align 8, !tbaa !7 %switch.tableidx = add i32 %2, -1 %3 = icmp ult i32 %switch.tableidx, 9 @@ -66,12 +68,15 @@ define dso_local noundef zeroext i1 @is_numeric(ptr noundef readonly captures(no br i1 %or.cond, label %switch.lookup, label %4 4: ; preds = %1 - %.off.i = add i32 %2, -6 - %switch.i = icmp ult i32 %.off.i, 3 + %5 = icmp ult i32 %2, 9 + %switch.cast.i = trunc i32 %2 to i9 + %switch.downshift.i = lshr i9 -64, %switch.cast.i + %switch.masked.i = trunc i9 %switch.downshift.i to i1 + %6 = select i1 %5, i1 %switch.masked.i, i1 false br label %switch.lookup switch.lookup: ; preds = %1, %4 - %5 = phi i1 [ %switch.i, %4 ], [ true, %1 ] + %5 = phi i1 [ %6, %4 ], [ true, %1 ] ret i1 %5 } diff --git a/bench/clamav/optimized/cmddata.ll b/bench/clamav/optimized/cmddata.ll index 8156e1255fb..cfeda2b3a0a 100644 --- a/bench/clamav/optimized/cmddata.ll +++ b/bench/clamav/optimized/cmddata.ll @@ -1337,31 +1337,29 @@ _ZN5ArrayIwE5AllocEm.exit: ; preds = %.lr.ph.split, %38, to label %.noexc17 unwind label %65 .noexc17: ; preds = %.noexc16 - switch i32 %54, label %_ZN11CommandData9ParseDoneEv.exit [ - i32 88, label %switch.edge.i - i32 69, label %switch.edge.i - i32 80, label %switch.edge.i - i32 86, label %59 - i32 76, label %59 - ] - -switch.edge.i: ; preds = %.noexc17, %.noexc17, %.noexc17 - %55 = getelementptr inbounds nuw i8, ptr %0, i64 58617 - %56 = load i8, ptr %55, align 1, !tbaa !88, !range !40, !noundef !41 - %57 = trunc nuw i8 %56 to i1 - br i1 %57, label %58, label %switch.edge.thread.i - -58: ; preds = %switch.edge.i - store i8 0, ptr %55, align 1, !tbaa !88 + %switch.tableidx.i = add i32 %54, -69 + %55 = icmp ult i32 %switch.tableidx.i, switch.edge.thread + %switch.cast.i = trunc i32 %switch.tableidx.i to iswitch.edge.thread + %switch.downshift.i = lshr i20 -522239, %switch.cast.i + %switch.masked.i = trunc i20 %switch.downshift.i to i1 + %56 = select i1 %55, i1 %switch.masked.i, i1 false + %57 = getelementptr inbounds nuw i8, ptr %0, i64 58617 + %58 = load i8, ptr %57, align 1, !tbaa !88, !range !40, !noundef !41 + %59 = trunc nuw i8 %58 to i1 + %or.cond3.i = and i1 %56, %59 + br i1 %or.cond3.i, label %60, label %61 + +60: ; preds = %.noexc17 + store i8 0, ptr %57, align 1, !tbaa !88 br label %switch.edge.thread.i -switch.edge.thread.i: ; preds = %58, %switch.edge.i +switch.edge.thread.i: ; preds = %60, %.noexc17 switch i32 %54, label %_ZN11CommandData9ParseDoneEv.exit [ i32 86, label %59 i32 76, label %59 ] -59: ; preds = %switch.edge.thread.i, %switch.edge.thread.i, %.noexc17, %.noexc17 +59: ; preds = %switch.edge.thread.i, %switch.edge.thread.i %60 = getelementptr inbounds nuw i8, ptr %0, i64 83480 %61 = load i32, ptr %60, align 8, !tbaa !11 %62 = icmp eq i32 %61, 66 @@ -1377,7 +1375,7 @@ switch.edge.thread.i: ; preds = %58, %switch.edge.i cleanup br label %68 -_ZN11CommandData9ParseDoneEv.exit: ; preds = %63, %59, %switch.edge.thread.i, %.noexc17, %._crit_edge +_ZN11CommandData9ParseDoneEv.exit: ; preds = %63, %59, %switch.edge.thread.i, %._crit_edge %.not.i = icmp eq ptr %.sroa.0.0.lcssa, null br i1 %.not.i, label %_ZN5ArrayIwED2Ev.exit, label %67 @@ -1389,8 +1387,8 @@ _ZN5ArrayIwED2Ev.exit: ; preds = %_ZN11CommandData9Pa ret void 68: ; preds = %.split, %.split.us, %65 - %.sroa.0.2 = phi ptr [ %.sroa.0.0.lcssa, %65 ], [ %.sroa.0.1, %.split ], [ %.sroa.0.1.us, %.split.us ] - %.pn = phi { ptr, i32 } [ %66, %65 ], [ %42, %.split ], [ %25, %.split.us ] + %.sroa.0.2 = phi ptr [ %.sroa.0.0.lcssa, %68 ], [ %.sroa.0.1, %.split ], [ %.sroa.0.1.us, %.split.us ] + %.pn = phi { ptr, i32 } [ %66, %68 ], [ %42, %.split ], [ %25, %.split.us ] %.not.i18 = icmp eq ptr %.sroa.0.2, null br i1 %.not.i18, label %_ZN5ArrayIwED2Ev.exit19, label %69 @@ -1717,31 +1715,29 @@ define void @_ZN11CommandData9ParseDoneEv(ptr noundef nonnull align 8 dereferenc %11 = getelementptr inbounds nuw i8, ptr %0, i64 83476 %12 = load i32, ptr %11, align 4, !tbaa !11 %13 = tail call noundef i32 @_Z8toupperwi(i32 noundef %12) - switch i32 %13, label %24 [ - i32 88, label %switch.edge - i32 69, label %switch.edge - i32 80, label %switch.edge - i32 86, label %18 - i32 76, label %18 - ] - -switch.edge: ; preds = %10, %10, %10 - %14 = getelementptr inbounds nuw i8, ptr %0, i64 58617 - %15 = load i8, ptr %14, align 1, !tbaa !88, !range !40, !noundef !41 - %16 = trunc nuw i8 %15 to i1 - br i1 %16, label %17, label %switch.edge.thread - -17: ; preds = %switch.edge - store i8 0, ptr %14, align 1, !tbaa !88 + %switch.tableidx = add i32 %13, -69 + %14 = icmp ult i32 %switch.tableidx, switch.edge.thread + %switch.cast = trunc i32 %switch.tableidx to iswitch.edge.thread + %switch.downshift = lshr i20 -522239, %switch.cast + %switch.masked = trunc i20 %switch.downshift to i1 + %15 = select i1 %14, i1 %switch.masked, i1 false + %16 = getelementptr inbounds nuw i8, ptr %0, i64 58617 + %17 = load i8, ptr %16, align 1, !tbaa !88, !range !40, !noundef !41 + %18 = trunc nuw i8 %17 to i1 + %or.cond3 = and i1 %15, %18 + br i1 %or.cond3, label %19, label %20 + +19:; preds = %10 + store i8 0, ptr %16, align 1, !tbaa !88 br label %switch.edge.thread -switch.edge.thread: ; preds = %17, %switch.edge - switch i32 %13, label %24 [ +switch.edge.thread: ; preds = %19, %10 + switch i32 %13, label %27 [ i32 86, label %18 i32 76, label %18 ] -18: ; preds = %10, %10, %switch.edge.thread, %switch.edge.thread +18: ; preds = %switch.edge.thread, %switch.edge.thread %19 = getelementptr inbounds nuw i8, ptr %0, i64 83480 %20 = load i32, ptr %19, align 8, !tbaa !11 %21 = icmp eq i32 %20, 66 @@ -1752,7 +1748,7 @@ switch.edge.thread: ; preds = %17, %switch.edge store i8 1, ptr %23, align 8, !tbaa !84 br label %24 -24: ; preds = %10, %switch.edge.thread, %22, %18 +24: ; preds = %switch.edge.thread, %22, %18 ret void } diff --git a/bench/clap-rs/optimized/28kpmq8k0hu4re4f.ll b/bench/clap-rs/optimized/28kpmq8k0hu4re4f.ll index 2e8ada2b25d..076c7ef1e97 100644 --- a/bench/clap-rs/optimized/28kpmq8k0hu4re4f.ll +++ b/bench/clap-rs/optimized/28kpmq8k0hu4re4f.ll @@ -2498,16 +2498,18 @@ _ZN12clap_builder7builder6action9ArgAction20default_value_parser17h677de5ca7fb5f 104: ; preds = %103 %105 = load i8, ptr %7, align 4, !range !444, !alias.scope !584, !noundef !4 %106 = icmp eq i8 %105, 9 - %switch.i121 = icmp samesign ult i8 %105, 2 - %switch.i = or i1 %106, %switch.i121 - %.43 = zext i1 %switch.i to i64 + %107 = select i1 %106, i8 0, i8 %105 + %switch.cast.i = zext nneg i8 %107 to i9 + %switch.downshift.i = lshr i9 3, %switch.cast.i + %108 = and i9 %switch.downshift.i, 1 + %.43 = zext nneg i9 %108 to i64 br label %"_ZN4core6option15Option$LT$T$GT$13get_or_insert17hbd34959a348268e9E.exit.sink.split" 107: ; preds = %"_ZN4core3ptr69drop_in_place$LT$clap_builder..builder..value_parser..ValueParser$GT$17h64fc3265e8ce61cfE.exit" br i1 %82, label %"_ZN4core6option15Option$LT$T$GT$13get_or_insert17hbd34959a348268e9E.exit.sink.split", label %"_ZN4core6option15Option$LT$T$GT$13get_or_insert17hbd34959a348268e9E.exit" "_ZN4core6option15Option$LT$T$GT$13get_or_insert17hbd34959a348268e9E.exit.sink.split": ; preds = %107, %104 - %.sink134 = phi i64 [ %.43, %104 ], [ %78, %107 ] + %.sink134 = phi i64 [ %.43, %104 ], [ %78, %109 ] store i64 1, ptr %80, align 8 %.sroa.4.0..sroa_idx.i68 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %.sink134, ptr %.sroa.4.0..sroa_idx.i68, align 8 diff --git a/bench/clap-rs/optimized/4bajo035z6e1d4qz.ll b/bench/clap-rs/optimized/4bajo035z6e1d4qz.ll index fb42b07950d..5204e2636bc 100644 --- a/bench/clap-rs/optimized/4bajo035z6e1d4qz.ll +++ b/bench/clap-rs/optimized/4bajo035z6e1d4qz.ll @@ -3324,9 +3324,12 @@ define hidden noundef align 8 dereferenceable_or_null(8) ptr @"_ZN91_$LT$core..s ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define noundef zeroext i1 @_ZN12clap_builder7builder6action9ArgAction12takes_values17h8517f3e6786dc479E(ptr noalias noundef readonly align 1 captures(none) dereferenceable(1) %0) unnamed_addr #1 { - %2 = load i8, ptr %0, align 1, !range !181, !noundef !5 - %switch = icmp samesign ult i8 %2, 2 - ret i1 %switch +switch.lookup: + %1 = load i8, ptr %0, align 1, !range !181, !noundef !5 + %switch.cast = zext nneg i8 %1 to i9 + %switch.downshift = lshr i9 3, %switch.cast + %switch.masked = trunc i9 %switch.downshift to i1 + ret i1 %switch.masked } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable diff --git a/bench/cmake/optimized/cmFileSet.ll b/bench/cmake/optimized/cmFileSet.ll index 4379a9b17cd..2eaca0d7279 100644 --- a/bench/cmake/optimized/cmFileSet.ll +++ b/bench/cmake/optimized/cmFileSet.ll @@ -301,15 +301,22 @@ declare void @_ZN13cmSystemTools5ErrorERKNSt7__cxx1112basic_stringIcSt11char_tra ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noundef zeroext i1 @_Z28cmFileSetVisibilityIsForSelf19cmFileSetVisibility(i32 noundef %0) local_unnamed_addr #5 { - %switch = icmp ult i32 %0, 2 - ret i1 %switch + %switch = icmp ult i32 %0, 3 + %switch.cast = trunc i32 %0 to i3 + %switch.downshift = lshr i3 3, %switch.cast + %switch.masked = trunc i3 %switch.downshift to i1 + %.0 = select i1 %2, i1 %switch.masked, i1 false + ret i1 %.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noundef zeroext i1 @_Z33cmFileSetVisibilityIsForInterface19cmFileSetVisibility(i32 noundef %0) local_unnamed_addr #5 { - %.off = add i32 %0, -1 - %switch = icmp ult i32 %.off, 2 - ret i1 %switch + %2 = icmp ult i32 %0, 3 + %switch.cast = trunc i32 %0 to i3 + %switch.downshift = lshr i3 -2, %switch.cast + %switch.masked = trunc i3 %switch.downshift to i1 + %.0 = select i1 %2, i1 %switch.masked, i1 false + ret i1 %.0 } ; Function Attrs: mustprogress nofree norecurse nounwind willreturn memory(read, inaccessiblemem: none) uwtable diff --git a/bench/cmake/optimized/zstd_double_fast.ll b/bench/cmake/optimized/zstd_double_fast.ll index 4bd10b02485..279cc08f508 100644 --- a/bench/cmake/optimized/zstd_double_fast.ll +++ b/bench/cmake/optimized/zstd_double_fast.ll @@ -9714,14 +9714,13 @@ ZSTD_compressBlock_doubleFast_dictMatchState_4.exit: ; preds = %ZSTD_compressBlo ; Function Attrs: nofree norecurse nosync nounwind uwtable define dso_local i64 @ZSTD_compressBlock_doubleFast_extDict(ptr noundef readonly captures(none) %0, ptr noundef %1, ptr noundef captures(none) %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #2 { -switch.lookup: - %5 = getelementptr inbounds nuw i8, ptr %0, i64 272 - %6 = load i32, ptr %5, align 8, !tbaa !30 - %switch.tableidx = add i32 %6, -5 - %7 = icmp ult i32 %switch.tableidx, 3 - %spec.select = select i1 %7, i32 %6, i32 4 - %8 = tail call fastcc i64 @ZSTD_compressBlock_doubleFast_extDict_generic(ptr noundef nonnull readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i32 noundef %spec.select) - ret i64 %8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 272 + %7 = load i32, ptr %6, align 8, !tbaa !30 + %switch.tableidx = add i32 %7, -5 + %8 = icmp ult i32 %switch.tableidx, 3 + %.sink = select i1 %8, i32 %7, i32 4 + %9 = tail call fastcc i64 @ZSTD_compressBlock_doubleFast_extDict_generic(ptr noundef nonnull readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i32 noundef %.sink) + ret i64 %9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) diff --git a/bench/coreutils-rs/optimized/19b68zxr4b84grvl.ll b/bench/coreutils-rs/optimized/19b68zxr4b84grvl.ll index 3cd9a2ef321..acfb3a4f20e 100644 --- a/bench/coreutils-rs/optimized/19b68zxr4b84grvl.ll +++ b/bench/coreutils-rs/optimized/19b68zxr4b84grvl.ll @@ -416,16 +416,15 @@ define hidden noundef align 1 dereferenceable_or_null(1) ptr @_ZN4core4iter6trai store ptr %13, ptr %0, align 8, !alias.scope !57 tail call void @llvm.experimental.noalias.scope.decl(metadata !61) %14 = load i8, ptr %10, align 1, !alias.scope !61, !noundef !42 - switch i8 %14, label %"_ZN4core4iter6traits8iterator8Iterator4find5check28_$u7b$$u7b$closure$u7d$$u7d$17h7a4283921e9d1d86E.exit" [ - i8 9, label %.split10 - i8 10, label %.split10 - i8 12, label %.split10 - i8 13, label %.split10 - i8 32, label %.split10 - ] - -.split10: ; preds = %12, %12, %12, %12, %12, %.split10.us - %.us-phi = phi ptr [ %.promoted, %.split10.us ], [ %10, %12 ], [ %10, %12 ], [ %10, %12 ], [ %10, %12 ], [ %10, %12 ] + %15 = icmp ugt i8 %14, 32 + %switch.cast.i.i.i = zext nneg i8 %14 to i33 + %switch.downshift.i.i.i = lshr i33 4294953471, %switch.cast.i.i.i + %switch.masked.i.i.i = trunc i33 %switch.downshift.i.i.i to i1 + %16 = select i1 %15, i1 true, i1 %switch.masked.i.i.i + br i1 %16, label %"_ZN4core4iter6traits8iterator8Iterator4find5check28_$u7b$$u7b$closure$u7d$$u7d$17h7a4283921e9d1d86E.exit", label %.split10 + +.split10: ; preds = %12, %.split10.us + %.us-phi = phi ptr [ %.promoted, %.split10.us ], [ %10, %12 ] store i8 1, ptr %1, align 1, !noalias !61 br label %.loopexit @@ -841,16 +840,15 @@ define hidden noundef align 1 dereferenceable_or_null(1) ptr @"_ZN72_$LT$$RF$mut store ptr %14, ptr %4, align 8, !alias.scope !122, !noalias !125 tail call void @llvm.experimental.noalias.scope.decl(metadata !128) %15 = load i8, ptr %11, align 1, !alias.scope !128, !noalias !131, !noundef !42 - switch i8 %15, label %"_ZN4core4iter6traits8iterator8Iterator4find5check28_$u7b$$u7b$closure$u7d$$u7d$17h7a4283921e9d1d86E.exit.i.i" [ - i8 9, label %.split10.i.i - i8 10, label %.split10.i.i - i8 12, label %.split10.i.i - i8 13, label %.split10.i.i - i8 32, label %.split10.i.i - ] - -.split10.i.i: ; preds = %13, %13, %13, %13, %13, %.split10.us.i.i - %.us-phi.i.i = phi ptr [ %.promoted.i.i, %.split10.us.i.i ], [ %11, %13 ], [ %11, %13 ], [ %11, %13 ], [ %11, %13 ], [ %11, %13 ] + %16 = icmp ugt i8 %15, 32 + %switch.cast.i.i.i.i.i = zext nneg i8 %15 to i33 + %switch.downshift.i.i.i.i.i = lshr i33 4294953471, %switch.cast.i.i.i.i.i + %switch.masked.i.i.i.i.i = trunc i33 %switch.downshift.i.i.i.i.i to i1 + %17 = select i1 %16, i1 true, i1 %switch.masked.i.i.i.i.i + br i1 %17, label %"_ZN4core4iter6traits8iterator8Iterator4find5check28_$u7b$$u7b$closure$u7d$$u7d$17h7a4283921e9d1d86E.exit.i.i", label %.split10.i.i + +.split10.i.i: ; preds = %13, %.split10.us.i.i + %.us-phi.i.i = phi ptr [ %.promoted.i.i, %.split10.us.i.i ], [ %11, %13 ] store i8 1, ptr %1, align 1, !alias.scope !126, !noalias !132 br label %"_ZN79_$LT$$RF$mut$u20$I$u20$as$u20$core..iter..traits..iterator..IteratorRefSpec$GT$13spec_try_fold17h5a4ee2bb0d941629E.llvm.2282624722526689056.exit" @@ -911,16 +909,15 @@ define hidden noundef align 1 dereferenceable_or_null(1) ptr @"_ZN79_$LT$$RF$mut store ptr %14, ptr %4, align 8, !alias.scope !143, !noalias !141 tail call void @llvm.experimental.noalias.scope.decl(metadata !146) %15 = load i8, ptr %11, align 1, !alias.scope !146, !noalias !149, !noundef !42 - switch i8 %15, label %"_ZN4core4iter6traits8iterator8Iterator4find5check28_$u7b$$u7b$closure$u7d$$u7d$17h7a4283921e9d1d86E.exit.i" [ - i8 9, label %.split10.i - i8 10, label %.split10.i - i8 12, label %.split10.i - i8 13, label %.split10.i - i8 32, label %.split10.i - ] - -.split10.i: ; preds = %13, %13, %13, %13, %13, %.split10.us.i - %.us-phi.i = phi ptr [ %.promoted.i, %.split10.us.i ], [ %11, %13 ], [ %11, %13 ], [ %11, %13 ], [ %11, %13 ], [ %11, %13 ] + %16 = icmp ugt i8 %15, 32 + %switch.cast.i.i.i.i = zext nneg i8 %15 to i33 + %switch.downshift.i.i.i.i = lshr i33 4294953471, %switch.cast.i.i.i.i + %switch.masked.i.i.i.i = trunc i33 %switch.downshift.i.i.i.i to i1 + %17 = select i1 %16, i1 true, i1 %switch.masked.i.i.i.i + br i1 %17, label %"_ZN4core4iter6traits8iterator8Iterator4find5check28_$u7b$$u7b$closure$u7d$$u7d$17h7a4283921e9d1d86E.exit.i", label %.split10.i + +.split10.i: ; preds = %13, %.split10.us.i + %.us-phi.i = phi ptr [ %.promoted.i, %.split10.us.i ], [ %11, %13 ] store i8 1, ptr %1, align 1, !alias.scope !141, !noalias !150 br label %_ZN4core4iter6traits8iterator8Iterator8try_fold17h2f48a6622d5bf4a0E.llvm.2282624722526689056.exit diff --git a/bench/coreutils-rs/optimized/1rgvgulc49uxow1y.ll b/bench/coreutils-rs/optimized/1rgvgulc49uxow1y.ll index 98b0de6bc9e..24ee7b1b98a 100644 --- a/bench/coreutils-rs/optimized/1rgvgulc49uxow1y.ll +++ b/bench/coreutils-rs/optimized/1rgvgulc49uxow1y.ll @@ -1974,7 +1974,7 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit97.i: ; preds = %102 store i64 0, ptr %263, align 8, !noalias !220 br i1 %42, label %.loopexit, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" -264: ; preds = %272 +264: ; preds = %271 %265 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr69drop_in_place$LT$alloc..vec..Vec$LT$uu_df..columns..Alignment$GT$$GT$17h7f36860eff862735E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %7) #15 @@ -1985,35 +1985,27 @@ _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit97.i: ; preds = %102 %.sroa.0.03.i = phi ptr [ %267, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h7d1469afa1ad6b1cE.exit.i" ], [ %.val.i, %._crit_edge ] %267 = getelementptr inbounds nuw i8, ptr %.sroa.0.03.i, i64 1 %268 = load i8, ptr %.sroa.0.03.i, align 1, !range !87, !alias.scope !223, !noalias !220, !noundef !5 - switch i8 %268, label %_ZN5uu_df7columns6Column9alignment17h111dd4d8f0b27676E.exit.i [ - i8 0, label %269 - i8 5, label %269 - i8 10, label %269 - i8 11, label %269 - ] - -269: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" - br label %_ZN5uu_df7columns6Column9alignment17h111dd4d8f0b27676E.exit.i - -_ZN5uu_df7columns6Column9alignment17h111dd4d8f0b27676E.exit.i: ; preds = %269, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" - %.0.i3.i = phi i8 [ 0, %269 ], [ 1, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" ] - %270 = load i64, ptr %7, align 8, !alias.scope !226, !noalias !220, !noundef !5 - %271 = icmp eq i64 %266, %270 - br i1 %271, label %272, label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h7d1469afa1ad6b1cE.exit.i" - -272: ; preds = %_ZN5uu_df7columns6Column9alignment17h111dd4d8f0b27676E.exit.i + %switch.cast.i.i = zext nneg i8 %268 to i12 + %switch.downshift.i.i = lshr i12 990, %switch.cast.i.i + %switch.masked.i.i = trunc i12 %switch.downshift.i.i to i8 + %269 = load i64, ptr %7, align 8, !alias.scope !226, !noalias !220, !noundef !5 + %270 = icmp eq i64 %266, %269 + br i1 %270, label %271, label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h7d1469afa1ad6b1cE.exit.i" + +269: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" invoke void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17h09e3e0b2cd485930E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %266) to label %.noexc.i unwind label %264, !noalias !220 -.noexc.i: ; preds = %272 +.noexc.i: ; preds = %271 %.pre.i.i96 = load i64, ptr %263, align 8, !alias.scope !226, !noalias !220 br label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h7d1469afa1ad6b1cE.exit.i" -"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h7d1469afa1ad6b1cE.exit.i": ; preds = %.noexc.i, %_ZN5uu_df7columns6Column9alignment17h111dd4d8f0b27676E.exit.i - %273 = phi i64 [ %.pre.i.i96, %.noexc.i ], [ %266, %_ZN5uu_df7columns6Column9alignment17h111dd4d8f0b27676E.exit.i ] +"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h7d1469afa1ad6b1cE.exit.i": ; preds = %.noexc.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" + %273 = phi i64 [ %.pre.i.i96, %.noexc.i ], [ %266, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hd592c58851bdcca6E.exit.i" ] %274 = load ptr, ptr %262, align 8, !alias.scope !226, !noalias !220, !nonnull !5, !noundef !5 %275 = getelementptr inbounds i8, ptr %274, i64 %273 - store i8 %.0.i3.i, ptr %275, align 1, !noalias !220 + %275 = and i8 %switch.masked.i.i, 1 + store i8 %275, ptr %274, align 1, !noalias !220 %276 = load i64, ptr %263, align 8, !alias.scope !226, !noalias !220, !noundef !5 %277 = add i64 %276, 1 store i64 %277, ptr %263, align 8, !alias.scope !226, !noalias !220 diff --git a/bench/coreutils-rs/optimized/4tt85gim3dxp9l65.ll b/bench/coreutils-rs/optimized/4tt85gim3dxp9l65.ll index b472e8f068a..8f3d0299869 100644 --- a/bench/coreutils-rs/optimized/4tt85gim3dxp9l65.ll +++ b/bench/coreutils-rs/optimized/4tt85gim3dxp9l65.ll @@ -535,32 +535,23 @@ define hidden void @_ZN7uu_uniq4Uniq11skip_fields17h045fd07c67dab289E(ptr noalia %.057 = phi i1 [ false, %.lr.ph ], [ true, %65 ] %31 = add nuw i64 %.sroa.01.058, 1 call void @llvm.experimental.noalias.scope.decl(metadata !57) - %32 = icmp eq ptr %.promoted.i, %30 - br i1 %32, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread", label %.lr.ph.i + br label %.lr.ph.i -.lr.ph.i: ; preds = %29, %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - %33 = phi ptr [ %34, %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" ], [ %.promoted.i, %29 ] - %34 = getelementptr inbounds nuw i8, ptr %33, i64 1 - %.val.i = load i8, ptr %33, align 1, !noalias !57, !noundef !5 - switch i8 %.val.i, label %49 [ - i8 9, label %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - i8 10, label %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - i8 12, label %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - i8 13, label %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - i8 32, label %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - ] +.lr.ph.i: ; preds = %35, %29 + %33 = phi ptr [ %36, %35 ], [ %.promoted.i, %29 ] + %34 = icmp eq ptr %33, %30 + br i1 %34, label %49, label %35 -"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i": ; preds = %.lr.ph.i, %.lr.ph.i, %.lr.ph.i, %.lr.ph.i, %.lr.ph.i - %35 = icmp eq ptr %34, %30 - br i1 %35, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread39", label %.lr.ph.i - -"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread39": ; preds = %"_ZN7uu_uniq4Uniq11skip_fields28_$u7b$$u7b$closure$u7d$$u7d$17h9aa502c02bcb97abE.exit.i" - %.promoted14.i.le = ptrtoint ptr %.promoted.i to i64 - %36 = ptrtoint ptr %30 to i64 - %37 = sub i64 %36, %.promoted14.i.le - %scevgep.i.le = getelementptr i8, ptr %.promoted.i, i64 %37 - store ptr %scevgep.i.le, ptr %10, align 8, !alias.scope !60 - br label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread" +"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread39": ; preds = %32 + %36 = getelementptr inbounds nuw i8, ptr %33, i64 1 + store ptr %36, ptr %10, align 8, !alias.scope !60 + %.val.i = load i8, ptr %33, align 1, !noalias !57, !noundef !5 + %37 = icmp ult i8 %.val.i, 33 + %switch.cast.i.i = zext nneg i8 %.val.i to i33 + %switch.downshift.i.i = lshr i33 -4294953472, %switch.cast.i.i + %switch.masked.i.i = trunc i33 %switch.downshift.i.i to i1 + %.0.i3.i = select i1 %37, i1 %switch.masked.i.i, i1 false + br i1 %.0.i3.i, label %32, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit" "_ZN98_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter..SpecFromIter$LT$T$C$I$GT$$GT$9from_iter17haef6d4e5073b8196E.exit": ; preds = %._crit_edge br i1 %.not59.not, label %38, label %39 @@ -596,13 +587,12 @@ define hidden void @_ZN7uu_uniq4Uniq11skip_fields17h045fd07c67dab289E(ptr noalia 48: ; preds = %68, %38, %21 ret void -49: ; preds = %.lr.ph.i - store ptr %34, ptr %10, align 8, !alias.scope !60 +49: ; preds = %35 call void @llvm.lifetime.start.p0(ptr nonnull %8) invoke void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h7d2638e58844606bE.llvm.4276902924170587024"(ptr noalias noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 captures(none) dereferenceable(24) %8, ptr noalias noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext false) to label %"_ZN98_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter..SpecFromIter$LT$T$C$I$GT$$GT$9from_iter17h3f0eef8f22be793dE.exit" unwind label %.loopexit -"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread": ; preds = %29, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread39" +"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3all17haad36e100e0f417eE.exit.thread": ; preds = %32 store i64 0, ptr %0, align 8 %50 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr inttoptr (i64 1 to ptr), ptr %50, align 8 diff --git a/bench/coreutils-rs/optimized/4ws6541n7p4pbb05.ll b/bench/coreutils-rs/optimized/4ws6541n7p4pbb05.ll index 219d6575e7a..b146d3960fe 100644 --- a/bench/coreutils-rs/optimized/4ws6541n7p4pbb05.ll +++ b/bench/coreutils-rs/optimized/4ws6541n7p4pbb05.ll @@ -102,23 +102,21 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define internal noundef zeroext i1 @_ZN4core3ops8function6FnOnce9call_once17h917e0856d5781b20E(i8 noundef %0) unnamed_addr #0 personality ptr @rust_eh_personality { -"_ZN10fundu_core6config6Config3new28_$u7b$$u7b$closure$u7d$$u7d$17h88c7d6ad87d946ceE.exit": - %1 = icmp ult i8 %0, 33 - %switch.cast = zext nneg i8 %0 to i33 - %switch.downshift = lshr i33 -4294953472, %switch.cast - %switch.masked = trunc i33 %switch.downshift to i1 - %.0.i = select i1 %1, i1 %switch.masked, i1 false + %2 = icmp ult i8 %0, 33 + %switch.cast.i = zext nneg i8 %0 to i33 + %switch.downshift.i = lshr i33 -4294953472, %switch.cast.i + %switch.masked.i = trunc i33 %switch.downshift.i to i1 + %.0.i = select i1 %2, i1 %switch.masked.i, i1 false ret i1 %.0.i } ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define internal noundef zeroext i1 @_ZN4core3ops8function6FnOnce9call_once17hc54516f9dec84065E(i8 noundef %0) unnamed_addr #0 personality ptr @rust_eh_personality { -"_ZN10fundu_core6config6Config3new28_$u7b$$u7b$closure$u7d$$u7d$17h4d2dd2e9e8c59c7cE.exit": - %1 = icmp ult i8 %0, 33 - %switch.cast = zext nneg i8 %0 to i33 - %switch.downshift = lshr i33 -4294953472, %switch.cast - %switch.masked = trunc i33 %switch.downshift to i1 - %.0.i = select i1 %1, i1 %switch.masked, i1 false + %2 = icmp ult i8 %0, 33 + %switch.cast.i = zext nneg i8 %0 to i33 + %switch.downshift.i = lshr i33 -4294953472, %switch.cast.i + %switch.masked.i = trunc i33 %switch.downshift.i to i1 + %.0.i = select i1 %2, i1 %switch.masked.i, i1 false ret i1 %.0.i } diff --git a/bench/cpython/optimized/hamt.ll b/bench/cpython/optimized/hamt.ll index 28fd25d3725..e2e1f33699c 100644 --- a/bench/cpython/optimized/hamt.ll +++ b/bench/cpython/optimized/hamt.ll @@ -5158,13 +5158,12 @@ declare void @PyObject_ClearWeakRefs(ptr noundef) local_unnamed_addr #3 ; Function Attrs: nounwind uwtable define internal range(i32 -1, 2) i32 @hamt_tp_contains(ptr noundef readonly captures(none) %0, ptr noundef %1) #0 { -switch.lookup: - %2 = alloca ptr, align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %2) - %3 = call fastcc i32 @hamt_find(ptr noundef readonly %0, ptr noundef %1, ptr noundef nonnull %2) - %switch.offset = add nsw i32 %3, -1 - call void @llvm.lifetime.end.p0(ptr nonnull %2) - ret i32 %switch.offset + %3 = alloca ptr, align 8 + call void @llvm.lifetime.start.p0(ptr nonnull %3) + %4 = call fastcc i32 @hamt_find(ptr noundef readonly %0, ptr noundef %1, ptr noundef nonnull %3) + %switch.offset.i = add nsw i32 %4, -1 + call void @llvm.lifetime.end.p0(ptr nonnull %3) + ret i32 %switch.offset.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable diff --git a/bench/csmith/optimized/StatementAssign.ll b/bench/csmith/optimized/StatementAssign.ll index 5ee44082c1a..2e09c68637c 100644 --- a/bench/csmith/optimized/StatementAssign.ll +++ b/bench/csmith/optimized/StatementAssign.ll @@ -108,7 +108,6 @@ $_ZNSt8_Rb_treeIPK9StatementSt4pairIKS2_6EffectESt10_Select1stIS6_ESt4lessIS2_ES @.str.24 = private unnamed_addr constant [26 x i8] c"vector::_M_realloc_insert\00", align 1 @_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" zeroinitializer, align 1 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_StatementAssign.cpp, ptr null }] -@switch.table._ZN15StatementAssign11make_randomER9CGContextPK4TypePK12CVQualifiers = private unnamed_addr constant [6 x i32] [i32 0, i32 1, i32 2, i32 0, i32 4, i32 5], align 4 @switch.table._ZN15StatementAssign22compound_to_binary_opsE10eAssignOps = private unnamed_addr constant [14 x i32] [i32 2, i32 3, i32 4, i32 0, i32 1, i32 17, i32 16, i32 14, i32 13, i32 15, i32 0, i32 1, i32 0, i32 1], align 4 @_ZN15StatementAssignC1EP5BlockRK3LhsRK10Expression10eAssignOpsPK11SafeOpFlags = dso_local unnamed_addr alias void (ptr, ptr, ptr, ptr, i32, ptr), ptr @_ZN15StatementAssignC2EP5BlockRK3LhsRK10Expression10eAssignOpsPK11SafeOpFlags @@ -765,16 +764,15 @@ _ZNK12CVQualifiers11is_volatileEv.exit: ; preds = %96 206: ; preds = %199, %185 %207 = icmp ult i32 %12, 6 - br i1 %207, label %switch.lookup, label %_ZN15StatementAssign21AssignOpWorksForFloatE10eAssignOps.exit - -switch.lookup: ; preds = %206 - %208 = zext nneg i32 %12 to i64 - %switch.gep = getelementptr inbounds nuw i32, ptr @switch.table._ZN15StatementAssign11make_randomER9CGContextPK4TypePK12CVQualifiers, i64 %208 - %switch.load = load i32, ptr %switch.gep, align 4 - br label %_ZN15StatementAssign21AssignOpWorksForFloatE10eAssignOps.exit + %switch.cast.i = trunc i32 %12 to i6 + %switch.downshift.i = lshr i6 -9, %switch.cast.i + %switch.masked.i = trunc i6 %switch.downshift.i to i1 + %.0.i = select i1 %207, i1 %switch.masked.i, i1 false + %spec.select = select i1 %.0.i, i32 %12, i32 0 + br label %208 -_ZN15StatementAssign21AssignOpWorksForFloatE10eAssignOps.exit: ; preds = %switch.lookup, %206, %199 - %.079 = phi i32 [ %12, %199 ], [ 0, %206 ], [ %switch.load, %switch.lookup ] +_ZN15StatementAssign21AssignOpWorksForFloatE10eAssignOps.exit: ; preds = %206, %199 + %.079 = phi i32 [ %12, %199 ], [ %spec.select, %206 ] %209 = invoke noundef zeroext i1 @_ZN17CompatibleChecker16compatible_checkEPK10ExpressionS2_(ptr noundef nonnull %.077, ptr noundef nonnull %156) to label %210 unwind label %144 diff --git a/bench/curl/optimized/http.ll b/bench/curl/optimized/http.ll index ffb37ad3fe0..d3e23180f5a 100644 --- a/bench/curl/optimized/http.ll +++ b/bench/curl/optimized/http.ll @@ -4115,7 +4115,7 @@ define internal fastcc i32 @http_target(ptr noundef readonly captures(none) %0, 51: ; preds = %47 %52 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %spec.select, ptr noundef nonnull dereferenceable(1) @.str.102) #12 %.not91 = icmp eq ptr %52, null - br i1 %.not91, label %.critedge, label %53 + br i1 %.not91, label %.critedge100, label %53 53: ; preds = %51 %54 = getelementptr inbounds nuw i8, ptr %52, i64 6 @@ -4131,32 +4131,36 @@ define internal fastcc i32 @http_target(ptr noundef readonly captures(none) %0, 60: ; preds = %56 %61 = call signext i8 @Curl_raw_toupper(i8 noundef signext %55) #11 - switch i8 %61, label %.critedge [ - i8 65, label %67 - i8 68, label %67 - i8 73, label %67 - ] - -.critedge: ; preds = %60, %51 - %62 = getelementptr inbounds nuw i8, ptr %0, i64 5036 - %63 = load i32, ptr %62, align 4 - %64 = and i32 %63, 16384 - %.not94 = icmp eq i32 %64, 0 - %65 = select i1 %.not94, i32 105, i32 97 - %66 = call i32 (ptr, ptr, ...) @Curl_dyn_addf(ptr noundef nonnull %2, ptr noundef nonnull @.str.103, i32 noundef %65) #11 - %.not95 = icmp eq i32 %66, 0 - br i1 %.not95, label %67, label %.thread + %switch.tableidx = add i8 %61, -65 + %62 = icmp ult i8 %switch.tableidx, 9 + br i1 %62, label %switch.lookup, label %.critedge100 + +switch.lookup: ; preds = %60 + %switch.cast = zext nneg i8 %switch.tableidx to i9 + %switch.downshift = lshr i9 246, %switch.cast + %switch.masked = trunc i9 %switch.downshift to i1 + br i1 %switch.masked, label %.critedge100, label %67 + +.critedge100:; preds = %51, %60, %switch.lookup + %63 = getelementptr inbounds nuw i8, ptr %0, i64 5036 + %64 = load i32, ptr %63, align 4 + %65 = and i32 %64, 16384 + %.not94 = icmp eq i32 %65, 0 + %66 = select i1 %.not94, i32 105, i32 97 + %67 = call i32 (ptr, ptr, ...) @Curl_dyn_addf(ptr noundef nonnull %2, ptr noundef nonnull @.str.103, i32 noundef %66) #11 + %.not95 = icmp eq i32 %67, 0 + br i1 %.not95, label %.critedge, label %.thread .thread.sink.split: ; preds = %33, %31, %26, %24 tail call void @curl_url_cleanup(ptr noundef nonnull %18) #11 br label %.thread -.thread: ; preds = %.thread.sink.split, %35, %15, %37, %.critedge - %.057.ph = phi i32 [ %66, %.critedge ], [ %41, %37 ], [ 27, %15 ], [ 27, %35 ], [ 27, %.thread.sink.split ] +.thread: ; preds = %.thread.sink.split, %35, %15, %37, %.critedge100 + %.057.ph = phi i32 [ %67, %.critedge100 ], [ %41, %37 ], [ 27, %15 ], [ 27, %35 ], [ 27, %.thread.sink.split ] call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %73 -67: ; preds = %.critedge, %60, %60, %60, %56, %53, %47, %44 +67: ; preds = %switch.lookup, %.critedge100, %53, %56, %47, %44 call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %73 @@ -4175,7 +4179,7 @@ define internal fastcc i32 @http_target(ptr noundef readonly captures(none) %0, br label %73 73: ; preds = %67, %.thread, %71, %70, %68 - %.3 = phi i32 [ %69, %68 ], [ %72, %71 ], [ 0, %70 ], [ 0, %67 ], [ %.057.ph, %.thread ] + %.3 = phi i32 [ %69, %68 ], [ %72, %71 ], [ 0, %70 ], [ 0, %.critedge ], [ %.057.ph, %.thread ] ret i32 %.3 } diff --git a/bench/cvc5/optimized/sine_solver.ll b/bench/cvc5/optimized/sine_solver.ll index eebe3c14d3d..acd0fdc52b3 100644 --- a/bench/cvc5/optimized/sine_solver.ll +++ b/bench/cvc5/optimized/sine_solver.ll @@ -18864,12 +18864,11 @@ _ZNK4cvc58internal6theory5arith2nl14transcendental10SineSolver17regionToConvexit %switch.cast = trunc i32 %4 to i5 %switch.downshift = lshr i5 -7, %switch.cast %switch.masked = trunc i5 %switch.downshift to i1 - %switch.cast576 = trunc i32 %4 to i5 - %switch.downshift578 = lshr i5 -8, %switch.cast576 - %switch.masked579 = trunc i5 %switch.downshift578 to i1 + %switch.downshift480 = lshr i5 -8, %switch.cast + %switch.masked481 = trunc i5 %switch.downshift480 to i1 %not. = xor i1 %49, true %50 = select i1 %not., i1 true, i1 %switch.masked - %51 = select i1 %49, i1 %switch.masked579, i1 false + %51 = select i1 %49, i1 %switch.masked481, i1 false %52 = and i32 %4, -2 %switch = icmp eq i32 %52, 2 %53 = xor i1 %switch, %50 @@ -20402,14 +20401,14 @@ _ZN4cvc58internal8RationalD2Ev.exit303: ; preds = %.loopexit482 br i1 %or.cond4, label %.loopexit481, label %.preheader480 .preheader480: ; preds = %_ZN4cvc58internal8RationalD2Ev.exit303, %.preheader480 - %706 = phi ptr [ %707, %.preheader480 ], [ %.2105, %_ZN4cvc58internal8RationalD2Ev.exit303 ] + %706 = phi ptr [ %707, %.preheader484 ], [ %.2105, %_ZN4cvc58internal8RationalD2Ev.exit303 ] %707 = getelementptr inbounds i8, ptr %706, i64 -8 call void @_ZN4cvc58internal12NodeTemplateILb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %707) #20 %708 = icmp eq ptr %707, %36 br i1 %708, label %.loopexit481, label %.preheader480 .loopexit481: ; preds = %.preheader480, %_ZN4cvc58internal8RationalD2Ev.exit303.thread, %_ZN4cvc58internal8RationalD2Ev.exit303 - %.pn139.pn.pn.pn.pn467 = phi { ptr, i32 } [ %689, %_ZN4cvc58internal8RationalD2Ev.exit303.thread ], [ %.pn139.pn.pn.pn, %_ZN4cvc58internal8RationalD2Ev.exit303 ], [ %.pn139.pn.pn.pn, %.preheader480 ] + %.pn139.pn.pn.pn.pn467 = phi { ptr, i32 } [ %689, %_ZN4cvc58internal8RationalD2Ev.exit303.thread ], [ %.pn139.pn.pn.pn, %_ZN4cvc58internal8RationalD2Ev.exit303 ], [ %.pn139.pn.pn.pn, %.preheader484 ] call void @llvm.lifetime.end.p0(ptr nonnull %36) call void @llvm.lifetime.end.p0(ptr nonnull %35) call void @_ZNSt6vectorIN4cvc58internal12NodeTemplateILb1EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #20 @@ -20860,14 +20859,14 @@ _ZN4cvc58internal8RationalD2Ev.exit349: ; preds = %.loopexit485 br i1 %or.cond7, label %.loopexit484, label %.preheader483 .preheader483: ; preds = %_ZN4cvc58internal8RationalD2Ev.exit349, %.preheader483 - %909 = phi ptr [ %910, %.preheader483 ], [ %.265, %_ZN4cvc58internal8RationalD2Ev.exit349 ] + %909 = phi ptr [ %910, %.preheader487 ], [ %.265, %_ZN4cvc58internal8RationalD2Ev.exit349 ] %910 = getelementptr inbounds i8, ptr %909, i64 -8 call void @_ZN4cvc58internal12NodeTemplateILb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %910) #20 %911 = icmp eq ptr %910, %41 br i1 %911, label %.loopexit484, label %.preheader483 .loopexit484: ; preds = %.preheader483, %_ZN4cvc58internal8RationalD2Ev.exit349.thread, %_ZN4cvc58internal8RationalD2Ev.exit349 - %.pn133.pn.pn.pn.pn472 = phi { ptr, i32 } [ %892, %_ZN4cvc58internal8RationalD2Ev.exit349.thread ], [ %.pn133.pn.pn.pn, %_ZN4cvc58internal8RationalD2Ev.exit349 ], [ %.pn133.pn.pn.pn, %.preheader483 ] + %.pn133.pn.pn.pn.pn472 = phi { ptr, i32 } [ %892, %_ZN4cvc58internal8RationalD2Ev.exit349.thread ], [ %.pn133.pn.pn.pn, %_ZN4cvc58internal8RationalD2Ev.exit349 ], [ %.pn133.pn.pn.pn, %.preheader487 ] call void @llvm.lifetime.end.p0(ptr nonnull %41) call void @llvm.lifetime.end.p0(ptr nonnull %40) call void @_ZNSt6vectorIN4cvc58internal12NodeTemplateILb1EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #20 @@ -21315,14 +21314,14 @@ _ZN4cvc58internal8RationalD2Ev.exit395: ; preds = %.loopexit488 br i1 %or.cond10, label %.loopexit487, label %.preheader486 .preheader486: ; preds = %_ZN4cvc58internal8RationalD2Ev.exit395, %.preheader486 - %1111 = phi ptr [ %1112, %.preheader486 ], [ %.252, %_ZN4cvc58internal8RationalD2Ev.exit395 ] + %1111 = phi ptr [ %1112, %.preheader490 ], [ %.252, %_ZN4cvc58internal8RationalD2Ev.exit395 ] %1112 = getelementptr inbounds i8, ptr %1111, i64 -8 call void @_ZN4cvc58internal12NodeTemplateILb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1112) #20 %1113 = icmp eq ptr %1112, %46 br i1 %1113, label %.loopexit487, label %.preheader486 .loopexit487: ; preds = %.preheader486, %_ZN4cvc58internal8RationalD2Ev.exit395.thread, %_ZN4cvc58internal8RationalD2Ev.exit395 - %.pn127.pn.pn.pn.pn477 = phi { ptr, i32 } [ %1094, %_ZN4cvc58internal8RationalD2Ev.exit395.thread ], [ %.pn127.pn.pn.pn, %_ZN4cvc58internal8RationalD2Ev.exit395 ], [ %.pn127.pn.pn.pn, %.preheader486 ] + %.pn127.pn.pn.pn.pn477 = phi { ptr, i32 } [ %1094, %_ZN4cvc58internal8RationalD2Ev.exit395.thread ], [ %.pn127.pn.pn.pn, %_ZN4cvc58internal8RationalD2Ev.exit395 ], [ %.pn127.pn.pn.pn, %.preheader490 ] call void @llvm.lifetime.end.p0(ptr nonnull %46) call void @llvm.lifetime.end.p0(ptr nonnull %45) call void @_ZNSt6vectorIN4cvc58internal12NodeTemplateILb1EEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %44) #20 @@ -21373,7 +21372,7 @@ _ZN4cvc58internal12NodeTemplateILb1EED2Ev.exit397: ; preds = %1119, %1123, %1129 ret void 1133: ; preds = %485, %.loopexit, %.loopexit481, %.loopexit484, %.loopexit487 - %.pn151.pn = phi { ptr, i32 } [ %486, %485 ], [ %.pn145.pn.pn.pn.pn462, %.loopexit ], [ %.pn139.pn.pn.pn.pn467, %.loopexit481 ], [ %.pn133.pn.pn.pn.pn472, %.loopexit484 ], [ %.pn127.pn.pn.pn.pn477, %.loopexit487 ] + %.pn151.pn = phi { ptr, i32 } [ %486, %485 ], [ %.pn145.pn.pn.pn.pn462, %.loopexit ], [ %.pn139.pn.pn.pn.pn467, %.loopexit485 ], [ %.pn133.pn.pn.pn.pn472, %.loopexit488 ], [ %.pn127.pn.pn.pn.pn477, %.loopexit491 ] call void @_ZN4cvc58internal12NodeTemplateILb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #20 br label %1134 diff --git a/bench/cvc5/optimized/theory_sets_rels.ll b/bench/cvc5/optimized/theory_sets_rels.ll index cac76b2538a..88eea2bc75f 100644 --- a/bench/cvc5/optimized/theory_sets_rels.ll +++ b/bench/cvc5/optimized/theory_sets_rels.ll @@ -59780,7 +59780,6 @@ declare void @_ZN4cvc58internal6theory4sets16InferenceManager15assertInferenceEN ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define hidden noundef zeroext i1 @_ZN4cvc58internal6theory4sets14TheorySetsRels14isRelationKindENS0_4kind6Kind_tE(i32 noundef %0) local_unnamed_addr #8 align 2 { -switch.edge: %switch.tableidx = add i32 %0, -279 %1 = icmp ult i32 %switch.tableidx, 8 %switch.cast = trunc i32 %switch.tableidx to i8 diff --git a/bench/darktable/optimized/darkroom.ll b/bench/darktable/optimized/darkroom.ll index fc8a78f13df..5848401f261 100644 --- a/bench/darktable/optimized/darkroom.ll +++ b/bench/darktable/optimized/darkroom.ll @@ -3407,41 +3407,43 @@ declare i64 @gtk_popover_get_type() local_unnamed_addr #6 ; Function Attrs: nounwind uwtable define internal void @_display_intent_callback(ptr noundef %0, ptr noundef %1) #1 { - %3 = tail call i32 @dt_bauhaus_combobox_get(ptr noundef %0) #19 - %4 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @darktable, i64 216), align 8, !tbaa !211 - %5 = getelementptr inbounds nuw i8, ptr %4, i64 2172 - %6 = load i32, ptr %5, align 4, !tbaa !285 - %switch = icmp ugt i32 %3, 3 - %.not = icmp eq i32 %3, %6 - %or.cond = select i1 %switch, i1 true, i1 %.not - br i1 %or.cond, label %.thread, label %7 +switch.lookup: + %2 = tail call i32 @dt_bauhaus_combobox_get(ptr noundef %0) #19 + %3 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @darktable, i64 216), align 8, !tbaa !211 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 2172 + %5 = load i32, ptr %4, align 4, !tbaa !285 + %.not = icmp ugt i32 %2, 3 + %.not5 = icmp eq i32 %2, %5 + %.not = select i1 %.not, i1 true, i1 %.not5 + br i1 %.not, label %8, label %7 -7: ; preds = %2 - store i32 %3, ptr %5, align 4, !tbaa !285 +7: ; preds = %switch.lookup + store i32 %2, ptr %4, align 4, !tbaa !285 tail call void @dt_dev_reprocess_all(ptr noundef %1) #19 br label %.thread -.thread: ; preds = %2, %7 +.thread: ; preds = %7, %switch.lookup ret void } ; Function Attrs: nounwind uwtable define internal void @_display2_intent_callback(ptr noundef %0, ptr noundef %1) #1 { - %3 = tail call i32 @dt_bauhaus_combobox_get(ptr noundef %0) #19 - %4 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @darktable, i64 216), align 8, !tbaa !211 - %5 = getelementptr inbounds nuw i8, ptr %4, i64 2176 - %6 = load i32, ptr %5, align 8, !tbaa !286 - %switch = icmp ugt i32 %3, 3 - %.not = icmp eq i32 %3, %6 - %or.cond = select i1 %switch, i1 true, i1 %.not - br i1 %or.cond, label %.thread, label %7 +switch.lookup: + %2 = tail call i32 @dt_bauhaus_combobox_get(ptr noundef %0) #19 + %3 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @darktable, i64 216), align 8, !tbaa !211 + %4 = getelementptr inbounds nuw i8, ptr %3, i64 2176 + %5 = load i32, ptr %4, align 8, !tbaa !286 + %.not = icmp ugt i32 %2, 3 + %.not5 = icmp eq i32 %2, %5 + %.not = select i1 %.not, i1 true, i1 %.not5 + br i1 %.not, label %8, label %7 -7: ; preds = %2 - store i32 %3, ptr %5, align 8, !tbaa !286 +7: ; preds = %switch.lookup + store i32 %2, ptr %4, align 8, !tbaa !286 tail call void @dt_dev_reprocess_all(ptr noundef %1) #19 br label %.thread -.thread: ; preds = %2, %7 +.thread: ; preds = %7, %switch.lookup ret void } diff --git a/bench/delta-rs/optimized/4m54317sfkpl16q7.ll b/bench/delta-rs/optimized/4m54317sfkpl16q7.ll index 35f41c3333b..8bedc2ff4ab 100644 --- a/bench/delta-rs/optimized/4m54317sfkpl16q7.ll +++ b/bench/delta-rs/optimized/4m54317sfkpl16q7.ll @@ -40,22 +40,22 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h4fa0bb2c33865c7bE(ptr no br label %9 9: ; preds = %.lr.ph, %38 - %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %38 ] - %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %38 ] + %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %40 ] + %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %40 ] call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @"_ZN69_$LT$std..sys..pal..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h4a26ce9e715ee60dE"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %5, ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029, i64 noundef %.sroa.4.028) %10 = load i64, ptr %5, align 8, !range !4, !noundef !5 %trunc = trunc nuw i64 %10 to i1 br i1 %trunc, label %14, label %11 -.loopexit: ; preds = %38, %3, %31 - %.0 = phi ptr [ %.1, %31 ], [ null, %3 ], [ null, %38 ] +.loopexit: ; preds = %38, %3, %28 + %.0 = phi ptr [ %.1, %28 ], [ null, %3 ], [ null, %40 ] ret ptr %.0 11: ; preds = %9 %12 = load i64, ptr %7, align 8, !noundef !5 %13 = icmp eq i64 %12, 0 - br i1 %13, label %31, label %29 + br i1 %13, label %28, label %26 14: ; preds = %9 %.val = load ptr, ptr %7, align 8, !nonnull !5, !noundef !5 @@ -63,9 +63,9 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h4fa0bb2c33865c7bE(ptr no %16 = and i64 %15, 3 switch i64 %16, label %default.unreachable [ i64 2, label %17 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit - i64 0, label %19 - i64 1, label %23 + i64 3, label %19 + i64 0, label %22 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] default.unreachable: ; preds = %14 @@ -74,47 +74,49 @@ default.unreachable: ; preds = %14 17: ; preds = %14 %.mask.i = and i64 %15, -4294967296 %18 = icmp eq i64 %.mask.i, 17179869184 - br i1 %18, label %.thread, label %31 + br i1 %18, label %.thread, label %28 19: ; preds = %14 - %20 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %21 = load i8, ptr %20, align 8, !range !6, !noundef !5 - %22 = icmp eq i8 %21, 35 - br i1 %22, label %.thread, label %31 - -23: ; preds = %14 - %24 = getelementptr i8, ptr %.val, i64 -1 - %25 = icmp ne ptr %24, null - call void @llvm.assume(i1 %25) - %26 = getelementptr i8, ptr %.val, i64 15 - %27 = load i8, ptr %26, align 8, !range !6, !noundef !5 - %28 = icmp eq i8 %27, 35 - br i1 %28, label %.thread, label %31 - -29: ; preds = %11 - %30 = icmp ugt i64 %12, %.sroa.4.028 - br i1 %30, label %32, label %33 - -31: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23, %11 - %.1 = phi ptr [ @anon.be1f4e6814717bf63fb6ef7d59addb68.3, %11 ], [ %.val, %23 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] + %20 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %20) + %.mask.i = and i64 %15, -4294967296 + %21 = icmp eq i64 %.mask.i, 150323855360 + br i1 %21, label %.thread, label %28 + +22:; preds = %14 + %23 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %24 = load i8, ptr %23, align 8, !range !6, !noundef !5 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %.thread, label %28 + +26: ; preds = %11 + %27 = icmp ugt i64 %12, %.sroa.4.028 + br i1 %27, label %29, label %30 + +28:; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22, %11 + %.1 = phi ptr [ @anon.be1f4e6814717bf63fb6ef7d59addb68.3, %11 ], [ %.val, %22 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.loopexit -32: ; preds = %29 +32: ; preds = %26 call void @_ZN4core5slice5index26slice_start_index_len_fail17h6f35008186d11abeE(i64 noundef %12, i64 noundef %.sroa.4.028, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.be1f4e6814717bf63fb6ef7d59addb68.5) #20 unreachable -33: ; preds = %29 +33: ; preds = %26 %34 = sub nuw i64 %.sroa.4.028, %12 %35 = getelementptr inbounds i8, ptr %.sroa.0.029, i64 %12 br label %38 _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 - %.mask20.i = and i64 %15, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %31 - -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23 + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !6, !noundef !5 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %28 + +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !7 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hc3523e77f2dc9a1eE.llvm.14011817705576975213(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.val), !noalias !7 %36 = load i8, ptr %4, align 8, !range !14, !alias.scope !15, !noalias !7, !noundef !5 @@ -130,8 +132,8 @@ _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 br label %38 38: ; preds = %33, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" - %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %35, %33 ] - %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %34, %33 ] + %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %35, %30 ] + %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %34, %30 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %39 = icmp eq i64 %.sroa.4.121, 0 br i1 %39, label %.loopexit, label %9 diff --git a/bench/diesel-rs/optimized/1dr0ikhoh8prk7sr.ll b/bench/diesel-rs/optimized/1dr0ikhoh8prk7sr.ll index 4e911db1939..ec2f183044e 100644 --- a/bench/diesel-rs/optimized/1dr0ikhoh8prk7sr.ll +++ b/bench/diesel-rs/optimized/1dr0ikhoh8prk7sr.ll @@ -3403,24 +3403,29 @@ _ZN9byteorder2io12ReadBytesExt8read_u1617hbadb9ce034e76b39E.exit95: ; preds = %4 ; Function Attrs: nonlazybind uwtable define void @"_ZN141_$LT$diesel..pg..types..floats..PgNumeric$u20$as$u20$diesel..serialize..ToSql$LT$diesel..sql_types..Numeric$C$diesel..pg..backend..Pg$GT$$GT$6to_sql17h13596b64975e3a2dE"(ptr noalias noundef writeonly sret({ ptr, [1 x i64] }) align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(32) %1, ptr noalias noundef readonly align 8 captures(none) dereferenceable(24) %2) unnamed_addr #6 personality ptr @rust_eh_personality { - %4 = alloca { { i64, ptr }, i64 }, align 8 - %5 = load i16, ptr %1, align 8, !range !522, !noundef !7 - call void @llvm.lifetime.start.p0(ptr nonnull %4) - store i64 0, ptr %4, align 8 - %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 +switch.lookup: + %3 = alloca { { i64, ptr }, i64 }, align 8 + %4 = load i16, ptr %1, align 8, !range !522, !noundef !7 + %5 = shl nuw nsw i16 %4, 4 + %switch.shiftamt = zext nneg i16 %5 to i48 + %switch.downshift = lshr i48 824637915136, %switch.shiftamt + %switch.masked = trunc i48 %switch.downshift to i16 + call void @llvm.lifetime.start.p0(ptr nonnull %3) + store i64 0, ptr %3, align 8 + %6 = getelementptr inbounds nuw i8, ptr %3, i64 8 store ptr inttoptr (i64 2 to ptr), ptr %6, align 8 - %7 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %7 = getelementptr inbounds nuw i8, ptr %3, i64 16 store i64 0, ptr %7, align 8 - switch i16 %5, label %default.unreachable151 [ + switch i16 %4, label %default.unreachable134 [ i16 0, label %8 i16 1, label %14 i16 2, label %20 ] -default.unreachable151: ; preds = %3 +default.unreachable151: ; preds = %switch.lookup unreachable -8: ; preds = %3 +8: ; preds = %switch.lookup %9 = getelementptr inbounds nuw i8, ptr %1, i64 8 %10 = getelementptr inbounds nuw i8, ptr %1, i64 2 %11 = load i16, ptr %10, align 2, !noundef !7 @@ -3428,7 +3433,7 @@ default.unreachable151: ; preds = %3 %13 = load i16, ptr %12, align 4, !noundef !7 br label %20 -14: ; preds = %3 +14: ; preds = %switch.lookup %15 = getelementptr inbounds nuw i8, ptr %1, i64 8 %16 = getelementptr inbounds nuw i8, ptr %1, i64 2 %17 = load i16, ptr %16, align 2, !noundef !7 @@ -3448,15 +3453,14 @@ default.unreachable151: ; preds = %3 .body: ; preds = %.body.loopexit.split-lp, %.body.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.body.loopexit ], [ %lpad.loopexit.split-lp, %.body.loopexit.split-lp ] - invoke void @"_ZN4core3ptr47drop_in_place$LT$alloc..vec..Vec$LT$i16$GT$$GT$17h2a7a49b12772b21eE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %4) #34 + invoke void @"_ZN4core3ptr47drop_in_place$LT$alloc..vec..Vec$LT$i16$GT$$GT$17h2a7a49b12772b21eE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %3) #34 to label %94 unwind label %92 -20: ; preds = %3, %8, %14 - %.052135 = phi i16 [ %11, %8 ], [ %17, %14 ], [ 0, %3 ] - %.055110118133 = phi i16 [ 0, %8 ], [ 64, %14 ], [ 192, %3 ] - %.049120131 = phi ptr [ %9, %8 ], [ %15, %14 ], [ %4, %3 ] - %.051 = phi i16 [ %13, %8 ], [ %19, %14 ], [ 0, %3 ] - %21 = getelementptr inbounds nuw i8, ptr %.049120131, i64 16 +20: ; preds = %8, %14, %switch.lookup + %.052135 = phi i16 [ %11, %8 ], [ %17, %14 ], [ 0, %switch.lookup ] + %.055110118133 = phi ptr [ %9, %8 ], [ %15, %14 ], [ %3, %switch.lookup ] + %.049120131 = phi i16 [ %13, %8 ], [ %19, %14 ], [ 0, %switch.lookup ] + %21 = getelementptr inbounds nuw i8, ptr %.049110118, i64 16 %22 = load i64, ptr %21, align 8, !noundef !7 %23 = trunc i64 %22 to i16 %24 = tail call i16 @llvm.bswap.i16(i16 %23) @@ -3525,7 +3529,7 @@ default.unreachable151: ; preds = %3 %55 = phi i64 [ %49, %44 ], [ %.pre.i.i.i85, %.noexc86 ] %56 = load ptr, ptr %34, align 8, !alias.scope !564, !noalias !559, !nonnull !7, !noundef !7 %57 = getelementptr inbounds i8, ptr %56, i64 %55 - store i16 %.055110118133, ptr %57, align 1, !noalias !565 + store i16 %switch.masked, ptr %57, align 1, !noalias !565 %58 = load i64, ptr %26, align 8, !alias.scope !564, !noalias !559, !noundef !7 %59 = add i64 %58, 2 store i64 %59, ptr %26, align 8, !alias.scope !564, !noalias !559 @@ -3551,7 +3555,7 @@ default.unreachable151: ; preds = %3 %69 = load i64, ptr %26, align 8, !alias.scope !578, !noalias !573, !noundef !7 %70 = add i64 %69, 2 store i64 %70, ptr %26, align 8, !alias.scope !578, !noalias !573 - %71 = getelementptr inbounds nuw i8, ptr %.049120131, i64 8 + %71 = getelementptr inbounds nuw i8, ptr %.049110118, i64 8 %72 = load ptr, ptr %71, align 8, !nonnull !7, !noundef !7 %73 = load i64, ptr %21, align 8, !noundef !7 %.idx = shl nsw i64 %73, 1 @@ -3563,8 +3567,8 @@ default.unreachable151: ; preds = %3 %76 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i8 1, ptr %76, align 8 store ptr null, ptr %0, align 8 - call void @"_ZN4core3ptr47drop_in_place$LT$alloc..vec..Vec$LT$i16$GT$$GT$17h2a7a49b12772b21eE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %4) - call void @llvm.lifetime.end.p0(ptr nonnull %4) + call void @"_ZN4core3ptr47drop_in_place$LT$alloc..vec..Vec$LT$i16$GT$$GT$17h2a7a49b12772b21eE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %3) + call void @llvm.lifetime.end.p0(ptr nonnull %3) ret void .lr.ph: ; preds = %65, %85 diff --git a/bench/diesel-rs/optimized/1z3qificwegqnhb.ll b/bench/diesel-rs/optimized/1z3qificwegqnhb.ll index 3f5ff7517d7..727a4621084 100644 --- a/bench/diesel-rs/optimized/1z3qificwegqnhb.ll +++ b/bench/diesel-rs/optimized/1z3qificwegqnhb.ll @@ -552,7 +552,7 @@ default.unreachable1.i68: ; preds = %"_ZN6diesel13query_ } ; Function Attrs: nonlazybind uwtable -define hidden void @"_ZN6diesel10type_impls6tuples96_$LT$impl$u20$diesel..insertable..InsertValues$LT$Tab$C$__DB$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$12column_names17hdb3659ed72309b37E"(ptr noalias noundef writeonly sret({ i64, [3 x i64] }) align 8 captures(none) dereferenceable(32) %0, ptr noalias noundef readonly align 8 dereferenceable(16) %1, ptr noalias noundef readonly align 8 captures(none) dereferenceable(32) %2) unnamed_addr #0 { +define hidden void @"_ZN6diesel10type_impls6tuples96_$LT$impl$u20$diesel..insertable..InsertValues$LT$Tab$C$__DB$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$12column_names17hdb3659ed72309b37E"(ptr noalias noundef writeonly sret({ i64, [3 x i64] }) align 8 captures(none) dereferenceable(32) initializes((0, 8)) %0, ptr noalias noundef readonly align 8 dereferenceable(16) %1, ptr noalias noundef readonly align 8 captures(none) dereferenceable(32) %2) unnamed_addr #0 { %4 = alloca { i64, [3 x i64] }, align 8 %5 = alloca { { i64, [2 x i64] }, ptr }, align 8 %6 = alloca { i64, [3 x i64] }, align 8 @@ -691,18 +691,23 @@ define hidden void @"_ZN6diesel10type_impls6tuples96_$LT$impl$u20$diesel..insert "_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exitthread-pre-split": ; preds = %39 %.pr = load i64, ptr %2, align 8, !alias.scope !115, !noalias !118 + br label %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit" + +"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit": ; preds = %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exitthread-pre-split", %49 + %41 = phi i64 [ %.pr, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exitthread-pre-split" ], [ %50, %49 ] + %.sroa.6.0.in.i70.phi.trans.insert = getelementptr inbounds nuw i8, ptr %2, i64 8 + %.sroa.6.0.i71.pre = load ptr, ptr %.sroa.6.0.in.i70.phi.trans.insert, align 8, !alias.scope !115, !noalias !118 br label %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8reborrow17h10d209aa274776bcE.exit75" -"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8reborrow17h10d209aa274776bcE.exit75": ; preds = %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exitthread-pre-split", %48, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread112", %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread" - %41 = phi i64 [ 0, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread" ], [ 4, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread112" ], [ %.pr, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exitthread-pre-split" ], [ %49, %48 ] - %.sroa.6.0.in.i70 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %.sroa.6.0.i71 = load ptr, ptr %.sroa.6.0.in.i70, align 8, !alias.scope !115, !noalias !118, !nonnull !12, !align !19, !noundef !12 +"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8reborrow17h10d209aa274776bcE.exit75": ; preds = %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit", %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread112", %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread" + %41 = phi ptr [ %52, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread" ], [ %54, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread112" ], [ %.sroa.6.0.i71.pre, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit" ] + %42 = phi i64 [ 0, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread" ], [ 4, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread112" ], [ %41, %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit" ] %.val62 = load ptr, ptr %29, align 8, !noundef !12 %.not.i77 = icmp eq ptr %.val62, null br i1 %.not.i77, label %40, label %42 42: ; preds = %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8reborrow17h10d209aa274776bcE.exit75" - switch i64 %41, label %40 [ + switch i64 %42, label %40 [ i64 0, label %43 i64 4, label %46 ] @@ -725,7 +730,7 @@ define hidden void @"_ZN6diesel10type_impls6tuples96_$LT$impl$u20$diesel..insert 48: ; preds = %39 call void @llvm.experimental.noalias.scope.decl(metadata !128) %49 = load i64, ptr %2, align 8, !range !13, !noalias !12, !noundef !12 - switch i64 %49, label %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8reborrow17h10d209aa274776bcE.exit75" [ + switch i64 %49, label %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit" [ i64 0, label %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread" i64 4, label %"_ZN6diesel13query_builder8ast_pass17AstPass$LT$DB$GT$8push_sql17h9c57d24fc8043983E.exit.thread112" ] diff --git a/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll b/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll index 82dbdf2673c..a8250e0dd86 100644 --- a/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll +++ b/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll @@ -6999,11 +6999,10 @@ _ZN6diesel2pg10connection3raw9RawResult3new17ha39e40f55701d273E.llvm.26482893445 ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 0, 5) i8 @_ZN6diesel2pg10connection3raw13RawConnection18transaction_status17h93f1059108214522E(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #0 { -switch.lookup: - %1 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 - %2 = tail call noundef i32 @PQtransactionStatus(ptr noundef nonnull %1), !range !1233 - %switch.idx.cast = trunc nuw i32 %2 to i8 - ret i8 %switch.idx.cast + %2 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 + %3 = tail call noundef i32 @PQtransactionStatus(ptr noundef nonnull %2), !range !1233 + %switch.idx.cast.i = trunc nuw nsw i32 %3 to i8 + ret i8 %switch.idx.cast.i } ; Function Attrs: nonlazybind uwtable diff --git a/bench/ffmpeg/optimized/hashenc.ll b/bench/ffmpeg/optimized/hashenc.ll index 384829aaa90..a44c70d039e 100644 --- a/bench/ffmpeg/optimized/hashenc.ll +++ b/bench/ffmpeg/optimized/hashenc.ll @@ -50,7 +50,6 @@ target triple = "x86_64-pc-linux-gnu" @.str.34 = private unnamed_addr constant [16 x i8] c"frame MD5 muxer\00", align 1 @framemd5_class = internal constant { ptr, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, [4 x i8] } { ptr @.str.34, ptr @av_default_item_name, ptr @framemd5_options, i32 3932772, i32 0, i32 0, i32 0, ptr null, ptr null, ptr null, ptr null, i32 0, [4 x i8] zeroinitializer }, align 8 @framemd5_options = internal constant <{ { ptr, ptr, i32, i32, { ptr }, double, double, i32, [4 x i8], ptr }, { ptr, ptr, i32, i32, %union.anon, double, double, i32, [4 x i8], ptr }, { ptr, ptr, i32, i32, %union.anon, double, double, i32, [4 x i8], ptr } }> <{ { ptr, ptr, i32, i32, { ptr }, double, double, i32, [4 x i8], ptr } { ptr @.str, ptr @.str.12, i32 16, i32 6, { ptr } { ptr @.str.2 }, double 0.000000e+00, double 0.000000e+00, i32 1, [4 x i8] zeroinitializer, ptr null }, { ptr, ptr, i32, i32, %union.anon, double, double, i32, [4 x i8], ptr } { ptr @.str.23, ptr @.str.24, i32 28, i32 2, %union.anon { i64 2 }, double 1.000000e+00, double 2.000000e+00, i32 1, [4 x i8] zeroinitializer, ptr null }, { ptr, ptr, i32, i32, %union.anon, double, double, i32, [4 x i8], ptr } zeroinitializer }>, align 16 -@switch.table.hash_write_trailer = private unnamed_addr constant [5 x i32] [i32 118, i32 97, i32 100, i32 115, i32 116], align 4 ; Function Attrs: nounwind uwtable define internal noundef i32 @hash_write_packet(ptr noundef readonly captures(none) %0, ptr noundef readonly captures(none) %1) #0 { @@ -106,15 +105,15 @@ define internal noundef i32 @hash_write_trailer(ptr noundef readonly captures(no %wide.trip.count = zext nneg i32 %11 to i64 br label %15 -._crit_edge: ; preds = %38, %7 +._crit_edge: ; preds = %39, %7 ret i32 0 -15: ; preds = %.lr.ph, %38 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %38 ] +15: ; preds = %.lr.ph, %39 + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %39 ] call void @llvm.lifetime.start.p0(ptr nonnull %2) %16 = load i32, ptr %5, align 8, !tbaa !27 %.not17 = icmp eq i32 %16, 0 - br i1 %.not17, label %32, label %17 + br i1 %.not17, label %33, label %17 17: ; preds = %15 %18 = load ptr, ptr %12, align 8, !tbaa !38 @@ -124,46 +123,42 @@ define internal noundef i32 @hash_write_trailer(ptr noundef readonly captures(no %22 = load ptr, ptr %21, align 8, !tbaa !41 %23 = load i32, ptr %22, align 8, !tbaa !44 %24 = icmp ult i32 %23, 5 - br i1 %24, label %switch.lookup, label %get_media_type_char.exit - -switch.lookup: ; preds = %17 - %25 = zext nneg i32 %23 to i64 - %switch.gep = getelementptr inbounds nuw i32, ptr @switch.table.hash_write_trailer, i64 %25 - %switch.load = load i32, ptr %switch.gep, align 4 - br label %get_media_type_char.exit - -get_media_type_char.exit: ; preds = %17, %switch.lookup - %.0.i = phi i32 [ %switch.load, %switch.lookup ], [ 63, %17 ] - %26 = load ptr, ptr %13, align 8, !tbaa !24 - %27 = getelementptr inbounds nuw ptr, ptr %26, i64 %indvars.iv - %28 = load ptr, ptr %27, align 8, !tbaa !33 - %29 = call ptr @av_hash_get_name(ptr noundef %28) #6 - %30 = trunc nuw nsw i64 %indvars.iv to i32 - %31 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 56, ptr noundef nonnull @.str.15, i32 noundef %30, i32 noundef %.0.i, ptr noundef %29) #6 - br label %38 - -32: ; preds = %15 - %33 = load ptr, ptr %13, align 8, !tbaa !24 - %34 = getelementptr inbounds nuw ptr, ptr %33, i64 %indvars.iv - %35 = load ptr, ptr %34, align 8, !tbaa !33 - %36 = call ptr @av_hash_get_name(ptr noundef %35) #6 - %37 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 56, ptr noundef nonnull @.str.16, ptr noundef %36) #6 - br label %38 - -38: ; preds = %32, %get_media_type_char.exit - %39 = load ptr, ptr %13, align 8, !tbaa !24 - %40 = getelementptr inbounds nuw ptr, ptr %39, i64 %indvars.iv - %41 = load ptr, ptr %40, align 8, !tbaa !33 - %42 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7 - %43 = getelementptr inbounds nuw i8, ptr %2, i64 %42 - %44 = trunc i64 %42 to i32 - %45 = sub i32 256, %44 - call void @av_hash_final_hex(ptr noundef %41, ptr noundef nonnull %43, i32 noundef %45) #6 - %46 = call i64 (ptr, i64, ptr, ...) @av_strlcatf(ptr noundef nonnull %2, i64 noundef 256, ptr noundef nonnull @.str.17) #6 - %47 = load ptr, ptr %14, align 8, !tbaa !47 - %48 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7 - %49 = trunc i64 %48 to i32 - call void @avio_write(ptr noundef %47, ptr noundef nonnull %2, i32 noundef %49) #6 + %switch.cast.i = zext i32 %23 to i40 + %switch.shiftamt.i = shl nuw nsw i40 %switch.cast.i, 3 + %switch.downshift.i = lshr i40 500152164726, %switch.shiftamt.i + %switch.masked.i = trunc i40 %switch.downshift.i to i32 + %25 = and i32 %switch.masked.i, 119 + %26 = select i1 %24, i32 %25, i32 63 + %27 = load ptr, ptr %13, align 8, !tbaa !24 + %28 = getelementptr inbounds nuw ptr, ptr %27, i64 %indvars.iv + %29 = load ptr, ptr %28, align 8, !tbaa !33 + %30 = call ptr @av_hash_get_name(ptr noundef %29) #6 + %31 = trunc nuw nsw i64 %indvars.iv to i32 + %32 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 56, ptr noundef nonnull @.str.15, i32 noundef %31, i32 noundef %26, ptr noundef %30) #6 + br label %39 + +33:; preds = %15 + %34 = load ptr, ptr %13, align 8, !tbaa !24 + %35 = getelementptr inbounds nuw ptr, ptr %34, i64 %indvars.iv + %36 = load ptr, ptr %35, align 8, !tbaa !33 + %37 = call ptr @av_hash_get_name(ptr noundef %36) #6 + %38 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 56, ptr noundef nonnull @.str.16, ptr noundef %37) #6 + br label %39 + +39:; preds = %33, %17 + %40 = load ptr, ptr %13, align 8, !tbaa !24 + %41 = getelementptr inbounds nuw ptr, ptr %40, i64 %indvars.iv + %42 = load ptr, ptr %41, align 8, !tbaa !33 + %43 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7 + %44 = getelementptr inbounds nuw i8, ptr %2, i64 %43 + %45 = trunc i64 %43 to i32 + %46 = sub i32 256, %45 + call void @av_hash_final_hex(ptr noundef %42, ptr noundef nonnull %44, i32 noundef %46) #7 + %47 = call i64 (ptr, i64, ptr, ...) @av_strlcatf(ptr noundef nonnull %2, i64 noundef 256, ptr noundef nonnull @.str.17) #6 + %48 = load ptr, ptr %14, align 8, !tbaa !47 + %49 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7 + %50 = trunc i64 %49 to i32 + call void @avio_write(ptr noundef %48, ptr noundef nonnull %2, i32 noundef %50) #6 call void @llvm.lifetime.end.p0(ptr nonnull %2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count diff --git a/bench/ffmpeg/optimized/rv60dec.ll b/bench/ffmpeg/optimized/rv60dec.ll index 6967a6f9c96..6f7e5733552 100644 --- a/bench/ffmpeg/optimized/rv60dec.ll +++ b/bench/ffmpeg/optimized/rv60dec.ll @@ -2519,9 +2519,6 @@ get_unary.exit: ; preds = %301, %312 %323 = icmp eq i32 %320, 0 %324 = icmp eq i32 %322, 3 %or.cond.i530 = select i1 %323, i1 %324, i1 false - %.0.i108.sroa.gep169.i = getelementptr inbounds nuw i8, ptr %20, i64 24 - %.0.i108.sroa.gep170.i = getelementptr inbounds nuw i8, ptr %20, i64 36 - %.0.i108.sroa.gep171.i = getelementptr inbounds nuw i8, ptr %20, i64 12 br i1 %or.cond.i530, label %325, label %347 325: ; preds = %.loopexit @@ -3599,27 +3596,16 @@ add_if_valid.exit158.i.i: ; preds = %unique_list_mvinfo_ fill_mv_skip_cand.exit.i: ; preds = %.lr.ph.i.i, %add_if_valid.exit158.i.i %751 = getelementptr inbounds nuw i8, ptr %26, i64 56 %752 = load i32, ptr %751, align 4, !tbaa !136 - switch i32 %752, label %755 [ - i32 6, label %get_skip_mv_index.exit.i - i32 7, label %753 - i32 8, label %754 - ] - -753: ; preds = %fill_mv_skip_cand.exit.i - br label %get_skip_mv_index.exit.i - -754: ; preds = %fill_mv_skip_cand.exit.i - br label %get_skip_mv_index.exit.i - -755: ; preds = %fill_mv_skip_cand.exit.i - br label %get_skip_mv_index.exit.i - -get_skip_mv_index.exit.i: ; preds = %755, %754, %753, %fill_mv_skip_cand.exit.i - %.0.i108.sroa.phi.i = phi ptr [ %20, %755 ], [ %.0.i108.sroa.gep169.i, %753 ], [ %.0.i108.sroa.gep170.i, %754 ], [ %.0.i108.sroa.gep171.i, %fill_mv_skip_cand.exit.i ] + %switch.tableidx.i.i = add i32 %752, -6 + %753 = icmp ult i32 %switch.tableidx.i.i, 3 + %switch.offset.i.i = add nsw i32 %752, -5 + %.0.i108.i = select i1 %753, i32 %switch.offset.i.i, i32 0 + %754 = zext nneg i32 %.0.i108.i to i64 + %755 = getelementptr inbounds nuw %struct.MVInfo, ptr %20, i64 %754 %756 = icmp sgt i32 %623, 0 br i1 %756, label %.preheader129.lr.ph.i, label %.loopexit130.i -.preheader129.lr.ph.i: ; preds = %get_skip_mv_index.exit.i +.preheader129.lr.ph.i: ; preds = %fill_mv_skip_cand.exit.i %757 = getelementptr inbounds nuw i8, ptr %0, i64 128 br label %.preheader129.us.i @@ -3637,7 +3623,7 @@ get_skip_mv_index.exit.i: ; preds = %755, %754, %753, %f %764 = add i32 %763, %762 %765 = sext i32 %764 to i64 %766 = getelementptr inbounds %struct.BlockInfo, ptr %759, i64 %765, i32 1 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %766, ptr noundef nonnull align 4 dereferenceable(12) %.0.i108.sroa.phi.i, i64 12, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %766, ptr noundef nonnull align 4 dereferenceable(12) %755, i64 12, i1 false) %767 = add nuw nsw i32 %.090146.us.i, 1 %exitcond165.not.i = icmp eq i32 %767, %623 br i1 %exitcond165.not.i, label %._crit_edge.us148.i, label %758, !llvm.loop !160 @@ -3647,7 +3633,7 @@ get_skip_mv_index.exit.i: ; preds = %755, %754, %753, %f %exitcond166.not.i = icmp eq i32 %768, %623 br i1 %exitcond166.not.i, label %.loopexit130.i, label %.preheader129.us.i, !llvm.loop !161 -.loopexit130.i: ; preds = %get_next_mv.exit.i, %._crit_edge.us145.i, %._crit_edge.us148.i, %get_skip_mv_index.exit.i, %348 +.loopexit130.i: ; preds = %get_next_mv.exit.i, %._crit_edge.us145.i, %._crit_edge.us148.i, %fill_mv_skip_cand.exit.i, %348 %769 = icmp sgt i32 %319, 0 br i1 %769, label %.preheader127.lr.ph.i, label %reconstruct.exit diff --git a/bench/ffmpeg/optimized/vf_v360.ll b/bench/ffmpeg/optimized/vf_v360.ll index f0dfb6f33c6..2901994ab4a 100644 --- a/bench/ffmpeg/optimized/vf_v360.ll +++ b/bench/ffmpeg/optimized/vf_v360.ll @@ -5534,42 +5534,33 @@ get_direction.exit: ; preds = %10 %indvars.iv63 = phi i64 [ 0, %.critedge44.preheader ], [ %indvars.iv.next64, %.critedge44 ] %24 = getelementptr inbounds nuw i8, ptr %8, i64 %indvars.iv63 %25 = load i8, ptr %24, align 1, !tbaa !17 - switch i8 %25, label %get_rotation.exit [ - i8 0, label %26 - i8 48, label %.critedge44 - i8 49, label %27 - i8 50, label %28 - i8 51, label %29 - ] + %26 = icmp eq i8 %25, 0 + br i1 %26, label %26, label %28 26: ; preds = %23 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.14) #16 br label %.critedge -27: ; preds = %23 - br label %.critedge44 - 28: ; preds = %23 - br label %.critedge44 - -29: ; preds = %23 - br label %.critedge44 + %switch.tableidx.i = add i8 %25, -48 + %29 = icmp ugt i8 %switch.tableidx.i, 3 + br i1 %29, label %30, label %.critedge44 -get_rotation.exit: ; preds = %23 +get_rotation.exit: ; preds = %28 %30 = sext i8 %25 to i32 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.15, i32 noundef %30) #16 br label %.critedge -.critedge44: ; preds = %23, %27, %28, %29 - %.0.i47.ph = phi i32 [ 3, %29 ], [ 2, %28 ], [ 1, %27 ], [ 0, %23 ] +.critedge44: ; preds = %28 + %switch.idx.cast.i = zext nneg i8 %switch.tableidx.i to i32 %31 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv63 - store i32 %.0.i47.ph, ptr %31, align 4, !tbaa !90 + store i32 %switch.idx.cast.i, ptr %31, align 4, !tbaa !90 %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1 %exitcond66 = icmp eq i64 %indvars.iv.next64, 6 br i1 %exitcond66, label %.critedge, label %23, !llvm.loop !188 .critedge: ; preds = %.critedge44, %get_rotation.exit, %26, %get_direction.exit, %13 - %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %26 ], [ -22, %get_rotation.exit ], [ 0, %.critedge44 ] + %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %27 ], [ -22, %30 ], [ 0, %.critedge44 ] ret i32 %.3 } @@ -8684,42 +8675,33 @@ get_direction.exit: ; preds = %10 %indvars.iv63 = phi i64 [ 0, %.critedge44.preheader ], [ %indvars.iv.next64, %.critedge44 ] %23 = getelementptr inbounds nuw i8, ptr %8, i64 %indvars.iv63 %24 = load i8, ptr %23, align 1, !tbaa !17 - switch i8 %24, label %get_rotation.exit [ - i8 0, label %25 - i8 48, label %.critedge44 - i8 49, label %26 - i8 50, label %27 - i8 51, label %28 - ] + %25 = icmp eq i8 %24, 0 + br i1 %25, label %25, label %27 25: ; preds = %22 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.18) #16 br label %.critedge -26: ; preds = %22 - br label %.critedge44 - 27: ; preds = %22 - br label %.critedge44 - -28: ; preds = %22 - br label %.critedge44 + %switch.tableidx.i = add i8 %24, -48 + %28 = icmp ugt i8 %switch.tableidx.i, 3 + br i1 %28, label %29, label %.critedge44 -get_rotation.exit: ; preds = %22 - %29 = sext i8 %24 to i32 - tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.19, i32 noundef %29) #16 +28: ; preds = %27 + %30 = sext i8 %24 to i32 + tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.19, i32 noundef %30) #16 br label %.critedge -.critedge44: ; preds = %22, %26, %27, %28 - %.0.i47.ph = phi i32 [ 3, %28 ], [ 2, %27 ], [ 1, %26 ], [ 0, %22 ] +.critedge44: ; preds = %27 + %switch.idx.cast.i = zext nneg i8 %switch.tableidx.i to i32 %30 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv63 - store i32 %.0.i47.ph, ptr %30, align 4, !tbaa !90 + store i32 %switch.idx.cast.i, ptr %30, align 4, !tbaa !90 %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1 %exitcond66 = icmp eq i64 %indvars.iv.next64, 6 br i1 %exitcond66, label %.critedge, label %22, !llvm.loop !238 -.critedge: ; preds = %.critedge44, %get_rotation.exit, %25, %get_direction.exit, %13 - %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %25 ], [ -22, %get_rotation.exit ], [ 0, %.critedge44 ] +.critedge: ; preds = %.critedge44, %29, %25, %get_direction.exit, %13 + %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %26 ], [ -22, %29 ], [ 0, %.critedge44 ] ret i32 %.3 } diff --git a/bench/flatbuffers/optimized/idl_gen_lobster.ll b/bench/flatbuffers/optimized/idl_gen_lobster.ll index 997f1ad4b3b..496452523cc 100644 --- a/bench/flatbuffers/optimized/idl_gen_lobster.ll +++ b/bench/flatbuffers/optimized/idl_gen_lobster.ll @@ -279,7 +279,6 @@ $_ZZN11flatbuffers7lobster16LobsterGenerator12GenTypeBasicB5cxx11ERKNS_4TypeEE9c @.str.136 = private unnamed_addr constant [41 x i8] c"(e_)\0A return b_.EndVector(v_.length)\0A\00", align 1 @.str.137 = private unnamed_addr constant [8 x i8] c"Lobster\00", align 1 @switch.table._ZN11flatbuffers7lobster16LobsterGenerator11GenTypeNameB5cxx11ERKNS_4TypeE = private unnamed_addr constant [19 x i64] [i64 8, i64 8, i64 8, i64 8, i64 8, i64 16, i64 16, i64 32, i64 32, i64 64, i64 64, i64 32, i64 64, i64 32, i64 32, i64 32, i64 32, i64 32, i64 64], align 8 -@switch.table._ZN11flatbuffers7lobster16LobsterGenerator11GenTypeNameB5cxx11ERKNS_4TypeE.11 = private unnamed_addr constant [10 x ptr] [ptr @.str.96, ptr @.str.10, ptr @.str.10, ptr @.str.96, ptr @.str.10, ptr @.str.96, ptr @.str.10, ptr @.str.96, ptr @.str.10, ptr @.str.96], align 8 ; Function Attrs: mustprogress uwtable define dso_local void @_ZN11flatbuffers23NewLobsterCodeGeneratorEv(ptr dead_on_unwind noalias writable writeonly sret(%"class.std::unique_ptr") align 8 captures(none) initializes((0, 8)) %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 { @@ -21766,105 +21765,101 @@ _ZN11flatbuffers6SizeOfENS_8BaseTypeE.exit: ; preds = %3, %switch.lookup %8 = load i32, ptr %2, align 8, !tbaa !237 %9 = add i32 %8, -1 %10 = icmp ult i32 %9, 10 - br i1 %10, label %11, label %18 + br i1 %10, label %11, label %17 11: ; preds = %_ZN11flatbuffers6SizeOfENS_8BaseTypeE.exit - %switch.tableidx = add nsw i32 %8, -1 - %12 = icmp ult i32 %switch.tableidx, 10 - br i1 %12, label %switch.lookup26, label %.invoke - -13: ; preds = %.invoke - %14 = landingpad { ptr, i32 } - cleanup - %15 = load ptr, ptr %4, align 8, !tbaa !16 - %16 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %17 = icmp eq ptr %15, %16 - br i1 %17, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i18, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17 - -18: ; preds = %_ZN11flatbuffers6SizeOfENS_8BaseTypeE.exit - %19 = add i32 %8, -11 - %20 = icmp ult i32 %19, 2 - br i1 %20, label %.invoke, label %23 - -switch.lookup26: ; preds = %11 - %21 = zext nneg i32 %switch.tableidx to i64 - %switch.gep27 = getelementptr inbounds nuw ptr, ptr @switch.table._ZN11flatbuffers7lobster16LobsterGenerator11GenTypeNameB5cxx11ERKNS_4TypeE.11, i64 %21 - %switch.load28 = load ptr, ptr %switch.gep27, align 8 + %switch.cast.i = trunc nuw nsw i32 %8 to i11 + %switch.downshift.i = lshr i11 -686, %switch.cast.i + %switch.masked.i = trunc i11 %switch.downshift.i to i1 + %spec.select = select i1 %switch.masked.i, ptr @.str.96, ptr @.str.10 br label %.invoke -.invoke: ; preds = %switch.lookup26, %11, %18 - %22 = phi ptr [ @.str.10, %11 ], [ @.str.11, %18 ], [ %switch.load28, %switch.lookup26 ] - invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull %22, ptr noundef nonnull align 8 dereferenceable(32) %4) - to label %27 unwind label %13 +.invoke: ; preds = %23 + %13 = landingpad { ptr, i32 } + cleanup + %14 = load ptr, ptr %4, align 8, !tbaa !16 + %15 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %16 = icmp eq ptr %14, %15 + br i1 %16, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i18, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17 + +17: ; preds = %_ZN11flatbuffers6SizeOfENS_8BaseTypeE.exit + %18 = add i32 %8, -11 + %19 = icmp ult i32 %18, 2 + br i1 %19, label %.invoke, label %21 + +23: ; preds = %11, %17 + %20 = phi ptr [ @.str.11, %17 ], [ %spec.select, %11 ] + invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull %20, ptr noundef nonnull align 8 dereferenceable(32) %4) + to label %25 unwind label %.invoke -23: ; preds = %18 - %24 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store ptr %24, ptr %0, align 8, !tbaa !4 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 8 +21: ; preds = %17 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store ptr %22, ptr %0, align 8, !tbaa !4 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 8 switch i32 %8, label %._crit_edge.i.i13 [ i32 13, label %._crit_edge.i.i i32 15, label %._crit_edge.i.i9 ] -._crit_edge.i.i: ; preds = %23 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(6) %24, ptr noundef nonnull align 1 dereferenceable(6) @.str.12, i64 6, i1 false) +._crit_edge.i.i: ; preds = %21 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(6) %22, ptr noundef nonnull align 1 dereferenceable(6) @.str.12, i64 6, i1 false) br label %.sink.split -._crit_edge.i.i9: ; preds = %23 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(5) %24, ptr noundef nonnull align 1 dereferenceable(5) @.str.74, i64 5, i1 false) +._crit_edge.i.i9: ; preds = %21 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(5) %22, ptr noundef nonnull align 1 dereferenceable(5) @.str.74, i64 5, i1 false) br label %.sink.split -._crit_edge.i.i13: ; preds = %23 - store i32 1701736302, ptr %24, align 8 +._crit_edge.i.i13: ; preds = %21 + store i32 1701736302, ptr %22, align 8 br label %.sink.split .sink.split: ; preds = %._crit_edge.i.i, %._crit_edge.i.i9, %._crit_edge.i.i13 %.sink = phi i64 [ 4, %._crit_edge.i.i13 ], [ 5, %._crit_edge.i.i9 ], [ 6, %._crit_edge.i.i ] %.sink25 = phi i64 [ 20, %._crit_edge.i.i13 ], [ 21, %._crit_edge.i.i9 ], [ 22, %._crit_edge.i.i ] - store i64 %.sink, ptr %25, align 8, !tbaa !19 + store i64 %.sink, ptr %23, align 8, !tbaa !19 %26 = getelementptr inbounds nuw i8, ptr %0, i64 %.sink25 store i8 0, ptr %26, align 1, !tbaa !10 - br label %27 + br label %25 -27: ; preds = %.sink.split, %.invoke - %28 = load ptr, ptr %4, align 8, !tbaa !16 - %29 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %30 = icmp eq ptr %28, %29 - br i1 %30, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %.sink.split, %23 + %26 = load ptr, ptr %4, align 8, !tbaa !16 + %27 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %33 = icmp eq ptr %26, %27 + br i1 %33, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %27 - %31 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %32 = load i64, ptr %31, align 8, !tbaa !19 - %33 = icmp ult i64 %32, 16 - call void @llvm.assume(i1 %33) +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i: ; preds = %25 + %29 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %30 = load i64, ptr %29, align 8, !tbaa !19 + %31 = icmp ult i64 %30, 16 + call void @llvm.assume(i1 %31) br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i: ; preds = %27 - %34 = load i64, ptr %29, align 8, !tbaa !10 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i: ; preds = %25 + %34 = load i64, ptr %27, align 8, !tbaa !10 %35 = add i64 %34, 1 - call void @_ZdlPvm(ptr noundef %28, i64 noundef %35) #22 + call void @_ZdlPvm(ptr noundef %26, i64 noundef %35) #22 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i call void @llvm.lifetime.end.p0(ptr nonnull %4) ret void -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i18: ; preds = %13 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i18: ; preds = %12 %36 = getelementptr inbounds nuw i8, ptr %4, i64 8 %37 = load i64, ptr %36, align 8, !tbaa !19 %38 = icmp ult i64 %37, 16 call void @llvm.assume(i1 %38) br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit19 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17: ; preds = %13 - %39 = load i64, ptr %16, align 8, !tbaa !10 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17: ; preds = %12 + %39 = load i64, ptr %15, align 8, !tbaa !10 %40 = add i64 %39, 1 - call void @_ZdlPvm(ptr noundef %15, i64 noundef %40) #22 + call void @_ZdlPvm(ptr noundef %14, i64 noundef %40) #22 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit19 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit19: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i18, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i17 call void @llvm.lifetime.end.p0(ptr nonnull %4) - resume { ptr, i32 } %14 + resume { ptr, i32 } %13 } ; Function Attrs: inlinehint mustprogress uwtable diff --git a/bench/folly/optimized/EventBase.ll b/bench/folly/optimized/EventBase.ll index e34aba8fb7e..d1bfb76e679 100644 --- a/bench/folly/optimized/EventBase.ll +++ b/bench/folly/optimized/EventBase.ll @@ -10254,7 +10254,9 @@ _ZN5folly6detail9futexWaitISt6atomicIjEEENS0_11FutexResultEPKT_jj.exit.i.i.i.i.i br i1 %32, label %.thread.i.i.i.i.i.i, label %17 "_ZN5folly6detail14ScopeGuardImplIZNS_9EventBase8loopBodyEiNS2_11LoopOptionsEE3$_0Lb1EED2Ev.exit": ; preds = %5, %.thread.i.i.i.i.i.i - %switch.i = icmp eq i32 %4, 0 + %switch.cast.i = trunc nuw nsw i32 %4 to i3 + %switch.downshift.i = lshr i3 1, %switch.cast.i + %switch.masked.i = trunc nuw i3 %switch.downshift.i to i1 %33 = getelementptr inbounds nuw i8, ptr %0, i64 120 store atomic i64 0, ptr %33 release, align 8 %34 = getelementptr inbounds nuw i8, ptr %0, i64 112 @@ -10263,7 +10265,7 @@ _ZN5folly6detail9futexWaitISt6atomicIjEEENS0_11FutexResultEPKT_jj.exit.i.i.i.i.i %37 = trunc nuw i8 %36 to i1 %38 = select i1 %37, i32 -2, i32 -1 store atomic i32 %38, ptr %34 release, align 16 - ret i1 %switch.i + ret i1 %switch.masked.i 39: ; preds = %3 %40 = landingpad { ptr, i32 } @@ -12685,8 +12687,13 @@ declare void @_ZNSt11logic_errorC1EOS_(ptr noundef nonnull align 8 dereferenceab ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define noundef zeroext i1 @_ZN5folly9EventBase9isSuccessENS0_10LoopStatusE(ptr noundef nonnull readnone align 16 captures(none) dereferenceable(632) %0, i32 noundef %1) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 { - %switch = icmp eq i32 %1, 0 - ret i1 %switch +switch.lookup: + %2 = icmp ult i32 %1, 3 + tail call void @llvm.assume(i1 %2) + %switch.cast = trunc nuw nsw i32 %1 to i3 + %switch.downshift = lshr i3 1, %switch.cast + %switch.masked = trunc nuw i3 %switch.downshift to i1 + ret i1 %switch.masked } ; Function Attrs: mustprogress uwtable @@ -14023,8 +14030,10 @@ define void @_ZN5folly9EventBase13loopPollSetupEv(ptr noundef nonnull align 16 c ; Function Attrs: mustprogress uwtable define noundef zeroext i1 @_ZN5folly9EventBase8loopPollEv(ptr noundef nonnull align 16 dereferenceable(632) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i32 @_ZN5folly9EventBase8loopMainEiNS0_11LoopOptionsE(ptr noundef nonnull align 16 dereferenceable(632) %0, i32 noundef 3, i16 0) - %switch.i = icmp eq i32 %2, 0 - ret i1 %switch.i + %switch.cast.i = trunc nuw nsw i32 %2 to i3 + %switch.downshift.i = lshr i3 1, %switch.cast.i + %switch.masked.i = trunc nuw i3 %switch.downshift.i to i1 + ret i1 %switch.masked.i } ; Function Attrs: mustprogress nounwind uwtable diff --git a/bench/folly/optimized/LogConfigParser.ll b/bench/folly/optimized/LogConfigParser.ll index 9510db549d3..764b589c54d 100644 --- a/bench/folly/optimized/LogConfigParser.ll +++ b/bench/folly/optimized/LogConfigParser.ll @@ -12653,16 +12653,18 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char store i32 256, ptr %17, align 8, !tbaa !281 %18 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i32 0, ptr %18, align 8, !tbaa !282 - switch i32 %2, label %27 [ + %..i = call noundef i32 @llvm.umin.i32(i32 %2, i32 3) + switch i32 %..i, label %default.unreachable [ i32 0, label %.invoke i32 1, label %21 i32 2, label %_ZN5folly6detail7convertENS_8DtoaModeE.exit + i32 3, label %28 ] -19: ; preds = %.invoke, %27, %_ZN5folly6detail7convertENS_8DtoaModeE.exit +19: ; preds = %.invoke, %28, %_ZN5folly6detail7convertENS_8DtoaModeE.exit %20 = landingpad { ptr, i32 } cleanup - br label %48 + br label %49 21: ; preds = %5 %22 = fptrunc double %0 to float @@ -12671,39 +12673,42 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char .invoke: ; preds = %5, %21 %24 = phi double [ %23, %21 ], [ %0, %5 ] - %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %2) - to label %29 unwind label %19 + %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %..i) + to label %30 unwind label %19 _ZN5folly6detail7convertENS_8DtoaModeE.exit: ; preds = %5 %26 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter7ToFixedEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 + to label %30 unwind label %19 27: ; preds = %5 - %28 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 - -29: ; preds = %.invoke, %_ZN5folly6detail7convertENS_8DtoaModeE.exit, %27 - %30 = load i32, ptr %18, align 8, !tbaa !282 - %31 = load ptr, ptr %8, align 8, !tbaa !279 - %32 = sext i32 %30 to i64 - %33 = getelementptr inbounds i8, ptr %31, i64 %32 - store i8 0, ptr %33, align 1, !tbaa !7 + unreachable + +28: ; preds = %5 + %29 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) + to label %30 unwind label %19 + +30:; preds = %.invoke, %26, %28 + %31 = load i32, ptr %18, align 8, !tbaa !282 + %32 = load ptr, ptr %8, align 8, !tbaa !279 + %33 = sext i32 %31 to i64 + %34 = getelementptr inbounds i8, ptr %32, i64 %33 + store i8 0, ptr %34, align 1, !tbaa !7 store i32 -1, ptr %18, align 8, !tbaa !282 %34 = getelementptr inbounds nuw i8, ptr %1, i64 8 %35 = load i64, ptr %34, align 8, !tbaa !39 %36 = sub i64 4611686018427387903, %35 - %37 = icmp ult i64 %36, %32 + %37 = icmp ult i64 %36, %33 br i1 %37, label %38, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i -38: ; preds = %29 +38: ; preds = %30 invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.16) #32 to label %.noexc unwind label %46 .noexc: ; preds = %38 unreachable -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %29 - %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %32) +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %30 + %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %33) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit unwind label %46 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i @@ -12727,22 +12732,22 @@ _ZN17double_conversion13StringBuilderD2Ev.exit: ; preds = %_ZNSt7__cxx1112basi 46: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i, %38 %47 = landingpad { ptr, i32 } cleanup - br label %48 - -48: ; preds = %46, %19 - %.pn = phi { ptr, i32 } [ %47, %46 ], [ %20, %19 ] - %49 = load i32, ptr %18, align 8, !tbaa !282 - %50 = icmp slt i32 %49, 0 - br i1 %50, label %_ZN17double_conversion13StringBuilderD2Ev.exit16, label %51 + br label %49 -51: ; preds = %48 - %52 = load ptr, ptr %8, align 8, !tbaa !279 - %53 = zext nneg i32 %49 to i64 - %54 = getelementptr inbounds nuw i8, ptr %52, i64 %53 - store i8 0, ptr %54, align 1, !tbaa !7 +51: ; preds = %47, %19 + %.pn = phi { ptr, i32 } [ %48, %47 ], [ %20, %19 ] + %50 = load i32, ptr %18, align 8, !tbaa !282 + %51 = icmp slt i32 %50, 0 + br i1 %51, label %_ZN17double_conversion13StringBuilderD2Ev.exit16, label %52 + +52: ; preds = %49 + %53 = load ptr, ptr %8, align 8, !tbaa !279 + %54 = zext nneg i32 %50 to i64 + %55 = getelementptr inbounds nuw i8, ptr %53, i64 %54 + store i8 0, ptr %55, align 1, !tbaa !7 br label %_ZN17double_conversion13StringBuilderD2Ev.exit16 -_ZN17double_conversion13StringBuilderD2Ev.exit16: ; preds = %48, %51 +_ZN17double_conversion13StringBuilderD2Ev.exit16: ; preds = %49, %52 call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) @@ -19665,6 +19670,9 @@ declare i64 @llvm.umax.i64(i64, i64) #27 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #28 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #27 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #27 diff --git a/bench/git/optimized/protocol.ll b/bench/git/optimized/protocol.ll index 060797b5209..09fbe24b59a 100644 --- a/bench/git/optimized/protocol.ll +++ b/bench/git/optimized/protocol.ll @@ -36,7 +36,6 @@ define dso_local range(i32 0, 3) i32 @get_protocol_version_config() local_unname br i1 %7, label %switch.lookup, label %11 switch.lookup: ; preds = %4 - %switch.idx.cast = zext nneg i8 %switch.tableidx to i32 %8 = getelementptr inbounds nuw i8, ptr %5, i64 1 %9 = load i8, ptr %8, align 1 %10 = icmp eq i8 %9, 0 @@ -53,32 +52,27 @@ switch.lookup: ; preds = %4 14: ; preds = %12 %15 = load i8, ptr %13, align 1, !tbaa !11 - switch i8 %15, label %19 [ - i8 0, label %parse_protocol_version.exit - i8 48, label %.tail9.sink.split.i16 - i8 49, label %.tail5.i20 - i8 50, label %sub_111.i15 - ] - -.tail5.i20: ; preds = %14 - br label %.tail9.sink.split.i16 - -sub_111.i15: ; preds = %14 - br label %.tail9.sink.split.i16 - -.tail9.sink.split.i16: ; preds = %14, %sub_111.i15, %.tail5.i20 - %.sink23.i17 = phi i32 [ 1, %.tail5.i20 ], [ 2, %sub_111.i15 ], [ 0, %14 ] - %16 = getelementptr inbounds nuw i8, ptr %13, i64 1 - %17 = load i8, ptr %16, align 1 - %18 = icmp eq i8 %17, 0 - br i1 %18, label %parse_protocol_version.exit, label %19 - -19: ; preds = %14, %.tail9.sink.split.i16 + %.not14 = icmp eq i8 %15, 0 + br i1 %.not14, label %parse_protocol_version.exit, label %16 + +16: ; preds = %14 + %switch.tableidx.i15 = add i8 %15, -48 + %17 = icmp ult i8 %switch.tableidx.i15, 3 + br i1 %17, label %switch.lookup.i17, label %21 + +switch.lookup.i17:; preds = %16 + %18 = getelementptr inbounds nuw i8, ptr %13, i64 1 + %19 = load i8, ptr %18, align 1 + %20 = icmp eq i8 %19, 0 + br i1 %20, label %parse_protocol_version.exit, label %21 + +21:; preds = %16, %switch.lookup.i17 call void (ptr, ...) @die(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str, ptr noundef nonnull %13) #8 unreachable -parse_protocol_version.exit: ; preds = %14, %.tail9.sink.split.i16, %switch.lookup, %12 - %.0 = phi i32 [ 2, %14 ], [ 2, %12 ], [ %switch.idx.cast, %switch.lookup ], [ %.sink23.i17, %.tail9.sink.split.i16 ] +parse_protocol_version.exit: ; preds = %switch.lookup.i17, %switch.lookup, %12, %14 + %.0 = phi i8 [ 2, %14 ], [ 2, %12 ], [ %switch.tableidx.i, %switch.lookup.i ], [ %switch.tableidx.i15, %switch.lookup.i17 ] + %.0 = zext nneg i8 %.0.shrunk to i32 call void @llvm.lifetime.end.p0(ptr nonnull %1) ret i32 %.0 } @@ -151,7 +145,7 @@ switch.lookup: ; preds = %17 br label %parse_protocol_version.exit parse_protocol_version.exit: ; preds = %17, %switch.lookup - %.0.i = phi i32 [ -1, %17 ], [ %spec.select22.i, %switch.lookup ] + %.0.i = phi i32 [ -1, %17 ], [ %spec.select22.i, %switch.lookup.i ] %spec.select = call i32 @llvm.smax.i32(i32 %.0.i, i32 %.12228) br label %skip_prefix.exit @@ -205,38 +199,31 @@ define dso_local range(i32 0, 3) i32 @determine_protocol_version_client(ptr noun 8: ; preds = %2 %9 = load i8, ptr %scevgep, align 1 - switch i8 %9, label %parse_protocol_version.exit.thread [ - i8 48, label %.tail9.sink.split.i.thread - i8 49, label %.tail9.sink.split.i - i8 50, label %sub_111.i - ] - -sub_111.i: ; preds = %8 - br label %.tail9.sink.split.i - -.tail9.sink.split.i: ; preds = %8, %sub_111.i - %.sink23.i = phi i32 [ 2, %sub_111.i ], [ 1, %8 ] - %10 = getelementptr i8, ptr %0, i64 9 - %11 = load i8, ptr %10, align 1 - %12 = icmp eq i8 %11, 0 - br i1 %12, label %skip_prefix.exit, label %parse_protocol_version.exit.thread - -.tail9.sink.split.i.thread: ; preds = %8 - %13 = getelementptr i8, ptr %0, i64 9 - %14 = load i8, ptr %13, align 1 - %15 = icmp eq i8 %14, 0 - br i1 %15, label %16, label %parse_protocol_version.exit.thread - -parse_protocol_version.exit.thread: ; preds = %.tail9.sink.split.i.thread, %.tail9.sink.split.i, %8 + %switch.tableidx = add i8 %9, -48 + %10 = icmp ult i8 %switch.tableidx.i, 3 + br i1 %10, label %switch.lookup, label %parse_protocol_version.exit.thread + +switch.lookup.i: ; preds = %8 + %11 = getelementptr i8, ptr %0, i64 9 + %12 = load i8, ptr %11, align 1 + %13 = icmp eq i8 %12, 0 + br i1 %13, label %parse_protocol_version.exit, label %parse_protocol_version.exit.thread + +parse_protocol_version.exit:; preds = %switch.lookup.i + %switch.idx.cast = zext nneg i8 %switch.tableidx to i32 + %cond = icmp eq i8 %switch.tableidx, 0 + br i1 %cond, label %14, label %skip_prefix.exit + +parse_protocol_version.exit.thread: ; preds = %switch.lookup.i, %8 tail call void (ptr, ...) @die(ptr noundef nonnull @.str.10) #8 unreachable -16: ; preds = %.tail9.sink.split.i.thread +16: ; preds = %parse_protocol_version.exit tail call void (ptr, ...) @die(ptr noundef nonnull @.str.11) #8 unreachable -skip_prefix.exit: ; preds = %3, %.tail9.sink.split.i - %.0 = phi i32 [ %.sink23.i, %.tail9.sink.split.i ], [ 0, %3 ] +skip_prefix.exit: ; preds = %3, %parse_protocol_version.exit + %.0 = phi i32 [ %switch.idx.cast, %parse_protocol_version.exit ], [ 0, %3 ] ret i32 %.0 } diff --git a/bench/git/optimized/url.ll b/bench/git/optimized/url.ll index db419e5cb9d..e6beb0f6a96 100644 --- a/bench/git/optimized/url.ll +++ b/bench/git/optimized/url.ll @@ -15,95 +15,96 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local range(i32 0, 2) i32 @is_urlschemechar(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 { %3 = icmp sgt i32 %1, 0 - br i1 %3, label %4, label %switch.edge + br i1 %3, label %4, label %.thread 4: ; preds = %2 %5 = and i32 %1, 255 %6 = zext nneg i32 %5 to i64 %7 = getelementptr inbounds nuw i8, ptr @sane_ctype, i64 %6 %8 = load i8, ptr %7, align 1, !tbaa !4 - %9 = and i8 %8, 6 - %10 = icmp ne i8 %9, 0 - br label %switch.edge - -switch.edge: ; preds = %4, %2 - %11 = phi i1 [ false, %2 ], [ %10, %4 ] - %12 = icmp ult i32 %1, 47 + %.fr = freeze i8 %8 + %9 = and i8 %.fr, 6 + %.not14 = icmp ne i8 %9, 0 + %10 = icmp samesign ult i32 %1, 47 %switch.cast = zext nneg i32 %1 to i47 %switch.downshift = lshr i47 -26388279066624, %switch.cast %switch.masked = trunc i47 %switch.downshift to i1 - %13 = select i1 %12, i1 %switch.masked, i1 false + %13 = select i1 %10, i1 %switch.masked, i1 false %.not = icmp eq i32 %0, 0 %14 = and i1 %.not, %13 - %narrow = or i1 %11, %14 + %narrow = select i1 %.not14, i1 true, i1 %14 %15 = zext i1 %narrow to i32 - ret i32 %15 + br label %.thread + +.thread: ; preds = %2, %4 + %13 = phi i32 [ %spec.select, %4 ], [ 0, %2 ] + ret i32 %13 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local range(i32 0, 2) i32 @is_url(ptr noundef readonly captures(address_is_null) %0) local_unnamed_addr #1 { %.not = icmp eq ptr %0, null - br i1 %.not, label %.critedge, label %2 + br i1 %.not, label %is_urlschemechar.exit.thread, label %2 2: ; preds = %1 %3 = load i8, ptr %0, align 1, !tbaa !4 %4 = icmp sgt i8 %3, 0 - br i1 %4, label %is_urlschemechar.exit, label %.critedge + br i1 %4, label %is_urlschemechar.exit, label %is_urlschemechar.exit.thread is_urlschemechar.exit: ; preds = %2 %5 = zext nneg i8 %3 to i64 %6 = getelementptr inbounds nuw i8, ptr @sane_ctype, i64 %5 %7 = load i8, ptr %6, align 1, !tbaa !4 - %8 = and i8 %7, 6 - %.not16 = icmp eq i8 %8, 0 - br i1 %.not16, label %.critedge, label %.preheader + %.fr.i = freeze i8 %7 + %8 = and i8 %.fr.i, 6 + %.not14.i.not = icmp eq i8 %8, 0 + br i1 %.not14.i.not, label %is_urlschemechar.exit.thread, label %.preheader -.preheader: ; preds = %is_urlschemechar.exit, %is_urlschemechar.exit15 - %.pn = phi ptr [ %.0, %is_urlschemechar.exit15 ], [ %0, %is_urlschemechar.exit ] +.preheader: ; preds = %is_urlschemechar.exit, %is_urlschemechar.exit21 + %.pn = phi ptr [ %.0, %is_urlschemechar.exit21 ], [ %0, %is_urlschemechar.exit ] %.0 = getelementptr inbounds nuw i8, ptr %.pn, i64 1 %9 = load i8, ptr %.0, align 1, !tbaa !4 - %10 = sext i8 %9 to i64 + %10 = sext i8 %9 to i32 switch i8 %9, label %11 [ - i8 58, label %21 - i8 0, label %.critedge + i8 58, label %20 + i8 0, label %is_urlschemechar.exit.thread ] 11: ; preds = %.preheader %12 = icmp sgt i8 %9, 0 - br i1 %12, label %13, label %is_urlschemechar.exit15 + br i1 %12, label %13, label %is_urlschemechar.exit.thread 13: ; preds = %11 - %14 = getelementptr inbounds nuw i8, ptr @sane_ctype, i64 %10 + %13 = zext nneg i32 %10 to i64 + %14 = getelementptr inbounds nuw i8, ptr @sane_ctype, i64 %13 %15 = load i8, ptr %14, align 1, !tbaa !4 - %16 = and i8 %15, 6 - %17 = icmp ne i8 %16, 0 - br label %is_urlschemechar.exit15 - -is_urlschemechar.exit15: ; preds = %13, %11 - %18 = phi i1 [ false, %11 ], [ %17, %13 ] - %19 = icmp ult i8 %9, 47 - %switch.cast = zext nneg i8 %9 to i47 - %switch.downshift = lshr i47 -26388279066624, %switch.cast - %switch.masked = trunc i47 %switch.downshift to i1 - %20 = select i1 %19, i1 %switch.masked, i1 false - %narrow.i = or i1 %18, %20 - br i1 %narrow.i, label %.preheader, label %.critedge, !llvm.loop !7 - -21: ; preds = %.preheader - %22 = getelementptr inbounds nuw i8, ptr %.pn, i64 2 - %23 = load i8, ptr %22, align 1, !tbaa !4 - %24 = icmp eq i8 %23, 47 - br i1 %24, label %25, label %.critedge - -25: ; preds = %21 - %26 = getelementptr inbounds nuw i8, ptr %.pn, i64 3 - %27 = load i8, ptr %26, align 1, !tbaa !4 - %28 = icmp eq i8 %27, 47 - %29 = zext i1 %28 to i32 - br label %.critedge - -.critedge: ; preds = %.preheader, %is_urlschemechar.exit15, %2, %21, %25, %1, %is_urlschemechar.exit - %.08 = phi i32 [ 0, %is_urlschemechar.exit ], [ 0, %1 ], [ 0, %21 ], [ %29, %25 ], [ 0, %2 ], [ 0, %is_urlschemechar.exit15 ], [ 0, %.preheader ] + %.fr.i15 = freeze i8 %15 + %16 = and i8 %.fr.i15, 6 + %.not14.i16.not = icmp eq i8 %16, 0 + %17 = icmp samesign ugt i8 %9, 46 + %switch.cast.i17 = zext nneg i32 %10 to i47 + %18 = shl nuw i47 1, %switch.cast.i17 + %19 = and i47 %18, -26388279066624 + %.not142425 = icmp eq i47 %19, 0 + %.not1424 = select i1 %17, i1 true, i1 %.not142425 + %.not14 = select i1 %.not14.i16.not, i1 %.not1424, i1 false + br i1 %.not14, label %is_urlschemechar.exit.thread, label %.preheader, !llvm.loop !7 + +20: ; preds = %.preheader + %21 = getelementptr inbounds nuw i8, ptr %.pn, i64 2 + %22 = load i8, ptr %21, align 1, !tbaa !4 + %23 = icmp eq i8 %22, 47 + br i1 %23, label %24, label %is_urlschemechar.exit.thread + +24:; preds = %20 + %25 = getelementptr inbounds nuw i8, ptr %.pn, i64 3 + %26 = load i8, ptr %25, align 1, !tbaa !4 + %27 = icmp eq i8 %26, 47 + %28 = zext i1 %27 to i32 + br label %is_urlschemechar.exit.thread + +is_urlschemechar.exit.thread:; preds = %.preheader, %11, %is_urlschemechar.exit21, %2, %20, %24, %1, %is_urlschemechar.exit + %.08 = phi i32 [ 0, %is_urlschemechar.exit ], [ 0, %1 ], [ 0, %20 ], [ %28, %24 ], [ 0, %2 ], [ 0, %is_urlschemechar.exit21 ], [ 0, %11 ], [ 0, %.preheader ] ret i32 %.08 } diff --git a/bench/glslang/optimized/IntermTraverse.ll b/bench/glslang/optimized/IntermTraverse.ll index 2db7c62cfbc..70efb788aed 100644 --- a/bench/glslang/optimized/IntermTraverse.ll +++ b/bench/glslang/optimized/IntermTraverse.ll @@ -1915,24 +1915,26 @@ define linkonce_odr noundef zeroext i1 @_ZNK7glslang12TIntermTyped8isStructEv(pt define linkonce_odr noundef zeroext i1 @_ZNK7glslang12TIntermTyped16isFloatingDomainEv(ptr noundef nonnull align 8 dereferenceable(184) %0) unnamed_addr #1 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 40 %3 = load i32, ptr %2, align 8 - %4 = and i32 %3, 255 - %.off.i = add nsw i32 %4, -1 - %switch.i = icmp ult i32 %.off.i, 3 - ret i1 %switch.i + %4 = and i32 %3, 252 + %5 = icmp eq i32 %4, 0 + %switch.cast.i = trunc i32 %3 to i4 + %switch.downshift.i = lshr i4 -2, %switch.cast.i + %switch.masked.i = trunc i4 %switch.downshift.i to i1 + %6 = select i1 %5, i1 %switch.masked.i, i1 false + ret i1 %6 } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr noundef zeroext i1 @_ZNK7glslang12TIntermTyped15isIntegerDomainEv(ptr noundef nonnull align 8 dereferenceable(184) %0) unnamed_addr #1 comdat align 2 { -_ZNK7glslang5TType15isIntegerDomainEv.exit: - %1 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %2 = load i32, ptr %1, align 8 - %trunc.i = trunc i32 %2 to i8 - %3 = icmp ult i8 %trunc.i, 14 - %4 = trunc i32 %2 to i14 - %switch.cast = and i14 %4, 255 - %switch.downshift = lshr i14 -4112, %switch.cast - %switch.masked = trunc i14 %switch.downshift to i1 - %.0.i = select i1 %3, i1 %switch.masked, i1 false + %2 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %3 = load i32, ptr %2, align 8 + %trunc.i = trunc i32 %3 to i8 + %4 = icmp ult i8 %trunc.i, 14 + %5 = trunc i32 %3 to i14 + %switch.cast.i = and i14 %5, 255 + %switch.downshift.i = lshr i14 -4112, %switch.cast.i + %switch.masked.i = trunc i14 %switch.downshift.i to i1 + %.0.i = select i1 %4, i1 %switch.masked.i, i1 false ret i1 %.0.i } diff --git a/bench/graphviz/optimized/agerror.ll b/bench/graphviz/optimized/agerror.ll index 4d64bf69ce5..a1fe22516e5 100644 --- a/bench/graphviz/optimized/agerror.ll +++ b/bench/graphviz/optimized/agerror.ll @@ -506,45 +506,43 @@ define internal range(i32 -2147483648, 1) i32 @default_usererrf(ptr noundef read %.not24 = icmp eq i8 %2, 0 br i1 %.not24, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %1, %13 - %3 = phi i8 [ %15, %13 ], [ %2, %1 ] - %.01525 = phi ptr [ %14, %13 ], [ %0, %1 ] +.lr.ph: ; preds = %1, %16 + %3 = phi i8 [ %18, %16 ], [ %2, %1 ] + %.01525 = phi ptr [ %17, %16 ], [ %0, %1 ] %4 = sext i8 %3 to i32 %or.cond.i = icmp ult i8 %3, 32 %5 = icmp eq i8 %3, 127 %spec.select.i = or i1 %or.cond.i, %5 - br i1 %spec.select.i, label %6, label %gv_isspace.exit.thread + br i1 %spec.select.i, label %6, label %12 6: ; preds = %.lr.ph - switch i8 %3, label %gv_isspace.exit [ - i8 9, label %gv_isspace.exit.thread - i8 10, label %gv_isspace.exit.thread - i8 11, label %gv_isspace.exit.thread - i8 12, label %gv_isspace.exit.thread - i8 13, label %gv_isspace.exit.thread - i8 32, label %gv_isspace.exit.thread - ] - -gv_isspace.exit: ; preds = %6 - %7 = load ptr, ptr @stderr, align 8, !tbaa !10 - %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.8, i32 noundef %4) #20 - %9 = icmp sgt i32 %8, -1 - br i1 %9, label %13, label %._crit_edge - -gv_isspace.exit.thread: ; preds = %6, %6, %6, %6, %6, %6, %.lr.ph - %10 = load ptr, ptr @stderr, align 8, !tbaa !10 - %11 = tail call i32 @putc(i32 noundef %4, ptr noundef %10) - %12 = icmp sgt i32 %11, -1 - br i1 %12, label %13, label %._crit_edge - -13: ; preds = %gv_isspace.exit.thread, %gv_isspace.exit - %14 = getelementptr inbounds nuw i8, ptr %.01525, i64 1 - %15 = load i8, ptr %14, align 1, !tbaa !9 - %.not = icmp eq i8 %15, 0 + %7 = icmp samesign ult i8 %3, 33 + %switch.cast.i = zext nneg i32 %4 to i33 + %switch.downshift.i = lshr i33 -4294951424, %switch.cast.i + %switch.masked.i = trunc i33 %switch.downshift.i to i1 + %.0.i = select i1 %7, i1 %switch.masked.i, i1 false + br i1 %.0.i, label %12, label %8 + +8: ; preds = %6 + %9 = load ptr, ptr @stderr, align 8, !tbaa !10 + %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.8, i32 noundef %4) #20 + %11 = icmp sgt i32 %10, -1 + br i1 %11, label %16, label %._crit_edge + +12:; preds = %6, %.lr.ph + %13 = load ptr, ptr @stderr, align 8, !tbaa !10 + %14 = tail call i32 @putc(i32 noundef %4, ptr noundef %13) + %15 = icmp sgt i32 %14, -1 + br i1 %15, label %16, label %._crit_edge + +16:; preds = %12, %8 + %17 = getelementptr inbounds nuw i8, ptr %.01524, i64 1 + %18 = load i8, ptr %17, align 1, !tbaa !9 + %.not = icmp eq i8 %18, 0 br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12 -._crit_edge: ; preds = %gv_isspace.exit.thread, %gv_isspace.exit, %13, %1 - %spec.select = phi i32 [ 0, %1 ], [ 0, %13 ], [ %8, %gv_isspace.exit ], [ %11, %gv_isspace.exit.thread ] +._crit_edge: ; preds = %12, %8, %16, %1 + %spec.select = phi i32 [ 0, %1 ], [ 0, %16 ], [ %10, %8 ], [ %14, %12 ] ret i32 %spec.select } diff --git a/bench/graphviz/optimized/post_process.ll b/bench/graphviz/optimized/post_process.ll index 6b89a77e38d..50350b69491 100644 --- a/bench/graphviz/optimized/post_process.ll +++ b/bench/graphviz/optimized/post_process.ll @@ -3282,11 +3282,8 @@ define void @post_process_smoothing(i32 noundef %0, ptr noundef %1, ptr noundef br label %TriangleSmoother_delete.exit 32: ; preds = %4, %4, %4 - %switch.selectcmp = icmp eq i32 %7, 3 - %switch.select = select i1 %switch.selectcmp, i32 2, i32 1 - %switch.selectcmp34 = icmp eq i32 %7, 1 - %switch.select35 = select i1 %switch.selectcmp34, i32 0, i32 %switch.select - %33 = tail call ptr @StressMajorizationSmoother2_new(ptr noundef %1, i32 noundef %0, double noundef 5.000000e-02, ptr noundef %3, i32 noundef %switch.select35) + %switch.tableidx = add nsw i32 %7, -1 + %33 = tail call ptr @StressMajorizationSmoother2_new(ptr noundef %1, i32 noundef %0, double noundef 5.000000e-02, ptr noundef %3, i32 noundef %switch.tableidx) %34 = tail call double @StressMajorizationSmoother_smooth(ptr noundef %33, i32 noundef %0, ptr noundef %3, i32 noundef 50) %.not.i = icmp eq ptr %33, null br i1 %.not.i, label %TriangleSmoother_delete.exit, label %35 diff --git a/bench/gromacs/optimized/nbsearch.ll b/bench/gromacs/optimized/nbsearch.ll index a79bf703be9..a5d8397835d 100644 --- a/bench/gromacs/optimized/nbsearch.ll +++ b/bench/gromacs/optimized/nbsearch.ll @@ -1524,14 +1524,18 @@ switch.lookup: ; preds = %12 %switch.masked = trunc i24 %switch.downshift to i8 %switch.cast59 = trunc nuw i32 %13 to i24 %switch.shiftamt60 = shl nuw nsw i24 %switch.cast59, 3 - %switch.downshift61 = lshr i24 1, %switch.shiftamt60 - %switch.masked62 = trunc nuw nsw i24 %switch.downshift61 to i8 + %switch.downshift61 = lshr i24 65537, %switch.shiftamt60 + %switch.masked62 = trunc i24 %switch.downshift61 to i8 + %switch.cast63 = trunc nuw i32 %13 to i24 + %switch.shiftamt64 = shl nuw nsw i24 %switch.cast63, 3 + %switch.downshift65 = lshr i24 1, %switch.shiftamt64 + %switch.masked66 = trunc nuw nsw i24 %switch.downshift65 to i8 %15 = getelementptr inbounds nuw i8, ptr %0, i64 442 store i8 %switch.masked, ptr %15, align 2, !tbaa !38 %16 = getelementptr inbounds nuw i8, ptr %0, i64 443 - store i8 %switch.masked, ptr %16, align 1, !tbaa !38 + store i8 %switch.masked62, ptr %16, align 1, !tbaa !38 %17 = getelementptr inbounds nuw i8, ptr %0, i64 444 - store i8 %switch.masked62, ptr %17, align 4, !tbaa !38 + store i8 %switch.masked66, ptr %17, align 4, !tbaa !38 call void @llvm.lifetime.start.p0(ptr nonnull %7) store i8 0, ptr %7, align 1, !tbaa !38 %18 = getelementptr inbounds nuw i8, ptr %7, i64 1 diff --git a/bench/gromacs/optimized/pme_pp.ll b/bench/gromacs/optimized/pme_pp.ll index 2acd351c5f4..c49e346bb69 100644 --- a/bench/gromacs/optimized/pme_pp.ll +++ b/bench/gromacs/optimized/pme_pp.ll @@ -49,33 +49,26 @@ $_ZNSt6vectorIN3gmx11BasicVectorIfEENS0_9AllocatorIS2_NS0_20HostAllocationPolicy define void @_Z23gmx_pme_send_parametersPK9t_commrecRK19interaction_const_tbbN3gmx8ArrayRefIKfEES8_S8_S8_S8_S8_ii(ptr noundef readonly captures(none) %0, ptr noundef nonnull readonly align 8 captures(none) dereferenceable(152) %1, i1 noundef zeroext %2, i1 noundef zeroext %3, ptr %4, ptr %5, ptr noundef readonly byval(%"class.gmx::ArrayRef") align 8 captures(none) %6, ptr noundef readonly byval(%"class.gmx::ArrayRef") align 8 captures(none) %7, ptr noundef readonly byval(%"class.gmx::ArrayRef") align 8 captures(none) %8, ptr noundef readonly byval(%"class.gmx::ArrayRef") align 8 captures(none) %9, ptr noundef readonly byval(%"class.gmx::ArrayRef") align 8 captures(none) %10, i32 noundef %11, i32 noundef %12) local_unnamed_addr #0 { %14 = getelementptr inbounds nuw i8, ptr %1, i64 68 %.val = load i32, ptr %14, align 4, !tbaa !4 - switch i32 %.val, label %_ZL8usingPmeRK22CoulombInteractionType.exit [ - i32 3, label %15 - i32 14, label %15 - i32 13, label %15 - i32 15, label %15 - i32 5, label %15 - ] - -15: ; preds = %13, %13, %13, %13, %13 - br label %_ZL8usingPmeRK22CoulombInteractionType.exit - -_ZL8usingPmeRK22CoulombInteractionType.exit: ; preds = %13, %15 - %16 = phi i32 [ 1, %15 ], [ 0, %13 ] + %15 = icmp ult i32 %.val, 16 + %switch.cast.i = trunc i32 %.val to i16 + %switch.downshift.i = lshr i16 -8152, %switch.cast.i + %16 = and i16 %switch.downshift.i, 1 + %17 = zext nneg i16 %16 to i32 + %spec.select = select i1 %15, i32 %17, i32 0 %.val12 = load i32, ptr %1, align 8, !tbaa !8 %17 = icmp eq i32 %.val12, 5 - %18 = or disjoint i32 %16, 20 - %.1 = select i1 %17, i32 %18, i32 %16 + %18 = or disjoint i32 %spec.select, 20 + %.1 = select i1 %17, i32 %18, i32 %spec.select %or.cond = or i1 %2, %3 %19 = shl nuw nsw i32 %.1, 1 %20 = select i1 %or.cond, i32 %19, i32 0 - %.2 = or disjoint i32 %20, %.1 + %.2 = or i32 %20, %.1 %21 = load ptr, ptr %6, align 8, !tbaa !10 %22 = load ptr, ptr %7, align 8, !tbaa !10 %23 = load ptr, ptr %8, align 8, !tbaa !10 %24 = load ptr, ptr %9, align 8, !tbaa !10 %25 = load ptr, ptr %10, align 8, !tbaa !10 - tail call fastcc void @_ZL26gmx_pme_send_coeffs_coordsP10t_forcerecPK9t_commrecjN3gmx8ArrayRefIKfEES7_S7_S7_S7_S7_PA3_S6_NS5_IKNS4_11BasicVectorIfEEEEffiilbbbbbP20GpuEventSynchronizer(ptr noundef null, ptr noundef %0, i32 noundef %.2, ptr %4, ptr %21, ptr %22, ptr %23, ptr %24, ptr %25, ptr noundef null, ptr null, float noundef 0.000000e+00, float noundef 0.000000e+00, i32 noundef %11, i32 noundef %12, i64 noundef -1, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false, ptr noundef null) + tail call fastcc void @_ZL26gmx_pme_send_coeffs_coordsP10t_forcerecPK9t_commrecjN3gmx8ArrayRefIKfEES7_S7_S7_S7_S7_PA3_S6_NS5_IKNS4_11BasicVectorIfEEEEffiilbbbbbP20GpuEventSynchronizer(ptr noundef null, ptr noundef %0, i32 noundef %.2, ptr %4, ptr %22, ptr %23, ptr %24, ptr %25, ptr %26, ptr noundef null, ptr null, float noundef 0.000000e+00, float noundef 0.000000e+00, i32 noundef %11, i32 noundef %12, i64 noundef -1, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false, ptr noundef null) ret void } diff --git a/bench/grpc/optimized/json_token.ll b/bench/grpc/optimized/json_token.ll index f21d7dc048b..6030357af59 100644 --- a/bench/grpc/optimized/json_token.ll +++ b/bench/grpc/optimized/json_token.ll @@ -243,14 +243,9 @@ define void @_Z35grpc_auth_json_key_create_from_jsonRKN9grpc_core12experimental4 store ptr @.str, ptr %0, align 8, !tbaa !3 %12 = getelementptr inbounds nuw i8, ptr %1, i64 48 %13 = load i8, ptr %12, align 8, !tbaa !13 - switch i8 %13, label %17 [ + switch i8 %13, label %26 [ i8 -1, label %14 - i8 0, label %_ZNK9grpc_core12experimental4Json4typeEv.exit - i8 1, label %26 - i8 2, label %26 - i8 3, label %26 - i8 4, label %26 - i8 5, label %26 + i8 0, label %17 ] 14: ; preds = %2 @@ -265,14 +260,11 @@ define void @_Z35grpc_auth_json_key_create_from_jsonRKN9grpc_core12experimental4 unreachable 17: ; preds = %2 - unreachable - -_ZNK9grpc_core12experimental4Json4typeEv.exit: ; preds = %2 call void @llvm.lifetime.start.p0(ptr nonnull %6) invoke void @_ZN4absl12lts_2024072212log_internal10LogMessageC1EPKciNS2_8ErrorTagE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull @.str.1, i32 noundef 86) #31 to label %18 unwind label %21 -18: ; preds = %_ZNK9grpc_core12experimental4Json4typeEv.exit +18: ; preds = %17 invoke void @_ZN4absl12lts_2024072212log_internal10LogMessage19CopyToEncodedBufferILNS2_10StringTypeE0EEEvSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 13, ptr nonnull @.str.2) to label %_ZN4absl12lts_2024072212log_internal10LogMessagelsILi14EEERS2_RAT__Kc.exit unwind label %23 @@ -286,7 +278,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi14EEERS2_RAT__Kc.exit: ; pr cleanup br label %150 -21: ; preds = %_ZNK9grpc_core12experimental4Json4typeEv.exit +21: ; preds = %17 %22 = landingpad { ptr, i32 } cleanup br label %25 @@ -302,7 +294,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi14EEERS2_RAT__Kc.exit: ; pr call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %150 -26: ; preds = %2, %2, %2, %2, %2 +26: ; preds = %2 %27 = invoke noundef ptr @_Z29grpc_json_get_string_propertyRKN9grpc_core12experimental4JsonEPKcPN4absl12lts_202407226StatusE(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull @.str.3, ptr noundef nonnull %5) to label %28 unwind label %19 @@ -483,7 +475,7 @@ _ZN4absl12lts_202407226StatusC2ERKS1_.exit.i43: ; preds = %.thread79, %_ZN4abs 88: ; preds = %87 %89 = inttoptr i64 %70 to ptr invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %89) - to label %_ZN4absl12lts_202407226StatusD2Ev.exit49 unwind label %90 + to label %_ZN4absl12lts_202407226StatusD2Ev.exit50 unwind label %90 90: ; preds = %88 %91 = landingpad { ptr, i32 } @@ -610,7 +602,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 130: ; preds = %.thread66 invoke void @gpr_free(ptr noundef nonnull %129) - to label %.noexc52 unwind label %19 + to label %.noexc53 unwind label %19 .noexc52: ; preds = %130 store ptr null, ptr %128, align 8, !tbaa !21 @@ -624,7 +616,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 134: ; preds = %131 invoke void @gpr_free(ptr noundef nonnull %133) - to label %.noexc53 unwind label %19 + to label %.noexc54 unwind label %19 .noexc53: ; preds = %134 store ptr null, ptr %132, align 8, !tbaa !22 @@ -638,7 +630,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 138: ; preds = %135 invoke void @gpr_free(ptr noundef nonnull %137) - to label %.noexc54 unwind label %19 + to label %.noexc55 unwind label %19 .noexc54: ; preds = %138 store ptr null, ptr %136, align 8, !tbaa !23 @@ -652,7 +644,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 142: ; preds = %139 invoke void @RSA_free(ptr noundef nonnull %141) - to label %.noexc55 unwind label %19 + to label %.noexc56 unwind label %19 .noexc55: ; preds = %142 store ptr null, ptr %140, align 8, !tbaa !20 @@ -667,7 +659,7 @@ _Z27grpc_auth_json_key_destructP18grpc_auth_json_key.exit: ; preds = %.noexc55, 145: ; preds = %_Z27grpc_auth_json_key_destructP18grpc_auth_json_key.exit %146 = inttoptr i64 %143 to ptr invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %146) - to label %_ZN4absl12lts_202407226StatusD2Ev.exit57 unwind label %147 + to label %_ZN4absl12lts_202407226StatusD2Ev.exit58 unwind label %147 147: ; preds = %145 %148 = landingpad { ptr, i32 } @@ -681,7 +673,7 @@ _ZN4absl12lts_202407226StatusD2Ev.exit57: ; preds = %_Z27grpc_auth_json_ ret void 150: ; preds = %123, %111, %.body45, %.body, %25, %19 - %.pn36 = phi { ptr, i32 } [ %20, %19 ], [ %.pn32, %25 ], [ %.pn30, %111 ], [ %.pn, %123 ], [ %86, %.body45 ], [ %45, %.body ] + %.pn36 = phi { ptr, i32 } [ %20, %19 ], [ %.pn32, %25 ], [ %.pn30, %111 ], [ %.pn, %123 ], [ %86, %.body46 ], [ %45, %.body ] call void @_ZN4absl12lts_202407226StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #29 call void @llvm.lifetime.end.p0(ptr nonnull %5) resume { ptr, i32 } %.pn36 diff --git a/bench/grpc/optimized/ssl_utils.ll b/bench/grpc/optimized/ssl_utils.ll index 4be257f583e..f68331237fa 100644 --- a/bench/grpc/optimized/ssl_utils.ll +++ b/bench/grpc/optimized/ssl_utils.ll @@ -352,10 +352,9 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit6: ; preds = %_ZNK ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define noundef range(i32 0, 5) i32 @_Z44grpc_get_tsi_client_certificate_request_type40grpc_ssl_client_certificate_request_type(i32 noundef %0) local_unnamed_addr #5 { - %switch.tableidx = add i32 %0, -1 - %2 = icmp ult i32 %switch.tableidx, 4 - %.0 = select i1 %2, i32 %0, i32 0 - ret i32 %.0 + %2 = icmp ult i32 %0, 5 + %. = select i1 %2, i32 %0, i32 0 + ret i32 %. } ; Function Attrs: mustprogress uwtable @@ -2363,11 +2362,10 @@ _Z31grpc_fill_alpn_protocol_stringsPm.exit: ; preds = %.lr.ph.i, %11 store i64 %1, ptr %26, align 8, !tbaa !127 %27 = getelementptr inbounds nuw i8, ptr %12, i64 16 store ptr %2, ptr %27, align 8, !tbaa !128 - %switch.tableidx = add i32 %3, -1 - %28 = icmp ult i32 %switch.tableidx, 4 - %.0.i = select i1 %28, i32 %3, i32 0 + %28 = icmp ult i32 %3, 5 + %..i = select i1 %28, i32 %3, i32 0 %29 = getelementptr inbounds nuw i8, ptr %12, i64 24 - store i32 %.0.i, ptr %29, align 8, !tbaa !129 + store i32 %..i, ptr %29, align 8, !tbaa !129 invoke void @gpr_once_init(ptr noundef nonnull @_ZL18cipher_suites_once, ptr noundef nonnull @_ZL18init_cipher_suitesv) to label %30 unwind label %74 diff --git a/bench/grpc/optimized/xds_cluster_impl.ll b/bench/grpc/optimized/xds_cluster_impl.ll index 52478fe534f..3d78f0e76d9 100644 --- a/bench/grpc/optimized/xds_cluster_impl.ll +++ b/bench/grpc/optimized/xds_cluster_impl.ll @@ -6858,15 +6858,8 @@ declare noundef ptr @_ZNK9grpc_core14XdsMetadataMap4FindESt17basic_string_viewIc define linkonce_odr noundef i32 @_ZNK9grpc_core12experimental4Json4typeEv(ptr noundef nonnull align 8 dereferenceable(56) %0) local_unnamed_addr #6 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 48 %3 = load i8, ptr %2, align 8, !tbaa !27 - switch i8 %3, label %12 [ - i8 -1, label %4 - i8 0, label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - i8 1, label %7 - i8 2, label %8 - i8 3, label %9 - i8 4, label %10 - i8 5, label %11 - ] + %.not.i.i = icmp eq i8 %3, -1 + br i1 %.not.i.i, label %4, label %7 4: ; preds = %1 %5 = tail call ptr @__cxa_allocate_exception(i64 16) #37 @@ -6877,26 +6870,8 @@ define linkonce_odr noundef i32 @_ZNK9grpc_core12experimental4Json4typeEv(ptr no unreachable 7: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -8: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -9: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -10: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -11: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -12: ; preds = %1 - unreachable - -_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit: ; preds = %1, %7, %8, %9, %10, %11 - %.0.i.i = phi i32 [ 1, %7 ], [ 2, %8 ], [ 3, %9 ], [ 4, %10 ], [ 5, %11 ], [ 0, %1 ] - ret i32 %.0.i.i + %switch.idx.cast.i.i = sext i8 %3 to i32 + ret i32 %switch.idx.cast.i.i } ; Function Attrs: mustprogress uwtable diff --git a/bench/hermes/optimized/MemoryBuffer.ll b/bench/hermes/optimized/MemoryBuffer.ll index c3b560f46a7..213048d2440 100644 --- a/bench/hermes/optimized/MemoryBuffer.ll +++ b/bench/hermes/optimized/MemoryBuffer.ll @@ -413,7 +413,15 @@ entry: if.end.i: ; preds = %entry %LHSKind.i.i = getelementptr inbounds nuw i8, ptr %this, i64 16 %1 = load i8, ptr %LHSKind.i.i, align 8 - switch i8 %1, label %if.end [ + %2 = icmp ult i8 %1, 7 + %switch.cast.i = trunc nuw nsw i8 %1 to i7 + %switch.downshift.i = lshr i7 -6, %switch.cast.i + %switch.masked.i = trunc i7 %switch.downshift.i to i1 + %or.cond = select i1 %2, i1 %switch.masked.i, i1 false + br i1 %or.cond, label %if.then, label %if.end + +if.then: ; preds = %if.end.i + switch i8 %1, label %sw.default.i [ i8 1, label %return i8 3, label %sw.bb2.i i8 4, label %sw.bb3.i @@ -421,29 +429,32 @@ if.end.i: ; preds = %entry i8 6, label %sw.bb7.i ] -sw.bb2.i: ; preds = %if.end.i - %2 = load ptr, ptr %this, align 8 - %tobool.i.not.i = icmp eq ptr %2, null +sw.bb2.i: ; preds = %if.then + unreachable + +sw.bb2.i: ; preds = %if.then + %3 = load ptr, ptr %this, align 8 + %tobool.i.not.i = icmp eq ptr %3, null br i1 %tobool.i.not.i, label %return, label %cond.true.i.i cond.true.i.i: ; preds = %sw.bb2.i - %call.i.i = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #23 + %call.i.i = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #23 br label %return -sw.bb3.i: ; preds = %if.end.i +sw.bb3.i: ; preds = %if.then %3 = load ptr, ptr %this, align 8 %call.i18.i = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #22 %call2.i.i = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #22 br label %return -sw.bb5.i: ; preds = %if.end.i +sw.bb5.i: ; preds = %if.then %4 = load ptr, ptr %this, align 8 %retval.sroa.0.0.copyload.i = load ptr, ptr %4, align 8 %retval.sroa.7.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %4, i64 8 %retval.sroa.7.0.copyload.i = load i64, ptr %retval.sroa.7.0..sroa_idx.i, align 8 br label %return -sw.bb7.i: ; preds = %if.end.i +sw.bb7.i: ; preds = %if.then %5 = load ptr, ptr %this, align 8 %6 = load ptr, ptr %5, align 8 %Size.i.i = getelementptr inbounds nuw i8, ptr %5, i64 8 @@ -459,9 +470,9 @@ if.end: ; preds = %if.end.i, %entry %conv.i = zext i32 %9 to i64 br label %return -return: ; preds = %if.end.i, %sw.bb7.i, %sw.bb5.i, %sw.bb3.i, %cond.true.i.i, %sw.bb2.i, %if.end - %retval.sroa.0.0.i.pn = phi ptr [ %8, %if.end ], [ %call.i18.i, %sw.bb3.i ], [ %retval.sroa.0.0.copyload.i, %sw.bb5.i ], [ %6, %sw.bb7.i ], [ null, %sw.bb2.i ], [ %2, %cond.true.i.i ], [ null, %if.end.i ] - %retval.sroa.7.0.i.pn = phi i64 [ %conv.i, %if.end ], [ %call2.i.i, %sw.bb3.i ], [ %retval.sroa.7.0.copyload.i, %sw.bb5.i ], [ %conv.i.i, %sw.bb7.i ], [ 0, %sw.bb2.i ], [ %call.i.i, %cond.true.i.i ], [ 0, %if.end.i ] +return: ; preds = %sw.bb7.i, %sw.bb5.i, %sw.bb3.i, %cond.true.i.i, %sw.bb2.i, %if.then, %if.end + %retval.sroa.0.0.i.pn = phi ptr [ %8, %if.end ], [ %call.i18.i, %sw.bb3.i ], [ %retval.sroa.0.0.copyload.i, %sw.bb5.i ], [ %6, %sw.bb7.i ], [ null, %if.then ], [ null, %sw.bb2.i ], [ %3, %cond.true.i.i ] + %retval.sroa.7.0.i.pn = phi i64 [ %conv.i, %if.end ], [ %call2.i.i, %sw.bb3.i ], [ %retval.sroa.7.0.copyload.i, %sw.bb5.i ], [ %conv.i.i, %sw.bb7.i ], [ 0, %if.then ], [ 0, %sw.bb2.i ], [ %call.i.i, %cond.true.i.i ] %.fca.0.insert.i.pn = insertvalue { ptr, i64 } poison, ptr %retval.sroa.0.0.i.pn, 0 %.fca.1.insert.merged = insertvalue { ptr, i64 } %.fca.0.insert.i.pn, i64 %retval.sroa.7.0.i.pn, 1 ret { ptr, i64 } %.fca.1.insert.merged diff --git a/bench/hermes/optimized/TargetParser.ll b/bench/hermes/optimized/TargetParser.ll index 4f71a3b0ba3..0993be3c338 100644 --- a/bench/hermes/optimized/TargetParser.ll +++ b/bench/hermes/optimized/TargetParser.ll @@ -8749,16 +8749,22 @@ lor.lhs.false: ; preds = %entry lor.lhs.false.i: ; preds = %lor.lhs.false %3 = icmp ult i32 %1, 29 - br i1 %3, label %switch.lookup, label %lor.end + br i1 %3, label %switch.lookup, label %lor.rhs switch.lookup: ; preds = %lor.lhs.false.i - %switch.cast = trunc nuw i32 %1 to i29 - %switch.downshift = lshr i29 -134184768, %switch.cast + %switch.cast = trunc nuw nsw i32 %1 to i29 + %switch.downshift = lshr i29 -134217600, %switch.cast %switch.masked = trunc i29 %switch.downshift to i1 + %cmp.i4 = icmp eq i32 %1, 6 + %or.cond = or i1 %cmp.i4, %switch.masked.i + br i1 %or.cond, label %lor.end, label %lor.rhs + +lor.rhs: ; preds = %_ZNK4llvh6Triple10isOSDarwinEv.exit, %lor.lhs.false.i + %cmp.i6 = icmp eq i32 %1, 15 br label %lor.end -lor.end: ; preds = %lor.lhs.false.i, %switch.lookup, %lor.lhs.false, %entry - %4 = phi i1 [ true, %entry ], [ true, %lor.lhs.false ], [ %switch.masked, %switch.lookup ], [ false, %lor.lhs.false.i ] +lor.end: ; preds = %lor.lhs.false, %lor.rhs, %switch.lookup, %entry + %4 = phi i1 [ true, %_ZNK4llvh6Triple10isOSDarwinEv.exit ], [ true, %entry ], [ %cmp.i6, %lor.rhs ], [ true, %lor.lhs.false ] ret i1 %4 } diff --git a/bench/hyperscan/optimized/tamarama.ll b/bench/hyperscan/optimized/tamarama.ll index 444b4d20795..7139ea71aa7 100644 --- a/bench/hyperscan/optimized/tamarama.ll +++ b/bench/hyperscan/optimized/tamarama.ll @@ -1471,14 +1471,15 @@ define internal fastcc void @copyQueueItems(ptr noundef readonly captures(none) %19 = phi i32 [ %17, %13 ], [ -1, %5 ] %20 = getelementptr inbounds nuw i8, ptr %1, i64 8 %21 = load i8, ptr %20, align 8 - %22 = and i8 %21, -2 + %.fr = freeze i8 %21 + %22 = and i8 %.fr, -2 switch i8 %22, label %23 [ i8 6, label %isMultiTopType.exit i8 8, label %isMultiTopType.exit ] 23: ; preds = %18 - %switch.tableidx = add i8 %21, -17 + %switch.tableidx = add i8 %.fr, -17 %24 = icmp ult i8 %switch.tableidx, 8 %switch.shifted = lshr i8 -3, %switch.tableidx %switch.lobit = trunc i8 %switch.shifted to i1 @@ -1486,7 +1487,7 @@ define internal fastcc void @copyQueueItems(ptr noundef readonly captures(none) br i1 %or.cond69, label %isMultiTopType.exit, label %25 25: ; preds = %23 - %26 = add i8 %21, -11 + %26 = add i8 %.fr, -11 %narrow = icmp ult i8 %26, 5 br label %isMultiTopType.exit diff --git a/bench/icu/optimized/fmtable.ll b/bench/icu/optimized/fmtable.ll index 6eb3a5db580..17cab199daf 100644 --- a/bench/icu/optimized/fmtable.ll +++ b/bench/icu/optimized/fmtable.ll @@ -2707,15 +2707,14 @@ define i32 @ufmt_getType_77(ptr noundef readonly captures(none) %0, ptr noundef ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define signext range(i8 0, 2) i8 @ufmt_isNumeric_77(ptr noundef readonly captures(none) %0) local_unnamed_addr #12 { -_ZNK6icu_7711Formattable9isNumericEv.exit: - %1 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %2 = load i32, ptr %1, align 8, !tbaa !16 - %3 = icmp ult i32 %2, 6 - %switch.cast = zext i32 %2 to i48 - %switch.shiftamt = shl nuw nsw i48 %switch.cast, 3 - %switch.downshift = lshr i48 1099511693568, %switch.shiftamt - %switch.masked = trunc i48 %switch.downshift to i8 - %.0.i = select i1 %3, i8 %switch.masked, i8 0 + %2 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %3 = load i32, ptr %2, align 8, !tbaa !16 + %4 = icmp ult i32 %3, 6 + %switch.cast.i = zext i32 %3 to i48 + %switch.shiftamt.i = shl nuw nsw i48 %switch.cast.i, 3 + %switch.downshift.i = lshr i48 1099511693568, %switch.shiftamt.i + %switch.masked.i = trunc i48 %switch.downshift.i to i8 + %.0.i = select i1 %4, i8 %switch.masked.i, i8 0 ret i8 %.0.i } diff --git a/bench/icu/optimized/number_formatimpl.ll b/bench/icu/optimized/number_formatimpl.ll index 476012d934e..a175b196f91 100644 --- a/bench/icu/optimized/number_formatimpl.ll +++ b/bench/icu/optimized/number_formatimpl.ll @@ -200,7 +200,6 @@ $_ZTSN6icu_777UMemoryE = comdat any @_ZTVN6icu_776number4impl17ParsedPatternInfoE = external unnamed_addr constant { [14 x ptr] }, align 8 @_ZTVN6icu_776number4impl24MixedUnitLongNameHandlerE = external unnamed_addr constant { [6 x ptr], [5 x ptr] }, align 8 @_ZTVN6icu_776number4impl15LongNameHandlerE = external unnamed_addr constant { [6 x ptr], [5 x ptr] }, align 8 -@switch.table._ZN6icu_776number4impl19NumberFormatterImpl22macrosToMicroGeneratorERKNS1_10MacroPropsEbR10UErrorCode = private unnamed_addr constant [6 x i32] [i32 2, i32 2, i32 1, i32 2, i32 1, i32 2], align 4 @_ZN6icu_7715MaybeStackArrayIcLi40EEC1Ev = weak_odr unnamed_addr alias void (ptr), ptr @_ZN6icu_7715MaybeStackArrayIcLi40EEC2Ev @_ZN6icu_7715MaybeStackArrayIcLi40EEC1Ei10UErrorCode = weak_odr unnamed_addr alias void (ptr, i32, i32), ptr @_ZN6icu_7715MaybeStackArrayIcLi40EEC2Ei10UErrorCode @@ -1973,24 +1972,17 @@ _ZN6icu_776number4impl5utils14unitIsBaseUnitERKNS_11MeasureUnitE.exit: ; preds = %87 = icmp ne i32 %86, 1 %88 = getelementptr inbounds nuw i8, ptr %1, i64 156 %89 = load i32, ptr %88, align 4, !tbaa !165 - %switch.tableidx = add i32 %89, -3 - %90 = icmp ult i32 %switch.tableidx, 6 - br i1 %90, label %switch.lookup, label %switch.edge - -switch.lookup: ; preds = %_ZN6icu_776number4impl5utils14unitIsBaseUnitERKNS_11MeasureUnitE.exit - %91 = zext nneg i32 %switch.tableidx to i64 - %switch.gep = getelementptr inbounds nuw i32, ptr @switch.table._ZN6icu_776number4impl19NumberFormatterImpl22macrosToMicroGeneratorERKNS1_10MacroPropsEbR10UErrorCode, i64 %91 - %switch.load = load i32, ptr %switch.gep, align 4 - br label %switch.edge - -switch.edge: ; preds = %_ZN6icu_776number4impl5utils14unitIsBaseUnitERKNS_11MeasureUnitE.exit, %switch.lookup - %. = phi i32 [ %switch.load, %switch.lookup ], [ 1, %_ZN6icu_776number4impl5utils14unitIsBaseUnitERKNS_11MeasureUnitE.exit ] + %90 = icmp ult i32 %89, 9 + %switch.cast = trunc i32 %89 to i9 + %switch.downshift = lshr i9 -168, %switch.cast + %switch.masked = trunc i9 %switch.downshift to i1 + %91 = select i1 %90, i1 %switch.masked, i1 false call void @llvm.lifetime.start.p0(ptr nonnull %6) store ptr @.str, ptr %7, align 8, !tbaa !166 invoke void @_ZN6icu_7712CurrencyUnitC1ENS_14ConstChar16PtrER10UErrorCode(ptr noundef nonnull align 8 dereferenceable(28) %6, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %3) to label %92 unwind label %99 -92: ; preds = %switch.edge +92: ; preds = %_ZN6icu_776number4impl5utils14unitIsBaseUnitERKNS_11MeasureUnitE.exit %93 = load ptr, ptr %7, align 8, !tbaa !166 call void asm sideeffect "", "rm,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr %93) #16, !srcloc !168 br i1 %72, label %94, label %107 @@ -2015,7 +2007,7 @@ switch.edge: ; preds = %_ZN6icu_776number4i store i32 %spec.store.select411, ptr %9, align 4 br label %.thread413 -99: ; preds = %switch.edge +99: ; preds = %_ZN6icu_776number4impl5utils14unitIsBaseUnitERKNS_11MeasureUnitE.exit %100 = landingpad { ptr, i32 } cleanup %101 = load ptr, ptr %7, align 8, !tbaa !166 @@ -2238,6 +2230,7 @@ _ZN6icu_7712LocalPointerINS_20DecimalFormatSymbolsEED2Ev.exit395: ; preds = %176 %192 = load i32, ptr %9, align 4 %193 = icmp ne i32 %192, 2 %or.cond12.not = select i1 %72, i1 %193, i1 false + %. = select i1 %91, i32 2, i32 1 %spec.select393 = select i1 %or.cond12.not, i32 %., i32 0 br label %194 diff --git a/bench/icu/optimized/rbbitblb.ll b/bench/icu/optimized/rbbitblb.ll index 3c1811174dd..fe547c68740 100644 --- a/bench/icu/optimized/rbbitblb.ll +++ b/bench/icu/optimized/rbbitblb.ll @@ -446,7 +446,7 @@ define void @_ZN6icu_7716RBBITableBuilder12calcNullableEPNS_8RBBINodeE(ptr nound %11 = load ptr, ptr %10, align 8, !tbaa !48 tail call void @_ZN6icu_7716RBBITableBuilder12calcNullableEPNS_8RBBINodeE(ptr noundef nonnull align 8 dereferenceable(52) %0, ptr noundef %11) %12 = load i32, ptr %1, align 8, !tbaa !52 - switch i32 %12, label %31 [ + switch i32 %12, label %33 [ i32 9, label %13 i32 8, label %22 i32 10, label %.sink.split @@ -465,6 +465,7 @@ define void @_ZN6icu_7716RBBITableBuilder12calcNullableEPNS_8RBBINodeE(ptr nound %19 = getelementptr inbounds nuw i8, ptr %18, i64 120 %20 = load i8, ptr %19, align 8, !tbaa !53 %21 = icmp ne i8 %20, 0 + %22 = zext i1 %21 to i8 br label %.sink.split 22: ; preds = %7 @@ -479,22 +480,23 @@ define void @_ZN6icu_7716RBBITableBuilder12calcNullableEPNS_8RBBINodeE(ptr nound %28 = getelementptr inbounds nuw i8, ptr %27, i64 120 %29 = load i8, ptr %28, align 8, !tbaa !53 %30 = icmp ne i8 %29, 0 + %32 = zext i1 %31 to i8 br label %.sink.split 31: ; preds = %7 br label %.sink.split switch.lookup: ; preds = %4 - %switch.cast = trunc nuw i32 %5 to i7 - %switch.downshift = lshr i7 48, %switch.cast - %switch.masked = trunc i7 %switch.downshift to i1 + %34 = shl nuw nsw i32 %5, 3 + %switch.shiftamt = zext nneg i32 %34 to i56 + %switch.downshift = lshr i56 1103806595072, %switch.shiftamt + %switch.masked = trunc i56 %switch.downshift to i8 br label %.sink.split -.sink.split: ; preds = %switch.lookup, %7, %7, %22, %26, %13, %17, %31 - %.sink.shrunk = phi i1 [ false, %31 ], [ true, %13 ], [ %21, %17 ], [ false, %22 ], [ %30, %26 ], [ true, %7 ], [ true, %7 ], [ %switch.masked, %switch.lookup ] - %.sink = zext i1 %.sink.shrunk to i8 - %32 = getelementptr inbounds nuw i8, ptr %1, i64 120 - store i8 %.sink, ptr %32, align 8, !tbaa !53 +.sink.split: ; preds = %7, %7, %22, %26, %13, %17, %switch.lookup, %31 + %.sink.shrunk = phi i8 [ 0, %33 ], [ %switch.masked, %switch.lookup ], [ 1, %13 ], [ %22, %17 ], [ 0, %23 ], [ %32, %27 ], [ 1, %7 ], [ 1, %7 ] + %35 = getelementptr inbounds nuw i8, ptr %1, i64 120 + store i8 %.sink, ptr %35, align 8, !tbaa !53 br label %33 33: ; preds = %.sink.split, %2 diff --git a/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll b/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll index f0a9845c663..0b69a38d8e6 100644 --- a/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll +++ b/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll @@ -1847,8 +1847,8 @@ define internal fastcc { ptr, i64 } @_ZN4core4iter6traits8iterator8Iterator8try_ br i1 %16, label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i", label %.lr.ph.i.i.i .lr.ph.i.i.i: ; preds = %15, %82 - %17 = phi i64 [ %59, %82 ], [ %12, %15 ] - %18 = phi ptr [ %.sink21.i.i.i.i, %82 ], [ %.lcssa.sink.i.i28, %15 ] + %17 = phi i64 [ %59, %83 ], [ %12, %15 ] + %18 = phi ptr [ %.sink21.i.i.i.i, %83 ], [ %.lcssa.sink.i.i28, %15 ] %19 = ptrtoint ptr %18 to i64 tail call void @llvm.experimental.noalias.scope.decl(metadata !236) tail call void @llvm.experimental.noalias.scope.decl(metadata !239) @@ -1912,46 +1912,44 @@ define internal fastcc { ptr, i64 } @_ZN4core4iter6traits8iterator8Iterator8try_ %58 = sub i64 %57, %19 %59 = add i64 %58, %17 store i64 %59, ptr %7, align 8, !alias.scope !248, !noalias !249 - switch i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, label %60 [ - i32 32, label %86 - i32 13, label %86 - i32 12, label %86 - i32 11, label %86 - i32 10, label %86 - i32 9, label %86 + %switch.tableidx.i.i.i.i.i.i.i = add nsw i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, -9 + %60 = icmp ult i32 %switch.tableidx.i.i.i.i.i.i.i, 24 + %switch.shifted.i.i.i.i.i.i.i = lshr i32 8388639, %switch.tableidx.i.i.i.i.i.i.i + %switch.lobit.i.i.i.i.i.i.i = trunc i32 %switch.shifted.i.i.i.i.i.i.i to i1 + %or.cond.i.i.i.i.i.i.i = select i1 %60, i1 %switch.lobit.i.i.i.i.i.i.i, i1 false + br i1 %or.cond.i.i.i.i.i.i.i, label %87, label %61 + +61: ; preds = %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i" + %62 = icmp samesign ugt i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 127 + br i1 %62, label %63, label %83 + +60: ; preds = %61 + %64 = lshr i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 8 + switch i32 %64, label %83 [ + i32 0, label %71 + i32 22, label %65 + i32 32, label %76 + i32 48, label %68 ] -60: ; preds = %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i" - %61 = icmp samesign ugt i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 127 - br i1 %61, label %62, label %82 - -62: ; preds = %60 - %63 = lshr i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 8 - switch i32 %63, label %82 [ - i32 0, label %70 - i32 22, label %64 - i32 32, label %75 - i32 48, label %67 - ] - -64: ; preds = %62 +64: ; preds = %63 %65 = icmp eq i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 5760 %66 = zext i1 %65 to i8 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i" -67: ; preds = %62 +67: ; preds = %63 %68 = icmp eq i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 12288 %69 = zext i1 %68 to i8 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i" -70: ; preds = %62 +70: ; preds = %63 %71 = and i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 255 %72 = zext nneg i32 %71 to i64 %73 = getelementptr inbounds nuw i8, ptr @_ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17heb4e91ca37dc8ab9E, i64 %72 %74 = load i8, ptr %73, align 1, !noalias !250, !noundef !15 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i" -75: ; preds = %62 +75: ; preds = %63 %76 = and i32 %.sroa.4.0.i.ph10.i17.i.i.i.i, 255 %77 = zext nneg i32 %76 to i64 %78 = getelementptr inbounds nuw i8, ptr @_ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17heb4e91ca37dc8ab9E, i64 %77 @@ -1960,17 +1958,17 @@ define internal fastcc { ptr, i64 } @_ZN4core4iter6traits8iterator8Iterator8try_ br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i" "_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i": ; preds = %75, %70, %67, %64 - %.0.i.i.i.i.i.i.i.i = phi i8 [ %74, %70 ], [ %66, %64 ], [ %80, %75 ], [ %69, %67 ] + %.0.i.i.i.i.i.i.i.i = phi i8 [ %74, %71 ], [ %66, %65 ], [ %80, %76 ], [ %69, %68 ] %81 = trunc i8 %.0.i.i.i.i.i.i.i.i to i1 br i1 %81, label %86, label %82 -82: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i", %62, %60 +82: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i", %63, %61 %83 = icmp eq ptr %.sink21.i.i.i.i, %6 br i1 %83, label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.sink.split.i.i", label %.lr.ph.i.i.i "_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.sink.split.i.i": ; preds = %82, %45 - %84 = phi i64 [ %17, %45 ], [ %59, %82 ] - %.lcssa.sink.i.i = phi ptr [ %47, %45 ], [ %.sink21.i.i.i.i, %82 ] + %84 = phi i64 [ %17, %45 ], [ %59, %83 ] + %.lcssa.sink.i.i = phi ptr [ %47, %45 ], [ %.sink21.i.i.i.i, %83 ] store ptr %.lcssa.sink.i.i, ptr %4, align 8, !alias.scope !251, !noalias !249 br label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" @@ -1982,17 +1980,17 @@ define internal fastcc { ptr, i64 } @_ZN4core4iter6traits8iterator8Iterator8try_ %or.cond.not.i.i.i = select i1 %10, i1 true, i1 %.not.i.i.i br i1 %or.cond.not.i.i.i, label %select.unfold, label %.loopexit -86: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i" +86: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17h4aa9b31a535fa5c6E.exit.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hfe4b4302862dc0f7E.exit.thread14.i.i.i.i" store ptr %.sink21.i.i.i.i, ptr %4, align 8, !alias.scope !251, !noalias !249 store i64 %59, ptr %0, align 8, !alias.scope !226 br label %select.unfold select.unfold: ; preds = %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i", %86 - %87 = phi i64 [ %59, %86 ], [ %85, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] - %.lcssa.sink.i.i26 = phi ptr [ %.sink21.i.i.i.i, %86 ], [ %.lcssa.sink.i.i27, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] - %.pre.i.i.i23 = phi i64 [ %59, %86 ], [ %.pre.i.i.i24, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] - %88 = phi i8 [ 0, %86 ], [ 1, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] - %.pn31 = phi i64 [ %17, %86 ], [ %.pre5.i.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %87 = phi i64 [ %59, %87 ], [ %85, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %.lcssa.sink.i.i26 = phi ptr [ %.sink21.i.i.i.i, %87 ], [ %.lcssa.sink.i.i27, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %.pre.i.i.i23 = phi i64 [ %59, %87 ], [ %.pre.i.i.i24, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %88 = phi i8 [ 0, %87 ], [ 1, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %.pn31 = phi i64 [ %17, %87 ], [ %.pre5.i.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] %.sroa.4.0.i.i = sub i64 %.pn31, %.pre.i.i.i24 %.not.i = icmp eq i64 %.sroa.4.0.i.i, 0 br i1 %.not.i, label %11, label %89 @@ -2002,8 +2000,8 @@ select.unfold: ; preds = %"_ZN4core3str4iter2 br label %.loopexit .loopexit: ; preds = %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i", %11, %89 - %.sroa.3.0 = phi i64 [ %.sroa.4.0.i.i, %89 ], [ undef, %11 ], [ undef, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] - %.sroa.0.0 = phi ptr [ %.sroa.0.0.i.i, %89 ], [ null, %11 ], [ null, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %.sroa.3.0 = phi i64 [ %.sroa.4.0.i.i, %90 ], [ undef, %11 ], [ undef, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] + %.sroa.0.0 = phi ptr [ %.sroa.0.0.i.i, %90 ], [ null, %11 ], [ null, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17hf75163567e8feabbE.exit.i.i" ] %90 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0, 0 %91 = insertvalue { ptr, i64 } %90, i64 %.sroa.3.0, 1 ret { ptr, i64 } %91 diff --git a/bench/just-rs/optimized/3022oi333lxf39jd.ll b/bench/just-rs/optimized/3022oi333lxf39jd.ll index ce6afd6c925..5f834b4b38d 100644 --- a/bench/just-rs/optimized/3022oi333lxf39jd.ll +++ b/bench/just-rs/optimized/3022oi333lxf39jd.ll @@ -199,8 +199,8 @@ define internal fastcc void @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F br i1 %17, label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i", label %.lr.ph.i.i.i.i.i .lr.ph.i.i.i.i.i: ; preds = %16, %83 - %18 = phi i64 [ %60, %83 ], [ %13, %16 ] - %19 = phi ptr [ %.sink21.i.i.i.i.i.i, %83 ], [ %.lcssa.sink.i.i20.i.i, %16 ] + %18 = phi i64 [ %60, %84 ], [ %13, %16 ] + %19 = phi ptr [ %.sink21.i.i.i.i.i.i, %84 ], [ %.lcssa.sink.i.i20.i.i, %16 ] %20 = ptrtoint ptr %19 to i64 tail call void @llvm.experimental.noalias.scope.decl(metadata !42) tail call void @llvm.experimental.noalias.scope.decl(metadata !45) @@ -264,46 +264,44 @@ define internal fastcc void @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F %59 = sub i64 %58, %20 %60 = add i64 %59, %18 store i64 %60, ptr %8, align 8, !alias.scope !54, !noalias !55 - switch i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, label %61 [ - i32 32, label %87 - i32 13, label %87 - i32 12, label %87 - i32 11, label %87 - i32 10, label %87 - i32 9, label %87 + %switch.tableidx.i.i.i.i.i.i.i.i.i = add nsw i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, -9 + %61 = icmp ult i32 %switch.tableidx.i.i.i.i.i.i.i.i.i, 24 + %switch.shifted.i.i.i.i.i.i.i.i.i = lshr i32 8388639, %switch.tableidx.i.i.i.i.i.i.i.i.i + %switch.lobit.i.i.i.i.i.i.i.i.i = trunc i32 %switch.shifted.i.i.i.i.i.i.i.i.i to i1 + %or.cond.i.i.i.i.i.i.i.i.i = select i1 %61, i1 %switch.lobit.i.i.i.i.i.i.i.i.i, i1 false + br i1 %or.cond.i.i.i.i.i.i.i.i.i, label %87, label %62 + +62: ; preds = %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i" + %63 = icmp samesign ugt i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 127 + br i1 %63, label %64, label %84 + +64: ; preds = %62 + %65 = lshr i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 8 + switch i32 %65, label %84 [ + i32 0, label %72 + i32 22, label %66 + i32 32, label %77 + i32 48, label %69 ] -61: ; preds = %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i" - %62 = icmp samesign ugt i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 127 - br i1 %62, label %63, label %83 - -63: ; preds = %61 - %64 = lshr i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 8 - switch i32 %64, label %83 [ - i32 0, label %71 - i32 22, label %65 - i32 32, label %76 - i32 48, label %68 - ] - -65: ; preds = %63 - %66 = icmp eq i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 5760 - %67 = zext i1 %66 to i8 +61: ; preds = %64 + %62 = icmp eq i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 5760 + %68 = zext i1 %62 to i8 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i" -68: ; preds = %63 +68: ; preds = %64 %69 = icmp eq i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 12288 %70 = zext i1 %69 to i8 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i" -71: ; preds = %63 +71: ; preds = %64 %72 = and i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 255 %73 = zext nneg i32 %72 to i64 %74 = getelementptr inbounds nuw i8, ptr @_ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h6b90392c31973ed5E, i64 %73 %75 = load i8, ptr %74, align 1, !noalias !56, !noundef !16 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i" -76: ; preds = %63 +76: ; preds = %64 %77 = and i32 %.sroa.4.0.i.ph10.i17.i.i.i.i.i.i, 255 %78 = zext nneg i32 %77 to i64 %79 = getelementptr inbounds nuw i8, ptr @_ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h6b90392c31973ed5E, i64 %78 @@ -311,18 +309,18 @@ define internal fastcc void @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F %81 = lshr i8 %80, 1 br label %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i" -"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i": ; preds = %76, %71, %68, %65 - %.0.i.i.i.i.i.i.i.i.i.i = phi i8 [ %75, %71 ], [ %67, %65 ], [ %81, %76 ], [ %70, %68 ] +"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i": ; preds = %76, %71, %68, %66 + %.0.i.i.i.i.i.i.i.i.i.i = phi i8 [ %75, %72 ], [ %68, %66 ], [ %81, %77 ], [ %70, %69 ] %82 = trunc i8 %.0.i.i.i.i.i.i.i.i.i.i to i1 br i1 %82, label %87, label %83 -83: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i", %63, %61 +83: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i", %64, %62 %84 = icmp eq ptr %.sink21.i.i.i.i.i.i, %7 br i1 %84, label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.sink.split.i.i.i.i", label %.lr.ph.i.i.i.i.i "_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.sink.split.i.i.i.i": ; preds = %83, %46 - %85 = phi i64 [ %18, %46 ], [ %60, %83 ] - %.lcssa.sink.i.i.i.i = phi ptr [ %48, %46 ], [ %.sink21.i.i.i.i.i.i, %83 ] + %85 = phi i64 [ %18, %46 ], [ %60, %84 ] + %.lcssa.sink.i.i.i.i = phi ptr [ %48, %46 ], [ %.sink21.i.i.i.i.i.i, %84 ] store ptr %.lcssa.sink.i.i.i.i, ptr %5, align 8, !alias.scope !57, !noalias !55 br label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" @@ -334,17 +332,17 @@ define internal fastcc void @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F %or.cond.not.i.i.i.i.i = select i1 %11, i1 true, i1 %.not.i.i.i.i.i br i1 %or.cond.not.i.i.i.i.i, label %select.unfold.i.i, label %90 -87: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i" +87: ; preds = %"_ZN53_$LT$F$u20$as$u20$core..str..pattern..MultiCharEq$GT$7matches17hbcaebf6f7c29a3d5E.exit.i.i.i.i.i.i", %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.exit.thread14.i.i.i.i.i.i" store ptr %.sink21.i.i.i.i.i.i, ptr %5, align 8, !alias.scope !57, !noalias !55 store i64 %60, ptr %1, align 8, !alias.scope !30 br label %select.unfold.i.i select.unfold.i.i: ; preds = %87, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" - %88 = phi i64 [ %60, %87 ], [ %86, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] - %.lcssa.sink.i.i18.i.i = phi ptr [ %.sink21.i.i.i.i.i.i, %87 ], [ %.lcssa.sink.i.i19.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] - %.pre.i.i.i15.i.i = phi i64 [ %60, %87 ], [ %.pre.i.i.i16.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] - %89 = phi i8 [ 0, %87 ], [ 1, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] - %.pn23.i.i = phi i64 [ %18, %87 ], [ %.pre5.i.i.i.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] + %88 = phi i64 [ %60, %88 ], [ %86, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] + %.lcssa.sink.i.i18.i.i = phi ptr [ %.sink21.i.i.i.i.i.i, %88 ], [ %.lcssa.sink.i.i19.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] + %.pre.i.i.i15.i.i = phi i64 [ %60, %88 ], [ %.pre.i.i.i16.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] + %89 = phi i8 [ 0, %88 ], [ 1, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] + %.pn23.i.i = phi i64 [ %18, %88 ], [ %.pre5.i.i.i.i.i, %"_ZN4core3str4iter22SplitInternal$LT$P$GT$7get_end17h89b9a382350f2188E.exit.i.i.i.i" ] %.not.i.i.i = icmp eq i64 %.pn23.i.i, %.pre.i.i.i16.i.i br i1 %.not.i.i.i, label %12, label %91 diff --git a/bench/lean4/optimized/Do.ll b/bench/lean4/optimized/Do.ll index 9433fd74273..e58c83e376d 100644 --- a/bench/lean4/optimized/Do.ll +++ b/bench/lean4/optimized/Do.ll @@ -17384,10 +17384,13 @@ define zeroext range(i8 0, 2) i8 @l_Lean_Elab_Term_Do_hasBreakContinueReturn___l lean_obj_tag.exit: ; preds = %4, %7 %.0.i = phi i32 [ %6, %4 ], [ %9, %7 ] - %.off = add i32 %.0.i, -5 - %switch = icmp ult i32 %.off, 3 - %. = zext i1 %switch to i8 - ret i8 %. + %10 = icmp ult i32 %.0.i, 8 + %switch.cast = zext i32 %.0.i to i64 + %switch.shiftamt = shl nuw nsw i64 %switch.cast, 3 + %switch.downshift = lshr i64 72340168526266368, %switch.shiftamt + %switch.masked = trunc i64 %switch.downshift to i8 + %.0 = select i1 %10, i8 %switch.masked, i8 0 + ret i8 %.0 } ; Function Attrs: nounwind uwtable @@ -17405,25 +17408,36 @@ define nonnull ptr @l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1___box br i1 %.not.i.i, label %6, label %l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1.exit.thread l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1.exit.thread: ; preds = %1 - %4 = lshr i64 %2, 1 - %5 = trunc i64 %4 to i32 + %4 = and i64 %2, 8589934576 + %5 = icmp eq i64 %4, 0 + %6 = shl i64 %2, 2 + %switch.shiftamt.i5 = and i64 %6, 34359738360 + %switch.downshift.i6 = lshr i64 72340168526266368, %switch.shiftamt.i5 + %switch.masked.i7 = trunc i64 %switch.downshift.i6 to i8 + %.0.i8 = select i1 %5, i8 %switch.masked.i7, i8 0 br label %lean_dec.exit 6: ; preds = %1 %7 = getelementptr i8, ptr %0, i64 4 %.val.i.i = load i32, ptr %7, align 4 - %8 = lshr i32 %.val.i.i, 24 - %9 = load i32, ptr %0, align 4, !tbaa !8 - %10 = icmp sgt i32 %9, 1 - br i1 %10, label %11, label %13, !prof !13 + %9 = icmp ult i32 %.val.i.i, 134217728 + %10 = lshr i32 %.val.i.i, 21 + %11 = and i32 %10, 2040 + %switch.shiftamt.i = zext nneg i32 %11 to i64 + %switch.downshift.i = lshr i64 72340168526266368, %switch.shiftamt.i + %switch.masked.i = trunc i64 %switch.downshift.i to i8 + %.0.i = select i1 %9, i8 %switch.masked.i, i8 0 + %12 = load i32, ptr %0, align 4, !tbaa !8 + %13 = icmp sgt i32 %12, 1 + br i1 %13, label %14, label %16, !prof !13 11: ; preds = %6 - %12 = add nsw i32 %9, -1 + %12 = add nsw i32 %12, -1 store i32 %12, ptr %0, align 4, !tbaa !8 br label %lean_dec.exit 13: ; preds = %6 - %.not.i = icmp eq i32 %9, 0 + %.not.i = icmp eq i32 %12, 0 br i1 %.not.i, label %lean_dec.exit, label %14 14: ; preds = %13 @@ -17431,11 +17445,12 @@ l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1.exit.thread: ; preds = %1 br label %lean_dec.exit lean_dec.exit: ; preds = %14, %13, %11, %l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1.exit.thread - %..i7.in.in.in = phi i32 [ %5, %l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1.exit.thread ], [ %8, %11 ], [ %8, %13 ], [ %8, %14 ] - %..i7.in.in = add i32 %..i7.in.in.in, -5 - %..i7.in = icmp ult i32 %..i7.in.in, 3 - %15 = select i1 %..i7.in, ptr inttoptr (i64 3 to ptr), ptr inttoptr (i64 1 to ptr) - ret ptr %15 + %..i7.in.in.in = phi i8 [ %.0.i8, %l_Lean_Elab_Term_Do_hasBreakContinueReturn___lambda__1.exit.thread ], [ %.0.i, %14 ], [ %.0.i, %16 ], [ %.0.i, %17 ] + %18 = zext nneg i8 %..i7.in.in.in to i64 + %19 = shl nuw nsw i64 %18, 1 + %20 = or disjoint i64 %19, 1 + %21 = inttoptr i64 %20 to ptr + ret ptr %21 } ; Function Attrs: nounwind uwtable diff --git a/bench/lean4/optimized/EMatchTheorem.ll b/bench/lean4/optimized/EMatchTheorem.ll index 66633eb2157..d7d1c455d33 100644 --- a/bench/lean4/optimized/EMatchTheorem.ll +++ b/bench/lean4/optimized/EMatchTheorem.ll @@ -8651,12 +8651,11 @@ lean_dec.exit: ; preds = %10, %9, %7, %1 lean_box_uint64.exit: ; preds = %lean_dec.exit %14 = lshr i64 %2, 1 %15 = trunc i64 %14 to i8 - %16 = icmp ult i8 %15, 9 - %switch.idx.cast = and i64 %14, 255 - %.0.i = select i1 %16, i64 %switch.idx.cast, i64 9 - %17 = getelementptr inbounds nuw i8, ptr %11, i64 4 + %narrow.i = tail call i8 @llvm.umin.i8(i8 %15, i8 9) + %.0.i = zext nneg i8 %narrow.i to i64 + %16 = getelementptr inbounds nuw i8, ptr %11, i64 4 store i32 1, ptr %11, align 4, !tbaa !4 - store i32 16, ptr %17, align 4 + store i32 16, ptr %16, align 4 %18 = getelementptr inbounds nuw i8, ptr %11, i64 8 store i64 %.0.i, ptr %18, align 8, !tbaa !12 ret ptr %11 @@ -243929,12 +243928,12 @@ lean_alloc_ctor.exit: ; preds = %0 declare i64 @l_Lean_Meta_TransparencyMode_toUInt64(i8 noundef zeroext) local_unnamed_addr #2 -; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #7 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #8 +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) +declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #8 + attributes #0 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -243942,8 +243941,8 @@ attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memor attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #9 = { nounwind } attributes #10 = { noreturn nounwind } diff --git a/bench/lean4/optimized/Weekday.ll b/bench/lean4/optimized/Weekday.ll index 8de11609f40..8cff40aa74d 100644 --- a/bench/lean4/optimized/Weekday.ll +++ b/bench/lean4/optimized/Weekday.ll @@ -2682,13 +2682,13 @@ lean_dec.exit: ; preds = %11, %10, %8, %1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define zeroext range(i8 0, 7) i8 @l_Std_Time_Weekday_next(i8 noundef zeroext %0) local_unnamed_addr #0 { %2 = icmp ult i8 %0, 6 - %switch.offset = add nsw i8 %0, 1 + %switch.offset = add nuw nsw i8 %0, 1 %.0 = select i1 %2, i8 %switch.offset, i8 0 ret i8 %.0 } ; Function Attrs: nounwind uwtable -define noundef nonnull ptr @l_Std_Time_Weekday_next___boxed(ptr noundef %0) local_unnamed_addr #1 { +define nonnull ptr @l_Std_Time_Weekday_next___boxed(ptr noundef %0) local_unnamed_addr #1 { %2 = ptrtoint ptr %0 to i64 %3 = and i64 %2, 1 %.not = icmp eq i64 %3, 0 @@ -2716,11 +2716,12 @@ lean_dec.exit: ; preds = %10, %9, %7, %1 %11 = lshr i64 %2, 1 %12 = trunc i64 %11 to i8 %13 = icmp ult i8 %12, 6 - %switch.idx.mult = and i64 %2, 510 - %switch.offset = add nuw nsw i64 %switch.idx.mult, 3 - %14 = inttoptr i64 %switch.offset to ptr - %15 = select i1 %13, ptr %14, ptr inttoptr (i64 1 to ptr) - ret ptr %15 + %14 = add i64 %2, 2 + %15 = and i64 %14, 510 + %16 = or disjoint i64 %15, 1 + %17 = inttoptr i64 %16 to ptr + %18 = select i1 %13, ptr %17, ptr inttoptr (i64 1 to ptr) + ret ptr %18 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable diff --git a/bench/libpng/optimized/pngrutil.ll b/bench/libpng/optimized/pngrutil.ll index cef6e47bb02..c6dbf17a61e 100644 --- a/bench/libpng/optimized/pngrutil.ll +++ b/bench/libpng/optimized/pngrutil.ll @@ -3074,26 +3074,37 @@ png_get_uint_31.exit41: ; preds = %png_get_uint_31.exi store i8 %52, ptr %63, align 8, !tbaa !140 %64 = getelementptr inbounds nuw i8, ptr %0, i64 627 %65 = icmp ult i8 %50, 7 - %switch.cast = zext i8 %50 to i56 - %switch.shiftamt = shl nuw nsw i56 %switch.cast, 3 + br i1 %65, label %switch.lookup, label %68 + +switch.lookup: ; preds = %png_get_uint_31.exit41 + %66 = shl nuw nsw i8 %50, 3 + %switch.shiftamt = zext nneg i8 %66 to i56 %switch.downshift = lshr i56 1127008025379073, %switch.shiftamt %switch.masked = trunc i56 %switch.downshift to i8 - %.sink = select i1 %65, i8 %switch.masked, i8 1 + %67 = shl nuw nsw i8 %50, 3 + %switch.shiftamt45 = zext nneg i8 %67 to i56 + %switch.downshift46 = lshr i56 1127008025379073, %switch.shiftamt45 + %switch.masked47 = trunc i56 %switch.downshift46 to i8 + br label %68 + +68: ; preds = %png_get_uint_31.exit41, %switch.lookup + %.sink = phi i8 [ %switch.masked, %switch.lookup ], [ 1, %png_get_uint_31.exit41 ] + %69 = phi i8 [ %switch.masked47, %switch.lookup ], [ 1, %png_get_uint_31.exit41 ] store i8 %.sink, ptr %64, align 1, !tbaa !141 - %66 = mul i8 %.sink, %48 + %66 = mul i8 %69, %48 %67 = getelementptr inbounds nuw i8, ptr %0, i64 626 store i8 %66, ptr %67, align 2, !tbaa !81 %68 = icmp ugt i8 %66, 7 %69 = zext nneg i32 %26 to i64 br i1 %68, label %70, label %74 -70: ; preds = %png_get_uint_31.exit41 +70: ; preds = %68 %71 = lshr i8 %66, 3 %72 = zext nneg i8 %71 to i64 %73 = mul nuw nsw i64 %72, %69 br label %79 -74: ; preds = %png_get_uint_31.exit41 +74: ; preds = %68 %75 = zext nneg i8 %66 to i64 %76 = mul nuw nsw i64 %75, %69 %77 = add nuw nsw i64 %76, 7 @@ -3101,7 +3112,7 @@ png_get_uint_31.exit41: ; preds = %png_get_uint_31.exi br label %79 79: ; preds = %74, %70 - %80 = phi i64 [ %73, %70 ], [ %78, %74 ] + %80 = phi i64 [ %73, %74 ], [ %78, %78 ] %81 = zext i8 %56 to i32 %82 = zext i8 %54 to i32 %83 = zext i8 %52 to i32 diff --git a/bench/libwebp/optimized/buffer_dec.ll b/bench/libwebp/optimized/buffer_dec.ll index 392fffbbcf0..c6cd8a1c1ce 100644 --- a/bench/libwebp/optimized/buffer_dec.ll +++ b/bench/libwebp/optimized/buffer_dec.ll @@ -475,7 +475,7 @@ define hidden range(i32 0, 3) i32 @WebPCopyDecBufferPixels(ptr noundef readonly store i32 %7, ptr %8, align 8, !tbaa !10 %9 = tail call fastcc i32 @CheckDecBuffer(ptr noundef %1) %.not = icmp eq i32 %9, 0 - br i1 %.not, label %10, label %72 + br i1 %.not, label %10, label %74 10: ; preds = %2 %11 = load i32, ptr %0, align 8, !tbaa !3 @@ -497,7 +497,7 @@ define hidden range(i32 0, 3) i32 @WebPCopyDecBufferPixels(ptr noundef readonly %25 = zext i8 %24 to i32 %26 = mul nsw i32 %4, %25 tail call void @WebPCopyPlane(ptr noundef %15, i32 noundef %19, ptr noundef %16, i32 noundef %21, i32 noundef %26, i32 noundef %7) #10 - br label %72 + br label %74 27: ; preds = %10 %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 @@ -536,35 +536,33 @@ define hidden range(i32 0, 3) i32 @WebPCopyDecBufferPixels(ptr noundef readonly %59 = sdiv i32 %58, 2 tail call void @WebPCopyPlane(ptr noundef %47, i32 noundef %49, ptr noundef %51, i32 noundef %53, i32 noundef %56, i32 noundef %59) #10 %60 = load i32, ptr %0, align 8, !tbaa !3 - switch i32 %60, label %WebPIsAlphaMode.exit [ - i32 12, label %WebPIsAlphaMode.exit.thread - i32 5, label %WebPIsAlphaMode.exit.thread - i32 4, label %WebPIsAlphaMode.exit.thread - i32 3, label %WebPIsAlphaMode.exit.thread - i32 1, label %WebPIsAlphaMode.exit.thread - ] - -WebPIsAlphaMode.exit: ; preds = %27 - %61 = add i32 %60, -11 - %narrow.i.i = icmp ult i32 %61, -4 - br i1 %narrow.i.i, label %72, label %WebPIsAlphaMode.exit.thread - -WebPIsAlphaMode.exit.thread: ; preds = %27, %27, %27, %27, %27, %WebPIsAlphaMode.exit - %62 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %63 = load ptr, ptr %62, align 8, !tbaa !23 - %64 = getelementptr inbounds nuw i8, ptr %0, i64 60 - %65 = load i32, ptr %64, align 4, !tbaa !24 - %66 = getelementptr inbounds nuw i8, ptr %1, i64 40 - %67 = load ptr, ptr %66, align 8, !tbaa !23 - %68 = getelementptr inbounds nuw i8, ptr %1, i64 60 - %69 = load i32, ptr %68, align 4, !tbaa !24 - %70 = load i32, ptr %3, align 4, !tbaa !35 - %71 = load i32, ptr %6, align 8, !tbaa !10 - tail call void @WebPCopyPlane(ptr noundef %63, i32 noundef %65, ptr noundef %67, i32 noundef %69, i32 noundef %70, i32 noundef %71) #10 - br label %72 - -72: ; preds = %17, %WebPIsAlphaMode.exit.thread, %WebPIsAlphaMode.exit, %2 - %.0 = phi i32 [ 2, %2 ], [ 0, %WebPIsAlphaMode.exit ], [ 0, %WebPIsAlphaMode.exit.thread ], [ 0, %17 ] + %switch.tableidx.i = add i32 %60, -1 + %61 = icmp ult i32 %switch.tableidx.i, 12 + %switch.maskindex.i = trunc i32 %switch.tableidx.i to i16 + %switch.shifted.i = lshr i16 2077, %switch.maskindex.i + %switch.lobit.i = trunc i16 %switch.shifted.i to i1 + %or.cond.i = select i1 %61, i1 %switch.lobit.i, i1 false + %62 = add i32 %60, -7 + %narrow.i.i = icmp ult i32 %62, 4 + %narrow.i = or i1 %narrow.i.i, %or.cond.i + br i1 %narrow.i, label %63, label %74 + +63: ; preds = %27 + %64 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %65 = load ptr, ptr %64, align 8, !tbaa !23 + %62 = getelementptr inbounds nuw i8, ptr %0, i64 60 + %63 = load i32, ptr %62, align 4, !tbaa !24 + %64 = getelementptr inbounds nuw i8, ptr %1, i64 40 + %65 = load ptr, ptr %64, align 8, !tbaa !23 + %66 = getelementptr inbounds nuw i8, ptr %1, i64 60 + %67 = load i32, ptr %66, align 4, !tbaa !24 + %72 = load i32, ptr %3, align 4, !tbaa !35 + %69 = load i32, ptr %6, align 8, !tbaa !10 + tail call void @WebPCopyPlane(ptr noundef %65, i32 noundef %67, ptr noundef %69, i32 noundef %71, i32 noundef %72, i32 noundef %73) #10 + br label %74 + +74:; preds = %17, %63, %27, %2 + %.0 = phi i32 [ 2, %2 ], [ 0, %27 ], [ 0, %63 ], [ 0, %17 ] ret i32 %.0 } diff --git a/bench/lief/optimized/RelocationEntry.ll b/bench/lief/optimized/RelocationEntry.ll index 2b535e127e0..2f80bb59649 100644 --- a/bench/lief/optimized/RelocationEntry.ll +++ b/bench/lief/optimized/RelocationEntry.ll @@ -607,32 +607,40 @@ $_ZGVZN6spdlog7details2os9thread_idEvE3tid = comdat any define noundef range(i32 -1, 16393) i32 @_ZN4LIEF2PE15RelocationEntry14type_from_dataENS0_6Header13MACHINE_TYPESEt(i32 noundef %0, i16 noundef zeroext %1) local_unnamed_addr #0 align 2 { %3 = lshr i16 %1, 12 %4 = zext nneg i16 %3 to i32 - switch i16 %3, label %10 [ + switch i16 %3, label %13 [ i16 5, label %5 i16 7, label %7 i16 8, label %9 ] 5: ; preds = %2 - switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 [ + switch i32 %0, label %_ZN4LIEF2PE6Header7is_mipsENS1_13MACHINE_TYPESE.exit [ i32 614, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 870, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 1126, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 358, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 361, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - i32 448, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split - i32 450, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split - i32 452, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split - i32 20530, label %6 - i32 20580, label %6 - i32 20776, label %6 ] -6: ; preds = %5, %5, %5 +6: ; preds = %5 + %6 = add i32 %0, -453 + %7 = icmp ult i32 %6, -5 + %switch.idx.cast.i = trunc i32 %0 to i1 + %.0.i15.not = or i1 %7, %switch.idx.cast.i + br i1 %.0.i15.not, label %8, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit + +8: ; preds = %_ZN4LIEF2PE6Header7is_mipsENS1_13MACHINE_TYPESE.exit + switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit [ + i32 20530, label %9 + i32 20580, label %9 + i32 20776, label %9 + ] + +9: ; preds = %8, %8, %8 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit 7: ; preds = %2 - switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27 [ + switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split [ i32 450, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 20530, label %8 i32 20580, label %8 @@ -643,7 +651,7 @@ define noundef range(i32 -1, 16393) i32 @_ZN4LIEF2PE15RelocationEntry14type_from br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit 9: ; preds = %2 - switch i32 %0, label %10 [ + switch i32 %0, label %13 [ i32 20530, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 20580, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 20776, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit @@ -654,20 +662,14 @@ define noundef range(i32 -1, 16393) i32 @_ZN4LIEF2PE15RelocationEntry14type_from 10: ; preds = %9, %2 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split: ; preds = %5, %5, %5 - br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26: ; preds = %5 - br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - _ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27: ; preds = %7 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit _ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28: ; preds = %9, %9 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit: ; preds = %9, %9, %9, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28, %7, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27, %5, %5, %5, %5, %5, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split, %8, %6, %10 - %.0 = phi i32 [ %4, %10 ], [ 2055, %7 ], [ 1029, %6 ], [ 4103, %8 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 8200, %9 ], [ 8200, %9 ], [ 8200, %9 ], [ 517, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split ], [ -1, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 ], [ -1, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27 ], [ 16392, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28 ] +_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit: ; preds = %9, %9, %9, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28, %7, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27, %5, %5, %5, %5, %5, %8, %9, %8, %6, %10 + %.0 = phi i32 [ %4, %13 ], [ 517, %_ZN4LIEF2PE6Header7is_mipsENS1_13MACHINE_TYPESE.exit ], [ 2055, %10 ], [ 1029, %9 ], [ -1, %8 ], [ 4103, %11 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 8200, %12 ], [ 8200, %12 ], [ 8200, %12 ], [ -1, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split ], [ 16392, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split25 ] ret i32 %.0 } diff --git a/bench/lightgbm/optimized/c_api.ll b/bench/lightgbm/optimized/c_api.ll index 1bedfce8375..f17d58658be 100644 --- a/bench/lightgbm/optimized/c_api.ll +++ b/bench/lightgbm/optimized/c_api.ll @@ -45453,23 +45453,21 @@ define linkonce_odr void @_ZNK8LightGBM7Booster15CreatePredictorEiiiiRKNS_6Confi 26: ; preds = %19, %11, %7 %27 = icmp ult i32 %4, 4 - %switch.cast = trunc nuw i32 %4 to i4 - %switch.downshift = lshr i4 2, %switch.cast - %switch.masked = trunc i4 %switch.downshift to i1 - %switch.cast17 = trunc nuw i32 %4 to i4 - %switch.downshift19 = lshr exact i4 -8, %switch.cast17 - %switch.masked20 = trunc i4 %switch.downshift19 to i1 - %switch.cast21 = trunc nuw i32 %4 to i4 - %switch.downshift23 = lshr i4 4, %switch.cast21 - %switch.masked24 = trunc i4 %switch.downshift23 to i1 - %.015 = select i1 %27, i1 %switch.masked, i1 false - %.014 = select i1 %27, i1 %switch.masked20, i1 false - %.0 = select i1 %27, i1 %switch.masked24, i1 false - %28 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %29 = load ptr, ptr %28, align 8, !tbaa !811 - %30 = getelementptr inbounds nuw i8, ptr %6, i64 1148 - %31 = getelementptr inbounds nuw i8, ptr %6, i64 1152 - %32 = getelementptr inbounds nuw i8, ptr %6, i64 1160 + %switch.shiftamt = shl nuw nsw i32 %4, 3 + %switch.downshift = lshr i32 256, %switch.shiftamt + %switch.downshift17 = lshr exact i32 16777216, %switch.shiftamt + %switch.downshift20 = lshr i32 65536, %switch.shiftamt + %28 = trunc i32 %switch.downshift to i1 + %switch.masked20 = trunc i32 %switch.downshift20 to i1 + %switch.cast21 = trunc i32 %switch.downshift17 to i1 + %.015 = select i1 %27, i1 %28, i1 false + %.014 = select i1 %27, i1 %switch.cast21, i1 false + %.015 = select i1 %27, i1 %switch.masked20, i1 false + %31 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %32 = load ptr, ptr %31, align 8, !tbaa !811 + %28 = getelementptr inbounds nuw i8, ptr %6, i64 1148 + %34 = getelementptr inbounds nuw i8, ptr %6, i64 1152 + %30 = getelementptr inbounds nuw i8, ptr %6, i64 1160 tail call void @llvm.experimental.noalias.scope.decl(metadata !1149) store ptr null, ptr %0, align 8, !tbaa !1141, !alias.scope !1149 %33 = tail call noalias noundef nonnull dereferenceable(160) ptr @_Znwm(i64 noundef 160) #43, !noalias !1149 @@ -45479,11 +45477,11 @@ define linkonce_odr void @_ZNK8LightGBM7Booster15CreatePredictorEiiiiRKNS_6Confi store i32 1, ptr %35, align 4, !tbaa !1148, !noalias !1149 store ptr getelementptr inbounds nuw inrange(-16, 40) (i8, ptr @_ZTVSt23_Sp_counted_ptr_inplaceIN8LightGBM9PredictorESaIvELN9__gnu_cxx12_Lock_policyE2EE, i64 16), ptr %33, align 8, !tbaa !14, !noalias !1149 %36 = getelementptr inbounds nuw i8, ptr %33, i64 16 - %37 = load i8, ptr %30, align 4, !tbaa !936, !range !259, !noalias !1149, !noundef !260 + %37 = load i8, ptr %33, align 4, !tbaa !936, !range !259, !noalias !1149, !noundef !260 %38 = trunc nuw i8 %37 to i1 - %39 = load i32, ptr %31, align 8, !tbaa !52, !noalias !1149 - %40 = load double, ptr %32, align 8, !tbaa !305, !noalias !1149 - invoke void @_ZN8LightGBM9PredictorC2EPNS_8BoostingEiibbbbid(ptr noundef nonnull align 8 dereferenceable(144) %36, ptr noundef %29, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %.015, i1 noundef zeroext %.0, i1 noundef zeroext %.014, i1 noundef zeroext %38, i32 noundef %39, double noundef %40) + %39 = load i32, ptr %34, align 8, !tbaa !52, !noalias !1149 + %40 = load double, ptr %35, align 8, !tbaa !305, !noalias !1149 + invoke void @_ZN8LightGBM9PredictorC2EPNS_8BoostingEiibbbbid(ptr noundef nonnull align 8 dereferenceable(144) %36, ptr noundef %32, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %.015, i1 noundef zeroext %.0, i1 noundef zeroext %.014, i1 noundef zeroext %38, i32 noundef %39, double noundef %40) to label %_ZSt11make_sharedIN8LightGBM9PredictorEJPNS0_8BoostingERiS4_RbS5_S5_RKbRKiRKdEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESE_E4typeEEDpOT0_.exit unwind label %_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN8LightGBM9PredictorESaIvELN9__gnu_cxx12_Lock_policyE2EEEED2Ev.exit18.i.i.i.i, !noalias !1149 _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN8LightGBM9PredictorESaIvELN9__gnu_cxx12_Lock_policyE2EEEED2Ev.exit18.i.i.i.i: ; preds = %26 diff --git a/bench/linux/optimized/8250_pci.ll b/bench/linux/optimized/8250_pci.ll index 5b5754e12dd..3ca026ef639 100644 --- a/bench/linux/optimized/8250_pci.ll +++ b/bench/linux/optimized/8250_pci.ll @@ -3024,21 +3024,16 @@ define internal range(i32 0, 16) i32 @pci_moxa_init(ptr noundef readonly capture %8 = zext nneg i16 %7 to i32 %9 = lshr i16 %3, 8 %10 = and i16 %9, 15 - switch i16 %10, label %11 [ - i16 0, label %12 - i16 6, label %12 - i16 1, label %12 - ] - -11: ; preds = %1 - br label %12 - -12: ; preds = %11, %1, %1, %1 - %13 = phi i8 [ 1, %11 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ] + %11 = icmp samesign ult i16 %10, 7 + %12 = shl nuw nsw i16 %10, 3 + %switch.shiftamt = zext nneg i16 %12 to i56 + %switch.downshift = lshr i56 1103823437824, %switch.shiftamt + %switch.masked = trunc i56 %switch.downshift to i8 + %13 = select i1 %11, i8 %switch.masked, i8 1 %14 = icmp eq i16 %7, 0 br i1 %14, label %.loopexit, label %15 -15: ; preds = %12 +15: ; preds = %1 %16 = shl nuw nsw i8 %13, 4 br label %17 @@ -3063,7 +3058,7 @@ define internal range(i32 0, 16) i32 @pci_moxa_init(ptr noundef readonly capture %34 = icmp eq i32 %33, %8 br i1 %34, label %.loopexit, label %17, !llvm.loop !28 -.loopexit: ; preds = %17, %12 +.loopexit: ; preds = %17, %1 switch i16 %3, label %43 [ i16 4931, label %35 i16 4899, label %35 diff --git a/bench/linux/optimized/intel_dp.ll b/bench/linux/optimized/intel_dp.ll index 95ae34f1e8f..3aa2a85ebf2 100644 --- a/bench/linux/optimized/intel_dp.ll +++ b/bench/linux/optimized/intel_dp.ll @@ -2450,19 +2450,17 @@ define dso_local noundef zeroext i1 @intel_dp_needs_vsc_sdp(ptr noundef readonly 6: ; preds = %2 %7 = getelementptr inbounds nuw i8, ptr %1, i64 128 %8 = load i32, ptr %7, align 8 - switch i32 %8, label %9 [ - i32 5, label %10 - i32 6, label %10 - i32 10, label %10 - i32 9, label %10 - i32 8, label %10 - ] + %9 = icmp ult i32 %8, 11 + br i1 %9, label %9, label %10 9: ; preds = %6 + %switch.cast = trunc nuw nsw i32 %8 to i11 + %switch.downshift = lshr i11 -160, %switch.cast + %switch.masked = trunc i11 %switch.downshift to i1 br label %10 -10: ; preds = %9, %6, %6, %6, %6, %6, %2 - %11 = phi i1 [ false, %9 ], [ true, %2 ], [ true, %6 ], [ true, %6 ], [ true, %6 ], [ true, %6 ], [ true, %6 ] +10: ; preds = %6, %9, %2 + %11 = phi i1 [ true, %2 ], [ %switch.masked, %switch.lookup ], [ false, %6 ] ret i1 %11 } diff --git a/bench/linux/optimized/rw.ll b/bench/linux/optimized/rw.ll index 8e03270027b..3b6d1f5ccbe 100644 --- a/bench/linux/optimized/rw.ll +++ b/bench/linux/optimized/rw.ll @@ -1283,7 +1283,7 @@ define internal fastcc noundef range(i32 -529, 1) i32 @kiocb_done(ptr noundef %0 %30 = getelementptr inbounds nuw i8, ptr %0, i64 16 %31 = load ptr, ptr %30, align 8 %32 = icmp eq ptr %31, @io_complete_rw - br i1 %32, label %33, label %58 + br i1 %32, label %33, label %switch.lookup 33: ; preds = %29 %34 = getelementptr inbounds nuw i8, ptr %0, i64 80 @@ -1324,41 +1324,44 @@ define internal fastcc noundef range(i32 -529, 1) i32 @kiocb_done(ptr noundef %0 br label %86 56: ; preds = %17 - switch i64 %1, label %58 [ - i64 -529, label %68 - i64 -512, label %57 - i64 -513, label %57 - i64 -514, label %57 - i64 -516, label %57 - ] - -57: ; preds = %56, %56, %56, %56 - br label %58 - -58: ; preds = %56, %29, %57 - %59 = phi i64 [ -4, %57 ], [ %1, %29 ], [ %1, %56 ] - %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %61 = load ptr, ptr %60, align 8 - %62 = icmp eq ptr %61, @io_complete_rw_iopoll + %57 = icmp eq i64 %1, -529 + br i1 %57, label %68, label %58 + +58:; preds = %56 + %switch.tableidx = add nsw i64 %1, 516 + %59 = icmp ult i64 %switch.tableidx, 5 + %switch.maskindex = trunc i64 %switch.tableidx to i8 + %switch.shifted = lshr i8 29, %switch.maskindex + %switch.lobit = trunc i8 %switch.shifted to i1 + %or.cond = select i1 %59, i1 %switch.lobit, i1 false + %spec.select = select i1 %or.cond, i64 -4, i64 %1 + %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %0, i64 16 + %.pre = load ptr, ptr %.phi.trans.insert, align 8 + br label %switch.lookup + +switch.lookup:; preds = %29, %58 + %60 = phi ptr [ %.pre, %58 ], [ %31, %29 ] + %61 = phi i64 [ %spec.select, %58 ], [ %1, %29 ] + %62 = icmp eq ptr %60, @io_complete_rw_iopoll br i1 %62, label %63, label %64, !prof !8 -63: ; preds = %58 - tail call void @io_complete_rw_iopoll(ptr noundef %0, i64 noundef %59) +63: ; preds = %switch.lookup + tail call void @io_complete_rw_iopoll(ptr noundef %0, i64 noundef %61) br label %68 -64: ; preds = %58 - %65 = icmp eq ptr %61, @io_complete_rw +64: ; preds = %switch.lookup + %65 = icmp eq ptr %60, @io_complete_rw br i1 %65, label %66, label %67, !prof !8 66: ; preds = %64 - tail call void @io_complete_rw(ptr noundef %0, i64 noundef %59) + tail call void @io_complete_rw(ptr noundef %0, i64 noundef %61) br label %68 67: ; preds = %64 - tail call void %61(ptr noundef %0, i64 noundef %59) #12 + tail call void %60(ptr noundef %0, i64 noundef %61) #12 br label %68 -68: ; preds = %56, %67, %66, %63 +68: ; preds = %67, %66, %63, %56 %69 = load i32, ptr %4, align 4 %70 = and i32 %69, 131072 %71 = icmp eq i32 %70, 0 diff --git a/bench/linux/optimized/services.ll b/bench/linux/optimized/services.ll index e050cba7543..746a9eabebe 100644 --- a/bench/linux/optimized/services.ll +++ b/bench/linux/optimized/services.ll @@ -6460,7 +6460,7 @@ define dso_local noundef range(i32 0, 2) i32 @selinux_audit_rule_known(ptr nound %2 = getelementptr inbounds nuw i8, ptr %0, i64 276 %3 = load i32, ptr %2, align 4 %4 = icmp eq i32 %3, 0 - br i1 %4, label %.loopexit, label %5 + br i1 %4, label %switch.lookup, label %5 5: ; preds = %1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 288 @@ -6468,31 +6468,26 @@ define dso_local noundef range(i32 0, 2) i32 @selinux_audit_rule_known(ptr nound %8 = zext i32 %3 to i64 br label %9 -9: ; preds = %13, %5 - %10 = phi i64 [ 0, %5 ], [ %14, %13 ] +9: ; preds = %14, %5 + %10 = phi i64 [ 0, %5 ], [ %15, %14 ] %11 = getelementptr %struct.audit_field, ptr %7, i64 %10 %12 = load i32, ptr %11, align 8 - switch i32 %12, label %13 [ - i32 13, label %.loopexit - i32 14, label %.loopexit - i32 15, label %.loopexit - i32 16, label %.loopexit - i32 17, label %.loopexit - i32 19, label %.loopexit - i32 20, label %.loopexit - i32 21, label %.loopexit - i32 22, label %.loopexit - i32 23, label %.loopexit - ] - -13: ; preds = %9 - %14 = add nuw nsw i64 %10, 1 - %15 = icmp eq i64 %14, %8 - br i1 %15, label %.loopexit, label %9, !llvm.loop !91 - -.loopexit: ; preds = %13, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %1 - %16 = phi i32 [ 0, %1 ], [ 0, %13 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ] - ret i32 %16 + %switch.tableidx = add i32 %12, -13 + %13 = icmp ult i32 %switch.tableidx, 11 + %switch.maskindex = trunc i32 %switch.tableidx to i16 + %switch.shifted = lshr i16 2015, %switch.maskindex + %switch.lobit = trunc i16 %switch.shifted to i1 + %or.cond = select i1 %13, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup, label %14 + +14:; preds = %9 + %15 = add nuw nsw i64 %10, 1 + %16 = icmp eq i64 %15, %8 + br i1 %16, label %switch.lookup, label %9, !llvm.loop !91 + +13: ; preds = %9, %14, %1 + %17 = phi i32 [ 0, %1 ], [ 1, %9 ], [ 0, %14 ] + ret i32 %17 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid diff --git a/bench/llvm/optimized/ByteCodeEmitter.ll b/bench/llvm/optimized/ByteCodeEmitter.ll index 1e3eb7065a2..b02b3dbf549 100644 --- a/bench/llvm/optimized/ByteCodeEmitter.ll +++ b/bench/llvm/optimized/ByteCodeEmitter.ll @@ -2451,8 +2451,9 @@ define dso_local noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter11fallthro ; Function Attrs: mustprogress nounwind uwtable define dso_local noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter7emitAddENS0_8PrimTypeERKNS0_10SourceInfoE(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #0 align 2 { - %4 = tail call noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter6emitOpIJEEEbNS0_6OpcodeEDpRKT_RKNS0_10SourceInfoE(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) - ret i1 %4 +switch.lookup: + %3 = tail call noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter6emitOpIJEEEbNS0_6OpcodeEDpRKT_RKNS0_10SourceInfoE(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) + ret i1 %3 } ; Function Attrs: mustprogress nounwind uwtable diff --git a/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll b/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll index 6cd6ed5fdd3..9097c4014aa 100644 --- a/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll +++ b/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll @@ -848,98 +848,20 @@ define internal fastcc void @_ZN5bytes9bytes_mut8BytesMut6freeze17h0cf78d91d2710 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable define hidden noundef range(i8 0, 6) i8 @"_ZN86_$LT$enum_iterator..All$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h61000b7621f63b45E"(ptr noalias noundef align 1 captures(none) dereferenceable(1) %0) unnamed_addr #15 personality ptr @rust_eh_personality { %2 = load i8, ptr %0, align 1, !range !72, !noundef !9 - store i8 5, ptr %0, align 1 - switch i8 %2, label %default.unreachable [ - i8 5, label %7 - i8 0, label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - i8 1, label %3 - i8 2, label %4 - i8 3, label %5 - i8 4, label %6 - ] - -default.unreachable: ; preds = %1 - unreachable - -3: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -4: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -5: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -6: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit": ; preds = %1, %3, %4, %5, %6 - %.sroa.0.0.i = phi i8 [ 2, %3 ], [ 3, %4 ], [ 4, %5 ], [ 5, %6 ], [ 1, %1 ] - store i8 %.sroa.0.0.i, ptr %0, align 1 - br label %7 - -7: ; preds = %1, %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" + %3 = icmp eq i8 %2, 5 + %switch.offset.i = add nuw nsw i8 %2, 1 + %spec.select = select i1 %3, i8 5, i8 %switch.offset.i + store i8 %spec.select, ptr %0, align 1 ret i8 %2 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable define hidden noundef range(i8 0, 12) i8 @"_ZN86_$LT$enum_iterator..All$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hc27b8fb33e78a021E"(ptr noalias noundef align 1 captures(none) dereferenceable(1) %0) unnamed_addr #15 personality ptr @rust_eh_personality { %2 = load i8, ptr %0, align 1, !range !73, !noundef !9 - store i8 11, ptr %0, align 1 - switch i8 %2, label %default.unreachable [ - i8 11, label %13 - i8 0, label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - i8 1, label %3 - i8 2, label %4 - i8 3, label %5 - i8 4, label %6 - i8 5, label %7 - i8 6, label %8 - i8 7, label %9 - i8 8, label %10 - i8 9, label %11 - i8 10, label %12 - ] - -default.unreachable: ; preds = %1 - unreachable - -3: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -4: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -5: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -6: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -7: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -8: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -9: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -10: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -11: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -12: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit": ; preds = %1, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12 - %.sroa.0.0.i = phi i8 [ 2, %3 ], [ 3, %4 ], [ 4, %5 ], [ 5, %6 ], [ 6, %7 ], [ 7, %8 ], [ 8, %9 ], [ 9, %10 ], [ 10, %11 ], [ 11, %12 ], [ 1, %1 ] - store i8 %.sroa.0.0.i, ptr %0, align 1 - br label %13 - -13: ; preds = %1, %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" + %3 = icmp eq i8 %2, 11 + %switch.offset.i = add nuw nsw i8 %2, 1 + %spec.select = select i1 %3, i8 11, i8 %switch.offset.i + store i8 %spec.select, ptr %0, align 1 ret i8 %2 } diff --git a/bench/meilisearch-rs/optimized/54ajasddlqavlxt2.ll b/bench/meilisearch-rs/optimized/54ajasddlqavlxt2.ll index 4a64c266ce2..37486831aa5 100644 --- a/bench/meilisearch-rs/optimized/54ajasddlqavlxt2.ll +++ b/bench/meilisearch-rs/optimized/54ajasddlqavlxt2.ll @@ -3770,8 +3770,7 @@ define noundef range(i8 0, 35) i8 @"_ZN17meilisearch_types4keys1_85_$LT$impl$u20 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable -define noundef range(i8 0, 34) i8 @"_ZN17meilisearch_types4keys1_85_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..keys..Action$GT$4last17h9a346fa1ed4af163E"() unnamed_addr #9 { -_ZN17meilisearch_types4keys1_16previous_variant17h62db00f10dfdab93E.exit: +define noundef range(i8 0, 35) i8 @"_ZN17meilisearch_types4keys1_85_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..keys..Action$GT$4last17h9a346fa1ed4af163E"() unnamed_addr #9 { ret i8 33 } diff --git a/bench/mini-lsm-rs/optimized/55xmw4789m5zjpyd.ll b/bench/mini-lsm-rs/optimized/55xmw4789m5zjpyd.ll index e29ebbc48fa..39a04e7f8d7 100644 --- a/bench/mini-lsm-rs/optimized/55xmw4789m5zjpyd.ll +++ b/bench/mini-lsm-rs/optimized/55xmw4789m5zjpyd.ll @@ -1134,7 +1134,7 @@ define hidden noundef ptr @"_ZN3std2io8buffered9bufwriter18BufWriter$LT$W$GT$9fl 21: ; preds = %19 %22 = load i64, ptr %10, align 8, !noundef !35 %23 = icmp eq i64 %22, 0 - br i1 %23, label %39, label %40 + br i1 %23, label %36, label %40 24: ; preds = %19 %.val = load ptr, ptr %10, align 8, !nonnull !35, !noundef !35 @@ -1142,9 +1142,9 @@ define hidden noundef ptr @"_ZN3std2io8buffered9bufwriter18BufWriter$LT$W$GT$9fl %26 = and i64 %25, 3 switch i64 %26, label %default.unreachable [ i64 2, label %27 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit - i64 0, label %29 - i64 1, label %33 + i64 3, label %29 + i64 0, label %32 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ] default.unreachable: ; preds = %24 @@ -1153,25 +1153,23 @@ default.unreachable: ; preds = %24 27: ; preds = %24 %.mask.i = and i64 %25, -4294967296 %28 = icmp eq i64 %.mask.i, 17179869184 - br i1 %28, label %.thread, label %39 + br i1 %28, label %.thread, label %36 29: ; preds = %24 - %30 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %31 = load i8, ptr %30, align 8, !range !207, !noundef !35 - %32 = icmp eq i8 %31, 35 - br i1 %32, label %.thread, label %39 - -33: ; preds = %24 - %34 = getelementptr i8, ptr %.val, i64 -1 - %35 = icmp ne ptr %34, null - call void @llvm.assume(i1 %35) - %36 = getelementptr i8, ptr %.val, i64 15 - %37 = load i8, ptr %36, align 8, !range !207, !noundef !35 - %38 = icmp eq i8 %37, 35 - br i1 %38, label %.thread, label %39 - -39: ; preds = %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %27, %29, %33, %21 - %.1 = phi ptr [ @anon.9d536000f06a31dd499c34c066807703.17, %21 ], [ %.val, %33 ], [ %.val, %29 ], [ %.val, %27 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ] + %30 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %30) + %.mask.i = and i64 %25, -4294967296 + %31 = icmp eq i64 %.mask.i, 150323855360 + br i1 %31, label %.thread, label %36 + +32:; preds = %24 + %33 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %34 = load i8, ptr %33, align 8, !range !207, !noundef !35 + %35 = icmp eq i8 %34, 35 + br i1 %35, label %.thread, label %36 + +36:; preds = %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %27, %29, %32, %21 + %.1 = phi ptr [ @anon.9d536000f06a31dd499c34c066807703.17, %21 ], [ %.val, %32 ], [ %.val, %29 ], [ %.val, %27 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %3) br label %._crit_edge @@ -1182,18 +1180,22 @@ default.unreachable: ; preds = %24 br label %43 _ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit: ; preds = %24 - %.mask20.i = and i64 %25, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %39 - -._crit_edge: ; preds = %43, %1, %39 - %.0 = phi ptr [ %.1, %39 ], [ null, %1 ], [ null, %43 ] + %40 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %40, null + call void @llvm.assume(i1 %switch.i) + %42 = getelementptr i8, ptr %.val, i64 15 + %43 = load i8, ptr %42, align 8, !range !207, !noundef !35 + %44 = icmp eq i8 %43, 35 + br i1 %44, label %.thread, label %36 + +._crit_edge: ; preds = %45, %1, %36 + %.0 = phi ptr [ %.1, %36 ], [ null, %1 ], [ null, %45 ] call void @"_ZN111_$LT$std..io..buffered..bufwriter..BufWriter$LT$W$GT$..flush_buf..BufGuard$u20$as$u20$core..ops..drop..Drop$GT$4drop17h71361215f744deacE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %4) call void @llvm.lifetime.end.p0(ptr nonnull %4) ret ptr %.0 43: ; preds = %40, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" - %44 = phi i64 [ %.pre, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %42, %40 ] + %44 = phi i64 [ %.pre, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %42, %37 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) %45 = load ptr, ptr %4, align 8, !nonnull !35, !align !82, !noundef !35 %46 = getelementptr inbounds nuw i8, ptr %45, i64 16 @@ -1201,7 +1203,7 @@ _ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit: ; preds = %24 %.not = icmp ult i64 %44, %47 br i1 %.not, label %12, label %._crit_edge -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %27, %29, %33 +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %27, %29, %32 call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !208 invoke void @_ZN3std2io5error14repr_bitpacked11decode_repr17h77b86a63e6b4a41eE.llvm.8684371289217427975(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %2, ptr noundef nonnull %.val) to label %.noexc unwind label %14 diff --git a/bench/mitsuba3/optimized/compiler.ll b/bench/mitsuba3/optimized/compiler.ll index 86d4910b793..8897811849a 100644 --- a/bench/mitsuba3/optimized/compiler.ll +++ b/bench/mitsuba3/optimized/compiler.ll @@ -1129,15 +1129,20 @@ switch.lookup: ; preds = %52 %switch.shiftamt = zext nneg i8 %77 to i64 %switch.downshift = lshr i64 3458764514609081901, %switch.shiftamt %switch.masked = trunc i64 %switch.downshift to i8 + %78 = shl nuw nsw i8 %switch.tableidx, 3 + %switch.shiftamt9 = zext nneg i8 %78 to i64 + %switch.downshift10 = lshr i64 3458764514609081901, %switch.shiftamt9 + %switch.masked11 = trunc i64 %switch.downshift10 to i8 br label %.sink.split .sink.split: ; preds = %switch.lookup, %46, %34, %37, %40, %43, %66 %.sink = phi i8 [ %76, %66 ], [ %45, %43 ], [ %42, %40 ], [ %39, %37 ], [ %36, %34 ], [ 50, %46 ], [ %switch.masked, %switch.lookup ] + %.ph = phi i8 [ %76, %66 ], [ %45, %43 ], [ %42, %40 ], [ %39, %37 ], [ %36, %34 ], [ 50, %46 ], [ %switch.masked11, %switch.lookup ] store i8 %.sink, ptr %6, align 1, !tbaa !110 br label %78 78: ; preds = %.sink.split, %61, %14 - %79 = phi i8 [ %21, %14 ], [ %62, %61 ], [ %.sink, %.sink.split ] + %79 = phi i8 [ %21, %14 ], [ %62, %61 ], [ %.ph, %.sink.split ] %80 = getelementptr inbounds nuw i8, ptr %0, i64 72 %81 = load i8, ptr %80, align 8, !tbaa !111 %82 = call noundef i32 @_ZN6asmjit9_abi_1_109ArchUtils20typeIdToRegSignatureENS0_4ArchENS0_6TypeIdEPS3_PNS0_16OperandSignatureE(i8 noundef zeroext %81, i8 noundef zeroext %79, ptr noundef nonnull %6, ptr noundef nonnull %5) #15 @@ -1165,17 +1170,17 @@ switch.lookup: ; preds = %52 %96 = getelementptr inbounds nuw i8, ptr %1, i64 4 store i32 %94, ptr %96, align 4, !tbaa !112 %97 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i32 0, ptr %97, align 4, !tbaa !98 - %98 = getelementptr inbounds nuw i8, ptr %1, i64 12 store i32 0, ptr %98, align 4, !tbaa !98 - br label %99 + %99 = getelementptr inbounds nuw i8, ptr %1, i64 12 + store i32 0, ptr %99, align 4, !tbaa !98 + br label %100 99: ; preds = %91, %86 call void @llvm.lifetime.end.p0(ptr nonnull %7) br label %100 100: ; preds = %99, %84, %64 - %101 = phi i32 [ %65, %64 ], [ %85, %84 ], [ %89, %99 ] + %101 = phi i32 [ %65, %64 ], [ %85, %85 ], [ %89, %100 ] call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %5) ret i32 %101 diff --git a/bench/mold/optimized/lto-unix.cc.X86_64.ll b/bench/mold/optimized/lto-unix.cc.X86_64.ll index cc9f745eb53..f0e8eb0bd39 100644 --- a/bench/mold/optimized/lto-unix.cc.X86_64.ll +++ b/bench/mold/optimized/lto-unix.cc.X86_64.ll @@ -1273,11 +1273,13 @@ _ZN4moldL10to_elf_symINS_6X86_64EEENS_6ElfSymIT_EERNS_12PluginSymbolE.exit: ; pr %.sroa.461.2 = phi i8 [ %.sroa.461.1, %322 ], [ %326, %.sink.split.i ] %327 = getelementptr inbounds nuw i8, ptr %316, i64 20 %328 = load i32, ptr %327, align 4, !tbaa !199, !noalias !195 - %329 = icmp ult i32 %328, 4 - %switch.shiftamt146 = shl nuw nsw i32 %328, 3 - %switch.downshift147 = lshr i32 33620736, %switch.shiftamt146 - %switch.masked148 = trunc i32 %switch.downshift147 to i8 - %.sroa.7.1 = select i1 %329, i8 %switch.masked148, i8 0 + %switch.tableidx.i = add i32 %328, -1 + %329 = icmp ult i32 %switch.tableidx.i, 3 + %switch.cast.i = trunc nuw nsw i32 %switch.tableidx.i to i24 + %switch.shiftamt.i = shl nuw nsw i24 %switch.cast.i, 3 + %switch.downshift.i = lshr i24 131331, %switch.shiftamt.i + %switch.masked.i = trunc i24 %switch.downshift.i to i8 + %.sroa.7.1 = select i1 %329, i8 %switch.masked.i, i8 0 %330 = getelementptr inbounds nuw i8, ptr %316, i64 24 %331 = load i64, ptr %330, align 8, !tbaa !200, !noalias !195 %332 = add nuw nsw i64 %.04192, 1 diff --git a/bench/ncnn/optimized/imreadwrite.ll b/bench/ncnn/optimized/imreadwrite.ll index 77649757d04..fba94c3f024 100644 --- a/bench/ncnn/optimized/imreadwrite.ll +++ b/bench/ncnn/optimized/imreadwrite.ll @@ -7874,22 +7874,14 @@ _ZL17stbi__malloc_mad3iiii.exit: ; preds = %14, %_ZL21stbi__mul %23 = add nsw i32 %22, %2 %.11170198 = add i32 %3, -1 %24 = icmp sgt i32 %.11170198, -1 - switch i32 %23, label %.critedge [ - i32 10, label %.lr.ph258.split - i32 11, label %.lr.ph258.split - i32 12, label %.lr.ph258.split - i32 17, label %.lr.ph258.split - i32 19, label %.lr.ph258.split - i32 20, label %.lr.ph258.split - i32 28, label %.lr.ph258.split - i32 25, label %.lr.ph258.split - i32 26, label %.lr.ph258.split - i32 33, label %.lr.ph258.split - i32 34, label %.lr.ph258.split - i32 35, label %.lr.ph258.split - ] - -.lr.ph258.split: ; preds = %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258 + %switch.tableidx = add i32 %23, -10 + %25 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond = select i1 %25, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup.preheader, label %.critedge + +switch.lookup.preheader:; preds = %.lr.ph258 %wide.trip.count = zext nneg i32 %4 to i64 br label %25 @@ -7898,8 +7890,8 @@ _ZL17stbi__malloc_mad3iiii.exit.thread: ; preds = %_ZL21stbi__mul2size store ptr @.str.23, ptr @_ZL22stbi__g_failure_reason, align 8, !tbaa !5 br label %156 -25: ; preds = %.lr.ph258.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph258.split ], [ %indvars.iv.next, %.loopexit ] +25: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %26 = trunc nuw nsw i64 %indvars.iv to i32 %27 = mul i32 %3, %26 %28 = mul i32 %27, %1 @@ -8249,22 +8241,14 @@ define internal fastcc noundef ptr @_ZL22stbi__convert_format16Ptiijj(ptr nounde %16 = add nsw i32 %15, %2 %.11170197 = add i32 %3, -1 %17 = icmp sgt i32 %.11170197, -1 - switch i32 %16, label %.critedge [ - i32 10, label %.lr.ph257.split - i32 11, label %.lr.ph257.split - i32 12, label %.lr.ph257.split - i32 17, label %.lr.ph257.split - i32 19, label %.lr.ph257.split - i32 20, label %.lr.ph257.split - i32 28, label %.lr.ph257.split - i32 25, label %.lr.ph257.split - i32 26, label %.lr.ph257.split - i32 33, label %.lr.ph257.split - i32 34, label %.lr.ph257.split - i32 35, label %.lr.ph257.split - ] - -.lr.ph257.split: ; preds = %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257 + %switch.tableidx = add i32 %16, -10 + %18 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond = select i1 %18, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup.preheader, label %.critedge + +switch.lookup.preheader:; preds = %.lr.ph257 %wide.trip.count = zext nneg i32 %4 to i64 br label %19 @@ -8273,8 +8257,8 @@ define internal fastcc noundef ptr @_ZL22stbi__convert_format16Ptiijj(ptr nounde store ptr @.str.23, ptr @_ZL22stbi__g_failure_reason, align 8, !tbaa !5 br label %150 -19: ; preds = %.lr.ph257.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph257.split ], [ %indvars.iv.next, %.loopexit ] +19: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %20 = trunc nuw nsw i64 %indvars.iv to i32 %21 = mul i32 %3, %20 %22 = mul i32 %21, %1 @@ -8597,7 +8581,7 @@ define internal fastcc noundef ptr @_ZL22stbi__convert_format16Ptiijj(ptr nounde br label %150 150: ; preds = %.critedge, %5, %._crit_edge, %18 - %.0155 = phi ptr [ null, %18 ], [ %12, %._crit_edge ], [ %0, %5 ], [ null, %.critedge ] + %.0155 = phi ptr [ null, %19 ], [ %12, %._crit_edge ], [ %0, %5 ], [ null, %.critedge ] ret ptr %.0155 } diff --git a/bench/nix/optimized/tests.ll b/bench/nix/optimized/tests.ll index c8f22f0951d..d107996550d 100644 --- a/bench/nix/optimized/tests.ll +++ b/bench/nix/optimized/tests.ll @@ -37219,33 +37219,39 @@ _ZN5boost6detail9lc_iequalIcEEbPKT_S4_S4_j.exit53.thread.i.i: ; preds = %53, %45 %storemerge.i.i = select i1 %12, double 0xFFF0000000000000, double 0x7FF0000000000000 br label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread -_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread: ; preds = %_ZN5boost6detail9lc_iequalIcEEbPKT_S4_S4_j.exit53.thread.i.i, %37 +_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread: ; preds = %37, %_ZN5boost6detail9lc_iequalIcEEbPKT_S4_S4_j.exit53.thread.i.i %storemerge.sink.i.i = phi double [ %storemerge.i.i, %_ZN5boost6detail9lc_iequalIcEEbPKT_S4_S4_j.exit53.thread.i.i ], [ %storemerge45.i.i, %37 ] - call void @llvm.lifetime.end.p0(ptr nonnull %3) - br label %64 + store double %storemerge.sink.i.i, ptr %4, align 8 + br label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread .loopexit: ; preds = %50, %42, %1, %10, %28, %34, %32, %_ZN5boost6detail9lc_iequalIcEEbPKT_S4_S4_j.exit.i.i %54 = call noundef zeroext i1 @_ZN5boost6detail27lexical_ostream_limited_srcIcSt11char_traitsIcEE20shr_using_base_classIdEEbRT_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) br i1 %54, label %55, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 +_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3: ; preds = %.loopexit + call void @llvm.lifetime.end.p0(ptr nonnull %3) + br label %60 + 55: ; preds = %.loopexit %56 = load ptr, ptr %8, align 8 %57 = getelementptr inbounds i8, ptr %56, i64 -1 %58 = load i8, ptr %57, align 1 - switch i8 %58, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread5 [ - i8 101, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 - i8 69, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 - i8 45, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 - i8 43, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 - ] + %switch.tableidx.i.i.i.i = add i8 %58, -43 + %59 = icmp ult i8 %switch.tableidx.i.i.i.i, 59 + br i1 %59, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit, label %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread -_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread5: ; preds = %55 +_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread5: ; preds = %_ZN5boost6detail13parse_inf_nanIcdEEbPKT_S4_RT0_.exit, %55 call void @llvm.lifetime.end.p0(ptr nonnull %3) - %.pre = load double, ptr %4, align 8 - br label %64 + br label %66 -_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3: ; preds = %.loopexit, %55, %55, %55, %55 +_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3: ; preds = %55 + %switch.maskindex.i.i.i.i = zext nneg i8 %switch.tableidx.i.i.i.i to i64 + %switch.shifted.i.i.i.i = lshr i64 288230376218820613, %switch.maskindex.i.i.i.i + %switch.lobit.i.i.i.i = trunc i64 %switch.shifted.i.i.i.i to i1 call void @llvm.lifetime.end.p0(ptr nonnull %3) + br i1 %switch.lobit.i.i.i.i, label %60, label %66 + +60: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3, %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit call void @llvm.lifetime.start.p0(ptr nonnull %2) store ptr getelementptr inbounds nuw (i8, ptr @_ZTVN5boost16bad_lexical_castE, i64 16), ptr %2, align 8 %59 = getelementptr inbounds nuw i8, ptr %2, i64 8 @@ -37253,20 +37259,20 @@ _ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbR %60 = getelementptr inbounds nuw i8, ptr %2, i64 16 store ptr @_ZTId, ptr %60, align 8 invoke void @_ZN5boost15throw_exceptionINS_16bad_lexical_castEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(24) %2) #29 - to label %61 unwind label %62 + to label %63 unwind label %62 -61: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 +61: ; preds = %60 unreachable -62: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 +62: ; preds = %60 %63 = landingpad { ptr, i32 } cleanup call void @_ZNSt8bad_castD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #28 resume { ptr, i32 } %63 -64: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread5, %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread - %65 = phi double [ %.pre, %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread5 ], [ %storemerge.sink.i.i, %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread ] - ret double %65 +64: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread5, %_ZN5boost10conversion6detail19try_lexical_convertIdNS_14iterator_rangeIPKcEEEEbRKT0_RT_.exit.thread3 + %67 = load double, ptr %4, align 8 + ret double %67 } ; Function Attrs: mustprogress uwtable diff --git a/bench/nlohmann_json/optimized/unit-regression2.ll b/bench/nlohmann_json/optimized/unit-regression2.ll index 79e455ed292..c364c563b4a 100644 --- a/bench/nlohmann_json/optimized/unit-regression2.ll +++ b/bench/nlohmann_json/optimized/unit-regression2.ll @@ -36608,12 +36608,11 @@ _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exi ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define internal noundef zeroext i1 @"_ZNSt17_Function_handlerIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEZL19DOCTEST_ANON_FUNC_2vE3$_0E9_M_invokeERKSt9_Any_dataOiOS3_SH_"(ptr nonnull readnone align 8 captures(none) %0, ptr nonnull readonly align 4 captures(none) %1, ptr noundef nonnull readonly align 1 captures(none) dereferenceable(1) %2, ptr nonnull readonly align 8 captures(none) %3) #15 align 2 personality ptr @__gxx_personality_v0 { -"_ZSt10__invoke_rIbRZL19DOCTEST_ANON_FUNC_2vE3$_0JiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS3_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES8_IhSaIhEEvEEEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESL_E4typeEOSM_DpOSN_.exit": %.val4 = load i8, ptr %2, align 1, !tbaa !701 - %4 = icmp ult i8 %.val4, 6 + %4 = icmp ugt i8 %.val4, 5 %switch.idx.cast = trunc i8 %.val4 to i1 %switch.offset = xor i1 %switch.idx.cast, true - %.0.i.i.i = select i1 %4, i1 %switch.offset, i1 true + %.0.i.i.i = or i1 %4, %switch.offset ret i1 %.0.i.i.i } @@ -37993,7 +37992,7 @@ _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i32 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv(ptr noundef nonnull align 8 dereferenceable(160) %0) - switch i32 %2, label %.loopexit.sink.split [ + switch i32 %2, label %switch.lookup.sink.split [ i32 47, label %.preheader i32 42, label %.preheader2 ] @@ -38075,7 +38074,7 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_3 br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } @@ -95755,7 +95754,7 @@ _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmfSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(152) %0) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i32 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmfSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3getEv(ptr noundef nonnull align 8 dereferenceable(152) %0) - switch i32 %2, label %.loopexit.sink.split [ + switch i32 %2, label %switch.lookup.sink.split [ i32 47, label %.preheader i32 42, label %.preheader2 ] @@ -95837,7 +95836,7 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_3 br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } @@ -147198,7 +147197,7 @@ _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i32 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3getEv(ptr noundef nonnull align 8 dereferenceable(160) %0) - switch i32 %2, label %.loopexit.sink.split [ + switch i32 %2, label %switch.lookup.sink.split [ i32 47, label %.preheader i32 42, label %.preheader2 ] @@ -147280,7 +147279,7 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_3 br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } @@ -235347,7 +235346,7 @@ _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapES ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i32 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv(ptr noundef nonnull align 8 dereferenceable(160) %0) - switch i32 %2, label %.loopexit.sink.split [ + switch i32 %2, label %switch.lookup.sink.split [ i32 47, label %.preheader i32 42, label %.preheader2 ] @@ -235429,7 +235428,7 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_3 br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } @@ -252935,7 +252934,7 @@ _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i32 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv(ptr noundef nonnull align 8 dereferenceable(160) %0) - switch i32 %2, label %.loopexit.sink.split [ + switch i32 %2, label %switch.lookup.sink.split [ i32 47, label %.preheader i32 42, label %.preheader2 ] @@ -253017,7 +253016,7 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_3 br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } @@ -266942,7 +266941,7 @@ _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7 ; Function Attrs: mustprogress uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKSt4byteSt4spanISK_Lm16EEEEEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(168) %0) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %2 = tail call noundef i64 @_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKSt4byteSt4spanISK_Lm16EEEEEEE3getEv(ptr noundef nonnull align 8 dereferenceable(168) %0) - switch i64 %2, label %.loopexit.sink.split [ + switch i64 %2, label %switch.lookup.sink.split [ i64 47, label %.preheader i64 42, label %.preheader2 ] @@ -267024,7 +267023,7 @@ define linkonce_odr dso_local noundef zeroext i1 @_ZN8nlohmann16json_abi_v3_11_3 br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } diff --git a/bench/node/optimized/libnode.crypto_common.ll b/bench/node/optimized/libnode.crypto_common.ll index a4f53cf27a2..b6c6973898d 100644 --- a/bench/node/optimized/libnode.crypto_common.ll +++ b/bench/node/optimized/libnode.crypto_common.ll @@ -4799,14 +4799,11 @@ for.body.us.i: ; preds = %for.body.lr.ph.i, % %i.09.us.i = phi i64 [ %inc.us.i, %for.inc.us.i ], [ 0, %for.body.lr.ph.i ] %arrayidx.us.i = getelementptr inbounds i8, ptr %name, i64 %i.09.us.i %0 = load i8, ptr %arrayidx.us.i, align 1 - switch i8 %0, label %sw.default.us.i [ - i8 34, label %if.else - i8 92, label %if.else - i8 44, label %if.else - i8 39, label %if.else - ] + %switch.tableidx.i = add i8 %0, -34 + %1 = icmp ult i8 %switch.tableidx.i, 59 + br i1 %1, label %switch.hole_check.i, label %sw.default.us.i -sw.default.us.i: ; preds = %for.body.us.i +sw.default.us.i: ; preds = %switch.hole_check.i, %for.body.us.i %cmp2.us.i = icmp ult i8 %0, 32 %cmp4.us.i = icmp eq i8 %0, 127 %or.cond.us.i = or i1 %cmp2.us.i, %cmp4.us.i @@ -4821,23 +4818,32 @@ for.body.i: ; preds = %for.body.lr.ph.i, % %i.09.i = phi i64 [ %inc.i, %for.inc.i ], [ 0, %for.body.lr.ph.i ] %arrayidx.i = getelementptr inbounds i8, ptr %name, i64 %i.09.i %1 = load i8, ptr %arrayidx.i, align 1 - switch i8 %1, label %sw.default.i [ - i8 34, label %if.else - i8 92, label %if.else - i8 44, label %if.else - i8 39, label %if.else - ] + %switch.tableidx30.i = add i8 %1, -34 + %3 = icmp ult i8 %switch.tableidx30.i, 59 + br i1 %3, label %switch.hole_check32.i, label %sw.default.i sw.default.i: ; preds = %for.body.i %2 = add i8 %1, -127 %or.cond1.i = icmp ult i8 %2, -95 br i1 %or.cond1.i, label %if.else, label %for.inc.i -for.inc.i: ; preds = %sw.default.i +for.inc.i: ; preds = %switch.hole_check32.i, %sw.default.i %inc.i = add nuw i64 %i.09.i, 1 %exitcond.not.i = icmp eq i64 %inc.i, %length br i1 %exitcond.not.i, label %if.then, label %for.body.i, !llvm.loop !30 +switch.hole_check.i: ; preds = %for.body.us.i + %switch.maskindex.i = zext nneg i8 %switch.tableidx.i to i64 + %switch.shifted.i = lshr i64 288230376151712801, %switch.maskindex.i + %switch.lobit.i = trunc i64 %switch.shifted.i to i1 + br i1 %switch.lobit.i, label %if.else, label %sw.default.us.i + +switch.hole_check32.i: ; preds = %for.body.i + %switch.maskindex34.i = zext nneg i8 %switch.tableidx30.i to i64 + %switch.shifted35.i = lshr i64 288230376151712801, %switch.maskindex34.i + %switch.lobit36.i = trunc i64 %switch.shifted35.i to i1 + br i1 %switch.lobit36.i, label %if.else, label %for.inc.i + if.then: ; preds = %for.inc.i, %for.inc.us.i, %entry %cmp.not = icmp eq ptr %safe_prefix, null br i1 %cmp.not, label %if.end, label %if.then1 @@ -4853,7 +4859,7 @@ if.end: ; preds = %if.then1, %if.then %call5 = tail call i32 @BIO_write(ptr noundef %4, ptr noundef %name, i32 noundef %conv) #16 br label %if.end59 -if.else: ; preds = %sw.default.i, %for.body.i, %for.body.i, %for.body.i, %for.body.i, %sw.default.us.i, %for.body.us.i, %for.body.us.i, %for.body.us.i, %for.body.us.i +if.else: ; preds = %sw.default.i, %switch.hole_check32.i, %sw.default.us.i, %switch.hole_check.i %5 = load ptr, ptr %out, align 8 %call7 = tail call i32 @BIO_write(ptr noundef %5, ptr noundef nonnull @.str.96, i32 noundef 1) #16 %cmp8.not = icmp eq ptr %safe_prefix, null diff --git a/bench/nori/optimized/texture.ll b/bench/nori/optimized/texture.ll index eb80b83cfcd..d0496536b7d 100644 --- a/bench/nori/optimized/texture.ll +++ b/bench/nori/optimized/texture.ll @@ -189,9 +189,10 @@ switch.lookup: ; preds = %37 to label %47 unwind label %44 47: ; preds = %switch.lookup + %switch.idx.cast40 = trunc nuw i32 %switch.tableidx to i8 %48 = getelementptr inbounds nuw i8, ptr %0, i64 12 %49 = load i8, ptr %48, align 4 - %.not = icmp eq i8 %49, %switch.idx.cast + %.not = icmp eq i8 %49, %switch.idx.cast40 br i1 %.not, label %55, label %50 50: ; preds = %47 diff --git a/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll b/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll index ce28c18331d..00c90e2054d 100644 --- a/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll +++ b/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll @@ -406,23 +406,23 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17hdfcdfebc06c8bc90E(ptr no %8 = getelementptr inbounds nuw i8, ptr %4, i64 8 br label %9 -9: ; preds = %.lr.ph, %36 - %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %36 ] - %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %36 ] +9: ; preds = %.lr.ph, %38 + %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %38 ] + %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %38 ] call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @"_ZN64_$LT$std..sys..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h1d9443443f6a6057E"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %5, ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029, i64 noundef %.sroa.4.028) %10 = load i64, ptr %5, align 8, !range !50, !noundef !10 %trunc = trunc nuw i64 %10 to i1 br i1 %trunc, label %14, label %11 -.loopexit: ; preds = %36, %3, %31 - %.0 = phi ptr [ %.1, %31 ], [ null, %3 ], [ null, %36 ] +.loopexit: ; preds = %38, %3, %28 + %.0 = phi ptr [ %.1, %28 ], [ null, %3 ], [ null, %38 ] ret ptr %.0 11: ; preds = %9 %12 = load i64, ptr %7, align 8, !noundef !10 %13 = icmp eq i64 %12, 0 - br i1 %13, label %31, label %29 + br i1 %13, label %28, label %26 14: ; preds = %9 %.val = load ptr, ptr %7, align 8, !nonnull !10, !noundef !10 @@ -430,9 +430,9 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17hdfcdfebc06c8bc90E(ptr no %16 = and i64 %15, 3 switch i64 %16, label %default.unreachable [ i64 2, label %17 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit - i64 0, label %19 - i64 1, label %23 + i64 3, label %19 + i64 0, label %29 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit ] default.unreachable: ; preds = %14 @@ -441,54 +441,56 @@ default.unreachable: ; preds = %14 17: ; preds = %14 %.mask.i = and i64 %15, -4294967296 %18 = icmp eq i64 %.mask.i, 17179869184 - br i1 %18, label %.thread, label %31 + br i1 %18, label %.thread, label %28 19: ; preds = %14 - %20 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %21 = load i8, ptr %20, align 8, !range !69, !noundef !10 - %22 = icmp eq i8 %21, 35 - br i1 %22, label %.thread, label %31 - -23: ; preds = %14 - %24 = getelementptr i8, ptr %.val, i64 -1 - %25 = icmp ne ptr %24, null - call void @llvm.assume(i1 %25) - %26 = getelementptr i8, ptr %.val, i64 15 - %27 = load i8, ptr %26, align 8, !range !69, !noundef !10 - %28 = icmp eq i8 %27, 35 - br i1 %28, label %.thread, label %31 + %20 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %20) + %.mask.i = and i64 %15, -4294967296 + %21 = icmp eq i64 %.mask.i, 150323855360 + br i1 %21, label %.thread, label %28 -29: ; preds = %11 - %30 = icmp ugt i64 %12, %.sroa.4.028 - br i1 %30, label %32, label %33 +29: ; preds = %14 + %23 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %24 = load i8, ptr %23, align 8, !range !69, !noundef !10 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %.thread, label %28 + +31: ; preds = %11 + %27 = icmp ugt i64 %12, %.sroa.4.028 + br i1 %27, label %29, label %30 -31: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %23, %11 - %.1 = phi ptr [ @anon.a4722bc4bc9456d3a30ab6462b53aab9.3, %11 ], [ %.val, %23 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit ] +28: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %22, %11 + %.1 = phi ptr [ @anon.a4722bc4bc9456d3a30ab6462b53aab9.3, %11 ], [ %.val, %22 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.loopexit -32: ; preds = %29 +32: ; preds = %26 call void @_ZN4core5slice5index26slice_start_index_len_fail17hab06ee9584c35f57E(i64 noundef %12, i64 noundef %.sroa.4.028, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.a4722bc4bc9456d3a30ab6462b53aab9.5) #21 unreachable -33: ; preds = %29 +33: ; preds = %26 %34 = sub nuw i64 %.sroa.4.028, %12 %35 = getelementptr inbounds i8, ptr %.sroa.0.029, i64 %12 - br label %36 + br label %38 _ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit: ; preds = %14 - %.mask20.i = and i64 %15, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %31 - -36: ; preds = %33, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" - %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %35, %33 ] - %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %34, %33 ] + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !69, !noundef !10 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %28 + +38: ; preds = %30, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" + %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %32, %30 ] + %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %31, %30 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %37 = icmp eq i64 %.sroa.4.121, 0 br i1 %37, label %.loopexit, label %9 -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %23 +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %22 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !70 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h1654a50133053c65E.llvm.1797472119934586438(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.val), !noalias !70 %38 = load i8, ptr %4, align 8, !range !77, !alias.scope !78, !noalias !70, !noundef !10 @@ -501,7 +503,7 @@ _ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit: ; preds = %14 "_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit": ; preds = %.thread, %39 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !70 - br label %36 + br label %38 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll b/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll index 49242d30437..fd70d482266 100644 --- a/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll +++ b/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll @@ -349,54 +349,51 @@ define noundef range(i8 6, 14) i8 @"_ZN112_$LT$ockam_transport_core..error..Tran %5 = ptrtoint ptr %0 to i64 %6 = and i64 %5, 3 switch i64 %6, label %default.unreachable [ - i64 2, label %8 - i64 3, label %7 + i64 2, label %7 + i64 3, label %11 i64 0, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split - i64 1, label %12 + i64 1, label %18 ] default.unreachable: ; preds = %2 unreachable 7: ; preds = %2 - %.mask = and i64 %5, -4294967296 - %switch = icmp eq i64 %.mask, 8589934592 - br i1 %switch, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread - -8: ; preds = %2 - %9 = lshr i64 %5, 32 - %10 = trunc nuw i64 %9 to i32 - %11 = invoke noundef i8 @_ZN3std3sys4unix17decode_error_kind17h4e88361be1dfe9b9E(i32 noundef %10) - to label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit unwind label %15 - -12: ; preds = %2 - %13 = getelementptr i8, ptr %0, i64 -1 - %14 = icmp ne ptr %13, null + %8 = lshr i64 %5, 32 + %9 = trunc nuw i64 %8 to i32 + %10 = invoke noundef i8 @_ZN3std3sys4unix17decode_error_kind17h4e88361be1dfe9b9E(i32 noundef %9) + to label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit unwind label %23 + +11:; preds = %2 + %12 = lshr i64 %5, 32 + %13 = trunc nuw i64 %12 to i32 + %spec.select1.i.i.i = tail call i32 @llvm.umin.i32(i32 %13, i32 41) + %spec.select.i.i.i = trunc nuw nsw i32 %spec.select1.i.i.i to i8 + %14 = icmp ult ptr %0, inttoptr (i64 176093659136 to ptr) tail call void @llvm.assume(i1 %14) - br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split - -15: ; preds = %8 - %16 = landingpad { ptr, i32 } - cleanup - invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %4) #5 - to label %26 unwind label %24 + br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split: ; preds = %2, %12 - %.sink5 = phi i64 [ 15, %12 ], [ 16, %2 ] - %17 = getelementptr i8, ptr %0, i64 %.sink5 - %18 = load i8, ptr %17, align 8, !range !6, !noundef !5 +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split: ; preds = %2 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %17 = load i8, ptr %16, align 8, !range !6, !noundef !5 br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split, %8 - %.0.i = phi i8 [ %11, %8 ], [ %18, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split ] - %19 = icmp eq i8 %.0.i, 2 - br i1 %19, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %2 + %19 = getelementptr i8, ptr %0, i64 -1 + %19 = icmp ne ptr %19, null + tail call void @llvm.assume(i1 %19) + %21 = getelementptr i8, ptr %0, i64 15 + %22 = load i8, ptr %21, align 8, !range !6, !noundef !5 + br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3: ; preds = %7, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit - br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3: ; preds = %7 + %24 = landingpad { ptr, i32 } + cleanup + invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %4) #6 + to label %31 unwind label %29 -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread: ; preds = %7, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3 - %20 = phi i8 [ 6, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3 ], [ 13, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit ], [ 13, %7 ] +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread: ; preds = %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split, %11, %7 + %20 = phi i8 [ %spec.select.i.i.i, %11 ], [ %17, %15 ], [ %22, %18 ], [ %10, %7 ] call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !7 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hd2aa1fbdd123cc9eE.llvm.12192176430880052379(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %3, ptr noundef nonnull %0), !noalias !7 %21 = load i8, ptr %3, align 8, !range !14, !alias.scope !15, !noalias !7, !noundef !5 @@ -409,17 +406,19 @@ _ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread: ; preds = %7, %_ZN3 br label %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE.exit" "_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE.exit": ; preds = %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread, %22 + %28 = icmp eq i8 %.0.i, 2 + %. = select i1 %28, i8 6, i8 13 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !7 - ret i8 %20 + ret i8 %. -24: ; preds = %15 +24: ; preds = %23 %25 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #6 unreachable -26: ; preds = %15 - resume { ptr, i32 } %16 +26: ; preds = %23 + resume { ptr, i32 } %24 } ; Function Attrs: nonlazybind uwtable @@ -470,13 +469,17 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #3 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #4 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #5 + attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #5 = { noinline } -attributes #6 = { noinline noreturn nounwind } +attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #6 = { noinline } +attributes #7 = { noinline noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/openjdk/optimized/barrierSetNMethod.ll b/bench/openjdk/optimized/barrierSetNMethod.ll index a61f1780ea0..ae0fd619b60 100644 --- a/bench/openjdk/optimized/barrierSetNMethod.ll +++ b/bench/openjdk/optimized/barrierSetNMethod.ll @@ -145,7 +145,7 @@ define hidden noundef zeroext i1 @_ZN17BarrierSetNMethod22supports_entry_barrier %3 = getelementptr inbounds nuw i8, ptr %1, i64 72 %4 = load ptr, ptr %3, align 8 %5 = tail call noundef zeroext i1 @_ZNK6Method26is_method_handle_intrinsicEv(ptr noundef nonnull align 8 dereferenceable(88) %4) #8 - br i1 %5, label %switch.edge, label %6 + br i1 %5, label %17, label %6 6: ; preds = %2 %7 = load ptr, ptr %3, align 8 @@ -153,24 +153,29 @@ define hidden noundef zeroext i1 @_ZN17BarrierSetNMethod22supports_entry_barrier %9 = load i16, ptr %8, align 4 %10 = and i16 %9, -2 %switch = icmp eq i16 %10, 198 - br i1 %switch, label %switch.edge, label %_ZNK7nmethod16is_native_methodEv.exit + br i1 %switch, label %17, label %_ZNK7nmethod16is_native_methodEv.exit _ZNK7nmethod16is_native_methodEv.exit: ; preds = %6 %11 = getelementptr inbounds nuw i8, ptr %7, i64 40 %.sroa.0.0.copyload.i.i.i = load i32, ptr %11, align 8 %12 = and i32 %.sroa.0.0.copyload.i.i.i, 256 %.not = icmp eq i32 %12, 0 - br i1 %.not, label %13, label %switch.edge + br i1 %.not, label %13, label %17 13: ; preds = %_ZNK7nmethod16is_native_methodEv.exit %14 = getelementptr inbounds nuw i8, ptr %1, i64 209 %15 = load i8, ptr %14, align 1 - %.off9 = add i8 %15, -1 - %switch10 = icmp ult i8 %.off9, 3 - br label %switch.edge + %16 = icmp ult i8 %15, 4 + br i1 %16, label %switch.lookup, label %17 -switch.edge: ; preds = %13, %6, %_ZNK7nmethod16is_native_methodEv.exit, %2 - %.0 = phi i1 [ false, %2 ], [ true, %_ZNK7nmethod16is_native_methodEv.exit ], [ false, %6 ], [ %switch10, %13 ] +switch.edge: ; preds = %13 + %switch.cast = trunc nuw nsw i8 %15 to i4 + %switch.downshift = lshr i4 -2, %switch.cast + %switch.masked = trunc i4 %switch.downshift to i1 + br label %17 + +17: ; preds = %13, %switch.lookup, %6, %_ZNK7nmethod16is_native_methodEv.exit, %2 + %.0 = phi i1 [ false, %2 ], [ true, %_ZNK7nmethod16is_native_methodEv.exit ], [ false, %6 ], [ %switch.masked, %switch.lookup ], [ false, %13 ] ret i1 %.0 } diff --git a/bench/openjdk/optimized/constantPool.ll b/bench/openjdk/optimized/constantPool.ll index 82b5a35c679..0cfc58ec778 100644 --- a/bench/openjdk/optimized/constantPool.ll +++ b/bench/openjdk/optimized/constantPool.ll @@ -4408,7 +4408,7 @@ declare void @_ZN10Exceptions12_throw_causeEP10JavaThreadPKciP6Symbol6Handle(ptr declare noundef signext i8 @_ZNK11constantTag11error_valueEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 ; Function Attrs: mustprogress nounwind uwtable -define hidden range(i8 18, 17) i8 @_ZN12ConstantPool15constant_tag_atEi(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(68) %0, i32 noundef %1) local_unnamed_addr #0 align 2 { +define hidden i8 @_ZN12ConstantPool15constant_tag_atEi(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(68) %0, i32 noundef %1) local_unnamed_addr #0 align 2 { %3 = alloca %class.constantTag, align 1 %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load ptr, ptr %4, align 8 @@ -4418,7 +4418,7 @@ define hidden range(i8 18, 17) i8 @_ZN12ConstantPool15constant_tag_atEi(ptr noun %9 = load volatile i8, ptr %8, align 1 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #17, !srcloc !6 %10 = icmp eq i8 %9, 17 - br i1 %10, label %11, label %_ZN11constantTag8type2tagE9BasicType.exit + br i1 %10, label %11, label %38 11: ; preds = %2 call void @llvm.lifetime.start.p0(ptr nonnull %3) @@ -4471,17 +4471,15 @@ _ZN12ConstantPool26basic_type_for_constant_atEi.exit: ; preds = %16, %32 %36 = add i8 %spec.select.i, -6 %switch.tableidx = select i1 %35, i8 6, i8 %36 %37 = icmp ult i8 %switch.tableidx, 7 - br i1 %37, label %switch.lookup, label %_ZN11constantTag8type2tagE9BasicType.exit - -switch.lookup: ; preds = %_ZN12ConstantPool26basic_type_for_constant_atEi.exit - %38 = shl nuw nsw i8 %switch.tableidx, 3 - %switch.shiftamt = zext nneg i8 %38 to i56 - %switch.downshift = lshr i56 2257310256727556, %switch.shiftamt - %switch.masked = trunc i56 %switch.downshift to i8 - br label %_ZN11constantTag8type2tagE9BasicType.exit + %switch.cast.i = zext i8 %switch.tableidx to i56 + %switch.shiftamt.i = shl nuw nsw i56 %switch.cast.i, 3 + %switch.downshift.i = lshr i56 2257310256727556, %switch.shiftamt.i + %switch.masked.i = trunc i56 %switch.downshift.i to i8 + %.04.i = select i1 %37, i8 %switch.masked.i, i8 0 + br label %38 -_ZN11constantTag8type2tagE9BasicType.exit: ; preds = %_ZN12ConstantPool26basic_type_for_constant_atEi.exit, %switch.lookup, %2 - %.sroa.04.0 = phi i8 [ %9, %2 ], [ %switch.masked, %switch.lookup ], [ 0, %_ZN12ConstantPool26basic_type_for_constant_atEi.exit ] +38:; preds = %2, %_ZN12ConstantPool26basic_type_for_constant_atEi.exit + %.sroa.04.0 = phi i8 [ %.04.i, %_ZN12ConstantPool26basic_type_for_constant_atEi.exit ], [ %9, %2 ] ret i8 %.sroa.04.0 } diff --git a/bench/openjdk/optimized/nativeInst_x86.ll b/bench/openjdk/optimized/nativeInst_x86.ll index 91a10b81477..9731d5bf328 100644 --- a/bench/openjdk/optimized/nativeInst_x86.ll +++ b/bench/openjdk/optimized/nativeInst_x86.ll @@ -222,29 +222,27 @@ _ZN10NativeCall15set_destinationEPh.exit: ; preds = %9 define hidden void @_ZN17NativeMovConstReg6verifyEv(ptr noundef nonnull align 1 dereferenceable(1) %0) local_unnamed_addr #0 align 2 { %2 = load i8, ptr %0, align 1 %3 = icmp eq i8 %2, 72 - br i1 %3, label %switch.edge, label %4 + br i1 %3, label %.thread, label %4 4: ; preds = %1 %5 = icmp eq i8 %2, 73 %6 = icmp eq i8 %2, -43 - br i1 %6, label %7, label %switch.edge + br i1 %6, label %7, label %.thread 7: ; preds = %4 %8 = getelementptr inbounds nuw i8, ptr %0, i64 1 %9 = load i8, ptr %8, align 1 - switch i8 %9, label %10 [ - i8 8, label %switch.edge - i8 9, label %switch.edge - i8 24, label %switch.edge - ] - -10: ; preds = %7 - br label %switch.edge - -switch.edge: ; preds = %4, %1, %10, %7, %7, %7 - %.sink = phi i64 [ 2, %7 ], [ 2, %7 ], [ 2, %7 ], [ 2, %10 ], [ 1, %1 ], [ 1, %4 ] - %11 = phi i1 [ true, %7 ], [ true, %7 ], [ true, %7 ], [ false, %10 ], [ false, %1 ], [ false, %4 ] - %12 = phi i1 [ false, %7 ], [ false, %7 ], [ false, %7 ], [ false, %10 ], [ true, %1 ], [ %5, %4 ] + %10 = icmp ult i8 %9, 25 + %switch.cast = zext nneg i8 %9 to i25 + %switch.downshift = lshr i25 -16776448, %switch.cast + %switch.masked = trunc i25 %switch.downshift to i1 + %.ph = select i1 %10, i1 %switch.masked, i1 false + br label %.thread + +.thread:; preds = %4, %1, %7 + %.sink = phi i64 [ 2, %7 ], [ 1, %1 ], [ 1, %4 ] + %11 = phi i1 [ %.ph, %7 ], [ false, %1 ], [ false, %4 ] + %.sink = phi i1 [ false, %7 ], [ true, %1 ], [ %5, %4 ] %13 = getelementptr inbounds nuw i8, ptr %0, i64 %.sink %14 = load i8, ptr %13, align 1 %or.cond = and i1 %11, %12 @@ -253,14 +251,14 @@ switch.edge: ; preds = %4, %1, %10, %7, %7, %or.cond4 = or i1 %or.cond, %.not br i1 %or.cond4, label %18, label %16 -16: ; preds = %switch.edge +16: ; preds = %.thread tail call void @_ZN17NativeMovConstReg5printEv(ptr noundef nonnull align 1 dereferenceable(1) %0) %17 = load ptr, ptr @g_assert_poison, align 8 store i8 88, ptr %17, align 1 tail call void (i32, ptr, i32, ptr, ...) @_Z12report_fatal11VMErrorTypePKciS1_z(i32 noundef -536870912, ptr noundef nonnull @.str.4, i32 noundef 171, ptr noundef nonnull @.str.13) #8 unreachable -18: ; preds = %switch.edge +18: ; preds = %.thread ret void } diff --git a/bench/openssl/optimized/s_socket.ll b/bench/openssl/optimized/s_socket.ll index bb32076f195..506ec1ba4be 100644 --- a/bench/openssl/optimized/s_socket.ll +++ b/bench/openssl/optimized/s_socket.ll @@ -830,26 +830,23 @@ declare noundef i32 @unlink(ptr noundef readonly captures(none)) local_unnamed_a ; Function Attrs: nounwind uwtable define void @do_ssl_shutdown(ptr noundef %0) local_unnamed_addr #0 { - %2 = tail call i32 @SSL_shutdown(ptr noundef %0) #9 - %3 = icmp slt i32 %2, 0 - br i1 %3, label %.lr.ph, label %.critedge - -.lr.ph: ; preds = %1, %6 - %4 = phi i32 [ %7, %6 ], [ %2, %1 ] - %5 = tail call i32 @SSL_get_error(ptr noundef %0, i32 noundef %4) #9 - switch i32 %5, label %.critedge [ - i32 2, label %6 - i32 3, label %6 - i32 9, label %6 - i32 10, label %6 - ] - -6: ; preds = %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph - %7 = tail call i32 @SSL_shutdown(ptr noundef %0) #9 - %8 = icmp slt i32 %7, 0 - br i1 %8, label %.lr.ph, label %.critedge, !llvm.loop !27 - -.critedge: ; preds = %6, %.lr.ph, %1 + br label %2 + +2: ; preds = %5, %1 + %3 = tail call i32 @SSL_shutdown(ptr noundef %0) #9 + %4 = icmp slt i32 %3, 0 + br i1 %4, label %5, label %.critedge + +5: ; preds = %2 + %6 = tail call i32 @SSL_get_error(ptr noundef %0, i32 noundef %3) #9 + %7 = icmp ult i32 %6, 11 + %switch.cast = trunc nuw nsw i32 %6 to i11 + %switch.downshift = lshr i11 -500, %switch.cast + %switch.masked = trunc i11 %switch.downshift to i1 + %or.cond = select i1 %7, i1 %switch.masked, i1 false + br i1 %or.cond, label %2, label %.critedge, !llvm.loop !27 + +.critedge:; preds = %2, %5 ret void } diff --git a/bench/openusd/optimized/attribute.ll b/bench/openusd/optimized/attribute.ll index 0f1ea66071a..5f28d3646a1 100644 --- a/bench/openusd/optimized/attribute.ll +++ b/bench/openusd/optimized/attribute.ll @@ -5409,8 +5409,8 @@ _ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBa call void %24(ptr noundef nonnull align 8 dereferenceable(12) %17) #17 br label %common.resume -common.resume: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__9TfWeakPtrINS_8SdfLayerEED2Ev.exit.i, %_ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBaseE.exit.i.i.i5.i, %21, %74 - %common.resume.op = phi { ptr, i32 } [ %75, %74 ], [ %6, %21 ], [ %6, %_ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBaseE.exit.i.i.i5.i ], [ %6, %_ZN32pxrInternal_v0_24__pxrReserved__9TfWeakPtrINS_8SdfLayerEED2Ev.exit.i ] +common.resume: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__9TfWeakPtrINS_8SdfLayerEED2Ev.exit.i, %_ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBaseE.exit.i.i.i5.i, %21, %76 + %common.resume.op = phi { ptr, i32 } [ %77, %76 ], [ %6, %21 ], [ %6, %_ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBaseE.exit.i.i.i5.i ], [ %6, %_ZN32pxrInternal_v0_24__pxrReserved__9TfWeakPtrINS_8SdfLayerEED2Ev.exit.i ] resume { ptr, i32 } %common.resume.op _ZN32pxrInternal_v0_24__pxrReserved__14UsdResolveInfoC2Ev.exit: ; preds = %1 @@ -5430,12 +5430,12 @@ _ZN32pxrInternal_v0_24__pxrReserved__14UsdResolveInfoC2Ev.exit: ; preds = %1 32: ; preds = %28, %_ZN32pxrInternal_v0_24__pxrReserved__14UsdResolveInfoC2Ev.exit invoke void @_ZN32pxrInternal_v0_24__pxrReserved__31Usd_ThrowExpiredPrimAccessErrorEPKNS_12Usd_PrimDataE(ptr noundef %27) - to label %33 unwind label %74 + to label %33 unwind label %76 33: ; preds = %28, %32 %34 = load ptr, ptr %27, align 8 invoke void @_ZNK32pxrInternal_v0_24__pxrReserved__8UsdStage15_GetResolveInfoERKNS_12UsdAttributeEPNS_14UsdResolveInfoEPKNS_11UsdTimeCodeE(ptr noundef nonnull align 8 dereferenceable(1282) %34, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %2, ptr noundef null) - to label %35 unwind label %74 + to label %35 unwind label %76 35: ; preds = %33 %36 = getelementptr inbounds nuw i8, ptr %2, i64 72 @@ -5509,12 +5509,15 @@ _ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBa br label %_ZN32pxrInternal_v0_24__pxrReserved__14UsdResolveInfoD2Ev.exit _ZN32pxrInternal_v0_24__pxrReserved__14UsdResolveInfoD2Ev.exit: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__9TfWeakPtrINS_8SdfLayerEED2Ev.exit.i4, %_ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBaseE.exit.i.i.i2.i, %70 - %.off.i = add i32 %37, -2 - %switch.i = icmp ult i32 %.off.i, 3 - ret i1 %switch.i - -74: ; preds = %32, %33 - %75 = landingpad { ptr, i32 } + %74 = icmp ult i32 %37, 5 + %switch.cast.i = trunc i32 %37 to i5 + %switch.downshift.i = lshr i5 -4, %switch.cast.i + %switch.masked.i = trunc i5 %switch.downshift.i to i1 + %75 = select i1 %74, i1 %switch.masked.i, i1 false + ret i1 %75 + +76: ; preds = %32, %33 + %77 = landingpad { ptr, i32 } cleanup call void @_ZN32pxrInternal_v0_24__pxrReserved__14UsdResolveInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(77) %2) #17 br label %common.resume diff --git a/bench/openusd/optimized/testUsdImagingStageSceneIndexContents.ll b/bench/openusd/optimized/testUsdImagingStageSceneIndexContents.ll index 28066c49a2a..c4b2e3bc930 100644 --- a/bench/openusd/optimized/testUsdImagingStageSceneIndexContents.ll +++ b/bench/openusd/optimized/testUsdImagingStageSceneIndexContents.ll @@ -1021,23 +1021,17 @@ _ZN32pxrInternal_v0_24__pxrReserved__17Tf_RefPtr_Counter9RemoveRefEPKNS_9TfRefBa br i1 %or.cond.i.i, label %366, label %switch.early.test.i.i switch.early.test.i.i: ; preds = %364 - switch i8 %353, label %_ZL14_IsAddressCharc.exit.i [ - i8 102, label %366 - i8 101, label %366 - i8 100, label %366 - i8 99, label %366 - i8 98, label %366 - i8 97, label %366 - i8 70, label %366 - i8 69, label %366 - i8 68, label %366 - i8 67, label %366 - i8 66, label %366 - i8 65, label %366 - i8 120, label %366 - ] + %switch.tableidx.i.i = add i8 %353, -65 + %366 = icmp ult i8 %switch.tableidx.i.i, 56 + br i1 %366, label %_ZL14_IsAddressCharc.exit.i, label %_ZL14_IsAddressCharc.exit.i + +_ZL14_IsAddressCharc.exit.i:; preds = %switch.early.test.i.i + %switch.cast.i.i = zext nneg i8 %switch.tableidx.i.i to i56 + %switch.downshift.i.i = lshr i56 -36028526436024257, %switch.cast.i.i + %switch.masked.i.i = trunc i56 %switch.downshift.i.i to i1 + br i1 %switch.masked.i.i, label %366, label %_ZL14_IsAddressCharc.exit.i -366: ; preds = %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %364 +366: ; preds = %_ZL14_IsAddressCharc.exit.i, %364 %367 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %21, i8 noundef signext 88) to label %368 unwind label %356 @@ -1045,7 +1039,7 @@ switch.early.test.i.i: ; preds = %364 %369 = add i64 %.028.i, 1 br label %375 -_ZL14_IsAddressCharc.exit.i: ; preds = %switch.early.test.i.i +_ZL14_IsAddressCharc.exit.i: ; preds = %_ZL14_IsAddressCharc.exit.i, %switch.early.test.i.i %370 = sub i64 16, %.028.i %371 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEmc(ptr noundef nonnull align 8 dereferenceable(32) %21, i64 noundef %370, i8 noundef signext 88) to label %372 unwind label %356 diff --git a/bench/pbrt-v4/optimized/stbimage.ll b/bench/pbrt-v4/optimized/stbimage.ll index 085aef37718..434e9827ae0 100644 --- a/bench/pbrt-v4/optimized/stbimage.ll +++ b/bench/pbrt-v4/optimized/stbimage.ll @@ -13168,22 +13168,14 @@ _ZL17stbi__malloc_mad3iiii.exit: ; preds = %16, %_ZL21stbi__mul %25 = or disjoint i32 %24, %2 %.11167195 = add i32 %3, -1 %26 = icmp sgt i32 %.11167195, -1 - switch i32 %25, label %159 [ - i32 10, label %.lr.ph255.split - i32 11, label %.lr.ph255.split - i32 12, label %.lr.ph255.split - i32 17, label %.lr.ph255.split - i32 19, label %.lr.ph255.split - i32 20, label %.lr.ph255.split - i32 28, label %.lr.ph255.split - i32 25, label %.lr.ph255.split - i32 26, label %.lr.ph255.split - i32 33, label %.lr.ph255.split - i32 34, label %.lr.ph255.split - i32 35, label %.lr.ph255.split - ] - -.lr.ph255.split: ; preds = %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255, %.lr.ph255 + %switch.tableidx = add i32 %25, -10 + %27 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond256 = select i1 %27, i1 %switch.lobit, i1 false + br i1 %or.cond256, label %switch.lookup.preheader, label %159 + +switch.lookup.preheader:; preds = %.lr.ph255 %wide.trip.count = zext nneg i32 %4 to i64 br label %28 @@ -13193,8 +13185,8 @@ _ZL17stbi__malloc_mad3iiii.exit.thread: ; preds = %_ZL21stbi__mul2size store ptr @.str.8, ptr %27, align 8, !tbaa !4 br label %160 -28: ; preds = %.lr.ph255.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph255.split ], [ %indvars.iv.next, %.loopexit ] +28: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %29 = trunc nuw nsw i64 %indvars.iv to i32 %30 = mul i32 %3, %29 %31 = mul i32 %30, %1 @@ -25742,10 +25734,10 @@ declare i32 @llvm.fshl.i32(i32, i32, i32) #37 declare void @llvm.experimental.noalias.scope.decl(metadata) #38 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #37 +declare i32 @llvm.umax.i32(i32, i32) #37 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #37 +declare i32 @llvm.smax.i32(i32, i32) #37 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #37 diff --git a/bench/php/optimized/info.ll b/bench/php/optimized/info.ll index 390bb557ff1..e6f6c3af18d 100644 --- a/bench/php/optimized/info.ll +++ b/bench/php/optimized/info.ll @@ -2561,23 +2561,22 @@ zend_parse_arg_str_ex.exit: ; preds = %9 .critedge.thread: ; preds = %7, %.critedge %.15075 = phi ptr [ %18, %.critedge ], [ @.str.127, %7 ] %24 = load i8, ptr %.15075, align 1, !tbaa !24 - switch i8 %24, label %php_is_valid_uname_mode.exit [ - i8 115, label %27 - i8 114, label %27 - i8 110, label %27 - i8 109, label %27 - i8 97, label %27 - i8 118, label %27 - ] - -php_is_valid_uname_mode.exit: ; preds = %.critedge.thread + %switch.tableidx.i = add i8 %24, -97 + %25 = icmp ult i8 %switch.tableidx.i, 22 + %switch.cast.i = zext nneg i8 %switch.tableidx.i to i22 + %switch.downshift.i = lshr i22 -1691647, %switch.cast.i + %switch.masked.i = trunc i22 %switch.downshift.i to i1 + %26 = select i1 %25, i1 %switch.masked.i, i1 false + br i1 %26, label %30, label %27 + +27: ; preds = %.critedge.thread call void (i32, ptr, ...) @zend_argument_value_error(i32 noundef 1, ptr noundef nonnull @.str.129) #14 %25 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @executor_globals, i64 960), align 8, !tbaa !51 %26 = icmp ne ptr %25, null call void @llvm.assume(i1 %26) br label %34 -27: ; preds = %.critedge.thread, %.critedge.thread, %.critedge.thread, %.critedge.thread, %.critedge.thread, %.critedge.thread +27: ; preds = %.critedge.thread %28 = call ptr @php_get_uname(i8 noundef signext %24) store ptr %28, ptr %1, align 8, !tbaa !24 %29 = getelementptr inbounds nuw i8, ptr %28, i64 4 @@ -2589,7 +2588,7 @@ php_is_valid_uname_mode.exit: ; preds = %.critedge.thread store i32 %32, ptr %33, align 8, !tbaa !24 br label %34 -34: ; preds = %16, %php_is_valid_uname_mode.exit, %27, %21 +34: ; preds = %16, %27, %27, %21 ret void } diff --git a/bench/php/optimized/node.ll b/bench/php/optimized/node.ll index 59664f4286a..6420e484d0d 100644 --- a/bench/php/optimized/node.ll +++ b/bench/php/optimized/node.ll @@ -1724,27 +1724,24 @@ php_dom_follow_spec_doc_ref.exit.i: ; preds = %6 14: ; preds = %php_dom_follow_spec_doc_ref.exit.i %15 = getelementptr inbounds nuw i8, ptr %3, i64 8 %16 = load i32, ptr %15, align 8, !tbaa !26 - switch i32 %16, label %17 [ - i32 11, label %dom_skip_text_content.exit - i32 8, label %dom_skip_text_content.exit - i32 7, label %dom_skip_text_content.exit - i32 4, label %dom_skip_text_content.exit - i32 3, label %dom_skip_text_content.exit - i32 2, label %dom_skip_text_content.exit - i32 1, label %dom_skip_text_content.exit - ] - -17: ; preds = %14 + %17 = icmp ugt i32 %16, 11 + %switch.cast.i = trunc nuw nsw i32 %16 to i12 + %switch.downshift.i = lshr i12 1633, %switch.cast.i + %switch.masked.i = trunc i12 %switch.downshift.i to i1 + %or.cond = select i1 %17, i1 true, i1 %switch.masked.i + br i1 %or.cond, label %dom_skip_text_content.exit.thread9, label %dom_skip_text_content.exit + +dom_skip_text_content.exit.thread9:; preds = %14 %18 = getelementptr inbounds nuw i8, ptr %1, i64 8 store i32 1, ptr %18, align 8, !tbaa !9 br label %19 -dom_skip_text_content.exit: ; preds = %14, %14, %14, %14, %14, %14, %14, %php_dom_follow_spec_doc_ref.exit.i, %6 +dom_skip_text_content.exit: ; preds = %14, %php_dom_follow_spec_doc_ref.exit.i, %6 tail call void @php_dom_get_content_into_zval(ptr noundef nonnull %3, ptr noundef %1, i1 noundef zeroext false) #11 br label %19 -19: ; preds = %17, %dom_skip_text_content.exit, %5 - %.0 = phi i32 [ -1, %5 ], [ 0, %dom_skip_text_content.exit ], [ 0, %17 ] +19: ; preds = %dom_skip_text_content.exit.thread9, %dom_skip_text_content.exit, %5 + %.0 = phi i32 [ -1, %5 ], [ 0, %dom_skip_text_content.exit.thread ], [ 0, %dom_skip_text_content.exit.thread9 ] ret i32 %.0 } diff --git a/bench/php/optimized/zend_generators.ll b/bench/php/optimized/zend_generators.ll index e43b43e1ffb..0ade06e3ed0 100644 --- a/bench/php/optimized/zend_generators.ll +++ b/bench/php/optimized/zend_generators.ll @@ -1378,13 +1378,17 @@ switch.hole_check: ; preds = %69 %switch.lobit = trunc i32 %switch.shifted to i1 br i1 %switch.lobit, label %switch.lookup, label %75 -switch.lookup: ; preds = %switch.hole_check, %75 - %79 = phi i1 [ %78, %75 ], [ true, %switch.hole_check ] - tail call void @llvm.assume(i1 %79) - %80 = getelementptr inbounds nuw i8, ptr %71, i64 32 - store ptr %80, ptr %70, align 8, !tbaa !82 - %81 = load i8, ptr %30, align 8, !tbaa !99 - %82 = or i8 %81, 1 +switch.lookup: ; preds = %switch.hole_check + %.pre139 = load i8, ptr %30, align 8, !tbaa !99 + br label %switch.lookup + +switch.lookup:; preds = %switch.lookup, %75 + %79 = phi i8 [ %76, %75 ], [ %.pre139, %switch.hole_check.switch.lookup_crit_edge ] + %80 = phi i1 [ %78, %75 ], [ true, %switch.hole_check.switch.lookup_crit_edge ] + tail call void @llvm.assume(i1 %80) + %81 = getelementptr inbounds nuw i8, ptr %71, i64 32 + store ptr %81, ptr %70, align 8, !tbaa !82 + %82 = or i8 %79, 1 store i8 %82, ptr %30, align 8, !tbaa !99 %83 = load i32, ptr @zend_observer_fcall_op_array_extension, align 4, !tbaa !108 %.not71 = icmp eq i32 %83, -1 @@ -1437,7 +1441,7 @@ zend_observer_fcall_end.exit: ; preds = %97, %84 br i1 %.not73, label %106, label %101, !prof !111 101: ; preds = %zend_observer_fcall_end.exit.thread152, %zend_observer_fcall_end.exit - %.pr155 = phi ptr [ %89, %zend_observer_fcall_end.exit.thread152 ], [ %.pr.pr, %zend_observer_fcall_end.exit ] + %.pr155 = phi ptr [ %89, %zend_observer_fcall_end.exit.thread153 ], [ %.pr.pr, %zend_observer_fcall_end.exit ] %102 = getelementptr inbounds nuw i8, ptr %.pr155, i64 8 %103 = load ptr, ptr %102, align 8, !tbaa !57 %.not74 = icmp eq ptr %103, null diff --git a/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll b/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll index 831532f3bc0..009f3564e3b 100644 --- a/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll +++ b/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll @@ -2421,10 +2421,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h91adb2c688795c3aE(ptr dead_o ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817ha578f52d0c8e16abE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #4 { -"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !397 + store i8 %4, ptr %3, align 1, !alias.scope !397 store i8 9, ptr %0, align 8, !alias.scope !397 ret void } @@ -2647,11 +2646,10 @@ define hidden void @_ZN5serde2de7Visitor9visit_u1617h2a8ecbf0bee0259eE(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u1617hb738f940358663aeE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i16 noundef %1) unnamed_addr #4 { -"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i16 @llvm.umin.i16(i16 %1, i16 3) %spec.select = trunc nuw nsw i16 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !421 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !421 store i8 9, ptr %0, align 8, !alias.scope !421 ret void } @@ -2675,11 +2673,10 @@ define hidden void @_ZN5serde2de7Visitor9visit_u3217h7b8cb89b4df71bfeE(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u3217he3aea0c2a020e1aeE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i32 noundef %1) unnamed_addr #4 { -"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i32 @llvm.umin.i32(i32 %1, i32 3) %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !427 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !427 store i8 9, ptr %0, align 8, !alias.scope !427 ret void } @@ -4345,11 +4342,10 @@ define noundef zeroext i1 @"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E"(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #4 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 9, ptr %0, align 8 ret void } @@ -4969,6 +4965,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #18 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umin.i64(i64, i64) #19 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #19 @@ -4978,9 +4977,6 @@ declare i16 @llvm.umin.i16(i16, i16) #19 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #19 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #19 - attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll b/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll index 6ad3bc749d0..279be901780 100644 --- a/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll +++ b/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll @@ -1076,7 +1076,7 @@ define hidden void @"_ZN13cf_rustracing4span13Span$LT$T$GT$8set_tags17he68c80825 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: readwrite) uwtable -define hidden void @_ZN3rmp6decode4uint9read_pfix17h83a255bcd6ab2a1eE(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef align 8 captures(none) dereferenceable(16) %1) unnamed_addr #1 { +define hidden void @_ZN3rmp6decode4uint9read_pfix17h83a255bcd6ab2a1eE(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 1)) %0, ptr noalias noundef align 8 captures(none) dereferenceable(16) %1) unnamed_addr #1 { tail call void @llvm.experimental.noalias.scope.decl(metadata !209) tail call void @llvm.experimental.noalias.scope.decl(metadata !212) tail call void @llvm.experimental.noalias.scope.decl(metadata !215) @@ -1116,7 +1116,6 @@ define hidden void @_ZN3rmp6decode4uint9read_pfix17h83a255bcd6ab2a1eE(ptr dead_o %21 = icmp samesign ult i8 %10, -64 %22 = and i8 %10, 31 %spec.select = select i1 %21, i8 -96, i8 %10 - %spec.select23 = select i1 %21, i8 %22, i8 undef br label %switch.lookup 23: ; preds = %16 @@ -1137,7 +1136,7 @@ _ZN3rmp6decode11read_marker17h8b6e48375ee9758eE.exit: ; preds = %2 switch.lookup: ; preds = %20, %12, %23, %18 %.sroa.5.0.ph.ph = phi i8 [ -128, %18 ], [ -112, %23 ], [ -32, %12 ], [ %spec.select, %20 ] - %.sroa.7.0.ph.ph = phi i8 [ %19, %18 ], [ %24, %23 ], [ %10, %12 ], [ %spec.select23, %20 ] + %.sroa.7.0.ph.ph = phi i8 [ %19, %18 ], [ %24, %23 ], [ %10, %12 ], [ %22, %20 ] store i8 2, ptr %0, align 8 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 1 store i8 %.sroa.5.0.ph.ph, ptr %.sroa.4.0..sroa_idx, align 1 diff --git a/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll b/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll index 81acd444b64..8df592ee2a5 100644 --- a/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll +++ b/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll @@ -25431,53 +25431,51 @@ define noundef zeroext i1 @"_ZN12polars_arrow6scalar5equal155_$LT$impl$u20$core. ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 1, 8) i8 @_ZN12polars_arrow7compute8temporal11Int8Weekday10i8_weekday17h159db35d9dcfb4ffE(ptr noalias noundef readonly align 8 dereferenceable(48) %0) unnamed_addr #0 personality ptr @rust_eh_personality { -switch.lookup: - %1 = alloca [12 x i8], align 4 %2 = alloca [12 x i8], align 4 + %3 = alloca [12 x i8], align 4 + call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !5886 call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !5886 - call void @llvm.lifetime.start.p0(ptr nonnull %1), !noalias !5886 - %3 = getelementptr inbounds nuw i8, ptr %0, i64 32 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull readonly align 8 dereferenceable(12) %3, i64 12, i1 false) - %4 = tail call noundef i32 @"_ZN77_$LT$chrono_tz..timezone_impl..TzOffset$u20$as$u20$chrono..offset..Offset$GT$3fix17hc3593d3f81e58c6cE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(48) %0) - call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %2, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %1, i32 noundef %4) - call void @llvm.lifetime.end.p0(ptr nonnull %1), !noalias !5886 - %5 = load i32, ptr %2, align 4, !range !5889, !noalias !5886, !noundef !12 - %6 = lshr i32 %5, 4 - %7 = and i32 %6, 511 - %8 = and i32 %5, 7 - %9 = add nuw nsw i32 %7, %8 - %.lhs.trunc.i = trunc nuw nsw i32 %9 to i16 - %10 = urem i16 %.lhs.trunc.i, 7 - %switch.idx.cast = trunc nuw nsw i16 %10 to i8 - %switch.offset = add nuw nsw i8 %switch.idx.cast, 1 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 32 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull readonly align 8 dereferenceable(12) %4, i64 12, i1 false) + %5 = tail call noundef i32 @"_ZN77_$LT$chrono_tz..timezone_impl..TzOffset$u20$as$u20$chrono..offset..Offset$GT$3fix17hc3593d3f81e58c6cE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(48) %0) + call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %3, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %2, i32 noundef %5) call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !5886 - ret i8 %switch.offset + %6 = load i32, ptr %3, align 4, !range !5889, !noalias !5886, !noundef !12 + %7 = lshr i32 %6, 4 + %8 = and i32 %7, 511 + %9 = and i32 %6, 7 + %10 = add nuw nsw i32 %8, %9 + %.lhs.trunc.i = trunc nuw nsw i32 %10 to i16 + %11 = urem i16 %.lhs.trunc.i, 7 + %switch.idx.cast.i = trunc nuw nsw i16 %11 to i8 + call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !5886 + %narrow = add nuw nsw i8 %switch.idx.cast.i, 1 + ret i8 %narrow } ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 1, 8) i8 @_ZN12polars_arrow7compute8temporal11Int8Weekday10i8_weekday17he57f0fa4cd1c8b87E(ptr noalias noundef readonly align 4 captures(none) dereferenceable(16) %0) unnamed_addr #0 personality ptr @rust_eh_personality { -switch.lookup: - %1 = alloca [12 x i8], align 4 %2 = alloca [12 x i8], align 4 + %3 = alloca [12 x i8], align 4 tail call void @llvm.experimental.noalias.scope.decl(metadata !5890) + call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !5890 call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !5890 - call void @llvm.lifetime.start.p0(ptr nonnull %1), !noalias !5890 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull readonly align 4 dereferenceable(16) %0, i64 12, i1 false) - %3 = getelementptr inbounds nuw i8, ptr %0, i64 12 - %.val.i = load i32, ptr %3, align 4, !alias.scope !5890, !noundef !12 - call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %2, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %1, i32 noundef %.val.i), !noalias !5890 - call void @llvm.lifetime.end.p0(ptr nonnull %1), !noalias !5890 - %4 = load i32, ptr %2, align 4, !range !5889, !noalias !5890, !noundef !12 - %5 = lshr i32 %4, 4 - %6 = and i32 %5, 511 - %7 = and i32 %4, 7 - %8 = add nuw nsw i32 %6, %7 - %.lhs.trunc.i = trunc nuw nsw i32 %8 to i16 - %9 = urem i16 %.lhs.trunc.i, 7 - %switch.idx.cast = trunc nuw nsw i16 %9 to i8 - %switch.offset = add nuw nsw i8 %switch.idx.cast, 1 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull readonly align 4 dereferenceable(16) %0, i64 12, i1 false) + %4 = getelementptr inbounds nuw i8, ptr %0, i64 12 + %.val.i = load i32, ptr %4, align 4, !alias.scope !5890, !noundef !12 + call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %3, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %2, i32 noundef %.val.i), !noalias !5890 call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !5890 - ret i8 %switch.offset + %5 = load i32, ptr %3, align 4, !range !5889, !noalias !5890, !noundef !12 + %6 = lshr i32 %5, 4 + %7 = and i32 %6, 511 + %8 = and i32 %5, 7 + %9 = add nuw nsw i32 %7, %8 + %.lhs.trunc.i = trunc nuw nsw i32 %9 to i16 + %10 = urem i16 %.lhs.trunc.i, 7 + %switch.idx.cast.i = trunc nuw nsw i16 %10 to i8 + call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !5890 + %narrow = add nuw nsw i8 %switch.idx.cast.i, 1 + ret i8 %narrow } ; Function Attrs: nonlazybind uwtable diff --git a/bench/proj/optimized/utils.ll b/bench/proj/optimized/utils.ll index 1dc6512f4c6..e72c87abaa2 100644 --- a/bench/proj/optimized/utils.ll +++ b/bench/proj/optimized/utils.ll @@ -118,7 +118,7 @@ target triple = "x86_64-pc-linux-gnu" define hidden noundef zeroext i1 @_Z32validate_form_string_for_numbersPKc(ptr noundef readonly captures(none) %0) local_unnamed_addr #0 { %2 = load i8, ptr %0, align 1, !tbaa !4 %.not = icmp eq i8 %2, 37 - br i1 %.not, label %3, label %switch.edge + br i1 %.not, label %3, label %switch.lookup 3: ; preds = %1 %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #4 @@ -143,7 +143,7 @@ define hidden noundef zeroext i1 @_Z32validate_form_string_for_numbersPKc(ptr no 10: ; preds = %.lr.ph %11 = add i8 %9, -48 %or.cond = icmp ult i8 %11, 10 - br i1 %or.cond, label %12, label %switch.edge + br i1 %or.cond, label %12, label %switch.lookup 12: ; preds = %10, %.lr.ph, %.lr.ph %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -156,16 +156,20 @@ define hidden noundef zeroext i1 @_Z32validate_form_string_for_numbersPKc(ptr no %15 = load i8, ptr %14, align 1, !tbaa !4 %switch.tableidx = add i8 %15, -69 %16 = icmp ult i8 %switch.tableidx, 35 - br i1 %16, label %switch.lookup, label %switch.edge + br i1 %16, label %switch.edge, label %switch.lookup -switch.lookup: ; preds = %._crit_edge - %switch.cast = zext nneg i8 %switch.tableidx to i35 - %switch.downshift = lshr i35 -4294967289, %switch.cast - %switch.masked = trunc i35 %switch.downshift to i1 - br label %switch.edge +switch.lookup: ; preds = %switch.edge, %._crit_edge + %18 = icmp eq i8 %15, 71 + br label %switch.lookup -switch.edge: ; preds = %10, %._crit_edge, %switch.lookup, %1 - %.026 = phi i1 [ false, %1 ], [ %switch.masked, %switch.lookup ], [ false, %._crit_edge ], [ false, %10 ] +switch.edge: ; preds = %._crit_edge + %switch.maskindex = zext nneg i8 %switch.tableidx to i64 + %switch.shifted = lshr i64 30064771075, %switch.maskindex + %switch.lobit = trunc i64 %switch.shifted to i1 + br i1 %switch.lobit, label %switch.lookup, label %17 + +switch.lookup: ; preds = %10, %17, %switch.hole_check, %1 + %.026 = phi i1 [ false, %1 ], [ %18, %17 ], [ true, %switch.hole_check ], [ false, %10 ] ret i1 %.026 } diff --git a/bench/protobuf/optimized/csharp_helpers.ll b/bench/protobuf/optimized/csharp_helpers.ll index 094e33e2eb3..6ba9b9ea8e7 100644 --- a/bench/protobuf/optimized/csharp_helpers.ll +++ b/bench/protobuf/optimized/csharp_helpers.ll @@ -2092,8 +2092,9 @@ if.then5.i.i.i: ; preds = %if.then.i.i.i _ZNK6google8protobuf15FieldDescriptor4typeEv.exit: ; preds = %if.end, %if.then.i, %lor.lhs.false.i.i.i, %if.then.i.i.i, %if.then5.i.i.i %type_.i = getelementptr inbounds nuw i8, ptr %descriptor, i64 2 %6 = load i8, ptr %type_.i, align 2 - %switch.tableidx = add i8 %6, -1 - %7 = icmp ult i8 %switch.tableidx, 18 + %conv.i = zext i8 %6 to i32 + %switch.tableidx = add nsw i32 %conv.i, -1 + %7 = icmp ult i32 %switch.tableidx, 18 br i1 %7, label %switch.lookup, label %sw.default sw.default: ; preds = %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit @@ -2112,7 +2113,7 @@ lpad: ; preds = %sw.default unreachable switch.lookup: ; preds = %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit - %switch.cast = zext nneg i8 %switch.tableidx to i18 + %switch.cast = trunc nuw nsw i32 %switch.tableidx to i18 %switch.downshift = lshr i18 3840, %switch.cast %switch.masked = trunc i18 %switch.downshift to i1 br label %return diff --git a/bench/protobuf/optimized/text_format.ll b/bench/protobuf/optimized/text_format.ll index b1be40a715d..db6f42dfd97 100644 --- a/bench/protobuf/optimized/text_format.ll +++ b/bench/protobuf/optimized/text_format.ll @@ -19338,11 +19338,15 @@ for.body.i.i: ; preds = %for.inc22.i.i, %for br i1 %cmp.i.i.i, label %_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i, label %if.end.i.i.i if.end.i.i.i: ; preds = %for.body.i.i - switch i8 %3, label %if.end.i.i [ - i8 34, label %_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i - i8 39, label %_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i - i8 92, label %_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i - ] + %switch.tableidx.i.i.i = add i8 %3, -34 + %4 = icmp ult i8 %switch.tableidx.i.i.i, 59 + br i1 %4, label %_ZN6google8protobuf12_GLOBAL__N_121DefinitelyNeedsEscapeEh.exit.i.i, label %if.end.i.i + +_ZN6google8protobuf12_GLOBAL__N_121DefinitelyNeedsEscapeEh.exit.i.i: ; preds = %if.end.i.i.i + %switch.cast.i.i.i = zext nneg i8 %switch.tableidx.i.i.i to i59 + %switch.downshift.i.i.i = lshr i59 -288230376151711711, %switch.cast.i.i.i + %switch.masked.i.i.i = trunc i59 %switch.downshift.i.i.i to i1 + br i1 %switch.masked.i.i.i, label %_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i, label %for.inc22.i.i if.end.i.i: ; preds = %if.end.i.i.i %cmp.i16.i.i = icmp slt i8 %3, 0 @@ -19383,14 +19387,14 @@ if.end18.i.i: ; preds = %for.end.i.i %add20.i.i = add i64 %end.0.lcssa.i.i, -1 br label %for.inc22.i.i -for.inc22.i.i: ; preds = %if.end18.i.i, %if.end.i.i - %i.1.i.i = phi i64 [ %add20.i.i, %if.end18.i.i ], [ %i.031.i.i, %if.end.i.i ] +for.inc22.i.i: ; preds = %if.end18.i.i, %if.end.i.i, %_ZN6google8protobuf12_GLOBAL__N_121DefinitelyNeedsEscapeEh.exit.i.i + %i.1.i.i = phi i64 [ %add20.i.i, %if.end18.i.i ], [ %i.031.i.i, %if.end.i.i ], [ %i.034.i.i, %_ZN6google8protobuf12_GLOBAL__N_121DefinitelyNeedsEscapeEh.exit.i.i ] %inc23.i.i = add nuw i64 %i.1.i.i, 1 %cmp.i4.i = icmp ult i64 %inc23.i.i, %src.sroa.0.034.i br i1 %cmp.i4.i, label %for.body.i.i, label %if.then.i, !llvm.loop !175 -_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i: ; preds = %if.end.i.i.i, %if.end.i.i.i, %if.end.i.i.i, %for.body.i.i, %if.then16.i.i - %retval.0.i.i = phi i64 [ %add17.i.i, %if.then16.i.i ], [ %i.031.i.i, %for.body.i.i ], [ %i.031.i.i, %if.end.i.i.i ], [ %i.031.i.i, %if.end.i.i.i ], [ %i.031.i.i, %if.end.i.i.i ] +_ZN6google8protobuf12_GLOBAL__N_120SkipPassthroughBytesESt17basic_string_viewIcSt11char_traitsIcEE.exit.i: ; preds = %_ZN6google8protobuf12_GLOBAL__N_121DefinitelyNeedsEscapeEh.exit.i.i, %for.body.i.i, %if.then16.i.i + %retval.0.i.i = phi i64 [ %add17.i.i, %if.then16.i.i ], [ %i.031.i.i, %for.body.i.i ], [ %i.031.i.i, %_ZN6google8protobuf12_GLOBAL__N_121DefinitelyNeedsEscapeEh.exit.i.i ] %cmp.not.i = icmp eq i64 %retval.0.i.i, 0 br i1 %cmp.not.i, label %if.end6.i, label %if.then.i @@ -19400,7 +19404,7 @@ if.then.i: ; preds = %for.inc22.i.i, %_ZN %vtable.i.i = load ptr, ptr %generator, align 8 %vfn.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i, i64 40 %7 = load ptr, ptr %vfn.i.i, align 8 - call void %7(ptr noundef nonnull align 8 dereferenceable(8) %generator, ptr noundef %src.sroa.10.033.i, i64 noundef %.sroa.speculated.i.i) + call void %8(ptr noundef nonnull align 8 dereferenceable(8) %generator, ptr noundef %src.sroa.10.033.i, i64 noundef %.sroa.speculated.i.i) %add.ptr.i.i = getelementptr inbounds i8, ptr %src.sroa.10.033.i, i64 %retval.0.i.i7 %sub.i8.i = sub i64 %src.sroa.0.034.i, %retval.0.i.i7 %cmp.i9.i = icmp eq i64 %sub.i8.i, 0 @@ -19416,7 +19420,7 @@ if.end6.i: ; preds = %if.then.i, %_ZN6goo %vtable.i17.i = load ptr, ptr %generator, align 8 %vfn.i18.i = getelementptr inbounds nuw i8, ptr %vtable.i17.i, i64 40 %10 = load ptr, ptr %vfn.i18.i, align 8 - invoke void %10(ptr noundef nonnull align 8 dereferenceable(8) %generator, ptr noundef %9, i64 noundef %8) + invoke void %11(ptr noundef nonnull align 8 dereferenceable(8) %generator, ptr noundef %9, i64 noundef %8) to label %invoke.cont.i unwind label %lpad.i invoke.cont.i: ; preds = %if.end6.i @@ -19437,7 +19441,7 @@ _ZN6google8protobuf12_GLOBAL__N_119HardenedPrintStringESt17basic_string_viewIcSt %vtable.i3 = load ptr, ptr %generator, align 8 %vfn.i4 = getelementptr inbounds nuw i8, ptr %vtable.i3, i64 40 %12 = load ptr, ptr %vfn.i4, align 8 - call void %12(ptr noundef nonnull align 8 dereferenceable(8) %generator, ptr noundef nonnull @.str.6, i64 noundef 1) + call void %13(ptr noundef nonnull align 8 dereferenceable(8) %generator, ptr noundef nonnull @.str.6, i64 noundef 1) ret void } diff --git a/bench/proxygen/optimized/StructuredHeadersBuffer.ll b/bench/proxygen/optimized/StructuredHeadersBuffer.ll index 3ba48bd4d82..0abbca7d786 100644 --- a/bench/proxygen/optimized/StructuredHeadersBuffer.ll +++ b/bench/proxygen/optimized/StructuredHeadersBuffer.ll @@ -2937,36 +2937,42 @@ if.then48.i.i: ; preds = %for.inc.i51.i.i, %f %storemerge.i.i = select i1 %cmp1.i.i, double 0xFFF0000000000000, double 0x7FF0000000000000 br label %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread -_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread: ; preds = %if.then48.i.i, %if.end28.i.i +_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread: ; preds = %if.end28.i.i, %if.then48.i.i %storemerge.sink.i.i = phi double [ %storemerge.i.i, %if.then48.i.i ], [ %storemerge28.i.i, %if.end28.i.i ] - call void @llvm.lifetime.end.p0(ptr nonnull %i_interpreter.i.i) - call void @llvm.lifetime.end.p0(ptr nonnull %out.i.i) - br label %if.end + store double %storemerge.sink.i.i, ptr %result, align 8 + br label %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread if.end.i.i.i.i: ; preds = %land.lhs.true.i47.i.i, %land.lhs.true.i34.i.i, %entry, %if.end.i.i, %if.then11.i.i, %lor.lhs.false22.i.i, %if.end17.i.i, %if.else35.i.i %call2.i.i.i.i = call noundef zeroext i1 @_ZN5boost6detail27lexical_ostream_limited_srcIcSt11char_traitsIcEE20shr_using_base_classIdEEbRT_(ptr noundef nonnull align 8 dereferenceable(16) %out.i.i, ptr noundef nonnull align 8 dereferenceable(8) %result) - br i1 %call2.i.i.i.i, label %land.lhs.true.i.i.i.i, label %if.then + br i1 %call2.i.i.i.i, label %land.lhs.true.i.i.i.i, label %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread3 + +_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread3: ; preds = %if.end.i.i.i.i + call void @llvm.lifetime.end.p0(ptr nonnull %i_interpreter.i.i) + call void @llvm.lifetime.end.p0(ptr nonnull %out.i.i) + br label %if.then land.lhs.true.i.i.i.i: ; preds = %if.end.i.i.i.i %13 = load ptr, ptr %finish.i6.i.i, align 8 %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %13, i64 -1 %14 = load i8, ptr %add.ptr.i.i.i.i, align 1 - switch i8 %14, label %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread5 [ - i8 101, label %if.then - i8 69, label %if.then - i8 45, label %if.then - i8 43, label %if.then - ] + %switch.tableidx.i.i.i.i = add i8 %14, -43 + %15 = icmp ult i8 %switch.tableidx.i.i.i.i, 59 + br i1 %15, label %if.then, label %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread -_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread5: ; preds = %land.lhs.true.i.i.i.i +_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread5: ; preds = %_ZN5boost6detail13parse_inf_nanIcdEEbPKT_S4_RT0_.exit, %land.lhs.true.i.i.i.i call void @llvm.lifetime.end.p0(ptr nonnull %i_interpreter.i.i) call void @llvm.lifetime.end.p0(ptr nonnull %out.i.i) - %.pre = load double, ptr %result, align 8 br label %if.end -if.then: ; preds = %if.end.i.i.i.i, %land.lhs.true.i.i.i.i, %land.lhs.true.i.i.i.i, %land.lhs.true.i.i.i.i, %land.lhs.true.i.i.i.i +if.then: ; preds = %land.lhs.true.i.i.i.i + %switch.maskindex.i.i.i.i = zext nneg i8 %switch.tableidx.i.i.i.i to i64 + %switch.shifted.i.i.i.i = lshr i64 288230376218820613, %switch.maskindex.i.i.i.i + %switch.lobit.i.i.i.i = trunc i64 %switch.shifted.i.i.i.i to i1 call void @llvm.lifetime.end.p0(ptr nonnull %i_interpreter.i.i) call void @llvm.lifetime.end.p0(ptr nonnull %out.i.i) + br i1 %switch.lobit.i.i.i.i, label %if.then, label %if.end + +if.then: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread3, %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp.i) store ptr getelementptr inbounds nuw (i8, ptr @_ZTVN5boost16bad_lexical_castE, i64 16), ptr %ref.tmp.i, align 8 %source.i.i = getelementptr inbounds nuw i8, ptr %ref.tmp.i, i64 8 @@ -2985,9 +2991,9 @@ lpad.i: ; preds = %if.then call void @_ZNSt8bad_castD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %ref.tmp.i) #29 resume { ptr, i32 } %15 -if.end: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread5, %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread - %16 = phi double [ %.pre, %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread5 ], [ %storemerge.sink.i.i, %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread ] - ret double %16 +if.end: ; preds = %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit.thread5, %_ZN5boost10conversion6detail19try_lexical_convertIdNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKT0_RT_.exit + %17 = load double, ptr %result, align 8 + ret double %17 } declare noundef zeroext i1 @_ZN8proxygen17StructuredHeaders17isValidStringCharEc(i8 noundef signext) local_unnamed_addr #3 diff --git a/bench/proxygen/optimized/StructuredHeadersUtilities.ll b/bench/proxygen/optimized/StructuredHeadersUtilities.ll index eedfbff3c34..a76372e3416 100644 --- a/bench/proxygen/optimized/StructuredHeadersUtilities.ll +++ b/bench/proxygen/optimized/StructuredHeadersUtilities.ll @@ -953,20 +953,23 @@ for.body: ; preds = %if.end, %for.inc br i1 %or.cond, label %for.inc, label %switch.early.test.i switch.early.test.i: ; preds = %for.body - switch i8 %3, label %return [ - i8 95, label %for.inc - i8 45, label %for.inc - i8 42, label %for.inc - i8 47, label %for.inc - ] - -for.inc: ; preds = %switch.early.test.i, %switch.early.test.i, %switch.early.test.i, %switch.early.test.i, %for.body - %incdec.ptr.i = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.07, i64 1 + %switch.tableidx.i = add i8 %3, -42 + %6 = icmp ult i8 %switch.tableidx.i, 54 + br i1 %6, label %_ZN8proxygen17StructuredHeaders21isValidIdentifierCharEc.exit, label %return + +_ZN8proxygen17StructuredHeaders21isValidIdentifierCharEc.exit:; preds = %switch.early.test.i + %switch.cast.i = zext nneg i8 %switch.tableidx.i to i54 + %switch.downshift.i = lshr i54 -9007199254740951, %switch.cast.i + %switch.masked.i = trunc i54 %switch.downshift.i to i1 + br i1 %switch.masked.i, label %for.inc, label %return + +for.inc: ; preds = %for.body, %_ZN8proxygen17StructuredHeaders21isValidIdentifierCharEc.exit + %incdec.ptr.i = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.08, i64 1 %cmp.i.not = icmp eq ptr %incdec.ptr.i, %call4 br i1 %cmp.i.not, label %return, label %for.body -return: ; preds = %for.inc, %switch.early.test.i, %if.end, %entry, %lor.lhs.false - %retval.0 = phi i1 [ false, %lor.lhs.false ], [ false, %entry ], [ true, %if.end ], [ true, %for.inc ], [ false, %switch.early.test.i ] +return: ; preds = %_ZN8proxygen17StructuredHeaders21isValidIdentifierCharEc.exit, %for.inc, %switch.early.test.i, %if.end, %entry, %lor.lhs.false + %retval.0 = phi i1 [ false, %lor.lhs.false ], [ false, %entry ], [ true, %if.end ], [ false, %_ZN8proxygen17StructuredHeaders21isValidIdentifierCharEc.exit ], [ true, %for.inc ], [ false, %switch.early.test.i ] ret i1 %retval.0 } diff --git a/bench/quantlib/optimized/analytichestonengine.ll b/bench/quantlib/optimized/analytichestonengine.ll index cf75c2c0855..9b0331fe2fa 100644 --- a/bench/quantlib/optimized/analytichestonengine.ll +++ b/bench/quantlib/optimized/analytichestonengine.ll @@ -11574,15 +11574,14 @@ invoke.cont2: ; preds = %_ZN8QuantLib20Analy lor.lhs.false: ; preds = %invoke.cont2 %9 = load i32, ptr %integration, align 8, !tbaa !186 - switch i32 %9, label %do.end [ - i32 0, label %if.then - i32 1, label %if.then - i32 2, label %if.then - i32 3, label %if.then - i32 10, label %if.then - ] - -if.then: ; preds = %lor.lhs.false, %lor.lhs.false, %lor.lhs.false, %lor.lhs.false, %lor.lhs.false + %10 = icmp ult i32 %9, 11 + %switch.cast.i = trunc i32 %9 to i11 + %switch.downshift.i = lshr i11 -1009, %switch.cast.i + %switch.masked.i = trunc i11 %switch.downshift.i to i1 + %11 = select i1 %10, i1 %switch.masked.i, i1 false + br i1 %11, label %if.then, label %do.end + +if.then: ; preds = %lor.lhs.false call void @llvm.lifetime.start.p0(ptr nonnull %_ql_msg_stream) invoke void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(112) %_ql_msg_stream) to label %invoke.cont8 unwind label %lpad7 diff --git a/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll b/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll index 8d321a2646c..2f61b437962 100644 --- a/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll +++ b/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll @@ -4893,10 +4893,9 @@ switch.lookup: ; preds = %86, %82 %.sroa.17.0 = select i1 %.not2.i, i8 1, i8 %92 %93 = getelementptr inbounds nuw i8, ptr %6, i64 116 %94 = load i32, ptr %93, align 4, !range !993, !alias.scope !988, !noalias !991, !noundef !13 - %95 = shl nuw nsw i32 %94, 3 - %switch.shiftamt = zext nneg i32 %95 to i40 - %switch.downshift = lshr i40 8640397568, %switch.shiftamt - %switch.masked = trunc i40 %switch.downshift to i8 + %.not3.i = icmp eq i32 %94, 4 + %switch.idx.cast.i.i = trunc nuw nsw i32 %94 to i8 + %.sroa.1830.0 = select i1 %.not3.i, i8 2, i8 %switch.idx.cast.i.i call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(64) @anon.8e3af52d7ab36e26e42eb5a5d7fa403b.61, i64 64, i1 false), !alias.scope !991, !noalias !988 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 64 store i64 %.sroa.4.0, ptr %.sroa.4.0..sroa_idx, align 8, !alias.scope !991, !noalias !988 @@ -4943,7 +4942,7 @@ switch.lookup: ; preds = %86, %82 %.sroa.18.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 168 store i8 1, ptr %.sroa.18.0..sroa_idx, align 8, !alias.scope !991, !noalias !988 %.sroa.1830.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 169 - store i8 %switch.masked, ptr %.sroa.1830.0..sroa_idx, align 1, !alias.scope !991, !noalias !988 + store i8 %.sroa.1830.0, ptr %.sroa.1830.0..sroa_idx, align 1, !alias.scope !991, !noalias !988 %.sroa.19.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 170 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(6) %.sroa.19.0..sroa_idx, ptr noundef nonnull align 2 dereferenceable(6) getelementptr inbounds nuw (i8, ptr @anon.8e3af52d7ab36e26e42eb5a5d7fa403b.61, i64 170), i64 6, i1 false), !alias.scope !991, !noalias !988 br label %97 @@ -4958,17 +4957,17 @@ switch.lookup: ; preds = %86, %82 call void @_ZN6quiche8recovery11gcongestion4bbr213network_model17BBRv2NetworkModel3new17hf5cce2ff24cb92d7E(ptr noalias noundef nonnull sret([656 x i8]) align 8 captures(none) dereferenceable(656) %98, ptr noalias noundef nonnull readonly align 8 dereferenceable(176) %9) store i64 2, ptr %8, align 8, !alias.scope !994, !noalias !997 %99 = invoke noundef i64 @_ZN6quiche8recovery9bandwidth9Bandwidth25from_bytes_and_time_delta17h08c072a537c3b5cbE(i64 noundef %10, i64 noundef %4, i32 noundef %5) - to label %102 unwind label %100 + to label %101 unwind label %100 100: ; preds = %102, %97 %101 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr68drop_in_place$LT$quiche..recovery..gcongestion..bbr2..mode..Mode$GT$17h78f6d04616ed8931E"(ptr noalias noundef align 8 dereferenceable(776) %8) #26 - to label %118 unwind label %116 + to label %117 unwind label %116 102: ; preds = %97 %103 = invoke noundef i64 @"_ZN91_$LT$quiche..recovery..bandwidth..Bandwidth$u20$as$u20$core..ops..arith..Mul$LT$f64$GT$$GT$3mul17ha2047d51d1b4806eE"(i64 noundef %99, double noundef 2.885000e+00) - to label %104 unwind label %100 + to label %103 unwind label %100 104: ; preds = %102 %105 = mul i64 %3, %2 diff --git a/bench/quiche-rs/optimized/dcln9cwp955y6zcrpmqhoqx85.ll b/bench/quiche-rs/optimized/dcln9cwp955y6zcrpmqhoqx85.ll index 6e56554eb69..85e62bc8453 100644 --- a/bench/quiche-rs/optimized/dcln9cwp955y6zcrpmqhoqx85.ll +++ b/bench/quiche-rs/optimized/dcln9cwp955y6zcrpmqhoqx85.ll @@ -886,19 +886,17 @@ define hidden void @_ZN6quiche8recovery10congestion4bbr28per_loss30bbr2_update_c 14: ; preds = %10 %15 = getelementptr inbounds nuw i8, ptr %0, i64 1067 %.val.i = load i8, ptr %15, align 1, !range !45, !alias.scope !70, !noundef !3 - switch i8 %.val.i, label %_ZN6quiche8recovery10congestion4bbr28per_loss18bbr2_is_probing_bw17hea53f8af7bc12645E.exit.i [ - i8 0, label %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit - i8 4, label %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit - i8 5, label %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit - ] - -_ZN6quiche8recovery10congestion4bbr28per_loss18bbr2_is_probing_bw17hea53f8af7bc12645E.exit.i: ; preds = %14 + %switch.cast.i.i = trunc nuw nsw i8 %.val.i to i7 + %switch.downshift.i.i = lshr i7 49, %switch.cast.i.i + %switch.masked.i.i = trunc i7 %switch.downshift.i.i to i1 + %.not.i = xor i1 %switch.masked.i.i, true %16 = getelementptr inbounds nuw i8, ptr %0, i64 1065 %17 = load i8, ptr %16, align 1, !range !24, !alias.scope !70 %18 = trunc nuw i8 %17 to i1 - br i1 %18, label %_ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h9493084747056798E.exit.i, label %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit + %or.cond.i = select i1 %.not.i, i1 %18, i1 false + br i1 %or.cond.i, label %_ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h9493084747056798E.exit.i, label %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit -_ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h9493084747056798E.exit.i: ; preds = %_ZN6quiche8recovery10congestion4bbr28per_loss18bbr2_is_probing_bw17hea53f8af7bc12645E.exit.i +_ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h9493084747056798E.exit.i: ; preds = %14 %19 = getelementptr inbounds nuw i8, ptr %0, i64 880 %20 = load i64, ptr %19, align 8, !alias.scope !73, !noundef !3 %21 = icmp eq i64 %20, -1 @@ -927,12 +925,11 @@ _ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h94930847 store i64 %.sroa.0.0.sroa.speculated.i1.i.i, ptr %25, align 8, !alias.scope !76 br label %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit -_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit: ; preds = %14, %14, %14, %_ZN6quiche8recovery10congestion4bbr28per_loss18bbr2_is_probing_bw17hea53f8af7bc12645E.exit.i, %_ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h9493084747056798E.exit.i - %41 = getelementptr inbounds nuw i8, ptr %0, i64 1065 - store i8 0, ptr %41, align 1 - %42 = getelementptr inbounds nuw i8, ptr %0, i64 1048 - store i64 0, ptr %42, align 8 - br label %43 +_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit: ; preds = %14, %_ZN6quiche8recovery10congestion4bbr28per_loss22bbr2_init_lower_bounds17h9493084747056798E.exit.i + store i8 0, ptr %16, align 1 + %41 = getelementptr inbounds nuw i8, ptr %0, i64 1048 + store i64 0, ptr %41, align 8 + br label %42 43: ; preds = %10, %_ZN6quiche8recovery10congestion4bbr28per_loss39bbr2_adapt_lower_bounds_from_congestion17h7c20ac138b250830E.exit ret void diff --git a/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll b/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll index 42dc7e91ede..ba2e5d00be5 100644 --- a/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll +++ b/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll @@ -46,44 +46,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit", !prof !8 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" + i64 1, label %6 + ], !prof !8 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !3, !align !4, !noundef !3 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 - -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 - -11: ; preds = %9, %4 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" + +6:; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !3, !align !4, !noundef !3 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 + +11: ; preds = %6 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !9, !invariant.load !3 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !10, !invariant.load !3 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #7 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 + +13:; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !9, !invariant.load !3 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !10, !invariant.load !3 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #7 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -101,14 +113,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #7 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #7 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #7 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #7 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i" ret void } @@ -197,7 +209,7 @@ attributes #7 = { nounwind } !5 = !{i8 0, i8 2} !6 = !{!"branch_weights", !"expected", i32 2000, i32 1} !7 = !{!"branch_weights", !"expected", i32 1, i32 2000} -!8 = !{!"branch_weights", i32 2000, i32 6001} +!8 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !9 = !{i64 0, i64 -9223372036854775808} !10 = !{i64 1, i64 0} !11 = !{i32 0, i32 -1} diff --git a/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll b/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll index 69aa5373b8f..81860ea3d1c 100644 --- a/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll +++ b/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll @@ -1683,44 +1683,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit", !prof !186 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" + i64 1, label %6 + ], !prof !186 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !3, !align !4, !noundef !3 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 +9: ; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !3, !align !4, !noundef !3 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 -11: ; preds = %9, %4 +11: ; preds = %9 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !96, !invariant.load !3 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !97, !invariant.load !3 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #12 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 + +13:; preds = %11, %9 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !96, !invariant.load !3 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !97, !invariant.load !3 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #12 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -1738,14 +1750,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #12 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #12 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #12 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #12 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i" ret void } @@ -6715,7 +6727,7 @@ attributes #13 = { noreturn } !183 = distinct !{!183, !184, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdeb4145f9eab2f43E: argument 0"} !184 = distinct !{!184, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdeb4145f9eab2f43E"} !185 = !{!183, !180, !177} -!186 = !{!"branch_weights", i32 2000, i32 6001} +!186 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !187 = !{!188} !188 = distinct !{!188, !189, !"_ZN4core3ptr75drop_in_place$LT$alloc..sync..Arc$LT$quinn..endpoint..EndpointInner$GT$$GT$17h2a533792a3ef0e79E: argument 0"} !189 = distinct !{!189, !"_ZN4core3ptr75drop_in_place$LT$alloc..sync..Arc$LT$quinn..endpoint..EndpointInner$GT$$GT$17h2a533792a3ef0e79E"} diff --git a/bench/raft-rs/optimized/0vy0alwm7tj2puypt2toi1odd.ll b/bench/raft-rs/optimized/0vy0alwm7tj2puypt2toi1odd.ll index 0761886b83f..712b37a0fa0 100644 --- a/bench/raft-rs/optimized/0vy0alwm7tj2puypt2toi1odd.ll +++ b/bench/raft-rs/optimized/0vy0alwm7tj2puypt2toi1odd.ll @@ -15374,10 +15374,9 @@ define noundef range(i32 0, 3) i32 @"_ZN88_$LT$raft_proto..protos..eraftpb..Entr ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 4) i8 @"_ZN88_$LT$raft_proto..protos..eraftpb..EntryType$u20$as$u20$protobuf..enums..ProtobufEnum$GT$8from_i3217h063ac7819a05ee77E"(i32 noundef %0) unnamed_addr #3 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 3) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 3) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -15435,10 +15434,9 @@ define noundef range(i32 0, 19) i32 @"_ZN90_$LT$raft_proto..protos..eraftpb..Mes ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 20) i8 @"_ZN90_$LT$raft_proto..protos..eraftpb..MessageType$u20$as$u20$protobuf..enums..ProtobufEnum$GT$8from_i3217hc7651054bad52fe4E"(i32 noundef %0) unnamed_addr #3 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 19) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 19) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -15496,10 +15494,9 @@ define noundef range(i32 0, 3) i32 @"_ZN99_$LT$raft_proto..protos..eraftpb..Conf ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 4) i8 @"_ZN99_$LT$raft_proto..protos..eraftpb..ConfChangeTransition$u20$as$u20$protobuf..enums..ProtobufEnum$GT$8from_i3217h964f62e70c1e4cdeE"(i32 noundef %0) unnamed_addr #3 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 3) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 3) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -15557,10 +15554,9 @@ define noundef range(i32 0, 3) i32 @"_ZN93_$LT$raft_proto..protos..eraftpb..Conf ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 4) i8 @"_ZN93_$LT$raft_proto..protos..eraftpb..ConfChangeType$u20$as$u20$protobuf..enums..ProtobufEnum$GT$8from_i3217h0b2303e053e446b0E"(i32 noundef %0) unnamed_addr #3 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 3) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 3) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable diff --git a/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll b/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll index 6adea53cc72..cae45bf3ba3 100644 --- a/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll +++ b/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll @@ -1135,8 +1135,8 @@ define hidden noundef zeroext i1 @_ZN12regex_syntax3ast5parse15is_capture_char17 %15 = tail call noundef zeroext i1 @_ZN4core7unicode12unicode_data1n6lookup17h5047a9fde28b347aE(i32 noundef %0) br label %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$15is_alphanumeric17hfaf0e16507d8f2eaE.llvm.4042359526532701921.exit" -"_ZN4core4char7methods22_$LT$impl$u20$char$GT$15is_alphanumeric17hfaf0e16507d8f2eaE.llvm.4042359526532701921.exit": ; preds = %3, %21, %19, %16, %14, %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.thread7.i", %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.i", %7, %5 - %.0.shrunk = phi i1 [ true, %5 ], [ %15, %14 ], [ true, %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.i" ], [ true, %7 ], [ %or.cond9.i, %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.thread7.i" ], [ %22, %21 ], [ true, %16 ], [ false, %19 ], [ true, %3 ] +"_ZN4core4char7methods22_$LT$impl$u20$char$GT$15is_alphanumeric17hfaf0e16507d8f2eaE.llvm.4042359526532701921.exit": ; preds = %21, %19, %16, %14, %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.thread7.i", %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.i", %7, %5, %3 + %.0.shrunk = phi i1 [ true, %3 ], [ true, %5 ], [ %15, %14 ], [ true, %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.i" ], [ true, %7 ], [ %or.cond9.i, %"_ZN4core4char7methods22_$LT$impl$u20$char$GT$13is_alphabetic17h8a921ae1bdf9d79fE.llvm.4042359526532701921.exit.thread7.i" ], [ %22, %21 ], [ true, %16 ], [ false, %19 ] ret i1 %.0.shrunk 16: ; preds = %5 @@ -2838,11 +2838,10 @@ switch.lookup: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define noundef range(i64 1, 5) i64 @_ZN12regex_syntax4utf812Utf8Sequence3len17hd050a573887f5bd8E(ptr noalias noundef readonly align 1 captures(none) dereferenceable(9) %0) unnamed_addr #4 { -switch.lookup: - %1 = load i8, ptr %0, align 1, !range !433, !alias.scope !434, !noundef !4 - %narrow = add nuw nsw i8 %1, 1 - %switch.offset = zext nneg i8 %narrow to i64 - ret i64 %switch.offset + %2 = load i8, ptr %0, align 1, !range !433, !alias.scope !434, !noundef !4 + %narrow.i = add nuw nsw i8 %2, 1 + %switch.offset.i = zext nneg i8 %narrow.i to i64 + ret i64 %switch.offset.i } ; Function Attrs: nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite, inaccessiblemem: readwrite) uwtable @@ -2930,23 +2929,19 @@ default.unreachable13: ; preds = %1 ; Function Attrs: nofree norecurse nosync nounwind nonlazybind memory(argmem: read) uwtable define noundef zeroext i1 @_ZN12regex_syntax4utf812Utf8Sequence7matches17h38d93a168ede3747E(ptr noalias noundef readonly align 1 captures(none) dereferenceable(9) %0, ptr noalias noundef nonnull readonly align 1 captures(none) %1, i64 noundef %2) unnamed_addr #12 personality ptr @rust_eh_personality { -switch.lookup: - %3 = load i8, ptr %0, align 1, !range !433, !alias.scope !485, !noundef !4 - %narrow = add nuw nsw i8 %3, 1 - %switch.offset = zext nneg i8 %narrow to i64 - %4 = icmp ult i64 %2, %switch.offset - br i1 %4, label %.loopexit, label %switch.lookup12 + %4 = load i8, ptr %0, align 1, !range !433, !alias.scope !485, !noundef !4 + %narrow.i.i = add nuw nsw i8 %4, 1 + %switch.offset.i.i = zext nneg i8 %narrow.i.i to i64 + %5 = icmp ult i64 %2, %switch.offset.i.i + br i1 %5, label %.loopexit, label %switch.lookup12 -switch.lookup12: ; preds = %switch.lookup - %narrow15 = add nuw nsw i8 %3, 1 - %switch.offset14 = zext nneg i8 %narrow15 to i64 +switch.lookup12: ; preds = %3 %.sroa.0.0.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 1 - %.0.sroa.speculated.i.i.i = tail call noundef i64 @llvm.umin.i64(i64 %2, i64 %switch.offset14) - br label %5 + br label %switch.lookup12 5: ; preds = %6, %switch.lookup12 - %.sroa.9.0 = phi i64 [ 0, %switch.lookup12 ], [ %7, %6 ] - %exitcond.not = icmp eq i64 %.sroa.9.0, %.0.sroa.speculated.i.i.i + %.sroa.9.0 = phi i64 [ 0, %6 ], [ %7, %8 ] + %exitcond.not = icmp eq i64 %.sroa.9.0, %switch.offset.i.i br i1 %exitcond.not, label %.loopexit, label %6 6: ; preds = %5 @@ -2962,17 +2957,16 @@ switch.lookup12: ; preds = %switch.lookup %.0.i = select i1 %.not.i, i1 %14, i1 false br i1 %.0.i, label %5, label %.loopexit -.loopexit: ; preds = %6, %5, %switch.lookup - %.0 = phi i1 [ false, %switch.lookup ], [ %exitcond.not, %5 ], [ %exitcond.not, %6 ] +.loopexit: ; preds = %6, %5, %3 + %.0 = phi i1 [ false, %3 ], [ %exitcond.not, %7 ], [ %exitcond.not, %8 ] ret i1 %.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define { ptr, ptr } @"_ZN98_$LT$$RF$regex_syntax..utf8..Utf8Sequence$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17hc0ed4018f77bf324E"(ptr noalias noundef readonly align 1 dereferenceable(9) %0) unnamed_addr #4 { -switch.lookup: - %1 = load i8, ptr %0, align 1, !range !433, !alias.scope !493, !noundef !4 + %2 = load i8, ptr %0, align 1, !range !433, !alias.scope !493, !noundef !4 %.sroa.0.0.i = getelementptr inbounds nuw i8, ptr %0, i64 1 - %2 = zext nneg i8 %1 to i64 + %2 = zext nneg i8 %2 to i64 %3 = getelementptr inbounds nuw { i8, i8 }, ptr %.sroa.0.0.i, i64 %2 %4 = getelementptr inbounds nuw i8, ptr %3, i64 2 %5 = insertvalue { ptr, ptr } poison, ptr %.sroa.0.0.i, 0 diff --git a/bench/ripgrep-rs/optimized/1blifwgi0jcy5tf4.ll b/bench/ripgrep-rs/optimized/1blifwgi0jcy5tf4.ll index 7a29a805b09..f70cf411a5a 100644 --- a/bench/ripgrep-rs/optimized/1blifwgi0jcy5tf4.ll +++ b/bench/ripgrep-rs/optimized/1blifwgi0jcy5tf4.ll @@ -373,29 +373,24 @@ define { i64, i64 } @_ZN12grep_printer4util17trim_ascii_prefix17h89201b5f705bab5 %26 = getelementptr inbounds nuw i8, ptr %25, i64 1 tail call void @llvm.experimental.noalias.scope.decl(metadata !37) %27 = load i8, ptr %25, align 1, !alias.scope !37, !noalias !40, !noundef !7 - switch i8 %27, label %"_ZN115_$LT$core..iter..adapters..take_while..TakeWhile$LT$I$C$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hed27b64ba4a73510E.exit" [ - i8 9, label %.preheader - i8 10, label %.preheader - i8 11, label %.preheader - i8 12, label %.preheader - i8 13, label %.preheader - i8 32, label %.preheader - ] - -.preheader: ; preds = %24, %24, %24, %24, %24, %24 - br label %28 - -28: ; preds = %.preheader, %28 - %.05.i.i.i.i.i.i = phi i64 [ %32, %28 ], [ 0, %.preheader ] + %28 = icmp ult i8 %27, 33 + %switch.cast.i.i.i.i.i.i = zext nneg i8 %27 to i33 + %switch.downshift.i.i.i.i.i.i = lshr i33 -4294951424, %switch.cast.i.i.i.i.i.i + %switch.masked.i.i.i.i.i.i = trunc i33 %switch.downshift.i.i.i.i.i.i to i1 + %.0.i.i.i.i.i.i = select i1 %28, i1 %switch.masked.i.i.i.i.i.i, i1 false + br i1 %.0.i.i.i.i.i.i, label %.preheader, label %"_ZN115_$LT$core..iter..adapters..take_while..TakeWhile$LT$I$C$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hed27b64ba4a73510E.exit" + +.preheader: ; preds = %24, %.preheader + %.05.i.i.i.i.i.i = phi i64 [ %32, %.preheader ], [ 0, %24 ] %29 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i.i.i.i, i64 %.05.i.i.i.i.i.i %30 = load i8, ptr %29, align 1, !alias.scope !49, !noalias !52, !noundef !7 %31 = icmp ne i8 %30, %27 %32 = add nuw nsw i64 %.05.i.i.i.i.i.i, 1 %exitcond.not.i.i.i.i.i.i = icmp ne i64 %32, %.sroa.4.0.i.i.i.i.i %or.cond.not.i.i.i.i.i = select i1 %31, i1 %exitcond.not.i.i.i.i.i.i, i1 false - br i1 %or.cond.not.i.i.i.i.i, label %28, label %"_ZN12grep_printer4util17trim_ascii_prefix28_$u7b$$u7b$closure$u7d$$u7d$17h34ac8f4e4c1fdcdfE.exit.i.i.i.i" + br i1 %or.cond.not.i.i.i.i.i, label %.preheader, label %"_ZN12grep_printer4util17trim_ascii_prefix28_$u7b$$u7b$closure$u7d$$u7d$17h34ac8f4e4c1fdcdfE.exit.i.i.i.i" -"_ZN12grep_printer4util17trim_ascii_prefix28_$u7b$$u7b$closure$u7d$$u7d$17h34ac8f4e4c1fdcdfE.exit.i.i.i.i": ; preds = %28 +"_ZN12grep_printer4util17trim_ascii_prefix28_$u7b$$u7b$closure$u7d$$u7d$17h34ac8f4e4c1fdcdfE.exit.i.i.i.i": ; preds = %.preheader br i1 %31, label %"_ZN115_$LT$core..iter..adapters..take_while..TakeWhile$LT$I$C$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8try_fold5check28_$u7b$$u7b$closure$u7d$$u7d$17hacad82c71a0e839fE.exit.i.i.i", label %"_ZN115_$LT$core..iter..adapters..take_while..TakeWhile$LT$I$C$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hed27b64ba4a73510E.exit" "_ZN115_$LT$core..iter..adapters..take_while..TakeWhile$LT$I$C$P$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8try_fold5check28_$u7b$$u7b$closure$u7d$$u7d$17hacad82c71a0e839fE.exit.i.i.i": ; preds = %"_ZN12grep_printer4util17trim_ascii_prefix28_$u7b$$u7b$closure$u7d$$u7d$17h34ac8f4e4c1fdcdfE.exit.i.i.i.i" diff --git a/bench/ripgrep-rs/optimized/1en8ulv4lf1lnd4m.ll b/bench/ripgrep-rs/optimized/1en8ulv4lf1lnd4m.ll index 84f270be8b3..73043ccd3c9 100644 --- a/bench/ripgrep-rs/optimized/1en8ulv4lf1lnd4m.ll +++ b/bench/ripgrep-rs/optimized/1en8ulv4lf1lnd4m.ll @@ -939,13 +939,9 @@ switch.lookup: ; preds = %2 %switch.shiftamt = zext nneg i8 %14 to i48 %switch.downshift = lshr i48 65536, %switch.shiftamt %switch.masked = trunc i48 %switch.downshift to i8 - %15 = shl nuw nsw i8 %13, 3 - %switch.shiftamt7 = zext nneg i8 %15 to i48 - %switch.downshift8 = lshr i48 4294967296, %switch.shiftamt7 + %switch.downshift8 = lshr i48 4294967296, %switch.shiftamt %switch.masked9 = trunc i48 %switch.downshift8 to i8 - %16 = shl nuw nsw i8 %13, 3 - %switch.shiftamt11 = zext nneg i8 %16 to i48 - %switch.downshift12 = lshr i48 1, %switch.shiftamt11 + %switch.downshift12 = lshr i48 1, %switch.shiftamt %switch.masked13 = trunc nuw nsw i48 %switch.downshift12 to i8 br label %_ZN12grep_printer5color9SpecValue10merge_into17h1295fde2aeb3836aE.exit diff --git a/bench/rocksdb/optimized/blob_compaction_filter.ll b/bench/rocksdb/optimized/blob_compaction_filter.ll index bc8d210ce27..2779b1589a3 100644 --- a/bench/rocksdb/optimized/blob_compaction_filter.ll +++ b/bench/rocksdb/optimized/blob_compaction_filter.ll @@ -2172,8 +2172,9 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit46: ; preds = %_ZN %103 = getelementptr inbounds nuw i8, ptr %102, i64 %14 %104 = getelementptr inbounds i8, ptr %103, i64 -8 %.0.copyload.i = load i64, ptr %104, align 1 - %105 = trunc i64 %.0.copyload.i to i8 - %106 = lshr i64 %.0.copyload.i, 8 + %.0.copyload.i.fr = freeze i64 %.0.copyload.i + %105 = trunc i64 %.0.copyload.i.fr to i8 + %106 = lshr i64 %.0.copyload.i.fr, 8 %107 = getelementptr inbounds nuw i8, ptr %2, i64 16 store i64 %106, ptr %107, align 8, !tbaa !126 %108 = getelementptr inbounds nuw i8, ptr %2, i64 24 @@ -2182,26 +2183,28 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit46: ; preds = %_ZN store ptr %102, ptr %2, align 8, !tbaa !89 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %2, i64 8 store i64 %109, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !111 - switch i8 %105, label %111 [ - i8 22, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 20, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 17, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 7, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 2, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 1, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 0, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 24, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 26, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread - i8 15, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread + %110 = icmp ult i8 %105, 25 + %111 = trunc i64 %.0.copyload.i.fr to i25 + %switch.cast.i.i = and i25 %111, 255 + %switch.downshift.i.i = lshr i25 -11403129, %switch.cast.i.i + %switch.downshift.i.i.fr = freeze i25 %switch.downshift.i.i + %switch.masked.i.i = trunc i25 %switch.downshift.i.i.fr to i1 + %112 = and i1 %110, %switch.masked.i.i + br i1 %112, label %_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread, label %switch.early.test + +switch.early.test:; preds = %101 + switch i8 %105, label %115 [ + i8 26, label %113 + i8 15, label %113 ] -_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread: ; preds = %101, %101, %101, %101, %101, %101, %101, %101, %101, %101 +_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE.exit.thread: ; preds = %switch.early.test, %switch.early.test, %101 %110 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr null, ptr %110, align 8, !tbaa !55, !alias.scope !321 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %0, i8 0, i64 6, i1 false), !alias.scope !321 br label %133 -111: ; preds = %101 +111: ; preds = %switch.early.test call void @llvm.lifetime.start.p0(ptr nonnull %10) store ptr @.str.58, ptr %10, align 8, !tbaa !110 %112 = getelementptr inbounds nuw i8, ptr %10, i64 8 diff --git a/bench/rocksdb/optimized/block_based_table_factory.ll b/bench/rocksdb/optimized/block_based_table_factory.ll index 11f2e702d01..729608200cd 100644 --- a/bench/rocksdb/optimized/block_based_table_factory.ll +++ b/bench/rocksdb/optimized/block_based_table_factory.ll @@ -17024,9 +17024,12 @@ define void @_ZN7rocksdb22BlockBasedTableFactory11ParseOptionERKNS_13ConfigOptio 13: ; preds = %7 %14 = getelementptr inbounds nuw i8, ptr %3, i64 172 %15 = load i32, ptr %14, align 4, !tbaa !415 - %.off.i = add i32 %15, -1 - %switch.i = icmp ult i32 %.off.i, 3 - br i1 %switch.i, label %16, label %_ZN7rocksdb6StatusD2Ev.exit + %16 = icmp ult i32 %15, 4 + %switch.cast.i = trunc i32 %15 to i4 + %switch.downshift.i = lshr i4 -2, %switch.cast.i + %switch.masked.i = trunc i4 %switch.downshift.i to i1 + %17 = select i1 %16, i1 %switch.masked.i, i1 false + br i1 %17, label %18, label %_ZN7rocksdb6StatusD2Ev.exit 16: ; preds = %13 %17 = getelementptr inbounds nuw i8, ptr %0, i64 8 diff --git a/bench/ruby/optimized/date_core.ll b/bench/ruby/optimized/date_core.ll index 4ee436cc6ea..8d9676640aa 100644 --- a/bench/ruby/optimized/date_core.ll +++ b/bench/ruby/optimized/date_core.ll @@ -7705,17 +7705,15 @@ rbimpl_RB_TYPE_P_fastpath.exit.thread.i: ; preds = %rbimpl_RB_TYPE_P_fa 729: ; preds = %724 %730 = tail call i64 @llvm.fshl.i64(i64 %.1228, i64 %.1228, i64 62) - switch i64 %730, label %731 [ - i64 0, label %f_negative_p.exit493 - i64 1, label %f_negative_p.exit493 - i64 5, label %f_negative_p.exit493 - i64 9, label %f_negative_p.exit493 - ] - -731: ; preds = %729 + %731 = icmp ult i64 %730, 10 + %switch.maskindex.i = trunc i64 %730 to i16 + %switch.shifted.i = lshr i16 547, %switch.maskindex.i + %switch.lobit.i = trunc i16 %switch.shifted.i to i1 + %or.cond.i = select i1 %731, i1 %switch.lobit.i, i1 false %732 = and i64 %.1228, 254 %733 = icmp eq i64 %732, 12 - br i1 %733, label %f_negative_p.exit493, label %rb_type.exit.thread9.i + %or.cond756 = or i1 %733, %or.cond.i + br i1 %or.cond756, label %f_negative_p.exit493, label %rb_type.exit.thread9.i rb_type.exit.i489: ; preds = %724 %734 = inttoptr i64 %.1228 to ptr @@ -7728,7 +7726,7 @@ rb_type.exit.i489: ; preds = %724 i32 15, label %741 ] -rb_type.exit.thread9.i: ; preds = %rb_type.exit.i489, %731 +rb_type.exit.thread9.i: ; preds = %729, %rb_type.exit.i489 %738 = tail call double @rb_float_value(i64 noundef %.1228) #24 %739 = tail call double @llvm.round.f64(double %738) %740 = fcmp oeq double %739, %738 @@ -7739,7 +7737,7 @@ rb_type.exit.thread9.i: ; preds = %rb_type.exit.i489, %or.cond855 = icmp eq i64 %742, 3 br i1 %or.cond855, label %wholenum_p.exit.thread701, label %f_negative_p.exit493 -f_negative_p.exit493: ; preds = %rb_type.exit.thread9.i, %729, %729, %729, %729, %731, %rb_type.exit.i489, %741 +f_negative_p.exit493: ; preds = %rb_type.exit.thread9.i, %rb_type.exit.i489, %729, %741 %743 = tail call i64 (i64, i64, i32, ...) @rb_funcall(i64 noundef %.1228, i64 noundef 60, i32 noundef 1, i64 noundef 1) #21 %.not315.not = icmp eq i64 %743, 0 br i1 %.not315.not, label %747, label %744 @@ -19927,17 +19925,15 @@ define internal fastcc i64 @d_trunc(i64 noundef %0, ptr noundef nonnull writeonl 9: ; preds = %4 %10 = tail call i64 @llvm.fshl.i64(i64 %0, i64 %0, i64 62) - switch i64 %10, label %11 [ - i64 0, label %wholenum_p.exit.thread - i64 1, label %wholenum_p.exit.thread - i64 5, label %wholenum_p.exit.thread - i64 9, label %wholenum_p.exit.thread - ] - -11: ; preds = %9 + %11 = icmp ult i64 %10, 10 + %switch.maskindex.i = trunc i64 %10 to i16 + %switch.shifted.i = lshr i16 547, %switch.maskindex.i + %switch.lobit.i = trunc i16 %switch.shifted.i to i1 + %or.cond.i = select i1 %11, i1 %switch.lobit.i, i1 false %12 = and i64 %0, 254 %13 = icmp eq i64 %12, 12 - br i1 %13, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i + %or.cond = or i1 %13, %or.cond.i + br i1 %or.cond, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i rb_type.exit.i: ; preds = %4 %14 = inttoptr i64 %0 to ptr @@ -19950,7 +19946,7 @@ rb_type.exit.i: ; preds = %4 i32 15, label %21 ] -rb_type.exit.thread9.i: ; preds = %rb_type.exit.i, %11 +rb_type.exit.thread9.i: ; preds = %9, %rb_type.exit.i %18 = tail call double @rb_float_value(i64 noundef %0) #24 %19 = tail call double @llvm.round.f64(double %18) %20 = fcmp oeq double %19, %18 @@ -19987,7 +19983,7 @@ rbimpl_intern_const.exit.i: ; preds = %.lr.ph.i.i, %rb_int %28 = tail call i64 (i64, i64, i32, ...) @rb_funcall(i64 noundef %0, i64 noundef %.lcssa.i.i, i32 noundef 0) #21 br label %to_integer.exit -wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %9, %9, %9, %9, %11, %rb_type.exit.i, %21 +wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %rb_type.exit.i, %9, %21 %.pr.i = load i64, ptr @d_trunc.rbimpl_id, align 8, !tbaa !6 %.not4.i = icmp eq i64 %.pr.i, 0 br i1 %.not4.i, label %.lr.ph.i, label %rbimpl_intern_const.exit @@ -28551,17 +28547,15 @@ define internal fastcc i64 @s_trunc(i64 noundef %0, ptr noundef nonnull writeonl 9: ; preds = %4 %10 = tail call i64 @llvm.fshl.i64(i64 %0, i64 %0, i64 62) - switch i64 %10, label %11 [ - i64 0, label %wholenum_p.exit.thread - i64 1, label %wholenum_p.exit.thread - i64 5, label %wholenum_p.exit.thread - i64 9, label %wholenum_p.exit.thread - ] - -11: ; preds = %9 + %11 = icmp ult i64 %10, 10 + %switch.maskindex.i = trunc i64 %10 to i16 + %switch.shifted.i = lshr i16 547, %switch.maskindex.i + %switch.lobit.i = trunc i16 %switch.shifted.i to i1 + %or.cond.i = select i1 %11, i1 %switch.lobit.i, i1 false %12 = and i64 %0, 254 %13 = icmp eq i64 %12, 12 - br i1 %13, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i + %or.cond = or i1 %13, %or.cond.i + br i1 %or.cond, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i rb_type.exit.i: ; preds = %4 %14 = inttoptr i64 %0 to ptr @@ -28574,7 +28568,7 @@ rb_type.exit.i: ; preds = %4 i32 15, label %21 ] -rb_type.exit.thread9.i: ; preds = %rb_type.exit.i, %11 +rb_type.exit.thread9.i: ; preds = %9, %rb_type.exit.i %18 = tail call double @rb_float_value(i64 noundef %0) #24 %19 = tail call double @llvm.round.f64(double %18) %20 = fcmp oeq double %19, %18 @@ -28611,7 +28605,7 @@ rbimpl_intern_const.exit.i: ; preds = %.lr.ph.i.i, %rb_int %28 = tail call i64 (i64, i64, i32, ...) @rb_funcall(i64 noundef %0, i64 noundef %.lcssa.i.i, i32 noundef 0) #21 br label %to_integer.exit -wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %9, %9, %9, %9, %11, %rb_type.exit.i, %21 +wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %rb_type.exit.i, %9, %21 %.pr.i = load i64, ptr @s_trunc.rbimpl_id, align 8, !tbaa !6 %.not4.i = icmp eq i64 %.pr.i, 0 br i1 %.not4.i, label %.lr.ph.i, label %rbimpl_intern_const.exit @@ -28664,17 +28658,15 @@ define internal fastcc i64 @min_trunc(i64 noundef %0, ptr noundef nonnull writeo 9: ; preds = %4 %10 = tail call i64 @llvm.fshl.i64(i64 %0, i64 %0, i64 62) - switch i64 %10, label %11 [ - i64 0, label %wholenum_p.exit.thread - i64 1, label %wholenum_p.exit.thread - i64 5, label %wholenum_p.exit.thread - i64 9, label %wholenum_p.exit.thread - ] - -11: ; preds = %9 + %11 = icmp ult i64 %10, 10 + %switch.maskindex.i = trunc i64 %10 to i16 + %switch.shifted.i = lshr i16 547, %switch.maskindex.i + %switch.lobit.i = trunc i16 %switch.shifted.i to i1 + %or.cond.i = select i1 %11, i1 %switch.lobit.i, i1 false %12 = and i64 %0, 254 %13 = icmp eq i64 %12, 12 - br i1 %13, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i + %or.cond = or i1 %13, %or.cond.i + br i1 %or.cond, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i rb_type.exit.i: ; preds = %4 %14 = inttoptr i64 %0 to ptr @@ -28687,7 +28679,7 @@ rb_type.exit.i: ; preds = %4 i32 15, label %21 ] -rb_type.exit.thread9.i: ; preds = %rb_type.exit.i, %11 +rb_type.exit.thread9.i: ; preds = %9, %rb_type.exit.i %18 = tail call double @rb_float_value(i64 noundef %0) #24 %19 = tail call double @llvm.round.f64(double %18) %20 = fcmp oeq double %19, %18 @@ -28724,7 +28716,7 @@ rbimpl_intern_const.exit.i: ; preds = %.lr.ph.i.i, %rb_int %28 = tail call i64 (i64, i64, i32, ...) @rb_funcall(i64 noundef %0, i64 noundef %.lcssa.i.i, i32 noundef 0) #21 br label %to_integer.exit -wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %9, %9, %9, %9, %11, %rb_type.exit.i, %21 +wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %rb_type.exit.i, %9, %21 %.pr.i = load i64, ptr @min_trunc.rbimpl_id, align 8, !tbaa !6 %.not4.i = icmp eq i64 %.pr.i, 0 br i1 %.not4.i, label %.lr.ph.i, label %rbimpl_intern_const.exit @@ -28777,17 +28769,15 @@ define internal fastcc i64 @h_trunc(i64 noundef %0, ptr noundef nonnull writeonl 9: ; preds = %4 %10 = tail call i64 @llvm.fshl.i64(i64 %0, i64 %0, i64 62) - switch i64 %10, label %11 [ - i64 0, label %wholenum_p.exit.thread - i64 1, label %wholenum_p.exit.thread - i64 5, label %wholenum_p.exit.thread - i64 9, label %wholenum_p.exit.thread - ] - -11: ; preds = %9 + %11 = icmp ult i64 %10, 10 + %switch.maskindex.i = trunc i64 %10 to i16 + %switch.shifted.i = lshr i16 547, %switch.maskindex.i + %switch.lobit.i = trunc i16 %switch.shifted.i to i1 + %or.cond.i = select i1 %11, i1 %switch.lobit.i, i1 false %12 = and i64 %0, 254 %13 = icmp eq i64 %12, 12 - br i1 %13, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i + %or.cond = or i1 %13, %or.cond.i + br i1 %or.cond, label %wholenum_p.exit.thread, label %rb_type.exit.thread9.i rb_type.exit.i: ; preds = %4 %14 = inttoptr i64 %0 to ptr @@ -28800,7 +28790,7 @@ rb_type.exit.i: ; preds = %4 i32 15, label %21 ] -rb_type.exit.thread9.i: ; preds = %rb_type.exit.i, %11 +rb_type.exit.thread9.i: ; preds = %9, %rb_type.exit.i %18 = tail call double @rb_float_value(i64 noundef %0) #24 %19 = tail call double @llvm.round.f64(double %18) %20 = fcmp oeq double %19, %18 @@ -28837,7 +28827,7 @@ rbimpl_intern_const.exit.i: ; preds = %.lr.ph.i.i, %rb_int %28 = tail call i64 (i64, i64, i32, ...) @rb_funcall(i64 noundef %0, i64 noundef %.lcssa.i.i, i32 noundef 0) #21 br label %to_integer.exit -wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %9, %9, %9, %9, %11, %rb_type.exit.i, %21 +wholenum_p.exit.thread: ; preds = %rb_type.exit.thread9.i, %rb_type.exit.i, %9, %21 %.pr.i = load i64, ptr @h_trunc.rbimpl_id, align 8, !tbaa !6 %.not4.i = icmp eq i64 %.pr.i, 0 br i1 %.not4.i, label %.lr.ph.i, label %rbimpl_intern_const.exit diff --git a/bench/ruff-rs/optimized/1t5d2y321zgutphrasyamrpjz.ll b/bench/ruff-rs/optimized/1t5d2y321zgutphrasyamrpjz.ll index a84f4c15c35..b87fb548ce7 100644 --- a/bench/ruff-rs/optimized/1t5d2y321zgutphrasyamrpjz.ll +++ b/bench/ruff-rs/optimized/1t5d2y321zgutphrasyamrpjz.ll @@ -23431,8 +23431,12 @@ _ZN18ty_python_semantic14semantic_index6symbol9ScopeKind16is_function_like17h5cd %5 = tail call noundef i32 @"_ZN18ty_python_semantic14semantic_index6symbol1_69_$LT$impl$u20$ty_python_semantic..semantic_index..symbol..ScopeId$GT$13file_scope_id17hb16cae4ee98251a2E"(i32 noundef range(i32 1, 0) %0, ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull readonly align 8 dereferenceable(224) %2) %6 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN18ty_python_semantic14semantic_index13SemanticIndex5scope17h1ea39288196506d8E(ptr noalias noundef nonnull readonly align 8 dereferenceable(408) %4, i32 noundef %5, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.4370228678aea563ecef3852b2bac777.176) %7 = load i64, ptr %6, align 8, !range !427, !alias.scope !4409, !noundef !3 - %switch = icmp samesign ugt i64 %7, 1 - ret i1 %switch + %switch.gep = getelementptr inbounds nuw i8, ptr @switch.table._ZN18ty_python_semantic14semantic_index6symbol17NodeWithScopeKind10scope_kind17h5845327dd849c42dE, i64 %7 + %switch.load = load i8, ptr %switch.gep, align 1 + %switch.cast.i = trunc nuw nsw i8 %switch.load to i7 + %switch.downshift.i = lshr i7 -6, %switch.cast.i + %switch.masked.i = trunc i7 %switch.downshift.i to i1 + ret i1 %switch.masked.i } ; Function Attrs: nonlazybind uwtable @@ -23443,7 +23447,7 @@ switch.lookup: %5 = tail call noundef i32 @"_ZN18ty_python_semantic14semantic_index6symbol1_69_$LT$impl$u20$ty_python_semantic..semantic_index..symbol..ScopeId$GT$13file_scope_id17hb16cae4ee98251a2E"(i32 noundef range(i32 1, 0) %0, ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull readonly align 8 dereferenceable(224) %2) %6 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN18ty_python_semantic14semantic_index13SemanticIndex5scope17h1ea39288196506d8E(ptr noalias noundef nonnull readonly align 8 dereferenceable(408) %4, i32 noundef %5, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.4370228678aea563ecef3852b2bac777.176) %7 = load i64, ptr %6, align 8, !range !427, !alias.scope !4412, !noundef !3 - %switch.cast = trunc nuw i64 %7 to i12 + %switch.cast = trunc nuw nsw i64 %7 to i12 %switch.downshift = lshr i12 116, %switch.cast %switch.masked = trunc i12 %switch.downshift to i1 ret i1 %switch.masked @@ -23628,9 +23632,12 @@ define hidden void @_ZN18ty_python_semantic14semantic_index6symbol5Scope18extend define hidden noundef zeroext i1 @_ZN18ty_python_semantic14semantic_index6symbol5Scope8is_eager17hc473d8030b65f607E(ptr noalias noundef readonly align 8 captures(none) dereferenceable(40) %0) unnamed_addr #5 { _ZN18ty_python_semantic14semantic_index6symbol9ScopeKind8is_eager17ha9464981e69f36e7E.exit: %1 = load i64, ptr %0, align 8, !range !427, !alias.scope !4437, !noundef !3 - %2 = add nsw i64 %1, -8 - %switch = icmp ult i64 %2, -6 - ret i1 %switch + %switch.gep = getelementptr inbounds nuw i8, ptr @switch.table._ZN18ty_python_semantic14semantic_index6symbol17NodeWithScopeKind10scope_kind17h5845327dd849c42dE, i64 %1 + %switch.load = load i8, ptr %switch.gep, align 1 + %switch.cast.i = trunc nuw nsw i8 %switch.load to i7 + %switch.downshift.i = lshr i7 37, %switch.cast.i + %switch.masked.i = trunc i7 %switch.downshift.i to i1 + ret i1 %switch.masked.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable @@ -28949,8 +28956,8 @@ define hidden noundef range(i8 -1, 2) i8 @_ZN18ty_python_semantic5types13type_or %15 = icmp eq i8 %14, 1 br i1 %15, label %"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit", label %16 -"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit": ; preds = %606, %621, %switch.lookup, %316, %315, %313, %311, %308, %319, %304, %293, %274, %307, %297, %303, %296, %286, %292, %272, %268, %299, %536, %514, %420, %326, %225, %209, %176, %166, %156, %146, %136, %126, %116, %106, %94, %80, %70, %60, %50, %40, %30, %21, %546, %254, %235, %562, %561, %559, %558, %556, %554, %548, %.sink.split.i193, %515, %.sink.split.i182, %210, %205, %204, %202, %201, %199, %197, %195, %.sink.split.i, %187, %.thread234, %544, %543, %534, %533, %325, %525, %512, %511, %509, %507, %505, %503, %501, %499, %497, %495, %493, %491, %489, %487, %485, %483, %481, %479, %477, %475, %473, %471, %469, %467, %465, %463, %461, %459, %457, %455, %453, %451, %449, %447, %445, %443, %431, %439, %440, %430, %418, %426, %427, %417, %415, %413, %411, %409, %407, %405, %403, %401, %399, %397, %395, %393, %391, %389, %387, %385, %383, %381, %379, %377, %375, %373, %371, %369, %367, %365, %363, %361, %359, %357, %355, %353, %351, %349, %347, %345, %343, %341, %339, %333, %327, %252, %251, %249, %247, %245, %243, %233, %232, %223, %222, %207, %206, %174, %185, %186, %173, %164, %163, %154, %153, %144, %143, %134, %133, %124, %123, %114, %113, %104, %103, %92, %91, %78, %77, %68, %67, %58, %57, %48, %47, %38, %37, %28, %27, %19, %18, %16, %13, %10, %4, %590, %601, %441, %428, %"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit188", %323, %537, %526, %237, %226, %167, %157, %147, %137, %127, %117, %107, %95, %81, %71, %61, %51, %41, %31 - %.sroa.0.0 = phi i8 [ %591, %590 ], [ %602, %601 ], [ %542, %537 ], [ %532, %526 ], [ %442, %441 ], [ %429, %428 ], [ %324, %323 ], [ %.sroa.0.1, %"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit188" ], [ %242, %237 ], [ %231, %226 ], [ %172, %167 ], [ %162, %157 ], [ %152, %147 ], [ %142, %137 ], [ %132, %127 ], [ %122, %117 ], [ %112, %107 ], [ %102, %95 ], [ %.sroa.0.0.i, %81 ], [ %76, %71 ], [ %66, %61 ], [ %56, %51 ], [ %46, %41 ], [ %36, %31 ], [ 0, %4 ], [ -1, %10 ], [ 1, %13 ], [ -1, %16 ], [ 1, %18 ], [ -1, %19 ], [ 1, %27 ], [ -1, %28 ], [ 1, %37 ], [ -1, %38 ], [ 1, %47 ], [ -1, %48 ], [ 1, %57 ], [ -1, %58 ], [ 1, %67 ], [ -1, %68 ], [ 1, %77 ], [ -1, %78 ], [ 1, %91 ], [ -1, %92 ], [ 1, %103 ], [ -1, %104 ], [ 1, %113 ], [ -1, %114 ], [ 1, %123 ], [ -1, %124 ], [ 1, %133 ], [ -1, %134 ], [ 1, %143 ], [ -1, %144 ], [ 1, %153 ], [ -1, %154 ], [ 1, %163 ], [ -1, %164 ], [ 1, %173 ], [ -1, %186 ], [ 1, %185 ], [ -1, %174 ], [ 1, %206 ], [ -1, %207 ], [ 1, %222 ], [ -1, %223 ], [ 1, %232 ], [ -1, %233 ], [ 1, %243 ], [ -1, %245 ], [ 1, %247 ], [ -1, %249 ], [ 1, %251 ], [ -1, %252 ], [ -1, %327 ], [ 1, %333 ], [ -1, %339 ], [ 1, %341 ], [ -1, %343 ], [ 1, %345 ], [ -1, %347 ], [ 1, %349 ], [ -1, %351 ], [ 1, %353 ], [ -1, %355 ], [ 1, %357 ], [ -1, %359 ], [ 1, %361 ], [ -1, %363 ], [ 1, %365 ], [ -1, %367 ], [ 1, %369 ], [ -1, %371 ], [ 1, %373 ], [ -1, %375 ], [ 1, %377 ], [ -1, %379 ], [ 1, %381 ], [ -1, %383 ], [ 1, %385 ], [ -1, %387 ], [ 1, %389 ], [ -1, %391 ], [ 1, %393 ], [ -1, %395 ], [ 1, %397 ], [ -1, %399 ], [ 1, %401 ], [ -1, %403 ], [ 1, %405 ], [ -1, %407 ], [ 1, %409 ], [ -1, %411 ], [ 1, %413 ], [ -1, %415 ], [ 1, %417 ], [ %.146, %427 ], [ 1, %426 ], [ -1, %418 ], [ 1, %430 ], [ %.147, %440 ], [ 1, %439 ], [ -1, %431 ], [ 1, %443 ], [ -1, %445 ], [ 1, %447 ], [ -1, %449 ], [ 1, %451 ], [ -1, %453 ], [ 1, %455 ], [ -1, %457 ], [ 1, %459 ], [ -1, %461 ], [ 1, %463 ], [ -1, %465 ], [ 1, %467 ], [ -1, %469 ], [ 1, %471 ], [ -1, %473 ], [ 1, %475 ], [ -1, %477 ], [ 1, %479 ], [ -1, %481 ], [ 1, %483 ], [ -1, %485 ], [ 1, %487 ], [ -1, %489 ], [ 1, %491 ], [ -1, %493 ], [ 1, %495 ], [ -1, %497 ], [ 1, %499 ], [ -1, %501 ], [ 1, %503 ], [ -1, %505 ], [ 1, %507 ], [ -1, %509 ], [ 1, %511 ], [ -1, %512 ], [ 1, %525 ], [ -1, %325 ], [ 1, %533 ], [ -1, %534 ], [ 1, %543 ], [ -1, %544 ], [ 1, %.thread234 ], [ %190, %187 ], [ %193, %.sink.split.i ], [ -1, %205 ], [ -1, %195 ], [ 1, %197 ], [ -1, %199 ], [ %.sroa.4.4.extract.trunc, %201 ], [ 0, %204 ], [ 1, %202 ], [ %215, %210 ], [ %220, %.sink.split.i182 ], [ %518, %515 ], [ %523, %.sink.split.i193 ], [ -1, %562 ], [ -1, %548 ], [ 1, %554 ], [ -1, %556 ], [ %552, %558 ], [ 0, %561 ], [ 1, %559 ], [ 1, %235 ], [ 1, %254 ], [ 1, %546 ], [ 1, %21 ], [ 1, %30 ], [ 1, %40 ], [ 1, %50 ], [ 1, %60 ], [ 1, %70 ], [ 1, %80 ], [ 1, %94 ], [ 1, %106 ], [ 1, %116 ], [ 1, %126 ], [ 1, %136 ], [ 1, %146 ], [ 1, %156 ], [ 1, %166 ], [ 1, %176 ], [ 1, %209 ], [ 1, %225 ], [ 1, %326 ], [ 1, %420 ], [ 1, %514 ], [ 1, %536 ], [ %277, %274 ], [ 1, %307 ], [ -1, %297 ], [ 1, %303 ], [ 1, %296 ], [ -1, %286 ], [ 1, %292 ], [ 1, %272 ], [ -1, %268 ], [ -1, %293 ], [ -1, %304 ], [ 1, %299 ], [ 1, %316 ], [ %.sroa.458.4.extract.trunc, %315 ], [ -1, %313 ], [ 1, %311 ], [ -1, %308 ], [ -1, %319 ], [ %26, %switch.lookup ], [ %624, %621 ], [ %609, %606 ] +"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit": ; preds = %606, %621, %316, %315, %313, %311, %308, %319, %304, %293, %274, %307, %297, %303, %296, %286, %292, %272, %268, %299, %536, %514, %420, %326, %225, %209, %176, %166, %156, %146, %136, %126, %116, %106, %94, %80, %70, %60, %50, %40, %30, %21, %546, %254, %235, %562, %561, %559, %558, %556, %554, %548, %.sink.split.i193, %515, %.sink.split.i182, %210, %205, %204, %202, %201, %199, %197, %195, %.sink.split.i, %187, %.thread234, %544, %543, %534, %533, %325, %525, %512, %511, %509, %507, %505, %503, %501, %499, %497, %495, %493, %491, %489, %487, %485, %483, %481, %479, %477, %475, %473, %471, %469, %467, %465, %463, %461, %459, %457, %455, %453, %451, %449, %447, %445, %443, %431, %439, %440, %430, %418, %426, %427, %417, %415, %413, %411, %409, %407, %405, %403, %401, %399, %397, %395, %393, %391, %389, %387, %385, %383, %381, %379, %377, %375, %373, %371, %369, %367, %365, %363, %361, %359, %357, %355, %353, %351, %349, %347, %345, %343, %341, %339, %333, %327, %252, %251, %249, %247, %245, %243, %233, %232, %223, %222, %207, %206, %174, %185, %186, %173, %164, %163, %154, %153, %144, %143, %134, %133, %124, %123, %114, %113, %104, %103, %92, %91, %78, %77, %68, %67, %58, %57, %48, %47, %38, %37, %28, %27, %19, %switch.lookup, %18, %16, %13, %10, %4, %590, %601, %441, %428, %"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit188", %323, %537, %526, %237, %226, %167, %157, %147, %137, %127, %117, %107, %95, %81, %71, %61, %51, %41, %31 + %.sroa.0.0 = phi i8 [ %591, %590 ], [ %602, %601 ], [ %542, %537 ], [ %532, %526 ], [ %442, %441 ], [ %429, %428 ], [ %324, %323 ], [ %.sroa.0.1, %"_ZN78_$LT$ty_python_semantic..types..class..ClassType$u20$as$u20$core..cmp..Ord$GT$3cmp17hc67458b254fe7c69E.exit188" ], [ %242, %237 ], [ %231, %226 ], [ %172, %167 ], [ %162, %157 ], [ %152, %147 ], [ %142, %137 ], [ %132, %127 ], [ %122, %117 ], [ %112, %107 ], [ %102, %95 ], [ %.sroa.0.0.i, %81 ], [ %76, %71 ], [ %66, %61 ], [ %56, %51 ], [ %46, %41 ], [ %36, %31 ], [ 0, %4 ], [ -1, %10 ], [ 1, %13 ], [ -1, %16 ], [ 1, %18 ], [ %26, %switch.lookup ], [ -1, %19 ], [ 1, %27 ], [ -1, %28 ], [ 1, %37 ], [ -1, %38 ], [ 1, %47 ], [ -1, %48 ], [ 1, %57 ], [ -1, %58 ], [ 1, %67 ], [ -1, %68 ], [ 1, %77 ], [ -1, %78 ], [ 1, %91 ], [ -1, %92 ], [ 1, %103 ], [ -1, %104 ], [ 1, %113 ], [ -1, %114 ], [ 1, %123 ], [ -1, %124 ], [ 1, %133 ], [ -1, %134 ], [ 1, %143 ], [ -1, %144 ], [ 1, %153 ], [ -1, %154 ], [ 1, %163 ], [ -1, %164 ], [ 1, %173 ], [ -1, %186 ], [ 1, %185 ], [ -1, %174 ], [ 1, %206 ], [ -1, %207 ], [ 1, %222 ], [ -1, %223 ], [ 1, %232 ], [ -1, %233 ], [ 1, %243 ], [ -1, %245 ], [ 1, %247 ], [ -1, %249 ], [ 1, %251 ], [ -1, %252 ], [ -1, %327 ], [ 1, %333 ], [ -1, %339 ], [ 1, %341 ], [ -1, %343 ], [ 1, %345 ], [ -1, %347 ], [ 1, %349 ], [ -1, %351 ], [ 1, %353 ], [ -1, %355 ], [ 1, %357 ], [ -1, %359 ], [ 1, %361 ], [ -1, %363 ], [ 1, %365 ], [ -1, %367 ], [ 1, %369 ], [ -1, %371 ], [ 1, %373 ], [ -1, %375 ], [ 1, %377 ], [ -1, %379 ], [ 1, %381 ], [ -1, %383 ], [ 1, %385 ], [ -1, %387 ], [ 1, %389 ], [ -1, %391 ], [ 1, %393 ], [ -1, %395 ], [ 1, %397 ], [ -1, %399 ], [ 1, %401 ], [ -1, %403 ], [ 1, %405 ], [ -1, %407 ], [ 1, %409 ], [ -1, %411 ], [ 1, %413 ], [ -1, %415 ], [ 1, %417 ], [ %.146, %427 ], [ 1, %426 ], [ -1, %418 ], [ 1, %430 ], [ %.147, %440 ], [ 1, %439 ], [ -1, %431 ], [ 1, %443 ], [ -1, %445 ], [ 1, %447 ], [ -1, %449 ], [ 1, %451 ], [ -1, %453 ], [ 1, %455 ], [ -1, %457 ], [ 1, %459 ], [ -1, %461 ], [ 1, %463 ], [ -1, %465 ], [ 1, %467 ], [ -1, %469 ], [ 1, %471 ], [ -1, %473 ], [ 1, %475 ], [ -1, %477 ], [ 1, %479 ], [ -1, %481 ], [ 1, %483 ], [ -1, %485 ], [ 1, %487 ], [ -1, %489 ], [ 1, %491 ], [ -1, %493 ], [ 1, %495 ], [ -1, %497 ], [ 1, %499 ], [ -1, %501 ], [ 1, %503 ], [ -1, %505 ], [ 1, %507 ], [ -1, %509 ], [ 1, %511 ], [ -1, %512 ], [ 1, %525 ], [ -1, %325 ], [ 1, %533 ], [ -1, %534 ], [ 1, %543 ], [ -1, %544 ], [ 1, %.thread234 ], [ %190, %187 ], [ %193, %.sink.split.i ], [ -1, %205 ], [ -1, %195 ], [ 1, %197 ], [ -1, %199 ], [ %.sroa.4.4.extract.trunc, %201 ], [ 0, %204 ], [ 1, %202 ], [ %215, %210 ], [ %220, %.sink.split.i182 ], [ %518, %515 ], [ %523, %.sink.split.i193 ], [ -1, %562 ], [ -1, %548 ], [ 1, %554 ], [ -1, %556 ], [ %552, %558 ], [ 0, %561 ], [ 1, %559 ], [ 1, %235 ], [ 1, %254 ], [ 1, %546 ], [ 1, %21 ], [ 1, %30 ], [ 1, %40 ], [ 1, %50 ], [ 1, %60 ], [ 1, %70 ], [ 1, %80 ], [ 1, %94 ], [ 1, %106 ], [ 1, %116 ], [ 1, %126 ], [ 1, %136 ], [ 1, %146 ], [ 1, %156 ], [ 1, %166 ], [ 1, %176 ], [ 1, %209 ], [ 1, %225 ], [ 1, %326 ], [ 1, %420 ], [ 1, %514 ], [ 1, %536 ], [ %277, %274 ], [ 1, %307 ], [ -1, %297 ], [ 1, %303 ], [ 1, %296 ], [ -1, %286 ], [ 1, %292 ], [ 1, %272 ], [ -1, %268 ], [ -1, %293 ], [ -1, %304 ], [ 1, %299 ], [ 1, %316 ], [ %.sroa.458.4.extract.trunc, %315 ], [ -1, %313 ], [ 1, %311 ], [ -1, %308 ], [ -1, %319 ], [ %624, %621 ], [ %609, %606 ] ret i8 %.sroa.0.0 16: ; preds = %13 diff --git a/bench/ruff-rs/optimized/2wig14m5ejb2p44bnbnt010vn.ll b/bench/ruff-rs/optimized/2wig14m5ejb2p44bnbnt010vn.ll index 418c559debc..b9eed2870f1 100644 --- a/bench/ruff-rs/optimized/2wig14m5ejb2p44bnbnt010vn.ll +++ b/bench/ruff-rs/optimized/2wig14m5ejb2p44bnbnt010vn.ll @@ -3984,7 +3984,7 @@ define hidden void @"_ZN176_$LT$ruff_graph..settings.._..$LT$impl$u20$serde..de. } ; Function Attrs: nonlazybind uwtable -define hidden void @"_ZN233_$LT$ruff_linter..rules..flake8_pytest_style..types.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ruff_linter..rules..flake8_pytest_style..types..ParametrizeNameType$GT$..deserialize..__Visitor$u20$as$u20$serde..de..Visitor$GT$10visit_enum17h07c343ab482c22c4E"(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) %0, ptr noalias noundef align 8 captures(none) dereferenceable(24) %1) unnamed_addr #0 { +define hidden void @"_ZN233_$LT$ruff_linter..rules..flake8_pytest_style..types.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ruff_linter..rules..flake8_pytest_style..types..ParametrizeNameType$GT$..deserialize..__Visitor$u20$as$u20$serde..de..Visitor$GT$10visit_enum17h07c343ab482c22c4E"(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) initializes((0, 9)) %0, ptr noalias noundef align 8 captures(none) dereferenceable(24) %1) unnamed_addr #0 { %3 = alloca [96 x i8], align 8 call void @llvm.lifetime.start.p0(ptr nonnull %3) call void @"_ZN87_$LT$serde..de..value..StringDeserializer$LT$E$GT$$u20$as$u20$serde..de..EnumAccess$GT$12variant_seed17h7816687074797249E"(ptr noalias noundef nonnull sret([96 x i8]) align 8 captures(none) dereferenceable(96) %3, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(24) %1) @@ -19172,16 +19172,12 @@ define hidden noundef range(i8 0, 9) i8 @_ZN14ruff_workspace9pyproject29get_mini store ptr %26, ptr %8, align 8, !alias.scope !2891, !noalias !2894 %27 = getelementptr inbounds nuw i8, ptr %23, i64 8 %28 = load i8, ptr %27, align 8, !range !2895, !alias.scope !2896, !noalias !2899, !noundef !3 - switch i8 %28, label %"_ZN4core4iter8adapters6filter15filter_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17h4196a53dc9a815fbE.exit.i.i.i.i.i" [ - i8 0, label %29 - i8 1, label %29 - i8 2, label %29 - i8 5, label %29 - i8 8, label %29 - i8 9, label %29 - ] + %switch.cast.i.i.i.i.i.i.i = zext nneg i8 %28 to i10 + %switch.downshift.i.i.i.i.i.i.i = lshr i10 -217, %switch.cast.i.i.i.i.i.i.i + %switch.masked.i.i.i.i.i.i.i = trunc i10 %switch.downshift.i.i.i.i.i.i.i to i1 + br i1 %switch.masked.i.i.i.i.i.i.i, label %29, label %"_ZN4core4iter8adapters6filter15filter_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17h4196a53dc9a815fbE.exit.i.i.i.i.i" -29: ; preds = %25, %25, %25, %25, %25, %25 +29: ; preds = %25 %30 = call noundef ptr @"_ZN4core3ops8function5impls79_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$8call_mut17h6dec7ee13a5d9cfcE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %21, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %23), !noalias !2882 br label %"_ZN4core4iter8adapters6filter15filter_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17h4196a53dc9a815fbE.exit.i.i.i.i.i" @@ -19211,16 +19207,12 @@ define hidden noundef range(i8 0, 9) i8 @_ZN14ruff_workspace9pyproject29get_mini call void @llvm.experimental.noalias.scope.decl(metadata !2901) %42 = getelementptr inbounds nuw i8, ptr %41, i64 8 %43 = load i8, ptr %42, align 8, !range !2895, !alias.scope !2901, !noalias !2904, !noundef !3 - switch i8 %43, label %"_ZN4core4iter8adapters6filter11filter_fold28_$u7b$$u7b$closure$u7d$$u7d$17hd52cd433158339feE.exit.i.i.i.i" [ - i8 0, label %44 - i8 1, label %44 - i8 2, label %44 - i8 5, label %44 - i8 8, label %44 - i8 9, label %44 - ] + %switch.cast.i.i.i.i.i.i = zext nneg i8 %43 to i10 + %switch.downshift.i.i.i.i.i.i = lshr i10 -217, %switch.cast.i.i.i.i.i.i + %switch.masked.i.i.i.i.i.i = trunc i10 %switch.downshift.i.i.i.i.i.i to i1 + br i1 %switch.masked.i.i.i.i.i.i, label %44, label %"_ZN4core4iter8adapters6filter11filter_fold28_$u7b$$u7b$closure$u7d$$u7d$17hd52cd433158339feE.exit.i.i.i.i" -44: ; preds = %40, %40, %40, %40, %40, %40 +44: ; preds = %40 call void @llvm.lifetime.start.p0(ptr nonnull %6), !noalias !2906 store ptr %.sroa.0.0.i17.i.i.i.i, ptr %6, align 8, !noalias !2907 %45 = invoke noundef ptr @_ZN14ruff_workspace9pyproject29get_minimum_supported_version11major_minor17h0338358f891e1b1bE(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %41) diff --git a/bench/ruff-rs/optimized/6xr26kkoffzenw9uwdsvr1n2n.ll b/bench/ruff-rs/optimized/6xr26kkoffzenw9uwdsvr1n2n.ll index 9888a647bda..460a587544f 100644 --- a/bench/ruff-rs/optimized/6xr26kkoffzenw9uwdsvr1n2n.ll +++ b/bench/ruff-rs/optimized/6xr26kkoffzenw9uwdsvr1n2n.ll @@ -112,7 +112,7 @@ define noundef zeroext i1 @_ZN18ruff_python_trivia10whitespace20has_trailing_con %11 = tail call { ptr, i64 } @"_ZN4core3str6traits108_$LT$impl$u20$core..slice..index..SliceIndex$LT$str$GT$$u20$for$u20$core..ops..range..Range$LT$usize$GT$$GT$3get17hb51faaef8ef91745E"(i64 %9, i64 %10, ptr align 1 %1, i64 %2) %12 = extractvalue { ptr, i64 } %11, 0 %.not7 = icmp eq ptr %12, null - br i1 %.not7, label %22, label %13 + br i1 %.not7, label %17, label %13 13: ; preds = %7 %14 = extractvalue { ptr, i64 } %11, 1 @@ -120,42 +120,35 @@ define noundef zeroext i1 @_ZN18ruff_python_trivia10whitespace20has_trailing_con store ptr %12, ptr %4, align 8 %16 = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr %15, ptr %16, align 8 - %17 = call { i32, i32 } @_ZN4core3str11validations15next_code_point17ha3232740f773dae9E(ptr nonnull align 8 %4) - %18 = extractvalue { i32, i32 } %17, 0 - %19 = extractvalue { i32, i32 } %17, 1 - %20 = trunc i32 %18 to i1 - %21 = icmp ne i32 %19, 35 - %or.cond.not11 = select i1 %20, i1 %21, i1 false - br i1 %or.cond.not11, label %.lr.ph, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread - -22: ; preds = %7 + br label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread + +17:; preds = %7 tail call void @_ZN4core3str16slice_error_fail17h9782f1ca63c1749dE(ptr align 1 %1, i64 %2, i64 %9, i64 %10, ptr nonnull align 8 @anon.066724e871e5ef01057d14ea269918aa.10) #4 unreachable -_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread: ; preds = %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit, %.lr.ph, %13 - %or.cond.not.lcssa = phi i1 [ false, %13 ], [ true, %.lr.ph ], [ false, %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit ] - ret i1 %or.cond.not.lcssa - -.lr.ph: ; preds = %13, %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit - %23 = phi i32 [ %26, %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit ], [ %19, %13 ] - switch i32 %23, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread [ - i32 32, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit - i32 9, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit - i32 12, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit - ] - -_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit: ; preds = %.lr.ph, %.lr.ph, %.lr.ph - %24 = call { i32, i32 } @_ZN4core3str11validations15next_code_point17ha3232740f773dae9E(ptr nonnull align 8 %4) - %25 = extractvalue { i32, i32 } %24, 0 - %26 = extractvalue { i32, i32 } %24, 1 - %27 = trunc i32 %25 to i1 - %28 = icmp ne i32 %26, 35 - %or.cond.not = select i1 %27, i1 %28, i1 false - br i1 %or.cond.not, label %.lr.ph, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread +_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread: ; preds = %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit, %13 + %19 = call { i32, i32 } @_ZN4core3str11validations15next_code_point17ha3232740f773dae9E(ptr nonnull align 8 %4) + %20 = extractvalue { i32, i32 } %19, 0 + %21 = extractvalue { i32, i32 } %19, 1 + %22 = trunc i32 %20 to i1 + %23 = icmp ne i32 %21, 35 + %or.cond.not = select i1 %22, i1 %23, i1 false + br i1 %or.cond.not, label %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit, label %24 + +24: ; preds = %25, %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread + ret i1 %or.cond.not + +25:; preds = %_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE.exit.thread + %26 = icmp ult i32 %21, 33 + %switch.cast.i = zext nneg i32 %21 to i33 + %switch.downshift.i = lshr i33 -4294962688, %switch.cast.i + %27 = trunc i33 %switch.downshift.i to i1 + %.sroa.0.0.i = select i1 %26, i1 %27, i1 false + br i1 %.sroa.0.0.i, label %18, label %24 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable -define noundef zeroext i1 @_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE(i32 %0) unnamed_addr #1 { +define zeroext i1 @_ZN18ruff_python_trivia10whitespace20is_python_whitespace17h90db77d37318a36eE(i32 %0) unnamed_addr #1 { %2 = icmp ult i32 %0, 33 %switch.cast = zext nneg i32 %0 to i33 %switch.downshift = lshr i33 -4294962688, %switch.cast diff --git a/bench/ruff-rs/optimized/8elsw9opmu2f4zc2b86bmteg8.ll b/bench/ruff-rs/optimized/8elsw9opmu2f4zc2b86bmteg8.ll index 831add0b003..4f6d4a1f5f0 100644 --- a/bench/ruff-rs/optimized/8elsw9opmu2f4zc2b86bmteg8.ll +++ b/bench/ruff-rs/optimized/8elsw9opmu2f4zc2b86bmteg8.ll @@ -1642,29 +1642,15 @@ _ZN7ruff_db6system4path10SystemPath11starts_with17h8680b8c0550a6300E.exit.i: ; p 204: ; preds = %200 %205 = invoke noundef i8 @"_ZN7ruff_db5files1_38_$LT$impl$u20$ruff_db..files..File$GT$6status17hf61462c01b4bbdaeE"(i32 noundef %203, ptr noundef nonnull align 1 %110, ptr noalias noundef readonly align 8 dereferenceable(176) @anon.86ecaac84f2be1d55de06e91e6d68cca.100) - to label %206 unwind label %198, !noalias !187 + to label %switch.lookup.i unwind label %198, !noalias !187 206: ; preds = %204 - switch i8 %205, label %default.unreachable [ - i8 0, label %.critedge.i - i8 1, label %.noexc.i - i8 2, label %207 - ] - -default.unreachable: ; preds = %206 - unreachable - -207: ; preds = %206 - br label %.noexc.i - -.noexc.i: ; preds = %207, %206 - %.sroa.4.0.i.i = phi i8 [ 1, %207 ], [ 0, %206 ] + %switch.cast121.i = trunc nuw nsw i8 %205 to i3 + %switch.downshift123.i = lshr i3 -2, %switch.cast121.i + %switch.masked124.i = trunc i3 %switch.downshift123.i to i1 call void @"_ZN4core3ptr57drop_in_place$LT$ruff_db..system..path..SystemPathBuf$GT$17hbf602143f17375b2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %10), !noalias !145 call void @llvm.lifetime.end.p0(ptr nonnull %10), !noalias !146 - call void @llvm.lifetime.start.p0(ptr nonnull %6), !noalias !146 - store i8 %.sroa.4.0.i.i, ptr %6, align 1, !noalias !146 - call void @_ZN4core6result13unwrap_failed17he8e27e02739cd3d2E(ptr noalias noundef nonnull readonly align 1 @anon.86ecaac84f2be1d55de06e91e6d68cca.42, i64 noundef 43, ptr noundef nonnull align 1 %6, ptr noalias noundef readonly align 8 dereferenceable(32) @anon.86ecaac84f2be1d55de06e91e6d68cca.44, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.86ecaac84f2be1d55de06e91e6d68cca.101) #26, !noalias !145 - unreachable + br i1 %switch.masked124.i, label %.noexc.i, label %209, !prof !73 208: ; preds = %198 %209 = landingpad { ptr, i32 } @@ -1673,8 +1659,16 @@ default.unreachable: ; preds = %206 unreachable .critedge.i: ; preds = %206 - call void @"_ZN4core3ptr57drop_in_place$LT$ruff_db..system..path..SystemPathBuf$GT$17hbf602143f17375b2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %10), !noalias !145 - call void @llvm.lifetime.end.p0(ptr nonnull %10), !noalias !146 + %208 = shl nuw nsw i8 %205, 3 + %switch.shiftamt.i = zext nneg i8 %208 to i24 + %switch.downshift.i = lshr i24 65536, %switch.shiftamt.i + %switch.masked.i = trunc i24 %switch.downshift.i to i8 + call void @llvm.lifetime.start.p0(ptr nonnull %6), !noalias !146 + store i8 %switch.masked.i, ptr %6, align 1, !noalias !146 + call void @_ZN4core6result13unwrap_failed17he8e27e02739cd3d2E(ptr noalias noundef nonnull readonly align 1 @anon.86ecaac84f2be1d55de06e91e6d68cca.42, i64 noundef 43, ptr noundef nonnull align 1 %6, ptr noalias noundef readonly align 8 dereferenceable(32) @anon.86ecaac84f2be1d55de06e91e6d68cca.44, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.86ecaac84f2be1d55de06e91e6d68cca.101) #26, !noalias !145 + unreachable + +209: ; preds = %switch.lookup.i call void @"_ZN67_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..clone..Clone$GT$5clone17hf937761b65478db6E"(ptr noalias noundef nonnull sret([24 x i8]) align 8 captures(none) dereferenceable(32) %0, ptr noalias noundef nonnull readonly align 8 dereferenceable(88) %2, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.86ecaac84f2be1d55de06e91e6d68cca.102), !noalias !141 %.sroa.4.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %0, i64 24 store i32 %203, ptr %.sroa.4.0..sroa_idx.i, align 8, !alias.scope !138, !noalias !147 @@ -1690,7 +1684,7 @@ default.unreachable: ; preds = %206 invoke void @"_ZN4core3ptr57drop_in_place$LT$ruff_db..system..path..SystemPathBuf$GT$17hbf602143f17375b2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %19) #27 to label %.thread102.i unwind label %171, !noalias !145 -"_ZN7ty_test8run_test28_$u7b$$u7b$closure$u7d$$u7d$17hdeea0cfd6dc49344E.exit": ; preds = %29, %189, %.critedge.i +"_ZN7ty_test8run_test28_$u7b$$u7b$closure$u7d$$u7d$17hdeea0cfd6dc49344E.exit": ; preds = %29, %189, %209 call void @llvm.lifetime.end.p0(ptr nonnull %13) ret void } diff --git a/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll b/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll index 0f615da3ed9..ecefb0ec2ac 100644 --- a/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll +++ b/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll @@ -26116,7 +26116,7 @@ define hidden { i64, ptr } @"_ZN8chalk_ir4fold12boring_impls97_$LT$impl$u20$chal invoke void %9(ptr noundef nonnull align 1 %2) to label %12 unwind label %10 -10: ; preds = %.invoke, %.thread, %32, %12, %5 +10: ; preds = %.invoke, %.thread, %34, %12, %5 %11 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr79drop_in_place$LT$chalk_ir..GenericArgData$LT$hir_ty..interner..Interner$GT$$GT$17h0ed9359e68b40390E.llvm.15963164601899926706"(ptr noalias noundef nonnull align 8 dereferenceable(16) %6) @@ -26169,19 +26169,20 @@ default.unreachable: ; preds = %14 .thread: ; preds = %25, %21, %17 %.sroa.4.0.i12 = phi ptr [ %18, %17 ], [ %22, %21 ], [ %26, %25 ] - %.sink.i = phi i64 [ 32, %17 ], [ 40, %21 ], [ 48, %25 ] - %29 = getelementptr inbounds nuw i8, ptr %3, i64 %.sink.i - %30 = load ptr, ptr %29, align 8, !invariant.load !11, !alias.scope !6848, !nonnull !11 - %31 = invoke noundef nonnull ptr %30(ptr noundef nonnull align 1 %2, ptr noundef nonnull %.sroa.4.0.i12, i32 noundef %4) - to label %32 unwind label %10 - -32: ; preds = %.thread - %33 = invoke { i64, ptr } @"_ZN75_$LT$hir_ty..interner..Interner$u20$as$u20$chalk_ir..interner..Interner$GT$18intern_generic_arg17hf1cb607f9b3010daE"(i64 noundef %15, ptr noundef nonnull %31) + %switch.idx.mult.i = shl nuw nsw i64 %15, 3 + %29 = getelementptr i8, ptr %3, i64 %switch.idx.mult.i + %31 = getelementptr i8, ptr %.thread, i64 32 + %32 = load ptr, ptr %31, align 8, !invariant.load !11, !alias.scope !6848, !nonnull !11 + %33 = invoke noundef nonnull ptr %32(ptr noundef nonnull align 1 %2, ptr noundef nonnull %.sroa.4.0.i, i32 noundef %4) to label %34 unwind label %10 -34: ; preds = %32 +34: ; preds = %29 + %35 = invoke { i64, ptr } @"_ZN75_$LT$hir_ty..interner..Interner$u20$as$u20$chalk_ir..interner..Interner$GT$18intern_generic_arg17hf1cb607f9b3010daE"(i64 noundef %15, ptr noundef nonnull %33) + to label %36 unwind label %10 + +36: ; preds = %34 call void @"_ZN4core3ptr79drop_in_place$LT$chalk_ir..GenericArgData$LT$hir_ty..interner..Interner$GT$$GT$17h0ed9359e68b40390E.llvm.15963164601899926706"(ptr noalias noundef nonnull align 8 dereferenceable(16) %6) - ret { i64, ptr } %33 + ret { i64, ptr } %35 35: ; preds = %10 %36 = landingpad { ptr, i32 } diff --git a/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll b/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll index 2916257ba4d..3dc50d58c46 100644 --- a/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll +++ b/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll @@ -2500,11 +2500,10 @@ define hidden void @"_ZN161_$LT$cargo_metadata.._..$LT$impl$u20$serde..de..Deser ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN161_$LT$cargo_metadata.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..Target$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2bb0ed8f70b76f7cE.llvm.11964692271494333599"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #6 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 9) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -6152,10 +6151,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h181dfad594a5deffE(ptr noalia ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hcc97cbb8c4e850c9E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #6 { -"_ZN161_$LT$cargo_metadata.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..Target$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2bb0ed8f70b76f7cE.llvm.11964692271494333599.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 9) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !831 + store i8 %4, ptr %3, align 1, !alias.scope !831 store i8 0, ptr %0, align 8, !alias.scope !831 ret void } diff --git a/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll b/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll index a08578efcde..4b138e6f7d4 100644 --- a/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll +++ b/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll @@ -37,8 +37,8 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h7bf09a314e757cabE(ptr no br label %7 7: ; preds = %.lr.ph, %40 - %.sroa.0.068 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.127, %40 ] - %.sroa.4.067 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %40 ] + %.sroa.0.068 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.127, %43 ] + %.sroa.4.067 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %43 ] call void @llvm.lifetime.start.p0(ptr nonnull %4) %8 = call { i64, ptr } @"_ZN64_$LT$std..sys..stdio..unix..Stderr$u20$as$u20$std..io..Write$GT$5write17heac51585df987f62E"(ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.068, i64 noundef %.sroa.4.067) %9 = extractvalue { i64, ptr } %8, 0 @@ -47,34 +47,29 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h7bf09a314e757cabE(ptr no store ptr %10, ptr %6, align 8 %11 = trunc nuw i64 %9 to i1 %12 = ptrtoint ptr %10 to i64 - br i1 %11, label %13, label %16 + br i1 %11, label %13, label %15 .loopexit: ; preds = %40, %3, %.thread58 - %.sroa.04.0 = phi ptr [ %.sroa.04.1, %.thread58 ], [ null, %3 ], [ null, %40 ] + %.sroa.04.0 = phi ptr [ %.sroa.04.1, %20 ], [ null, %3 ], [ null, %43 ] ret ptr %.sroa.04.0 13: ; preds = %7 %14 = and i64 %12, 3 switch i64 %14, label %default.unreachable [ i64 2, label %27 - i64 3, label %15 - i64 0, label %29 - i64 1, label %34 + i64 3, label %29 + i64 0, label %32 + i64 1, label %37 ], !prof !3 default.unreachable: ; preds = %13 unreachable -15: ; preds = %13 - %.mask = and i64 %12, -4294967296 - %switch = icmp eq i64 %.mask, 150323855360 - br i1 %switch, label %.thread, label %.thread58 - -16: ; preds = %7 - %17 = icmp eq ptr %10, null - br i1 %17, label %.thread58, label %18 +15: ; preds = %7 + %16 = icmp eq ptr %10, null + br i1 %16, label %.thread58, label %18 -18: ; preds = %16 +18: ; preds = %15 %19 = icmp ult i64 %.sroa.4.067, %12 br i1 %19, label %20, label %24, !prof !4 @@ -85,8 +80,8 @@ default.unreachable: ; preds = %13 .noexc: ; preds = %20 unreachable -.thread58: ; preds = %15, %34, %27, %29, %16 - %.sroa.04.1 = phi ptr [ @anon.f28676bfa5d7cf5083108750d26dc31f.1, %16 ], [ %10, %29 ], [ %10, %27 ], [ %10, %34 ], [ %10, %15 ] +.thread58: ; preds = %37, %27, %29, %32, %15 + %.sroa.04.1 = phi ptr [ @anon.f28676bfa5d7cf5083108750d26dc31f.1, %15 ], [ %10, %32 ], [ %10, %29 ], [ %10, %27 ], [ %10, %37 ] call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %.loopexit @@ -108,23 +103,30 @@ default.unreachable: ; preds = %13 br i1 %28, label %.thread, label %.thread58 29: ; preds = %13 - %30 = icmp ne ptr %10, null + %30 = icmp ult ptr %10, inttoptr (i64 180388626432 to ptr) call void @llvm.assume(i1 %30) - %31 = getelementptr inbounds nuw i8, ptr %10, i64 16 - %32 = load i8, ptr %31, align 8, !range !7, !noundef !6 - %33 = icmp eq i8 %32, 35 - br i1 %33, label %.thread, label %.thread58 - -34: ; preds = %13 - %35 = getelementptr i8, ptr %10, i64 -1 - %36 = icmp ne ptr %35, null - call void @llvm.assume(i1 %36) - %37 = getelementptr i8, ptr %10, i64 15 - %38 = load i8, ptr %37, align 8, !range !7, !noundef !6 - %39 = icmp eq i8 %38, 35 - br i1 %39, label %.thread, label %.thread58 - -.thread: ; preds = %15, %34, %27, %29 + %.mask = and i64 %12, -4294967296 + %31 = icmp eq i64 %.mask, 150323855360 + br i1 %31, label %.thread, label %.thread58 + +32: ; preds = %13 + %33 = icmp ne ptr %10, null + call void @llvm.assume(i1 %33) + %34 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %35 = load i8, ptr %34, align 8, !range !7, !noundef !6 + %36 = icmp eq i8 %35, 35 + br i1 %36, label %.thread, label %20 + +37: ; preds = %13 + %38 = getelementptr i8, ptr %10, i64 -1 + %39 = icmp ne ptr %38, null + call void @llvm.assume(i1 %39) + %40 = getelementptr i8, ptr %10, i64 15 + %41 = load i8, ptr %40, align 8, !range !7, !noundef !6 + %42 = icmp eq i8 %41, 35 + br i1 %42, label %.thread, label %20 + +.thread: ; preds = %37, %27, %29, %32 call void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h3b51449ece05beabE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %6) br label %40 @@ -137,7 +139,7 @@ default.unreachable: ; preds = %13 42: ; preds = %21 invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h3b51449ece05beabE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %6) #18 - to label %43 unwind label %44 + to label %46 unwind label %44 43: ; preds = %42, %21 resume { ptr, i32 } %22 diff --git a/bench/salsa-rs/optimized/0re58vbodfo9fw2ucr33a7vsy.ll b/bench/salsa-rs/optimized/0re58vbodfo9fw2ucr33a7vsy.ll index 6e2dd6282ca..508b3800b5d 100644 --- a/bench/salsa-rs/optimized/0re58vbodfo9fw2ucr33a7vsy.ll +++ b/bench/salsa-rs/optimized/0re58vbodfo9fw2ucr33a7vsy.ll @@ -1084,44 +1084,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !10, !noundef !10 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit", !prof !132 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit" + i64 1, label %6 + ], !prof !132 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !10, !align !22, !noundef !10 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !10 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 - -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit" + +6:; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !10, !align !22, !noundef !10 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !10 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 -11: ; preds = %9, %4 +11: ; preds = %6 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !24, !invariant.load !10 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !25, !invariant.load !10 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #15 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %21 + +13:; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !24, !invariant.load !10 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !25, !invariant.load !10 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #15 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -1139,14 +1151,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #15 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #15 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #15 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #15 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17he4713d383c1db6f1E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc250e42dde11cfd3E.exit.i.i.i" ret void } @@ -2690,7 +2702,7 @@ attributes #18 = { noreturn } !129 = distinct !{!129, !130, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hee26594f8d647c4aE: argument 0"} !130 = distinct !{!130, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hee26594f8d647c4aE"} !131 = !{!129, !126, !123} -!132 = !{!"branch_weights", i32 2000, i32 6001} +!132 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !133 = !{!134, !136} !134 = distinct !{!134, !135, !"_ZN68_$LT$thin_vec..ThinVec$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5354f3d399cd41e8E: argument 0"} !135 = distinct !{!135, !"_ZN68_$LT$thin_vec..ThinVec$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5354f3d399cd41e8E"} diff --git a/bench/sdl/optimized/SDL_gamepad.ll b/bench/sdl/optimized/SDL_gamepad.ll index ddabf8666f1..06cfe913c57 100644 --- a/bench/sdl/optimized/SDL_gamepad.ll +++ b/bench/sdl/optimized/SDL_gamepad.ll @@ -5318,7 +5318,7 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabelForType_REAL(i32 nou 3: ; preds = %2 %4 = icmp ult i32 %1, 4 - %switch.offset = add nsw i32 %1, 1 + %switch.offset = add nuw nsw i32 %1, 1 %spec.select = select i1 %4, i32 %switch.offset, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit @@ -5328,23 +5328,28 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabelForType_REAL(i32 nou 7: ; preds = %2, %2, %2, %2 %8 = icmp ult i32 %1, 4 - br i1 %8, label %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split, label %SDL_GetGamepadButtonLabelForFaceStyle.exit + br i1 %8, label %switch.lookup8, label %SDL_GetGamepadButtonLabelForFaceStyle.exit SDL_GetGamepadFaceStyleForGamepadType.exit: ; preds = %2, %2, %2 %9 = icmp ult i32 %1, 4 - %switch.offset13 = add nsw i32 %1, 5 + %switch.offset13 = add nuw nsw i32 %1, 5 %spec.select14 = select i1 %9, i32 %switch.offset13, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit -SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split: ; preds = %7, %5 - %switch.table.SDL_GetGamepadButtonLabelForType_REAL.1.sink = phi ptr [ @switch.table.SDL_GetGamepadButtonLabel_REAL, %5 ], [ @switch.table.SDL_GetGamepadButtonLabel_REAL.2, %7 ] +SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split: ; preds = %5 %10 = zext nneg i32 %1 to i64 - %switch.gep10 = getelementptr inbounds nuw i32, ptr %switch.table.SDL_GetGamepadButtonLabelForType_REAL.1.sink, i64 %10 + %switch.gep10 = getelementptr inbounds nuw i32, ptr @switch.table.SDL_GetGamepadButtonLabel_REAL, i64 %10 %switch.load11 = load i32, ptr %switch.gep10, align 4 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit -SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %SDL_GetGamepadFaceStyleForGamepadType.exit, %3, %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split, %7, %5 - %.0.i2 = phi i32 [ 0, %5 ], [ 0, %7 ], [ %spec.select, %3 ], [ %spec.select14, %SDL_GetGamepadFaceStyleForGamepadType.exit ], [ %switch.load11, %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split ] +switch.lookup8: ; preds = %7 + %11 = zext nneg i32 %1 to i64 + %switch.gep9 = getelementptr inbounds nuw i32, ptr @switch.table.SDL_GetGamepadButtonLabel_REAL.2, i64 %11 + %switch.load10 = load i32, ptr %switch.gep9, align 4 + br label %SDL_GetGamepadButtonLabelForFaceStyle.exit + +SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %switch.lookup8, %7, %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split, %5, %3, %SDL_GetGamepadFaceStyleForGamepadType.exit + %.0.i2 = phi i32 [ 0, %5 ], [ 0, %7 ], [ %spec.select, %3 ], [ %spec.select14, %SDL_GetGamepadFaceStyleForGamepadType.exit ], [ %switch.load11, %switch.lookup ], [ %switch.load10, %switch.lookup8 ] ret i32 %.0.i2 } @@ -5377,7 +5382,7 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabel_REAL(ptr noundef %0 12: ; preds = %9 %13 = icmp ult i32 %1, 4 - %switch.offset = add nsw i32 %1, 1 + %switch.offset = add nuw nsw i32 %1, 1 %spec.select = select i1 %13, i32 %switch.offset, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit @@ -5391,7 +5396,7 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabel_REAL(ptr noundef %0 18: ; preds = %9 %19 = icmp ult i32 %1, 4 - %switch.offset10 = add nsw i32 %1, 5 + %switch.offset10 = add nuw nsw i32 %1, 5 %spec.select11 = select i1 %19, i32 %switch.offset10, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit @@ -5407,8 +5412,8 @@ switch.lookup6: ; preds = %16 %switch.load8 = load i32, ptr %switch.gep7, align 4 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit -SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %18, %12, %switch.lookup6, %16, %switch.lookup5, %14, %9, %7 - %.0 = phi i32 [ 0, %7 ], [ 0, %9 ], [ 0, %14 ], [ 0, %16 ], [ %switch.load, %switch.lookup5 ], [ %switch.load8, %switch.lookup6 ], [ %spec.select, %12 ], [ %spec.select11, %18 ] +SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %switch.lookup6, %16, %switch.lookup5, %14, %18, %12, %9, %7 + %.0 = phi i32 [ 0, %7 ], [ 0, %9 ], [ 0, %14 ], [ 0, %16 ], [ %spec.select, %12 ], [ %spec.select14, %18 ], [ %switch.load, %switch.lookup ], [ %switch.load8, %switch.lookup5 ] ret i32 %.0 } diff --git a/bench/sdl/optimized/SDL_hidapi_ps3.ll b/bench/sdl/optimized/SDL_hidapi_ps3.ll index c917bfca54f..22da4e3d825 100644 --- a/bench/sdl/optimized/SDL_hidapi_ps3.ll +++ b/bench/sdl/optimized/SDL_hidapi_ps3.ll @@ -1133,17 +1133,15 @@ define internal zeroext i1 @HIDAPI_DriverPS3ThirdParty_UpdateDevice(ptr noundef 99: ; preds = %96 %100 = and i8 %98, 15 %101 = icmp samesign ult i8 %100, 8 - br i1 %101, label %switch.lookup, label %.sink.split.i - -switch.lookup: ; preds = %99 %102 = shl nuw nsw i8 %100, 3 %switch.shiftamt = zext nneg i8 %102 to i64 %switch.downshift = lshr i64 650783357575234305, %switch.shiftamt %switch.masked = trunc i64 %switch.downshift to i8 + %.0100.i = select i1 %101, i8 %switch.masked.i, i8 0 br label %.sink.split.i -.sink.split.i: ; preds = %99, %switch.lookup, %88 - %.0100.sink.i = phi i8 [ %.3.i, %88 ], [ %switch.masked, %switch.lookup ], [ 0, %99 ] +.sink.split.i: ; preds = %99, %88 + %.0100.sink.i = phi i8 [ %.0100.i, %99 ], [ %.3.i, %88 ] call void @SDL_SendJoystickHat(i64 noundef %40, ptr noundef nonnull %12, i8 noundef zeroext 0, i8 noundef zeroext %.0100.sink.i) #10 br label %103 @@ -1349,7 +1347,7 @@ HIDAPI_DriverPS3ThirdParty_HandleStatePacket19.exit: ; preds = %145, %103 br label %229 229: ; preds = %219, %.preheader.i20 - %.1.i22 = phi i8 [ %228, %219 ], [ %.086.i, %.preheader.i20 ] + %.1.i22 = phi i8 [ %228, %219 ], [ %.086.i, %.preheader.i23 ] %indvars.iv.next.i23 = add nuw nsw i64 %indvars.iv.i21, 1 %exitcond.not.i24 = icmp eq i64 %indvars.iv.next.i23, 15 br i1 %exitcond.not.i24, label %HIDAPI_DriverPS3ThirdParty_HandleStatePacket18.exit, label %.preheader.i20, !llvm.loop !10 diff --git a/bench/sdl/optimized/SDL_render_gpu.ll b/bench/sdl/optimized/SDL_render_gpu.ll index 97981c2cad2..22cde8398f3 100644 --- a/bench/sdl/optimized/SDL_render_gpu.ll +++ b/bench/sdl/optimized/SDL_render_gpu.ll @@ -246,31 +246,38 @@ declare noalias ptr @SDL_calloc_REAL(i64 noundef, i64 noundef) local_unnamed_add ; Function Attrs: nounwind uwtable define internal zeroext i1 @GPU_SupportsBlendMode(ptr readnone captures(none) %0, i32 noundef %1) #0 { -GPU_ConvertBlendFactor.exit: - %2 = tail call i32 @SDL_GetBlendModeSrcColorFactor(i32 noundef %1) #11 - %3 = tail call i32 @SDL_GetBlendModeSrcAlphaFactor(i32 noundef %1) #11 - %4 = tail call i32 @SDL_GetBlendModeColorOperation(i32 noundef %1) #11 - %5 = tail call i32 @SDL_GetBlendModeDstColorFactor(i32 noundef %1) #11 - %6 = tail call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %1) #11 - %7 = tail call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %1) #11 - %.off = add i32 %2, -1 + %3 = tail call i32 @SDL_GetBlendModeSrcColorFactor(i32 noundef %1) #11 + %2 = tail call i32 @SDL_GetBlendModeSrcAlphaFactor(i32 noundef %1) #11 + %3 = tail call i32 @SDL_GetBlendModeColorOperation(i32 noundef %1) #11 + %4 = tail call i32 @SDL_GetBlendModeDstColorFactor(i32 noundef %1) #11 + %5 = tail call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %1) #11 + %6 = tail call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %1) #11 + %.off = add i32 %3, -1 %switch = icmp ult i32 %.off, 10 - %.off27 = add i32 %3, -1 + %.off27 = add i32 %4, -1 + %switch26 = icmp ult i32 %.off25, 10 + %or.cond = select i1 %switch, i1 %switch26, i1 false + br i1 %or.cond, label %9, label %GPU_ConvertBlendFactor.exit + +9: ; preds = %2 + %switch.tableidx.i = add i32 %5, -1 + %10 = icmp ult i32 %switch.tableidx.i, 5 + %.off27 = add i32 %6, -1 %switch28 = icmp ult i32 %.off27, 10 - %or.cond = select i1 %switch, i1 %switch28, i1 false - %.off29 = add i32 %4, -1 - %switch30 = icmp ult i32 %.off29, 5 + %or.cond = select i1 %10, i1 %switch28, i1 false + %.off29 = add i32 %7, -1 + %switch30 = icmp ult i32 %.off29, 10 %or.cond31 = select i1 %or.cond, i1 %switch30, i1 false - %.off32 = add i32 %5, -1 - %switch33 = icmp ult i32 %.off32, 10 - %or.cond34 = select i1 %or.cond31, i1 %switch33, i1 false + br i1 %or.cond32, label %11, label %GPU_ConvertBlendFactor.exit + +11:; preds = %9 %.off35 = add i32 %6, -1 - %switch36 = icmp ult i32 %.off35, 10 - %or.cond37 = select i1 %or.cond34, i1 %switch36, i1 false - %.off38 = add i32 %7, -1 - %switch39 = icmp ult i32 %.off38, 5 - %or.cond40 = select i1 %or.cond37, i1 %switch39, i1 false - ret i1 %or.cond40 + %switch36 = icmp ult i32 %.off35, 5 + br label %GPU_ConvertBlendFactor.exit + +GPU_ConvertBlendFactor.exit:; preds = %2, %11, %9 + %.0 = phi i1 [ false, %9 ], [ %switch36, %11 ], [ false, %2 ] + ret i1 %.0 } ; Function Attrs: nounwind uwtable diff --git a/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll b/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll index 9c430f86e91..f036e18376b 100644 --- a/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll +++ b/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll @@ -20,20 +20,20 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h6ffa51b6097a75eaE(ptr no %8 = tail call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_str17hff61c25f281f3854E(ptr noalias noundef nonnull align 8 dereferenceable(64) %6, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef %2), !noalias !12 br i1 %8, label %.lr.ph38, label %.loopexit -.loopexit: ; preds = %18, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %24, %.lr.ph, %3 - %.0 = phi ptr [ null, %3 ], [ null, %.lr.ph ], [ null, %24 ], [ %9, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ], [ %9, %12 ], [ %9, %14 ], [ %9, %18 ] +.loopexit: ; preds = %17, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %26, %.lr.ph, %3 + %.0 = phi ptr [ null, %3 ], [ null, %.lr.ph ], [ null, %26 ], [ %9, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ], [ %9, %12 ], [ %9, %14 ], [ %9, %17 ] ret ptr %.0 -.lr.ph38: ; preds = %.lr.ph, %24 +.lr.ph38: ; preds = %.lr.ph, %26 call void @llvm.experimental.noalias.scope.decl(metadata !4) %9 = call noundef nonnull ptr @_ZN3std2io5error5Error3new17h33be6581caccd802E(i8 noundef 39, ptr noalias noundef nonnull readonly align 1 @anon.7b12c2ab9e1ce74a96d00cd7e4c1ea31.28.llvm.8370777945629324, i64 noundef 9), !noalias !14 %10 = ptrtoint ptr %9 to i64 %11 = and i64 %10, 3 switch i64 %11, label %default.unreachable [ i64 2, label %12 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit - i64 0, label %14 - i64 1, label %18 + i64 3, label %14 + i64 0, label %17 + i64 1, label %24 ] default.unreachable: ; preds = %.lr.ph38 @@ -45,40 +45,42 @@ default.unreachable: ; preds = %.lr.ph38 br i1 %13, label %26, label %.loopexit 14: ; preds = %.lr.ph38 - %15 = getelementptr inbounds nuw i8, ptr %9, i64 16 - %16 = load i8, ptr %15, align 8, !range !15, !noundef !10 - %17 = icmp eq i8 %16, 35 - br i1 %17, label %26, label %.loopexit - -18: ; preds = %.lr.ph38 - %19 = getelementptr i8, ptr %9, i64 -1 - %20 = icmp ne ptr %19, null - call void @llvm.assume(i1 %20) - %21 = getelementptr i8, ptr %9, i64 15 - %22 = load i8, ptr %21, align 8, !range !15, !noundef !10 - %23 = icmp eq i8 %22, 35 - br i1 %23, label %26, label %.loopexit + %15 = icmp ult ptr %9, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %15) + %.mask.i = and i64 %10, -4294967296 + %16 = icmp eq i64 %.mask.i, 150323855360 + br i1 %16, label %28, label %.loopexit _ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit: ; preds = %.lr.ph38 - %.mask20.i = and i64 %10, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %26, label %.loopexit - -24: ; preds = %28, %26 + %18 = getelementptr inbounds nuw i8, ptr %9, i64 16 + %19 = load i8, ptr %18, align 8, !range !15, !noundef !10 + %20 = icmp eq i8 %19, 35 + br i1 %20, label %28, label %.loopexit + +24: ; preds = %.lr.ph38 + %21 = getelementptr i8, ptr %9, i64 -1 + %22 = icmp ne ptr %21, null + call void @llvm.assume(i1 %22) + %23 = getelementptr i8, ptr %9, i64 15 + %24 = load i8, ptr %23, align 8, !range !15, !noundef !10 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %28, label %.loopexit + +26: ; preds = %30, %28 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !16 %25 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_str17hff61c25f281f3854E(ptr noalias noundef nonnull align 8 dereferenceable(64) %6, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef %2), !noalias !23 br i1 %25, label %.lr.ph38, label %.loopexit -26: ; preds = %18, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit +26: ; preds = %17, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !16 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h90361b2b4881ae37E.llvm.12266911530922283489(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %9), !noalias !16 %27 = load i8, ptr %4, align 8, !range !25, !alias.scope !26, !noalias !16, !noundef !10 %switch.not.i.i.i.i = icmp eq i8 %27, 3 - br i1 %switch.not.i.i.i.i, label %28, label %24 + br i1 %switch.not.i.i.i.i, label %28, label %26 28: ; preds = %26 call void @"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6e7a12bdcfbd04d8E.llvm.12266911530922283489"(ptr noalias noundef nonnull align 8 dereferenceable(8) %7), !noalias !16 - br label %24 + br label %26 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/stb/optimized/stb_image.ll b/bench/stb/optimized/stb_image.ll index 0d68e80d243..c2680e7f5fd 100644 --- a/bench/stb/optimized/stb_image.ll +++ b/bench/stb/optimized/stb_image.ll @@ -9837,22 +9837,14 @@ stbi__malloc_mad3.exit: ; preds = %14, %stbi__mul2size %23 = add nsw i32 %22, %2 %.11170198 = add i32 %3, -1 %24 = icmp sgt i32 %.11170198, -1 - switch i32 %23, label %.critedge [ - i32 10, label %.lr.ph258.split - i32 11, label %.lr.ph258.split - i32 12, label %.lr.ph258.split - i32 17, label %.lr.ph258.split - i32 19, label %.lr.ph258.split - i32 20, label %.lr.ph258.split - i32 28, label %.lr.ph258.split - i32 25, label %.lr.ph258.split - i32 26, label %.lr.ph258.split - i32 33, label %.lr.ph258.split - i32 34, label %.lr.ph258.split - i32 35, label %.lr.ph258.split - ] - -.lr.ph258.split: ; preds = %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258 + %switch.tableidx = add i32 %23, -10 + %25 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond = select i1 %25, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup.preheader, label %.critedge + +switch.lookup.preheader:; preds = %.lr.ph258 %wide.trip.count = zext nneg i32 %4 to i64 br label %26 @@ -9862,8 +9854,8 @@ stbi__malloc_mad3.exit.thread: ; preds = %stbi__mul2sizes_val store ptr @.str.1, ptr %25, align 8, !tbaa !22 br label %158 -26: ; preds = %.lr.ph258.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph258.split ], [ %indvars.iv.next, %.loopexit ] +26: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %27 = trunc nuw nsw i64 %indvars.iv to i32 %28 = mul i32 %3, %27 %29 = mul i32 %28, %1 @@ -10226,22 +10218,14 @@ define noundef ptr @stbi__convert_format16(ptr noundef captures(ret: address, pr %16 = add nsw i32 %15, %2 %.11170197 = add i32 %3, -1 %17 = icmp sgt i32 %.11170197, -1 - switch i32 %16, label %.critedge [ - i32 10, label %.lr.ph257.split - i32 11, label %.lr.ph257.split - i32 12, label %.lr.ph257.split - i32 17, label %.lr.ph257.split - i32 19, label %.lr.ph257.split - i32 20, label %.lr.ph257.split - i32 28, label %.lr.ph257.split - i32 25, label %.lr.ph257.split - i32 26, label %.lr.ph257.split - i32 33, label %.lr.ph257.split - i32 34, label %.lr.ph257.split - i32 35, label %.lr.ph257.split - ] - -.lr.ph257.split: ; preds = %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257 + %switch.tableidx = add i32 %16, -10 + %18 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond = select i1 %18, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup.preheader, label %.critedge + +switch.lookup.preheader:; preds = %.lr.ph257 %wide.trip.count = zext nneg i32 %4 to i64 br label %20 @@ -10251,8 +10235,8 @@ define noundef ptr @stbi__convert_format16(ptr noundef captures(ret: address, pr store ptr @.str.1, ptr %19, align 8, !tbaa !22 br label %152 -20: ; preds = %.lr.ph257.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph257.split ], [ %indvars.iv.next, %.loopexit ] +20: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %21 = trunc nuw nsw i64 %indvars.iv to i32 %22 = mul i32 %3, %21 %23 = mul i32 %22, %1 @@ -10576,7 +10560,7 @@ define noundef ptr @stbi__convert_format16(ptr noundef captures(ret: address, pr br label %152 152: ; preds = %.critedge, %5, %._crit_edge, %18 - %.0155 = phi ptr [ null, %18 ], [ %12, %._crit_edge ], [ %0, %5 ], [ null, %.critedge ] + %.0155 = phi ptr [ null, %19 ], [ %12, %._crit_edge ], [ %0, %5 ], [ null, %.critedge ] ret ptr %.0155 } diff --git a/bench/tinygltf/optimized/tiny_gltf.ll b/bench/tinygltf/optimized/tiny_gltf.ll index 5853fa3dd0d..0093044f02e 100644 --- a/bench/tinygltf/optimized/tiny_gltf.ll +++ b/bench/tinygltf/optimized/tiny_gltf.ll @@ -108133,22 +108133,14 @@ _ZL17stbi__malloc_mad3iiii.exit: ; preds = %14, %_ZL21stbi__mul %23 = add nsw i32 %22, %2 %.11170198 = add i32 %3, -1 %24 = icmp sgt i32 %.11170198, -1 - switch i32 %23, label %.critedge [ - i32 10, label %.lr.ph258.split - i32 11, label %.lr.ph258.split - i32 12, label %.lr.ph258.split - i32 17, label %.lr.ph258.split - i32 19, label %.lr.ph258.split - i32 20, label %.lr.ph258.split - i32 28, label %.lr.ph258.split - i32 25, label %.lr.ph258.split - i32 26, label %.lr.ph258.split - i32 33, label %.lr.ph258.split - i32 34, label %.lr.ph258.split - i32 35, label %.lr.ph258.split - ] - -.lr.ph258.split: ; preds = %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258, %.lr.ph258 + %switch.tableidx = add i32 %23, -10 + %25 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond = select i1 %25, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup.preheader, label %.critedge + +switch.lookup.preheader:; preds = %.lr.ph258 %wide.trip.count = zext nneg i32 %4 to i64 br label %26 @@ -108158,8 +108150,8 @@ _ZL17stbi__malloc_mad3iiii.exit.thread: ; preds = %_ZL21stbi__mul2size store ptr @.str.117, ptr %25, align 8, !tbaa !3 br label %158 -26: ; preds = %.lr.ph258.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph258.split ], [ %indvars.iv.next, %.loopexit ] +26: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %27 = trunc nuw nsw i64 %indvars.iv to i32 %28 = mul i32 %3, %27 %29 = mul i32 %28, %1 @@ -108510,22 +108502,14 @@ define internal fastcc noundef ptr @_ZL22stbi__convert_format16Ptiijj(ptr nounde %16 = add nsw i32 %15, %2 %.11170197 = add i32 %3, -1 %17 = icmp sgt i32 %.11170197, -1 - switch i32 %16, label %.critedge [ - i32 10, label %.lr.ph257.split - i32 11, label %.lr.ph257.split - i32 12, label %.lr.ph257.split - i32 17, label %.lr.ph257.split - i32 19, label %.lr.ph257.split - i32 20, label %.lr.ph257.split - i32 28, label %.lr.ph257.split - i32 25, label %.lr.ph257.split - i32 26, label %.lr.ph257.split - i32 33, label %.lr.ph257.split - i32 34, label %.lr.ph257.split - i32 35, label %.lr.ph257.split - ] - -.lr.ph257.split: ; preds = %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257, %.lr.ph257 + %switch.tableidx = add i32 %16, -10 + %18 = icmp ult i32 %switch.tableidx, 26 + %switch.shifted = lshr i32 59082375, %switch.tableidx + %switch.lobit = trunc i32 %switch.shifted to i1 + %or.cond = select i1 %18, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup.preheader, label %.critedge + +switch.lookup.preheader:; preds = %.lr.ph257 %wide.trip.count = zext nneg i32 %4 to i64 br label %20 @@ -108535,8 +108519,8 @@ define internal fastcc noundef ptr @_ZL22stbi__convert_format16Ptiijj(ptr nounde store ptr @.str.117, ptr %19, align 8, !tbaa !3 br label %152 -20: ; preds = %.lr.ph257.split, %.loopexit - %indvars.iv = phi i64 [ 0, %.lr.ph257.split ], [ %indvars.iv.next, %.loopexit ] +20: ; preds = %switch.lookup.preheader, %.loopexit + %indvars.iv = phi i64 [ 0, %switch.lookup.preheader ], [ %indvars.iv.next, %.loopexit ] %21 = trunc nuw nsw i64 %indvars.iv to i32 %22 = mul i32 %3, %21 %23 = mul i32 %22, %1 @@ -108860,7 +108844,7 @@ define internal fastcc noundef ptr @_ZL22stbi__convert_format16Ptiijj(ptr nounde br label %152 152: ; preds = %.critedge, %5, %._crit_edge, %18 - %.0155 = phi ptr [ null, %18 ], [ %12, %._crit_edge ], [ %0, %5 ], [ null, %.critedge ] + %.0155 = phi ptr [ null, %19 ], [ %12, %._crit_edge ], [ %0, %5 ], [ null, %.critedge ] ret ptr %.0155 } @@ -138927,7 +138911,7 @@ _ZN8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stri ; Function Attrs: mustprogress uwtable define linkonce_odr noundef zeroext i1 @_ZN8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIPKcEEE12scan_commentEv(ptr noundef nonnull align 8 dereferenceable(148) %0) local_unnamed_addr #5 comdat align 2 { %2 = tail call noundef i32 @_ZN8nlohmann6detail5lexerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIPKcEEE3getEv(ptr noundef nonnull align 8 dereferenceable(148) %0) - switch i32 %2, label %.loopexit.sink.split [ + switch i32 %2, label %switch.lookup.sink.split [ i32 47, label %.preheader i32 42, label %.preheader2 ] @@ -139009,7 +138993,7 @@ define linkonce_odr noundef zeroext i1 @_ZN8nlohmann6detail5lexerINS_10basic_jso br label %.loopexit .loopexit: ; preds = %12, %.preheader, %.loopexit.sink.split - %.0 = phi i1 [ false, %.loopexit.sink.split ], [ true, %.preheader ], [ true, %12 ] + %.0 = phi i1 [ false, %switch.lookup.sink.split ], [ true, %.preheader ], [ true, %12 ] ret i1 %.0 } diff --git a/bench/tls-rs/optimized/59h61akxu6z29dlt.ll b/bench/tls-rs/optimized/59h61akxu6z29dlt.ll index 5fb7585da9f..14de3899ca8 100644 --- a/bench/tls-rs/optimized/59h61akxu6z29dlt.ll +++ b/bench/tls-rs/optimized/59h61akxu6z29dlt.ll @@ -7899,7 +7899,7 @@ switch.lookup: ; preds = %1 define hidden noundef zeroext i1 @_ZN6rustls5enums15SignatureScheme18supported_in_tls1317hb5c986ddd0a532a5E(ptr noalias noundef readonly align 2 captures(none) dereferenceable(4) %0) unnamed_addr #15 { switch.lookup: %1 = load i16, ptr %0, align 2, !range !120, !noundef !4 - %switch.cast = trunc nuw i16 %1 to i14 + %switch.cast = trunc nuw nsw i16 %1 to i14 %switch.downshift = lshr i14 4008, %switch.cast %switch.masked = trunc i14 %switch.downshift to i1 ret i1 %switch.masked @@ -19025,7 +19025,6 @@ define void @"_ZN73_$LT$rustls..enums..ContentType$u20$as$u20$rustls..msgs..code ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define { i8, i8 } @"_ZN76_$LT$rustls..enums..ContentType$u20$as$u20$core..convert..From$LT$u8$GT$$GT$4from17ha82a4b6e0fb3e657E"(i8 noundef %0) unnamed_addr #4 { -switch.lookup: %switch.tableidx = add i8 %0, -20 %spec.select = tail call i8 @llvm.umin.i8(i8 %switch.tableidx, i8 5) %1 = insertvalue { i8, i8 } poison, i8 %spec.select, 0 diff --git a/bench/tls-rs/optimized/7y9936vu35zt2sp.ll b/bench/tls-rs/optimized/7y9936vu35zt2sp.ll index c97d3e30fb1..6a2088bae7e 100644 --- a/bench/tls-rs/optimized/7y9936vu35zt2sp.ll +++ b/bench/tls-rs/optimized/7y9936vu35zt2sp.ll @@ -1656,7 +1656,7 @@ define hidden { i16, i16 } @"_ZN104_$LT$core..iter..adapters..cloned..Cloned$LT$ br label %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i" "_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i": ; preds = %7, %2 - %5 = phi ptr [ %8, %7 ], [ %.promoted.i, %2 ] + %5 = phi ptr [ %8, %8 ], [ %.promoted.i, %2 ] %6 = icmp eq ptr %5, %4 br i1 %6, label %_ZN4core4iter6traits8iterator8Iterator8try_fold17ha4c28dd445f89e3bE.llvm.403688954652204928.exit, label %7 @@ -1664,24 +1664,19 @@ define hidden { i16, i16 } @"_ZN104_$LT$core..iter..adapters..cloned..Cloned$LT$ %8 = getelementptr inbounds nuw i8, ptr %5, i64 4 store ptr %8, ptr %0, align 8, !alias.scope !522 %.val.i = load i16, ptr %5, align 2, !range !133, !noalias !519, !noundef !4 - switch i16 %.val.i, label %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i" [ - i16 3, label %.split.loop.exit18.i - i16 5, label %.split.loop.exit18.i - i16 7, label %.split.loop.exit18.i - i16 8, label %.split.loop.exit18.i - i16 9, label %.split.loop.exit18.i - i16 10, label %.split.loop.exit18.i - i16 11, label %.split.loop.exit18.i - ] - -.split.loop.exit18.i: ; preds = %7, %7, %7, %7, %7, %7, %7 - %9 = getelementptr i8, ptr %5, i64 2 - %.val13.le.i = load i16, ptr %9, align 2, !noalias !519 + %switch.cast.i.i.i.i.i.i = trunc nuw nsw i16 %.val.i to i14 + %switch.downshift.i.i.i.i.i.i = lshr i14 4008, %switch.cast.i.i.i.i.i.i + %switch.masked.i.i.i.i.i.i = trunc i14 %switch.downshift.i.i.i.i.i.i to i1 + br i1 %switch.masked.i.i.i.i.i.i, label %.split.loop.exit16.i, label %5 + +.split.loop.exit16.i:; preds = %8 + %10 = getelementptr i8, ptr %6, i64 2 + %.val13.le.i = load i16, ptr %10, align 2, !noalias !519 br label %_ZN4core4iter6traits8iterator8Iterator8try_fold17ha4c28dd445f89e3bE.llvm.403688954652204928.exit -_ZN4core4iter6traits8iterator8Iterator8try_fold17ha4c28dd445f89e3bE.llvm.403688954652204928.exit: ; preds = %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i", %.split.loop.exit18.i - %.sroa.3.0.i = phi i16 [ %.val13.le.i, %.split.loop.exit18.i ], [ undef, %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i" ] - %.sroa.0.0.i = phi i16 [ %.val.i, %.split.loop.exit18.i ], [ 14, %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i" ] +_ZN4core4iter6traits8iterator8Iterator8try_fold17ha4c28dd445f89e3bE.llvm.403688954652204928.exit: ; preds = %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit.i", %.split.loop.exit16.i + %.sroa.3.0.i = phi i16 [ %.val13.le.i, %.split.loop.exit16.i ], [ undef, %5 ] + %.sroa.0.0.i = phi i16 [ %.val.i, %.split.loop.exit16.i ], [ 14, %5 ] %10 = insertvalue { i16, i16 } poison, i16 %.sroa.0.0.i, 0 %11 = insertvalue { i16, i16 } %10, i16 %.sroa.3.0.i, 1 ret { i16, i16 } %11 @@ -3606,7 +3601,7 @@ define hidden { i16, i16 } @_ZN4core4iter6traits8iterator8Iterator8try_fold17ha4 br label %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit" "_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit": ; preds = %7, %2 - %5 = phi ptr [ %8, %7 ], [ %.promoted, %2 ] + %5 = phi ptr [ %8, %8 ], [ %.promoted, %2 ] %6 = icmp eq ptr %5, %4 br i1 %6, label %.split.loop.exit, label %7 @@ -3614,24 +3609,19 @@ define hidden { i16, i16 } @_ZN4core4iter6traits8iterator8Iterator8try_fold17ha4 %8 = getelementptr inbounds nuw i8, ptr %5, i64 4 store ptr %8, ptr %0, align 8, !alias.scope !1188 %.val = load i16, ptr %5, align 2, !range !133, !noundef !4 - switch i16 %.val, label %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit" [ - i16 3, label %.split.loop.exit18 - i16 5, label %.split.loop.exit18 - i16 7, label %.split.loop.exit18 - i16 8, label %.split.loop.exit18 - i16 9, label %.split.loop.exit18 - i16 10, label %.split.loop.exit18 - i16 11, label %.split.loop.exit18 - ] - -.split.loop.exit18: ; preds = %7, %7, %7, %7, %7, %7, %7 - %9 = getelementptr i8, ptr %5, i64 2 - %.val13.le = load i16, ptr %9, align 2 + %switch.cast.i.i.i.i.i = trunc nuw nsw i16 %.val to i14 + %switch.downshift.i.i.i.i.i = lshr i14 4008, %switch.cast.i.i.i.i.i + %switch.masked.i.i.i.i.i = trunc i14 %switch.downshift.i.i.i.i.i to i1 + br i1 %switch.masked.i.i.i.i.i, label %.split.loop.exit16, label %5 + +.split.loop.exit16:; preds = %8 + %10 = getelementptr i8, ptr %6, i64 2 + %.val13.le = load i16, ptr %10, align 2 br label %.split.loop.exit -.split.loop.exit: ; preds = %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit", %.split.loop.exit18 - %.sroa.3.0 = phi i16 [ %.val13.le, %.split.loop.exit18 ], [ undef, %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit" ] - %.sroa.0.0 = phi i16 [ %.val, %.split.loop.exit18 ], [ 14, %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit" ] +.split.loop.exit: ; preds = %"_ZN4core4iter8adapters6cloned14clone_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17hf922bcf43ce581b2E.exit", %.split.loop.exit16 + %.sroa.3.0 = phi i16 [ %.val13.le, %.split.loop.exit16 ], [ undef, %5 ] + %.sroa.0.0 = phi i16 [ %.val, %.split.loop.exit16 ], [ 14, %5 ] %10 = insertvalue { i16, i16 } poison, i16 %.sroa.0.0, 0 %11 = insertvalue { i16, i16 } %10, i16 %.sroa.3.0, 1 ret { i16, i16 } %11 diff --git a/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll b/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll index c225fb81556..504b2f00d9f 100644 --- a/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll +++ b/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll @@ -8188,10 +8188,9 @@ define hidden void @_ZN5serde2de7Visitor14visit_byte_buf17hfe7764a65c537e97E(ptr ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h0b5cb8e6d07ef1c2E(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #11 { -"_ZN221_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..TemplateProcessingDeserializer$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hfbbc0aeeba76adb5E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1181 + store i8 %4, ptr %3, align 1, !alias.scope !1181 store i8 0, ptr %0, align 8, !alias.scope !1181 ret void } @@ -8305,10 +8304,9 @@ define hidden noundef align 8 ptr @_ZN5serde2de7Visitor8visit_u817h4f7938bdbf716 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h73b12f8dce0eda7aE(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #11 { -"_ZN348_$LT$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize..MetaspaceHelper$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h24de6e6a6f9280ddE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 6) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1193 + store i8 %4, ptr %3, align 1, !alias.scope !1193 store i8 0, ptr %0, align 8, !alias.scope !1193 ret void } @@ -8368,10 +8366,9 @@ define hidden noundef align 8 ptr @_ZN5serde2de7Visitor8visit_u817hcbdedf4a71f73 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hd93a4c5753707fa3E(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #11 { -"_ZN203_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..SpecialToken$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb40234b84b5cd0c7E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1205 + store i8 %4, ptr %3, align 1, !alias.scope !1205 store i8 0, ptr %0, align 8, !alias.scope !1205 ret void } @@ -28310,11 +28307,10 @@ define hidden noundef align 8 ptr @"_ZN332_$LT$$LT$tokenizers..pre_tokenizers..m ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN348_$LT$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize..MetaspaceHelper$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h24de6e6a6f9280ddE"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #11 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 6) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -29656,11 +29652,10 @@ define noundef zeroext i1 @"_ZN203_$LT$tokenizers..processors..template.._..$LT$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN203_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..SpecialToken$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb40234b84b5cd0c7E"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #11 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -30785,11 +30780,10 @@ define noundef zeroext i1 @"_ZN221_$LT$tokenizers..processors..template.._..$LT$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN221_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..TemplateProcessingDeserializer$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hfbbc0aeeba76adb5E"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #11 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -32363,10 +32357,10 @@ declare i64 @llvm.umax.i64(i64, i64) #28 declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i32(i32, i32) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #28 +declare i8 @llvm.umin.i8(i8, i8) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.umin.i8(i8, i8) #28 +declare i64 @llvm.usub.sat.i64(i64, i64) #28 attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { cold inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll b/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll index 53bf023f6f8..2a7d1080f68 100644 --- a/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll +++ b/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll @@ -129,8 +129,8 @@ define noundef ptr @_RNvYNtNtCsapf13pIxsjn_3std2fs4FileNtNtB6_2io5Write9write_al br label %7 7: ; preds = %.lr.ph, %37 - %.sroa.0.051 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.161, %37 ] - %.sroa.4.050 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.160, %37 ] + %.sroa.0.051 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.161, %39 ] + %.sroa.4.050 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.160, %39 ] %8 = call { i64, ptr } @"_ZN48_$LT$std..fs..File$u20$as$u20$std..io..Write$GT$5write17h45c60b1f6960a0cdE"(ptr noalias noundef nonnull align 4 dereferenceable(4) %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.051, i64 noundef %.sroa.4.050) %9 = extractvalue { i64, ptr } %8, 0 %10 = extractvalue { i64, ptr } %8, 1 @@ -138,40 +138,35 @@ define noundef ptr @_RNvYNtNtCsapf13pIxsjn_3std2fs4FileNtNtB6_2io5Write9write_al %11 = ptrtoint ptr %10 to i64 br i1 %switch, label %12, label %14 -.loopexit: ; preds = %12, %23, %21, %28, %16, %37, %3 - %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %16 ], [ %10, %28 ], [ %10, %21 ], [ %10, %23 ], [ @anon.db3579a736f9be73a0da082ad35180d7.4, %12 ], [ null, %37 ] +.loopexit: ; preds = %12, %25, %22, %20, %30, %37, %3 + %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %30 ], [ %10, %20 ], [ %10, %22 ], [ %10, %25 ], [ @anon.db3579a736f9be73a0da082ad35180d7.4, %12 ], [ null, %39 ] ret ptr %.sroa.04.0 12: ; preds = %7 %13 = icmp eq ptr %10, null - br i1 %13, label %.loopexit, label %17 + br i1 %13, label %.loopexit, label %16 14: ; preds = %7 %15 = and i64 %11, 3 switch i64 %15, label %default.unreachable [ i64 2, label %21 - i64 3, label %16 - i64 0, label %23 - i64 1, label %28 + i64 3, label %22 + i64 0, label %25 + i64 1, label %30 ] default.unreachable: ; preds = %14 unreachable -16: ; preds = %14 - %.mask = and i64 %11, -4294967296 - %switch42 = icmp eq i64 %.mask, 150323855360 - br i1 %switch42, label %34, label %.loopexit - -17: ; preds = %12 - %18 = icmp ult i64 %.sroa.4.050, %11 - br i1 %18, label %.noexc, label %.thread56 +16: ; preds = %12 + %17 = icmp ult i64 %.sroa.4.048, %11 + br i1 %17, label %.noexc, label %.thread56 -.noexc: ; preds = %17 +.noexc: ; preds = %16 call void @_ZN4core5slice5index26slice_start_index_len_fail17hb39beb2525eed8e3E(i64 noundef range(i64 1, 0) %11, i64 noundef range(i64 1, 0) %.sroa.4.050, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.db3579a736f9be73a0da082ad35180d7.6) #11 unreachable -.thread56: ; preds = %17 +.thread56: ; preds = %16 %19 = sub nuw i64 %.sroa.4.050, %11 %20 = getelementptr inbounds i8, ptr %.sroa.0.051, i64 %11 br label %37 @@ -179,43 +174,50 @@ default.unreachable: ; preds = %14 21: ; preds = %14 %.mask43 = and i64 %11, -4294967296 %22 = icmp eq i64 %.mask43, 17179869184 - br i1 %22, label %34, label %.loopexit + br i1 %22, label %36, label %.loopexit 23: ; preds = %14 - %24 = icmp ne ptr %10, null + %24 = icmp ult ptr %10, inttoptr (i64 176093659136 to ptr) call void @llvm.assume(i1 %24) - %25 = getelementptr inbounds nuw i8, ptr %10, i64 16 - %26 = load i8, ptr %25, align 8, !range !30, !noundef !9 - %27 = icmp eq i8 %26, 35 - br i1 %27, label %34, label %.loopexit - -28: ; preds = %14 - %29 = getelementptr i8, ptr %10, i64 -1 - %30 = icmp ne ptr %29, null - call void @llvm.assume(i1 %30) - %31 = getelementptr i8, ptr %10, i64 15 - %32 = load i8, ptr %31, align 8, !range !30, !noundef !9 - %33 = icmp eq i8 %32, 35 - br i1 %33, label %34, label %.loopexit - -34: ; preds = %28, %21, %23, %16 + %.mask = and i64 %11, -4294967296 + %24 = icmp eq i64 %.mask, 150323855360 + br i1 %24, label %36, label %.loopexit + +25: ; preds = %14 + %26 = icmp ne ptr %10, null + call void @llvm.assume(i1 %26) + %27 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %28 = load i8, ptr %27, align 8, !range !30, !noundef !9 + %29 = icmp eq i8 %28, 35 + br i1 %29, label %36, label %.loopexit + +30:; preds = %14 + %31 = getelementptr i8, ptr %10, i64 -1 + %32 = icmp ne ptr %31, null + call void @llvm.assume(i1 %32) + %33 = getelementptr i8, ptr %10, i64 15 + %34 = load i8, ptr %33, align 8, !range !30, !noundef !9 + %35 = icmp eq i8 %34, 35 + br i1 %35, label %36, label %.loopexit + +36: ; preds = %30, %20, %22, %25 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !31 call void @_RINvNtNtNtCsapf13pIxsjn_3std2io5error14repr_bitpacked11decode_reprINtNtCs68wO5nsWeTG_5alloc5boxed3BoxNtB4_6CustomENCNvXs1_B2_NtB2_4ReprNtNtNtCs1LoaDTb72WA_4core3ops4drop4Drop4drop0ECslOtZNRIhnDi_7pidlock.llvm.10760115039776594612(ptr noalias noundef nonnull sret([16 x i8]) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %10), !noalias !31 %35 = load i8, ptr %4, align 8, !range !38, !alias.scope !39, !noalias !31, !noundef !9 %switch.not.i.i.i.i = icmp eq i8 %35, 3 br i1 %switch.not.i.i.i.i, label %36, label %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit -36: ; preds = %34 +36: ; preds = %36 call void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs68wO5nsWeTG_5alloc5boxed3BoxNtNtNtCsapf13pIxsjn_3std2io5error6CustomEECslOtZNRIhnDi_7pidlock.llvm.10760115039776594612(ptr noalias noundef nonnull align 8 dereferenceable(8) %6), !noalias !31 br label %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit -_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit: ; preds = %34, %36 +_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit: ; preds = %36, %36 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !31 br label %37 37: ; preds = %.thread56, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit - %.sroa.0.161 = phi ptr [ %20, %.thread56 ], [ %.sroa.0.051, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] - %.sroa.4.160 = phi i64 [ %19, %.thread56 ], [ %.sroa.4.050, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] + %.sroa.0.161 = phi ptr [ %20, %.thread ], [ %.sroa.0.051, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] + %.sroa.4.160 = phi i64 [ %19, %.thread ], [ %.sroa.4.050, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] %38 = icmp eq i64 %.sroa.4.160, 0 br i1 %38, label %.loopexit, label %7 } diff --git a/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll b/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll index 880e63d0a17..72a5ab8745a 100644 --- a/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll +++ b/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll @@ -1070,21 +1070,20 @@ define noundef zeroext i1 @"_ZN214_$LT$uv_distribution_filename..source_dist.._. ; Function Attrs: nonlazybind uwtable define void @"_ZN99_$LT$uv_distribution_filename..source_dist..SourceDistFilename$u20$as$u20$rkyv..traits..Archive$GT$7resolve17hc842015c6dcd31ffE"(ptr noalias noundef readonly align 8 dereferenceable(32) %0, ptr noalias noundef readonly align 4 captures(none) dereferenceable(16) %1, ptr noundef nonnull %2, i64 noundef %3) unnamed_addr #1 { -"_ZN24uv_distribution_filename9extension1_108_$LT$impl$u20$rkyv..traits..Archive$u20$for$u20$uv_distribution_filename..extension..SourceDistExtension$GT$7resolve17h182617a99eb3cec8E.exit": - %4 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %5 = load i32, ptr %4, align 4, !noundef !3 - tail call void @"_ZN81_$LT$uv_normalize..package_name..PackageName$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h2ebb7d39ca33054fE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %0, i32 noundef %5, ptr noundef nonnull %2, i64 noundef %3) - %6 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %7 = add i64 %3, 8 - %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %9 = load i32, ptr %1, align 4, !range !144, !noundef !3 - %10 = getelementptr inbounds nuw i8, ptr %1, i64 4 - %11 = load i32, ptr %10, align 4 - tail call void @"_ZN69_$LT$uv_pep440..version..Version$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h3fa1168dfe755ec1E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %8, i32 noundef %9, i32 %11, ptr noundef nonnull %6, i64 noundef %7) - %12 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 12 - %14 = load i8, ptr %13, align 4, !range !145, !noundef !3 - store i8 %14, ptr %12, align 1 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %6 = load i32, ptr %5, align 4, !noundef !3 + tail call void @"_ZN81_$LT$uv_normalize..package_name..PackageName$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h2ebb7d39ca33054fE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %0, i32 noundef %6, ptr noundef nonnull %2, i64 noundef %3) + %7 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %8 = add i64 %3, 8 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %10 = load i32, ptr %1, align 4, !range !144, !noundef !3 + %11 = getelementptr inbounds nuw i8, ptr %1, i64 4 + %12 = load i32, ptr %11, align 4 + tail call void @"_ZN69_$LT$uv_pep440..version..Version$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h3fa1168dfe755ec1E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %9, i32 noundef %10, i32 %12, ptr noundef nonnull %7, i64 noundef %8) + %13 = getelementptr inbounds nuw i8, ptr %2, i64 40 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 12 + %15 = load i8, ptr %14, align 4, !range !145, !noundef !3 + store i8 %15, ptr %13, align 1 ret void } diff --git a/bench/vcpkg/optimized/packagespec.ll b/bench/vcpkg/optimized/packagespec.ll index aa627160150..23a1bbcadec 100644 --- a/bench/vcpkg/optimized/packagespec.ll +++ b/bench/vcpkg/optimized/packagespec.ll @@ -3383,23 +3383,25 @@ _ZN5vcpkg7details19OptionalStorageDtorINSt7__cxx1112basic_stringIcSt11char_trait 94: ; preds = %89 %95 = extractvalue { ptr, i64 } %90, 1 %.not = icmp eq i64 %95, 0 - br i1 %.not, label %96, label %_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread + br i1 %.not, label %96, label %99 96: ; preds = %94 - switch i32 %91, label %_ZN5vcpkg10ParserBase10is_lineendEDi.exit [ - i32 13, label %_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread - i32 10, label %_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread - i32 -1, label %_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread - ] - -_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread: ; preds = %96, %96, %96, %94 + %switch.tableidx.i = add i32 %91, 1 + %97 = icmp ult i32 %switch.tableidx.i, 15 + %switch.cast.i = trunc i32 %switch.tableidx.i to i15 + %switch.downshift.i = lshr i15 -14335, %switch.cast.i + %switch.masked.i = trunc i15 %switch.downshift.i to i1 + %98 = select i1 %97, i1 %switch.masked.i, i1 false + br i1 %98, label %99, label %_ZN5vcpkg10ParserBase10is_lineendEDi.exit + +99: ; preds = %96, %94 call void @llvm.lifetime.start.p0(ptr nonnull %5) %.sroa.03.0.copyload = load i64, ptr @_ZN5vcpkg30msgExpectedFeatureListTerminalE, align 8, !tbaa !53 call void @_ZN5vcpkg3msg6formatIJEJEEENS_15LocalizedStringENS0_8MessageTIJDpT_EEEDpNS0_6TagArgINS_8identityIS4_E4typeET0_EE(ptr dead_on_unwind nonnull writable sret(%"struct.vcpkg::LocalizedString") align 8 %5, i64 %.sroa.03.0.copyload) invoke void @_ZN5vcpkg10ParserBase9add_errorEONS_15LocalizedStringE(ptr noundef nonnull align 8 dereferenceable(176) %2, ptr noundef nonnull align 8 dereferenceable(32) %5) - to label %97 unwind label %106 + to label %100 unwind label %106 -97: ; preds = %_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread +97: ; preds = %99 %98 = load ptr, ptr %5, align 8, !tbaa !17 %99 = getelementptr inbounds nuw i8, ptr %5, i64 16 %100 = icmp eq ptr %98, %99 @@ -3422,7 +3424,7 @@ _ZN5vcpkg15LocalizedStringD2Ev.exit: ; preds = %_ZNKSt7__cxx1112bas call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.thread -106: ; preds = %_ZN5vcpkg10ParserBase10is_lineendEDi.exit.thread +106: ; preds = %99 %107 = landingpad { ptr, i32 } cleanup %108 = load ptr, ptr %5, align 8, !tbaa !17 @@ -3452,7 +3454,7 @@ _ZN5vcpkg10ParserBase10is_lineendEDi.exit: ; preds = %96 %.sroa.0.0.copyload = load i64, ptr @_ZN5vcpkg32msgInvalidCharacterInFeatureListE, align 8, !tbaa !53 call void @_ZN5vcpkg3msg6formatIJEJEEENS_15LocalizedStringENS0_8MessageTIJDpT_EEEDpNS0_6TagArgINS_8identityIS4_E4typeET0_EE(ptr dead_on_unwind nonnull writable sret(%"struct.vcpkg::LocalizedString") align 8 %6, i64 %.sroa.0.0.copyload) invoke void @_ZN5vcpkg10ParserBase9add_errorEONS_15LocalizedStringE(ptr noundef nonnull align 8 dereferenceable(176) %2, ptr noundef nonnull align 8 dereferenceable(32) %6) - to label %116 unwind label %125 + to label %120 unwind label %125 116: ; preds = %_ZN5vcpkg10ParserBase10is_lineendEDi.exit %117 = load ptr, ptr %6, align 8, !tbaa !17 diff --git a/bench/velox/optimized/PlanNode.ll b/bench/velox/optimized/PlanNode.ll index 5959d842bf5..9538f435d61 100644 --- a/bench/velox/optimized/PlanNode.ll +++ b/bench/velox/optimized/PlanNode.ll @@ -71060,11 +71060,12 @@ _ZNSt10shared_ptrIKN8facebook5velox4core10ITypedExprEED2Ev.exit: ; preds = %_ZNS br i1 %nullAware, label %if.then, label %if.end23 if.then: ; preds = %_ZNSt10shared_ptrIKN8facebook5velox4core10ITypedExprEED2Ev.exit - switch i32 %joinType, label %if.then9 [ - i32 8, label %if.end - i32 5, label %if.end - i32 7, label %if.end - ] + %52 = icmp ult i32 %joinType, 9 + %switch.cast.i = trunc i32 %joinType to i9 + %switch.downshift.i = lshr i9 -96, %switch.cast.i + %switch.masked.i = trunc i9 %switch.downshift.i to i1 + %53 = select i1 %52, i1 %switch.masked.i, i1 false + br i1 %53, label %if.end, label %if.then9 if.then9: ; preds = %if.then tail call void @llvm.trap() @@ -71079,7 +71080,7 @@ lpad: ; preds = %entry call void @_ZNSt10shared_ptrIKN8facebook5velox4core10ITypedExprEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %agg.tmp) #32 resume { ptr, i32 } %52 -if.end: ; preds = %if.then, %if.then, %if.then +if.end: ; preds = %if.then %leftKeys_ = getelementptr inbounds nuw i8, ptr %this, i64 48 %_M_finish.i = getelementptr inbounds nuw i8, ptr %this, i64 56 %53 = load ptr, ptr %_M_finish.i, align 8 diff --git a/bench/verilator/optimized/V3Active.ll b/bench/verilator/optimized/V3Active.ll index a43bcbd7f85..8277e27208d 100644 --- a/bench/verilator/optimized/V3Active.ll +++ b/bench/verilator/optimized/V3Active.ll @@ -7336,52 +7336,55 @@ define linkonce_odr dso_local void @_ZN23ActiveLatchCheckVisitor5visitEP9AstVarR 7: ; preds = %2 %8 = getelementptr inbounds nuw i8, ptr %4, i64 248 %.sroa.0.0.copyload.i.i = load i8, ptr %8, align 8, !tbaa !230 - %.off.i.i = add i8 %.sroa.0.0.copyload.i.i, -4 - %switch.i.i = icmp ult i8 %.off.i.i, 11 - br i1 %switch.i.i, label %9, label %_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit - -9: ; preds = %7 - %10 = getelementptr inbounds nuw i8, ptr %4, i64 260 - %11 = load i64, ptr %10, align 4 - %12 = and i64 %11, 40960 - %or.cond.not = icmp eq i64 %12, 0 - br i1 %or.cond.not, label %13, label %_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit - -13: ; preds = %9 - %14 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %15 = getelementptr inbounds nuw i8, ptr %4, i64 112 - %16 = load i32, ptr %15, align 8, !tbaa !145 - %17 = load i32, ptr @_ZN12VNUser1InUse12s_userCntGblE, align 4, !tbaa !38 - %18 = icmp ne i32 %16, %17 - %19 = getelementptr inbounds nuw i8, ptr %4, i64 104 - %20 = load i64, ptr %19, align 8 - %21 = inttoptr i64 %20 to ptr - %.not7.i = icmp eq i64 %20, 0 - %.not.i = select i1 %18, i1 true, i1 %.not7.i - br i1 %.not.i, label %22, label %24 - -22: ; preds = %13 - %23 = tail call noundef ptr @_ZN16LatchDetectGraph15addOutputVertexEP9AstVarRef(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull %1) - br label %24 - -24: ; preds = %22, %13 - %.0.i = phi ptr [ %23, %22 ], [ %21, %13 ] - %25 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #30 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %27 = load ptr, ptr %26, align 8, !tbaa !174 - store ptr getelementptr inbounds nuw inrange(-16, 72) (i8, ptr @_ZTV11V3GraphEdge, i64 16), ptr %25, align 8, !tbaa !15 - %28 = getelementptr inbounds nuw i8, ptr %25, i64 8 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %28, i8 0, i64 32, i1 false) - invoke void @_ZN11V3GraphEdge4initEP7V3GraphP13V3GraphVertexS3_ib(ptr noundef nonnull align 8 dereferenceable(72) %25, ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef %27, ptr noundef %.0.i, i32 noundef 1, i1 noundef zeroext false) - to label %_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit unwind label %29 + %9 = icmp ult i8 %.sroa.0.0.copyload.i.i, 15 + %switch.cast.i.i = zext nneg i8 %.sroa.0.0.copyload.i.i to i15 + %switch.downshift.i.i = lshr i15 -16, %switch.cast.i.i + %switch.masked.i.i = trunc i15 %switch.downshift.i.i to i1 + %10 = select i1 %9, i1 %switch.masked.i.i, i1 false + br i1 %10, label %11, label %_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit -29: ; preds = %24 - %30 = landingpad { ptr, i32 } +29: ; preds = %7 + %12 = getelementptr inbounds nuw i8, ptr %4, i64 260 + %13 = load i64, ptr %12, align 4 + %14 = and i64 %13, 40960 + %or.cond.not = icmp eq i64 %14, 0 + br i1 %or.cond.not, label %15, label %_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit + +15: ; preds = %11 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %17 = getelementptr inbounds nuw i8, ptr %4, i64 112 + %18 = load i32, ptr %17, align 8, !tbaa !145 + %19 = load i32, ptr @_ZN12VNUser1InUse12s_userCntGblE, align 4, !tbaa !38 + %20 = icmp ne i32 %18, %19 + %21 = getelementptr inbounds nuw i8, ptr %4, i64 104 + %22 = load i64, ptr %21, align 8 + %23 = inttoptr i64 %22 to ptr + %.not7.i = icmp eq i64 %22, 0 + %.not.i = select i1 %20, i1 true, i1 %.not7.i + br i1 %.not.i, label %24, label %26 + +24: ; preds = %15 + %25 = tail call noundef ptr @_ZN16LatchDetectGraph15addOutputVertexEP9AstVarRef(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull %1) + br label %26 + +26: ; preds = %24, %15 + %.0.i = phi ptr [ %25, %24 ], [ %23, %15 ] + %27 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #30 + %28 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %29 = load ptr, ptr %28, align 8, !tbaa !174 + store ptr getelementptr inbounds nuw inrange(-16, 72) (i8, ptr @_ZTV11V3GraphEdge, i64 16), ptr %27, align 8, !tbaa !15 + %30 = getelementptr inbounds nuw i8, ptr %27, i64 8 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %30, i8 0, i64 32, i1 false) + invoke void @_ZN11V3GraphEdge4initEP7V3GraphP13V3GraphVertexS3_ib(ptr noundef nonnull align 8 dereferenceable(72) %27, ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef %29, ptr noundef %.0.i, i32 noundef 1, i1 noundef zeroext false) + to label %_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit unwind label %31 + +31: ; preds = %26 + %32 = landingpad { ptr, i32 } cleanup - tail call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 72) #25 - resume { ptr, i32 } %30 + tail call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 72) #25 + resume { ptr, i32 } %32 -_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit: ; preds = %9, %7, %2, %24 +_ZN16LatchDetectGraph13addAssignmentEP9AstVarRef.exit: ; preds = %29, %7, %2, %26 ret void } diff --git a/bench/verilator/optimized/V3Gate.ll b/bench/verilator/optimized/V3Gate.ll index f2289bccc8d..f63d13ebb2b 100644 --- a/bench/verilator/optimized/V3Gate.ll +++ b/bench/verilator/optimized/V3Gate.ll @@ -17215,31 +17215,34 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit63: ; preds = %_ZN %106 = load ptr, ptr %105, align 8, !tbaa !48 %107 = getelementptr inbounds nuw i8, ptr %106, i64 249 %108 = load i8, ptr %107, align 1, !tbaa !199 - %.off.i.i = add i8 %108, -2 - %switch.i.i = icmp ult i8 %.off.i.i, 3 - br i1 %switch.i.i, label %109, label %_ZN6V3ListI13V3GraphVertexXadL_ZNS0_5linksEvEES0_E19SimpleItertatorImplIS0_Lb0EEppEv.exit - -109: ; preds = %102 + %109 = icmp ult i8 %108, 5 + %switch.cast.i.i = trunc i8 %108 to i5 + %switch.downshift.i.i = lshr i5 -4, %switch.cast.i.i + %switch.masked.i.i = trunc i5 %switch.downshift.i.i to i1 + %110 = select i1 %109, i1 %switch.masked.i.i, i1 false + br i1 %110, label %111, label %_ZN6V3ListI13V3GraphVertexXadL_ZNS0_5linksEvEES0_E19SimpleItertatorImplIS0_Lb0EEppEv.exit + +111: ; preds = %102 invoke void @_ZN10GateDedupe5visitEP13GateVarVertex(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull %.sroa.066.086) to label %_ZN6V3ListI13V3GraphVertexXadL_ZNS0_5linksEvEES0_E19SimpleItertatorImplIS0_Lb0EEppEv.exit unwind label %110 -110: ; preds = %.lr.ph88, %109 +110: ; preds = %.lr.ph88, %111 %111 = landingpad { ptr, i32 } cleanup br label %112 -_ZN6V3ListI13V3GraphVertexXadL_ZNS0_5linksEvEES0_E19SimpleItertatorImplIS0_Lb0EEppEv.exit: ; preds = %98, %102, %109, %97 +_ZN6V3ListI13V3GraphVertexXadL_ZNS0_5linksEvEES0_E19SimpleItertatorImplIS0_Lb0EEppEv.exit: ; preds = %98, %102, %111, %97 %.sroa.066.0 = load ptr, ptr %91, align 8, !tbaa !31 %.not78 = icmp eq ptr %.sroa.066.0, null br i1 %.not78, label %._crit_edge89, label %.lr.ph88 112: ; preds = %110, %60, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit63, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit54, %32 - %.pn40.pn.pn = phi { ptr, i32 } [ %.pn30, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit63 ], [ %33, %32 ], [ %.pn, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit54 ], [ %61, %60 ], [ %111, %110 ] + %.pn40.pn.pn = phi { ptr, i32 } [ %.pn30, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit63 ], [ %33, %32 ], [ %.pn, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit54 ], [ %61, %60 ], [ %111, %112 ] call void @_ZN14GateDedupeHashD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %7) #28 br label %113 113: ; preds = %112, %30 - %.pn40.pn.pn.pn = phi { ptr, i32 } [ %.pn40.pn.pn, %112 ], [ %31, %30 ] + %.pn40.pn.pn.pn = phi { ptr, i32 } [ %.pn40.pn.pn, %114 ], [ %31, %30 ] call void @_ZN12VNUser2InUseD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) #28 resume { ptr, i32 } %.pn40.pn.pn.pn } @@ -18315,9 +18318,12 @@ _ZN13GateOkVisitorD2Ev.exit190: ; preds = %404, %401, %91 define linkonce_odr dso_local noundef zeroext i1 @_ZNK6AstVar10isWritableEv(ptr noundef nonnull align 8 dereferenceable(280) %0) #3 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 249 %3 = load i8, ptr %2, align 1, !tbaa !199 - %.off.i = add i8 %3, -2 - %switch.i = icmp ult i8 %.off.i, 3 - ret i1 %switch.i + %4 = icmp ult i8 %3, 5 + %switch.cast.i = trunc i8 %3 to i5 + %switch.downshift.i = lshr i5 -4, %switch.cast.i + %switch.masked.i = trunc i5 %switch.downshift.i to i1 + %5 = select i1 %4, i1 %switch.masked.i, i1 false + ret i1 %5 } ; Function Attrs: mustprogress nounwind uwtable @@ -20747,11 +20753,13 @@ _ZZN10GateDedupe5visitEP13GateVarVertexENKUlP13AstNodeVarRefE_clES3_.exit: ; pre ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr dso_local noundef zeroext i1 @_ZNK10VDirection10isWritableEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #5 comdat align 2 { -switch.edge: - %1 = load i8, ptr %0, align 1, !tbaa !199 - %.off = add i8 %1, -2 - %switch = icmp ult i8 %.off, 3 - ret i1 %switch + %2 = load i8, ptr %0, align 1, !tbaa !199 + %3 = icmp ult i8 %2, 5 + %switch.cast = trunc i8 %2 to i5 + %switch.downshift = lshr i5 -4, %switch.cast + %switch.masked = trunc i5 %switch.downshift to i1 + %4 = select i1 %3, i1 %switch.masked, i1 false + ret i1 %4 } ; Function Attrs: mustprogress uwtable diff --git a/bench/verilator/optimized/V3MergeCond.ll b/bench/verilator/optimized/V3MergeCond.ll index ff8b5004fbc..834a153e020 100644 --- a/bench/verilator/optimized/V3MergeCond.ll +++ b/bench/verilator/optimized/V3MergeCond.ll @@ -9419,16 +9419,10 @@ _ZNK7AstNode6isWideEv.exit: ; preds = %tailrecurse _ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit: ; preds = %tailrecurse, %_ZNK7AstNode6isWideEv.exit %11 = getelementptr inbounds nuw i8, ptr %.tr, i64 64 %.sroa.0.0.copyload.i.i.i = load i16, ptr %11, align 8, !tbaa !162 - switch i16 %.sroa.0.0.copyload.i.i.i, label %_ZN7AstNode11privateCastI11AstNodeBiopPKS_EEPKT_S3_.exit [ + switch i16 %.sroa.0.0.copyload.i.i.i, label %_ZN7AstNode9privateIsI5AstEqPKS_EEbS3_.exit [ i16 97, label %12 i16 320, label %16 i16 199, label %31 - i16 206, label %.thread137 - i16 212, label %.thread137 - i16 179, label %.thread137 - i16 183, label %.thread137 - i16 168, label %.thread137 - i16 172, label %.thread137 ] 12: ; preds = %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit @@ -9525,8 +9519,13 @@ _ZN7AstNode11privateCastI9AstVarRefP11AstNodeExprEEPT_PS_.exit.thread: ; preds = br label %.thread137 _ZN7AstNode11privateCastI11AstNodeBiopPKS_EEPKT_S3_.exit: ; preds = %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit - %62 = add i16 %.sroa.0.0.copyload.i.i.i, -237 - %spec.select.i.i = icmp ult i16 %62, -82 + %62 = add i16 %.sroa.0.0.copyload.i.i.i, -168 + %spec.select.i.i = icmp ult i16 %62, 45 + br i1 %62, label %switch.hole_check, label %_ZN7AstNode11privateCastI11AstNodeBiopPKS_EEPKT_S3_.exit + +_ZN7AstNode11privateCastI11AstNodeBiopPKS_EEPKT_S3_.exit: ; preds = %switch.hole_check, %_ZN7AstNode9privateIsI5AstEqPKS_EEbS3_.exit + %63 = add i16 %.sroa.0.0.copyload.i.i.i, -237 + %spec.select.i.i = icmp ult i16 %63, -82 br i1 %spec.select.i.i, label %_ZN7AstNode11privateCastI11AstNodeCondPKS_EEPKT_S3_.exit, label %_ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit _ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit: ; preds = %_ZN7AstNode11privateCastI11AstNodeBiopPKS_EEPKT_S3_.exit @@ -9544,7 +9543,7 @@ _ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit: ; preds = %_ZN7AstNode11privat br i1 %66, label %.thread137, label %tailrecurse.backedge tailrecurse.backedge: ; preds = %63, %73, %68 - %.sink = phi i64 [ 32, %68 ], [ 40, %73 ], [ 32, %63 ] + %.sink = phi i64 [ 32, %69 ], [ 40, %74 ], [ 32, %64 ] %67 = getelementptr inbounds nuw i8, ptr %.tr, i64 %.sink %.tr.be = load ptr, ptr %67, align 8, !tbaa !77 br label %tailrecurse @@ -9577,12 +9576,18 @@ _ZN7AstNode11privateCastI8AstCCastPKS_EEPKT_S3_.exit: ; preds = %_ZN7AstNode11pr br label %82 82: ; preds = %_ZN7AstNode11privateCastI8AstCCastPKS_EEPKT_S3_.exit, %78 - %.9 = phi i1 [ %81, %78 ], [ undef, %_ZN7AstNode11privateCastI8AstCCastPKS_EEPKT_S3_.exit ] + %.9 = phi i1 [ %81, %79 ], [ undef, %_ZN7AstNode11privateCastI8AstCCastPKS_EEPKT_S3_.exit ] %spec.select86 = and i1 %77, %.9 br label %.thread137 -.thread137: ; preds = %73, %63, %68, %_ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit, %57, %.thread143, %16, %27, %_ZNK7AstNode8widthMinEv.exit, %12, %82 - %.1 = phi i1 [ %15, %12 ], [ %spec.select86, %82 ], [ %30, %27 ], [ false, %_ZNK7AstNode8widthMinEv.exit ], [ false, %16 ], [ true, %57 ], [ false, %.thread143 ], [ true, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit ], [ true, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit ], [ true, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit ], [ true, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit ], [ true, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit ], [ true, %_ZN7AstNode11privateCastI8AstConstPKS_EEPKT_S3_.exit ], [ false, %73 ], [ true, %63 ], [ false, %68 ], [ false, %_ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit ] +.thread137: ; preds = %_ZN7AstNode9privateIsI5AstEqPKS_EEbS3_.exit + %switch.maskindex = zext nneg i16 %62 to i64 + %switch.shifted = lshr i64 17867063986193, %switch.maskindex + %switch.lobit = trunc i64 %switch.shifted to i1 + br i1 %switch.lobit, label %.thread137, label %_ZN7AstNode11privateCastI11AstNodeBiopPKS_EEPKT_S3_.exit + +.thread137: ; preds = %switch.hole_check, %74, %64, %69, %_ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit, %57, %.thread143, %16, %27, %_ZNK7AstNode8widthMinEv.exit, %12, %83 + %.1 = phi i1 [ %15, %12 ], [ %spec.select86, %83 ], [ %30, %27 ], [ false, %_ZNK7AstNode8widthMinEv.exit ], [ false, %16 ], [ true, %57 ], [ false, %.thread143 ], [ false, %74 ], [ true, %64 ], [ false, %69 ], [ false, %_ZN7AstNode9privateIsI6AstAndPKS_EEbS3_.exit ], [ true, %switch.hole_check ] ret i1 %.1 } diff --git a/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll b/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll index 78ff245f60a..14c7dfa3689 100644 --- a/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll +++ b/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll @@ -189,13 +189,13 @@ define { i32, i32 } @_ZN8wasmi_ir9primitive19ComparatorAndOffset3new17h581df51a5 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define { i32, i32 } @_ZN8wasmi_ir9primitive19ComparatorAndOffset8from_u6417h319113588d3c6badE(i64 noundef %0) unnamed_addr #0 { -"_ZN85_$LT$wasmi_ir..primitive..Comparator$u20$as$u20$core..convert..TryFrom$LT$u32$GT$$GT$8try_from17hc348f4b912607b8dE.exit": - %1 = lshr i64 %0, 32 - %2 = trunc nuw i64 %1 to i32 - %. = tail call i32 @llvm.umin.i32(i32 %2, i32 36) - %3 = trunc i64 %0 to i32 - %4 = insertvalue { i32, i32 } poison, i32 %., 0 - %5 = insertvalue { i32, i32 } %4, i32 %3, 1 + %2 = trunc i64 %0 to i32 + %3 = icmp ugt i64 %0, 154618822655 + %4 = lshr i64 %0, 32 + %5 = trunc nuw nsw i64 %4 to i32 + %.sroa.02.0 = select i1 %3, i32 36, i32 %5 + %4 = insertvalue { i32, i32 } poison, i32 %.sroa.02.0, 0 + %5 = insertvalue { i32, i32 } %4, i32 %2, 1 ret { i32, i32 } %5 } @@ -335,7 +335,7 @@ define noundef double @"_ZN8wasmi_ir9primitive97_$LT$impl$u20$core..convert..Fro } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable -define range(i64 512, 150323855874) i64 @"_ZN85_$LT$wasmi_ir..primitive..Comparator$u20$as$u20$core..convert..TryFrom$LT$u32$GT$$GT$8try_from17hc348f4b912607b8dE"(i32 noundef %0) unnamed_addr #0 { +define range(i64 512, 9223372032559809536) i64 @"_ZN85_$LT$wasmi_ir..primitive..Comparator$u20$as$u20$core..convert..TryFrom$LT$u32$GT$$GT$8try_from17hc348f4b912607b8dE"(i32 noundef %0) unnamed_addr #0 { %2 = icmp ugt i32 %0, 35 %switch.idx.cast = zext i32 %0 to i64 %switch.idx.mult = shl nuw nsw i64 %switch.idx.cast, 32 @@ -513,17 +513,13 @@ declare noundef i16 @"_ZN91_$LT$wasmi_ir..immeditate..Const16$LT$i64$GT$$u20$as$ ; Function Attrs: nonlazybind uwtable declare noundef i16 @"_ZN91_$LT$wasmi_ir..immeditate..Const16$LT$u32$GT$$u20$as$u20$core..convert..From$LT$u16$GT$$GT$4from17hc820375e6c5ac165E"(i16 noundef) unnamed_addr #1 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #6 - attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #4 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #7 = { noreturn } +attributes #6 = { noreturn } !llvm.module.flags = !{!0, !1} !llvm.ident = !{!2} diff --git a/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll b/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll index 7879ee51996..1c7d70b994a 100644 --- a/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll +++ b/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll @@ -14018,33 +14018,34 @@ define internal fastcc void @_ZN16wasmtime_environ4fact10HelperType9push_flat17h "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph": ; preds = %34 %40 = getelementptr inbounds nuw i8, ptr %1, i64 16 %41 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %.pre = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423 br label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph", %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" - %.sroa.0.013 = phi ptr [ %spec.select.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph" ], [ %42, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" ] - %42 = getelementptr inbounds nuw i8, ptr %.sroa.0.013, i64 1 - %43 = load i8, ptr %.sroa.0.013, align 1, !range !1290, !noundef !4 - %narrow = add nuw nsw i8 %43, 13 - %switch.offset = zext nneg i8 %narrow to i32 - %44 = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423, !noundef !4 + %.sroa.0.013 = phi i64 [ %.pre, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph" ], [ %52, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" ] + %.sroa.0.013 = phi ptr [ %spec.select.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph" ], [ %43, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" ] + %43 = getelementptr inbounds nuw i8, ptr %.sroa.0.013, i64 1 + %44 = load i8, ptr %.sroa.0.013, align 1, !range !1290, !noundef !4 + %narrow = add nuw nsw i8 %44, 13 + %switch.offset.i = zext nneg i8 %narrow to i32 %45 = load i64, ptr %1, align 8, !alias.scope !2420, !noalias !2423, !noundef !4 - %46 = icmp eq i64 %44, %45 + %46 = icmp eq i64 %42, %45 br i1 %46, label %47, label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" 47: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" - tail call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17hb32100d6f7bced0bE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44), !noalias !2423 + tail call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17hb32100d6f7bced0bE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %42), !noalias !2423 %.pre.i5 = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423 br label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" "_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit", %47 - %48 = phi i64 [ %.pre.i5, %47 ], [ %44, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" ] + %48 = phi i64 [ %.pre.i5, %47 ], [ %42, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" ] %49 = load ptr, ptr %41, align 8, !alias.scope !2420, !noalias !2423, !nonnull !4, !noundef !4 %50 = getelementptr inbounds { i32, [2 x i32] }, ptr %49, i64 %48 - store i32 %switch.offset, ptr %50, align 4 + store i32 %switch.offset.i, ptr %50, align 4 %51 = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423, !noundef !4 %52 = add i64 %51, 1 store i64 %52, ptr %40, align 8, !alias.scope !2420, !noalias !2423 - %53 = icmp eq ptr %42, %38 + %53 = icmp eq ptr %43, %38 br i1 %53, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.thread", label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.thread": ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6", %34, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit" diff --git a/bench/wasmtime-rs/optimized/3tddp02mhmdocq2m.ll b/bench/wasmtime-rs/optimized/3tddp02mhmdocq2m.ll index 483395eb96e..dbf3022e535 100644 --- a/bench/wasmtime-rs/optimized/3tddp02mhmdocq2m.ll +++ b/bench/wasmtime-rs/optimized/3tddp02mhmdocq2m.ll @@ -282,11 +282,13 @@ define noundef zeroext i1 @_ZN14cranelift_isle4sema4Term22has_external_extractor } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable -define noundef zeroext i1 @_ZN14cranelift_isle4sema4Term24has_external_constructor17he6b18c5eb33b3648E(ptr readonly align 16 captures(none) %0) unnamed_addr #2 { +define zeroext i1 @_ZN14cranelift_isle4sema4Term24has_external_constructor17he6b18c5eb33b3648E(ptr readonly align 16 captures(none) %0) unnamed_addr #2 { switch.edge: %1 = load i64, ptr %0, align 16, !range !6, !noundef !4 - %switch = icmp eq i64 %1, 1 - ret i1 %switch + %switch.cast = trunc nuw nsw i64 %1 to i4 + %switch.downshift = lshr i4 2, %switch.cast + %switch.masked = trunc i4 %switch.downshift to i1 + ret i1 %switch.masked } ; Function Attrs: nonlazybind uwtable diff --git a/bench/wasmtime-rs/optimized/526qiozl2mm0d4p0.ll b/bench/wasmtime-rs/optimized/526qiozl2mm0d4p0.ll index cb7629af2d1..719a3d2f218 100644 --- a/bench/wasmtime-rs/optimized/526qiozl2mm0d4p0.ll +++ b/bench/wasmtime-rs/optimized/526qiozl2mm0d4p0.ll @@ -11476,10 +11476,13 @@ switch.lookup: ; preds = %1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define noundef range(i8 1, 3) i8 @_ZN16wasmtime_environ9component4info13FixedEncoding5width17hc795ad6859aa152aE(ptr noalias noundef readonly align 1 captures(none) dereferenceable(1) %0) unnamed_addr #9 { - %2 = load i8, ptr %0, align 1, !range !1634, !noundef !49 - %switch = icmp eq i8 %2, 1 - %. = select i1 %switch, i8 2, i8 1 - ret i8 %. +switch.lookup: + %1 = load i8, ptr %0, align 1, !range !1634, !noundef !49 + %2 = shl nuw nsw i8 %1, 3 + %switch.shiftamt = zext nneg i8 %2 to i24 + %switch.downshift = lshr i24 66049, %switch.shiftamt + %switch.masked = trunc i24 %switch.downshift to i8 + ret i8 %switch.masked } ; Function Attrs: nonlazybind uwtable diff --git a/bench/wireshark/optimized/packet-acn.ll b/bench/wireshark/optimized/packet-acn.ll index b9aae3016f0..806b214f87f 100644 --- a/bench/wireshark/optimized/packet-acn.ll +++ b/bench/wireshark/optimized/packet-acn.ll @@ -2664,19 +2664,20 @@ define internal noundef zeroext i1 @dissect_rdmnet_over_tcp_heur(ptr noundef %0, %.not16.i = icmp sgt i8 %10, -1 %..i = select i1 %.not16.i, i32 18, i32 19 %11 = tail call i32 @tvb_get_ntohl(ptr noundef %0, i32 noundef %..i) - switch i32 %11, label %is_rdmnet_over_tcp.exit.thread [ - i32 11, label %is_rdmnet_over_tcp.exit - i32 9, label %is_rdmnet_over_tcp.exit - i32 5, label %is_rdmnet_over_tcp.exit - ] - -is_rdmnet_over_tcp.exit: ; preds = %9, %9, %9 + %12 = icmp ult i32 %11, 12 + %switch.cast.i = trunc nuw nsw i32 %11 to i12 + %switch.downshift.i = lshr i12 -1504, %switch.cast.i + %switch.masked.i = trunc i12 %switch.downshift.i to i1 + %or.cond = select i1 %12, i1 %switch.masked.i, i1 false + br i1 %or.cond, label %13, label %is_rdmnet_over_tcp.exit.thread + +13: ; preds = %9 tail call void @tcp_dissect_pdus(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext true, i32 noundef 16, ptr noundef nonnull @get_rdmnet_tcp_message_length, ptr noundef nonnull @dissect_one_rdmnet_over_tcp_message, ptr noundef %3) %12 = tail call i32 @tvb_captured_length(ptr noundef %0) br label %is_rdmnet_over_tcp.exit.thread -is_rdmnet_over_tcp.exit.thread: ; preds = %9, %7, %4, %is_rdmnet_over_tcp.exit - %.0.i7 = phi i1 [ true, %is_rdmnet_over_tcp.exit ], [ false, %4 ], [ false, %7 ], [ false, %9 ] +is_rdmnet_over_tcp.exit.thread: ; preds = %9, %7, %4, %13 + %.0.i7 = phi i1 [ true, %13 ], [ false, %4 ], [ false, %7 ], [ false, %9 ] ret i1 %.0.i7 } @@ -8251,19 +8252,20 @@ define internal i32 @dissect_one_rdmnet_over_tcp_message(ptr noundef %0, ptr nou %.not16.i = icmp sgt i8 %10, -1 %..i = select i1 %.not16.i, i32 18, i32 19 %11 = tail call i32 @tvb_get_ntohl(ptr noundef %0, i32 noundef %..i) - switch i32 %11, label %is_rdmnet_over_tcp.exit.thread [ - i32 11, label %is_rdmnet_over_tcp.exit - i32 9, label %is_rdmnet_over_tcp.exit - i32 5, label %is_rdmnet_over_tcp.exit - ] - -is_rdmnet_over_tcp.exit: ; preds = %9, %9, %9 + %12 = icmp ult i32 %11, 12 + %switch.cast.i = trunc nuw nsw i32 %11 to i12 + %switch.downshift.i = lshr i12 -1504, %switch.cast.i + %switch.masked.i = trunc i12 %switch.downshift.i to i1 + %or.cond = select i1 %12, i1 %switch.masked.i, i1 false + br i1 %or.cond, label %13, label %is_rdmnet_over_tcp.exit.thread + +13: ; preds = %9 tail call fastcc void @dissect_rdmnet(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext false) %12 = tail call i32 @tvb_captured_length(ptr noundef %0) br label %is_rdmnet_over_tcp.exit.thread -is_rdmnet_over_tcp.exit.thread: ; preds = %9, %7, %4, %is_rdmnet_over_tcp.exit - %.0 = phi i32 [ %12, %is_rdmnet_over_tcp.exit ], [ 0, %4 ], [ 0, %7 ], [ 0, %9 ] +is_rdmnet_over_tcp.exit.thread: ; preds = %9, %7, %4, %13 + %.0 = phi i32 [ %12, %13 ], [ 0, %4 ], [ 0, %7 ], [ 0, %9 ] ret i32 %.0 } diff --git a/bench/wireshark/optimized/packet-optommp.ll b/bench/wireshark/optimized/packet-optommp.ll index 970a5c927da..79b8c7256a5 100644 --- a/bench/wireshark/optimized/packet-optommp.ll +++ b/bench/wireshark/optimized/packet-optommp.ll @@ -166,7 +166,6 @@ target triple = "x86_64-pc-linux-gnu" @.str.134 = private unnamed_addr constant [21 x i8] c", dest_off: 0x%012lx\00", align 1 @.str.135 = private unnamed_addr constant [25 x i8] c"data_block (as quadlets)\00", align 1 @.str.136 = private unnamed_addr constant [22 x i8] c"data_block (as bytes)\00", align 1 -@switch.table.get_optommp_message_len = private unnamed_addr constant [7 x i32] [i32 16, i32 12, i32 8, i32 12, i32 16, i32 16, i32 16], align 4 ; Function Attrs: null_pointer_is_valid sspstrong uwtable define hidden void @proto_register_optommp() local_unnamed_addr #0 { @@ -231,27 +230,31 @@ define internal range(i32 8, 65552) i32 @get_optommp_message_len(ptr readnone ca %.fr = freeze i8 %6 %7 = lshr i8 %.fr, 4 %8 = icmp ult i8 %.fr, 16 - br i1 %8, label %.fold.split, label %switch.early.test + br i1 %8, label %switch.lookup, label %switch.early.test switch.early.test: ; preds = %4 %switch.tableidx = add nsw i8 %7, -1 %9 = icmp ult i8 %switch.tableidx, 7 - br i1 %9, label %switch.lookup, label %.fold.split - -switch.lookup: ; preds = %switch.early.test - %10 = zext nneg i8 %switch.tableidx to i64 - %switch.gep = getelementptr inbounds nuw i32, ptr @switch.table.get_optommp_message_len, i64 %10 - %switch.load = load i32, ptr %switch.gep, align 4 - br label %.fold.split - -.fold.split: ; preds = %switch.early.test, %switch.lookup, %4 - %.0 = phi i32 [ 16, %4 ], [ %switch.load, %switch.lookup ], [ 8, %switch.early.test ] - switch i8 %7, label %19 [ - i8 7, label %11 - i8 1, label %11 + %switch.shifted = lshr i8 113, %switch.tableidx + %switch.lobit = trunc i8 %switch.shifted to i1 + %or.cond = select i1 %9, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup, label %10 + +10: ; preds = %switch.early.test + %11 = add nsw i8 %7, -2 + %switch.and = and i8 %11, -3 + %switch.selectcmp = icmp eq i8 %switch.and, 0 + %12 = select i1 %switch.selectcmp, i32 12, i32 8 + br label %switch.lookup + +switch.lookup:; preds = %switch.early.test, %10, %4 + %.0 = phi i32 [ 16, %4 ], [ %12, %10 ], [ 16, %switch.early.test ] + switch i8 %7, label %21 [ + i8 7, label %13 + i8 1, label %13 ] -11: ; preds = %.fold.split, %.fold.split +11: ; preds = %switch.lookup, %switch.lookup %12 = tail call i32 @tvb_reported_length_remaining(ptr noundef %1, i32 noundef %2) %13 = icmp sgt i32 %12, 13 br i1 %13, label %14, label %19 @@ -263,8 +266,8 @@ switch.lookup: ; preds = %switch.early.test %18 = add nuw nsw i32 %.0, %17 br label %19 -19: ; preds = %.fold.split, %14, %11 - %.1 = phi i32 [ %18, %14 ], [ %.0, %11 ], [ %.0, %.fold.split ] +19: ; preds = %switch.lookup, %14, %11 + %.1 = phi i32 [ %18, %16 ], [ %.0, %13 ], [ %.0, %switch.lookup ] ret i32 %.1 } diff --git a/bench/wireshark/optimized/packet-someip.ll b/bench/wireshark/optimized/packet-someip.ll index 628d3530c91..60f249e9ffc 100644 --- a/bench/wireshark/optimized/packet-someip.ll +++ b/bench/wireshark/optimized/packet-someip.ll @@ -6510,13 +6510,12 @@ define internal noundef zeroext i1 @update_someip_parameter_string_list(ptr noun 12: ; preds = %6 %13 = getelementptr inbounds nuw i8, ptr %0, i64 32 %14 = load i32, ptr %13, align 8 - %15 = tail call i32 @llvm.fshl.i32(i32 %14, i32 %14, i32 29) - %16 = icmp ult i32 %15, 5 - %switch.maskindex = trunc i32 %15 to i8 - %switch.shifted = lshr i8 23, %switch.maskindex - %switch.lobit = trunc i8 %switch.shifted to i1 - %or.cond = select i1 %16, i1 %switch.lobit, i1 false - br i1 %or.cond, label %switch.lookup, label %17 + %15 = icmp ult i32 %14, 33 + %switch.maskindex = zext nneg i32 %14 to i64 + %switch.shifted = lshr i64 4295033089, %switch.maskindex + %switch.lobit = trunc i64 %switch.shifted to i1 + %or.cond = select i1 %15, i1 %switch.lobit, i1 false + br i1 %or.cond, label %switch.lookup, label %16 17: ; preds = %12 %18 = load i32, ptr %0, align 8 @@ -6524,12 +6523,12 @@ define internal noundef zeroext i1 @update_someip_parameter_string_list(ptr noun br label %.sink.split .sink.split: ; preds = %9, %17 - %.sink = phi ptr [ %19, %17 ], [ %11, %9 ] + %.sink = phi ptr [ %19, %16 ], [ %11, %9 ] store ptr %.sink, ptr %1, align 8 br label %switch.lookup -switch.lookup: ; preds = %12, %.sink.split - %.0 = phi i1 [ false, %.sink.split ], [ true, %12 ] +switch.lookup: ; preds = %.sink.split, %12 + %.0 = phi i1 [ true, %12 ], [ false, %switch.lookup.sink.split ] ret i1 %.0 } diff --git a/bench/wireshark/optimized/show_packet_bytes_dialog.ll b/bench/wireshark/optimized/show_packet_bytes_dialog.ll index 9ebd402511a..9a8c36ab503 100644 --- a/bench/wireshark/optimized/show_packet_bytes_dialog.ll +++ b/bench/wireshark/optimized/show_packet_bytes_dialog.ll @@ -283,7 +283,6 @@ $_ZZN11QMetaTypeIdI15bytes_show_typeE14qt_metatype_idEvE11metatype_id = comdat a @_ZZN11QMetaTypeIdI15bytes_show_typeE14qt_metatype_idEvE11metatype_id = linkonce_odr local_unnamed_addr global { { i32 } } zeroinitializer, comdat, align 4 @__const._ZN11QMetaTypeIdI15bytes_show_typeE14qt_metatype_idEv.arr = private unnamed_addr constant %"struct.std::array.64" { [16 x i8] c"bytes_show_type\00" }, align 1 @.str.105 = private unnamed_addr constant [16 x i8] c"bytes_show_type\00", align 1 -@switch.table._ZN21ShowPacketBytesDialog31on_cbShowAs_currentIndexChangedEi = private unnamed_addr constant [9 x i8] c"\01\01\00\01\00\00\00\00\01", align 1 @switch.table._ZN21ShowPacketBytesDialog6saveAsEv = private unnamed_addr constant [12 x i32] [i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 2, i32 18, i32 2, i32 18, i32 18, i32 18], align 4 @_ZN21ShowPacketBytesDialogC1ER7QWidgetR11CaptureFile = unnamed_addr alias void (ptr, ptr, ptr), ptr @_ZN21ShowPacketBytesDialogC2ER7QWidgetR11CaptureFile @@ -6434,7 +6433,7 @@ _ZN7QStringD2Ev.exit119: ; preds = %208, %_ZN17QArrayDa ; Function Attrs: mustprogress nofree norecurse nosync nounwind null_pointer_is_valid sspstrong willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable define noundef zeroext i1 @_ZN21ShowPacketBytesDialog18enableShowSelectedEv(ptr noundef readnone align 8 captures(none) dereferenceable_or_null(296) %0) local_unnamed_addr #8 align 2 { %2 = load i32, ptr getelementptr inbounds nuw (i8, ptr @recent, i64 64), align 8 - switch i32 %2, label %switch.edge [ + switch i32 %2, label %6 [ i32 6, label %3 i32 0, label %3 ] @@ -6445,7 +6444,7 @@ define noundef zeroext i1 @_ZN21ShowPacketBytesDialog18enableShowSelectedEv(ptr br i1 %5, label %switch.lookup, label %switch.edge switch.lookup: ; preds = %3 - %switch.cast = trunc nuw i32 %4 to i9 + %switch.cast = trunc nuw nsw i32 %4 to i9 %switch.downshift = lshr i9 -245, %switch.cast %switch.masked = trunc i9 %switch.downshift to i1 br label %switch.edge @@ -6637,13 +6636,14 @@ _ZNK8QVariant5valueI17bytes_decode_typeEET_v.exit: ; preds = %.noexc5, %_ZNK8QVa br i1 %58, label %switch.lookup, label %_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit switch.lookup: ; preds = %56 - %59 = zext nneg i32 %57 to i64 - %switch.gep = getelementptr inbounds nuw i8, ptr @switch.table._ZN21ShowPacketBytesDialog31on_cbShowAs_currentIndexChangedEi, i64 %59 - %switch.load = load i8, ptr %switch.gep, align 1 + %switch.cast.i = trunc nuw nsw i32 %57 to i9 + %switch.downshift.i = lshr i9 -245, %switch.cast.i + %switch.masked.i = trunc i9 %switch.downshift.i to i8 + %59 = and i8 %switch.masked.i, 1 br label %_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit -_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit: ; preds = %56, %switch.lookup, %_ZNK8QVariant5valueI17bytes_decode_typeEET_v.exit - %60 = phi i8 [ 0, %_ZNK8QVariant5valueI17bytes_decode_typeEET_v.exit ], [ %switch.load, %switch.lookup ], [ 0, %56 ] +_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit: ; preds = %_ZNK8QVariant5valueI17bytes_decode_typeEET_v.exit, %56, %switch.lookup + %60 = phi i8 [ 0, %_ZNK8QVariant5valueI17bytes_decode_typeEET_v.exit ], [ %59, %switch.lookup.i ], [ 0, %56 ] %61 = getelementptr inbounds nuw i8, ptr %54, i64 40 store i8 %60, ptr %61, align 8 call void @_ZN21ShowPacketBytesDialog16updateFieldBytesEb(ptr noundef align 8 dereferenceable_or_null(296) %0, i1 noundef zeroext false) @@ -6804,13 +6804,14 @@ _ZNK8QVariant5valueI15bytes_show_typeEET_v.exit: ; preds = %.noexc5, %_ZNK8QVar br i1 %58, label %switch.lookup, label %_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit switch.lookup: ; preds = %56 - %59 = zext nneg i32 %57 to i64 - %switch.gep = getelementptr inbounds nuw i8, ptr @switch.table._ZN21ShowPacketBytesDialog31on_cbShowAs_currentIndexChangedEi, i64 %59 - %switch.load = load i8, ptr %switch.gep, align 1 + %switch.cast.i = trunc nuw nsw i32 %57 to i9 + %switch.downshift.i = lshr i9 -245, %switch.cast.i + %switch.masked.i = trunc i9 %switch.downshift.i to i8 + %59 = and i8 %switch.masked.i, 1 br label %_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit -_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit: ; preds = %56, %switch.lookup, %_ZNK8QVariant5valueI15bytes_show_typeEET_v.exit - %60 = phi i8 [ 0, %_ZNK8QVariant5valueI15bytes_show_typeEET_v.exit ], [ %switch.load, %switch.lookup ], [ 0, %56 ] +_ZN21ShowPacketBytesDialog18enableShowSelectedEv.exit: ; preds = %_ZNK8QVariant5valueI15bytes_show_typeEET_v.exit, %56, %switch.lookup + %60 = phi i8 [ 0, %_ZNK8QVariant5valueI15bytes_show_typeEET_v.exit ], [ %59, %switch.lookup.i ], [ 0, %56 ] %61 = getelementptr inbounds nuw i8, ptr %54, i64 40 store i8 %60, ptr %61, align 8 %62 = load ptr, ptr %9, align 8 diff --git a/bench/xgboost/optimized/hinge.ll b/bench/xgboost/optimized/hinge.ll index 9de58c1e8a6..7bc56a4867e 100644 --- a/bench/xgboost/optimized/hinge.ll +++ b/bench/xgboost/optimized/hinge.ll @@ -6026,19 +6026,22 @@ define linkonce_odr void @_ZNK7xgboost6common9TransformILb0EE9EvaluatorIZNKS_3ob br label %26 13: ; preds = %2 - %.off.i = add i16 %10, -2 - %switch.i = icmp ult i16 %.off.i, 3 - %14 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %15 = getelementptr inbounds nuw i8, ptr %0, i64 40 - br i1 %switch.i, label %16, label %21 - -16: ; preds = %13 + %14 = icmp ult i16 %10, 5 + %switch.cast.i = trunc i16 %10 to i5 + %switch.downshift.i = lshr i5 -4, %switch.cast.i + %switch.masked.i = trunc i5 %switch.downshift.i to i1 + %15 = select i1 %14, i1 %switch.masked.i, i1 false + %16 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %17 = getelementptr inbounds nuw i8, ptr %0, i64 40 + br i1 %15, label %18, label %23 + +18: ; preds = %13 call void @llvm.lifetime.start.p0(ptr nonnull %6) call void @llvm.lifetime.start.p0(ptr nonnull %7) store ptr %1, ptr %7, align 8, !tbaa !241 - %.sroa.0.0.copyload.i.i.i = load i64, ptr %14, align 8, !tbaa !44 + %.sroa.0.0.copyload.i.i.i = load i64, ptr %16, align 8, !tbaa !44 %17 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7xgboost16HostDeviceVectorIfE15ConstHostVectorEv(ptr noundef nonnull align 8 dereferenceable(8) %1) - %18 = load i32, ptr %15, align 8, !tbaa !98 + %18 = load i32, ptr %17, align 8, !tbaa !98 call void @llvm.lifetime.start.p0(ptr nonnull %8) store ptr %6, ptr %8, align 8, !tbaa !51 %19 = getelementptr inbounds nuw i8, ptr %8, i64 8 @@ -6055,9 +6058,9 @@ define linkonce_odr void @_ZNK7xgboost6common9TransformILb0EE9EvaluatorIZNKS_3ob call void @llvm.lifetime.start.p0(ptr nonnull %3) call void @llvm.lifetime.start.p0(ptr nonnull %4) store ptr %1, ptr %4, align 8, !tbaa !241 - %.sroa.0.0.copyload.i.i = load i64, ptr %14, align 8, !tbaa !44 + %.sroa.0.0.copyload.i.i = load i64, ptr %16, align 8, !tbaa !44 %22 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7xgboost16HostDeviceVectorIfE15ConstHostVectorEv(ptr noundef nonnull align 8 dereferenceable(8) %1) - %23 = load i32, ptr %15, align 8, !tbaa !98 + %23 = load i32, ptr %17, align 8, !tbaa !98 call void @llvm.lifetime.start.p0(ptr nonnull %5) store ptr %3, ptr %5, align 8, !tbaa !51 %24 = getelementptr inbounds nuw i8, ptr %5, i64 8 @@ -6070,7 +6073,7 @@ define linkonce_odr void @_ZNK7xgboost6common9TransformILb0EE9EvaluatorIZNKS_3ob call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %26 -26: ; preds = %16, %21, %12 +26: ; preds = %18, %21, %12 ret void } diff --git a/bench/yalantinglibs/optimized/FieldGenerator.ll b/bench/yalantinglibs/optimized/FieldGenerator.ll index cac5207708e..6dc283cf6c1 100644 --- a/bench/yalantinglibs/optimized/FieldGenerator.ll +++ b/bench/yalantinglibs/optimized/FieldGenerator.ll @@ -1062,9 +1062,9 @@ invoke.cont1.i.i.i.i: ; preds = %if.then.i.i.i.i unreachable common.resume: ; preds = %lpad.i.i.i.i29, %lpad.i.i.i.i12, %lpad.i.i.i.i - %.sink45 = phi ptr [ %17, %lpad.i.i.i.i29 ], [ %11, %lpad.i.i.i.i12 ], [ %4, %lpad.i.i.i.i ] - %.sink = phi ptr [ %18, %lpad.i.i.i.i29 ], [ %12, %lpad.i.i.i.i12 ], [ %5, %lpad.i.i.i.i ] - %common.resume.op = phi { ptr, i32 } [ %19, %lpad.i.i.i.i29 ], [ %13, %lpad.i.i.i.i12 ], [ %6, %lpad.i.i.i.i ] + %.sink45 = phi ptr [ %18, %lpad.i.i.i.i30 ], [ %11, %lpad.i.i.i.i12 ], [ %4, %lpad.i.i.i.i ] + %.sink = phi ptr [ %19, %lpad.i.i.i.i30 ], [ %12, %lpad.i.i.i.i12 ], [ %5, %lpad.i.i.i.i ] + %common.resume.op = phi { ptr, i32 } [ %19, %lpad.i.i.i.i30 ], [ %13, %lpad.i.i.i.i12 ], [ %6, %lpad.i.i.i.i ] store ptr null, ptr %.sink45, align 8 store ptr null, ptr %.sink, align 8 resume { ptr, i32 } %common.resume.op @@ -1080,20 +1080,19 @@ _ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorE call void @llvm.lifetime.end.p0(ptr nonnull %__callable.i.i.i.i) br label %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i -_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i: ; preds = %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i, %if.else +_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i: ; preds = %if.else, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i %type_.i.i = getelementptr inbounds nuw i8, ptr %f, i64 56 %7 = load i32, ptr %type_.i.i, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp.i.i) call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp3.i.i) - %switch.tableidx = add i32 %7, -3 - %8 = icmp ult i32 %switch.tableidx, 16 - %switch.maskindex = trunc i32 %switch.tableidx to i16 - %switch.shifted = lshr i16 -13273, %switch.maskindex - %switch.lobit = trunc i16 %switch.shifted to i1 - %or.cond46 = select i1 %8, i1 %switch.lobit, i1 false - br i1 %or.cond46, label %if.end13, label %if.else4 - -if.else4: ; preds = %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i + %8 = icmp ult i32 %7, 19 + %switch.cast.i = trunc i32 %7 to i19 + %switch.downshift.i = lshr i19 -106184, %switch.cast.i + %switch.masked.i = trunc i19 %switch.downshift.i to i1 + %retval.0.i = select i1 %8, i1 %switch.masked.i, i1 false + br i1 %retval.0.i, label %if.end13, label %if.else4 + +if.else4: ; preds = %_ZN9struct_pb8compiler9is_varintEPKN6google8protobuf15FieldDescriptorE.exit call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp.i.i6) call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp3.i.i7) %9 = load ptr, ptr %type_once_.i.i, align 8 @@ -1137,75 +1136,75 @@ _ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorE %.pre = load i32, ptr %type_.i.i, align 8 br label %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18 -_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18: ; preds = %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i17, %if.else4 - %14 = phi i32 [ %.pre, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i17 ], [ %7, %if.else4 ] +_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18: ; preds = %if.else4, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i17 + %14 = phi i32 [ %7, %if.else4 ], [ %.pre, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i17 ] call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp.i.i6) call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp3.i.i7) - switch i32 %14, label %if.else7 [ - i32 6, label %if.end13 - i32 16, label %if.end13 - i32 1, label %if.end13 - ] - -if.else7: ; preds = %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18 - call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp.i.i23) - call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp3.i.i24) - %15 = load ptr, ptr %type_once_.i.i, align 8 - %tobool.not.i.i26 = icmp eq ptr %15, null - br i1 %tobool.not.i.i26, label %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35, label %if.then.i.i27 - -if.then.i.i27: ; preds = %if.else7 - store ptr @_ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_, ptr %ref.tmp.i.i23, align 8 - store ptr %f, ptr %ref.tmp3.i.i24, align 8 + %15 = icmp ult i32 %14, 17 + %switch.cast.i19 = trunc i32 %14 to i17 + %switch.downshift.i20 = lshr i17 -65470, %switch.cast.i19 + %switch.masked.i21 = trunc i17 %switch.downshift.i20 to i1 + %retval.0.i22 = select i1 %15, i1 %switch.masked.i21, i1 false + br i1 %retval.0.i22, label %if.end13, label %if.else7 + +if.else7:; preds = %_ZN9struct_pb8compiler6is_i64EPKN6google8protobuf15FieldDescriptorE.exit + call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp.i.i24) + call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp3.i.i25) + %16 = load ptr, ptr %type_once_.i.i, align 8 + %tobool.not.i.i27 = icmp eq ptr %16, null + br i1 %tobool.not.i.i27, label %_ZN9struct_pb8compiler6is_i32EPKN6google8protobuf15FieldDescriptorE.exit, label %if.then.i.i28 + +if.then.i.i28:; preds = %if.else7 + store ptr @_ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_, ptr %ref.tmp.i.i24, align 8 + store ptr %f, ptr %ref.tmp3.i.i25, align 8 call void @llvm.lifetime.start.p0(ptr nonnull %__callable.i.i.i.i22) - store ptr %ref.tmp.i.i23, ptr %__callable.i.i.i.i22, align 8 - %16 = getelementptr inbounds nuw i8, ptr %__callable.i.i.i.i22, i64 8 - store ptr %ref.tmp3.i.i24, ptr %16, align 8 - %17 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZSt15__once_callable) - store ptr %__callable.i.i.i.i22, ptr %17, align 8 - %18 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZSt11__once_call) - store ptr @_ZZNSt9once_flag18_Prepare_executionC1IZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS7_EEvRS_OT_DpOT0_EUlvE_EERSB_ENUlvE_8__invokeEv, ptr %18, align 8 - %call1.i2.i.i.i.i28 = invoke noundef i32 @pthread_once(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull @__once_proxy) - to label %invoke.cont.i.i.i.i30 unwind label %lpad.i.i.i.i29 - -invoke.cont.i.i.i.i30: ; preds = %if.then.i.i27 - %tobool.not.i.i.i.i31 = icmp eq i32 %call1.i2.i.i.i.i28, 0 - br i1 %tobool.not.i.i.i.i31, label %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i34, label %if.then.i.i.i.i32 - -if.then.i.i.i.i32: ; preds = %invoke.cont.i.i.i.i30 - invoke void @_ZSt20__throw_system_errori(i32 noundef %call1.i2.i.i.i.i28) #22 - to label %invoke.cont1.i.i.i.i33 unwind label %lpad.i.i.i.i29 - -invoke.cont1.i.i.i.i33: ; preds = %if.then.i.i.i.i32 + store ptr %ref.tmp.i.i24, ptr %__callable.i.i.i.i22, align 8 + %17 = getelementptr inbounds nuw i8, ptr %__callable.i.i.i.i23, i64 8 + store ptr %ref.tmp3.i.i25, ptr %17, align 8 + %18 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZSt15__once_callable) + store ptr %__callable.i.i.i.i23, ptr %18, align 8 + %19 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZSt11__once_call) + store ptr @_ZZNSt9once_flag18_Prepare_executionC1IZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS7_EEvRS_OT_DpOT0_EUlvE_EERSB_ENUlvE_8__invokeEv, ptr %19, align 8 + %call1.i2.i.i.i.i29 = invoke noundef i32 @pthread_once(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull @__once_proxy) + to label %invoke.cont.i.i.i.i31 unwind label %lpad.i.i.i.i30 + +invoke.cont.i.i.i.i31:; preds = %if.then.i.i28 + %tobool.not.i.i.i.i32 = icmp eq i32 %call1.i2.i.i.i.i29, 0 + br i1 %tobool.not.i.i.i.i32, label %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i35, label %if.then.i.i.i.i33 + +if.then.i.i.i.i33:; preds = %invoke.cont.i.i.i.i31 + invoke void @_ZSt20__throw_system_errori(i32 noundef %call1.i2.i.i.i.i29) #22 + to label %invoke.cont1.i.i.i.i34 unwind label %lpad.i.i.i.i30 + +invoke.cont1.i.i.i.i34: ; preds = %if.then.i.i.i.i33 unreachable -lpad.i.i.i.i29: ; preds = %if.then.i.i.i.i32, %if.then.i.i27 +lpad.i.i.i.i29: ; preds = %if.then.i.i.i.i33, %if.then.i.i28 %19 = landingpad { ptr, i32 } cleanup br label %common.resume -_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i34: ; preds = %invoke.cont.i.i.i.i30 - store ptr null, ptr %17, align 8 +_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i34: ; preds = %invoke.cont.i.i.i.i31 store ptr null, ptr %18, align 8 - call void @llvm.lifetime.end.p0(ptr nonnull %__callable.i.i.i.i22) - %.pre42 = load i32, ptr %type_.i.i, align 8 - br label %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35 - -_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35: ; preds = %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i34, %if.else7 - %20 = phi i32 [ %.pre42, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i34 ], [ %14, %if.else7 ] - call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp.i.i23) - call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp3.i.i24) - switch i32 %20, label %if.end13 [ - i32 7, label %21 - i32 15, label %21 - i32 2, label %21 - ] - -21: ; preds = %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35 + store ptr null, ptr %19, align 8 + call void @llvm.lifetime.end.p0(ptr nonnull %__callable.i.i.i.i23) + %.pre41 = load i32, ptr %type_.i.i, align 8 + br label %_ZN9struct_pb8compiler6is_i32EPKN6google8protobuf15FieldDescriptorE.exit + +_ZN9struct_pb8compiler6is_i32EPKN6google8protobuf15FieldDescriptorE.exit:; preds = %if.else7, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i34 + %21 = phi i32 [ %14, %if.else7 ], [ %.pre41, %_ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_15FieldDescriptorEES7_EEEvDpOT_.exit.i.i35 ] + call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp.i.i24) + call void @llvm.lifetime.end.p0(ptr nonnull %ref.tmp3.i.i25) + %22 = icmp ult i32 %21, 16 + %switch.cast.i37 = trunc i32 %21 to i16 + %switch.downshift.i38 = lshr i16 -32636, %switch.cast.i37 + %switch.masked.i39 = trunc i16 %switch.downshift.i38 to i1 + %retval.0.i40 = select i1 %22, i1 %switch.masked.i39, i1 false + %. = select i1 %retval.0.i40, i32 5, i32 2 br label %if.end13 -if.end13: ; preds = %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18, %21, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35, %entry - %wire_type.0 = phi i32 [ 2, %entry ], [ 5, %21 ], [ 2, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i35 ], [ 1, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18 ], [ 1, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18 ], [ 1, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18 ], [ 0, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i ] +if.end13: ; preds = %_ZN9struct_pb8compiler6is_i32EPKN6google8protobuf15FieldDescriptorE.exit, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i18, %_ZNK6google8protobuf15FieldDescriptor4typeEv.exit.i, %entry + %wire_type.0 = phi i32 [ 2, %entry ], [ 0, %_ZN9struct_pb8compiler9is_varintEPKN6google8protobuf15FieldDescriptorE.exit ], [ 1, %_ZN9struct_pb8compiler6is_i64EPKN6google8protobuf15FieldDescriptorE.exit ], [ %., %_ZN9struct_pb8compiler6is_i32EPKN6google8protobuf15FieldDescriptorE.exit ] %shl = shl i32 %0, 3 %or = or disjoint i32 %wire_type.0, %shl ret i32 %or diff --git a/bench/yara-x-rs/optimized/98ju2vcu3mcgze6k61u00b6zf.ll b/bench/yara-x-rs/optimized/98ju2vcu3mcgze6k61u00b6zf.ll index 4fd06fff2ca..83527b3fbed 100644 --- a/bench/yara-x-rs/optimized/98ju2vcu3mcgze6k61u00b6zf.ll +++ b/bench/yara-x-rs/optimized/98ju2vcu3mcgze6k61u00b6zf.ll @@ -55823,19 +55823,22 @@ define noundef range(i8 1, 8) i8 @_ZN6yara_x7modules6protos3lnk3Lnk12show_comman %2 = getelementptr inbounds nuw i8, ptr %0, i64 296 %3 = load i32, ptr %2, align 8, !range !1888, !noundef !3 %4 = trunc nuw i32 %3 to i1 - br i1 %4, label %5, label %"_ZN83_$LT$yara_x..modules..protos..lnk..ShowCommand$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217h30b8f643e4c998c7E.exit" + br i1 %4, label %5, label %10 5: ; preds = %1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 300 %7 = load i32, ptr %6, align 4, !noundef !3 - %switch.selectcmp = icmp eq i32 %7, 3 - %switch.select = select i1 %switch.selectcmp, i8 3, i8 1 - %switch.selectcmp6 = icmp eq i32 %7, 7 - %switch.select7 = select i1 %switch.selectcmp6, i8 7, i8 %switch.select - br label %"_ZN83_$LT$yara_x..modules..protos..lnk..ShowCommand$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217h30b8f643e4c998c7E.exit" - -"_ZN83_$LT$yara_x..modules..protos..lnk..ShowCommand$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217h30b8f643e4c998c7E.exit": ; preds = %5, %1 - %.sroa.0.0 = phi i8 [ 1, %1 ], [ %switch.select7, %5 ] + %switch.selectcmp = icmp ult i32 %7, 8 + %switch.cast.i = zext i32 %7 to i64 + %switch.shiftamt.i = shl nuw nsw i64 %switch.cast.i, 3 + %switch.downshift.i = lshr i64 504403158315827456, %switch.shiftamt.i + %switch.masked.i = trunc i64 %switch.downshift.i to i"_ZN81_$LT$yara_x..modules..protos..lnk..DriveType$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hdbd40971130d33b0E.exit" + %9 = tail call i8 @llvm.umax.i8(i8 %switch.masked.i, i8 1) + %spec.select = select i1 %"_ZN81_$LT$yara_x..modules..protos..lnk..DriveType$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hdbd40971130d33b0E.exit", i8 %9, i8 1 + br label %10 + +10: ; preds = %1, %5 + %.sroa.0.0 = phi i8 [ %., %5 ], [ 1, %1 ] ret i8 %.sroa.0.0 } @@ -55874,13 +55877,13 @@ define noundef range(i8 0, 7) i8 @_ZN6yara_x7modules6protos3lnk3Lnk10drive_type1 5: ; preds = %1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 308 %7 = load i32, ptr %6, align 4, !noundef !3 - %8 = icmp ult i32 %7, 7 - %switch.idx.cast = trunc i32 %7 to i8 - %spec.select = select i1 %8, i8 %switch.idx.cast, i8 0 - br label %"_ZN81_$LT$yara_x..modules..protos..lnk..DriveType$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hdbd40971130d33b0E.exit" + %.sroa.0.0.i = trunc nuw nsw i32 %7 to i8 + %.not = icmp ugt i32 %7, 6 + %spec.select = select i1 %.not, i8 0, i8 %.sroa.0.0.i + br label %switch.selectcmp -"_ZN81_$LT$yara_x..modules..protos..lnk..DriveType$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hdbd40971130d33b0E.exit": ; preds = %5, %1 - %.sroa.0.0 = phi i8 [ 0, %1 ], [ %spec.select, %5 ] +"_ZN81_$LT$yara_x..modules..protos..lnk..DriveType$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hdbd40971130d33b0E.exit": ; preds = %1, %5 + %.sroa.0.0 = phi i8 [ %spec.select, %5 ], [ 0, %1 ] ret i8 %.sroa.0.0 } @@ -61611,10 +61614,9 @@ define noundef range(i32 0, 7) i32 @"_ZN81_$LT$yara_x..modules..protos..lnk..Dri ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 8) i8 @"_ZN81_$LT$yara_x..modules..protos..lnk..DriveType$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hdbd40971130d33b0E"(i32 noundef %0) unnamed_addr #2 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 7) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 7) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: nonlazybind uwtable @@ -66449,10 +66451,9 @@ define noundef range(i32 0, 5) i32 @"_ZN94_$LT$yara_x..modules..protos..net_anal ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 6) i8 @"_ZN94_$LT$yara_x..modules..protos..net_analysis..AlertSeverity$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hd1a8ed83a02768a0E"(i32 noundef %0) unnamed_addr #2 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 5) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 5) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: nonlazybind uwtable @@ -96160,10 +96161,9 @@ define noundef range(i32 0, 14) i32 @"_ZN86_$LT$yara_x..modules..protos..sandbox ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 15) i8 @"_ZN86_$LT$yara_x..modules..protos..sandbox..VerdictTag$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217hc8a62579899eb3e7E"(i32 noundef %0) unnamed_addr #2 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 14) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 14) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: nonlazybind uwtable @@ -96337,10 +96337,9 @@ define noundef range(i32 0, 5) i32 @"_ZN90_$LT$yara_x..modules..protos..sandbox. ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i8 0, 6) i8 @"_ZN90_$LT$yara_x..modules..protos..sandbox..ImpactSeverity$u20$as$u20$protobuf..enums..Enum$GT$8from_i3217h868ff7512ae1048fE"(i32 noundef %0) unnamed_addr #2 { -switch.lookup: - %spec.select1 = tail call i32 @llvm.umin.i32(i32 %0, i32 5) - %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - ret i8 %spec.select + %.sroa.0.01 = tail call i32 @llvm.umin.i32(i32 %0, i32 5) + %.sroa.0.0 = trunc nuw nsw i32 %.sroa.0.01 to i8 + ret i8 %.sroa.0.0 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/yoga/optimized/Node.ll b/bench/yoga/optimized/Node.ll index fa740b055ef..ba0aae9efa0 100644 --- a/bench/yoga/optimized/Node.ll +++ b/bench/yoga/optimized/Node.ll @@ -84,7 +84,6 @@ $_ZNSt19__shrink_to_fit_auxISt6vectorIPN8facebook4yoga4NodeESaIS4_EELb1EE8_S_do_ @.str.10 = private unnamed_addr constant [74 x i8] c"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)\00", align 1 @.str.11 = private unnamed_addr constant [49 x i8] c"cannot create std::vector larger than max_size()\00", align 1 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_Node.cpp, ptr null }] -@switch.table._ZN8facebook4yoga4Node24isLayoutDimensionDefinedENS0_13FlexDirectionE = private unnamed_addr constant [4 x i64] [i64 1, i64 1, i64 0, i64 0], align 8 @_ZN8facebook4yoga4NodeC1Ev = unnamed_addr alias void (ptr), ptr @_ZN8facebook4yoga4NodeC2Ev @_ZN8facebook4yoga4NodeC1EPKNS0_6ConfigE = unnamed_addr alias void (ptr, ptr), ptr @_ZN8facebook4yoga4NodeC2EPKNS0_6ConfigE @@ -482,16 +481,18 @@ define noundef float @_ZN8facebook4yoga4Node19dimensionWithMarginENS0_13FlexDire unreachable switch.lookup: ; preds = %3 - %6 = zext nneg i8 %1 to i64 - %switch.gep = getelementptr inbounds nuw i64, ptr @switch.table._ZN8facebook4yoga4Node24isLayoutDimensionDefinedENS0_13FlexDirectionE, i64 %6 - %switch.load = load i64, ptr %switch.gep, align 8 + %6 = shl nuw nsw i8 %1, 3 + %switch.shiftamt = zext nneg i8 %6 to i32 + %switch.downshift.i = lshr i32 257, %switch.shiftamt %7 = getelementptr inbounds nuw i8, ptr %0, i64 436 - %8 = getelementptr inbounds nuw float, ptr %7, i64 %switch.load - %9 = load float, ptr %8, align 4, !tbaa !20 - %10 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %11 = tail call noundef float @_ZNK8facebook4yoga5Style20computeMarginForAxisENS0_13FlexDirectionEf(ptr noundef nonnull align 8 dereferenceable(144) %10, i8 noundef zeroext %1, float noundef %2) - %12 = fadd float %9, %11 - ret float %12 + %8 = and i32 %switch.downshift.i, 1 + %9 = zext nneg i32 %8 to i64 + %10 = getelementptr inbounds nuw float, ptr %7, i64 %9 + %11 = load float, ptr %10, align 4, !tbaa !20 + %12 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %13 = tail call noundef float @_ZNK8facebook4yoga5Style20computeMarginForAxisENS0_13FlexDirectionEf(ptr noundef nonnull align 8 dereferenceable(144) %12, i8 noundef zeroext %1, float noundef %2) + %14 = fadd float %11, %13 + ret float %14 } ; Function Attrs: mustprogress uwtable @@ -579,14 +580,16 @@ define noundef zeroext i1 @_ZN8facebook4yoga4Node24isLayoutDimensionDefinedENS0_ unreachable switch.lookup: ; preds = %2 - %5 = zext nneg i8 %1 to i64 - %switch.gep = getelementptr inbounds nuw i64, ptr @switch.table._ZN8facebook4yoga4Node24isLayoutDimensionDefinedENS0_13FlexDirectionE, i64 %5 - %switch.load = load i64, ptr %switch.gep, align 8 + %5 = shl nuw nsw i8 %1, 3 + %switch.shiftamt = zext nneg i8 %5 to i32 + %switch.downshift.i = lshr i32 257, %switch.shiftamt %6 = getelementptr inbounds nuw i8, ptr %0, i64 436 - %7 = getelementptr inbounds nuw float, ptr %6, i64 %switch.load - %8 = load float, ptr %7, align 4, !tbaa !20 - %9 = fcmp oge float %8, 0.000000e+00 - ret i1 %9 + %7 = and i32 %switch.downshift.i, 1 + %8 = zext nneg i32 %7 to i64 + %9 = getelementptr inbounds nuw float, ptr %6, i64 %8 + %10 = load float, ptr %9, align 4, !tbaa !20 + %11 = fcmp oge float %10, 0.000000e+00 + ret i1 %11 } ; Function Attrs: mustprogress uwtable @@ -1933,7 +1936,7 @@ _ZN8facebook4yoga15StyleSizeLength7resolveEf.exit: ; preds = %5, %11, %12 %16 = load i32, ptr %15, align 8 %17 = and i32 %16, 268435456 %18 = icmp eq i32 %17, 0 - br i1 %18, label %32, label %19 + br i1 %18, label %36, label %19 19: ; preds = %_ZN8facebook4yoga15StyleSizeLength7resolveEf.exit %20 = icmp ult i8 %2, 4 @@ -1946,22 +1949,24 @@ _ZN8facebook4yoga15StyleSizeLength7resolveEf.exit: ; preds = %5, %11, %12 switch.lookup: ; preds = %19 %22 = shl nuw nsw i8 %2, 3 %switch.shiftamt = zext nneg i8 %22 to i32 - %switch.downshift = lshr i32 33685504, %switch.shiftamt - %switch.masked = trunc i32 %switch.downshift to i8 - %23 = tail call noundef float @_ZNK8facebook4yoga5Style23computeFlexStartPaddingENS0_13FlexDirectionENS0_9DirectionEf(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %switch.masked, i8 noundef zeroext %1, float noundef %4) - %24 = tail call noundef float @_ZNK8facebook4yoga5Style22computeFlexStartBorderENS0_13FlexDirectionENS0_9DirectionE(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %switch.masked, i8 noundef zeroext %1) - %25 = fadd float %23, %24 - %26 = tail call noundef float @_ZNK8facebook4yoga5Style21computeFlexEndPaddingENS0_13FlexDirectionENS0_9DirectionEf(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %switch.masked, i8 noundef zeroext %1, float noundef %4) - %27 = tail call noundef float @_ZNK8facebook4yoga5Style20computeFlexEndBorderENS0_13FlexDirectionENS0_9DirectionE(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %switch.masked, i8 noundef zeroext %1) - %28 = fadd float %26, %27 - %29 = fadd float %25, %28 - %30 = fcmp ord float %29, 0.000000e+00 - %.sroa.0.0 = select i1 %30, float %29, float 0.000000e+00 - %31 = fadd float %.sroa.0.0.i, %.sroa.0.0 - br label %32 - -32: ; preds = %_ZN8facebook4yoga15StyleSizeLength7resolveEf.exit, %switch.lookup - %.sroa.06.0 = phi float [ %31, %switch.lookup ], [ %.sroa.0.0.i, %_ZN8facebook4yoga15StyleSizeLength7resolveEf.exit ] + %23 = shl nuw nsw i32 1, %switch.shiftamt + %24 = and i32 %23, 257 + %25 = icmp eq i32 %24, 0 + %26 = select i1 %25, i8 2, i8 0 + %27 = tail call noundef float @_ZNK8facebook4yoga5Style23computeFlexStartPaddingENS0_13FlexDirectionENS0_9DirectionEf(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %26, i8 noundef zeroext %1, float noundef %4) + %26 = tail call noundef float @_ZNK8facebook4yoga5Style22computeFlexStartBorderENS0_13FlexDirectionENS0_9DirectionE(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %26, i8 noundef zeroext %1) + %29 = fadd float %27, %28 + %30 = tail call noundef float @_ZNK8facebook4yoga5Style21computeFlexEndPaddingENS0_13FlexDirectionENS0_9DirectionEf(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %26, i8 noundef zeroext %1, float noundef %4) + %31 = tail call noundef float @_ZNK8facebook4yoga5Style20computeFlexEndBorderENS0_13FlexDirectionENS0_9DirectionE(ptr noundef nonnull align 8 dereferenceable(144) %15, i8 noundef zeroext %26, i8 noundef zeroext %1) + %32 = fadd float %30, %31 + %33 = fadd float %29, %32 + %34 = fcmp ord float %33, 0.000000e+00 + %.sroa.0.0 = select i1 %34, float %33, float 0.000000e+00 + %35 = fadd float %.sroa.0.0.i, %.sroa.0.0 + br label %36 + +36: ; preds = %_ZN8facebook4yoga15StyleSizeLength7resolveEf.exit, %_ZN8facebook4yoga9dimensionENS0_13FlexDirectionE.exit + %.sroa.06.0 = phi float [ %35, %_ZN8facebook4yoga9dimensionENS0_13FlexDirectionE.exit ], [ %.sroa.0.0.i, %_ZN8facebook4yoga15StyleSizeLength7resolveEf.exit ] ret float %.sroa.06.0 } diff --git a/bench/yosys/optimized/liberty.ll b/bench/yosys/optimized/liberty.ll index e5d9860c922..1e80a8c66a3 100644 --- a/bench/yosys/optimized/liberty.ll +++ b/bench/yosys/optimized/liberty.ll @@ -28346,9 +28346,13 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit728: ; preds = %_Z 1372: ; preds = %.thread28 %1373 = icmp ult i8 %.0.val, 43 - br i1 %1373, label %switch.hole_check, label %1374 + %switch.maskindex = zext nneg i8 %.0.val to i64 + %switch.shifted = lshr i64 5781025980417, %switch.maskindex + %switch.lobit = trunc i64 %switch.shifted to i1 + %or.cond = select i1 %1373, i1 %switch.lobit, i1 false + br i1 %or.cond, label %.critedge259, label %1374 -1374: ; preds = %switch.hole_check, %1372 +1374: ; preds = %1372 store i8 3, ptr %1370, align 8, !tbaa !232 br label %.critedge259 @@ -29107,14 +29111,8 @@ _ZN5Yosys7token_tC2EcNS_5RTLIL7SigSpecE.exit845: ; preds = %1664 call void @llvm.lifetime.end.p0(ptr nonnull %67) br label %1673 -switch.hole_check: ; preds = %1372 - %switch.maskindex = zext nneg i8 %.0.val to i64 - %switch.shifted = lshr i64 5781025980417, %switch.maskindex - %switch.lobit = trunc i64 %switch.shifted to i1 - br i1 %switch.lobit, label %.critedge259, label %1374 - -.critedge259: ; preds = %switch.hole_check, %.thread319, %1381, %1385, %.critedge, %1658, %1375, %837, %.thread, %1667, %_ZN5Yosys7token_tD2Ev.exit834, %1374, %_ZN5Yosys7token_tD2Ev.exit719, %_ZN5Yosys7token_tD2Ev.exit604, %840, %_ZN5Yosys7token_tD2Ev.exit502, %550, %_ZN5Yosys7token_tD2Ev.exit387, %_ZN5Yosys7token_tD2Ev.exit - %.0 = phi i1 [ true, %_ZN5Yosys7token_tD2Ev.exit ], [ true, %_ZN5Yosys7token_tD2Ev.exit387 ], [ true, %550 ], [ true, %_ZN5Yosys7token_tD2Ev.exit502 ], [ true, %840 ], [ true, %_ZN5Yosys7token_tD2Ev.exit604 ], [ true, %_ZN5Yosys7token_tD2Ev.exit719 ], [ true, %1374 ], [ true, %_ZN5Yosys7token_tD2Ev.exit834 ], [ true, %1667 ], [ false, %.thread ], [ false, %837 ], [ false, %1375 ], [ false, %1658 ], [ false, %.critedge ], [ false, %1385 ], [ false, %1381 ], [ false, %.thread319 ], [ false, %switch.hole_check ] +switch.hole_check: ; preds = %.thread319, %1381, %1385, %.critedge, %1372, %1658, %1375, %837, %.thread, %1667, %_ZN5Yosys7token_tD2Ev.exit834, %1374, %_ZN5Yosys7token_tD2Ev.exit719, %_ZN5Yosys7token_tD2Ev.exit604, %840, %_ZN5Yosys7token_tD2Ev.exit502, %550, %_ZN5Yosys7token_tD2Ev.exit387, %_ZN5Yosys7token_tD2Ev.exit + %.0 = phi i1 [ true, %_ZN5Yosys7token_tD2Ev.exit ], [ true, %_ZN5Yosys7token_tD2Ev.exit387 ], [ true, %550 ], [ true, %_ZN5Yosys7token_tD2Ev.exit502 ], [ true, %840 ], [ true, %_ZN5Yosys7token_tD2Ev.exit604 ], [ true, %_ZN5Yosys7token_tD2Ev.exit719 ], [ true, %1374 ], [ true, %_ZN5Yosys7token_tD2Ev.exit834 ], [ true, %1667 ], [ false, %.thread ], [ false, %837 ], [ false, %1375 ], [ false, %1658 ], [ false, %1372 ], [ false, %.critedge ], [ false, %1385 ], [ false, %1381 ], [ false, %.thread319 ] ret i1 %.0 1673: ; preds = %1672, %1657, %1366, %1086, %834, %543, %313 diff --git a/bench/z3/optimized/lar_solver.ll b/bench/z3/optimized/lar_solver.ll index e527ba9ec0d..dc573b9c613 100644 --- a/bench/z3/optimized/lar_solver.ll +++ b/bench/z3/optimized/lar_solver.ll @@ -26134,13 +26134,8 @@ _ZN8rationalC2ERKS_.exit: ; preds = %26, %30 %47 = load ptr, ptr %40, align 8, !tbaa !398 %48 = getelementptr inbounds nuw i32, ptr %47, i64 %indvars.iv %49 = load i32, ptr %48, align 4, !tbaa !442 - switch i32 %49, label %50 [ - i32 0, label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread - i32 2, label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread - i32 1, label %51 - i32 3, label %51 - i32 4, label %51 - ] + %50 = icmp ult i32 %49, 5 + br i1 %50, label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit, label %51 50: ; preds = %46 invoke void @_Z26notify_assertion_violationPKciS0_(ptr noundef nonnull @.str.36, i32 noundef 173, ptr noundef nonnull @.str.11) @@ -26150,53 +26145,60 @@ _ZN8rationalC2ERKS_.exit: ; preds = %26, %30 invoke void @_Z18invoke_exit_actionj(i32 noundef 114) to label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread unwind label %44 -51: ; preds = %46, %46, %46 - %52 = load ptr, ptr %41, align 8, !tbaa !275 - %53 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %52, i64 %indvars.iv - %54 = load ptr, ptr %42, align 8, !tbaa !275 - %55 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %54, i64 %indvars.iv - invoke void @_ZNK2lp15lar_core_solver12update_deltaER8rationalRKNS_12numeric_pairIS1_EES6_(ptr noundef nonnull align 8 dereferenceable(752) %1, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(64) %53, ptr noundef nonnull align 8 dereferenceable(64) %55) - to label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread unwind label %56 - -56: ; preds = %51 - %57 = landingpad { ptr, i32 } +51: ; preds = %46 + %switch.cast.i = trunc nuw nsw i32 %49 to i5 + %switch.downshift.i = lshr i5 -6, %switch.cast.i + %switch.masked.i = trunc i5 %switch.downshift.i to i1 + br i1 %switch.masked.i, label %52, label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread + +52:; preds = %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit + %53 = load ptr, ptr %41, align 8, !tbaa !275 + %54 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %53, i64 %indvars.iv + %55 = load ptr, ptr %42, align 8, !tbaa !275 + %56 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %55, i64 %indvars.iv + invoke void @_ZNK2lp15lar_core_solver12update_deltaER8rationalRKNS_12numeric_pairIS1_EES6_(ptr noundef nonnull align 8 dereferenceable(752) %1, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(64) %54, ptr noundef nonnull align 8 dereferenceable(64) %56) + to label %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread unwind label %57 + +57: ; preds = %52 + %58 = landingpad { ptr, i32 } cleanup br label %77 -_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread: ; preds = %.noexc, %46, %46, %51 +_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread: ; preds = %.noexc, %52, %51 %58 = load ptr, ptr %40, align 8, !tbaa !398 %59 = getelementptr inbounds nuw i32, ptr %58, i64 %indvars.iv %60 = load i32, ptr %59, align 4, !tbaa !442 - switch i32 %60, label %61 [ - i32 0, label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread - i32 1, label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread - i32 2, label %62 - i32 3, label %62 - i32 4, label %62 - ] + %62 = icmp ult i32 %60, 5 + br i1 %62, label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit, label %63 61: ; preds = %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread invoke void @_Z26notify_assertion_violationPKciS0_(ptr noundef nonnull @.str.36, i32 noundef 188, ptr noundef nonnull @.str.11) - to label %.noexc21 unwind label %44 + to label %.noexc25 unwind label %44 .noexc21: ; preds = %61 invoke void @_Z18invoke_exit_actionj(i32 noundef 114) to label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread unwind label %44 -62: ; preds = %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread, %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread, %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread - %63 = load ptr, ptr %42, align 8, !tbaa !275 - %64 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %63, i64 %indvars.iv - %65 = load ptr, ptr %43, align 8, !tbaa !275 +_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit:; preds = %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread + %switch.cast.i22 = trunc nuw nsw i32 %61 to i5 + %switch.downshift.i23 = lshr i5 -4, %switch.cast.i22 + %switch.masked.i24 = trunc i5 %switch.downshift.i23 to i1 + br i1 %switch.masked.i24, label %64, label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread + +64: ; preds = %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit + %65 = load ptr, ptr %42, align 8, !tbaa !275 %66 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %65, i64 %indvars.iv - invoke void @_ZNK2lp15lar_core_solver12update_deltaER8rationalRKNS_12numeric_pairIS1_EES6_(ptr noundef nonnull align 8 dereferenceable(752) %1, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(64) %64, ptr noundef nonnull align 8 dereferenceable(64) %66) - to label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread unwind label %67 + %67 = load ptr, ptr %43, align 8, !tbaa !275 + %68 = getelementptr inbounds nuw %"struct.lp::numeric_pair", ptr %67, i64 %indvars.iv + invoke void @_ZNK2lp15lar_core_solver12update_deltaER8rationalRKNS_12numeric_pairIS1_EES6_(ptr noundef nonnull align 8 dereferenceable(752) %1, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(64) %66, ptr noundef nonnull align 8 dereferenceable(64) %68) + to label %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread unwind label %69 -67: ; preds = %62 +67: ; preds = %64 %68 = landingpad { ptr, i32 } cleanup br label %77 -_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread: ; preds = %.noexc21, %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread, %_ZNK2lp15lar_core_solver18lower_bound_is_setEj.exit.thread, %62 +_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread: ; preds = %.noexc21, %64, %_ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %69 = load ptr, ptr %32, align 8, !tbaa !374 %70 = load ptr, ptr %31, align 8, !tbaa !375 @@ -26208,8 +26210,8 @@ _ZNK2lp15lar_core_solver18upper_bound_is_setEj.exit.thread: ; preds = %.noexc21, %76 = icmp samesign ult i64 %indvars.iv.next, %75 br i1 %76, label %46, label %._crit_edge, !llvm.loop !599 -77: ; preds = %67, %56, %44 - %.pn = phi { ptr, i32 } [ %68, %67 ], [ %45, %44 ], [ %57, %56 ] +77: ; preds = %67, %57, %44 + %.pn = phi { ptr, i32 } [ %68, %69 ], [ %45, %44 ], [ %58, %57 ] tail call void @_ZN8rationalD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #30 resume { ptr, i32 } %.pn diff --git a/bench/zed-rs/optimized/2e2z3a3ndiosnmwdte0pjgoc3.ll b/bench/zed-rs/optimized/2e2z3a3ndiosnmwdte0pjgoc3.ll index 5af4f1c42c4..3914884e1d1 100644 --- a/bench/zed-rs/optimized/2e2z3a3ndiosnmwdte0pjgoc3.ll +++ b/bench/zed-rs/optimized/2e2z3a3ndiosnmwdte0pjgoc3.ll @@ -4891,9 +4891,8 @@ define noundef zeroext i1 @_ZN15live_kit_server5proto16participant_info5State8is ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef range(i32 0, 5) i32 @_ZN15live_kit_server5proto16participant_info5State8from_i3217h63305ec99939674eE(i32 noundef %0) unnamed_addr #6 { -switch.lookup: - %spec.select = tail call i32 @llvm.umin.i32(i32 %0, i32 4) - ret i32 %spec.select + %. = tail call i32 @llvm.umin.i32(i32 %0, i32 4) + ret i32 %. } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..16e520557ec 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/156477 export COMPTIME_MODE=0 # Please rebase manually