diff --git a/bench/abseil-cpp/optimized/exception_safety_testing.ll b/bench/abseil-cpp/optimized/exception_safety_testing.ll index 540b993f054..42597f66758 100644 --- a/bench/abseil-cpp/optimized/exception_safety_testing.ll +++ b/bench/abseil-cpp/optimized/exception_safety_testing.ll @@ -509,8 +509,7 @@ call.i.noexc: ; preds = %entry to label %.noexc unwind label %lpad .noexc: ; preds = %call.i.noexc - %0 = shl nuw nsw i32 %and.i, 4 - %call.i.i = zext nneg i32 %0 to i64 + %0 = select i1 %tobool.not, i64 0, i64 16 %add.ptr.i = getelementptr inbounds nuw i8, ptr %cond, i64 %call.i.i invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(32) %agg.result, ptr noundef nonnull %cond, ptr noundef nonnull %add.ptr.i) to label %invoke.cont unwind label %lpad.i diff --git a/bench/assimp/optimized/zip.ll b/bench/assimp/optimized/zip.ll index ef98d3b993c..ca30c1489fe 100644 --- a/bench/assimp/optimized/zip.ll +++ b/bench/assimp/optimized/zip.ll @@ -11415,8 +11415,7 @@ if.then136: ; preds = %if.then130 if.end139: ; preds = %if.then130 %add140 = add i64 %add118, %buf_size - %32 = lshr exact i32 %and1, 7 - %spec.select121 = trunc nuw nsw i32 %32 to i16 + %32 = select i1 %tobool2, i16 8, i16 0 br label %if.end162 if.then146: ; preds = %if.end128 @@ -11444,7 +11443,7 @@ if.then155: ; preds = %if.then146 %34 = load ptr, ptr %m_pFree156, align 8 %m_pAlloc_opaque157 = getelementptr inbounds nuw i8, ptr %pZip, i64 64 %35 = load ptr, ptr %m_pAlloc_opaque157, align 8 - call void %34(ptr noundef %35, ptr noundef %pComp.0) #30 + call void %33(ptr noundef %35, ptr noundef %pComp.0) #30 br label %return if.end158: ; preds = %if.then146 @@ -11462,7 +11461,7 @@ if.end162: ; preds = %if.end139, %if.end1 %38 = load ptr, ptr %m_pFree163, align 8 %m_pAlloc_opaque164 = getelementptr inbounds nuw i8, ptr %pZip, i64 64 %39 = load ptr, ptr %m_pAlloc_opaque164, align 8 - call void %38(ptr noundef %39, ptr noundef %pComp.0) #30 + call void %37(ptr noundef %39, ptr noundef %pComp.0) #30 %cmp165 = icmp ugt i64 %comp_size.0, 4294967295 %cmp168 = icmp ugt i64 %cur_archive_file_ofs.0, 4294967295 %or.cond8 = select i1 %cmp165, i1 true, i1 %cmp168 @@ -11565,7 +11564,7 @@ if.end171: ; preds = %if.end162 store i8 0, ptr %arrayidx3.i49.i, align 1 %45 = load ptr, ptr %m_pWrite, align 8 %46 = load ptr, ptr %m_pIO_opaque, align 8 - %call180 = call i64 %45(ptr noundef %46, i64 noundef %add104, ptr noundef nonnull %local_dir_header, i64 noundef 30) #30 + %call180 = call i64 %44(ptr noundef %46, i64 noundef %add104, ptr noundef nonnull %local_dir_header, i64 noundef 30) #30 %cmp181.not = icmp eq i64 %call180, 30 br i1 %cmp181.not, label %if.end184, label %return diff --git a/bench/c3c/optimized/sema_expr.ll b/bench/c3c/optimized/sema_expr.ll index 5c716543b3a..ec60279e63e 100644 --- a/bench/c3c/optimized/sema_expr.ll +++ b/bench/c3c/optimized/sema_expr.ll @@ -12874,14 +12874,13 @@ define internal fastcc noundef zeroext i1 @sema_call_analyse_func_invocation(ptr %66 = load i8, ptr %12, align 8 %67 = trunc i8 %66 to i1 %68 = and i8 %66, 2 - %69 = zext nneg i8 %68 to i16 - %70 = shl nuw nsw i16 %69, 10 - %71 = xor i16 %70, 2048 - %spec.select51 = select i1 %.03750, i16 0, i16 %71 - %72 = select i1 %67, i16 2048, i16 %spec.select51 - %73 = and i16 %65, -2049 - %74 = or i16 %72, %73 - store i16 %74, ptr %45, align 8 + %69 = icmp eq i8 %68, 0 + %70 = select i1 %69, i16 2048, i16 0 + %71 = select i1 %.03750, i16 0, i16 %70 + %spec.select51 = select i1 %67, i16 2048, i16 %71 + %72 = and i16 %65, -2049 + %73 = or disjoint i16 %70, %72 + store i16 %72, ptr %45, align 8 br label %75 75: ; preds = %.thread, %39 diff --git a/bench/cmake/optimized/cmCPackIFWPackage.ll b/bench/cmake/optimized/cmCPackIFWPackage.ll index 17c6489c556..2f3df706de0 100644 --- a/bench/cmake/optimized/cmCPackIFWPackage.ll +++ b/bench/cmake/optimized/cmCPackIFWPackage.ll @@ -4766,9 +4766,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit327: ; preds = % %749 = getelementptr inbounds nuw i8, ptr %0, i64 432 %750 = getelementptr inbounds nuw i8, ptr %0, i64 440 %751 = load i64, ptr %750, align 8, !tbaa !15 - %752 = shl nuw nsw i8 %747, 1 - %753 = zext nneg i8 %752 to i64 - %754 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm(ptr noundef nonnull align 8 dereferenceable(32) %749, i64 noundef 0, i64 noundef %751, ptr noundef nonnull %748, i64 noundef %753) + %752 = select i1 %.not86, i64 0, i64 4 + %753 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm(ptr noundef nonnull align 8 dereferenceable(32) %749, i64 noundef 0, i64 noundef %751, ptr noundef nonnull %748, i64 noundef %752) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit332 unwind label %734 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit332: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit327 diff --git a/bench/cpython/optimized/typeobject.ll b/bench/cpython/optimized/typeobject.ll index 5c7bf71611c..84eebc9a900 100644 --- a/bench/cpython/optimized/typeobject.ll +++ b/bench/cpython/optimized/typeobject.ll @@ -15436,10 +15436,9 @@ lookup_maybe_method.exit.thread8.i: ; preds = %lookup_maybe_method 28: ; preds = %lookup_maybe_method.exit.i._crit_edge, %14, %10 %.val6.i.i.i = phi i64 [ %.val24.i.i, %10 ], [ %.val6.i.i.i.pre, %lookup_maybe_method.exit.i._crit_edge ], [ %.val24.i.i, %14 ] %.val.i.i.i = phi ptr [ %.val22.i.i, %10 ], [ %.val.i.i.i.pre, %lookup_maybe_method.exit.i._crit_edge ], [ %.val22.i.i, %14 ] + %.07.idx.i = phi i64 [ 0, %10 ], [ 8, %lookup_maybe_method.exit.i._crit_edge ], [ 8, %14 ] %.0.i7.i.ph = phi ptr [ %8, %10 ], [ %18, %lookup_maybe_method.exit.i._crit_edge ], [ %8, %14 ] %29 = add nuw i64 %2, 9223372036854775807 - %30 = lshr exact i64 %13, 14 - %.07.idx.i = xor i64 %30, 8 %.07.i = getelementptr i8, ptr %1, i64 %.07.idx.i %.0.i = select i1 %.not.i.i, i64 %29, i64 %2 %31 = and i64 %.val6.i.i.i, 2048 @@ -32717,9 +32716,8 @@ lookup_maybe_method.exit.thread: ; preds = %lookup_maybe_method %.val6.i.i.i = phi i64 [ %.val6.i.i.i.pre, %lookup_maybe_method.exit.lookup_maybe_method.exit.thread_crit_edge ], [ %.val24.i, %12 ], [ %.val24.i, %8 ] %.val.i.i.i = phi ptr [ %.val.i.i.i.pre, %lookup_maybe_method.exit.lookup_maybe_method.exit.thread_crit_edge ], [ %.val22.i, %12 ], [ %.val22.i, %8 ] %.0.i13 = phi i64 [ -9223372036854775807, %lookup_maybe_method.exit.lookup_maybe_method.exit.thread_crit_edge ], [ -9223372036854775807, %12 ], [ 2, %8 ] + %.07.idx.i = phi i64 [ 8, %lookup_maybe_method.exit.lookup_maybe_method.exit.thread_crit_edge ], [ 8, %12 ], [ 0, %8 ] %.0.i18 = phi ptr [ %16, %lookup_maybe_method.exit.lookup_maybe_method.exit.thread_crit_edge ], [ %6, %12 ], [ %6, %8 ] - %24 = lshr exact i64 %11, 14 - %.07.idx.i = xor i64 %24, 8 %.07.i = getelementptr i8, ptr %2, i64 %.07.idx.i %25 = and i64 %.val6.i.i.i, 2048 %.not.i.i.i = icmp eq i64 %25, 0 diff --git a/bench/darktable/optimized/blend_gui.ll b/bench/darktable/optimized/blend_gui.ll index b0bac62ecc8..1012658a48b 100644 --- a/bench/darktable/optimized/blend_gui.ll +++ b/bench/darktable/optimized/blend_gui.ll @@ -6076,7 +6076,9 @@ define internal noundef i32 @_blendop_blend_order_clicked(ptr noundef %0, ptr re %11 = load i32, ptr %10, align 4, !tbaa !220 %.not9 = icmp sgt i32 %11, -1 %12 = zext i1 %.not9 to i32 - %storemerge = xor i32 %11, -2147483648 + %storemerge = and i32 %11, 2147483647 + %masksel = select i1 %.not9, i32 -2147483648, i32 0 + %storemerge = or disjoint i32 %masksel, %13 store i32 %storemerge, ptr %10, align 4, !tbaa !220 %13 = tail call i64 @gtk_toggle_button_get_type() #19 %14 = tail call ptr @g_type_check_instance_cast(ptr noundef %0, i64 noundef %13) #18 diff --git a/bench/fmt/optimized/compile-test.ll b/bench/fmt/optimized/compile-test.ll index 624511900d7..248108216cd 100644 --- a/bench/fmt/optimized/compile-test.ll +++ b/bench/fmt/optimized/compile-test.ll @@ -20138,6 +20138,8 @@ invoke.cont2: call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %specs.i) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %dec.i) %1 = bitcast double %0 to i64 + %2 = icmp sgt i64 %1, -1 + %fspecs.sroa.2.0.i = select i1 %2, i32 0, i32 256 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %specs.i, ptr noundef nonnull align 4 dereferenceable(16) @__const._ZN3fmt3v106detail5writeIcSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_SF_SC_.specs, i64 16, i1 false) %2 = call double @llvm.fabs.f64(double %0) %cmp.i = fcmp ueq double %2, 0x7FF0000000000000 @@ -20151,10 +20153,9 @@ _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT store i64 72057594574798848, ptr %3, align 8 %4 = fcmp uno double %0, 0.000000e+00 %cond-lvalue14.i.i = select i1 %4, ptr @.str.198, ptr @.str.200 - %sum.shift.i = lshr i64 %1, 63 - %bf.cast19.i.i = trunc nuw nsw i64 %sum.shift.i to i8 - %tobool20.not.not.i.i = icmp sgt i64 %1, -1 - %add.i.i = select i1 %tobool20.not.not.i.i, i64 3, i64 4 + %sum.shift.i = lshr exact i32 %fspecs.sroa.2.0.i, 8 + %bf.cast19.i.i = trunc nuw nsw i32 %sum.shift.i to i8 + %tobool20.not.not.i.i = select i1 %2, i64 3, i64 4 store i8 %bf.cast19.i.i, ptr %ref.tmp.i.i, align 8 %5 = getelementptr inbounds nuw i8, ptr %ref.tmp.i.i, i64 8 store ptr %cond-lvalue14.i.i, ptr %5, align 8 @@ -20173,8 +20174,8 @@ if.end16.i: ; preds = %invoke.cont2 %7 = getelementptr inbounds nuw i8, ptr %dec.i, i64 8 %8 = extractvalue { i64, i32 } %call17.i, 1 store i32 %8, ptr %7, align 8 - %9 = lshr i64 %1, 23 - %fspecs.sroa.2.0.insert.shift.i = and i64 %9, 1099511627776 + %9 = zext nneg i32 %fspecs.sroa.2.0.i to i64 + %fspecs.sroa.2.0.insert.shift.i = shl nuw nsw i64 %9, 32 %call.i.i3 = invoke ptr @_ZN3fmt3v106detail14do_write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIdEEcNS1_14digit_groupingIcEEEET_S9_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE(ptr nonnull %buffer, ptr noundef nonnull align 8 dereferenceable(16) %dec.i, ptr noundef nonnull align 4 dereferenceable(16) %specs.i, i64 %fspecs.sroa.2.0.insert.shift.i, ptr null) to label %invoke.cont4 unwind label %lpad1 diff --git a/bench/g2o/optimized/optimizable_graph.ll b/bench/g2o/optimized/optimizable_graph.ll index 19bf2747c35..d15522ee47f 100644 --- a/bench/g2o/optimized/optimizable_graph.ll +++ b/bench/g2o/optimized/optimizable_graph.ll @@ -8888,9 +8888,8 @@ _ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi0ENS_6Stri br i1 %.not76.not, label %.loopexit, label %.lr.ph104 .critedge.thread.thread: ; preds = %5 - %178 = lshr i64 %10, 62 - %179 = trunc nuw nsw i64 %178 to i32 - %spec.select122 = and i32 %179, 2 + %178 = icmp slt i64 %10, 0 + %179 = select i1 %178, i32 2, i32 0 br label %.loopexit .lr.ph104: ; preds = %.critedge.thread diff --git a/bench/glslang/optimized/SpvBuilder.ll b/bench/glslang/optimized/SpvBuilder.ll index 65211531c1e..b051a3b7002 100644 --- a/bench/glslang/optimized/SpvBuilder.ll +++ b/bench/glslang/optimized/SpvBuilder.ll @@ -17798,19 +17798,17 @@ _ZN8spvutils8HexFloatINS_10FloatProxyINS_7Float16EEENS_14HexFloatTraitsIS3_EEE51 %brmerge.i = or i1 %.023.i, %or.cond.not28.i %spec.select.i = select i1 %38, i16 1, i16 %.1.lcssa.i %.2.i = select i1 %brmerge.i, i16 %.1.lcssa.i, i16 %spec.select.i - %49 = lshr i32 %.sroa.0.0.copyload.i.i, 16 - %50 = trunc nuw i32 %49 to i16 - %spec.select26.i = and i16 %50, -32768 - %51 = shl i16 %.0.lcssa.i, 10 - %52 = add i16 %51, 15360 - %53 = and i16 %52, 31744 - %54 = and i16 %.2.i, 1023 - %55 = or disjoint i16 %53, %spec.select26.i - %56 = or disjoint i16 %55, %54 + %49 = select i1 %5, i16 -32768, i16 0 + %49 = shl i16 %.0.lcssa.i, 10 + %spec.select26.i = add i16 %50, 15360 + %51 = and i16 %50, 31744 + %52 = and i16 %.2.i, 1023 + %53 = or disjoint i16 %51, %49 + %54 = or disjoint i16 %53, %52 br label %.sink.split .sink.split: ; preds = %8, %.critedge38, %.critedge39, %_ZN8spvutils8HexFloatINS_10FloatProxyINS_7Float16EEENS_14HexFloatTraitsIS3_EEE51setFromSignUnbiasedExponentAndNormalizedSignificandEbstb.exit - %.sink = phi i16 [ %56, %_ZN8spvutils8HexFloatINS_10FloatProxyINS_7Float16EEENS_14HexFloatTraitsIS3_EEE51setFromSignUnbiasedExponentAndNormalizedSignificandEbstb.exit ], [ %36, %.critedge39 ], [ %31, %.critedge38 ], [ -32768, %8 ] + %.sink = phi i16 [ %54, %_ZN8spvutils8HexFloatINS_10FloatProxyINS_7Float16EEENS_14HexFloatTraitsIS3_EEE51setFromSignUnbiasedExponentAndNormalizedSignificandEbstb.exit ], [ %36, %.critedge39 ], [ %31, %.critedge38 ], [ -32768, %8 ] store i16 %.sink, ptr %1, align 2 br label %57 diff --git a/bench/gromacs/optimized/xtc2.ll b/bench/gromacs/optimized/xtc2.ll index f1fe0a3fad2..9d4ee5b00bc 100644 --- a/bench/gromacs/optimized/xtc2.ll +++ b/bench/gromacs/optimized/xtc2.ll @@ -1478,8 +1478,7 @@ Ptngc_find_magic_index.exit544: ; preds = %511 %565 = add nsw i32 %spec.store.select15, %.3376911 %566 = icmp slt i32 %.5912, 0 %567 = sub nsw i32 0, %spec.store.select15 - %568 = lshr i32 %.5912, 30 - %spec.select436 = and i32 %568, 2 + %568 = select i1 %566, i32 2, i32 0 %spec.select437 = select i1 %566, i32 %567, i32 %spec.store.select15 %569 = add nsw i32 %spec.select437, -1 %570 = or i32 %569, %spec.select436 diff --git a/bench/harfbuzz/optimized/harfbuzz.ll b/bench/harfbuzz/optimized/harfbuzz.ll index 35b758f5d1f..3bde7580ce5 100644 --- a/bench/harfbuzz/optimized/harfbuzz.ll +++ b/bench/harfbuzz/optimized/harfbuzz.ll @@ -61030,22 +61030,20 @@ if.end230: ; preds = %for.inc196.thread, %arrayidx247 = getelementptr inbounds nuw i8, ptr %call231, i64 16 store i32 %141, ptr %arrayidx247, align 4 %142 = load i32, ptr %flags152456463, align 4 + %and.i229 = and i32 %142, 4 + %tobool250.not = icmp eq i32 %and.i229, 0 %auto_zwnj = getelementptr inbounds nuw i8, ptr %call231, i64 32 %bf.load = load i8, ptr %auto_zwnj, align 4 - %143 = trunc i32 %142 to i8 - %144 = lshr i8 %143, 1 - %145 = and i8 %144, 2 + %143 = select i1 %tobool250.not, i8 2, i8 0 %bf.clear = and i8 %bf.load, -3 - %146 = or disjoint i8 %145, %bf.clear - %bf.set = xor i8 %146, 2 + %146 = or disjoint i8 %143, %bf.clear store i8 %bf.set, ptr %auto_zwnj, align 4 %147 = load i32, ptr %flags152456463, align 4 - %148 = trunc i32 %147 to i8 - %149 = lshr i8 %148, 1 - %150 = and i8 %149, 4 + %148 = and i32 %147, 8 + %149 = icmp eq i32 %148, 0 + %150 = select i1 %149, i8 4, i8 0 %bf.clear260 = and i8 %bf.set, -5 %151 = or disjoint i8 %150, %bf.clear260 - %bf.set261 = xor i8 %151, 4 store i8 %bf.set261, ptr %auto_zwnj, align 4 %152 = load i32, ptr %flags152456463, align 4 %153 = trunc i32 %152 to i8 diff --git a/bench/hdf5/optimized/H5SM.ll b/bench/hdf5/optimized/H5SM.ll index 7fa27931466..06e1a4d0b05 100644 --- a/bench/hdf5/optimized/H5SM.ll +++ b/bench/hdf5/optimized/H5SM.ll @@ -1761,33 +1761,32 @@ H5SM__create_index.exit._crit_edge: ; preds = %H5SM__create_index. %.2.i56 = phi i32 [ -1, %155 ], [ -1, %162 ], [ -1, %169 ], [ -1, %178 ], [ %.1.i55, %417 ], [ -1, %421 ], [ %.1.i55, %418 ] %425 = load ptr, ptr %8, align 8 %.not118.i = icmp eq ptr %425, null - br i1 %.not118.i, label %437, label %426 + br i1 %.not118.i, label %436, label %426 426: ; preds = %.thread150.i %427 = getelementptr inbounds nuw i8, ptr %151, i64 48 %428 = load i64, ptr %427, align 8 - %429 = shl nuw nsw i32 %152, 1 - %430 = xor i32 %429, 2 - %431 = call i32 @H5AC_unprotect(ptr noundef %0, ptr noundef nonnull @H5AC_SOHM_LIST, i64 noundef %428, ptr noundef nonnull %425, i32 noundef %430) #11 - %432 = icmp slt i32 %431, 0 - br i1 %432, label %433, label %437 - -433: ; preds = %426 - %434 = load i64, ptr @H5E_SOHM_g, align 8 - %435 = load i64, ptr @H5E_CANTUNPROTECT_g, align 8 - %436 = call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.H5SM__write_mesg, i32 noundef 1485, i64 noundef %434, i64 noundef %435, ptr noundef nonnull @.str.44) #11 - br label %437 - -437: ; preds = %433, %426, %.thread150.i - %.3.i = phi i32 [ -1, %433 ], [ %.2.i56, %426 ], [ %.2.i56, %.thread150.i ] + %429 = select i1 %.not81, i32 2, i32 0 + %430 = call i32 @H5AC_unprotect(ptr noundef %0, ptr noundef nonnull @H5AC_SOHM_LIST, i64 noundef %428, ptr noundef nonnull %425, i32 noundef %429) #11 + %431 = icmp slt i32 %430, 0 + br i1 %431, label %432, label %436 + +432: ; preds = %426 + %433 = load i64, ptr @H5E_SOHM_g, align 8 + %434 = load i64, ptr @H5E_CANTUNPROTECT_g, align 8 + %435 = call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.H5SM__write_mesg, i32 noundef 1485, i64 noundef %433, i64 noundef %434, ptr noundef nonnull @.str.44) #11 + br label %436 + +436: ; preds = %432, %426, %.thread150.i + %.3.i = phi i32 [ -1, %432 ], [ %.2.i56, %426 ], [ %.2.i56, %.thread150.i ] %.not119.i = icmp eq ptr %.095140155.i, null br i1 %.not119.i, label %H5SM__write_mesg.exit, label %438 -438: ; preds = %437 +438: ; preds = %436 %439 = call ptr @H5MM_xfree(ptr noundef nonnull %.095140155.i) #11 br label %H5SM__write_mesg.exit -H5SM__write_mesg.exit: ; preds = %437, %438 +H5SM__write_mesg.exit: ; preds = %436, %438 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) diff --git a/bench/hermes/optimized/APFloat.ll b/bench/hermes/optimized/APFloat.ll index 42b86d546c4..2e14aa0ba69 100644 --- a/bench/hermes/optimized/APFloat.ll +++ b/bench/hermes/optimized/APFloat.ll @@ -1302,10 +1302,9 @@ sw.default: ; preds = %entry unreachable sw.bb6: ; preds = %entry, %entry, %entry - %1 = lshr i8 %bf.load, 2 - %2 = and i8 %1, 2 - %3 = xor i8 %2, 2 - %. = zext nneg i8 %3 to i32 + %1 = and i8 %bf.load, 8 + %2 = icmp eq i8 %1, 0 + %3 = select i1 %2, i32 2, i32 0 br label %return sw.bb10: ; preds = %entry, %entry, %entry @@ -1323,9 +1322,8 @@ sw.bb19: ; preds = %entry br i1 %cmp, label %return, label %if.else31 if.else31: ; preds = %sw.bb19 - %6 = shl nuw nsw i8 %bf.clear23, 1 - %7 = xor i8 %6, 2 - %.8 = zext nneg i8 %7 to i32 + %6 = icmp eq i8 %bf.clear23, 0 + %7 = select i1 %6, i32 2, i32 0 br label %return sw.bb40: ; preds = %entry @@ -1340,9 +1338,8 @@ sw.epilog: ; preds = %entry br i1 %cmp52.not, label %if.else62, label %if.then53 if.then53: ; preds = %sw.epilog - %8 = shl nuw nsw i8 %bf.clear45, 1 - %9 = xor i8 %8, 2 - %.9 = zext nneg i8 %9 to i32 + %8 = icmp eq i8 %bf.clear45, 0 + %9 = select i1 %8, i32 2, i32 0 br label %return if.else62: ; preds = %sw.epilog diff --git a/bench/hermes/optimized/Statistic.ll b/bench/hermes/optimized/Statistic.ll index 6a170164a8d..97efca6e14f 100644 --- a/bench/hermes/optimized/Statistic.ll +++ b/bench/hermes/optimized/Statistic.ll @@ -1949,9 +1949,7 @@ if.end11.i.i.i.i: ; preds = %if.end.i.i.i.i %retval.0.in.i.i.i.i = phi i32 [ %call14.i.i.i.i, %if.end11.i.i.i.i ], [ %call3.i.i.i.i, %while.body.i.i ], [ %call7.i.i.i.i, %if.end.i.i.i.i ] %retval.0.i.i.i.i = icmp slt i32 %retval.0.in.i.i.i.i, 0 %.sink.i.i = select i1 %retval.0.i.i.i.i, ptr %0, ptr %1 - %8 = lshr i32 %retval.0.in.i.i.i.i, 28 - %9 = and i32 %8, 8 - %__first2.sroa.0.1.idx.i.i = zext nneg i32 %9 to i64 + %8 = select i1 %retval.0.i.i.i.i, i64 8, i64 0 %__first2.sroa.0.1.i.i = getelementptr inbounds nuw i8, ptr %__first2.sroa.0.020.i.i, i64 %__first2.sroa.0.1.idx.i.i %__first1.sroa.0.1.idx.i.i = select i1 %retval.0.i.i.i.i, i64 0, i64 8 %__first1.sroa.0.1.i.i = getelementptr inbounds nuw i8, ptr %__first1.sroa.0.021.i.i, i64 %__first1.sroa.0.1.idx.i.i @@ -2036,9 +2034,7 @@ if.end11.i.i.i57.i: ; preds = %if.end.i.i.i52.i %retval.0.in.i.i.i41.i = phi i32 [ %call14.i.i.i60.i, %if.end11.i.i.i57.i ], [ %call3.i.i.i38.i, %while.body.i34.i ], [ %call7.i.i.i55.i, %if.end.i.i.i52.i ] %retval.0.i.i.i42.i = icmp slt i32 %retval.0.in.i.i.i41.i, 0 %.sink.i43.i = select i1 %retval.0.i.i.i42.i, ptr %10, ptr %11 - %18 = lshr i32 %retval.0.in.i.i.i41.i, 28 - %19 = and i32 %18, 8 - %__first2.sroa.0.1.idx.i44.i = zext nneg i32 %19 to i64 + %18 = select i1 %retval.0.i.i.i42.i, i64 8, i64 0 %__first2.sroa.0.1.i45.i = getelementptr inbounds nuw i8, ptr %__first2.sroa.0.020.i37.i, i64 %__first2.sroa.0.1.idx.i44.i %__first1.sroa.0.1.idx.i46.i = select i1 %retval.0.i.i.i42.i, i64 0, i64 8 %__first1.sroa.0.1.i47.i = getelementptr inbounds nuw i8, ptr %__first1.sroa.0.021.i36.i, i64 %__first1.sroa.0.1.idx.i46.i @@ -2119,9 +2115,7 @@ if.end11.i.i.i.i41: ; preds = %if.end.i.i.i.i36 %retval.0.in.i.i.i.i22 = phi i32 [ %call14.i.i.i.i44, %if.end11.i.i.i.i41 ], [ %call3.i.i.i.i20, %while.body.i.i19 ], [ %call7.i.i.i.i39, %if.end.i.i.i.i36 ] %retval.0.i.i.i.i23 = icmp slt i32 %retval.0.in.i.i.i.i22, 0 %__first1.addr.0.val.sink.i.i = select i1 %retval.0.i.i.i.i23, ptr %__first2.addr.0.val.i.i, ptr %__first1.addr.0.val.i.i - %26 = lshr i32 %retval.0.in.i.i.i.i22, 28 - %27 = and i32 %26, 8 - %__first2.addr.1.idx.i.i = zext nneg i32 %27 to i64 + %26 = select i1 %retval.0.i.i.i.i23, i64 8, i64 0 %__first2.addr.1.i.i = getelementptr inbounds nuw i8, ptr %__first2.addr.023.i.i, i64 %__first2.addr.1.idx.i.i %__first1.addr.1.idx.i.i = select i1 %retval.0.i.i.i.i23, i64 0, i64 8 %__first1.addr.1.i.i = getelementptr inbounds nuw i8, ptr %__first1.addr.024.i.i, i64 %__first1.addr.1.idx.i.i @@ -2206,9 +2200,7 @@ if.end11.i.i.i59.i: ; preds = %if.end.i.i.i54.i %retval.0.in.i.i.i44.i = phi i32 [ %call14.i.i.i62.i, %if.end11.i.i.i59.i ], [ %call3.i.i.i41.i, %while.body.i35.i ], [ %call7.i.i.i57.i, %if.end.i.i.i54.i ] %retval.0.i.i.i45.i = icmp slt i32 %retval.0.in.i.i.i44.i, 0 %__first1.addr.0.val.sink.i46.i = select i1 %retval.0.i.i.i45.i, ptr %__first2.addr.0.val.i39.i, ptr %__first1.addr.0.val.i40.i - %36 = lshr i32 %retval.0.in.i.i.i44.i, 28 - %37 = and i32 %36, 8 - %__first2.addr.1.idx.i47.i = zext nneg i32 %37 to i64 + %36 = select i1 %retval.0.i.i.i45.i, i64 8, i64 0 %__first2.addr.1.i48.i = getelementptr inbounds nuw i8, ptr %__first2.addr.023.i37.i, i64 %__first2.addr.1.idx.i47.i %__first1.addr.1.idx.i49.i = select i1 %retval.0.i.i.i45.i, i64 0, i64 8 %__first1.addr.1.i50.i = getelementptr inbounds nuw i8, ptr %__first1.addr.024.i36.i, i64 %__first1.addr.1.idx.i49.i @@ -2315,9 +2307,7 @@ if.end11.i.i.i: ; preds = %if.end.i.i.i %retval.0.in.i.i.i = phi i32 [ %call14.i.i.i, %if.end11.i.i.i ], [ %call3.i.i.i, %while.body.i ], [ %call7.i.i.i, %if.end.i.i.i ] %retval.0.i.i.i = icmp slt i32 %retval.0.in.i.i.i, 0 %__first1.addr.0.val.sink.i = select i1 %retval.0.i.i.i, ptr %0, ptr %__first1.addr.0.val.i - %7 = lshr i32 %retval.0.in.i.i.i, 28 - %8 = and i32 %7, 8 - %__first2.sroa.0.1.idx.i = zext nneg i32 %8 to i64 + %7 = select i1 %retval.0.i.i.i, i64 8, i64 0 %__first2.sroa.0.1.i = getelementptr inbounds nuw i8, ptr %__first2.sroa.0.016.i, i64 %__first2.sroa.0.1.idx.i %__first1.addr.1.idx.i = select i1 %retval.0.i.i.i, i64 0, i64 8 %__first1.addr.1.i = getelementptr inbounds nuw i8, ptr %__first1.addr.018.i, i64 %__first1.addr.1.idx.i diff --git a/bench/icu/optimized/number_utils.ll b/bench/icu/optimized/number_utils.ll index 553e06faa55..be320d4a23c 100644 --- a/bench/icu/optimized/number_utils.ll +++ b/bench/icu/optimized/number_utils.ll @@ -1127,13 +1127,12 @@ _ZN6icu_756number4impl6DecNum6_setToEPKciR10UErrorCode.exit: ; preds = %if.else1 %add = add nsw i32 %sub, %9 store i32 %add, ptr %exponent, align 4 %10 = bitcast double %d to i64 - %11 = lshr i64 %10, 56 - %12 = trunc nuw i64 %11 to i8 - %conv9 = and i8 %12, -128 - %13 = load ptr, ptr %this, align 8 - %bits = getelementptr inbounds nuw i8, ptr %13, i64 8 - %14 = load i8, ptr %bits, align 4 - %or = or i8 %14, %conv9 + %11 = icmp slt i64 %10, 0 + %12 = select i1 %11, i8 -128, i8 0 + %conv9 = load ptr, ptr %this, align 8 + %13 = getelementptr inbounds nuw i8, ptr %12, i64 8 + %bits = load i8, ptr %13, align 4 + %14 = or i8 %bits, %conv9 store i8 %or, ptr %bits, align 4 br label %return diff --git a/bench/imgui/optimized/imgui_widgets.ll b/bench/imgui/optimized/imgui_widgets.ll index 8eb4b3518a1..d853de01a85 100644 --- a/bench/imgui/optimized/imgui_widgets.ll +++ b/bench/imgui/optimized/imgui_widgets.ll @@ -11313,8 +11313,7 @@ cond.end: ; preds = %if.end, %cond.true store <2 x float> %retval.sroa.0.4.vec.insert.i.i, ptr %ref.tmp.i, align 8 call void @_ZN5ImGui8ItemSizeERK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %ref.tmp.i, float noundef %4) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %ref.tmp.i) - %14 = shl nuw nsw i32 %and, 3 - %cond18 = xor i32 %14, 1024 + %14 = select i1 %cmp14, i32 1024, i32 0 %call19 = call noundef zeroext i1 @_ZN5ImGui7ItemAddERK6ImRectjPS1_i(ptr noundef nonnull align 4 dereferenceable(16) %total_bb, i32 noundef %call1, ptr noundef nonnull %frame_bb, i32 noundef %cond18) br i1 %call19, label %if.end21, label %return @@ -16580,8 +16579,7 @@ cond.end: ; preds = %if.end, %cond.true store <2 x float> %retval.sroa.0.4.vec.insert.i.i, ptr %ref.tmp.i, align 8 call void @_ZN5ImGui8ItemSizeERK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %ref.tmp.i, float noundef %4) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %ref.tmp.i) - %14 = shl nuw nsw i32 %and, 3 - %cond18 = xor i32 %14, 1024 + %14 = select i1 %cmp14, i32 1024, i32 0 %call19 = call noundef zeroext i1 @_ZN5ImGui7ItemAddERK6ImRectjPS1_i(ptr noundef nonnull align 4 dereferenceable(16) %total_bb, i32 noundef %call1, ptr noundef nonnull %frame_bb, i32 noundef %cond18) br i1 %call19, label %if.end21, label %return @@ -28008,8 +28006,7 @@ if.then10: ; preds = %if.end %ColorEditOptions = getelementptr inbounds nuw i8, ptr %2, i64 24012 %tobool37.not = icmp eq i32 %and1, 0 %mul38 = select i1 %tobool37.not, i64 16, i64 12 - %7 = shl nuw nsw i32 %and1, 1 - %8 = zext nneg i32 %7 to i64 + %7 = select i1 %tobool37.not, i64 0, i64 4 %mul38.sroa.sel.v = select i1 %tobool37.not, i64 16, i64 12 %mul38.sroa.sel = getelementptr inbounds nuw i8, ptr %previewing_ref_col, i64 %mul38.sroa.sel.v br label %for.body @@ -28062,7 +28059,7 @@ if.then30: ; preds = %if.end18 if.end35: ; preds = %if.then30, %if.end18 call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %backup_pos) - call void @llvm.memset.p0.i64(ptr nonnull align 4 %mul38.sroa.sel, i8 0, i64 %8, i1 false) + call void @llvm.memset.p0.i64(ptr nonnull align 4 %mul38.sroa.sel, i8 0, i64 %7, i1 false) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %previewing_ref_col, ptr noundef nonnull align 4 dereferenceable(12) %ref_col, i64 %mul38, i1 false) %call40 = call noundef zeroext i1 @_ZN5ImGui12ColorPicker4EPKcPfiPKf(ptr noundef nonnull @.str.93, ptr noundef nonnull %previewing_ref_col, i32 noundef %picker_flags.1, ptr noundef null) call void @_ZN5ImGui5PopIDEv() diff --git a/bench/libevent/optimized/ws.ll b/bench/libevent/optimized/ws.ll index bef011c68ae..b2b0982037e 100644 --- a/bench/libevent/optimized/ws.ll +++ b/bench/libevent/optimized/ws.ll @@ -652,17 +652,15 @@ if.then40.i: ; preds = %for.end.i if.end45.i: ; preds = %for.end.i, %if.end24.i, %if.then16.i %pos.0.i = phi i64 [ 2, %if.then16.i ], [ 4, %if.end24.i ], [ 10, %for.end.i ] %payload_len.0.i = phi i64 [ %conv17.i, %if.then16.i ], [ %conv25.i, %if.end24.i ], [ %or.i, %for.end.i ] - %6 = lshr i8 %3, 5 - %7 = and i8 %6, 4 - %conv48.i = zext nneg i8 %7 to i64 + %6 = icmp sgt i8 %3, -1 + %7 = select i1 %6, i64 0, i64 4 %add46.i = add nuw nsw i64 %pos.0.i, %conv48.i %add49.i = add nuw nsw i64 %add46.i, %payload_len.0.i %cmp50.i = icmp ult i64 %call365, %add49.i br i1 %cmp50.i, label %bailout, label %if.end53.i if.end53.i: ; preds = %if.end45.i - %tobool54.not.i = icmp sgt i8 %3, -1 - br i1 %tobool54.not.i, label %if.end73.i, label %if.then55.i + br i1 %tobool.not.i, label %if.end73.i, label %if.then55.i if.then55.i: ; preds = %if.end53.i %add.ptr57.i = getelementptr inbounds nuw i8, ptr %call4, i64 %pos.0.i @@ -728,22 +726,22 @@ sw.bb: ; preds = %if.end8, %if.end8 if.then12: ; preds = %sw.bb %call14 = call i32 @evbuffer_add(ptr noundef nonnull %11, ptr noundef %call10, i64 noundef %payload_len.0.i) #9 + %10 = load ptr, ptr %incomplete_frames25, align 8 + %call16 = call ptr @evbuffer_pullup(ptr noundef %10, i64 noundef -1) #9 + %11 = load ptr, ptr %cb, align 8 %12 = load ptr, ptr %incomplete_frames25, align 8 - %call16 = call ptr @evbuffer_pullup(ptr noundef %12, i64 noundef -1) #9 - %13 = load ptr, ptr %cb, align 8 + %call16 = call i64 @evbuffer_get_length(ptr noundef %12) #9 + %13 = load ptr, ptr %cb_arg, align 8 + call void %11(ptr noundef nonnull %arg, i32 noundef %conv75..i, ptr noundef %call16, i64 noundef %call18, ptr noundef %13) #9 %14 = load ptr, ptr %incomplete_frames25, align 8 - %call18 = call i64 @evbuffer_get_length(ptr noundef %14) #9 - %15 = load ptr, ptr %cb_arg, align 8 - call void %13(ptr noundef nonnull %arg, i32 noundef %conv75..i, ptr noundef %call16, i64 noundef %call18, ptr noundef %15) #9 - %16 = load ptr, ptr %incomplete_frames25, align 8 - call void @evbuffer_free(ptr noundef %16) #9 + call void @evbuffer_free(ptr noundef %14) #9 store ptr null, ptr %incomplete_frames25, align 8 br label %sw.epilog if.else: ; preds = %sw.bb %17 = load ptr, ptr %cb, align 8 %18 = load ptr, ptr %cb_arg, align 8 - call void %17(ptr noundef nonnull %arg, i32 noundef %conv75..i, ptr noundef %call10, i64 noundef %payload_len.0.i, ptr noundef %18) #9 + call void %15(ptr noundef nonnull %arg, i32 noundef %conv75..i, ptr noundef %call10, i64 noundef %payload_len.0.i, ptr noundef %18) #9 br label %sw.epilog sw.bb24: ; preds = %if.end8 diff --git a/bench/linux/optimized/filter.ll b/bench/linux/optimized/filter.ll index 03214223d63..0918765bbfa 100644 --- a/bench/linux/optimized/filter.ll +++ b/bench/linux/optimized/filter.ll @@ -27940,8 +27940,7 @@ define internal fastcc noundef range(i32 -19, 10) i32 @bpf_ipv6_fib_lookup(ptr n %33 = load i32, ptr %18, align 4 %. = select i1 %32, i32 %33, i32 1 %.7 = select i1 %32, i32 0, i32 %33 - %34 = shl nuw nsw i32 %31, 1 - %.8 = xor i32 %34, 4 + %34 = select i1 %32, i32 4, i32 0 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %9, i8 0, i64 80, i1 false), !annotation !7 %35 = getelementptr inbounds nuw i8, ptr %6, i64 4 store i32 %., ptr %35, align 4 @@ -27951,30 +27950,30 @@ define internal fastcc noundef range(i32 -19, 10) i32 @bpf_ipv6_fib_lookup(ptr n %38 = getelementptr inbounds nuw i8, ptr %6, i64 72 store i32 %37, ptr %38, align 8 %39 = getelementptr inbounds nuw i8, ptr %6, i64 17 + store i8 0, ptr %38, align 1 + %39 = getelementptr inbounds nuw i8, ptr %6, i64 19 store i8 0, ptr %39, align 1 - %40 = getelementptr inbounds nuw i8, ptr %6, i64 19 - store i8 0, ptr %40, align 1 - %41 = getelementptr inbounds nuw i8, ptr %6, i64 80 - store i32 0, ptr %41, align 8 - %42 = getelementptr inbounds nuw i8, ptr %1, i64 1 - %43 = load i8, ptr %42, align 1 - %44 = getelementptr inbounds nuw i8, ptr %6, i64 18 - store i8 %43, ptr %44, align 2 - %45 = getelementptr inbounds nuw i8, ptr %6, i64 40 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(16) %8, i64 16, i1 false) - %46 = getelementptr inbounds nuw i8, ptr %6, i64 56 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(16) %7, i64 16, i1 false) - %47 = getelementptr inbounds nuw i8, ptr %1, i64 2 - %48 = load i16, ptr %47, align 2 - %49 = getelementptr inbounds nuw i8, ptr %6, i64 76 - %50 = getelementptr inbounds nuw i8, ptr %6, i64 78 - store i16 %48, ptr %50, align 2 - %51 = getelementptr inbounds nuw i8, ptr %1, i64 4 - %52 = load i16, ptr %51, align 4 - store i16 %52, ptr %49, align 4 - %53 = and i32 %2, 1 - %54 = icmp eq i32 %53, 0 - br i1 %54, label %73, label %55 + %40 = getelementptr inbounds nuw i8, ptr %6, i64 80 + store i32 0, ptr %40, align 8 + %41 = getelementptr inbounds nuw i8, ptr %1, i64 1 + %42 = load i8, ptr %41, align 1 + %42 = getelementptr inbounds nuw i8, ptr %6, i64 18 + store i8 %42, ptr %42, align 2 + %44 = getelementptr inbounds nuw i8, ptr %6, i64 40 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 4 dereferenceable(16) %8, i64 16, i1 false) + %45 = getelementptr inbounds nuw i8, ptr %6, i64 56 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(16) %7, i64 16, i1 false) + %46 = getelementptr inbounds nuw i8, ptr %1, i64 2 + %47 = load i16, ptr %46, align 2 + %47 = getelementptr inbounds nuw i8, ptr %6, i64 76 + %48 = getelementptr inbounds nuw i8, ptr %6, i64 78 + store i16 %47, ptr %49, align 2 + %50 = getelementptr inbounds nuw i8, ptr %1, i64 4 + %51 = load i16, ptr %50, align 4 + store i16 %51, ptr %48, align 4 + %52 = and i32 %2, 1 + %53 = icmp eq i32 %52, 0 + br i1 %53, label %72, label %54 55: ; preds = %30 %56 = and i32 %2, 8 @@ -27992,7 +27991,7 @@ define internal fastcc noundef range(i32 -19, 10) i32 @bpf_ipv6_fib_lookup(ptr n %63 = load ptr, ptr @ipv6_stub, align 8 %64 = getelementptr inbounds nuw i8, ptr %63, i64 32 %65 = load ptr, ptr %64, align 8 - %66 = tail call ptr %65(ptr noundef %0, i32 noundef %62) #34 + %66 = tail call ptr %64(ptr noundef %0, i32 noundef %62) #34 %67 = icmp eq ptr %66, null br i1 %67, label %.thread, label %68, !prof !14 @@ -28000,26 +27999,26 @@ define internal fastcc noundef range(i32 -19, 10) i32 @bpf_ipv6_fib_lookup(ptr n %69 = load ptr, ptr @ipv6_stub, align 8 %70 = getelementptr inbounds nuw i8, ptr %69, i64 48 %71 = load ptr, ptr %70, align 8 - %72 = call i32 %71(ptr noundef %0, ptr noundef nonnull %66, i32 noundef %33, ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef %.8) #34 + %72 = call i32 %70(ptr noundef %0, ptr noundef nonnull %66, i32 noundef %33, ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef %.8) #34 br label %82 73: ; preds = %30 %74 = getelementptr inbounds nuw i8, ptr %6, i64 12 + store i32 0, ptr %73, align 4 + %74 = getelementptr inbounds nuw i8, ptr %6, i64 20 store i32 0, ptr %74, align 4 - %75 = getelementptr inbounds nuw i8, ptr %6, i64 20 - store i32 0, ptr %75, align 4 - %76 = getelementptr inbounds nuw i8, ptr %6, i64 32 - store i64 0, ptr %76, align 8 - %77 = getelementptr inbounds nuw i8, ptr %6, i64 24 - store i32 0, ptr %77, align 8 - %78 = load ptr, ptr @ipv6_stub, align 8 - %79 = getelementptr inbounds nuw i8, ptr %78, i64 40 - %80 = load ptr, ptr %79, align 8 - %81 = call i32 %80(ptr noundef %0, i32 noundef %33, ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef %.8) #34 - br label %82 + %75 = getelementptr inbounds nuw i8, ptr %6, i64 32 + store i64 0, ptr %75, align 8 + %76 = getelementptr inbounds nuw i8, ptr %6, i64 24 + store i32 0, ptr %76, align 8 + %77 = load ptr, ptr @ipv6_stub, align 8 + %78 = getelementptr inbounds nuw i8, ptr %77, i64 40 + %78 = load ptr, ptr %78, align 8 + %79 = call i32 %79(ptr noundef %0, i32 noundef %33, ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef %.8) #34 + br label %81 82: ; preds = %68, %73 - %83 = phi i32 [ %72, %68 ], [ %81, %73 ] + %83 = phi i32 [ %72, %68 ], [ %80, %73 ] %84 = icmp eq i32 %83, 0 br i1 %84, label %85, label %.thread, !prof !9 @@ -28062,27 +28061,27 @@ define internal fastcc noundef range(i32 -19, 10) i32 @bpf_ipv6_fib_lookup(ptr n %104 = load ptr, ptr %103, align 8 %105 = load i32, ptr %6, align 8 %106 = icmp ne i32 %105, 0 - call void %104(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef %105, i1 noundef zeroext %106, ptr noundef null, i32 noundef %.8) #34 - br i1 %3, label %107, label %118 + call void %103(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef %105, i1 noundef zeroext %106, ptr noundef null, i32 noundef %.8) #34 + br i1 %3, label %106, label %118 + +106: ; preds = %100 + %107 = load ptr, ptr @ipv6_stub, align 8 + %108 = getelementptr inbounds nuw i8, ptr %107, i64 64 + %109 = load ptr, ptr %108, align 8 + %110 = call i32 %109(ptr noundef nonnull %5, ptr noundef nonnull %8, ptr noundef nonnull %7) #34 + %111 = getelementptr inbounds nuw i8, ptr %1, i64 6 + %112 = load i16, ptr %111, align 2 + %113 = zext i16 %112 to i32 + %114 = icmp ult i32 %110, %113 + br i1 %114, label %115, label %117 -107: ; preds = %101 - %108 = load ptr, ptr @ipv6_stub, align 8 - %109 = getelementptr inbounds nuw i8, ptr %108, i64 64 - %110 = load ptr, ptr %109, align 8 - %111 = call i32 %110(ptr noundef nonnull %5, ptr noundef nonnull %8, ptr noundef nonnull %7) #34 - %112 = getelementptr inbounds nuw i8, ptr %1, i64 6 - %113 = load i16, ptr %112, align 2 - %114 = zext i16 %113 to i32 - %115 = icmp ult i32 %111, %114 - br i1 %115, label %116, label %118 - -116: ; preds = %107 - %117 = trunc nuw i32 %111 to i16 - store i16 %117, ptr %112, align 2 +107: ; preds = %106 + %108 = trunc nuw i32 %110 to i16 + store i16 %116, ptr %111, align 2 br label %.thread -118: ; preds = %107, %101 - %119 = phi i32 [ %111, %107 ], [ 0, %101 ] +118: ; preds = %106, %101 + %119 = phi i32 [ %110, %106 ], [ 0, %101 ] %120 = load ptr, ptr %5, align 8 %121 = getelementptr inbounds nuw i8, ptr %120, i64 16 %122 = load ptr, ptr %121, align 8 @@ -28110,70 +28109,70 @@ define internal fastcc noundef range(i32 -19, 10) i32 @bpf_ipv6_fib_lookup(ptr n %136 = load i32, ptr %135, align 8 store i32 %136, ptr %18, align 4 %137 = icmp samesign ult i32 %2, 16 - br i1 %137, label %150, label %138 + br i1 %137, label %149, label %137 -138: ; preds = %130 - %139 = getelementptr inbounds nuw i8, ptr %132, i64 124 - %140 = load i32, ptr %139, align 4 - %141 = icmp eq i32 %140, 0 - br i1 %141, label %144, label %142 +137: ; preds = %129 + %138 = getelementptr inbounds nuw i8, ptr %131, i64 124 + %139 = load i32, ptr %138, align 4 + %140 = icmp eq i32 %139, 0 + br i1 %140, label %143, label %141 -142: ; preds = %138 - %143 = getelementptr inbounds nuw i8, ptr %132, i64 108 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(16) %143, i64 16, i1 false) - br label %150 +138: ; preds = %137 + %139 = getelementptr inbounds nuw i8, ptr %132, i64 108 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(16) %142, i64 16, i1 false) + br label %149 -144: ; preds = %138 - %145 = load ptr, ptr @ipv6_bpf_stub, align 8 - %146 = getelementptr inbounds nuw i8, ptr %145, i64 32 - %147 = load ptr, ptr %146, align 8 - %148 = call i32 %147(ptr noundef %0, ptr noundef %131, ptr noundef nonnull %45, i32 noundef 0, ptr noundef nonnull %7) #34 - %149 = icmp eq i32 %148, 0 - br i1 %149, label %150, label %.thread - -150: ; preds = %144, %142, %130 - %151 = and i32 %2, 4 - %152 = icmp eq i32 %151, 0 - br i1 %152, label %153, label %167 - -153: ; preds = %150 - %154 = call fastcc ptr @__ipv6_neigh_lookup_noref_stub(ptr noundef %131, ptr noundef nonnull %8) - %155 = icmp eq ptr %154, null - br i1 %155, label %.thread, label %156 - -156: ; preds = %153 - %157 = getelementptr inbounds nuw i8, ptr %154, i64 132 - %158 = load volatile i8, ptr %157, align 4 - %159 = and i8 %158, -34 - %160 = icmp eq i8 %159, 0 - br i1 %160, label %.thread, label %161 - -161: ; preds = %156 - %162 = getelementptr inbounds nuw i8, ptr %1, i64 58 - %163 = getelementptr inbounds nuw i8, ptr %154, i64 152 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(6) %162, ptr noundef nonnull align 8 dereferenceable(6) %163, i64 6, i1 false) - %164 = getelementptr inbounds nuw i8, ptr %1, i64 52 - %165 = getelementptr inbounds nuw i8, ptr %131, i64 968 - %166 = load ptr, ptr %165, align 8 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(6) %164, ptr noundef align 1 dereferenceable(6) %166, i64 6, i1 false) - br label %167 +142: ; preds = %137 + %143 = load ptr, ptr @ipv6_bpf_stub, align 8 + %145 = getelementptr inbounds nuw i8, ptr %143, i64 32 + %146 = load ptr, ptr %145, align 8 + %147 = call i32 %146(ptr noundef %0, ptr noundef %130, ptr noundef nonnull %44, i32 noundef 0, ptr noundef nonnull %7) #34 + %148 = icmp eq i32 %147, 0 + br i1 %148, label %149, label %.thread -167: ; preds = %161, %150 - %168 = getelementptr inbounds nuw i8, ptr %1, i64 48 - %169 = getelementptr inbounds nuw i8, ptr %1, i64 50 - store i16 0, ptr %169, align 2 - store i16 0, ptr %168, align 4 - %170 = icmp eq i32 %119, 0 - br i1 %170, label %.thread, label %171 - -171: ; preds = %167 - %172 = trunc i32 %119 to i16 - %173 = getelementptr inbounds nuw i8, ptr %1, i64 6 - store i16 %172, ptr %173, align 2 +144: ; preds = %143, %138, %129 + %145 = and i32 %2, 4 + %146 = icmp eq i32 %145, 0 + br i1 %146, label %152, label %166 + +167: ; preds = %149 + %168 = call fastcc ptr @__ipv6_neigh_lookup_noref_stub(ptr noundef %130, ptr noundef nonnull %8) + %169 = icmp eq ptr %153, null + br i1 %169, label %.thread, label %155 + +155:; preds = %152 + %156 = getelementptr inbounds nuw i8, ptr %153, i64 132 + %157 = load volatile i8, ptr %156, align 4 + %158 = and i8 %157, -34 + %172 = icmp eq i8 %158, 0 + br i1 %159, label %.thread, label %160 + +160: ; preds = %155 + %161 = getelementptr inbounds nuw i8, ptr %1, i64 58 + %162 = getelementptr inbounds nuw i8, ptr %153, i64 152 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(6) %161, ptr noundef nonnull align 8 dereferenceable(6) %162, i64 6, i1 false) + %163 = getelementptr inbounds nuw i8, ptr %1, i64 52 + %164 = getelementptr inbounds nuw i8, ptr %130, i64 968 + %165 = load ptr, ptr %164, align 8 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(6) %163, ptr noundef align 1 dereferenceable(6) %165, i64 6, i1 false) + br label %166 + +166: ; preds = %160, %149 + %167 = getelementptr inbounds nuw i8, ptr %1, i64 48 + %168 = getelementptr inbounds nuw i8, ptr %1, i64 50 + store i16 0, ptr %168, align 2 + store i16 0, ptr %167, align 4 + %169 = icmp eq i32 %118, 0 + br i1 %169, label %.thread, label %170 + +170: ; preds = %166 + %171 = trunc i32 %118 to i16 + %172 = getelementptr inbounds nuw i8, ptr %1, i64 6 + store i16 %171, ptr %172, align 2 br label %.thread -.thread: ; preds = %61, %171, %167, %156, %153, %144, %118, %116, %100, %99, %98, %95, %91, %85, %82, %26, %22, %17, %13, %4 - %174 = phi i32 [ 4, %100 ], [ 3, %99 ], [ 2, %98 ], [ 8, %116 ], [ 4, %13 ], [ 4, %4 ], [ -19, %17 ], [ 5, %26 ], [ 4, %91 ], [ 1, %95 ], [ 6, %118 ], [ 9, %144 ], [ 7, %156 ], [ 7, %153 ], [ 5, %22 ], [ 4, %82 ], [ 4, %85 ], [ 0, %167 ], [ 0, %171 ], [ 4, %61 ] +.thread: ; preds = %61, %170, %166, %155, %152, %143, %118, %115, %100, %99, %98, %95, %91, %85, %82, %26, %22, %17, %13, %4 + %174 = phi i32 [ 4, %100 ], [ 3, %99 ], [ 2, %98 ], [ 8, %115 ], [ 4, %13 ], [ 4, %4 ], [ -19, %17 ], [ 5, %26 ], [ 4, %91 ], [ 1, %95 ], [ 6, %118 ], [ 9, %143 ], [ 7, %155 ], [ 7, %152 ], [ 5, %22 ], [ 4, %81 ], [ 4, %84 ], [ 0, %166 ], [ 0, %170 ], [ 4, %60 ] call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) #34 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #34 ret i32 %174 diff --git a/bench/llvm/optimized/APINotesTypes.ll b/bench/llvm/optimized/APINotesTypes.ll index 38423e0aa72..c866b010889 100644 --- a/bench/llvm/optimized/APINotesTypes.ll +++ b/bench/llvm/optimized/APINotesTypes.ll @@ -788,31 +788,30 @@ _ZN4llvm11raw_ostreamlsEPKc.exit: ; preds = %21, %20, %17, %2 26: ; preds = %_ZN4llvm11raw_ostreamlsEPKc.exit %27 = and i8 %24, 8 %.not8 = icmp eq i8 %27, 0 - %28 = shl nuw nsw i8 %27, 1 - %29 = zext nneg i8 %28 to i64 - %30 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %31 = load ptr, ptr %30, align 8, !tbaa !3 - %32 = getelementptr inbounds nuw i8, ptr %1, i64 32 - %33 = load ptr, ptr %32, align 8, !tbaa !12 - %34 = ptrtoint ptr %31 to i64 - %35 = ptrtoint ptr %33 to i64 - %36 = sub i64 %34, %35 - %37 = icmp ult i64 %36, %29 - br i1 %37, label %38, label %41 + %28 = select i1 %.not8, i64 0, i64 16 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %30 = load ptr, ptr %29, align 8, !tbaa !3 + %31 = getelementptr inbounds nuw i8, ptr %1, i64 32 + %32 = load ptr, ptr %31, align 8, !tbaa !12 + %33 = ptrtoint ptr %30 to i64 + %34 = ptrtoint ptr %32 to i64 + %35 = sub i64 %33, %34 + %36 = icmp ugt i64 %28, %35 + br i1 %36, label %37, label %40 38: ; preds = %26 %39 = select i1 %.not8, ptr @.str.4, ptr @.str.16 - %40 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN4llvm11raw_ostream5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %39, i64 noundef %29) #3 + %40 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN4llvm11raw_ostream5writeEPKcm(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %39, i64 noundef %28) #3 br label %_ZN4llvm11raw_ostreamlsEPKc.exit11 41: ; preds = %26 br i1 %.not8, label %_ZN4llvm11raw_ostreamlsEPKc.exit11, label %42 42: ; preds = %41 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %33, ptr nonnull align 1 @.str.16, i64 %29, i1 false) - %43 = load ptr, ptr %32, align 8, !tbaa !12 - %44 = getelementptr inbounds nuw i8, ptr %43, i64 %29 - store ptr %44, ptr %32, align 8, !tbaa !12 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %32, ptr noundef nonnull align 1 dereferenceable(16) @.str.16, i64 16, i1 false) + %43 = load ptr, ptr %31, align 8, !tbaa !12 + %44 = getelementptr inbounds nuw i8, ptr %43, i64 16 + store ptr %44, ptr %31, align 8, !tbaa !12 br label %_ZN4llvm11raw_ostreamlsEPKc.exit11 _ZN4llvm11raw_ostreamlsEPKc.exit11: ; preds = %42, %41, %38, %_ZN4llvm11raw_ostreamlsEPKc.exit diff --git a/bench/llvm/optimized/ARMWinEH.ll b/bench/llvm/optimized/ARMWinEH.ll index 827cd6a2e08..d8413991975 100644 --- a/bench/llvm/optimized/ARMWinEH.ll +++ b/bench/llvm/optimized/ARMWinEH.ll @@ -17,6 +17,7 @@ define dso_local range(i64 0, 139637976793088) i64 @_ZN4llvm3ARM5WinEH17SavedReg %.not45 = icmp eq i32 %5, 0 call void @llvm.assume(i1 true) [ "align"(ptr %3, i64 1) ] %6 = and i32 %.0.copyload.i.i.i.i, 1048576 + %.not46 = icmp eq i32 %6, 0 call void @llvm.assume(i1 true) [ "align"(ptr %3, i64 1) ] %7 = lshr i32 %.0.copyload.i.i.i.i, 10 %8 = trunc i32 %7 to i16 @@ -24,10 +25,9 @@ define dso_local range(i64 0, 139637976793088) i64 @_ZN4llvm3ARM5WinEH17SavedReg br i1 %1, label %10, label %14 10: ; preds = %2 - %11 = lshr exact i32 %6, 6 - %12 = trunc nuw nsw i32 %11 to i16 - %13 = or disjoint i16 %9, %12 - br label %26 + %11 = select i1 %.not46, i16 0, i16 16384 + %12 = or disjoint i16 %11, %9 + br label %23 14: ; preds = %2 call void @llvm.assume(i1 true) [ "align"(ptr %3, i64 1) ] @@ -36,54 +36,52 @@ define dso_local range(i64 0, 139637976793088) i64 @_ZN4llvm3ARM5WinEH17SavedReg br i1 %.not, label %20, label %16 16: ; preds = %14 - %17 = lshr exact i32 %6, 6 - %18 = trunc nuw nsw i32 %17 to i16 - %19 = or disjoint i16 %9, %18 - br label %26 + %17 = select i1 %.not46, i16 0, i16 16384 + %17 = or disjoint i16 %16, %9 + br label %23 20: ; preds = %14 call void @llvm.assume(i1 true) [ "align"(ptr %3, i64 1) ] %21 = and i32 %.0.copyload.i.i.i.i, 32768 %.not48 = icmp eq i32 %21, 0 - br i1 %.not48, label %22, label %26 + br i1 %.not48, label %22, label %23 22: ; preds = %20 - %23 = lshr exact i32 %6, 5 - %24 = trunc nuw i32 %23 to i16 - %25 = or disjoint i16 %9, %24 - br label %26 - -26: ; preds = %16, %22, %20, %10 - %.039 = phi i16 [ %13, %10 ], [ %9, %20 ], [ %25, %22 ], [ %19, %16 ] - br i1 %.not45, label %34, label %27 - -27: ; preds = %26 - %28 = add nuw nsw i32 %4, 1 - %29 = and i32 %28, 7 - %notmask = shl nsw i32 -1, %29 - %30 = xor i32 %notmask, -1 - %31 = shl nuw nsw i32 %30, 8 - %32 = zext nneg i32 %31 to i64 - %33 = shl nuw nsw i64 %32, 32 - br label %40 - -34: ; preds = %26 - %35 = and i32 %4, 7 - %36 = shl nuw nsw i32 32, %35 - %37 = trunc nuw nsw i32 %36 to i16 - %38 = add nsw i16 %37, -16 - %39 = or i16 %.039, %38 - br label %40 - -40: ; preds = %34, %27 - %.1 = phi i16 [ %.039, %27 ], [ %39, %34 ] - %.0 = phi i64 [ %33, %27 ], [ 0, %34 ] + %23 = select i1 %.not46, i16 0, i16 -32768 + %24 = or disjoint i16 %21, %9 + br label %23 + +23: ; preds = %15, %20, %18, %10 + %.039 = phi i16 [ %12, %10 ], [ %9, %18 ], [ %22, %20 ], [ %17, %15 ] + br i1 %.not45, label %31, label %24 + +24: ; preds = %23 + %25 = add nuw nsw i32 %4, 1 + %28 = and i32 %25, 7 + %29 = shl nsw i32 -1, %28 + %notmask = xor i32 %29, -1 + %30 = shl nuw nsw i32 %notmask, 8 + %31 = zext nneg i32 %30 to i64 + %32 = shl nuw nsw i64 %29, 32 + br label %37 + +31: ; preds = %23 + %32 = and i32 %4, 7 + %35 = shl nuw nsw i32 32, %32 + %36 = trunc nuw nsw i32 %35 to i16 + %37 = add nsw i16 %36, -16 + %38 = or i16 %.039, %35 + br label %37 + +37: ; preds = %31, %24 + %.1 = phi i16 [ %.039, %24 ], [ %36, %31 ] + %.1 = phi i64 [ %30, %24 ], [ 0, %31 ] call void @llvm.assume(i1 true) [ "align"(ptr %3, i64 1) ] %41 = icmp ugt i32 %.0.copyload.i.i.i.i, -50331649 call void @llvm.assume(i1 true) [ "align"(ptr %3, i64 1) ] br i1 %41, label %_ZN4llvm3ARM5WinEH15PrologueFoldingERKNS1_15RuntimeFunctionE.exit, label %_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit.thread -_ZN4llvm3ARM5WinEH15PrologueFoldingERKNS1_15RuntimeFunctionE.exit: ; preds = %40 +_ZN4llvm3ARM5WinEH15PrologueFoldingERKNS1_15RuntimeFunctionE.exit: ; preds = %37 %42 = and i32 %.0.copyload.i.i.i.i, 16777216 %.not49 = icmp ne i32 %42, 0 %brmerge.not = and i1 %1, %.not49 @@ -110,8 +108,8 @@ _ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit: ; preds = %_Z %51 = or i16 %.1, %50 br label %_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit.thread -_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit.thread: ; preds = %40, %_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit, %44 - %.2 = phi i16 [ %.1, %_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit ], [ %51, %44 ], [ %.1, %40 ] +_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit.thread: ; preds = %37, %_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit, %44 + %.2 = phi i16 [ %.1, %_ZN4llvm3ARM5WinEH15EpilogueFoldingERKNS1_15RuntimeFunctionE.exit ], [ %51, %44 ], [ %.1, %37 ] %.sroa.0.0.insert.ext.i = zext i16 %.2 to i64 %.sroa.0.0.insert.insert.i = or disjoint i64 %.0, %.sroa.0.0.insert.ext.i ret i64 %.sroa.0.0.insert.insert.i diff --git a/bench/llvm/optimized/ASTStructuralEquivalence.ll b/bench/llvm/optimized/ASTStructuralEquivalence.ll index beeea581965..589f3951e23 100644 --- a/bench/llvm/optimized/ASTStructuralEquivalence.ll +++ b/bench/llvm/optimized/ASTStructuralEquivalence.ll @@ -13237,29 +13237,27 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_112StmtComparer12Trav 8: ; preds = %3 %9 = load i24, ptr %1, align 8 - %10 = lshr i24 %9, 19 - %11 = load i24, ptr %2, align 8 - %12 = lshr i24 %11, 19 - %13 = xor i24 %12, %10 - %14 = and i24 %13, 7 - %.not.i = icmp eq i24 %14, 0 - br i1 %.not.i, label %15, label %_ZN12_GLOBAL__N_112StmtComparer16IsStmtEquivalentEPKN5clang24UnaryExprOrTypeTraitExprES4_.exit + %10 = load i24, ptr %2, align 8 + %11 = xor i24 %10, %9 + %12 = and i24 %11, 3670016 + %13 = icmp eq i24 %12, 0 + br i1 %13, label %13, label %_ZN12_GLOBAL__N_112StmtComparer16IsStmtEquivalentEPKN5clang24UnaryExprOrTypeTraitExprES4_.exit 15: ; preds = %8 %16 = load ptr, ptr %0, align 8, !tbaa !613 - %17 = getelementptr inbounds nuw i8, ptr %1, i64 16 - %18 = load ptr, ptr %17, align 8 - %19 = and i24 %10, 8 - %20 = xor i24 %19, 8 - %.sroa.0.0.in.idx.i6 = zext nneg i24 %20 to i64 - %.sroa.0.0.in.i7 = getelementptr inbounds nuw i8, ptr %18, i64 %.sroa.0.0.in.idx.i6 + %17 = and i24 %9, 4194304 + %18 = icmp eq i24 %17, 0 + %19 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %20 = load ptr, ptr %19, align 8 + %.sroa.0.0.in.idx.i6 = select i1 %21, i64 8, i64 0 + %.sroa.0.0.in.i7 = getelementptr inbounds nuw i8, ptr %17, i64 %.sroa.0.0.in.idx.i6 %.sroa.0.0.i8 = load i64, ptr %.sroa.0.0.in.i7, align 8, !tbaa !82 - %21 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %22 = load ptr, ptr %21, align 8 - %23 = and i24 %12, 8 - %24 = xor i24 %23, 8 - %.sroa.0.0.in.idx.i = zext nneg i24 %24 to i64 - %.sroa.0.0.in.i = getelementptr inbounds nuw i8, ptr %22, i64 %.sroa.0.0.in.idx.i + %21 = and i24 %10, 4194304 + %22 = icmp eq i24 %21, 0 + %23 = getelementptr inbounds nuw i8, ptr %2, i64 16 + %24 = load ptr, ptr %23, align 8 + %.sroa.0.0.in.idx.i = select i1 %22, i64 8, i64 0 + %.sroa.0.0.in.i = getelementptr inbounds nuw i8, ptr %20, i64 %.sroa.0.0.in.idx.i %.sroa.0.0.i = load i64, ptr %.sroa.0.0.in.i, align 8, !tbaa !82 %25 = tail call fastcc noundef zeroext i1 @_ZL24IsStructurallyEquivalentRN5clang28StructuralEquivalenceContextENS_8QualTypeES2_(ptr noundef nonnull align 8 dereferenceable(137) %16, i64 %.sroa.0.0.i8, i64 %.sroa.0.0.i) br label %_ZN12_GLOBAL__N_112StmtComparer16IsStmtEquivalentEPKN5clang24UnaryExprOrTypeTraitExprES4_.exit diff --git a/bench/llvm/optimized/DebugLinesSubsection.ll b/bench/llvm/optimized/DebugLinesSubsection.ll index 5602d8fde64..f01f213d385 100644 --- a/bench/llvm/optimized/DebugLinesSubsection.ll +++ b/bench/llvm/optimized/DebugLinesSubsection.ll @@ -232,13 +232,11 @@ _ZN4llvm5ErrorD2Ev.exit: ; preds = %_ZN4llvm19BinaryStr br label %.critedge20 60: ; preds = %_ZN4llvm5ErrorD2Ev.exit - %61 = shl nuw nsw i16 %51, 2 - %62 = or disjoint i16 %61, 8 - %63 = zext nneg i16 %62 to i32 - %64 = mul i32 %.0.copyload.i.i.i23, %63 + %61 = select i1 %.not, i32 8, i32 12 + %62 = mul i32 %61, %.0.copyload.i.i.i23 call void @llvm.assume(i1 true) [ "align"(ptr %53, i64 1) ] %65 = add i32 %.0.copyload.i.i.i24, -12 - %66 = icmp ugt i32 %64, %65 + %66 = icmp ugt i32 %62, %65 br i1 %66, label %67, label %72 67: ; preds = %60 @@ -307,11 +305,11 @@ _ZN4llvm5ErrorD2Ev.exit31: ; preds = %_ZN4llvm5ErrorD2Ev. %88 = load ptr, ptr %80, align 8, !tbaa !18 %89 = getelementptr inbounds nuw i8, ptr %88, i64 16 %90 = load ptr, ptr %89, align 8 - call void %90(ptr noundef nonnull align 8 dereferenceable(16) %80) #18 + call void %88(ptr noundef nonnull align 8 dereferenceable(16) %80) #18 %91 = load ptr, ptr %80, align 8, !tbaa !18 %92 = getelementptr inbounds nuw i8, ptr %91, i64 24 %93 = load ptr, ptr %92, align 8 - call void %93(ptr noundef nonnull align 8 dereferenceable(16) %80) #18 + call void %91(ptr noundef nonnull align 8 dereferenceable(16) %80) #18 br label %_ZN4llvm18BinaryStreamReaderD2Ev.exit 94: ; preds = %81 diff --git a/bench/llvm/optimized/DeclTemplate.ll b/bench/llvm/optimized/DeclTemplate.ll index 948c81a90e3..4705896cbb5 100644 --- a/bench/llvm/optimized/DeclTemplate.ll +++ b/bench/llvm/optimized/DeclTemplate.ll @@ -3485,15 +3485,14 @@ define dso_local noundef ptr @_ZN5clang20TemplateTypeParmDecl6CreateERKNS_10ASTC %22 = select i1 %9, i8 2, i8 0 %23 = and i64 %10, 4294967296 %.not.i = icmp eq i64 %23, 0 - %24 = lshr exact i64 %23, 29 - %25 = trunc nuw nsw i64 %24 to i8 - %26 = or disjoint i8 %22, %14 - %27 = or disjoint i8 %26, %25 - %28 = or disjoint i8 %27, %21 - store i8 %28, ptr %19, align 4 - %29 = getelementptr inbounds nuw i8, ptr %13, i64 64 + %24 = select i1 %.not.i, i8 0, i8 8 + %25 = or disjoint i8 %22, %14 + %26 = or disjoint i8 %25, %24 + %27 = or disjoint i8 %26, %21 + store i8 %27, ptr %19, align 4 + %28 = getelementptr inbounds nuw i8, ptr %13, i64 64 %.0.i.i = select i1 %.not.i, i32 0, i32 %.sroa.0.0.extract.trunc.i - store i32 %.0.i.i, ptr %29, align 8, !tbaa !103 + store i32 %.0.i.i, ptr %28, align 8, !tbaa !103 %30 = getelementptr inbounds nuw i8, ptr %13, i64 72 store i64 0, ptr %30, align 8, !tbaa !14 %31 = tail call i64 @_ZNK5clang10ASTContext23getTemplateTypeParmTypeEjjbPNS_20TemplateTypeParmDeclE(ptr noundef nonnull align 8 dereferenceable(23216) %0, i32 noundef %4, i32 noundef %5, i1 noundef zeroext %8, ptr noundef nonnull %13) #22 diff --git a/bench/llvm/optimized/ExprMutationAnalyzer.ll b/bench/llvm/optimized/ExprMutationAnalyzer.ll index 6b8bac43af8..c7524bcb021 100644 --- a/bench/llvm/optimized/ExprMutationAnalyzer.ll +++ b/bench/llvm/optimized/ExprMutationAnalyzer.ll @@ -1989,13 +1989,12 @@ declare noundef ptr @_ZNK5clang15CXXForRangeStmt12getRangeInitEv(ptr noundef non define linkonce_odr hidden noundef zeroext i1 @_ZNK5clang12ast_matchers8internal33matcher_hasArgumentOfType0Matcher7matchesERKNS_24UnaryExprOrTypeTraitExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2, ptr noundef %3) unnamed_addr #1 comdat align 2 { %5 = alloca %"class.clang::DynTypedNode", align 8 %6 = load i24, ptr %1, align 8 - %7 = getelementptr inbounds nuw i8, ptr %1, i64 16 - %8 = load ptr, ptr %7, align 8 - %9 = lshr i24 %6, 19 - %10 = and i24 %9, 8 - %11 = xor i24 %10, 8 - %.sroa.0.0.in.idx.i = zext nneg i24 %11 to i64 - %.sroa.0.0.in.i = getelementptr inbounds nuw i8, ptr %8, i64 %.sroa.0.0.in.idx.i + %7 = and i24 %6, 4194304 + %8 = icmp eq i24 %7, 0 + %9 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %10 = load ptr, ptr %9, align 8 + %11 = select i1 %8, i64 8, i64 0 + %.sroa.0.0.in.idx.i = getelementptr inbounds nuw i8, ptr %10, i64 %13 %.sroa.0.0.i = load i64, ptr %.sroa.0.0.in.i, align 8, !tbaa !30 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #25 diff --git a/bench/llvm/optimized/MicrosoftCXXABI.ll b/bench/llvm/optimized/MicrosoftCXXABI.ll index 401d7455b91..8b10e5b4bde 100644 --- a/bench/llvm/optimized/MicrosoftCXXABI.ll +++ b/bench/llvm/optimized/MicrosoftCXXABI.ll @@ -5545,10 +5545,9 @@ define internal { ptr, i32 } @_ZN12_GLOBAL__N_115MicrosoftCXXABI19getCatchAllTyp %7 = load ptr, ptr %6, align 8, !tbaa !892 %8 = getelementptr inbounds nuw i8, ptr %7, i64 8 %9 = load i64, ptr %8, align 8 - %10 = lshr i64 %9, 40 - %11 = trunc nuw nsw i64 %10 to i32 - %12 = and i32 %11, 64 - %. = xor i32 %12, 64 + %10 = and i64 %9, 70368744177664 + %11 = icmp eq i64 %10, 0 + %12 = select i1 %11, i32 64, i32 0 %.fca.1.insert = insertvalue { ptr, i32 } { ptr null, i32 poison }, i32 %., 1 ret { ptr, i32 } %.fca.1.insert } diff --git a/bench/llvm/optimized/NeonEmitter.ll b/bench/llvm/optimized/NeonEmitter.ll index 3069f540cd9..11ea0c94f61 100644 --- a/bench/llvm/optimized/NeonEmitter.ll +++ b/bench/llvm/optimized/NeonEmitter.ll @@ -42740,9 +42740,7 @@ _ZNKSt4lessIvEclIRN12_GLOBAL__N_19IntrinsicES4_EEDTltclsr3stdE7forwardIT_Efp_Ecl %.0.in.i.i.i = phi i32 [ %26, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i.i ], [ %.0.i6.i.i.i.i.i, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.thread.i.i.i.i.i ], [ %42, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i10.i.i.i ], [ %.0.i6.i.i16.i.i.i, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.thread.i.i13.i.i.i ], [ %53, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i19.i.i.i ], [ %.0.i6.i.i25.i.i.i, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.thread.i.i22.i.i.i ] %.0.i.i.i = icmp slt i32 %.0.in.i.i.i, 0 %.018.val.sink.i = select i1 %.0.i.i.i, ptr %.019.val.i, ptr %.018.val.i - %55 = lshr i32 %.0.in.i.i.i, 28 - %56 = and i32 %55, 8 - %.120.idx.i = zext nneg i32 %56 to i64 + %55 = select i1 %.0.i.i.i, i64 8, i64 0 %.120.i = getelementptr inbounds nuw i8, ptr %.01923.i, i64 %.120.idx.i %.1.idx.i = select i1 %.0.i.i.i, i64 0, i64 8 %.1.i = getelementptr inbounds nuw i8, ptr %.01824.i, i64 %.1.idx.i diff --git a/bench/llvm/optimized/RISCVAsmParser.ll b/bench/llvm/optimized/RISCVAsmParser.ll index 88f39c8586d..0b8365e0cec 100644 --- a/bench/llvm/optimized/RISCVAsmParser.ll +++ b/bench/llvm/optimized/RISCVAsmParser.ll @@ -8551,12 +8551,9 @@ _ZNK4llvm15MCRegisterClass8containsENS_10MCRegisterE.exit61: ; preds = %_ZNK12_G %104 = tail call noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4llvm17MCTargetAsmParser6getSTIEv(ptr noundef nonnull align 8 dereferenceable(561) %0) #25 %105 = getelementptr inbounds nuw i8, ptr %104, i64 232 %106 = load i64, ptr %105, align 8, !tbaa !53 - %107 = and i64 %106, 4 - %.not78 = icmp ne i64 %107, 0 - %brmerge.not = and i1 %.0.i53, %.not78 - %108 = trunc nuw nsw i64 %107 to i32 - %.mux = xor i32 %108, 4 - %spec.select = select i1 %brmerge.not, i32 0, i32 %.mux + %107 = trunc i64 %106 to i32 + %.not78 = and i32 %107, 4 + %brmerge.not = xor i32 %.not78, 4 br label %.thread _ZNK4llvm15MCRegisterClass8containsENS_10MCRegisterE.exit61.thread: ; preds = %_ZNK12_GLOBAL__N_112RISCVOperand10isGPRAsFPREv.exit.thread, %97, %_ZNK4llvm15MCRegisterClass8containsENS_10MCRegisterE.exit61 diff --git a/bench/llvm/optimized/SemaTemplateDeduction.ll b/bench/llvm/optimized/SemaTemplateDeduction.ll index f2bfb93dac9..5cf4a05db98 100644 --- a/bench/llvm/optimized/SemaTemplateDeduction.ll +++ b/bench/llvm/optimized/SemaTemplateDeduction.ll @@ -8926,9 +8926,8 @@ _ZNK5clang4Type6castAsINS_17FunctionProtoTypeEEEPKT_v.exit24: ; preds = %_ZNK5cl 41: ; preds = %34 %42 = and i16 %35, -33 - %43 = lshr exact i64 %36, 19 - %masksel.i = trunc nuw nsw i64 %43 to i16 - %.sroa.0.0.i = or disjoint i16 %42, %masksel.i + %43 = select i1 %37, i16 32, i16 0 + %masksel.i = or disjoint i16 %43, %42 store i16 %.sroa.0.0.i, ptr %5, align 8, !tbaa !1069 br label %44 diff --git a/bench/lvgl/optimized/lv_switch.ll b/bench/lvgl/optimized/lv_switch.ll index 7e7974e3cee..0dec4f66a51 100644 --- a/bench/lvgl/optimized/lv_switch.ll +++ b/bench/lvgl/optimized/lv_switch.ll @@ -107,27 +107,26 @@ define internal void @lv_switch_event(ptr readnone captures(none) %0, ptr nounde 40: ; preds = %37 %41 = tail call zeroext i16 @lv_obj_get_state(ptr noundef %11) #5 - %42 = getelementptr inbounds nuw i8, ptr %11, i64 64 - %43 = load i32, ptr %42, align 8, !tbaa !3 - %44 = icmp eq i32 %43, -1 - %45 = shl i16 %41, 8 - %46 = and i16 %45, 256 - %47 = xor i16 %46, 256 - %48 = zext nneg i16 %47 to i32 - %.0.i = select i1 %44, i32 %48, i32 %43 - %.020.i = zext nneg i16 %46 to i32 - %49 = sub nsw i32 %.0.i, %.020.i - %50 = tail call i32 @llvm.abs.i32(i32 %49, i1 true) - %51 = mul i32 %50, %.sroa.0.0.extract.trunc.i.i - %52 = lshr i32 %51, 8 - %53 = tail call zeroext i1 @lv_anim_delete(ptr noundef %11, ptr noundef null) #5 + %42 = and i16 %41, 1 + %43 = icmp eq i16 %42, 0 + %44 = getelementptr inbounds nuw i8, ptr %11, i64 64 + %45 = load i32, ptr %43, align 8, !tbaa !3 + %46 = icmp eq i32 %45, -1 + %47 = select i1 %43, i32 256, i32 0 + %48 = select i1 %43, i32 0, i32 256 + %.0.i = select i1 %45, i32 %46, i32 %44 + %.020.i = sub nsw i32 %.0.i, %47 + %49 = tail call i32 @llvm.abs.i32(i32 %.020.i, i1 true) + %50 = mul i32 %49, %.sroa.0.0.extract.trunc.i.i + %51 = lshr i32 %50, 8 + %52 = tail call zeroext i1 @lv_anim_delete(ptr noundef %11, ptr noundef null) #5 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #5 call void @lv_anim_init(ptr noundef nonnull %7) #5 call void @lv_anim_set_var(ptr noundef nonnull %7, ptr noundef %11) #5 call void @lv_anim_set_exec_cb(ptr noundef nonnull %7, ptr noundef nonnull @lv_switch_anim_exec_cb) #5 - call void @lv_anim_set_values(ptr noundef nonnull %7, i32 noundef %.0.i, i32 noundef %.020.i) #5 + call void @lv_anim_set_values(ptr noundef nonnull %7, i32 noundef %.0.i, i32 noundef %47) #5 call void @lv_anim_set_completed_cb(ptr noundef nonnull %7, ptr noundef nonnull @lv_switch_anim_completed) #5 - call void @lv_anim_set_duration(ptr noundef nonnull %7, i32 noundef %52) #5 + call void @lv_anim_set_duration(ptr noundef nonnull %7, i32 noundef %51) #5 %54 = call ptr @lv_anim_start(ptr noundef nonnull %7) #5 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #5 br label %lv_switch_trigger_anim.exit diff --git a/bench/meshlab/optimized/filter_mesh_booleans.ll b/bench/meshlab/optimized/filter_mesh_booleans.ll index 28e637ab7f3..4f9cbc5bbf5 100644 --- a/bench/meshlab/optimized/filter_mesh_booleans.ll +++ b/bench/meshlab/optimized/filter_mesh_booleans.ll @@ -221657,9 +221657,7 @@ _ZNK4CGAL23CartesianKernelFunctors9Less_xy_2INS_16Simple_cartesianIN5boost14mult %spec.select.i.i128 = getelementptr inbounds nuw i8, ptr %0, i64 %spec.select.idx.i.i127 %spec.select.idx.i.i129 = select i1 %.0.i.i.i121, i64 64, i64 0 %spec.select.i.i130 = getelementptr inbounds nuw i8, ptr %1, i64 %spec.select.idx.i.i129 - %25 = lshr i32 %.0.i.i.i121.in, 25 - %26 = and i32 %25, 64 - %spec.select.idx.i.i131 = zext nneg i32 %26 to i64 + %25 = select i1 %.0.i.i.i121, i64 0, i64 64 %spec.select.i.i132 = getelementptr inbounds nuw i8, ptr %1, i64 %spec.select.idx.i.i131 %27 = tail call noundef i32 @__gmpq_cmp(ptr noundef nonnull align 8 dereferenceable(64) %spec.select.i.i128, ptr noundef nonnull align 8 dereferenceable(64) %spec.select.i.i130) #43 %.0.i.i.i.i.i.i.i136 = tail call i32 @llvm.scmp.i32.i32(i32 %27, i32 0) diff --git a/bench/meshlab/optimized/filter_sketchfab.ll b/bench/meshlab/optimized/filter_sketchfab.ll index 73f8db84e24..65606098db3 100644 --- a/bench/meshlab/optimized/filter_sketchfab.ll +++ b/bench/meshlab/optimized/filter_sketchfab.ll @@ -14813,9 +14813,8 @@ _ZL55mz_zip_writer_compute_padding_needed_for_file_alignmentP18mz_zip_archive_ta 143: ; preds = %.thread %144 = add i64 %130, %3 - %145 = lshr exact i32 %19, 7 - %spec.select203 = trunc nuw nsw i32 %145 to i16 - br label %164 + %145 = select i1 %20, i16 8, i16 0 + br label %163 tdefl_create_comp_flags_from_zip_params.exit: ; preds = %131 store ptr %0, ptr %15, align 8 @@ -14842,7 +14841,7 @@ tdefl_create_comp_flags_from_zip_params.exit: ; preds = %131 %158 = load ptr, ptr %157, align 8 %159 = getelementptr inbounds nuw i8, ptr %0, i64 56 %160 = load ptr, ptr %159, align 8 - call void %158(ptr noundef %160, ptr noundef %.0166) + call void %157(ptr noundef %160, ptr noundef %.0166) br label %_ZL35mz_zip_writer_validate_archive_namePKc.exit.thread 161: ; preds = %tdefl_create_comp_flags_from_zip_params.exit @@ -14860,7 +14859,7 @@ tdefl_create_comp_flags_from_zip_params.exit: ; preds = %131 %166 = load ptr, ptr %165, align 8 %167 = getelementptr inbounds nuw i8, ptr %0, i64 56 %168 = load ptr, ptr %167, align 8 - call void %166(ptr noundef %168, ptr noundef %.0166) + call void %165(ptr noundef %168, ptr noundef %.0166) %169 = icmp ugt i64 %.0168, 4294967295 %170 = icmp ugt i64 %.0169, 4294967295 %or.cond17 = select i1 %169, i1 true, i1 %170 @@ -14963,7 +14962,7 @@ tdefl_create_comp_flags_from_zip_params.exit: ; preds = %131 store i8 0, ptr %234, align 1 %235 = load ptr, ptr %119, align 8 %236 = load ptr, ptr %121, align 8 - %237 = call noundef i64 %235(ptr noundef %236, i64 noundef %117, ptr noundef nonnull %13, i64 noundef 30) + %237 = call noundef i64 %234(ptr noundef %236, i64 noundef %117, ptr noundef nonnull %13, i64 noundef 30) %.not198 = icmp eq i64 %237, 30 br i1 %.not198, label %238, label %_ZL35mz_zip_writer_validate_archive_namePKc.exit.thread diff --git a/bench/mold/optimized/passes.cc.ALPHA.ll b/bench/mold/optimized/passes.cc.ALPHA.ll index 2e83685cce7..0c9e58c89b7 100644 --- a/bench/mold/optimized/passes.cc.ALPHA.ll +++ b/bench/mold/optimized/passes.cc.ALPHA.ll @@ -92786,26 +92786,28 @@ if.end40: ; preds = %if.end36 br i1 %cmp41, label %return, label %if.end43 if.end43: ; preds = %if.end40 + %and52 = and i64 %x.0.copyload.i21, 1024 + %tobool53.not = icmp eq i64 %and52, 0 %is_relro = getelementptr inbounds nuw i8, ptr %chunk, i64 96 %14 = load i8, ptr %is_relro, align 8 %cmp57 = icmp eq i32 %x.0.copyload.i, 8 + %or = select i1 %tobool.not, i32 1536, i32 1024 %15 = trunc i64 %x.0.copyload.i21 to i32 %16 = shl i32 %15, 8 - %17 = and i32 %16, 768 + %17 = and i32 %16, 256 %18 = shl i32 %15, 5 %shl67 = and i32 %18, 128 - %19 = lshr i32 %15, 4 - %20 = and i32 %19, 64 - %21 = shl i8 %14, 5 - %22 = and i8 %21, 32 - %23 = xor i8 %22, 32 - %shl77 = zext nneg i8 %23 to i32 + %19 = select i1 %tobool53.not, i32 64, i32 0 + %20 = shl i8 %14, 5 + %21 = and i8 %17, 32 + %22 = xor i8 %21, 32 + %23 = zext nneg i8 %22 to i32 %shl81 = select i1 %cmp57, i32 16, i32 0 - %24 = or disjoint i32 %shl67, %shl81 - %25 = or disjoint i32 %24, %17 - %26 = or disjoint i32 %25, %20 - %27 = or disjoint i32 %26, %shl77 - %or82 = xor i32 %27, 1600 + %24 = or disjoint i32 %shl63, %shl81 + %25 = or disjoint i32 %24, %or + %26 = or disjoint i32 %25, %shl67 + %27 = or disjoint i32 %26, %shl72 + %or82 = or disjoint i32 %27, %23 br label %return return: ; preds = %if.end40, %if.end36, %if.end33, %if.end30, %if.end27, %if.end24, %if.end21, %if.end18, %if.end15, %if.end12, %if.end9, %if.end6, %if.end, %entry, %if.end43 diff --git a/bench/mold/optimized/passes.cc.ARM32.ll b/bench/mold/optimized/passes.cc.ARM32.ll index 4b936a9e4d3..035dba258e6 100644 --- a/bench/mold/optimized/passes.cc.ARM32.ll +++ b/bench/mold/optimized/passes.cc.ARM32.ll @@ -93064,6 +93064,7 @@ entry: %x.0.copyload.i = load i32, ptr %sh_type, align 1 %sh_flags = getelementptr inbounds nuw i8, ptr %chunk, i64 32 %x.0.copyload.i21 = load i32, ptr %sh_flags, align 1 + %conv4 = zext i32 %x.0.copyload.i21 to i64 %0 = load ptr, ptr %this, align 8 %ehdr = getelementptr inbounds nuw i8, ptr %0, i64 3992 %1 = load ptr, ptr %ehdr, align 8 @@ -93084,8 +93085,8 @@ if.end7: ; preds = %if.end if.end10: ; preds = %if.end7 %cmp11 = icmp ne i32 %x.0.copyload.i, 7 - %4 = and i32 %x.0.copyload.i21, 2 - %tobool.not = icmp eq i32 %4, 0 + %4 = and i64 %conv4, 2 + %tobool.not = icmp eq i64 %4, 0 %or.cond = or i1 %cmp11, %tobool.not br i1 %or.cond, label %if.end13, label %return @@ -93150,25 +93151,27 @@ if.end41: ; preds = %if.end37 br i1 %cmp42, label %return, label %if.end44 if.end44: ; preds = %if.end41 + %and53 = and i64 %conv4, 1024 + %tobool54.not = icmp eq i64 %and53, 0 %is_relro = getelementptr inbounds nuw i8, ptr %chunk, i64 72 %15 = load i8, ptr %is_relro, align 8 %cmp58 = icmp eq i32 %x.0.copyload.i, 8 - %and45 = shl i32 %x.0.copyload.i21, 8 - %16 = and i32 %and45, 768 - %17 = shl i32 %x.0.copyload.i21, 5 - %shl68 = and i32 %17, 128 - %and53 = lshr i32 %x.0.copyload.i21, 4 - %18 = and i32 %and53, 64 + %and45 = select i1 %tobool.not, i32 1536, i32 1024 + %16 = shl i32 %x.0.copyload.i21, 8 + %17 = and i32 %and47, 256 + %shl68 = shl i32 %x.0.copyload.i21, 5 + %and53 = and i32 %15, 128 + %18 = select i1 %tobool54.not, i32 64, i32 0 %19 = shl i8 %15, 5 %20 = and i8 %19, 32 %21 = xor i8 %20, 32 %shl78 = zext nneg i8 %21 to i32 %shl82 = select i1 %cmp58, i32 16, i32 0 - %22 = or disjoint i32 %shl68, %shl82 - %23 = or disjoint i32 %22, %16 - %24 = or disjoint i32 %23, %18 - %25 = or disjoint i32 %24, %shl78 - %or83 = xor i32 %25, 1600 + %22 = or disjoint i32 %shl64, %shl82 + %23 = or disjoint i32 %22, %shl68 + %24 = or disjoint i32 %23, %or + %25 = or disjoint i32 %24, %shl73 + %or83 = or disjoint i32 %25, %shl78 br label %return return: ; preds = %if.end41, %if.end37, %if.end34, %if.end31, %if.end28, %if.end25, %if.end22, %if.end19, %if.end16, %if.end13, %if.end10, %if.end7, %if.end, %entry, %if.end44 diff --git a/bench/oiio/optimized/argparse.ll b/bench/oiio/optimized/argparse.ll index aee0afb1fa3..6a59170fe0c 100644 --- a/bench/oiio/optimized/argparse.ll +++ b/bench/oiio/optimized/argparse.ll @@ -8569,6 +8569,8 @@ entry: call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %specs.i) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %dec.i) %0 = bitcast double %value to i64 + %1 = icmp sgt i64 %0, -1 + %fspecs.sroa.2.0.i = select i1 %1, i32 0, i32 256 %value.addr.0.i = tail call double @llvm.fabs.f64(double %value) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %specs.i, ptr noundef nonnull align 4 dereferenceable(16) @__const._ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.specs, i64 16, i1 false) %and.i = and i64 %0, 9218868437227405312 @@ -8583,13 +8585,11 @@ _ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_sp store i64 72057594574798848, ptr %1, align 8 %2 = fcmp oeq double %value.addr.0.i, 0x7FF0000000000000 %cond-lvalue14.i.i = select i1 %2, ptr @.str.51, ptr @.str.53 - %sum.shift.i = lshr i64 %0, 63 - %bf.lshr17.i5.i = trunc nuw nsw i64 %sum.shift.i to i32 - %tobool19.not.not.i.i = icmp sgt i64 %0, -1 - %add.i.i = select i1 %tobool19.not.not.i.i, i64 3, i64 4 - store i32 %bf.lshr17.i5.i, ptr %ref.tmp.i.i, align 8 - %3 = getelementptr inbounds nuw i8, ptr %ref.tmp.i.i, i64 8 - store ptr %cond-lvalue14.i.i, ptr %3, align 8 + %sum.shift.i = lshr exact i32 %fspecs.sroa.2.0.i, 8 + %bf.lshr17.i5.i = select i1 %1, i64 3, i64 4 + store i32 %sum.shift.i, ptr %ref.tmp.i.i, align 8 + %add.i.i = getelementptr inbounds nuw i8, ptr %ref.tmp.i.i, i64 8 + store ptr %cond-lvalue14.i.i, ptr %add.i.i, align 8 %call.i.i.i = call ptr @_ZN3fmt2v86detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcRZNS1_15write_nonfiniteIcS5_EET0_S7_bNS0_18basic_format_specsIT_EERKNS1_11float_specsEEUlS5_E_EES7_S7_RKNS8_IT1_EEmmOT2_(ptr %agg.tmp.sroa.0.0.copyload, ptr noundef nonnull align 4 dereferenceable(16) %specs.i.i, i64 noundef %add.i.i, i64 noundef %add.i.i, ptr noundef nonnull align 8 dereferenceable(16) %ref.tmp.i.i) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %specs.i.i) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %ref.tmp.i.i) @@ -8602,8 +8602,8 @@ if.end16.i: ; preds = %entry %5 = getelementptr inbounds nuw i8, ptr %dec.i, i64 8 %6 = extractvalue { i64, i32 } %call17.i, 1 store i32 %6, ptr %5, align 8 - %7 = lshr i64 %0, 23 - %fspecs.sroa.2.0.insert.shift.i = and i64 %7, 1099511627776 + %7 = zext nneg i32 %fspecs.sroa.2.0.i to i64 + %fspecs.sroa.2.0.insert.shift.i = shl nuw nsw i64 %7, 32 %call.i.i = call ptr @_ZN3fmt2v86detail14do_write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIdEEcNS1_14digit_groupingIcEEEET_S9_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsENS1_10locale_refE(ptr %agg.tmp.sroa.0.0.copyload, ptr noundef nonnull align 8 dereferenceable(16) %dec.i, ptr noundef nonnull align 4 dereferenceable(16) %specs.i, i64 %fspecs.sroa.2.0.insert.shift.i, ptr null) br label %_ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.exit diff --git a/bench/oiio/optimized/targaoutput.ll b/bench/oiio/optimized/targaoutput.ll index 6c76b9adaa0..deccc28dabe 100644 --- a/bench/oiio/optimized/targaoutput.ll +++ b/bench/oiio/optimized/targaoutput.ll @@ -1148,14 +1148,13 @@ _ZNK18OpenImageIO_v2_6_017basic_string_viewIcSt11char_traitsIcEEcvNSt7__cxx1112b %m_idlen = getelementptr inbounds nuw i8, ptr %this, i64 248 store i32 %19, ptr %m_idlen, align 8 %20 = load i32, ptr %nchannels92, align 4 - %21 = trunc i32 %20 to i8 - %22 = shl i8 %21, 3 - %23 = and i8 %22, 8 - %tga.sroa.20.0 = xor i8 %23, 8 - %24 = load i8, ptr %m_want_rle, align 8 - %tobool70 = trunc i8 %24 to i1 - %25 = or disjoint i8 %tga.sroa.20.0, 32 - %tga.sroa.20.1 = select i1 %tobool70, i8 %25, i8 %tga.sroa.20.0 + %21 = and i32 %20, 1 + %22 = icmp eq i32 %21, 0 + %23 = select i1 %22, i8 8, i8 0 + %tga.sroa.20.0 = load i8, ptr %m_want_rle, align 8 + %24 = trunc i8 %22 to i1 + %tobool70 = or disjoint i8 %23, 32 + %25 = select i1 %24, i8 %23, i8 %tga.sroa.20.0 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %i.addr.i) store i8 %conv61, ptr %i.addr.i, align 1 %call.i4142 = invoke noundef zeroext i1 @_ZN18OpenImageIO_v2_6_011ImageOutput7iowriteEPKvmm(ptr noundef nonnull align 8 dereferenceable(296) %this, ptr noundef nonnull %i.addr.i, i64 noundef 1, i64 noundef 1) @@ -4169,6 +4168,8 @@ entry: call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %specs.i) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %dec.i) %0 = bitcast double %value to i64 + %1 = icmp sgt i64 %0, -1 + %fspecs.sroa.2.0.i = select i1 %1, i32 0, i32 256 %value.addr.0.i = tail call double @llvm.fabs.f64(double %value) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %specs.i, ptr noundef nonnull align 4 dereferenceable(16) @__const._ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.specs, i64 16, i1 false) %and.i = and i64 %0, 9218868437227405312 @@ -4183,13 +4184,11 @@ _ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_sp store i64 72057594574798848, ptr %1, align 8 %2 = fcmp oeq double %value.addr.0.i, 0x7FF0000000000000 %cond-lvalue14.i.i = select i1 %2, ptr @.str.46, ptr @.str.48 - %sum.shift.i = lshr i64 %0, 63 - %bf.lshr17.i5.i = trunc nuw nsw i64 %sum.shift.i to i32 - %tobool19.not.not.i.i = icmp sgt i64 %0, -1 - %add.i.i = select i1 %tobool19.not.not.i.i, i64 3, i64 4 - store i32 %bf.lshr17.i5.i, ptr %ref.tmp.i.i, align 8 - %3 = getelementptr inbounds nuw i8, ptr %ref.tmp.i.i, i64 8 - store ptr %cond-lvalue14.i.i, ptr %3, align 8 + %sum.shift.i = lshr exact i32 %fspecs.sroa.2.0.i, 8 + %bf.lshr17.i5.i = select i1 %1, i64 3, i64 4 + store i32 %sum.shift.i, ptr %ref.tmp.i.i, align 8 + %add.i.i = getelementptr inbounds nuw i8, ptr %ref.tmp.i.i, i64 8 + store ptr %cond-lvalue14.i.i, ptr %add.i.i, align 8 %call.i.i.i = call ptr @_ZN3fmt2v86detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcRZNS1_15write_nonfiniteIcS5_EET0_S7_bNS0_18basic_format_specsIT_EERKNS1_11float_specsEEUlS5_E_EES7_S7_RKNS8_IT1_EEmmOT2_(ptr %agg.tmp.sroa.0.0.copyload, ptr noundef nonnull align 4 dereferenceable(16) %specs.i.i, i64 noundef %add.i.i, i64 noundef %add.i.i, ptr noundef nonnull align 8 dereferenceable(16) %ref.tmp.i.i) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %specs.i.i) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %ref.tmp.i.i) @@ -4202,8 +4201,8 @@ if.end16.i: ; preds = %entry %5 = getelementptr inbounds nuw i8, ptr %dec.i, i64 8 %6 = extractvalue { i64, i32 } %call17.i, 1 store i32 %6, ptr %5, align 8 - %7 = lshr i64 %0, 23 - %fspecs.sroa.2.0.insert.shift.i = and i64 %7, 1099511627776 + %7 = zext nneg i32 %fspecs.sroa.2.0.i to i64 + %fspecs.sroa.2.0.insert.shift.i = shl nuw nsw i64 %7, 32 %call.i.i = call ptr @_ZN3fmt2v86detail14do_write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIdEEcNS1_14digit_groupingIcEEEET_S9_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsENS1_10locale_refE(ptr %agg.tmp.sroa.0.0.copyload, ptr noundef nonnull align 8 dereferenceable(16) %dec.i, ptr noundef nonnull align 4 dereferenceable(16) %specs.i, i64 %fspecs.sroa.2.0.insert.shift.i, ptr null) br label %_ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.exit diff --git a/bench/opencv/optimized/softfloat.ll b/bench/opencv/optimized/softfloat.ll index f18710f8294..ca2ab868464 100644 --- a/bench/opencv/optimized/softfloat.ll +++ b/bench/opencv/optimized/softfloat.ll @@ -404,17 +404,16 @@ define void @_ZN2cv9softfloatC2El(ptr noundef nonnull writeonly align 4 captures %60 = xor i64 %59, -1 %61 = and i64 %58, %60 %.not49.i.i = icmp eq i64 %61, 0 - %62 = lshr i64 %1, 32 - %63 = and i64 %62, 2147483648 - %64 = shl nuw nsw i64 %.038.i.i, 23 - %65 = select i1 %.not49.i.i, i64 0, i64 %64 - %66 = add nuw nsw i64 %65, %63 - %67 = and i64 %66, 4286578688 - %68 = add nuw nsw i64 %67, %61 + %62 = select i1 %3, i64 2147483648, i64 0 + %63 = shl nuw nsw i64 %.038.i.i, 23 + %64 = select i1 %.not49.i.i, i64 0, i64 %63 + %65 = add nuw nsw i64 %64, %62 + %66 = and i64 %65, 4286578688 + %67 = add nuw nsw i64 %66, %61 br label %_ZN2cvL24softfloat_roundPackToF32Eblm.exit.i _ZN2cvL24softfloat_roundPackToF32Eblm.exit.i: ; preds = %56, %54 - %.0.i22.i = phi i64 [ %68, %56 ], [ %55, %54 ] + %.0.i22.i = phi i64 [ %67, %56 ], [ %55, %54 ] %69 = trunc i64 %.0.i22.i to i32 br label %_ZN2cvL10i64_to_f32El.exit @@ -740,12 +739,11 @@ _ZN2cvL25softfloat_shiftRightJam32Ejm.exit.i.i: ; preds = %98, %89 %114 = xor i64 %113, -1 %115 = and i64 %112, %114 %.not49.i.i = icmp eq i64 %115, 0 - %116 = and i32 %.lobit61.i, -2147483648 - %117 = zext i32 %116 to i64 - %118 = shl nuw nsw i64 %.038.i.i, 23 - %119 = select i1 %.not49.i.i, i64 0, i64 %118 - %120 = add nuw nsw i64 %115, %117 - %121 = add nuw nsw i64 %120, %119 + %116 = select i1 %14, i64 2147483648, i64 0 + %117 = shl nuw nsw i64 %.038.i.i, 23 + %118 = select i1 %.not49.i.i, i64 0, i64 %117 + %119 = add nuw nsw i64 %115, %116 + %120 = add nuw nsw i64 %119, %118 br label %_ZN2cvL24softfloat_roundPackToF32Eblm.exit.i _ZN2cvL24softfloat_roundPackToF32Eblm.exit.i: ; preds = %110, %108 @@ -986,16 +984,15 @@ _ZN2cvL25softfloat_shiftRightJam32Ejm.exit.i.i: ; preds = %93, %84 %109 = xor i64 %108, -1 %110 = and i64 %107, %109 %.not49.i.i = icmp eq i64 %110, 0 - %111 = and i32 %.lobit64.i, -2147483648 - %112 = zext i32 %111 to i64 - %113 = shl nuw nsw i64 %.038.i.i, 23 - %114 = select i1 %.not49.i.i, i64 0, i64 %113 - %115 = add nuw nsw i64 %110, %112 - %116 = add nuw nsw i64 %115, %114 + %111 = select i1 %14, i64 2147483648, i64 0 + %112 = shl nuw nsw i64 %.038.i.i, 23 + %113 = select i1 %.not49.i.i, i64 0, i64 %112 + %114 = add nuw nsw i64 %110, %111 + %115 = add nuw nsw i64 %114, %113 br label %_ZN2cvL24softfloat_roundPackToF32Eblm.exit.i _ZN2cvL24softfloat_roundPackToF32Eblm.exit.i: ; preds = %105, %103 - %.0.i.i = phi i64 [ %116, %105 ], [ %104, %103 ] + %.0.i.i = phi i64 [ %115, %105 ], [ %104, %103 ] %117 = trunc i64 %.0.i.i to i32 br label %_ZN2cvL7f32_divENS_9softfloatES0_.exit @@ -2374,16 +2371,15 @@ _ZN2cvL25softfloat_shiftRightJam32Ejm.exit.i.i: ; preds = %36, %34 %59 = xor i64 %58, -1 %60 = and i64 %57, %59 %.not49.i.i = icmp eq i64 %60, 0 - %61 = lshr i64 %3, 32 - %62 = and i64 %61, 2147483648 - %63 = shl nuw nsw i64 %.038.i.i, 23 - %64 = select i1 %.not49.i.i, i64 0, i64 %63 - %65 = add nuw nsw i64 %60, %62 - %66 = add nuw nsw i64 %65, %64 + %61 = select i1 %4, i64 2147483648, i64 0 + %62 = shl nuw nsw i64 %.038.i.i, 23 + %63 = select i1 %.not49.i.i, i64 0, i64 %62 + %64 = add nuw nsw i64 %60, %61 + %65 = add nuw nsw i64 %64, %63 br label %_ZN2cvL10f64_to_f32ENS_10softdoubleE.exit _ZN2cvL10f64_to_f32ENS_10softdoubleE.exit: ; preds = %11, %16, %25, %53, %55 - %storemerge.in.i = phi i64 [ %66, %55 ], [ %54, %53 ], [ %15, %11 ], [ %17, %16 ], [ %26, %25 ] + %storemerge.in.i = phi i64 [ %65, %55 ], [ %54, %53 ], [ %15, %11 ], [ %17, %16 ], [ %26, %25 ] %storemerge.i = trunc i64 %storemerge.in.i to i32 store i32 %storemerge.i, ptr %0, align 4, !alias.scope !58 ret void diff --git a/bench/openjdk/optimized/assembler_x86.ll b/bench/openjdk/optimized/assembler_x86.ll index 4b19565e2f8..0d3cab2581c 100644 --- a/bench/openjdk/optimized/assembler_x86.ll +++ b/bench/openjdk/optimized/assembler_x86.ll @@ -5202,14 +5202,14 @@ _ZN9Assembler11evex_prefixEbbbbbbbiNS_13VexSimdPrefixENS_9VexOpcodeE.exit: ; pre br label %_ZN9Assembler10vex_prefixEbbbiNS_13VexSimdPrefixENS_9VexOpcodeE.exit 142: ; preds = %116 - %143 = shl nuw nsw i32 %12, 4 + %143 = select i1 %.not47, i32 128, i32 0 %144 = shl i32 %2, 3 %145 = and i32 %144, 120 %146 = or disjoint i32 %145, %143 %147 = icmp sgt i32 %113, 0 %148 = select i1 %147, i32 4, i32 0 - %149 = or disjoint i32 %148, %146 - %150 = xor i32 %149, 248 + %149 = or disjoint i32 %146, %148 + %150 = xor i32 %149, 120 %151 = or i32 %150, %4 %152 = getelementptr inbounds nuw i8, ptr %0, i64 8 %153 = load ptr, ptr %152, align 8 @@ -6986,14 +6986,14 @@ _ZN9Assembler11evex_prefixEbbbbbbbiNS_13VexSimdPrefixENS_9VexOpcodeE.exit: ; pre br label %_ZN9Assembler10vex_prefixEbbbiNS_13VexSimdPrefixENS_9VexOpcodeE.exit 198: ; preds = %170 - %199 = shl nuw nsw i32 %27, 4 + %199 = select i1 %.not42, i32 128, i32 0 %200 = shl i32 %2, 3 %201 = and i32 %200, 120 %202 = or disjoint i32 %199, %201 %203 = icmp sgt i32 %167, 0 %204 = select i1 %203, i32 4, i32 0 - %205 = or disjoint i32 %204, %202 - %206 = xor i32 %205, 248 + %205 = or disjoint i32 %202, %204 + %206 = xor i32 %205, 120 %207 = or i32 %206, %4 %208 = getelementptr inbounds nuw i8, ptr %0, i64 8 %209 = load ptr, ptr %208, align 8 diff --git a/bench/openjdk/optimized/cmspack.ll b/bench/openjdk/optimized/cmspack.ll index 0acf453eb9e..8ead4a51ec0 100644 --- a/bench/openjdk/optimized/cmspack.ll +++ b/bench/openjdk/optimized/cmspack.ll @@ -2361,8 +2361,7 @@ define internal ptr @UnrollAnyWordsPremul(ptr noundef readonly captures(none) %0 %.in.lobit = lshr i8 %.in, 7 %16 = zext nneg i8 %.in.lobit to i32 %17 = add nuw nsw i32 %15, %16 - %18 = shl nuw nsw i32 %11, 1 - %.038.idx = zext nneg i32 %18 to i64 + %18 = select i1 %.not, i64 0, i64 2 %.038 = getelementptr inbounds nuw i8, ptr %2, i64 %.038.idx %.not78 = icmp eq i32 %7, 0 br i1 %.not78, label %._crit_edge, label %.lr.ph @@ -2535,8 +2534,7 @@ define internal ptr @UnrollAnyWordsPremul(ptr noundef readonly captures(none) %0 ._crit_edge: ; preds = %.lr.ph.split.split.split, %.lr.ph.split.split.split.us, %.lr.ph.split.split.us.split, %.lr.ph.split.split.us.split.us, %.lr.ph.split.us.split.split, %.lr.ph.split.us.split.split.us, %.lr.ph.split.us.split.us.split, %.lr.ph.split.us.split.us.split.us, %4 %.139.lcssa = phi ptr [ %.038, %4 ], [ %26, %.lr.ph.split.us.split.us.split.us ], [ %30, %.lr.ph.split.us.split.us.split ], [ %38, %.lr.ph.split.us.split.split.us ], [ %46, %.lr.ph.split.us.split.split ], [ %53, %.lr.ph.split.split.us.split.us ], [ %60, %.lr.ph.split.split.us.split ], [ %71, %.lr.ph.split.split.split.us ], [ %82, %.lr.ph.split.split.split ] - %83 = xor i32 %18, 2 - %spec.select.idx = zext nneg i32 %83 to i64 + %83 = select i1 %.not, i64 2, i64 0 %spec.select = getelementptr inbounds nuw i8, ptr %.139.lcssa, i64 %spec.select.idx ret ptr %spec.select } diff --git a/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements.ll b/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements.ll index 907de77d071..ee5c2b8cb94 100644 --- a/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements.ll +++ b/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements.ll @@ -40,12 +40,10 @@ define range(i32 0, 4) i32 @PMPI_Status_set_elements(ptr noundef writeonly captu 15: ; preds = %12 %16 = icmp sgt i32 %2, -1 - %17 = lshr i32 %2, 30 - %spec.select22 = and i32 %17, 2 - br i1 %16, label %19, label %.thread + br i1 %16, label %18, label %.thread .thread: ; preds = %12, %15 - %.01926 = phi i32 [ %spec.select22, %15 ], [ 3, %12 ] + %.01926 = phi i32 [ 2, %15 ], [ 3, %12 ] %18 = tail call i32 @ompi_errhandler_invoke(ptr noundef null, ptr noundef null, i32 noundef -1, i32 noundef %.01926, ptr noundef nonnull @FUNC_NAME) #2 br label %34 diff --git a/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements_x.ll b/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements_x.ll index 5dc1779827a..f92ac4b2a76 100644 --- a/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements_x.ll +++ b/bench/openmpi/optimized/libmpi_c_profile_la-status_set_elements_x.ll @@ -40,13 +40,10 @@ define range(i32 0, 4) i32 @PMPI_Status_set_elements_x(ptr noundef writeonly cap 15: ; preds = %12 %16 = icmp sgt i64 %2, -1 - %17 = lshr i64 %2, 62 - %18 = trunc nuw nsw i64 %17 to i32 - %spec.select22 = and i32 %18, 2 br i1 %16, label %20, label %.thread .thread: ; preds = %12, %15 - %.01926 = phi i32 [ %spec.select22, %15 ], [ 3, %12 ] + %.01926 = phi i32 [ 2, %15 ], [ 3, %12 ] %19 = tail call i32 @ompi_errhandler_invoke(ptr noundef null, ptr noundef null, i32 noundef -1, i32 noundef %.01926, ptr noundef nonnull @FUNC_NAME) #2 br label %33 diff --git a/bench/openspiel/optimized/quoridor.ll b/bench/openspiel/optimized/quoridor.ll index b0be4e5b6c4..485b9f214ea 100644 --- a/bench/openspiel/optimized/quoridor.ll +++ b/bench/openspiel/optimized/quoridor.ll @@ -6854,7 +6854,7 @@ _ZNK10open_spiel8quoridor4Move7IsValidEv.exit.thread: ; preds = %82, %_ZNK10open %.sroa.3.8.insert.insert.i30 = or disjoint i64 %.sroa.5.8.insert.shift.i, %.sroa.3.8.insert.ext.i29 tail call void @_ZN10open_spiel8quoridor13QuoridorState9SetPlayerENS0_4MoveENS0_14QuoridorPlayerEi(ptr noundef nonnull align 8 dereferenceable(228) %0, i64 %.sroa.0.0.insert.insert.i25, i64 %.sroa.3.8.insert.insert.i30, i8 noundef zeroext 4, i32 noundef 5) %101 = shl nuw nsw i32 %91, 1 - %102 = xor i32 %101, 2 + %102 = select i1 %92, i32 0, i32 2 %103 = add nuw nsw i32 %101, %.sroa.055.sroa.0.0.extract.trunc %104 = add nuw nsw i32 %102, %.sroa.055.sroa.9.0.extract.trunc %105 = mul nsw i32 %104, %.sroa.16.12.extract.trunc diff --git a/bench/openssl/optimized/libcrypto-lib-bss_mem.ll b/bench/openssl/optimized/libcrypto-lib-bss_mem.ll index 4b809bc8ee2..bf7e226b130 100644 --- a/bench/openssl/optimized/libcrypto-lib-bss_mem.ll +++ b/bench/openssl/optimized/libcrypto-lib-bss_mem.ll @@ -206,10 +206,9 @@ entry: %0 = load ptr, ptr %ptr, align 8 %flags = getelementptr inbounds nuw i8, ptr %b, i64 48 %1 = load i32, ptr %flags, align 8 - %and = lshr i32 %1, 6 - %2 = and i32 %and, 8 - %3 = xor i32 %2, 8 - %spec.select.idx = zext nneg i32 %3 to i64 + %and = and i32 %1, 512 + %2 = icmp eq i32 %and, 0 + %3 = select i1 %2, i64 8, i64 0 %spec.select = getelementptr inbounds nuw i8, ptr %0, i64 %spec.select.idx %bm.0 = load ptr, ptr %spec.select, align 8 tail call void @BIO_clear_flags(ptr noundef %b, i32 noundef 15) #7 @@ -278,10 +277,9 @@ entry: %0 = load ptr, ptr %ptr, align 8 %flags = getelementptr inbounds nuw i8, ptr %bp, i64 48 %1 = load i32, ptr %flags, align 8 - %and = lshr i32 %1, 6 - %2 = and i32 %and, 8 - %3 = xor i32 %2, 8 - %spec.select.idx = zext nneg i32 %3 to i64 + %and = and i32 %1, 512 + %2 = icmp eq i32 %and, 0 + %3 = select i1 %2, i64 8, i64 0 %spec.select = getelementptr inbounds nuw i8, ptr %0, i64 %spec.select.idx %bm.0 = load ptr, ptr %spec.select, align 8 tail call void @BIO_clear_flags(ptr noundef %bp, i32 noundef 15) #7 @@ -324,11 +322,10 @@ for.end: ; preds = %for.inc, %if.then15 %i.1 = phi i32 [ %inc, %if.then15 ], [ %j.0, %for.inc ] %8 = load ptr, ptr %ptr, align 8 %9 = load i32, ptr %flags, align 8 - %and.i = lshr i32 %9, 6 - %10 = and i32 %and.i, 8 - %11 = xor i32 %10, 8 - %spec.select.idx.i = zext nneg i32 %11 to i64 - %spec.select.i = getelementptr inbounds nuw i8, ptr %8, i64 %spec.select.idx.i + %and.i = and i32 %9, 512 + %10 = icmp eq i32 %and.i, 0 + %11 = select i1 %10, i64 8, i64 0 + %spec.select.idx.i = getelementptr inbounds nuw i8, ptr %6, i64 %11 %bm.0.i = load ptr, ptr %spec.select.i, align 8 tail call void @BIO_clear_flags(ptr noundef %bp, i32 noundef 15) #7 %cmp.i = icmp sgt i32 %i.1, -1 diff --git a/bench/openssl/optimized/libssl-lib-quic_reactor.ll b/bench/openssl/optimized/libssl-lib-quic_reactor.ll index 762979abfae..682087b5c20 100644 --- a/bench/openssl/optimized/libssl-lib-quic_reactor.ll +++ b/bench/openssl/optimized/libssl-lib-quic_reactor.ll @@ -298,15 +298,14 @@ if.else.i.i: ; preds = %if.end.i %npfd.1.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx = select i1 %or.cond28.not.not.not41.i.i, i64 8, i64 0 %npfd.1.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel = getelementptr inbounds nuw i8, ptr %pfds.i.i, i64 %npfd.1.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx store i32 %.sink.i7.i, ptr %npfd.1.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel, align 8 - %10 = shl nuw nsw i8 %bf.clear.i11, 2 - %conv34.i.i = zext nneg i8 %10 to i16 + %10 = icmp ne i8 %bf.clear.i11, 0 + %conv34.i.i = select i1 %10, i16 4, i16 0 %npfd.1.sroa.sel.sroa.sel.i.i = select i1 %or.cond28.not.not.not41.i.i, ptr %.sroa.gep32.sroa.gep.i.i, ptr %events18.i.i store i16 %conv34.i.i, ptr %npfd.1.sroa.sel.sroa.sel.i.i, align 4 %cmp37.i.i = icmp sgt i32 %.sink.i7.i, -1 br i1 %cmp37.i.i, label %land.lhs.true39.i.i, label %if.end48.i.i land.lhs.true39.i.i: ; preds = %if.else.i.i - %tobool32.not.i.i = icmp ne i8 %bf.clear.i11, 0 %brmerge.i.i = or i1 %tobool32.not.i.i, %or.cond28.not.not.not41.i.i %11 = and i1 %tobool32.not.i.i, %or.cond28.not.not.not41.i.i %inc46.mux.i.i = select i1 %11, i64 2, i64 1 diff --git a/bench/openssl/optimized/libssl-lib-quic_stream_map.ll b/bench/openssl/optimized/libssl-lib-quic_stream_map.ll index 4c88e7bb16b..14d7900749d 100644 --- a/bench/openssl/optimized/libssl-lib-quic_stream_map.ll +++ b/bench/openssl/optimized/libssl-lib-quic_stream_map.ll @@ -116,37 +116,35 @@ if.end4: ; preds = %if.end %1 = and i32 %type, 255 %bf.value = zext nneg i32 %1 to i64 %bf.clear = and i64 %bf.load, -33554688 - %bf.set = or disjoint i64 %bf.clear, %bf.value %is_server = getelementptr inbounds nuw i8, ptr %qsm, i64 128 %2 = load i32, ptr %is_server, align 8 %3 = shl i32 %2, 25 %4 = and i32 %3, 33554432 %bf.shl = zext nneg i32 %4 to i64 - %bf.set10 = or disjoint i64 %bf.set, %bf.shl - %5 = trunc i64 %bf.set10 to i32 - %6 = lshr i32 %5, 25 - %7 = xor i32 %6, %5 - %8 = and i32 %7, 1 - %tobool.not.not = icmp eq i32 %8, 0 - %and1.i = shl i32 %type, 7 - %9 = and i32 %and1.i, 256 - %10 = xor i32 %9, 256 - %narrow = select i1 %tobool.not.not, i32 256, i32 %10 - %cond = zext nneg i32 %narrow to i64 + %bf.set10 = or disjoint i64 %bf.clear, %bf.shl + %5 = or disjoint i64 %bf.set10, %bf.value + %6 = trunc i64 %5 to i32 + %7 = lshr i32 %6, 25 + %8 = xor i32 %7, %6 + %tobool.not.not = and i32 %8, 1 + %and1.i = icmp eq i32 %9, 0 + %9 = shl nuw nsw i64 %bf.value, 7 + %10 = and i64 %9, 256 + %narrow = xor i64 %10, 256 + %cond = select i1 %9, i64 256, i64 %narrow %bf.clear18 = and i64 %bf.set10, -65281 - %bf.set19 = or disjoint i64 %bf.clear18, %cond + %bf.set19 = or disjoint i64 %cond, %bf.clear18 %11 = trunc i64 %bf.set19 to i32 %12 = lshr i32 %11, 25 %13 = xor i32 %12, %11 %14 = and i32 %13, 1 %tobool22.not.not = icmp eq i32 %14, 0 - %and1.i22 = shl i32 %type, 15 - %15 = and i32 %and1.i22, 65536 - %16 = xor i32 %15, 65536 - %narrow26 = select i1 %tobool22.not.not, i32 %16, i32 65536 - %cond27 = zext nneg i32 %narrow26 to i64 + %and1.i22 = shl nuw nsw i64 %bf.value, 15 + %15 = and i64 %and1.i22, 65536 + %16 = xor i64 %15, 65536 + %narrow26 = select i1 %tobool22.not.not, i64 %16, i64 65536 %bf.clear31 = and i64 %bf.set19, -16776705 - %bf.set32 = or disjoint i64 %bf.clear31, %cond27 + %bf.set32 = or disjoint i64 %cond27, %bf.clear31 store i64 %bf.set32, ptr %type6, align 8 %send_final_size = getelementptr inbounds nuw i8, ptr %call1, i64 104 store i64 -1, ptr %send_final_size, align 8 diff --git a/bench/openusd/optimized/catmarkPatchBuilder.ll b/bench/openusd/optimized/catmarkPatchBuilder.ll index 521e9c9dc0a..1e5873af42f 100644 --- a/bench/openusd/optimized/catmarkPatchBuilder.ll +++ b/bench/openusd/optimized/catmarkPatchBuilder.ll @@ -1397,8 +1397,6 @@ define linkonce_odr void @_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assi 119: ; preds = %3 %120 = and i16 %32, 32 %.not67 = icmp eq i16 %120, 0 - %121 = lshr exact i16 %120, 3 - %122 = xor i16 %121, 4 store i32 %1, ptr %13, align 4 store float 0x3FE5555560000000, ptr %16, align 4 %123 = load i32, ptr %31, align 4 @@ -1416,7 +1414,7 @@ define linkonce_odr void @_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assi store i32 %1, ptr %.sroa.speculated167, align 4 %.sroa.speculated143 = select i1 %.not67, ptr %26, ptr %21 store float 0x3FE5555560000000, ptr %.sroa.speculated143, align 4 - %130 = zext nneg i16 %122 to i64 + %130 = select i1 %.not67, i64 4, i64 0 %131 = getelementptr inbounds nuw i32, ptr %31, i64 %130 %132 = load i32, ptr %131, align 4 %133 = getelementptr inbounds nuw i8, ptr %.sroa.speculated167, i64 4 @@ -7393,8 +7391,6 @@ define linkonce_odr void @_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE23assi 119: ; preds = %3 %120 = and i16 %32, 32 %.not67 = icmp eq i16 %120, 0 - %121 = lshr exact i16 %120, 3 - %122 = xor i16 %121, 4 store i32 %1, ptr %13, align 4 store double 0x3FE5555555555555, ptr %16, align 8 %123 = load i32, ptr %31, align 4 @@ -7412,7 +7408,7 @@ define linkonce_odr void @_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE23assi store i32 %1, ptr %.sroa.speculated167, align 4 %.sroa.speculated143 = select i1 %.not67, ptr %26, ptr %21 store double 0x3FE5555555555555, ptr %.sroa.speculated143, align 8 - %130 = zext nneg i16 %122 to i64 + %130 = select i1 %.not67, i64 4, i64 0 %131 = getelementptr inbounds nuw i32, ptr %31, i64 %130 %132 = load i32, ptr %131, align 4 %133 = getelementptr inbounds nuw i8, ptr %.sroa.speculated167, i64 4 diff --git a/bench/openusd/optimized/faceVertex.ll b/bench/openusd/optimized/faceVertex.ll index bc8fea1aafc..fd510cf91f6 100644 --- a/bench/openusd/optimized/faceVertex.ll +++ b/bench/openusd/optimized/faceVertex.ll @@ -83,52 +83,49 @@ define void @_ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex8FinalizeEi(ptr noundef nonnu 25: ; preds = %16, %7 %26 = phi i32 [ %15, %7 ], [ 0, %16 ] %.sink = phi i32 [ %14, %7 ], [ %24, %16 ] - %27 = getelementptr inbounds nuw i8, ptr %0, i64 160 - store i32 %.sink, ptr %27, align 8 - %28 = getelementptr inbounds nuw i8, ptr %0, i64 4 - %29 = load float, ptr %28, align 4 - %30 = load float, ptr @_ZN10OpenSubdiv6v3_6_03Sdc6Crease18SHARPNESS_INFINITEE, align 4 - %31 = fcmp oge float %29, %30 - %32 = zext i1 %31 to i8 - %33 = getelementptr inbounds nuw i8, ptr %0, i64 159 - %34 = load i8, ptr %33, align 1 - %35 = and i8 %34, -4 - %36 = or disjoint i8 %35, %32 - %37 = load float, ptr @_ZN10OpenSubdiv6v3_6_03Sdc6Crease16SHARPNESS_SMOOTHE, align 4 - %38 = fcmp olt float %37, %29 - %39 = fcmp olt float %29, %30 - %40 = select i1 %38, i1 %39, i1 false - %41 = select i1 %40, i8 2, i8 0 - %42 = or disjoint i8 %41, %36 - store i8 %42, ptr %33, align 1 - %43 = getelementptr inbounds nuw i8, ptr %0, i64 152 - %44 = shl nuw nsw i8 %6, 1 - %45 = zext nneg i8 %44 to i16 - %46 = getelementptr inbounds nuw i8, ptr %0, i64 158 - %47 = load i8, ptr %46, align 2 - %48 = zext i8 %47 to i32 - %.not = icmp eq i32 %26, %48 - %49 = select i1 %.not, i16 0, i16 128 - %50 = select i1 %31, i16 2, i16 0 - %51 = shl nuw nsw i8 %41, 3 - %52 = zext nneg i8 %51 to i16 - %53 = and i8 %5, 8 - %.not2 = icmp eq i8 %53, 0 - %54 = zext nneg i8 %53 to i16 - %55 = shl nuw nsw i16 %54, 5 - %56 = or disjoint i16 %55, %50 - %57 = or disjoint i16 %56, %52 - %58 = or disjoint i16 %57, %49 - %59 = or i16 %58, %45 - %60 = xor i16 %59, 256 - store i16 %60, ptr %43, align 8 - br i1 %.not2, label %62, label %61 - -61: ; preds = %25 + %27 = phi i16 [ 0, %7 ], [ 64, %16 ] + %28 = getelementptr inbounds nuw i8, ptr %0, i64 160 + store i32 %.sink, ptr %28, align 8 + %29 = getelementptr inbounds nuw i8, ptr %0, i64 4 + %30 = load float, ptr %29, align 4 + %31 = load float, ptr @_ZN10OpenSubdiv6v3_6_03Sdc6Crease18SHARPNESS_INFINITEE, align 4 + %32 = fcmp oge float %30, %31 + %33 = zext i1 %32 to i8 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 159 + %35 = load i8, ptr %34, align 1 + %36 = and i8 %35, -4 + %37 = or disjoint i8 %36, %33 + %38 = load float, ptr @_ZN10OpenSubdiv6v3_6_03Sdc6Crease16SHARPNESS_SMOOTHE, align 4 + %39 = fcmp olt float %38, %30 + %40 = fcmp olt float %30, %31 + %41 = select i1 %39, i1 %40, i1 false + %42 = select i1 %41, i8 2, i8 0 + %43 = or disjoint i8 %42, %37 + store i8 %43, ptr %34, align 1 + %44 = getelementptr inbounds nuw i8, ptr %0, i64 152 + %45 = getelementptr inbounds nuw i8, ptr %0, i64 158 + %46 = load i8, ptr %45, align 2 + %47 = zext i8 %46 to i32 + %48 = icmp eq i32 %26, %47 + %.not = select i1 %.not, i16 0, i16 128 + %49 = select i1 %32, i16 2, i16 0 + %50 = shl nuw nsw i8 %42, 3 + %51 = zext nneg i8 %50 to i16 + %52 = and i8 %5, 8 + %53 = icmp eq i8 %52, 0 + %.not2 = select i1 %53, i16 256, i16 0 + %54 = or disjoint i16 %53, %49 + %55 = or disjoint i16 %54, %51 + %56 = or disjoint i16 %55, %48 + %57 = or disjoint i16 %56, %27 + store i16 %57, ptr %44, align 8 + br i1 %53, label %62, label %58 + +58: ; preds = %25 tail call void @_ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex19finalizeOrderedTagsEv(ptr noundef nonnull align 8 dereferenceable(224) %0) br label %62 -62: ; preds = %61, %25 +62: ; preds = %58, %25 ret void } @@ -2492,15 +2489,13 @@ _ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4findERS3_.exit.thread: ; preds = %63, %_ %120 = getelementptr inbounds nuw i8, ptr %119, i64 4 store i64 0, ptr %120, align 4 store i32 %116, ptr %119, align 4 - %121 = trunc nuw nsw i32 %35 to i8 - %122 = shl nuw nsw i8 %121, 3 - %123 = or disjoint i8 %122, 1 - store i8 %123, ptr %120, align 4 - %124 = lshr i64 %indvars.iv70, 1 - %125 = trunc i64 %124 to i16 + %121 = select i1 %36, i8 9, i8 1 + store i8 %121, ptr %120, align 4 + %123 = lshr i64 %indvars.iv70, 1 + %123 = trunc i64 %122 to i16 %.v.i = select i1 %36, i64 6, i64 8 %126 = getelementptr inbounds nuw i8, ptr %119, i64 %.v.i - store i16 %125, ptr %126, align 2 + store i16 %123, ptr %126, align 2 br i1 %.not56, label %_ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge7AddFaceEib.exit, label %127 127: ; preds = %.thread @@ -2513,7 +2508,7 @@ _ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4findERS3_.exit.thread: ; preds = %63, %_ .sink.split.i: ; preds = %127 %132 = fcmp ult float %130, %32 %..i = select i1 %132, i8 -128, i8 64 - %133 = or disjoint i8 %..i, %123 + %133 = or disjoint i8 %..i, %121 store i8 %133, ptr %120, align 4 br label %_ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex4Edge7AddFaceEib.exit diff --git a/bench/openusd/optimized/regularPatchBuilder.ll b/bench/openusd/optimized/regularPatchBuilder.ll index ec8d3205b31..b8b13b935e6 100644 --- a/bench/openusd/optimized/regularPatchBuilder.ll +++ b/bench/openusd/optimized/regularPatchBuilder.ll @@ -194,20 +194,20 @@ define void @_ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilderC2ERKNS1_11FaceSurfa br label %76 63: ; preds = %21 - %64 = shl nuw nsw i16 %34, 1 - %65 = shl nuw nsw i16 %44, 2 - %66 = or disjoint i16 %65, %64 - %67 = or disjoint i16 %66, %25 - %.not.i = icmp eq i16 %67, 0 - br i1 %.not.i, label %_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit, label %68 - -68: ; preds = %63 - %69 = zext nneg i16 %67 to i32 + %64 = zext nneg i16 %25 to i32 + %65 = select i1 %35, i32 2, i32 0 + %66 = or disjoint i32 %65, %64 + %67 = select i1 %45, i32 4, i32 0 + %.not.i = or disjoint i32 %66, %67 + %.not.i = icmp eq i32 %68, 0 + br i1 %.not.i, label %_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit, label %69 + +69:; preds = %63 %70 = icmp eq i32 %51, 0 br i1 %70, label %_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit, label %71 -71: ; preds = %68 - %72 = icmp eq i16 %67, 7 +71: ; preds = %69 + %72 = icmp eq i32 %68, 7 br i1 %72, label %73, label %_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit 73: ; preds = %71 @@ -220,9 +220,9 @@ define void @_ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilderC2ERKNS1_11FaceSurfa 74: ; preds = %73, %73, %73 br label %_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit -_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit: ; preds = %63, %68, %71, %73, %74 - %.014.i = phi i32 [ 16, %74 ], [ 0, %73 ], [ 0, %71 ], [ 0, %63 ], [ 8, %68 ] - %.0.i = phi i32 [ %51, %74 ], [ %51, %73 ], [ %51, %71 ], [ %51, %63 ], [ %69, %68 ] +_ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121encodeTriBoundaryMaskEii.exit: ; preds = %63, %69, %71, %73, %74 + %.014.i = phi i32 [ 16, %74 ], [ 0, %73 ], [ 0, %71 ], [ 0, %63 ], [ 8, %69 ] + %.0.i = phi i32 [ %51, %74 ], [ %51, %73 ], [ %51, %71 ], [ %51, %63 ], [ %68, %69 ] %75 = or disjoint i32 %.0.i, %.014.i br label %76 diff --git a/bench/openusd/optimized/stencilTableFactory.ll b/bench/openusd/optimized/stencilTableFactory.ll index 33943b92287..44aa774a3e4 100644 --- a/bench/openusd/optimized/stencilTableFactory.ll +++ b/bench/openusd/optimized/stencilTableFactory.ll @@ -18036,13 +18036,13 @@ define weak_odr noundef ptr @_ZN10OpenSubdiv6v3_6_03Far28LimitStencilTableFactor 78: ; preds = %77 call void @_ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIfE7OptionsC1Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) %79 = load i16, ptr %7, align 8 - %80 = shl nuw nsw i16 %36, 4 + %80 = select i1 %37, i16 0, i16 16 %81 = and i16 %79, -32 - %82 = or disjoint i16 %81, %80 - %83 = trunc i64 %4 to i16 - %84 = and i16 %83, 3 - %85 = or disjoint i16 %82, %84 - %86 = xor i16 %85, 28 + %82 = trunc i64 %4 to i16 + %83 = and i16 %82, 3 + %84 = or disjoint i16 %83, %80 + %85 = or disjoint i16 %84, %81 + %86 = or disjoint i16 %85, 12 store i16 %86, ptr %7, align 8 %87 = getelementptr inbounds nuw i8, ptr %7, i64 4 store i32 %.sroa.7194.0.extract.trunc, ptr %87, align 4 @@ -19010,13 +19010,13 @@ define weak_odr noundef ptr @_ZN10OpenSubdiv6v3_6_03Far28LimitStencilTableFactor 78: ; preds = %77 call void @_ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIdE7OptionsC1Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) %79 = load i16, ptr %7, align 8 - %80 = shl nuw nsw i16 %36, 4 + %80 = select i1 %37, i16 0, i16 16 %81 = and i16 %79, -32 - %82 = or disjoint i16 %81, %80 - %83 = trunc i64 %4 to i16 - %84 = and i16 %83, 3 - %85 = or disjoint i16 %82, %84 - %86 = xor i16 %85, 28 + %82 = trunc i64 %4 to i16 + %83 = and i16 %82, 3 + %84 = or disjoint i16 %83, %80 + %85 = or disjoint i16 %84, %81 + %86 = or disjoint i16 %85, 12 store i16 %86, ptr %7, align 8 %87 = getelementptr inbounds nuw i8, ptr %7, i64 4 store i32 %.sroa.7194.0.extract.trunc, ptr %87, align 4 diff --git a/bench/php/optimized/zend_API.ll b/bench/php/optimized/zend_API.ll index cfa80da4606..3302f9729ef 100644 --- a/bench/php/optimized/zend_API.ll +++ b/bench/php/optimized/zend_API.ll @@ -18126,24 +18126,22 @@ define void @zend_declare_property_string(ptr noundef %0, ptr noundef readonly c br label %16 16: ; preds = %14, %12 - %17 = phi ptr [ %13, %12 ], [ %15, %14 ] - store i32 1, ptr %17, align 4 - %18 = shl i8 %8, 7 - %19 = or disjoint i8 %18, 22 - %20 = zext i8 %19 to i32 - %21 = getelementptr inbounds nuw i8, ptr %17, i64 4 - store i32 %20, ptr %21, align 4 - %22 = getelementptr inbounds nuw i8, ptr %17, i64 8 - store i64 0, ptr %22, align 8 - %23 = getelementptr inbounds nuw i8, ptr %17, i64 16 - store i64 %7, ptr %23, align 8 - %24 = getelementptr inbounds nuw i8, ptr %17, i64 24 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %24, ptr nonnull align 1 %3, i64 %7, i1 false) - %25 = getelementptr inbounds [1 x i8], ptr %24, i64 0, i64 %7 - store i8 0, ptr %25, align 1 - store ptr %17, ptr %6, align 8 - %26 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i32 262, ptr %26, align 8 + %17 = phi i32 [ 150, %12 ], [ 22, %14 ] + %18 = phi ptr [ %13, %12 ], [ %15, %14 ] + store i32 1, ptr %19, align 4 + %19 = getelementptr inbounds nuw i8, ptr %18, i64 4 + store i32 %17, ptr %19, align 4 + %21 = getelementptr inbounds nuw i8, ptr %18, i64 8 + store i64 0, ptr %21, align 8 + %22 = getelementptr inbounds nuw i8, ptr %18, i64 16 + store i64 %7, ptr %22, align 8 + %23 = getelementptr inbounds nuw i8, ptr %18, i64 24 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %22, ptr nonnull align 1 %3, i64 %7, i1 false) + %24 = getelementptr inbounds [1 x i8], ptr %22, i64 0, i64 %7 + store i8 0, ptr %23, align 1 + store ptr %18, ptr %6, align 8 + %24 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i32 262, ptr %24, align 8 call void @zend_declare_property(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %6, i32 noundef %4) ret void } @@ -18167,24 +18165,22 @@ define void @zend_declare_property_stringl(ptr noundef %0, ptr noundef readonly br label %16 16: ; preds = %14, %12 - %17 = phi ptr [ %13, %12 ], [ %15, %14 ] - store i32 1, ptr %17, align 4 - %18 = shl i8 %8, 7 - %19 = or disjoint i8 %18, 22 - %20 = zext i8 %19 to i32 - %21 = getelementptr inbounds nuw i8, ptr %17, i64 4 - store i32 %20, ptr %21, align 4 - %22 = getelementptr inbounds nuw i8, ptr %17, i64 8 - store i64 0, ptr %22, align 8 - %23 = getelementptr inbounds nuw i8, ptr %17, i64 16 - store i64 %4, ptr %23, align 8 - %24 = getelementptr inbounds nuw i8, ptr %17, i64 24 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %24, ptr align 1 %3, i64 %4, i1 false) - %25 = getelementptr inbounds [1 x i8], ptr %24, i64 0, i64 %4 - store i8 0, ptr %25, align 1 - store ptr %17, ptr %7, align 8 - %26 = getelementptr inbounds nuw i8, ptr %7, i64 8 - store i32 262, ptr %26, align 8 + %17 = phi i32 [ 150, %12 ], [ 22, %14 ] + %18 = phi ptr [ %13, %12 ], [ %15, %14 ] + store i32 1, ptr %19, align 4 + %19 = getelementptr inbounds nuw i8, ptr %18, i64 4 + store i32 %17, ptr %19, align 4 + %21 = getelementptr inbounds nuw i8, ptr %18, i64 8 + store i64 0, ptr %21, align 8 + %22 = getelementptr inbounds nuw i8, ptr %18, i64 16 + store i64 %4, ptr %22, align 8 + %23 = getelementptr inbounds nuw i8, ptr %18, i64 24 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %22, ptr align 1 %3, i64 %4, i1 false) + %24 = getelementptr inbounds [1 x i8], ptr %22, i64 0, i64 %4 + store i8 0, ptr %23, align 1 + store ptr %18, ptr %7, align 8 + %24 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i32 262, ptr %24, align 8 call void @zend_declare_property(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %7, i32 noundef %5) ret void } @@ -18505,24 +18501,22 @@ define void @zend_declare_class_constant_stringl(ptr noundef %0, ptr noundef %1, br label %15 15: ; preds = %13, %11 - %16 = phi ptr [ %12, %11 ], [ %14, %13 ] - store i32 1, ptr %16, align 4 - %17 = shl i8 %7, 7 - %18 = or disjoint i8 %17, 22 - %19 = zext i8 %18 to i32 - %20 = getelementptr inbounds nuw i8, ptr %16, i64 4 - store i32 %19, ptr %20, align 4 - %21 = getelementptr inbounds nuw i8, ptr %16, i64 8 - store i64 0, ptr %21, align 8 - %22 = getelementptr inbounds nuw i8, ptr %16, i64 16 - store i64 %4, ptr %22, align 8 - %23 = getelementptr inbounds nuw i8, ptr %16, i64 24 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %23, ptr align 1 %3, i64 %4, i1 false) - %24 = getelementptr inbounds [1 x i8], ptr %23, i64 0, i64 %4 - store i8 0, ptr %24, align 1 - store ptr %16, ptr %6, align 8 - %25 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i32 262, ptr %25, align 8 + %16 = phi i32 [ 150, %11 ], [ 22, %13 ] + %17 = phi ptr [ %12, %11 ], [ %14, %13 ] + store i32 1, ptr %17, align 4 + %18 = getelementptr inbounds nuw i8, ptr %17, i64 4 + store i32 %16, ptr %18, align 4 + %20 = getelementptr inbounds nuw i8, ptr %17, i64 8 + store i64 0, ptr %20, align 8 + %21 = getelementptr inbounds nuw i8, ptr %17, i64 16 + store i64 %4, ptr %21, align 8 + %22 = getelementptr inbounds nuw i8, ptr %17, i64 24 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %21, ptr align 1 %3, i64 %4, i1 false) + %23 = getelementptr inbounds [1 x i8], ptr %21, i64 0, i64 %4 + store i8 0, ptr %22, align 1 + store ptr %17, ptr %6, align 8 + %23 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i32 262, ptr %23, align 8 call void @zend_declare_class_constant(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %6) ret void } @@ -18548,24 +18542,22 @@ define void @zend_declare_class_constant_string(ptr noundef %0, ptr noundef %1, br label %zend_declare_class_constant_stringl.exit zend_declare_class_constant_stringl.exit: ; preds = %11, %13 - %15 = phi ptr [ %12, %11 ], [ %14, %13 ] - store i32 1, ptr %15, align 4 - %16 = shl i8 %7, 7 - %17 = or disjoint i8 %16, 22 - %18 = zext i8 %17 to i32 - %19 = getelementptr inbounds nuw i8, ptr %15, i64 4 - store i32 %18, ptr %19, align 4 - %20 = getelementptr inbounds nuw i8, ptr %15, i64 8 - store i64 0, ptr %20, align 8 - %21 = getelementptr inbounds nuw i8, ptr %15, i64 16 - store i64 %6, ptr %21, align 8 - %22 = getelementptr inbounds nuw i8, ptr %15, i64 24 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %22, ptr nonnull readonly align 1 %3, i64 %6, i1 false) - %23 = getelementptr inbounds [1 x i8], ptr %22, i64 0, i64 %6 - store i8 0, ptr %23, align 1 - store ptr %15, ptr %5, align 8 - %24 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store i32 262, ptr %24, align 8 + %15 = phi i32 [ 150, %11 ], [ 22, %13 ] + %16 = phi ptr [ %12, %11 ], [ %14, %13 ] + store i32 1, ptr %16, align 4 + %17 = getelementptr inbounds nuw i8, ptr %16, i64 4 + store i32 %15, ptr %17, align 4 + %19 = getelementptr inbounds nuw i8, ptr %16, i64 8 + store i64 0, ptr %19, align 8 + %20 = getelementptr inbounds nuw i8, ptr %16, i64 16 + store i64 %6, ptr %20, align 8 + %21 = getelementptr inbounds nuw i8, ptr %16, i64 24 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %20, ptr nonnull readonly align 1 %3, i64 %6, i1 false) + %22 = getelementptr inbounds [1 x i8], ptr %21, i64 0, i64 %6 + store i8 0, ptr %21, align 1 + store ptr %16, ptr %5, align 8 + %22 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store i32 262, ptr %22, align 8 call void @zend_declare_class_constant(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %5) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) ret void diff --git a/bench/postgres/optimized/genfile.ll b/bench/postgres/optimized/genfile.ll index 3a7e13dd685..461ce2d993a 100644 --- a/bench/postgres/optimized/genfile.ll +++ b/bench/postgres/optimized/genfile.ll @@ -1000,18 +1000,17 @@ define internal fastcc ptr @read_binary_file(ptr noundef %0, i64 noundef %1, i64 unreachable 24: ; preds = %12 - %25 = lshr i64 %1, 62 - %26 = trunc nuw nsw i64 %25 to i32 - %27 = and i32 %26, 2 - %28 = tail call i32 @fseeko(ptr noundef nonnull %13, i64 noundef %1, i32 noundef %27) - %.not = icmp eq i32 %28, 0 - br i1 %.not, label %33, label %29 - -29: ; preds = %24 - %30 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #9 - tail call void @llvm.assume(i1 %30) - %31 = tail call i32 @errcode_for_file_access() #8 - %32 = tail call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.25, ptr noundef %0) #8 + %25 = icmp sgt i64 %1, -1 + %26 = select i1 %25, i33 0, i32 2 + %27 = tail call i33 @fseeko(ptr noundef nonnull %13, i64 noundef %1, i32 noundef %26) + %28 = icmp eq i32 %27, 0 + br i1 %.not, label %32, label %28 + +28: ; preds = %24 + %29 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #9 + tail call void @llvm.assume(i1 %29) + %30 = tail call i32 @errcode_for_file_access() #8 + %31 = tail call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.25, ptr noundef %0) #8 tail call void @errfinish(ptr noundef nonnull @.str.3, i32 noundef 131, ptr noundef nonnull @__func__.read_binary_file) #8 unreachable diff --git a/bench/postgres/optimized/numeric.ll b/bench/postgres/optimized/numeric.ll index 9644fb636aa..67612649dfa 100644 --- a/bench/postgres/optimized/numeric.ll +++ b/bench/postgres/optimized/numeric.ll @@ -2489,97 +2489,12 @@ define range(i32 -1, -2147483648) i32 @PGTYPESnumeric_cmp(ptr noundef readonly c ; Function Attrs: nounwind uwtable define range(i32 -1, 1) i32 @PGTYPESnumeric_from_int(i32 noundef %0, ptr noundef captures(none) initializes((16, 20)) %1) local_unnamed_addr #0 { - %3 = sext i32 %0 to i64 - %4 = lshr i64 %3, 49 - %5 = trunc nuw nsw i64 %4 to i32 - %spec.select.i = and i32 %5, 16384 - %spec.select43.i = tail call i64 @llvm.abs.i64(i64 %3, i1 true) - %6 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i32 %spec.select.i, ptr %6, align 8 - br label %7 - -7: ; preds = %7, %2 - %.036.i = phi i32 [ 0, %2 ], [ %8, %7 ] - %.0.i = phi i64 [ 1, %2 ], [ %9, %7 ] - %8 = add nuw nsw i32 %.036.i, 1 - %9 = mul i64 %.0.i, 10 - %10 = add i64 %9, -1 - %11 = icmp slt i64 %10, %spec.select43.i - %12 = icmp slt i64 %9, 922337203685477581 - %13 = and i1 %12, %11 - br i1 %13, label %7, label %14, !llvm.loop !39 - -14: ; preds = %7 - %15 = icmp sgt i64 %9, 922337203685477580 - br i1 %15, label %16, label %18 - -16: ; preds = %14 - %17 = add nuw i32 %.036.i, 3 - br label %21 - -18: ; preds = %14 - %19 = add nuw i32 %.036.i, 2 - %20 = sdiv i64 %9, 10 - br label %21 - -21: ; preds = %18, %16 - %.137.i = phi i32 [ %17, %16 ], [ %19, %18 ] - %.1.i = phi i64 [ %9, %16 ], [ %20, %18 ] - %22 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %23 = load ptr, ptr %22, align 8 - tail call void @free(ptr noundef %23) #14 - %24 = add i32 %.137.i, 1 - %25 = sext i32 %24 to i64 - %26 = tail call ptr @pgtypes_alloc(i64 noundef %25) #14 - store ptr %26, ptr %22, align 8 - %27 = icmp eq ptr %26, null - br i1 %27, label %PGTYPESnumeric_from_long.exit, label %28 - -28: ; preds = %21 - store i8 0, ptr %26, align 1 - %29 = load ptr, ptr %22, align 8 - %30 = getelementptr i8, ptr %29, i64 1 - %31 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store ptr %30, ptr %31, align 8 - store i32 %.137.i, ptr %1, align 8 - %32 = getelementptr inbounds nuw i8, ptr %1, i64 8 - store i32 1, ptr %32, align 8 - %33 = getelementptr inbounds nuw i8, ptr %1, i64 12 - store i32 1, ptr %33, align 4 - %34 = add i32 %.137.i, -2 - %35 = getelementptr inbounds nuw i8, ptr %1, i64 4 - store i32 %34, ptr %35, align 4 - br label %36 - -36: ; preds = %36, %28 - %.035.i = phi i32 [ 0, %28 ], [ %43, %36 ] - %.134.i = phi i64 [ %spec.select43.i, %28 ], [ %37, %36 ] - %.2.i = phi i64 [ %.1.i, %28 ], [ %44, %36 ] - %37 = srem i64 %.134.i, %.2.i - %38 = sdiv i64 %.134.i, %.2.i - %39 = trunc i64 %38 to i8 - %40 = load ptr, ptr %31, align 8 - %41 = sext i32 %.035.i to i64 - %42 = getelementptr i8, ptr %40, i64 %41 - store i8 %39, ptr %42, align 1 - %43 = add i32 %.035.i, 1 - %44 = sdiv i64 %.2.i, 10 - %.not = icmp eq i64 %37, 0 - br i1 %.not, label %PGTYPESnumeric_from_long.exit, label %36, !llvm.loop !40 - -PGTYPESnumeric_from_long.exit: ; preds = %36, %21 - %.032.i = phi i32 [ -1, %21 ], [ 0, %36 ] - ret i32 %.032.i -} - -; Function Attrs: nounwind uwtable -define range(i32 -1, 1) i32 @PGTYPESnumeric_from_long(i64 noundef %0, ptr noundef captures(none) initializes((16, 20)) %1) local_unnamed_addr #0 { - %3 = lshr i64 %0, 49 - %4 = trunc nuw nsw i64 %3 to i32 - %spec.select = and i32 %4, 16384 - %spec.select43 = tail call i64 @llvm.abs.i64(i64 %0, i1 false) + %3 = lshr i32 %0, 17 + %4 = and i32 %3, 16384 + %5 = tail call i32 @llvm.abs.i32(i32 %0, i1 false) + %spec.select.i = zext i32 %5 to i64 %5 = getelementptr inbounds nuw i8, ptr %1, i64 16 - store i32 %spec.select, ptr %5, align 8 + store i32 %spec.select.i, ptr %5, align 8 br label %6 6: ; preds = %6, %2 @@ -2588,7 +2503,7 @@ define range(i32 -1, 1) i32 @PGTYPESnumeric_from_long(i64 noundef %0, ptr nounde %7 = add nuw nsw i32 %.036, 1 %8 = mul i64 %.0, 10 %9 = add i64 %8, -1 - %10 = icmp slt i64 %9, %spec.select43 + %10 = icmp slt i64 %9, %spec.select43.i %11 = icmp slt i64 %8, 922337203685477581 %12 = and i1 %11, %10 br i1 %12, label %6, label %13, !llvm.loop !39 @@ -2617,7 +2532,7 @@ define range(i32 -1, 1) i32 @PGTYPESnumeric_from_long(i64 noundef %0, ptr nounde %25 = tail call ptr @pgtypes_alloc(i64 noundef %24) #14 store ptr %25, ptr %21, align 8 %26 = icmp eq ptr %25, null - br i1 %26, label %alloc_var.exit.thread, label %27 + br i1 %26, label %PGTYPESnumeric_from_long.exit, label %27 27: ; preds = %20 store i8 0, ptr %25, align 1 @@ -2637,7 +2552,7 @@ define range(i32 -1, 1) i32 @PGTYPESnumeric_from_long(i64 noundef %0, ptr nounde 35: ; preds = %35, %27 %.035 = phi i32 [ 0, %27 ], [ %42, %35 ] - %.134 = phi i64 [ %spec.select43, %27 ], [ %36, %35 ] + %.134 = phi i64 [ %spec.select43.i, %27 ], [ %36, %35 ] %.2 = phi i64 [ %.1, %27 ], [ %43, %35 ] %36 = srem i64 %.134, %.2 %37 = sdiv i64 %.134, %.2 @@ -2648,11 +2563,94 @@ define range(i32 -1, 1) i32 @PGTYPESnumeric_from_long(i64 noundef %0, ptr nounde store i8 %38, ptr %41, align 1 %42 = add i32 %.035, 1 %43 = sdiv i64 %.2, 10 - %44 = icmp sgt i64 %36, 0 - br i1 %44, label %35, label %alloc_var.exit.thread, !llvm.loop !40 + %44 = icmp eq i64 %36, 0 + br i1 %44, label %PGTYPESnumeric_from_long.exit, label %35, !llvm.loop !40 -alloc_var.exit.thread: ; preds = %35, %20 - %.032 = phi i32 [ -1, %20 ], [ 0, %35 ] +PGTYPESnumeric_from_long.exit: ; preds = %35, %20 + %.032.i = phi i32 [ -1, %20 ], [ 0, %35 ] + ret i32 %.032.i +} + +; Function Attrs: nounwind uwtable +define range(i32 -1, 1) i32 @PGTYPESnumeric_from_long(i64 noundef %0, ptr noundef captures(none) initializes((16, 20)) %1) local_unnamed_addr #0 { + %3 = icmp slt i64 %0, 0 + %spec.select = select i1 %3, i32 16384, i32 0 + %spec.select43 = tail call i64 @llvm.abs.i64(i64 %0, i1 false) + %4 = getelementptr inbounds nuw i8, ptr %1, i64 16 + store i32 %spec.select, ptr %4, align 8 + br label %5 + +5: ; preds = %5, %2 + %.036 = phi i32 [ 0, %2 ], [ %6, %5 ] + %.0 = phi i64 [ 1, %2 ], [ %7, %5 ] + %6 = add nuw nsw i32 %.036, 1 + %7 = mul i64 %.0, 10 + %8 = add i64 %7, -1 + %9 = icmp slt i64 %8, %spec.select43 + %10 = icmp slt i64 %7, 922337203685477581 + %11 = and i1 %10, %9 + br i1 %11, label %5, label %12, !llvm.loop !39 + +12: ; preds = %5 + %13 = icmp sgt i64 %7, 922337203685477580 + br i1 %13, label %14, label %16 + +14: ; preds = %12 + %15 = add nuw i32 %.036, 3 + br label %19 + +16: ; preds = %12 + %17 = add nuw i32 %.036, 2 + %18 = sdiv i64 %7, 10 + br label %19 + +19: ; preds = %16, %14 + %.137 = phi i32 [ %15, %14 ], [ %17, %16 ] + %.1 = phi i64 [ %7, %14 ], [ %18, %16 ] + %20 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %21 = load ptr, ptr %20, align 8 + tail call void @free(ptr noundef %21) #14 + %22 = add i32 %.137, 1 + %23 = sext i32 %22 to i64 + %24 = tail call ptr @pgtypes_alloc(i64 noundef %23) #14 + store ptr %24, ptr %20, align 8 + %25 = icmp eq ptr %24, null + br i1 %25, label %alloc_var.exit.thread, label %26 + +26: ; preds = %19 + store i8 0, ptr %24, align 1 + %27 = load ptr, ptr %20, align 8 + %28 = getelementptr i8, ptr %27, i64 1 + %29 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store ptr %28, ptr %29, align 8 + store i32 %.137, ptr %1, align 8 + %30 = getelementptr inbounds nuw i8, ptr %1, i64 8 + store i32 1, ptr %30, align 8 + %31 = getelementptr inbounds nuw i8, ptr %1, i64 12 + store i32 1, ptr %31, align 4 + %32 = add i32 %.137, -2 + %33 = getelementptr inbounds nuw i8, ptr %1, i64 4 + store i32 %32, ptr %33, align 4 + br label %34 + +alloc_var.exit.thread: ; preds = %34, %26 + %.032 = phi i32 [ 0, %26 ], [ %41, %34 ] + %.134 = phi i64 [ %spec.select43, %26 ], [ %35, %34 ] + %.2 = phi i64 [ %.1, %26 ], [ %42, %34 ] + %35 = srem i64 %.134, %.2 + %36 = sdiv i64 %.134, %.2 + %37 = trunc i64 %36 to i8 + %38 = load ptr, ptr %29, align 8 + %39 = sext i32 %.035 to i64 + %40 = getelementptr i8, ptr %38, i64 %39 + store i8 %37, ptr %40, align 1 + %41 = add i32 %.035, 1 + %42 = sdiv i64 %.2, 10 + %43 = icmp sgt i64 %35, 0 + br i1 %43, label %34, label %alloc_var.exit.thread, !llvm.loop !40 + +alloc_var.exit.thread: ; preds = %34, %19 + %.032 = phi i32 [ -1, %19 ], [ 0, %34 ] ret i32 %.032 } @@ -3137,6 +3135,9 @@ declare i32 @llvm.smin.i32(i32, i32) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #12 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.abs.i32(i32, i1 immarg) #12 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "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 #1 = { "frame-pointer"="all" "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 #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "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" } diff --git a/bench/postgres/optimized/spgkdtreeproc.ll b/bench/postgres/optimized/spgkdtreeproc.ll index 5e4546c1af2..f6177b38bc2 100644 --- a/bench/postgres/optimized/spgkdtreeproc.ll +++ b/bench/postgres/optimized/spgkdtreeproc.ll @@ -59,10 +59,9 @@ define dso_local noundef i64 @spg_kd_choose(ptr noundef readonly captures(none) store i32 1, ptr %16, align 8 %19 = getelementptr inbounds nuw i8, ptr %4, i64 16 %20 = load i32, ptr %19, align 8 - %21 = shl i32 %20, 3 - %22 = and i32 %21, 8 - %23 = xor i32 %22, 8 - %.in.idx.i = zext nneg i32 %23 to i64 + %21 = and i32 %20, 1 + %22 = icmp eq i32 %21, 0 + %23 = select i1 %22, i64 8, i64 0 %.in.i = getelementptr inbounds nuw i8, ptr %13, i64 %.in.idx.i %24 = load double, ptr %.in.i, align 8 %25 = fcmp ule double %18, %24 @@ -135,18 +134,17 @@ define dso_local noundef i64 @spg_kd_picksplit(ptr noundef readonly captures(non %30 = load i32, ptr %4, align 8 %31 = ashr i32 %30, 1 %32 = load i32, ptr %26, align 8 - %33 = sext i32 %31 to i64 - %34 = getelementptr %struct.SortedPoint, ptr %11, i64 %33 - %35 = load ptr, ptr %34, align 8 - %36 = shl i32 %32, 3 - %37 = and i32 %36, 8 - %38 = xor i32 %37, 8 - %.in.idx = zext nneg i32 %38 to i64 - %.in = getelementptr inbounds nuw i8, ptr %35, i64 %.in.idx - %39 = load i64, ptr %.in, align 8 + %33 = and i32 %32, 1 + %34 = icmp eq i32 %33, 0 + %35 = sext i32 %31 to i64 + %36 = getelementptr %struct.SortedPoint, ptr %11, i64 %34 + %37 = load ptr, ptr %36, align 8 + %38 = select i1 %34, i64 8, i64 0 + %.in.idx = getelementptr inbounds nuw i8, ptr %36, i64 %38 + %.in = load i64, ptr %.in.idx, align 8 store i8 1, ptr %7, align 8 %40 = getelementptr inbounds nuw i8, ptr %7, i64 8 - store i64 %39, ptr %40, align 8 + store i64 %37, ptr %40, align 8 %41 = getelementptr inbounds nuw i8, ptr %7, i64 16 store i32 2, ptr %41, align 8 %42 = getelementptr inbounds nuw i8, ptr %7, i64 24 diff --git a/bench/qemu/optimized/hw_nvme_ctrl.ll b/bench/qemu/optimized/hw_nvme_ctrl.ll index 29327c6dc69..46a7b408832 100644 --- a/bench/qemu/optimized/hw_nvme_ctrl.ll +++ b/bench/qemu/optimized/hw_nvme_ctrl.ll @@ -15123,8 +15123,7 @@ if.end16: ; preds = %if.end8 ] sw.bb: ; preds = %if.end16 - %14 = shl nuw nsw i8 %3, 1 - %spec.select = zext nneg i8 %14 to i32 + %14 = select i1 %tobool.not.not, i32 0, i32 2 %conv22 = zext nneg i8 %3 to i32 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %_now.i.i72) %15 = load i32, ptr @trace_events_enabled_count, align 4 @@ -15471,8 +15470,7 @@ trace_pci_nvme_reset_zone.exit: ; preds = %sw.bb38, %land.lhs. br label %return sw.bb47: ; preds = %if.end16 - %69 = shl nuw nsw i8 %3, 2 - %spec.select70 = zext nneg i8 %69 to i32 + %69 = select i1 %tobool.not.not, i32 0, i32 4 %conv52 = zext nneg i8 %3 to i32 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %_now.i.i181) %70 = load i32, ptr @trace_events_enabled_count, align 4 diff --git a/bench/spike/optimized/csrs.ll b/bench/spike/optimized/csrs.ll index 23da9d51198..9b1e71128b1 100644 --- a/bench/spike/optimized/csrs.ll +++ b/bench/spike/optimized/csrs.ll @@ -10443,11 +10443,11 @@ define noundef zeroext i1 @_ZN14stimecmp_csr_t14unlogged_writeEm(ptr noundef non %27 = getelementptr inbounds nuw i8, ptr %0, i64 48 %28 = load i64, ptr %27, align 8 %29 = select i1 %.not, i64 0, i64 %28 - %30 = lshr i64 %17, 57 - %31 = lshr i64 %10, 58 - %32 = and i64 %31, 32 - %33 = and i64 %30, 64 - %34 = or disjoint i64 %33, %32 + %30 = lshr i64 %10, 58 + %31 = and i64 %30, 32 + %32 = lshr i64 %17, 57 + %33 = and i64 %32, 64 + %34 = or disjoint i64 %33, %31 %35 = getelementptr inbounds nuw i8, ptr %20, i64 40 %36 = load i64, ptr %35, align 8 %37 = xor i64 %34, -1 diff --git a/bench/spike/optimized/s_subMagsF32.ll b/bench/spike/optimized/s_subMagsF32.ll index dc6d960c3ad..8edf0e8b972 100644 --- a/bench/spike/optimized/s_subMagsF32.ll +++ b/bench/spike/optimized/s_subMagsF32.ll @@ -97,9 +97,8 @@ define i32 @softfloat_subMagsF32(i64 noundef %0, i64 noundef %1) local_unnamed_a br i1 %.not82, label %57, label %91 57: ; preds = %56 - %58 = add nuw nsw i64 %54, 4286578688 - %59 = and i64 %58, 4286578688 - br label %93 + %58 = xor i64 %54, 4286578688 + br label %92 60: ; preds = %53 %.not78 = icmp eq i64 %54, 0 @@ -165,7 +164,7 @@ softfloat_shiftRightJam32.exit: ; preds = %74, %84 br label %93 93: ; preds = %66, %91, %57, %20, %16, %14 - %.065 = phi i64 [ %92, %91 ], [ %59, %57 ], [ 2143289344, %14 ], [ %48, %20 ], [ %19, %16 ], [ %0, %66 ] + %.065 = phi i64 [ %92, %91 ], [ %58, %57 ], [ 2143289344, %14 ], [ %48, %20 ], [ %19, %16 ], [ %0, %66 ] %94 = trunc i64 %.065 to i32 br label %95 diff --git a/bench/velox/optimized/ComplexVector.ll b/bench/velox/optimized/ComplexVector.ll index 6692d15fd54..a6c67c0bdab 100644 --- a/bench/velox/optimized/ComplexVector.ll +++ b/bench/velox/optimized/ComplexVector.ll @@ -19535,7 +19535,7 @@ if.end.i.i.i.i.i: ; preds = %while.body.i %.sink.in.i = select i1 %cmp.i.i.not.i, ptr %__first1.addr.020.i, ptr %__first2.addr.019.i %__first2.addr.1.idx.i = lshr exact i64 %4, 29 %__first2.addr.1.i = getelementptr inbounds nuw i8, ptr %__first2.addr.019.i, i64 %__first2.addr.1.idx.i - %__first1.addr.1.idx.i = xor i64 %__first2.addr.1.idx.i, 4 + %__first1.addr.1.idx.i = select i1 %cmp.i.i.not.i, i64 4, i64 0 %__first1.addr.1.i = getelementptr inbounds nuw i8, ptr %__first1.addr.020.i, i64 %__first1.addr.1.idx.i %.sink.i = load i32, ptr %.sink.in.i, align 4 store i32 %.sink.i, ptr %__result.addr.021.i, align 4 @@ -19929,7 +19929,7 @@ if.end.i.i.i.i.i: ; preds = %while.body.i %.sink.in.i = select i1 %cmp.i.i.not.i, ptr %__first1.addr.027.i, ptr %__first2.addr.026.i %__first2.addr.1.idx.i = lshr exact i64 %3, 29 %__first2.addr.1.i = getelementptr inbounds nuw i8, ptr %__first2.addr.026.i, i64 %__first2.addr.1.idx.i - %__first1.addr.1.idx.i = xor i64 %__first2.addr.1.idx.i, 4 + %__first1.addr.1.idx.i = select i1 %cmp.i.i.not.i, i64 4, i64 0 %__first1.addr.1.i = getelementptr inbounds nuw i8, ptr %__first1.addr.027.i, i64 %__first1.addr.1.idx.i %.sink.i = load i32, ptr %.sink.in.i, align 4 store i32 %.sink.i, ptr %__result.addr.028.i, align 4 @@ -20007,7 +20007,7 @@ if.end.i.i.i.i.i58: ; preds = %while.body.i35 %.sink.in.i49 = select i1 %cmp.i.i.not.i48, ptr %__first1.addr.027.i37, ptr %__first2.addr.026.i38 %__first2.addr.1.idx.i50 = lshr exact i64 %9, 29 %__first2.addr.1.i51 = getelementptr inbounds nuw i8, ptr %__first2.addr.026.i38, i64 %__first2.addr.1.idx.i50 - %__first1.addr.1.idx.i52 = xor i64 %__first2.addr.1.idx.i50, 4 + %__first1.addr.1.idx.i52 = select i1 %cmp.i.i.not.i48, i64 4, i64 0 %__first1.addr.1.i53 = getelementptr inbounds nuw i8, ptr %__first1.addr.027.i37, i64 %__first1.addr.1.idx.i52 %.sink.i54 = load i32, ptr %.sink.in.i49, align 4 store i32 %.sink.i54, ptr %__result.addr.028.i36, align 4 diff --git a/bench/verilator/optimized/V3EmitCConstPool.ll b/bench/verilator/optimized/V3EmitCConstPool.ll index 5ce4c14c8ea..b2a520ac20f 100644 --- a/bench/verilator/optimized/V3EmitCConstPool.ll +++ b/bench/verilator/optimized/V3EmitCConstPool.ll @@ -6326,9 +6326,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN14EmitCConstPool8emitVarsEPK12AstConstPoo call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) %.sink.in.i = select i1 %25, ptr %.sroa.011.019.i, ptr %.sroa.015.020.i - %26 = lshr i32 %19, 28 - %27 = and i32 %26, 8 - %.sroa.011.1.idx.i = zext nneg i32 %27 to i64 + %26 = select i1 %25, i64 8, i64 0 %.sroa.011.1.i = getelementptr inbounds nuw i8, ptr %.sroa.011.019.i, i64 %.sroa.011.1.idx.i %.sroa.015.1.idx.i = select i1 %25, i64 0, i64 8 %.sroa.015.1.i = getelementptr inbounds nuw i8, ptr %.sroa.015.020.i, i64 %.sroa.015.1.idx.i @@ -6490,9 +6488,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN14EmitCConstPool8emitVarsEPK12AstConstPoo call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) %.sink.in.i = select i1 %25, ptr %.01623.i, ptr %.024.i - %26 = lshr i32 %19, 28 - %27 = and i32 %26, 8 - %.117.idx.i = zext nneg i32 %27 to i64 + %26 = select i1 %25, i64 8, i64 0 %.117.i = getelementptr inbounds nuw i8, ptr %.01623.i, i64 %.117.idx.i %.1.idx.i = select i1 %25, i64 0, i64 8 %.1.i = getelementptr inbounds nuw i8, ptr %.024.i, i64 %.1.idx.i diff --git a/bench/verilator/optimized/V3EmitCModel.ll b/bench/verilator/optimized/V3EmitCModel.ll index 6b9783af3b0..2450a9e2cc2 100644 --- a/bench/verilator/optimized/V3EmitCModel.ll +++ b/bench/verilator/optimized/V3EmitCModel.ll @@ -37202,9 +37202,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN10EmitCModel10findFuncpsESt8functionIFbPK call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) %.sink.in.i = select i1 %36, ptr %.sroa.011.025.i, ptr %.sroa.015.026.i - %37 = lshr i32 %30, 28 - %38 = and i32 %37, 8 - %.sroa.011.1.idx.i = zext nneg i32 %38 to i64 + %37 = select i1 %36, i64 8, i64 0 %.sroa.011.1.i = getelementptr inbounds nuw i8, ptr %.sroa.011.025.i, i64 %.sroa.011.1.idx.i %.sroa.015.1.idx.i = select i1 %36, i64 0, i64 8 %.sroa.015.1.i = getelementptr inbounds nuw i8, ptr %.sroa.015.026.i, i64 %.sroa.015.1.idx.i @@ -37336,9 +37334,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN10EmitCModel10findFuncpsESt8functionIFbPK call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) %.sink.in.i34 = select i1 %82, ptr %.01629.i, ptr %.030.i33 - %83 = lshr i32 %76, 28 - %84 = and i32 %83, 8 - %.117.idx.i = zext nneg i32 %84 to i64 + %83 = select i1 %80, i64 8, i64 0 %.117.i = getelementptr inbounds nuw i8, ptr %.01629.i, i64 %.117.idx.i %.1.idx.i = select i1 %82, i64 0, i64 8 %.1.i = getelementptr inbounds nuw i8, ptr %.030.i33, i64 %.1.idx.i @@ -37629,9 +37625,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN10EmitCModel10findFuncpsESt8functionIFbPK call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) %.sink.in = select i1 %25, ptr %.sroa.011.025, ptr %.sroa.015.026 - %26 = lshr i32 %19, 28 - %27 = and i32 %26, 8 - %.sroa.011.1.idx = zext nneg i32 %27 to i64 + %26 = select i1 %25, i64 8, i64 0 %.sroa.011.1 = getelementptr inbounds nuw i8, ptr %.sroa.011.025, i64 %.sroa.011.1.idx %.sroa.015.1.idx = select i1 %25, i64 0, i64 8 %.sroa.015.1 = getelementptr inbounds nuw i8, ptr %.sroa.015.026, i64 %.sroa.015.1.idx @@ -37725,9 +37719,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN10EmitCModel10findFuncpsESt8functionIFbPK call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) %.sink.in = select i1 %26, ptr %.01629, ptr %.030 - %27 = lshr i32 %20, 28 - %28 = and i32 %27, 8 - %.117.idx = zext nneg i32 %28 to i64 + %27 = select i1 %26, i64 8, i64 0 %.117 = getelementptr inbounds nuw i8, ptr %.01629, i64 %.117.idx %.1.idx = select i1 %26, i64 0, i64 8 %.1 = getelementptr inbounds nuw i8, ptr %.030, i64 %.1.idx @@ -37823,9 +37815,7 @@ _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZN10EmitCModel10findFuncpsESt8functionIFbPK call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) %.sink.in = select i1 %24, ptr %.sroa.016.027, ptr %.029 - %25 = lshr i32 %18, 28 - %26 = and i32 %25, 8 - %.sroa.016.1.idx = zext nneg i32 %26 to i64 + %25 = select i1 %24, i64 8, i64 0 %.sroa.016.1 = getelementptr inbounds nuw i8, ptr %.sroa.016.027, i64 %.sroa.016.1.idx %.1.idx = select i1 %24, i64 0, i64 8 %.1 = getelementptr inbounds nuw i8, ptr %.029, i64 %.1.idx diff --git a/bench/wasmedge/optimized/codegen.ll b/bench/wasmedge/optimized/codegen.ll index 2a25611f428..4edd0ae1f3c 100644 --- a/bench/wasmedge/optimized/codegen.ll +++ b/bench/wasmedge/optimized/codegen.ll @@ -3424,6 +3424,8 @@ define linkonce_odr hidden ptr @_ZN3fmt2v86detail21default_arg_formatterIcEclIdE call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) %7 = bitcast double %1 to i64 + %8 = icmp sgt i64 %7, -1 + %.sroa.2.0.i = select i1 %8, i32 0, i32 256 %.0.i = tail call double @llvm.fabs.f64(double %1) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(16) @__const._ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.specs, i64 16, i1 false) %8 = and i64 %7, 9218868437227405312 @@ -3438,14 +3440,12 @@ _ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_sp store i64 72057594574798848, ptr %10, align 8 %11 = fcmp oeq double %.0.i, 0x7FF0000000000000 %12 = select i1 %11, ptr @.str.36, ptr @.str.38 - %sum.shift.i = lshr i64 %7, 63 - %13 = trunc nuw nsw i64 %sum.shift.i to i32 - %.not11.not.i.i = icmp sgt i64 %7, -1 - %14 = select i1 %.not11.not.i.i, i64 3, i64 4 - store i32 %13, ptr %4, align 8 - %15 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %12, ptr %15, align 8 - %16 = call ptr @_ZN3fmt2v86detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcRZNS1_15write_nonfiniteIcS5_EET0_S7_bNS0_18basic_format_specsIT_EERKNS1_11float_specsEEUlS5_E_EES7_S7_RKNS8_IT1_EEmmOT2_(ptr %.sroa.0.0.copyload, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %14, i64 noundef %14, ptr noundef nonnull align 8 dereferenceable(16) %4) + %sum.shift.i = lshr exact i32 %.sroa.2.0.i, 8 + %13 = select i1 %8, i64 3, i64 4 + store i32 %14, ptr %4, align 8 + %14 = getelementptr inbounds nuw i8, ptr %4, i64 8 + store ptr %13, ptr %14, align 8 + %15 = call ptr @_ZN3fmt2v86detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcRZNS1_15write_nonfiniteIcS5_EET0_S7_bNS0_18basic_format_specsIT_EERKNS1_11float_specsEEUlS5_E_EES7_S7_RKNS8_IT1_EEmmOT2_(ptr %.sroa.0.0.copyload, ptr noundef nonnull align 4 dereferenceable(16) %3, i64 noundef %15, i64 noundef %15, ptr noundef nonnull align 8 dereferenceable(16) %4) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) br label %_ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.exit @@ -3457,13 +3457,13 @@ _ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_sp %20 = getelementptr inbounds nuw i8, ptr %6, i64 8 %21 = extractvalue { i64, i32 } %18, 1 store i32 %21, ptr %20, align 8 - %22 = lshr i64 %7, 23 - %.sroa.2.0.insert.shift.i = and i64 %22, 1099511627776 + %22 = zext nneg i32 %.sroa.2.0.i to i64 + %.sroa.2.0.insert.shift.i = shl nuw nsw i64 %22, 32 %23 = call ptr @_ZN3fmt2v86detail14do_write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIdEEcNS1_14digit_groupingIcEEEET_S9_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsENS1_10locale_refE(ptr %.sroa.0.0.copyload, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %5, i64 %.sroa.2.0.insert.shift.i, ptr null) br label %_ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.exit _ZN3fmt2v86detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_.exit: ; preds = %_ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_specsIT_EERKNS1_11float_specsE.exit.i, %17 - %.sroa.07.0.i = phi ptr [ %16, %_ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_specsIT_EERKNS1_11float_specsE.exit.i ], [ %23, %17 ] + %.sroa.07.0.i = phi ptr [ %17, %_ZN3fmt2v86detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_18basic_format_specsIT_EERKNS1_11float_specsE.exit.i ], [ %23, %17 ] call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) ret ptr %.sroa.07.0.i diff --git a/bench/wasmtime-rs/optimized/16qf4j2oevjc61uc.ll b/bench/wasmtime-rs/optimized/16qf4j2oevjc61uc.ll index 73d4b569bcc..f37d51e018e 100644 --- a/bench/wasmtime-rs/optimized/16qf4j2oevjc61uc.ll +++ b/bench/wasmtime-rs/optimized/16qf4j2oevjc61uc.ll @@ -21885,14 +21885,10 @@ define hidden void @_ZN17cranelift_codegen8machinst3abi14ABIMachineSpec25gen_res unreachable 8: ; preds = %5 - %9 = sub nsw i32 0, %2 - %10 = lshr i32 %9, 30 - %11 = trunc nuw nsw i32 %10 to i8 - %.05.i = and i8 %11, 2 - %12 = zext nneg i32 %2 to i64 + %9 = zext nneg i32 %2 to i64 store i8 1, ptr %0, align 8 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %.05.i, ptr %.sroa.4.0..sroa_idx, align 1 + store i8 2, ptr %.sroa.4.0..sroa_idx, align 1 %.sroa.5.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 2 store i8 3, ptr %.sroa.5.0..sroa_idx, align 2 %.sroa.610.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 4 @@ -21906,7 +21902,7 @@ define hidden void @_ZN17cranelift_codegen8machinst3abi14ABIMachineSpec25gen_res %.sroa.10.sroa.3.0..sroa.10.0..sroa_idx.sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 40 store i8 96, ptr %.sroa.10.sroa.3.0..sroa.10.0..sroa_idx.sroa_idx, align 8 %.sroa.10.sroa.5.0..sroa.10.0..sroa_idx.sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 48 - store i64 %12, ptr %.sroa.10.sroa.5.0..sroa.10.0..sroa_idx.sroa_idx, align 8 + store i64 %9, ptr %.sroa.10.sroa.5.0..sroa.10.0..sroa_idx.sroa_idx, align 8 br label %7 } diff --git a/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll b/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll index 9c84c2b848a..fde90f55a67 100644 --- a/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll +++ b/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll @@ -8878,10 +8878,9 @@ _ZN8smallvec10infallible17heb7d46c8e758169bE.exit.preheader: ; preds = %3 br i1 %.not, label %_ZN8smallvec10infallible17heb7d46c8e758169bE.exit._crit_edge, label %.lr.ph .lr.ph: ; preds = %_ZN8smallvec10infallible17heb7d46c8e758169bE.exit.preheader - %10 = sub i32 0, %1 - %11 = lshr i32 %10, 30 - %12 = trunc nuw nsw i32 %11 to i8 - %.05.i5 = and i8 %12, 2 + %10 = add i32 %1, -1 + %11 = icmp slt i32 %10, 0 + %12 = select i1 %11, i8 0, i8 2 %.0.i6 = tail call i32 @llvm.abs.i32(i32 %1, i1 false) %.sroa.0.sroa.4.0..sroa_idx.i7 = getelementptr inbounds nuw i8, ptr %6, i64 1 %.sroa.0.sroa.5.0..sroa_idx.i8 = getelementptr inbounds nuw i8, ptr %6, i64 2 @@ -8912,10 +8911,9 @@ _ZN8smallvec10infallible17heb7d46c8e758169bE.exit.preheader: ; preds = %3 _ZN8smallvec10infallible17heb7d46c8e758169bE.exit._crit_edge: ; preds = %"_ZN8smallvec17SmallVec$LT$A$GT$4push17hc7e6f55c274ff567E.llvm.17911367524062806024.exit", %_ZN8smallvec10infallible17heb7d46c8e758169bE.exit.preheader call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %4) %21 = mul i32 %2, %1 - %22 = lshr i32 %21, 30 - %23 = trunc nuw nsw i32 %22 to i8 - %.05.i = and i8 %23, 2 - %.0.i = tail call i32 @llvm.abs.i32(i32 %21, i1 false) + %22 = icmp sgt i32 %21, -1 + %23 = select i1 %22, i8 0, i8 2 + %.05.i = tail call i32 @llvm.abs.i32(i32 %21, i1 false) store i8 1, ptr %4, align 8, !alias.scope !863 %.sroa.0.sroa.4.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %4, i64 1 store i8 %.05.i, ptr %.sroa.0.sroa.4.0..sroa_idx.i, align 1, !alias.scope !863 @@ -11070,9 +11068,8 @@ define void @"_ZN120_$LT$cranelift_codegen..isa..x64..abi..X64ABIMachineSpec$u20 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define void @"_ZN120_$LT$cranelift_codegen..isa..x64..abi..X64ABIMachineSpec$u20$as$u20$cranelift_codegen..machinst..abi..ABIMachineSpec$GT$17gen_sp_reg_adjust17h64db464e5e1193f4E"(ptr noalias noundef writeonly sret({ { [20 x i64] }, i64 }) align 8 captures(none) dereferenceable(168) initializes((0, 3), (4, 13), (16, 20), (160, 168)) %0, i32 noundef %1) unnamed_addr #9 personality ptr @rust_eh_personality { - %3 = lshr i32 %1, 30 - %4 = trunc nuw nsw i32 %3 to i8 - %.05 = and i8 %4, 2 + %3 = icmp sgt i32 %1, -1 + %4 = select i1 %3, i8 0, i8 2 %.0 = tail call i32 @llvm.abs.i32(i32 %1, i1 false) store i8 1, ptr %0, align 8 %.sroa.0.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 1 diff --git a/bench/wireshark/optimized/androiddump.ll b/bench/wireshark/optimized/androiddump.ll index cd4a0d14927..735c502c8a5 100644 --- a/bench/wireshark/optimized/androiddump.ll +++ b/bench/wireshark/optimized/androiddump.ll @@ -2859,7 +2859,7 @@ adb_forward.exit: ; preds = %.sink.split.i, %39, .critedge.thread168: ; preds = %158 %162 = load i64, ptr @capture_android_bluetooth_external_parser.buffer, align 16 %163 = call i64 @llvm.bswap.i64(i64 %162) - br label %198 + br label %196 164: ; preds = %155 %165 = icmp eq i8 %132, 4 @@ -2889,7 +2889,7 @@ adb_forward.exit: ; preds = %.sink.split.i, %39, switch i8 %132, label %default.unreachable [ i8 1, label %178 i8 2, label %.critedge._crit_edge - i8 3, label %198 + i8 3, label %196 ] .critedge._crit_edge: ; preds = %.critedge @@ -2909,41 +2909,39 @@ adb_forward.exit: ; preds = %.sink.split.i, %39, %184 = phi i8 [ %139, %.critedge._crit_edge ], [ %146, %.critedge.thread ] %185 = phi i64 [ %177, %.critedge._crit_edge ], [ %154, %.critedge.thread ] %186 = load i8, ptr getelementptr inbounds nuw (i8, ptr @capture_android_bluetooth_external_parser.buffer, i64 10), align 2 - %187 = and i8 %186, -128 - %188 = zext i8 %187 to i32 - %189 = shl nuw nsw i32 %188, 17 - store i32 %189, ptr getelementptr inbounds nuw (i8, ptr @capture_android_bluetooth_external_parser.buffer, i64 4), align 4 - %190 = zext i8 %184 to i32 - %191 = zext i8 %183 to i32 - %192 = shl nuw nsw i32 %191, 8 - %193 = add nuw nsw i32 %190, 9 - %194 = add nuw nsw i32 %193, %192 - %195 = add nuw nsw i64 %.pre-phi, 9 - %196 = zext nneg i32 %192 to i64 - %197 = add nuw nsw i64 %195, %196 - br label %208 - -198: ; preds = %.critedge.thread168, %.critedge + %187 = icmp sgt i8 %186, -1 + %188 = select i1 %187, i32 0, i32 16777216 + store i32 %187, ptr getelementptr inbounds nuw (i8, ptr @capture_android_bluetooth_external_parser.buffer, i64 4), align 4 + %188 = zext i8 %184 to i32 + %190 = zext i8 %183 to i32 + %191 = shl nuw nsw i32 %189, 8 + %192 = add nuw nsw i32 %188, 9 + %193 = add nuw nsw i32 %191, %190 + %194 = add nuw nsw i64 %.pre-phi, 9 + %195 = zext nneg i32 %190 to i64 + %196 = add nuw nsw i64 %193, %194 + br label %204 + +196: ; preds = %.critedge.thread168, %.critedge %.pre-phi222 = phi i64 [ %160, %.critedge.thread168 ], [ %140, %.critedge ] %199 = phi i8 [ %159, %.critedge.thread168 ], [ %139, %.critedge ] %200 = phi i64 [ %163, %.critedge.thread168 ], [ %177, %.critedge ] %201 = load i8, ptr getelementptr inbounds nuw (i8, ptr @capture_android_bluetooth_external_parser.buffer, i64 10), align 2 - %202 = and i8 %201, -128 - %203 = zext i8 %202 to i32 - %204 = shl nuw nsw i32 %203, 17 - store i32 %204, ptr getelementptr inbounds nuw (i8, ptr @capture_android_bluetooth_external_parser.buffer, i64 4), align 4 - %205 = zext i8 %199 to i32 - %206 = add nuw nsw i32 %205, 8 - %207 = add nuw nsw i64 %.pre-phi222, 8 - br label %208 + %202 = icmp sgt i8 %201, -1 + %203 = select i1 %202, i32 0, i32 16777216 + store i32 %203, ptr getelementptr inbounds nuw (i8, ptr @capture_android_bluetooth_external_parser.buffer, i64 4), align 4 + %201 = zext i8 %197 to i32 + %205 = add nuw nsw i32 %201, 8 + %206 = add nuw nsw i64 %.pre-phi222, 8 + br label %204 default.unreachable: ; preds = %.critedge unreachable -208: ; preds = %.critedge.thread169, %198, %182, %178 - %209 = phi i64 [ %172, %.critedge.thread169 ], [ %200, %198 ], [ %185, %182 ], [ %177, %178 ] - %.0132 = phi i32 [ %174, %.critedge.thread169 ], [ %206, %198 ], [ %194, %182 ], [ %180, %178 ] - %.0128 = phi i64 [ %175, %.critedge.thread169 ], [ %207, %198 ], [ %197, %182 ], [ %181, %178 ] +208: ; preds = %.critedge.thread169, %196, %182, %178 + %209 = phi i64 [ %172, %.critedge.thread169 ], [ %200, %196 ], [ %185, %182 ], [ %177, %178 ] + %.0132 = phi i32 [ %174, %.critedge.thread169 ], [ %202, %196 ], [ %192, %182 ], [ %180, %178 ] + %.0128 = phi i64 [ %175, %.critedge.thread169 ], [ %203, %196 ], [ %195, %182 ], [ %181, %178 ] %210 = load i32, ptr @capture_android_bluetooth_external_parser.id, align 4 %211 = add i32 %210, 1 store i32 %211, ptr @capture_android_bluetooth_external_parser.id, align 4 diff --git a/bench/wireshark/optimized/blf.ll b/bench/wireshark/optimized/blf.ll index 2b29cc20aef..5be819bd9c7 100644 --- a/bench/wireshark/optimized/blf.ll +++ b/bench/wireshark/optimized/blf.ll @@ -2272,11 +2272,9 @@ blf_read_bytes.exit: ; preds = %15 42: ; preds = %40, %38, %35, %33, %31, %29 %43 = and i16 %26, 8192 - %44 = lshr exact i16 %43, 10 - %spec.select = trunc nuw nsw i16 %44 to i8 - %45 = lshr exact i16 %43, 8 - %46 = trunc nuw nsw i16 %45 to i8 - %spec.select47 = xor i8 %46, 32 + %44 = icmp eq i16 %43, 0 + %spec.select = select i1 %44, i8 0, i8 8 + %45 = select i1 %44, i8 32, i8 0 br label %.thread .thread: ; preds = %42, %.thread44, %blf_read_bytes.exit @@ -2308,10 +2306,10 @@ blf_add_direction_option.exit: ; preds = %.thread %switch.not.not = icmp eq i16 %60, 0 %. = select i1 %switch.not.not, i32 1, i32 2 %61 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %60 = load ptr, ptr %59, align 8 + %61 = getelementptr inbounds nuw i8, ptr %60, i64 232 %62 = load ptr, ptr %61, align 8 - %63 = getelementptr inbounds nuw i8, ptr %62, i64 232 - %64 = load ptr, ptr %63, align 8 - %65 = call i32 @wtap_block_add_uint32_option(ptr noundef %64, i32 noundef 2, i32 noundef %.) #14 + %63 = call i32 @wtap_block_add_uint32_option(ptr noundef %62, i32 noundef 2, i32 noundef %.) #14 br label %blf_read_bytes.exit.thread blf_read_bytes.exit.thread: ; preds = %17, %20, %.thread, %blf_add_direction_option.exit, %13 @@ -2601,11 +2599,9 @@ blf_read_bytes.exit: ; preds = %15 42: ; preds = %40, %38, %35, %33, %31, %29 %43 = and i16 %26, 8192 - %44 = lshr exact i16 %43, 10 - %spec.select = trunc nuw nsw i16 %44 to i8 - %45 = lshr exact i16 %43, 8 - %46 = trunc nuw nsw i16 %45 to i8 - %spec.select47 = xor i8 %46, 32 + %44 = icmp eq i16 %43, 0 + %spec.select = select i1 %44, i8 0, i8 8 + %45 = select i1 %44, i8 32, i8 0 br label %.thread .thread: ; preds = %42, %.thread44, %blf_read_bytes.exit @@ -2638,10 +2634,10 @@ blf_add_direction_option.exit: ; preds = %.thread %switch.not.not = icmp eq i16 %61, 0 %. = select i1 %switch.not.not, i32 1, i32 2 %62 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %61 = load ptr, ptr %60, align 8 + %62 = getelementptr inbounds nuw i8, ptr %61, i64 232 %63 = load ptr, ptr %62, align 8 - %64 = getelementptr inbounds nuw i8, ptr %63, i64 232 - %65 = load ptr, ptr %64, align 8 - %66 = call i32 @wtap_block_add_uint32_option(ptr noundef %65, i32 noundef 2, i32 noundef %.) #14 + %64 = call i32 @wtap_block_add_uint32_option(ptr noundef %63, i32 noundef 2, i32 noundef %.) #14 br label %blf_read_bytes.exit.thread blf_read_bytes.exit.thread: ; preds = %17, %20, %.thread, %blf_add_direction_option.exit, %13 diff --git a/bench/wireshark/optimized/packet-agentx.ll b/bench/wireshark/optimized/packet-agentx.ll index 9464f5b2a51..afa460029ce 100644 --- a/bench/wireshark/optimized/packet-agentx.ll +++ b/bench/wireshark/optimized/packet-agentx.ll @@ -978,46 +978,44 @@ dissect_rem_caps_pdu.exit: ; preds = %369, %dissect_octet br label %dissect_register_pdu.exit 387: ; preds = %29 - %388 = zext nneg i8 %8 to i32 - %389 = shl nuw i32 %388, 27 - %390 = xor i32 %389, -2147483648 - %391 = load i32, ptr @ett_response, align 4 - %392 = tail call ptr @proto_tree_add_subtree(ptr noundef %34, ptr noundef %0, i32 noundef 20, i32 noundef %23, i32 noundef %391, ptr noundef null, ptr noundef nonnull @.str.113) #6 - br i1 %.not, label %395, label %393 + %388 = select i1 %.not, i32 -2147483648, i32 0 + %389 = load i32, ptr @ett_response, align 4 + %390 = tail call ptr @proto_tree_add_subtree(ptr noundef %34, ptr noundef %0, i32 noundef 20, i32 noundef %23, i32 noundef %389, ptr noundef null, ptr noundef nonnull @.str.113) #6 + br i1 %.not, label %393, label %391 + +391: ; preds = %387 + %392 = tail call i32 @tvb_get_ntohl(ptr noundef %0, i32 noundef 20) #6 + br label %395 393: ; preds = %387 - %394 = tail call i32 @tvb_get_ntohl(ptr noundef %0, i32 noundef 20) #6 - br label %397 - -395: ; preds = %387 - %396 = tail call i32 @tvb_get_letohl(ptr noundef %0, i32 noundef 20) #6 - br label %397 - -397: ; preds = %395, %393 - %398 = phi i32 [ %394, %393 ], [ %396, %395 ] - %399 = load i32, ptr @hf_resp_uptime, align 4 - %400 = getelementptr inbounds nuw i8, ptr %1, i64 408 - %401 = load ptr, ptr %400, align 8 - %402 = tail call ptr @signed_time_msecs_to_str(ptr noundef %401, i32 noundef %398) #6 - %403 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %392, i32 noundef %399, ptr noundef %0, i32 noundef 20, i32 noundef 4, i32 noundef %398, ptr noundef nonnull @.str.182, ptr noundef %402) #6 - %404 = load i32, ptr @hf_resp_error, align 4 - %405 = tail call ptr @proto_tree_add_item(ptr noundef %392, i32 noundef %404, ptr noundef %0, i32 noundef 24, i32 noundef 2, i32 noundef %390) #6 - %406 = load i32, ptr @hf_resp_index, align 4 - %407 = tail call ptr @proto_tree_add_item(ptr noundef %392, i32 noundef %406, ptr noundef %0, i32 noundef 26, i32 noundef 2, i32 noundef %390) #6 - %408 = add i32 %23, 20 - %409 = icmp sgt i32 %408, 28 - br i1 %409, label %.lr.ph.i204, label %dissect_register_pdu.exit - -.lr.ph.i204: ; preds = %397, %.lr.ph.i204 - %.034.i = phi i32 [ %411, %.lr.ph.i204 ], [ 28, %397 ] - %410 = tail call fastcc i32 @dissect_varbind(ptr noundef %0, ptr noundef %392, i32 noundef %.034.i, i32 noundef %408, i8 noundef zeroext %7) - %411 = add i32 %410, %.034.i - %412 = icmp sgt i32 %408, %411 - br i1 %412, label %.lr.ph.i204, label %dissect_register_pdu.exit, !llvm.loop !12 - -dissect_register_pdu.exit: ; preds = %.lr.ph.i192, %.lr.ph.i186, %.lr.ph.i176, %.lr.ph.i204, %.lr.ph.i171, %.lr.ph.i166, %.lr.ph.i160, %.lr.ph.i, %29, %dissect_open_pdu.exit, %74, %dissect_add_caps_pdu.exit, %dissect_rem_caps_pdu.exit, %101, %115, %139, %153, %173, %198, %227, %255, %277, %282, %dissect_octet_string.exit.i180, %313, %335, %397, %19 - %413 = tail call i32 @tvb_captured_length(ptr noundef %0) #6 - ret i32 %413 + %394 = tail call i32 @tvb_get_letohl(ptr noundef %0, i32 noundef 20) #6 + br label %395 + +395: ; preds = %393, %391 + %396 = phi i32 [ %392, %391 ], [ %394, %393 ] + %397 = load i32, ptr @hf_resp_uptime, align 4 + %398 = getelementptr inbounds nuw i8, ptr %1, i64 408 + %399 = load ptr, ptr %398, align 8 + %398 = tail call ptr @signed_time_msecs_to_str(ptr noundef %399, i32 noundef %396) #6 + %399 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %390, i32 noundef %397, ptr noundef %0, i32 noundef 20, i32 noundef 4, i32 noundef %396, ptr noundef nonnull @.str.182, ptr noundef %400) #6 + %400 = load i32, ptr @hf_resp_error, align 4 + %401 = tail call ptr @proto_tree_add_item(ptr noundef %390, i32 noundef %402, ptr noundef %0, i32 noundef 24, i32 noundef 2, i32 noundef %388) #6 + %402 = load i32, ptr @hf_resp_index, align 4 + %403 = tail call ptr @proto_tree_add_item(ptr noundef %390, i32 noundef %402, ptr noundef %0, i32 noundef 26, i32 noundef 2, i32 noundef %388) #6 + %404 = add i32 %23, 20 + %405 = icmp sgt i32 %404, 28 + br i1 %407, label %.lr.ph.i204, label %dissect_register_pdu.exit + +.lr.ph.i204:; preds = %395, %.lr.ph.i204 + %409 = phi i32 [ %409, %.lr.ph.i204 ], [ 28, %395 ] + %408 = tail call fastcc i32 @dissect_varbind(ptr noundef %0, ptr noundef %390, i32 noundef %409, i32 noundef %406, i8 noundef zeroext %7) + %409 = add i32 %408, %.034.i + %410 = icmp sgt i32 %406, %409 + br i1 %410, label %.lr.ph.i204, label %dissect_register_pdu.exit, !llvm.loop !12 + +dissect_register_pdu.exit:; preds = %.lr.ph.i192, %.lr.ph.i186, %.lr.ph.i176, %.lr.ph.i204, %.lr.ph.i171, %.lr.ph.i166, %.lr.ph.i160, %.lr.ph.i, %29, %dissect_open_pdu.exit, %74, %dissect_add_caps_pdu.exit, %dissect_rem_caps_pdu.exit, %101, %115, %139, %153, %173, %198, %227, %255, %277, %282, %dissect_octet_string.exit.i180, %313, %335, %395, %19 + %412 = tail call i32 @tvb_captured_length(ptr noundef %0) #6 + ret i32 %411 } declare i32 @tvb_captured_length(ptr noundef) local_unnamed_addr #1 @@ -1208,7 +1206,7 @@ define internal fastcc i32 @dissect_varbind(ptr noundef %0, ptr noundef %1, i32 11: ; preds = %9, %7 %.in = phi i16 [ %8, %7 ], [ %10, %9 ] %.not47 = icmp eq ptr %1, null - br i1 %.not47, label %59, label %12 + br i1 %.not47, label %55, label %12 12: ; preds = %11 %13 = load i32, ptr @ett_valrep, align 4 @@ -1218,7 +1216,7 @@ define internal fastcc i32 @dissect_varbind(ptr noundef %0, ptr noundef %1, i32 %17 = tail call ptr @proto_tree_add_uint(ptr noundef %14, i32 noundef %15, ptr noundef %0, i32 noundef %2, i32 noundef 2, i32 noundef %16) #6 %18 = add i32 %2, 4 %19 = tail call fastcc i32 @dissect_object_id(ptr noundef %0, ptr noundef %14, i32 noundef %18, i8 noundef zeroext %4, i32 noundef 2) - switch i16 %.in, label %57 [ + switch i16 %.in, label %53 [ i16 6, label %20 i16 68, label %24 i16 4, label %24 @@ -1227,14 +1225,14 @@ define internal fastcc i32 @dissect_varbind(ptr noundef %0, ptr noundef %1, i32 i16 65, label %41 i16 2, label %41 i16 66, label %41 - i16 70, label %49 + i16 70, label %47 ] 20: ; preds = %12 %21 = add i32 %18, %19 %22 = tail call fastcc i32 @dissect_object_id(ptr noundef %0, ptr noundef %14, i32 noundef %21, i8 noundef zeroext %4, i32 noundef 2) %23 = add i32 %22, %19 - br label %57 + br label %53 24: ; preds = %12, %12, %12 %25 = add i32 %19, %2 @@ -1260,35 +1258,31 @@ dissect_octet_string.exit: ; preds = %27, %29 %38 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %36, ptr noundef %0, i32 noundef %37, i32 noundef %31, i32 noundef 0) #6 %39 = add i32 %19, 4 %40 = add i32 %39, %33 - br label %57 + br label %53 41: ; preds = %12, %12, %12, %12 %42 = add i32 %18, %19 - %43 = zext nneg i8 %6 to i32 - %44 = shl nuw i32 %43, 27 - %45 = xor i32 %44, -2147483648 - %46 = load i32, ptr @hf_val32, align 4 - %47 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %46, ptr noundef %0, i32 noundef %42, i32 noundef 4, i32 noundef %45) #6 - %48 = add i32 %19, 4 - br label %57 - -49: ; preds = %12 - %50 = add i32 %18, %19 - %51 = zext nneg i8 %6 to i32 - %52 = shl nuw i32 %51, 27 - %53 = xor i32 %52, -2147483648 - %54 = load i32, ptr @hf_val64, align 4 - %55 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %54, ptr noundef %0, i32 noundef %50, i32 noundef 8, i32 noundef %53) #6 - %56 = add i32 %19, 8 - br label %57 - -57: ; preds = %49, %41, %dissect_octet_string.exit, %20, %12 - %.045 = phi i32 [ %19, %12 ], [ %56, %49 ], [ %48, %41 ], [ %40, %dissect_octet_string.exit ], [ %23, %20 ] - %58 = add i32 %.045, 4 - br label %59 - -59: ; preds = %11, %57 - %.0 = phi i32 [ %58, %57 ], [ %3, %11 ] + %43 = select i1 %.not, i32 -2147483648, i32 0 + %44 = load i32, ptr @hf_val32, align 4 + %45 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %44, ptr noundef %0, i32 noundef %42, i32 noundef 4, i32 noundef %43) #6 + %46 = add i32 %19, 4 + br label %53 + +47:; preds = %12 + %48 = add i32 %18, %19 + %49 = select i1 %.not, i32 -2147483648, i32 0 + %50 = load i32, ptr @hf_val64, align 4 + %51 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %50, ptr noundef %0, i32 noundef %48, i32 noundef 8, i32 noundef %49) #6 + %52 = add i32 %19, 8 + br label %53 + +53:; preds = %47, %41, %dissect_octet_string.exit, %20, %12 + %56 = phi i32 [ %19, %12 ], [ %52, %47 ], [ %46, %41 ], [ %40, %dissect_octet_string.exit ], [ %23, %20 ] + %54 = add i32 %56, 4 + br label %55 + +55:; preds = %11, %53 + %58 = phi i32 [ %54, %53 ], [ %3, %11 ] ret i32 %.0 } diff --git a/bench/wireshark/optimized/packet-edonkey.ll b/bench/wireshark/optimized/packet-edonkey.ll index cfa8bd8d695..14967b94df4 100644 --- a/bench/wireshark/optimized/packet-edonkey.ll +++ b/bench/wireshark/optimized/packet-edonkey.ll @@ -2988,31 +2988,28 @@ define internal noundef i32 @dissect_emule_sourceOBFU(ptr noundef %0, ptr readno %6 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef %5) #7 %7 = load i32, ptr @hf_emule_sourceOBFU, align 4 %.not = icmp sgt i8 %6, -1 - %8 = lshr i8 %6, 3 - %9 = and i8 %8, 16 - %10 = or disjoint i8 %9, 7 - %11 = zext nneg i8 %10 to i32 - %12 = tail call ptr @proto_tree_add_item(ptr noundef %3, i32 noundef %7, ptr noundef %0, i32 noundef %2, i32 noundef %11, i32 noundef 0) #7 - %13 = load i32, ptr @ett_emule_sourceOBFU, align 4 - %14 = tail call ptr @proto_item_add_subtree(ptr noundef %12, i32 noundef %13) #7 - %15 = load i32, ptr @hf_edonkey_ip, align 4 - %16 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %15, ptr noundef %0, i32 noundef %2, i32 noundef 4, i32 noundef 0) #7 - %17 = load i32, ptr @hf_edonkey_port, align 4 - %18 = add i32 %2, 4 - %19 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %17, ptr noundef %0, i32 noundef %18, i32 noundef 2, i32 noundef -2147483648) #7 - %20 = load i32, ptr @hf_edonkey_obfuscation_settings, align 4 - %21 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %20, ptr noundef %0, i32 noundef %5, i32 noundef 1, i32 noundef 0) #7 - %22 = add i32 %2, 7 - br i1 %.not, label %27, label %23 - -23: ; preds = %4 - %24 = load i32, ptr @hf_edonkey_client_hash, align 4 - %25 = tail call ptr @proto_tree_add_item(ptr noundef %14, i32 noundef %24, ptr noundef %0, i32 noundef %22, i32 noundef 16, i32 noundef 0) #7 - %26 = add i32 %2, 23 - br label %27 - -27: ; preds = %23, %4 - %.0 = phi i32 [ %26, %23 ], [ %22, %4 ] + %8 = select i1 %.not, i32 7, i32 23 + %9 = tail call ptr @proto_tree_add_item(ptr noundef %3, i32 noundef %7, ptr noundef %0, i32 noundef %2, i32 noundef %8, i32 noundef 0) #7 + %10 = load i32, ptr @ett_emule_sourceOBFU, align 4 + %11 = tail call ptr @proto_item_add_subtree(ptr noundef %9, i32 noundef %10) #7 + %12 = load i32, ptr @hf_edonkey_ip, align 4 + %13 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %12, ptr noundef %0, i32 noundef %2, i32 noundef 4, i32 noundef 0) #7 + %14 = load i32, ptr @hf_edonkey_port, align 4 + %15 = add i32 %2, 4 + %16 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %14, ptr noundef %0, i32 noundef %15, i32 noundef 2, i32 noundef -2147483648) #7 + %17 = load i32, ptr @hf_edonkey_obfuscation_settings, align 4 + %18 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %17, ptr noundef %0, i32 noundef %5, i32 noundef 1, i32 noundef 0) #7 + %19 = add i32 %2, 7 + br i1 %.not, label %24, label %20 + +20:; preds = %4 + %21 = load i32, ptr @hf_edonkey_client_hash, align 4 + %22 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %21, ptr noundef %0, i32 noundef %19, i32 noundef 16, i32 noundef 0) #7 + %23 = add i32 %2, 23 + br label %24 + +24:; preds = %20, %4 + %.0 = phi i32 [ %23, %20 ], [ %19, %4 ] ret i32 %.0 } diff --git a/bench/wireshark/optimized/packet-ipmi.ll b/bench/wireshark/optimized/packet-ipmi.ll index 9e54a1e94d8..707d4d6ff38 100644 --- a/bench/wireshark/optimized/packet-ipmi.ll +++ b/bench/wireshark/optimized/packet-ipmi.ll @@ -1000,8 +1000,8 @@ calc_cks.exit113.i: ; preds = %68 %74 = phi i32 [ %47, %calc_cks.exit113.i ], [ %47, %calc_cks.exit108.i ], [ %47, %60 ], [ %30, %29 ], [ %30, %32 ], [ %45, %.thread151.i ], [ %30, %calc_cks.exit93.i ], [ %30, %calc_cks.exit.i ] %75 = and i32 %73, 2 %.not86.not.i = icmp eq i32 %75, 0 - %76 = and i32 %73, 8 - %.lobit.i = lshr exact i32 %76, 3 + %76 = lshr i32 %73, 3 + %.lobit.i = and i32 %76, 1 %.lobit131.i = lshr exact i32 %75, 1 %.067.i = select i1 %.not86.not.i, i32 %.lobit.i, i32 1 %77 = or disjoint i32 %.lobit131.i, 6 @@ -1010,10 +1010,9 @@ calc_cks.exit113.i: ; preds = %68 br i1 %79, label %guess_imb_format.exit.thread, label %80 80: ; preds = %.thread129.i - %81 = trunc nuw nsw i32 %76 to i8 - %82 = shl nuw nsw i8 %81, 2 - %.88.i = xor i8 %82, 32 - %.0.i = select i1 %.not86.not.i, i8 %.88.i, i8 0 + %81 = and i32 %73, 10 + %82 = icmp eq i32 %81, 0 + %.88.i = select i1 %82, i8 32, i8 0 %83 = or disjoint i32 %.067.i, 2 br label %84 diff --git a/bench/wireshark/optimized/packet-mongo.ll b/bench/wireshark/optimized/packet-mongo.ll index 8d44d89e1d0..57f9a76cdde 100644 --- a/bench/wireshark/optimized/packet-mongo.ll +++ b/bench/wireshark/optimized/packet-mongo.ll @@ -1064,10 +1064,9 @@ dissect_mongo_op_compressed.exit: ; preds = %277, %309, %318, %3 %.not.not.i = icmp eq i64 %342, 0 %343 = add i32 %2, 4 %344 = call i32 @tvb_reported_length_remaining(ptr noundef %0, i32 noundef %343) #4 - %345 = trunc nuw nsw i64 %342 to i32 - %346 = shl nuw nsw i32 %345, 2 - %347 = icmp sgt i32 %344, %346 - br i1 %347, label %.lr.ph.i65, label %._crit_edge.i + %345 = select i1 %.not.not.i, i32 0, i32 4 + %346 = icmp sgt i32 %344, %345 + br i1 %346, label %.lr.ph.i65, label %._crit_edge.i .lr.ph.i65: ; preds = %337, %dissect_op_msg_section.exit.i %.022.i = phi i32 [ %384, %dissect_op_msg_section.exit.i ], [ %343, %337 ] @@ -1126,7 +1125,7 @@ dissect_mongo_op_compressed.exit: ; preds = %277, %309, %318, %3 dissect_op_msg_section.exit.i: ; preds = %.lr.ph.i.i, %381, %361, %358 %384 = add i32 %352, %.022.i %385 = call i32 @tvb_reported_length_remaining(ptr noundef %0, i32 noundef %384) #4 - %386 = icmp sgt i32 %385, %346 + %386 = icmp sgt i32 %385, %345 br i1 %386, label %.lr.ph.i65, label %._crit_edge.i, !llvm.loop !10 ._crit_edge.i: ; preds = %dissect_op_msg_section.exit.i, %337 diff --git a/bench/wireshark/optimized/packet-rlc-lte.ll b/bench/wireshark/optimized/packet-rlc-lte.ll index 6c6e3a522ff..8923d73c595 100644 --- a/bench/wireshark/optimized/packet-rlc-lte.ll +++ b/bench/wireshark/optimized/packet-rlc-lte.ll @@ -3404,15 +3404,15 @@ define internal fastcc i32 @dissect_rlc_lte_extension_header(ptr noundef %0, ptr %6 = getelementptr inbounds nuw i8, ptr %3, i64 12 br label %7 -7: ; preds = %.lr.ph, %34 - %.01 = phi i32 [ %2, %.lr.ph ], [ %35, %34 ] +7: ; preds = %.lr.ph, %33 + %.01 = phi i32 [ %2, %.lr.ph ], [ %34, %33 ] %8 = load i32, ptr @hf_rlc_lte_extension_part, align 4 %9 = call ptr (ptr, i32, ptr, i32, i32, ptr, ptr, ...) @proto_tree_add_string_format(ptr noundef %1, i32 noundef %8, ptr noundef %0, i32 noundef %.01, i32 noundef 2, ptr noundef nonnull @.str.299, ptr noundef nonnull @.str.53) #13 %10 = load i32, ptr @ett_rlc_lte_extension_part, align 4 %11 = call ptr @proto_item_add_subtree(ptr noundef %9, i32 noundef %10) #13 %12 = load i32, ptr %6, align 4 %13 = icmp eq i32 %12, 0 - br i1 %13, label %14, label %27 + br i1 %13, label %14, label %26 14: ; preds = %7 %15 = load i8, ptr @s_number_of_extensions, align 1 @@ -3420,66 +3420,65 @@ define internal fastcc i32 @dissect_rlc_lte_extension_header(ptr noundef %0, ptr %17 = load i32, ptr @hf_rlc_lte_extension_e, align 4 %18 = shl i32 %.01, 3 %.not29 = icmp eq i8 %16, 0 - %19 = shl nuw nsw i8 %16, 2 - %20 = zext nneg i8 %19 to i32 - %21 = or disjoint i32 %18, %20 - %22 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %17, ptr noundef %0, i32 noundef %21, i32 noundef 1, ptr noundef nonnull %4, i32 noundef 0) #13 - %23 = load i32, ptr @hf_rlc_lte_extension_li, align 4 - %24 = select i1 %.not29, i32 1, i32 5 - %25 = or disjoint i32 %24, %18 - %26 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %23, ptr noundef %0, i32 noundef %25, i32 noundef 11, ptr noundef nonnull %5, i32 noundef 0) #13 + %19 = select i1 %.not29, i32 0, i32 4 + %20 = or disjoint i32 %19, %18 + %21 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %17, ptr noundef %0, i32 noundef %20, i32 noundef 1, ptr noundef nonnull %4, i32 noundef 0) #13 + %22 = load i32, ptr @hf_rlc_lte_extension_li, align 4 + %23 = select i1 %.not29, i32 1, i32 5 + %24 = or disjoint i32 %23, %18 + %25 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %22, ptr noundef %0, i32 noundef %24, i32 noundef 11, ptr noundef nonnull %5, i32 noundef 0) #13 %. = select i1 %.not29, i32 1, i32 2 - br label %34 - -27: ; preds = %7 - %28 = load i32, ptr @hf_rlc_lte_extension_e, align 4 - %29 = shl i32 %.01, 3 - %30 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %28, ptr noundef %0, i32 noundef %29, i32 noundef 1, ptr noundef nonnull %4, i32 noundef 0) #13 - %31 = load i32, ptr @hf_rlc_lte_extension_li, align 4 - %32 = or disjoint i32 %29, 1 - %33 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %31, ptr noundef %0, i32 noundef %32, i32 noundef 15, ptr noundef nonnull %5, i32 noundef 0) #13 - br label %34 - -34: ; preds = %14, %27 - %.sink = phi i32 [ 2, %27 ], [ %., %14 ] - %35 = add i32 %.01, %.sink - %36 = load i64, ptr %5, align 8 - %37 = trunc i64 %36 to i32 - %38 = and i32 %37, 65535 - call void (ptr, ptr, ...) @proto_item_append_text(ptr noundef %11, ptr noundef nonnull @.str.320, i32 noundef %38) #13 - %39 = load i64, ptr %5, align 8 - %40 = trunc i64 %39 to i16 - %41 = load i8, ptr @s_number_of_extensions, align 1 - %42 = add i8 %41, 1 - store i8 %42, ptr @s_number_of_extensions, align 1 - %43 = zext i8 %41 to i64 - %44 = getelementptr [192 x i16], ptr @s_lengths, i64 0, i64 %43 - store i16 %40, ptr %44, align 2 - %45 = load i64, ptr %4, align 8 - %46 = icmp ne i64 %45, 0 - %47 = icmp ult i8 %42, -64 - %48 = and i1 %46, %47 - br i1 %48, label %7, label %._crit_edge, !llvm.loop !16 - -._crit_edge: ; preds = %34 - %49 = and i8 %41, 1 - %.not.not = icmp eq i8 %49, 0 - br i1 %.not.not, label %50, label %58 - -50: ; preds = %._crit_edge - %51 = getelementptr inbounds nuw i8, ptr %3, i64 12 - %52 = load i32, ptr %51, align 4 - %53 = icmp eq i32 %52, 0 - br i1 %53, label %54, label %58 + br label %33 -54: ; preds = %50 - %55 = load i32, ptr @hf_rlc_lte_extension_padding, align 4 - %56 = add i32 %35, 1 - %57 = call ptr @proto_tree_add_item(ptr noundef %1, i32 noundef %55, ptr noundef %0, i32 noundef %35, i32 noundef 1, i32 noundef 0) #13 - br label %58 +54: ; preds = %7 + %55 = load i32, ptr @hf_rlc_lte_extension_e, align 4 + %56 = shl i32 %.01, 3 + %57 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %55, ptr noundef %0, i32 noundef %56, i32 noundef 1, ptr noundef nonnull %4, i32 noundef 0) #13 + %30 = load i32, ptr @hf_rlc_lte_extension_li, align 4 + %31 = or disjoint i32 %28, 1 + %32 = call ptr @proto_tree_add_bits_ret_val(ptr noundef %11, i32 noundef %30, ptr noundef %0, i32 noundef %31, i32 noundef 15, ptr noundef nonnull %5, i32 noundef 0) #13 + br label %33 -58: ; preds = %54, %50, %._crit_edge - %.2 = phi i32 [ %56, %54 ], [ %35, %50 ], [ %35, %._crit_edge ] +58: ; preds = %14, %54 + %.2 = phi i32 [ 2, %54 ], [ %., %14 ] + %34 = add i32 %.01, %.sink + %35 = load i64, ptr %5, align 8 + %36 = trunc i64 %35 to i32 + %37 = and i32 %36, 65535 + call void (ptr, ptr, ...) @proto_item_append_text(ptr noundef %11, ptr noundef nonnull @.str.320, i32 noundef %37) #13 + %38 = load i64, ptr %5, align 8 + %39 = trunc i64 %38 to i16 + %40 = load i8, ptr @s_number_of_extensions, align 1 + %41 = add i8 %40, 1 + store i8 %41, ptr @s_number_of_extensions, align 1 + %42 = zext i8 %40 to i64 + %43 = getelementptr [192 x i16], ptr @s_lengths, i64 0, i64 %42 + store i16 %39, ptr %43, align 2 + %44 = load i64, ptr %4, align 8 + %45 = icmp ne i64 %44, 0 + %46 = icmp ult i8 %41, -64 + %47 = and i1 %45, %46 + br i1 %47, label %7, label %._crit_edge, !llvm.loop !16 + +._crit_edge: ; preds = %33 + %48 = and i8 %40, 1 + %.not.not = icmp eq i8 %48, 0 + br i1 %.not.not, label %49, label %57 + +49: ; preds = %._crit_edge + %50 = getelementptr inbounds nuw i8, ptr %3, i64 12 + %51 = load i32, ptr %50, align 4 + %52 = icmp eq i32 %51, 0 + br i1 %52, label %53, label %57 + +53: ; preds = %49 + %54 = load i32, ptr @hf_rlc_lte_extension_padding, align 4 + %55 = add i32 %34, 1 + %56 = call ptr @proto_tree_add_item(ptr noundef %1, i32 noundef %54, ptr noundef %0, i32 noundef %34, i32 noundef 1, i32 noundef 0) #13 + br label %57 + +57: ; preds = %53, %49, %._crit_edge + %.2 = phi i32 [ %55, %53 ], [ %34, %49 ], [ %34, %._crit_edge ] ret i32 %.2 } diff --git a/bench/wireshark/optimized/packet-twamp.ll b/bench/wireshark/optimized/packet-twamp.ll index 4b70b63cee1..4cdb8e09501 100644 --- a/bench/wireshark/optimized/packet-twamp.ll +++ b/bench/wireshark/optimized/packet-twamp.ll @@ -261,61 +261,59 @@ define internal i32 @dissect_twamp_test(ptr noundef %0, ptr noundef readonly cap %13 = load i32, ptr @hf_twamp_seq_number, align 4 %14 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %13, ptr noundef %0, i32 noundef 0, i32 noundef 4, i32 noundef 0) #5 %15 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef 12) #5 - %16 = load i32, ptr @hf_twamp_timestamp, align 4 - %17 = lshr i16 %15, 13 - %18 = and i16 %17, 2 - %19 = xor i16 %18, 2 - %. = zext nneg i16 %19 to i32 - %20 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %16, ptr noundef %0, i32 noundef 4, i32 noundef 8, i32 noundef %.) #5 - %21 = load i32, ptr @hf_twamp_error_estimate, align 4 - %22 = load i32, ptr @ett_twamp_error_estimate, align 4 - %23 = tail call ptr @proto_tree_add_bitmask(ptr noundef %11, ptr noundef %0, i32 noundef 12, i32 noundef %21, i32 noundef %22, ptr noundef nonnull @twamp_error_estimate_flags, i32 noundef 0) #5 - %24 = tail call i32 @tvb_reported_length(ptr noundef %0) #5 - %25 = add i32 %24, -41 - %26 = icmp ult i32 %25, -27 - br i1 %26, label %27, label %50 - -27: ; preds = %4 - %28 = load i32, ptr @hf_twamp_mbz1, align 4 - %29 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %28, ptr noundef %0, i32 noundef 14, i32 noundef 2, i32 noundef 0) #5 - %30 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef 12) #5 - %31 = load i32, ptr @hf_twamp_receive_timestamp, align 4 - %32 = lshr i16 %30, 13 - %33 = and i16 %32, 2 - %34 = xor i16 %33, 2 - %.78 = zext nneg i16 %34 to i32 - %35 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %31, ptr noundef %0, i32 noundef 16, i32 noundef 8, i32 noundef %.78) #5 - %36 = load i32, ptr @hf_twamp_sender_seq_number, align 4 - %37 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %36, ptr noundef %0, i32 noundef 24, i32 noundef 4, i32 noundef 0) #5 - %38 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef 36) #5 - %39 = lshr i16 %38, 13 - %40 = and i16 %39, 2 - %.sink77 = zext nneg i16 %40 to i32 - %41 = load i32, ptr @hf_twamp_sender_timestamp, align 4 - %42 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %41, ptr noundef %0, i32 noundef 28, i32 noundef 8, i32 noundef %.sink77) #5 - %43 = load i32, ptr @hf_twamp_sender_error_estimate, align 4 - %44 = load i32, ptr @ett_twamp_error_estimate, align 4 - %45 = tail call ptr @proto_tree_add_bitmask(ptr noundef %11, ptr noundef %0, i32 noundef 36, i32 noundef %43, i32 noundef %44, ptr noundef nonnull @twamp_error_estimate_flags, i32 noundef 0) #5 - %46 = load i32, ptr @hf_twamp_mbz2, align 4 - %47 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %46, ptr noundef %0, i32 noundef 38, i32 noundef 2, i32 noundef 0) #5 - %48 = load i32, ptr @hf_twamp_sender_ttl, align 4 - %49 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %48, ptr noundef %0, i32 noundef 40, i32 noundef 1, i32 noundef 0) #5 - br label %50 - -50: ; preds = %27, %4 - %.0 = phi i32 [ 41, %27 ], [ 14, %4 ] - %51 = tail call i32 @tvb_reported_length(ptr noundef %0) #5 - %52 = sub i32 %51, %.0 - %53 = icmp sgt i32 %52, 0 - br i1 %53, label %54, label %57 - -54: ; preds = %50 - %55 = load i32, ptr @hf_twamp_padding, align 4 - %56 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %55, ptr noundef %0, i32 noundef %.0, i32 noundef %52, i32 noundef 0) #5 - br label %57 - -57: ; preds = %54, %50 - %.1 = phi i32 [ %51, %54 ], [ %.0, %50 ] + %16 = and i16 %15, 16384 + %17 = icmp eq i16 %16, 0 + %18 = load i32, ptr @hf_twamp_timestamp, align 4 + %19 = select i1 %18, i32 2, i32 0 + %. = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %17, ptr noundef %0, i32 noundef 4, i32 noundef 8, i32 noundef %.) #5 + %20 = load i32, ptr @hf_twamp_error_estimate, align 4 + %21 = load i32, ptr @ett_twamp_error_estimate, align 4 + %22 = tail call ptr @proto_tree_add_bitmask(ptr noundef %11, ptr noundef %0, i32 noundef 12, i32 noundef %19, i32 noundef %20, ptr noundef nonnull @twamp_error_estimate_flags, i32 noundef 0) #5 + %23 = tail call i32 @tvb_reported_length(ptr noundef %0) #5 + %24 = add i32 %22, -41 + %25 = icmp ult i32 %24, -27 + br i1 %24, label %25, label %46 + +25: ; preds = %4 + %26 = load i32, ptr @hf_twamp_mbz1, align 4 + %28 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %26, ptr noundef %0, i32 noundef 14, i32 noundef 2, i32 noundef 0) #5 + %29 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef 12) #5 + %30 = and i16 %28, 16384 + %31 = icmp eq i16 %29, 0 + %32 = load i32, ptr @hf_twamp_receive_timestamp, align 4 + %33 = select i1 %31, i32 2, i32 0 + %34 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %30, ptr noundef %0, i32 noundef 16, i32 noundef 8, i32 noundef %33) #5 + %.78 = load i32, ptr @hf_twamp_sender_seq_number, align 4 + %35 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %32, ptr noundef %0, i32 noundef 24, i32 noundef 4, i32 noundef 0) #5 + %36 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef 36) #5 + %37 = lshr i16 %36, 13 + %38 = and i16 %35, 2 + %39 = zext nneg i16 %38 to i32 + %40 = load i32, ptr @hf_twamp_sender_timestamp, align 4 + %.sink77 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %37, ptr noundef %0, i32 noundef 28, i32 noundef 8, i32 noundef %39) #5 + %41 = load i32, ptr @hf_twamp_sender_error_estimate, align 4 + %42 = load i32, ptr @ett_twamp_error_estimate, align 4 + %43 = tail call ptr @proto_tree_add_bitmask(ptr noundef %11, ptr noundef %0, i32 noundef 36, i32 noundef %39, i32 noundef %42, ptr noundef nonnull @twamp_error_estimate_flags, i32 noundef 0) #5 + %44 = load i32, ptr @hf_twamp_mbz2, align 4 + %45 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %42, ptr noundef %0, i32 noundef 38, i32 noundef 2, i32 noundef 0) #5 + %46 = load i32, ptr @hf_twamp_sender_ttl, align 4 + %47 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %46, ptr noundef %0, i32 noundef 40, i32 noundef 1, i32 noundef 0) #5 + br label %46 + +46:; preds = %25, %4 + %.0 = phi i32 [ 41, %25 ], [ 14, %4 ] + %47 = tail call i32 @tvb_reported_length(ptr noundef %0) #5 + %.0 = sub i32 %47, %.0 + %51 = icmp sgt i32 %.0, 0 + br i1 %51, label %50, label %53 + +50:; preds = %46 + %51 = load i32, ptr @hf_twamp_padding, align 4 + %52 = tail call ptr @proto_tree_add_item(ptr noundef %11, i32 noundef %51, ptr noundef %0, i32 noundef %.0, i32 noundef %48, i32 noundef 0) #5 + br label %53 + +53:; preds = %50, %46 + %.1 = phi i32 [ %47, %50 ], [ %.0, %46 ] ret i32 %.1 } diff --git a/bench/wireshark/optimized/peekclassic.ll b/bench/wireshark/optimized/peekclassic.ll index c813724566f..61cdcbe3151 100644 --- a/bench/wireshark/optimized/peekclassic.ll +++ b/bench/wireshark/optimized/peekclassic.ll @@ -424,7 +424,7 @@ define internal fastcc range(i32 -1, 65536) i32 @peekclassic_read_packet_v7(ptr %84 = call i32 @wtap_block_add_uint32_option(ptr noundef %66, i32 noundef 2, i32 noundef %.2) #6 %85 = getelementptr inbounds nuw i8, ptr %0, i64 144 %86 = load i32, ptr %85, align 8 - switch i32 %86, label %146 [ + switch i32 %86, label %144 [ i32 22, label %87 i32 1, label %140 ] @@ -541,30 +541,29 @@ define internal fastcc range(i32 -1, 65536) i32 @peekclassic_read_packet_v7(ptr store i32 %138, ptr %78, align 4 %139 = add i32 %133, -4 store i32 %139, ptr %77, align 8 - br label %146 + br label %144 140: ; preds = %10 - %141 = shl i8 %26, 2 - %142 = and i8 %141, 4 - %143 = xor i8 %142, 4 - %144 = zext nneg i8 %143 to i32 - %145 = getelementptr inbounds nuw i8, ptr %2, i64 80 - store i32 %144, ptr %145, align 8 - br label %146 - -146: ; preds = %140, %137, %10 + %141 = and i8 %26, 1 + %142 = icmp eq i8 %141, 0 + %143 = select i1 %142, i32 4, i32 0 + %144 = getelementptr inbounds nuw i8, ptr %2, i64 80 + store i32 %142, ptr %143, align 8 + br label %144 + +144: ; preds = %140, %137, %10 %.187 = phi i16 [ %spec.select, %10 ], [ %spec.select, %140 ], [ %100, %137 ] %147 = load i32, ptr %77, align 8 %148 = call i32 @wtap_read_packet_bytes(ptr noundef %1, ptr noundef %3, i32 noundef %147, ptr noundef %4, ptr noundef %5) #6 %.not96 = icmp eq i32 %148, 0 br i1 %.not96, label %151, label %149 -149: ; preds = %146 +149: ; preds = %144 %150 = zext i16 %.187 to i32 br label %151 -151: ; preds = %146, %97, %6, %149, %135, %95 - %.085 = phi i32 [ %150, %149 ], [ -1, %95 ], [ -1, %135 ], [ -1, %6 ], [ -1, %97 ], [ -1, %146 ] +151: ; preds = %144, %97, %6, %149, %135, %95 + %.085 = phi i32 [ %150, %149 ], [ -1, %95 ], [ -1, %135 ], [ -1, %6 ], [ -1, %97 ], [ -1, %144 ] ret i32 %.085 } diff --git a/bench/yosys/optimized/SimpSolver.ll b/bench/yosys/optimized/SimpSolver.ll index 34607913020..41305b3d6ab 100644 --- a/bench/yosys/optimized/SimpSolver.ll +++ b/bench/yosys/optimized/SimpSolver.ll @@ -5920,13 +5920,12 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit.i: ; preds = %_ZN7Minisat15Region %104 = zext i32 %99 to i64 %105 = getelementptr inbounds nuw i32, ptr %103, i64 %104 %106 = load i32, ptr %57, align 4 - %107 = shl nuw nsw i8 %68, 3 - %108 = zext nneg i8 %107 to i32 - %109 = and i32 %106, -9 - %110 = or disjoint i32 %109, %108 - store i32 %110, ptr %105, align 4 - %111 = load i32, ptr %57, align 4 - %.not.i.i = icmp ult i32 %111, 32 + %107 = select i1 %.not.i16, i32 0, i32 8 + %108 = and i33 %106, -9 + %109 = or disjoint i32 %108, %107 + store i32 %109, ptr %105, align 4 + %110 = load i32, ptr %57, align 4 + %111 = icmp ult i32 %110, 32 br i1 %.not.i.i, label %._crit_edge.i.i, label %.lr.ph.i.i17 .lr.ph.i.i17: ; preds = %_ZN7Minisat15RegionAllocatorIjE5allocEi.exit.i @@ -5936,10 +5935,10 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit.i: ; preds = %_ZN7Minisat15Region 114: ; preds = %114, %.lr.ph.i.i17 %indvars.iv.i.i = phi i64 [ 0, %.lr.ph.i.i17 ], [ %indvars.iv.next.i.i, %114 ] + %114 = getelementptr inbounds nuw [0 x %union.anon], ptr %111, i64 0, i64 %indvars.iv.i.i + %.sroa.0.0.copyload.i.i.i = load i32, ptr %114, align 4 %115 = getelementptr inbounds nuw [0 x %union.anon], ptr %112, i64 0, i64 %indvars.iv.i.i - %.sroa.0.0.copyload.i.i.i = load i32, ptr %115, align 4 - %116 = getelementptr inbounds nuw [0 x %union.anon], ptr %113, i64 0, i64 %indvars.iv.i.i - store i32 %.sroa.0.0.copyload.i.i.i, ptr %116, align 4 + store i32 %.sroa.0.0.copyload.i.i.i, ptr %115, align 4 %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 %117 = load i32, ptr %57, align 4 %118 = lshr i32 %117, 5 @@ -7269,13 +7268,12 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %2 %23 = zext i32 %17 to i64 %24 = getelementptr inbounds nuw i32, ptr %22, i64 %23 %25 = load i32, ptr %1, align 4 - %26 = shl nuw nsw i8 %9, 3 - %27 = zext nneg i8 %26 to i32 - %28 = and i32 %25, -9 - %29 = or disjoint i32 %28, %27 - store i32 %29, ptr %24, align 4 - %30 = load i32, ptr %1, align 4 - %.not.i = icmp ult i32 %30, 32 + %26 = select i1 %.not, i32 0, i32 8 + %27 = and i32 %25, -9 + %28 = or disjoint i32 %27, %26 + store i32 %28, ptr %24, align 4 + %29 = load i32, ptr %1, align 4 + %30 = icmp ult i32 %29, 32 br i1 %.not.i, label %._crit_edge.i, label %.lr.ph.i .lr.ph.i: ; preds = %_ZN7Minisat15RegionAllocatorIjE5allocEi.exit @@ -7285,10 +7283,10 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %2 33: ; preds = %33, %.lr.ph.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.i ], [ %indvars.iv.next.i, %33 ] + %33 = getelementptr inbounds nuw [0 x %union.anon], ptr %30, i64 0, i64 %indvars.iv.i + %.sroa.0.0.copyload.i.i = load i32, ptr %33, align 4 %34 = getelementptr inbounds nuw [0 x %union.anon], ptr %31, i64 0, i64 %indvars.iv.i - %.sroa.0.0.copyload.i.i = load i32, ptr %34, align 4 - %35 = getelementptr inbounds nuw [0 x %union.anon], ptr %32, i64 0, i64 %indvars.iv.i - store i32 %.sroa.0.0.copyload.i.i, ptr %35, align 4 + store i32 %.sroa.0.0.copyload.i.i, ptr %34, align 4 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %36 = load i32, ptr %1, align 4 %37 = lshr i32 %36, 5 diff --git a/bench/z3/optimized/dep_intervals.ll b/bench/z3/optimized/dep_intervals.ll index 04c50c5f90b..aab5cbfb5b3 100644 --- a/bench/z3/optimized/dep_intervals.ll +++ b/bench/z3/optimized/dep_intervals.ll @@ -8541,12 +8541,11 @@ entry: %bf.load.i.i.i = load i8, ptr %m_lower_inf.i.i.i, align 8 %0 = and i8 %bf.load.i.i.i, 4 %tobool.i.i.not.i = icmp eq i8 %0, 0 + %1 = and i8 %bf.load.i.i.i, 8 + %tobool.i.i14.not.i = icmp eq i8 %1, 0 %m_upper_combine13.i = getelementptr inbounds nuw i8, ptr %b_deps, i64 2 %..i = zext i1 %tobool.i.i.not.i to i16 - %1 = lshr i8 %bf.load.i.i.i, 2 - %2 = and i8 %1, 2 - %3 = xor i8 %2, 2 - %.16.i = zext nneg i8 %3 to i16 + %1 = select i1 %tobool.i.i14.not.i, i16 2, i16 0 store i16 %.16.i, ptr %b_deps, align 2 store i16 %..i, ptr %m_upper_combine13.i, align 2 tail call void @_ZN16interval_managerIN13dep_intervals9im_configEE3negERKNS1_8intervalERS3_(ptr noundef nonnull align 8 dereferenceable(672) %this, ptr noundef nonnull align 8 dereferenceable(88) %a, ptr noundef nonnull align 8 dereferenceable(88) %b) @@ -8560,12 +8559,11 @@ entry: %bf.load.i.i = load i8, ptr %m_lower_inf.i.i, align 8 %0 = and i8 %bf.load.i.i, 4 %tobool.i.i.not = icmp eq i8 %0, 0 + %1 = and i8 %bf.load.i.i, 8 + %tobool.i.i14.not = icmp eq i8 %1, 0 %m_upper_combine13 = getelementptr inbounds nuw i8, ptr %b_deps, i64 2 %. = zext i1 %tobool.i.i.not to i16 - %1 = lshr i8 %bf.load.i.i, 2 - %2 = and i8 %1, 2 - %3 = xor i8 %2, 2 - %.16 = zext nneg i8 %3 to i16 + %1 = select i1 %tobool.i.i14.not, i16 2, i16 0 store i16 %.16, ptr %b_deps, align 2 store i16 %., ptr %m_upper_combine13, align 2 ret void diff --git a/bench/z3/optimized/lar_solver.ll b/bench/z3/optimized/lar_solver.ll index 76e05e129c3..fdcc47cfa32 100644 --- a/bench/z3/optimized/lar_solver.ll +++ b/bench/z3/optimized/lar_solver.ll @@ -20586,9 +20586,8 @@ invoke.cont: ; preds = %if.else.i.i7.i.i, % %8 = load ptr, ptr %m_columns_to_ul_pairs, align 8 %idxprom.i = zext i32 %6 to i64 %arrayidx.i = getelementptr inbounds nuw %"class.lp::ul_pair", ptr %8, i64 %idxprom.i - %9 = lshr i32 %cond, 28 - %10 = and i32 %9, 8 - %cond14.in.idx = zext nneg i32 %10 to i64 + %9 = icmp slt i32 %cond, 0 + %10 = select i1 %9, i64 8, i64 0 %cond14.in = getelementptr inbounds nuw i8, ptr %arrayidx.i, i64 %cond14.in.idx %cond14 = load ptr, ptr %cond14.in, align 8 store ptr null, ptr %deps, align 8 diff --git a/bench/z3/optimized/smt_context.ll b/bench/z3/optimized/smt_context.ll index 9e8f711b466..a3404caa1f1 100644 --- a/bench/z3/optimized/smt_context.ll +++ b/bench/z3/optimized/smt_context.ll @@ -7467,12 +7467,11 @@ if.then26: ; preds = %land.lhs.true20 if.end30: ; preds = %if.then, %land.lhs.true20, %if.then26, %_ZN6vectorIN3sat7literalELb0EjE9push_backERKS1_.exit %bf.load32 = phi i64 [ %bf.load32.pre45, %if.then ], [ %bf.load32.pre45, %land.lhs.true20 ], [ %bf.load32.pre, %if.then26 ], [ %bf.set, %_ZN6vectorIN3sat7literalELb0EjE9push_backERKS1_.exit ] - %22 = shl i32 %l.coerce, 27 - %23 = and i32 %22, 134217728 + %22 = and i32 %l.coerce, 1 + %23 = icmp eq i32 %22, 0 %bf.set34 = and i64 %bf.load32, -201326593 - %24 = xor i32 %23, 201326592 - %bf.clear40 = zext nneg i32 %24 to i64 - %bf.set41 = or disjoint i64 %bf.set34, %bf.clear40 + %24 = select i1 %23, i64 201326592, i64 67108864 + %bf.clear40 = or disjoint i64 %24, %bf.set34 store i64 %bf.set41, ptr %m_scope_lvl14, align 8 %25 = and i64 %bf.load32, 36028797018963968 %tobool.i14.not = icmp eq i64 %25, 0 @@ -7505,7 +7504,7 @@ lor.lhs.false50: ; preds = %land.lhs.true43, %l %vtable.i.i = load ptr, ptr %33, align 8 %vfn.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i, i64 56 %34 = load ptr, ptr %vfn.i.i, align 8 - %call2.i.i = tail call noundef zeroext i1 %34(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef %32) + %call2.i.i = tail call noundef zeroext i1 %32(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef %32) br i1 %call2.i.i, label %if.then54, label %if.end56 if.then54: ; preds = %land.lhs.true43, %lor.lhs.false50, %land.lhs.true48 @@ -7560,7 +7559,7 @@ if.end64: ; preds = %if.then58, %if.end5 %vtable = load ptr, ptr %44, align 8 %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 32 %45 = load ptr, ptr %vfn, align 8 - tail call void %45(ptr noundef nonnull align 8 dereferenceable(8) %44, i32 %l.coerce) + tail call void %43(ptr noundef nonnull align 8 dereferenceable(8) %44, i32 %l.coerce) ret void } diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..c432a0f90de 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/127398 export COMPTIME_MODE=0 # Please rebase manually