From ef2afb2c3a4b50c8b28114cd9e6ae66ae4beee1d Mon Sep 17 00:00:00 2001 From: dtcxzyw <15650457+dtcxzyw@users.noreply.github.com> Date: Wed, 19 Mar 2025 19:49:07 +0800 Subject: [PATCH 1/3] pre-commit: PR131902 --- scripts/setup_pre_commit_patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..1f49033a0fe 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/131902 export COMPTIME_MODE=0 # Please rebase manually From db1a073f9eb488a1970bbecbf7c1c59206678921 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 12:17:15 +0000 Subject: [PATCH 2/3] pre-commit: Update --- bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll | 101 ++- bench/actix-rs/optimized/4pmtvrahn6eloepe.ll | 6 +- bench/draco/optimized/symbol_encoding.ll | 197 +++--- bench/folly/optimized/EpollBackend.ll | 20 +- bench/linux/optimized/open.ll | 32 +- bench/linux/optimized/utimes.ll | 8 +- bench/quickjs/optimized/libbf.ll | 210 +++--- .../optimized/3yl6353p3hwrtv6y.ll | 97 ++- .../optimized/5az6c15ag5q4gib5.ll | 547 ++++++++------- .../softposit-rs/optimized/oveg98n4r9tnk39.ll | 627 +++++++++--------- bench/wireshark/optimized/in_cksum.ll | 11 +- 11 files changed, 909 insertions(+), 947 deletions(-) diff --git a/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll b/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll index 81016f601ba..68124bafcd0 100644 --- a/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll +++ b/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll @@ -10387,13 +10387,13 @@ _ZN6brotli3enc7command26CommandRestoreDistanceCode17hf05d26418c1b43c8E.exit: ; p %68 = load i64, ptr %67, align 8, !noundef !12 %.promoted = load i32, ptr %2, align 4 %69 = zext i32 %14 to i64 - br label %159 + br label %158 70: ; preds = %_ZN6brotli3enc7command26CommandRestoreDistanceCode17hf05d26418c1b43c8E.exit, %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit ret void -.loopexit.loopexit: ; preds = %181, %174 - %71 = phi i32 [ %182, %181 ], [ %160, %174 ] +.loopexit.loopexit: ; preds = %180, %173 + %71 = phi i32 [ %181, %180 ], [ %159, %173 ] %.pre = and i32 %71, 33554431 br label %.loopexit @@ -10504,7 +10504,7 @@ _ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit: ; preds = %1 %or.cond.i = and i1 %78, %140 %141 = icmp ult i16 %.0.i, 16 %or.cond6.i = and i1 %or.cond.i, %141 - br i1 %or.cond6.i, label %155, label %142 + br i1 %or.cond6.i, label %154, label %142 142: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit %143 = lshr i16 %.0.i, 3 @@ -10520,64 +10520,63 @@ _ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit: ; preds = %1 %151 = and i32 %150, 192 %152 = add nuw nsw i32 %148, %151 %153 = trunc i32 %152 to i16 - %154 = or disjoint i16 %139, %153 br label %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit -155: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit - %156 = icmp samesign ult i16 %.0.i, 8 - %157 = or disjoint i16 %139, 64 - %spec.select.i = select i1 %156, i16 %139, i16 %157 +154: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit + %155 = shl nuw nsw i16 %.0.i, 3 + %156 = and i16 %155, 64 br label %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit -_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit: ; preds = %142, %155 - %.0.i13 = phi i16 [ %154, %142 ], [ %spec.select.i, %155 ] - %158 = getelementptr inbounds nuw i8, ptr %11, i64 12 - store i16 %.0.i13, ptr %158, align 4 +_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit: ; preds = %142, %154 + %.pn = phi i16 [ %153, %142 ], [ %156, %154 ] + %.0.i13 = or disjoint i16 %139, %.pn + %157 = getelementptr inbounds nuw i8, ptr %11, i64 12 + store i16 %.0.i13, ptr %157, align 4 br label %70 -159: ; preds = %.preheader, %181 - %160 = phi i32 [ %18, %.preheader ], [ %182, %181 ] - %161 = phi i32 [ %64, %.preheader ], [ %183, %181 ] - %162 = phi i32 [ %.promoted, %.preheader ], [ %184, %181 ] - %163 = and i32 %162, %14 - %164 = zext i32 %163 to i64 - %165 = add i64 %68, %164 - %166 = icmp ult i64 %165, %.val17 - br i1 %166, label %167, label %173, !prof !278 - -167: ; preds = %159 - %168 = zext i32 %162 to i64 - %169 = sub nsw i64 %168, %23 - %170 = and i64 %169, %69 - %171 = add i64 %170, %68 - %172 = icmp ult i64 %171, %.val17 - br i1 %172, label %174, label %180, !prof !278 - -173: ; preds = %159 - tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %165, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.113) #21 +158: ; preds = %.preheader, %180 + %159 = phi i32 [ %18, %.preheader ], [ %181, %180 ] + %160 = phi i32 [ %64, %.preheader ], [ %182, %180 ] + %161 = phi i32 [ %.promoted, %.preheader ], [ %183, %180 ] + %162 = and i32 %161, %14 + %163 = zext i32 %162 to i64 + %164 = add i64 %68, %163 + %165 = icmp ult i64 %164, %.val17 + br i1 %165, label %166, label %172, !prof !278 + +166: ; preds = %158 + %167 = zext i32 %161 to i64 + %168 = sub nsw i64 %167, %23 + %169 = and i64 %168, %69 + %170 = add i64 %169, %68 + %171 = icmp ult i64 %170, %.val17 + br i1 %171, label %173, label %179, !prof !278 + +172: ; preds = %158 + tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %164, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.113) #21 unreachable -174: ; preds = %167 - %175 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %165 - %176 = load i8, ptr %175, align 1, !noundef !12 - %177 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %171 - %178 = load i8, ptr %177, align 1, !noundef !12 - %179 = icmp eq i8 %176, %178 - br i1 %179, label %181, label %.loopexit.loopexit +173: ; preds = %166 + %174 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %164 + %175 = load i8, ptr %174, align 1, !noundef !12 + %176 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %170 + %177 = load i8, ptr %176, align 1, !noundef !12 + %178 = icmp eq i8 %175, %177 + br i1 %178, label %180, label %.loopexit.loopexit -180: ; preds = %167 - tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %171, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.114) #21 +179: ; preds = %166 + tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %170, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.114) #21 unreachable -181: ; preds = %174 - %182 = add i32 %160, 1 - store i32 %182, ptr %17, align 4 - %183 = add i32 %161, -1 - store i32 %183, ptr %1, align 4 - %184 = add i32 %162, 1 - store i32 %184, ptr %2, align 4 - %.old3 = icmp eq i32 %183, 0 - br i1 %.old3, label %.loopexit.loopexit, label %159 +180: ; preds = %173 + %181 = add i32 %159, 1 + store i32 %181, ptr %17, align 4 + %182 = add i32 %160, -1 + store i32 %182, ptr %1, align 4 + %183 = add i32 %161, 1 + store i32 %183, ptr %2, align 4 + %.old3 = icmp eq i32 %182, 0 + br i1 %.old3, label %.loopexit.loopexit, label %158 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll b/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll index 47769b8d43c..cc914ab0bc5 100644 --- a/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll +++ b/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll @@ -5716,9 +5716,9 @@ _ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit: ; preds = %2 br i1 %or.cond6.i, label %.thread, label %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit .thread: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit - %235 = icmp samesign ult i16 %.0.i143, 8 - %236 = or disjoint i16 %233, 64 - %spec.select.i = select i1 %235, i16 %233, i16 %236 + %235 = shl nuw nsw i16 %.0.i143, 3 + %236 = and i16 %235, 64 + %spec.select.i = or disjoint i16 %233, %236 %237 = zext nneg i16 %.0.i143 to i64 %238 = zext nneg i16 %spec.select.i to i64 br label %261 diff --git a/bench/draco/optimized/symbol_encoding.ll b/bench/draco/optimized/symbol_encoding.ll index 877d7015265..2465e46ee1d 100644 --- a/bench/draco/optimized/symbol_encoding.ll +++ b/bench/draco/optimized/symbol_encoding.ll @@ -1646,7 +1646,7 @@ define linkonce_odr noundef zeroext i1 @_ZN5draco16EncodeRawSymbolsINS_17RAnsSym %14 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %3, i1 true) %15 = sub nuw nsw i32 32, %14 %16 = icmp samesign ugt i32 %3, 262143 - br i1 %16, label %140, label %.thread + br i1 %16, label %139, label %.thread .thread: ; preds = %6, %13 %.0 = phi i32 [ %15, %13 ], [ 1, %6 ] @@ -1855,135 +1855,134 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit124: ; preds = %_Z br label %.thread147 86: ; preds = %82 - %87 = icmp samesign ugt i32 %58, 7 - %88 = zext i1 %87 to i32 - %spec.select = add nuw nsw i32 %.0, %88 + %87 = lshr i32 %58, 3 + %spec.select = add nuw nsw i32 %.0, %87 br label %.thread147 .thread147: ; preds = %86, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, %.thread, %80, %84, %76 %.1 = phi i32 [ %.0, %.thread ], [ %77, %76 ], [ %81, %80 ], [ %85, %84 ], [ %.0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ], [ %spec.select, %86 ] - %89 = call i32 @llvm.smax.i32(i32 %.1, i32 1) - %90 = call i32 @llvm.umin.i32(i32 %89, i32 18) + %88 = call i32 @llvm.smax.i32(i32 %.1, i32 1) + %89 = call i32 @llvm.umin.i32(i32 %88, i32 18) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #18 - %91 = trunc nuw nsw i32 %90 to i8 - store i8 %91, ptr %11, align 1, !tbaa !13 - %92 = getelementptr inbounds nuw i8, ptr %5, i64 32 - %93 = load i64, ptr %92, align 8, !tbaa !29 - %94 = icmp slt i64 %93, 1 - br i1 %94, label %95, label %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - -95: ; preds = %.thread147 - %96 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %97 = load ptr, ptr %96, align 8, !tbaa !43 - %98 = getelementptr inbounds nuw i8, ptr %11, i64 1 - %99 = load ptr, ptr %5, align 8, !tbaa !43 - %100 = ptrtoint ptr %97 to i64 - %101 = ptrtoint ptr %99 to i64 - %102 = sub i64 %100, %101 - %103 = getelementptr inbounds i8, ptr %99, i64 %102 - call void @_ZNSt6vectorIcSaIcEE15_M_range_insertIPKhEEvN9__gnu_cxx17__normal_iteratorIPcS1_EET_S9_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(41) %5, ptr %103, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull %98) + %90 = trunc nuw nsw i32 %89 to i8 + store i8 %90, ptr %11, align 1, !tbaa !13 + %91 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %92 = load i64, ptr %91, align 8, !tbaa !29 + %93 = icmp slt i64 %92, 1 + br i1 %93, label %94, label %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + +94: ; preds = %.thread147 + %95 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %96 = load ptr, ptr %95, align 8, !tbaa !43 + %97 = getelementptr inbounds nuw i8, ptr %11, i64 1 + %98 = load ptr, ptr %5, align 8, !tbaa !43 + %99 = ptrtoint ptr %96 to i64 + %100 = ptrtoint ptr %98 to i64 + %101 = sub i64 %99, %100 + %102 = getelementptr inbounds i8, ptr %98, i64 %101 + call void @_ZNSt6vectorIcSaIcEE15_M_range_insertIPKhEEvN9__gnu_cxx17__normal_iteratorIPcS1_EET_S9_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(41) %5, ptr %102, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull %97) br label %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit -_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit: ; preds = %.thread147, %95 +_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit: ; preds = %.thread147, %94 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #18 - switch i32 %90, label %default.unreachable [ - i32 18, label %138 - i32 1, label %104 - i32 2, label %106 - i32 3, label %108 - i32 4, label %110 - i32 5, label %112 - i32 6, label %114 - i32 7, label %116 - i32 8, label %118 - i32 9, label %120 - i32 10, label %122 - i32 11, label %124 - i32 12, label %126 - i32 13, label %128 - i32 14, label %130 - i32 15, label %132 - i32 16, label %134 - i32 17, label %136 + switch i32 %89, label %default.unreachable [ + i32 18, label %137 + i32 1, label %103 + i32 2, label %105 + i32 3, label %107 + i32 4, label %109 + i32 5, label %111 + i32 6, label %113 + i32 7, label %115 + i32 8, label %117 + i32 9, label %119 + i32 10, label %121 + i32 11, label %123 + i32 12, label %125 + i32 13, label %127 + i32 14, label %129 + i32 15, label %131 + i32 16, label %133 + i32 17, label %135 ] -104: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %105 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi1EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +103: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %104 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi1EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -106: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %107 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi2EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +105: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %106 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi2EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -108: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %109 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi3EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +107: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %108 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi3EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -110: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %111 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi4EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +109: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %110 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi4EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -112: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %113 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi5EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +111: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %112 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi5EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -114: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %115 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi6EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +113: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %114 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi6EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -116: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %117 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi7EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +115: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %116 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi7EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -118: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %119 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi8EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +117: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %118 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi8EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -120: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %121 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi9EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +119: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %120 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi9EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -122: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %123 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi10EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +121: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %122 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi10EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -124: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %125 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi11EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +123: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %124 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi11EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -126: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %127 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi12EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +125: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %126 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi12EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -128: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %129 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi13EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +127: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %128 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi13EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -130: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %131 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi14EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +129: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %130 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi14EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -132: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %133 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi15EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +131: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %132 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi15EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -134: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %135 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi16EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +133: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %134 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi16EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -136: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %137 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi17EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +135: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %136 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi17EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 -138: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %139 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi18EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %140 +137: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %138 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi18EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %139 default.unreachable: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit unreachable -140: ; preds = %104, %106, %108, %110, %112, %114, %116, %118, %120, %122, %124, %126, %128, %130, %132, %134, %136, %138, %13 - %.0102 = phi i1 [ false, %13 ], [ %139, %138 ], [ %137, %136 ], [ %135, %134 ], [ %133, %132 ], [ %131, %130 ], [ %129, %128 ], [ %127, %126 ], [ %125, %124 ], [ %123, %122 ], [ %121, %120 ], [ %119, %118 ], [ %117, %116 ], [ %115, %114 ], [ %113, %112 ], [ %111, %110 ], [ %109, %108 ], [ %107, %106 ], [ %105, %104 ] +139: ; preds = %103, %105, %107, %109, %111, %113, %115, %117, %119, %121, %123, %125, %127, %129, %131, %133, %135, %137, %13 + %.0102 = phi i1 [ false, %13 ], [ %138, %137 ], [ %136, %135 ], [ %134, %133 ], [ %132, %131 ], [ %130, %129 ], [ %128, %127 ], [ %126, %125 ], [ %124, %123 ], [ %122, %121 ], [ %120, %119 ], [ %118, %117 ], [ %116, %115 ], [ %114, %113 ], [ %112, %111 ], [ %110, %109 ], [ %108, %107 ], [ %106, %105 ], [ %104, %103 ] ret i1 %.0102 } diff --git a/bench/folly/optimized/EpollBackend.ll b/bench/folly/optimized/EpollBackend.ll index c4a2a1b388c..fad9f206cad 100644 --- a/bench/folly/optimized/EpollBackend.ll +++ b/bench/folly/optimized/EpollBackend.ll @@ -626,11 +626,11 @@ _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit48: ; preds = %9 %38 = getelementptr inbounds nuw i8, ptr %.0, i64 16 store ptr %1, ptr %38, align 8, !tbaa !56 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #21 - %39 = and i16 %17, 4 - %40 = lshr i16 %17, 1 - %.lobit.i = and i16 %40, 1 - %.1.i55 = or disjoint i16 %.lobit.i, %39 - %.1.i = zext nneg i16 %.1.i55 to i32 + %39 = lshr i16 %17, 1 + %.lobit.i = and i16 %39, 1 + %40 = and i16 %17, 4 + %.16.i = or disjoint i16 %.lobit.i, %40 + %.1.i = zext nneg i16 %.16.i to i32 store i32 %.1.i, ptr %4, align 4, !tbaa !61 %41 = getelementptr inbounds nuw i8, ptr %4, i64 4 store ptr %.0, ptr %41, align 4, !tbaa !55 @@ -871,11 +871,11 @@ define noundef zeroext i1 @_ZN5folly12EpollBackend16setEdgeTriggeredERNS_14Event call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #21 %7 = getelementptr inbounds nuw i8, ptr %1, i64 104 %8 = load i16, ptr %7, align 8, !tbaa !64 - %9 = and i16 %8, 4 - %10 = lshr i16 %8, 1 - %.lobit.i = and i16 %10, 1 - %.1.i18 = or disjoint i16 %.lobit.i, %9 - %.1.i = zext nneg i16 %.1.i18 to i32 + %9 = lshr i16 %8, 1 + %.lobit.i = and i16 %9, 1 + %10 = and i16 %8, 4 + %.16.i = or disjoint i16 %.lobit.i, %10 + %.1.i = zext nneg i16 %.16.i to i32 %11 = or disjoint i32 %.1.i, -2147483648 store i32 %11, ptr %2, align 4, !tbaa !61 %12 = getelementptr inbounds nuw i8, ptr %2, i64 4 diff --git a/bench/linux/optimized/open.ll b/bench/linux/optimized/open.ll index e3f929b01f7..e93f4f82844 100644 --- a/bench/linux/optimized/open.ll +++ b/bench/linux/optimized/open.ll @@ -1632,10 +1632,10 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @__x64_sys_fchmodat2(ptr call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false), !annotation !6 %18 = lshr exact i32 %14, 8 %19 = and i32 %18, 1 - %20 = xor i32 %19, 1 - %21 = icmp samesign ult i32 %14, 4096 - %22 = or disjoint i32 %20, 16384 - %23 = select i1 %21, i32 %20, i32 %22 + %20 = shl nuw nsw i32 %14, 2 + %21 = and i32 %20, 16384 + %22 = or disjoint i32 %19, %21 + %23 = xor i32 %22, 1 %24 = call i32 @user_path_at_empty(i32 noundef %11, ptr noundef %12, i32 noundef %23, ptr noundef nonnull %2, ptr noundef null) #14 %25 = icmp eq i32 %24, 0 br i1 %25, label %26, label %do_fchmodat.exit @@ -1689,10 +1689,10 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @__ia32_sys_fchmodat2(pt call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false), !annotation !6 %19 = lshr exact i32 %15, 8 %20 = and i32 %19, 1 - %21 = xor i32 %20, 1 - %22 = icmp samesign ult i32 %15, 4096 - %23 = or disjoint i32 %21, 16384 - %24 = select i1 %22, i32 %21, i32 %23 + %21 = shl nuw nsw i32 %15, 2 + %22 = and i32 %21, 16384 + %23 = or disjoint i32 %20, %22 + %24 = xor i32 %23, 1 %25 = call i32 @user_path_at_empty(i32 noundef %12, ptr noundef %13, i32 noundef %24, ptr noundef nonnull %2, ptr noundef null) #14 %26 = icmp eq i32 %25, 0 br i1 %26, label %27, label %do_fchmodat.exit @@ -2003,10 +2003,10 @@ define dso_local i32 @do_fchownat(i32 noundef %0, ptr noundef %1, i32 noundef %2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false), !annotation !6 %10 = lshr exact i32 %4, 8 %11 = and i32 %10, 1 - %12 = xor i32 %11, 1 - %13 = icmp samesign ult i32 %4, 4096 - %14 = or disjoint i32 %12, 16384 - %15 = select i1 %13, i32 %12, i32 %14 + %12 = shl nuw nsw i32 %4, 2 + %13 = and i32 %12, 16384 + %14 = or disjoint i32 %11, %13 + %15 = xor i32 %14, 1 %16 = call i32 @user_path_at_empty(i32 noundef %0, ptr noundef %1, i32 noundef %15, ptr noundef nonnull %6, ptr noundef null) #14 %17 = icmp eq i32 %16, 0 br i1 %17, label %18, label %.loopexit @@ -4102,10 +4102,10 @@ define internal fastcc range(i64 -2147483648, 2147483648) i64 @do_faccessat(i32 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false), !annotation !6 %11 = lshr exact i32 %3, 8 %12 = and i32 %11, 1 - %13 = xor i32 %12, 1 - %14 = icmp samesign ult i32 %3, 4096 - %15 = or disjoint i32 %13, 16384 - %16 = select i1 %14, i32 %13, i32 %15 + %13 = shl nuw nsw i32 %3, 2 + %14 = and i32 %13, 16384 + %15 = or disjoint i32 %12, %14 + %16 = xor i32 %15, 1 %17 = and i32 %3, 512 %18 = icmp eq i32 %17, 0 br i1 %18, label %19, label %83 diff --git a/bench/linux/optimized/utimes.ll b/bench/linux/optimized/utimes.ll index 0e703a83d8b..87645812d42 100644 --- a/bench/linux/optimized/utimes.ll +++ b/bench/linux/optimized/utimes.ll @@ -234,10 +234,10 @@ define dso_local range(i64 -2147483648, 2147483648) i64 @do_utimes(i32 noundef % 25: ; preds = %22 %26 = lshr exact i32 %3, 8 %27 = and i32 %26, 1 - %28 = xor i32 %27, 1 - %29 = icmp samesign ult i32 %3, 4096 - %30 = or disjoint i32 %28, 16384 - %31 = select i1 %29, i32 %28, i32 %30 + %28 = shl nuw nsw i32 %3, 2 + %29 = and i32 %28, 16384 + %30 = or disjoint i32 %27, %29 + %31 = xor i32 %30, 1 %32 = call i32 @user_path_at_empty(i32 noundef %0, ptr noundef %1, i32 noundef %31, ptr noundef nonnull %5, ptr noundef null) #7 %33 = icmp eq i32 %32, 0 br i1 %33, label %34, label %.loopexit diff --git a/bench/quickjs/optimized/libbf.ll b/bench/quickjs/optimized/libbf.ll index 910ffe159e5..5acfdb3fcb9 100644 --- a/bench/quickjs/optimized/libbf.ll +++ b/bench/quickjs/optimized/libbf.ll @@ -1014,7 +1014,7 @@ get_bit.exit32.i: ; preds = %86, %85, %79, %72, br i1 %90, label %91, label %106 91: ; preds = %get_bit.exit32.i - br i1 %.not112, label %131, label %92 + br i1 %.not112, label %132, label %92 92: ; preds = %91 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -1107,130 +1107,130 @@ bf_resize.exit: ; preds = %.bf_resize.exit_cri %124 = getelementptr inbounds nuw i8, ptr %0, i64 16 %125 = load i64, ptr %124, align 8, !tbaa !31 %126 = icmp slt i64 %125, %13 - br i1 %126, label %127, label %142, !prof !39 + br i1 %126, label %127, label %143, !prof !39 127: ; preds = %.loopexit %128 = and i32 %2, 8 %.not109 = icmp eq i32 %128, 0 - br i1 %.not109, label %131, label %129 + br i1 %.not109, label %132, label %129 129: ; preds = %127 - %.not110 = icmp samesign ult i32 %spec.select, 16 - %130 = or i32 %spec.select, 8 - %spec.select129 = select i1 %.not110, i32 %spec.select, i32 %130 - br label %142 - -131: ; preds = %127, %91 - %132 = or i32 %spec.select, 24 - %133 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %134 = load i32, ptr %133, align 8, !tbaa !30 - %135 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %136 = load i64, ptr %135, align 8, !tbaa !32 - %.not.i.i116 = icmp eq i64 %136, 0 - br i1 %.not.i.i116, label %bf_set_zero.exit, label %137 - -137: ; preds = %131 - %138 = load ptr, ptr %0, align 8, !tbaa !28 - %.val.i.i = load ptr, ptr %138, align 8, !tbaa !19 - %139 = getelementptr i8, ptr %138, i64 8 - %.val13.i.i = load ptr, ptr %139, align 8, !tbaa !7 - %140 = tail call ptr %.val13.i.i(ptr noundef %.val.i.i, ptr noundef %54, i64 noundef 0) #21 - store ptr %140, ptr %53, align 8, !tbaa !29 - store i64 0, ptr %135, align 8, !tbaa !32 + %130 = lshr i32 %spec.select, 1 + %131 = and i32 %130, 8 + %spec.select129 = or i32 %131, %spec.select + br label %143 + +132: ; preds = %127, %91 + %133 = or i32 %spec.select, 24 + %134 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %135 = load i32, ptr %134, align 8, !tbaa !30 + %136 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %137 = load i64, ptr %136, align 8, !tbaa !32 + %.not.i.i116 = icmp eq i64 %137, 0 + br i1 %.not.i.i116, label %bf_set_zero.exit, label %138 + +138: ; preds = %132 + %139 = load ptr, ptr %0, align 8, !tbaa !28 + %.val.i.i = load ptr, ptr %139, align 8, !tbaa !19 + %140 = getelementptr i8, ptr %139, i64 8 + %.val13.i.i = load ptr, ptr %140, align 8, !tbaa !7 + %141 = tail call ptr %.val13.i.i(ptr noundef %.val.i.i, ptr noundef %54, i64 noundef 0) #21 + store ptr %141, ptr %53, align 8, !tbaa !29 + store i64 0, ptr %136, align 8, !tbaa !32 br label %bf_set_zero.exit -bf_set_zero.exit: ; preds = %131, %137 - %141 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 -9223372036854775808, ptr %141, align 8, !tbaa !31 - store i32 %134, ptr %133, align 8, !tbaa !30 +bf_set_zero.exit: ; preds = %132, %138 + %142 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 -9223372036854775808, ptr %142, align 8, !tbaa !31 + store i32 %135, ptr %134, align 8, !tbaa !30 br label %bf_resize.exit122 -142: ; preds = %129, %.loopexit +143: ; preds = %129, %.loopexit %.0128 = phi i32 [ %spec.select, %.loopexit ], [ %spec.select129, %129 ] - %143 = icmp sgt i64 %125, %12 - br i1 %143, label %144, label %148, !prof !39 + %144 = icmp sgt i64 %125, %12 + br i1 %144, label %145, label %149, !prof !39 -144: ; preds = %142 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %146 = load i32, ptr %145, align 8, !tbaa !30 - %147 = tail call fastcc i32 @bf_set_overflow(ptr noundef nonnull %0, i32 noundef %146, i64 noundef %1, i32 noundef %2) +145: ; preds = %143 + %146 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %147 = load i32, ptr %146, align 8, !tbaa !30 + %148 = tail call fastcc i32 @bf_set_overflow(ptr noundef nonnull %0, i32 noundef %147, i64 noundef %1, i32 noundef %2) br label %bf_resize.exit122 -148: ; preds = %142 - %149 = sub i64 %.pre.i, %.089 - %150 = ashr i64 %149, 6 - %151 = icmp sgt i64 %150, -1 - br i1 %151, label %152, label %.preheader - -152: ; preds = %148 - %153 = trunc i64 %149 to i32 - %154 = and i32 %153, 63 - %.not111 = icmp eq i32 %154, 0 - br i1 %.not111, label %.preheader, label %155 - -155: ; preds = %152 - %156 = sub nuw nsw i32 64, %154 - %157 = zext nneg i32 %156 to i64 - %notmask.i = shl nsw i64 -1, %157 - %158 = xor i64 %notmask.i, -1 - %159 = and i64 %149, 63 - %160 = shl i64 %158, %159 - %161 = getelementptr inbounds nuw i64, ptr %54, i64 %150 - %162 = load i64, ptr %161, align 8, !tbaa !33 - %163 = and i64 %162, %160 - store i64 %163, ptr %161, align 8, !tbaa !33 - br label %.preheader - -.preheader: ; preds = %148, %152, %155 - %.3.ph = phi i64 [ 0, %148 ], [ %150, %152 ], [ %150, %155 ] - br label %164 +149: ; preds = %143 + %150 = sub i64 %.pre.i, %.089 + %151 = ashr i64 %150, 6 + %152 = icmp sgt i64 %151, -1 + br i1 %152, label %153, label %.preheader -164: ; preds = %.preheader, %164 - %.3 = phi i64 [ %168, %164 ], [ %.3.ph, %.preheader ] - %165 = getelementptr inbounds i64, ptr %54, i64 %.3 - %166 = load i64, ptr %165, align 8, !tbaa !33 - %167 = icmp eq i64 %166, 0 - %168 = add i64 %.3, 1 - br i1 %167, label %164, label %169, !llvm.loop !43 +153: ; preds = %149 + %154 = trunc i64 %150 to i32 + %155 = and i32 %154, 63 + %.not111 = icmp eq i32 %155, 0 + br i1 %.not111, label %.preheader, label %156 -169: ; preds = %164 - %170 = icmp sgt i64 %.3, 0 - br i1 %170, label %171, label %175 +156: ; preds = %153 + %157 = sub nuw nsw i32 64, %155 + %158 = zext nneg i32 %157 to i64 + %notmask.i = shl nsw i64 -1, %158 + %159 = xor i64 %notmask.i, -1 + %160 = and i64 %150, 63 + %161 = shl i64 %159, %160 + %162 = getelementptr inbounds nuw i64, ptr %54, i64 %151 + %163 = load i64, ptr %162, align 8, !tbaa !33 + %164 = and i64 %163, %161 + store i64 %164, ptr %162, align 8, !tbaa !33 + br label %.preheader -171: ; preds = %169 - %172 = getelementptr inbounds nuw i64, ptr %54, i64 %.3 - %173 = sub i64 %3, %.3 - %174 = shl i64 %173, 3 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %54, ptr nonnull align 8 %172, i64 %174, i1 false) - br label %175 - -175: ; preds = %171, %169 - %.091 = phi i64 [ %173, %171 ], [ %3, %169 ] - %176 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %177 = load i64, ptr %176, align 8, !tbaa !32 - %.not.i118 = icmp eq i64 %.091, %177 - br i1 %.not.i118, label %bf_resize.exit122, label %178 +.preheader: ; preds = %149, %153, %156 + %.3.ph = phi i64 [ 0, %149 ], [ %151, %153 ], [ %151, %156 ] + br label %165 + +165: ; preds = %.preheader, %165 + %.3 = phi i64 [ %169, %165 ], [ %.3.ph, %.preheader ] + %166 = getelementptr inbounds i64, ptr %54, i64 %.3 + %167 = load i64, ptr %166, align 8, !tbaa !33 + %168 = icmp eq i64 %167, 0 + %169 = add i64 %.3, 1 + br i1 %168, label %165, label %170, !llvm.loop !43 + +170: ; preds = %165 + %171 = icmp sgt i64 %.3, 0 + br i1 %171, label %172, label %176 + +172: ; preds = %170 + %173 = getelementptr inbounds nuw i64, ptr %54, i64 %.3 + %174 = sub i64 %3, %.3 + %175 = shl i64 %174, 3 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %54, ptr nonnull align 8 %173, i64 %175, i1 false) + br label %176 + +176: ; preds = %172, %170 + %.091 = phi i64 [ %174, %172 ], [ %3, %170 ] + %177 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %178 = load i64, ptr %177, align 8, !tbaa !32 + %.not.i118 = icmp eq i64 %.091, %178 + br i1 %.not.i118, label %bf_resize.exit122, label %179 -178: ; preds = %175 - %179 = load ptr, ptr %0, align 8, !tbaa !28 - %180 = load ptr, ptr %53, align 8, !tbaa !29 - %181 = shl i64 %.091, 3 - %.val.i119 = load ptr, ptr %179, align 8, !tbaa !19 - %182 = getelementptr i8, ptr %179, i64 8 - %.val13.i120 = load ptr, ptr %182, align 8, !tbaa !7 - %183 = tail call ptr %.val13.i120(ptr noundef %.val.i119, ptr noundef %180, i64 noundef %181) #21 - %184 = icmp eq ptr %183, null - %185 = icmp ne i64 %.091, 0 - %or.cond.i = and i1 %185, %184 - br i1 %or.cond.i, label %bf_resize.exit122, label %186 - -186: ; preds = %178 - store ptr %183, ptr %53, align 8, !tbaa !29 - store i64 %.091, ptr %176, align 8, !tbaa !32 +179: ; preds = %176 + %180 = load ptr, ptr %0, align 8, !tbaa !28 + %181 = load ptr, ptr %53, align 8, !tbaa !29 + %182 = shl i64 %.091, 3 + %.val.i119 = load ptr, ptr %180, align 8, !tbaa !19 + %183 = getelementptr i8, ptr %180, i64 8 + %.val13.i120 = load ptr, ptr %183, align 8, !tbaa !7 + %184 = tail call ptr %.val13.i120(ptr noundef %.val.i119, ptr noundef %181, i64 noundef %182) #21 + %185 = icmp eq ptr %184, null + %186 = icmp ne i64 %.091, 0 + %or.cond.i = and i1 %186, %185 + br i1 %or.cond.i, label %bf_resize.exit122, label %187 + +187: ; preds = %179 + store ptr %184, ptr %53, align 8, !tbaa !29 + store i64 %.091, ptr %177, align 8, !tbaa !32 br label %bf_resize.exit122 -bf_resize.exit122: ; preds = %186, %178, %175, %144, %bf_set_zero.exit, %bf_resize.exit - %.090 = phi i32 [ %105, %bf_resize.exit ], [ %132, %bf_set_zero.exit ], [ %147, %144 ], [ %.0128, %175 ], [ %.0128, %178 ], [ %.0128, %186 ] +bf_resize.exit122: ; preds = %187, %179, %176, %145, %bf_set_zero.exit, %bf_resize.exit + %.090 = phi i32 [ %105, %bf_resize.exit ], [ %133, %bf_set_zero.exit ], [ %148, %145 ], [ %.0128, %176 ], [ %.0128, %179 ], [ %.0128, %187 ] ret i32 %.090 } diff --git a/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll b/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll index e38b18a8983..408a92d0fac 100644 --- a/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll +++ b/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll @@ -88,7 +88,7 @@ define void @_ZN9softposit7quire163ops3fdp17h6da150bf3eda9608E(ptr noalias nound %10 = icmp eq i16 %1, 0 %11 = icmp eq i16 %2, 0 %or.cond5 = or i1 %10, %11 - br i1 %or.cond5, label %54, label %12 + br i1 %or.cond5, label %61, label %12 12: ; preds = %9 %13 = and i16 %1, -32768 @@ -183,65 +183,56 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64: ; preds %48 = zext nneg i16 %44 to i32 %49 = mul nuw nsw i32 %48, %47 %50 = icmp samesign ugt i8 %46, 1 - %51 = xor i8 %46, 2 - %52 = zext i1 %50 to i8 - %.040 = add i8 %45, %52 - %.037 = select i1 %50, i8 %51, i8 %46 - %53 = icmp samesign ult i32 %49, 536870912 - br i1 %53, label %55, label %62 - -.sink.split: ; preds = %4, %78 - %.sink = phi i128 [ %.039, %78 ], [ -170141183460469231731687303715884105728, %4 ] + %51 = zext i1 %50 to i8 + %.040 = add i8 %45, %51 + %.037 = and i8 %46, 1 + %52 = icmp samesign ugt i32 %49, 536870911 + %spec.select49 = select i1 %52, i8 %.037, i8 0 + %.141 = add i8 %.040, %spec.select49 + %53 = zext i1 %52 to i8 + %.138 = xor i8 %.037, %53 + %54 = zext i1 %52 to i32 + %.035 = lshr exact i32 %49, %54 + %55 = sext i8 %.141 to i16 + %56 = shl nsw i16 %55, 1 + %57 = or disjoint i8 %.138, 28 + %58 = zext nneg i8 %57 to i16 + %59 = add nsw i16 %56, %58 + %60 = icmp sgt i16 %59, 0 + br i1 %60, label %68, label %62 + +.sink.split: ; preds = %4, %73 + %.sink = phi i128 [ %.039, %73 ], [ -170141183460469231731687303715884105728, %4 ] store i128 %.sink, ptr %0, align 16 - br label %54 + br label %61 -54: ; preds = %.sink.split, %9 +61: ; preds = %.sink.split, %9 ret void -55: ; preds = %62, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 - %.141 = phi i8 [ %.040, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 ], [ %spec.select49, %62 ] - %.138 = phi i8 [ %.037, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 ], [ %65, %62 ] - %.035 = phi i32 [ %49, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 ], [ %66, %62 ] - %56 = sext i8 %.141 to i16 - %57 = shl nsw i16 %56, 1 - %58 = add nsw i16 %57, 28 - %59 = zext nneg i8 %.138 to i16 - %60 = add nsw i16 %58, %59 - %61 = icmp sgt i16 %60, 0 - br i1 %61, label %73, label %67 - 62: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 - %63 = icmp ne i8 %.037, 0 - %64 = zext i1 %63 to i8 - %spec.select49 = add i8 %.040, %64 - %65 = xor i8 %.037, 1 - %66 = lshr exact i32 %49, 1 - br label %55 - -67: ; preds = %55 - %68 = sub nsw i16 0, %60 + %63 = sub nsw i16 0, %59 + %64 = zext nneg i32 %.035 to i128 + %65 = and i16 %63, 127 + %66 = zext nneg i16 %65 to i128 + %67 = lshr i128 %64, %66 + br label %73 + +68: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 %69 = zext nneg i32 %.035 to i128 - %70 = and i16 %68, 127 + %70 = and i16 %59, 127 %71 = zext nneg i16 %70 to i128 - %72 = lshr i128 %69, %71 - br label %78 - -73: ; preds = %55 - %74 = zext nneg i32 %.035 to i128 - %75 = and i16 %60, 127 - %76 = zext nneg i16 %75 to i128 - %77 = shl i128 %74, %76 - br label %78 - -78: ; preds = %73, %67 - %.036 = phi i128 [ %77, %73 ], [ %72, %67 ] - %79 = xor i1 %14, %3 - %80 = xor i1 %15, %79 - %81 = sub i128 0, %.036 - %spec.select50 = select i1 %80, i128 %.036, i128 %81 - %82 = add i128 %spec.select50, %5 - %83 = icmp eq i128 %82, -170141183460469231731687303715884105728 - %.039 = select i1 %83, i128 0, i128 %82 + %72 = shl i128 %69, %71 + br label %73 + +73: ; preds = %68, %62 + %.036 = phi i128 [ %72, %68 ], [ %67, %62 ] + %74 = xor i1 %14, %3 + %75 = xor i1 %15, %74 + %76 = sub i128 0, %.036 + %spec.select50 = select i1 %75, i128 %.036, i128 %76 + %77 = add i128 %spec.select50, %5 + %78 = icmp eq i128 %77, -170141183460469231731687303715884105728 + %.039 = select i1 %78, i128 0, i128 %77 br label %.sink.split } diff --git a/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll b/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll index d2a012d43bd..7a014ec6133 100644 --- a/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll +++ b/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll @@ -2853,260 +2853,258 @@ define noundef i16 @"_ZN9softposit5p16e14math4sqrt41_$LT$impl$u20$softposit..p16 ; Function Attrs: nonlazybind uwtable define noundef i16 @"_ZN9softposit5p16e14math6tan_pi41_$LT$impl$u20$softposit..p16e1..P16E1$GT$6tan_pi17hd1c4fa4d534000e7E"(i16 noundef %0) unnamed_addr #2 { %2 = zext i16 %0 to i64 - %3 = and i64 %2, 32768 - %4 = icmp eq i64 %3, 0 - %5 = sub nuw nsw i64 65536, %2 - %spec.select = select i1 %4, i64 %2, i64 %5 - %6 = icmp samesign ugt i64 %spec.select, 31743 - br i1 %6, label %9, label %7 + %3 = sub nuw nsw i64 65536, %2 + %4 = icmp slt i16 %0, 0 + %spec.select = select i1 %4, i64 %3, i64 %2 + %5 = icmp samesign ugt i64 %spec.select, 31743 + br i1 %5, label %8, label %6 -7: ; preds = %1 - %8 = icmp eq i64 %spec.select, 0 - br i1 %8, label %.thread, label %11 +6: ; preds = %1 + %7 = icmp eq i64 %spec.select, 0 + br i1 %7, label %.thread, label %10 -9: ; preds = %1 - %10 = icmp eq i64 %spec.select, 32768 - %. = select i1 %10, i16 -32768, i16 0 +8: ; preds = %1 + %9 = icmp eq i64 %spec.select, 32768 + %. = select i1 %9, i16 -32768, i16 0 br label %.thread -11: ; preds = %7 - %12 = icmp samesign ult i64 %spec.select, 16384 - br i1 %12, label %.preheader81, label %.preheader82 +10: ; preds = %6 + %11 = icmp samesign ult i64 %spec.select, 16384 + br i1 %11, label %.preheader81, label %.preheader82 -.preheader82: ; preds = %11 - %13 = and i64 %spec.select, 8192 - %14 = icmp eq i64 %13, 0 - br i1 %14, label %.loopexit.thread, label %.lr.ph +.preheader82: ; preds = %10 + %12 = and i64 %spec.select, 8192 + %13 = icmp eq i64 %12, 0 + br i1 %13, label %.loopexit.thread, label %.lr.ph -.preheader81: ; preds = %11 - %15 = icmp samesign ult i64 %spec.select, 8192 - br i1 %15, label %.lr.ph89, label %.loopexit.thread +.preheader81: ; preds = %10 + %14 = icmp samesign ult i64 %spec.select, 8192 + br i1 %14, label %.lr.ph89, label %.loopexit.thread -16: ; preds = %38, %43 - %.165 = phi i64 [ %47, %43 ], [ %42, %38 ] - %17 = and i64 %.165, 268435455 - %18 = icmp eq i64 %17, 0 - br i1 %18, label %.thread, label %48 +15: ; preds = %37, %42 + %.165 = phi i64 [ %46, %42 ], [ %41, %37 ] + %16 = and i64 %.165, 268435455 + %17 = icmp eq i64 %16, 0 + br i1 %17, label %.thread, label %47 .lr.ph89: ; preds = %.preheader81, %.lr.ph89 - %.06088 = phi i32 [ %20, %.lr.ph89 ], [ 14, %.preheader81 ] - %.26687 = phi i64 [ %19, %.lr.ph89 ], [ %spec.select, %.preheader81 ] - %19 = shl i64 %.26687, 1 - %20 = add i32 %.06088, -2 - %21 = and i64 %.26687, 4096 - %22 = icmp eq i64 %21, 0 - br i1 %22, label %.lr.ph89, label %.loopexit + %.06088 = phi i32 [ %19, %.lr.ph89 ], [ 14, %.preheader81 ] + %.26687 = phi i64 [ %18, %.lr.ph89 ], [ %spec.select, %.preheader81 ] + %18 = shl i64 %.26687, 1 + %19 = add i32 %.06088, -2 + %20 = and i64 %.26687, 4096 + %21 = icmp eq i64 %20, 0 + br i1 %21, label %.lr.ph89, label %.loopexit .loopexit.thread: ; preds = %.preheader81, %.preheader82 %.2.ph = phi i32 [ 16, %.preheader82 ], [ 14, %.preheader81 ] - %23 = trunc nuw nsw i64 %spec.select to i32 - %24 = lshr i32 %23, 12 - %25 = and i32 %24, 1 - %spec.select73113 = or disjoint i32 %25, %.2.ph - %26 = and i64 %spec.select, 4095 - %27 = or disjoint i64 %26, 4096 - br label %38 + %22 = trunc nuw nsw i64 %spec.select to i32 + %23 = lshr i32 %22, 12 + %24 = and i32 %23, 1 + %spec.select73113 = or disjoint i32 %24, %.2.ph + %25 = and i64 %spec.select, 4095 + %26 = or disjoint i64 %25, 4096 + br label %37 .loopexit: ; preds = %.lr.ph, %.lr.ph89 - %.4 = phi i64 [ %19, %.lr.ph89 ], [ %34, %.lr.ph ] - %.2 = phi i32 [ %20, %.lr.ph89 ], [ %35, %.lr.ph ] - %28 = trunc i64 %.4 to i32 - %29 = lshr i32 %28, 12 - %30 = and i32 %29, 1 - %spec.select73 = or disjoint i32 %30, %.2 - %31 = and i64 %.4, 4094 - %32 = or disjoint i64 %31, 4096 - %33 = icmp slt i32 %.2, 0 - br i1 %33, label %43, label %38 + %.4 = phi i64 [ %18, %.lr.ph89 ], [ %33, %.lr.ph ] + %.2 = phi i32 [ %19, %.lr.ph89 ], [ %34, %.lr.ph ] + %27 = trunc i64 %.4 to i32 + %28 = lshr i32 %27, 12 + %29 = and i32 %28, 1 + %spec.select73 = or disjoint i32 %29, %.2 + %30 = and i64 %.4, 4094 + %31 = or disjoint i64 %30, 4096 + %32 = icmp slt i32 %.2, 0 + br i1 %32, label %42, label %37 .lr.ph: ; preds = %.preheader82, %.lr.ph - %.185 = phi i32 [ %35, %.lr.ph ], [ 16, %.preheader82 ] - %.36784 = phi i64 [ %34, %.lr.ph ], [ %spec.select, %.preheader82 ] - %34 = shl i64 %.36784, 1 - %35 = add i32 %.185, 2 - %36 = and i64 %.36784, 4096 - %37 = icmp eq i64 %36, 0 - br i1 %37, label %.loopexit, label %.lr.ph - -38: ; preds = %.loopexit.thread, %.loopexit - %39 = phi i64 [ %27, %.loopexit.thread ], [ %32, %.loopexit ] + %.185 = phi i32 [ %34, %.lr.ph ], [ 16, %.preheader82 ] + %.36784 = phi i64 [ %33, %.lr.ph ], [ %spec.select, %.preheader82 ] + %33 = shl i64 %.36784, 1 + %34 = add i32 %.185, 2 + %35 = and i64 %.36784, 4096 + %36 = icmp eq i64 %35, 0 + br i1 %36, label %.loopexit, label %.lr.ph + +37: ; preds = %.loopexit.thread, %.loopexit + %38 = phi i64 [ %26, %.loopexit.thread ], [ %31, %.loopexit ] %spec.select73114 = phi i32 [ %spec.select73113, %.loopexit.thread ], [ %spec.select73, %.loopexit ] - %40 = and i32 %spec.select73114, 63 - %41 = zext nneg i32 %40 to i64 - %42 = shl i64 %39, %41 - br label %16 - -43: ; preds = %.loopexit - %44 = sub i32 0, %spec.select73 - %45 = and i32 %44, 63 - %46 = zext nneg i32 %45 to i64 - %47 = lshr i64 %32, %46 - br label %16 - -48: ; preds = %16 - %49 = and i64 %.165, 134217727 - %50 = icmp eq i64 %49, 0 - br i1 %50, label %.thread, label %51 - -.thread: ; preds = %7, %48, %16, %9, %129, %56 - %.0 = phi i16 [ %58, %56 ], [ %134, %129 ], [ %., %9 ], [ 0, %16 ], [ -32768, %48 ], [ 0, %7 ] - ret i16 %.0 + %39 = and i32 %spec.select73114, 63 + %40 = zext nneg i32 %39 to i64 + %41 = shl i64 %38, %40 + br label %15 -51: ; preds = %48 - %52 = icmp samesign ult i64 %17, 134217728 - %53 = xor i64 %3, 32768 - %spec.select74 = select i1 %52, i64 %3, i64 %53 - %54 = and i64 %.165, 67108863 - %55 = icmp eq i64 %54, 0 - br i1 %55, label %56, label %59 +42: ; preds = %.loopexit + %43 = sub i32 0, %spec.select73 + %44 = and i32 %43, 63 + %45 = zext nneg i32 %44 to i64 + %46 = lshr i64 %31, %45 + br label %15 -56: ; preds = %51 - %57 = trunc nuw i64 %spec.select74 to i16 - %58 = or disjoint i16 %57, 16384 +47: ; preds = %15 + %48 = and i64 %.165, 134217727 + %49 = icmp eq i64 %48, 0 + br i1 %49, label %.thread, label %50 + +.thread: ; preds = %6, %47, %15, %8, %127, %55 + %.0 = phi i16 [ %57, %55 ], [ %132, %127 ], [ %., %8 ], [ 0, %15 ], [ -32768, %47 ], [ 0, %6 ] + ret i16 %.0 + +50: ; preds = %47 + %51 = lshr i64 %.165, 12 + %52 = xor i64 %51, %2 + %spec.select74 = and i64 %52, 32768 + %53 = and i64 %.165, 67108863 + %54 = icmp eq i64 %53, 0 + br i1 %54, label %55, label %58 + +55: ; preds = %50 + %56 = trunc nuw i64 %spec.select74 to i16 + %57 = or disjoint i16 %56, 16384 br label %.thread -59: ; preds = %51 - %60 = icmp eq i64 %spec.select74, 0 - %61 = sub nuw nsw i64 134217728, %49 - %spec.select75 = select i1 %60, i64 %49, i64 %61 - %62 = sub nuw nsw i64 134217728, %spec.select75 - %63 = icmp slt i16 %0, 0 - %.6 = select i1 %63, i64 %62, i64 %spec.select75 - %64 = icmp samesign ult i64 %.6, 57345 - br i1 %64, label %.preheader80.thread, label %65 - -65: ; preds = %59 - %66 = lshr i64 %.6, 9 - %67 = mul nuw nsw i64 %66, %66 - %68 = lshr i64 %67, 10 - %69 = mul nuw nsw i64 %68, 13335493 - %70 = lshr i64 %69, 25 - %71 = sub nuw nsw i64 295106440, %70 - %72 = mul nuw nsw i64 %71, %68 - %73 = lshr i64 %72, 27 - %74 = icmp eq i64 %73, 134217728 - br i1 %74, label %77, label %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit, !prof !4 - -.preheader80.thread: ; preds = %59 - %75 = mul nuw nsw i64 %.6, 102943 - %76 = lshr i64 %75, 15 +58: ; preds = %50 + %59 = icmp eq i64 %spec.select74, 0 + %60 = sub nuw nsw i64 134217728, %48 + %spec.select75 = select i1 %59, i64 %48, i64 %60 + %61 = sub nuw nsw i64 134217728, %spec.select75 + %.6 = select i1 %4, i64 %61, i64 %spec.select75 + %62 = icmp samesign ult i64 %.6, 57345 + br i1 %62, label %.preheader80.thread, label %63 + +63: ; preds = %58 + %64 = lshr i64 %.6, 9 + %65 = mul nuw nsw i64 %64, %64 + %66 = lshr i64 %65, 10 + %67 = mul nuw nsw i64 %66, 13335493 + %68 = lshr i64 %67, 25 + %69 = sub nuw nsw i64 295106440, %68 + %70 = mul nuw nsw i64 %69, %66 + %71 = lshr i64 %70, 27 + %72 = icmp eq i64 %71, 134217728 + br i1 %72, label %75, label %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit, !prof !4 + +.preheader80.thread: ; preds = %58 + %73 = mul nuw nsw i64 %.6, 102943 + %74 = lshr i64 %73, 15 br label %.lr.ph94.preheader -77: ; preds = %65 +75: ; preds = %63 tail call void @_ZN4core9panicking5panic17h8ddd58dc57c2dc00E(ptr noalias noundef nonnull readonly align 1 @str.0, i64 noundef 25, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.06d1d8cc65b6b1d93b1e1c71e54a7dce.18) #8 unreachable -_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit: ; preds = %65 - %78 = sub nsw i64 134217728, %73 - %79 = mul nuw nsw i64 %68, 182527 - %80 = lshr i64 %79, 27 - %81 = sub nuw nsw i64 3648552, %80 - %82 = mul nuw nsw i64 %81, %68 - %83 = lshr i64 %82, 23 - %84 = sub nuw nsw i64 105414368, %83 - %85 = shl nuw nsw i64 %66, 11 - %86 = mul nuw nsw i64 %85, %84 - %87 = udiv i64 %86, %78 - %88 = icmp samesign ugt i64 %87, 268435455 - br i1 %88, label %.preheader, label %.preheader80 +_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit: ; preds = %63 + %76 = sub nsw i64 134217728, %71 + %77 = mul nuw nsw i64 %66, 182527 + %78 = lshr i64 %77, 27 + %79 = sub nuw nsw i64 3648552, %78 + %80 = mul nuw nsw i64 %79, %66 + %81 = lshr i64 %80, 23 + %82 = sub nuw nsw i64 105414368, %81 + %83 = shl nuw nsw i64 %64, 11 + %84 = mul nuw nsw i64 %83, %82 + %85 = udiv i64 %84, %76 + %86 = icmp samesign ugt i64 %85, 268435455 + br i1 %86, label %.preheader, label %.preheader80 .preheader80: ; preds = %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit - %89 = icmp samesign ult i64 %87, 134217728 - br i1 %89, label %.lr.ph94.preheader, label %._crit_edge + %87 = icmp samesign ult i64 %85, 134217728 + br i1 %87, label %.lr.ph94.preheader, label %._crit_edge .lr.ph94.preheader: ; preds = %.preheader80.thread, %.preheader80 - %.792.ph = phi i64 [ %87, %.preheader80 ], [ %76, %.preheader80.thread ] + %.792.ph = phi i64 [ %85, %.preheader80 ], [ %74, %.preheader80.thread ] br label %.lr.ph94 .preheader: ; preds = %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit - %90 = and i64 %87, 1099511627776 - %91 = icmp eq i64 %90, 0 - br i1 %91, label %.lr.ph99, label %._crit_edge100 + %88 = and i64 %85, 1099511627776 + %89 = icmp eq i64 %88, 0 + br i1 %89, label %.lr.ph99, label %._crit_edge100 .lr.ph94: ; preds = %.lr.ph94.preheader, %.lr.ph94 - %.06193 = phi i32 [ %93, %.lr.ph94 ], [ 1, %.lr.ph94.preheader ] - %.792 = phi i64 [ %92, %.lr.ph94 ], [ %.792.ph, %.lr.ph94.preheader ] - %92 = shl i64 %.792, 1 - %93 = add i32 %.06193, 1 - %94 = and i64 %.792, 67108864 - %95 = icmp eq i64 %94, 0 - br i1 %95, label %.lr.ph94, label %._crit_edge + %.06193 = phi i32 [ %91, %.lr.ph94 ], [ 1, %.lr.ph94.preheader ] + %.792 = phi i64 [ %90, %.lr.ph94 ], [ %.792.ph, %.lr.ph94.preheader ] + %90 = shl i64 %.792, 1 + %91 = add i32 %.06193, 1 + %92 = and i64 %.792, 67108864 + %93 = icmp eq i64 %92, 0 + br i1 %93, label %.lr.ph94, label %._crit_edge ._crit_edge: ; preds = %.lr.ph94, %.preheader80 - %.7.lcssa = phi i64 [ %87, %.preheader80 ], [ %92, %.lr.ph94 ] - %.061.lcssa = phi i32 [ 1, %.preheader80 ], [ %93, %.lr.ph94 ] - %96 = and i32 %.061.lcssa, 1 - %97 = ashr i32 %.061.lcssa, 1 - %98 = add nsw i32 %97, 14 - %99 = add nsw i32 %98, %96 - %100 = icmp eq i32 %96, 0 - %101 = and i64 %.7.lcssa, 134217727 - %spec.select76 = select i1 %100, i64 %101, i64 %.7.lcssa - %102 = or i64 %spec.select76, 268435456 - br label %103 - -103: ; preds = %._crit_edge100, %._crit_edge - %.10 = phi i64 [ %124, %._crit_edge100 ], [ %102, %._crit_edge ] - %.263 = phi i32 [ %118, %._crit_edge100 ], [ %99, %._crit_edge ] - %104 = add nsw i32 %.263, 63 - %105 = and i32 %104, 63 - %106 = zext nneg i32 %105 to i64 - %107 = shl nuw i64 1, %106 - %108 = and i64 %107, %.10 - %109 = icmp eq i64 %108, 0 - br i1 %109, label %129, label %125 + %.7.lcssa = phi i64 [ %85, %.preheader80 ], [ %90, %.lr.ph94 ] + %.061.lcssa = phi i32 [ 1, %.preheader80 ], [ %91, %.lr.ph94 ] + %94 = and i32 %.061.lcssa, 1 + %95 = ashr i32 %.061.lcssa, 1 + %96 = add nsw i32 %95, 14 + %97 = add nsw i32 %96, %94 + %98 = icmp eq i32 %94, 0 + %99 = and i64 %.7.lcssa, 134217727 + %spec.select76 = select i1 %98, i64 %99, i64 %.7.lcssa + %100 = or i64 %spec.select76, 268435456 + br label %101 + +101: ; preds = %._crit_edge100, %._crit_edge + %.10 = phi i64 [ %122, %._crit_edge100 ], [ %100, %._crit_edge ] + %.263 = phi i32 [ %116, %._crit_edge100 ], [ %97, %._crit_edge ] + %102 = add nsw i32 %.263, 63 + %103 = and i32 %102, 63 + %104 = zext nneg i32 %103 to i64 + %105 = shl nuw i64 1, %104 + %106 = and i64 %105, %.10 + %107 = icmp eq i64 %106, 0 + br i1 %107, label %127, label %123 .lr.ph99: ; preds = %.preheader, %.lr.ph99 - %.16298 = phi i32 [ %111, %.lr.ph99 ], [ 12, %.preheader ] - %.897 = phi i64 [ %110, %.lr.ph99 ], [ %87, %.preheader ] - %110 = shl i64 %.897, 1 - %111 = add i32 %.16298, -1 - %112 = and i64 %.897, 549755813888 - %113 = icmp eq i64 %112, 0 - br i1 %113, label %.lr.ph99, label %._crit_edge100 + %.16298 = phi i32 [ %109, %.lr.ph99 ], [ 12, %.preheader ] + %.897 = phi i64 [ %108, %.lr.ph99 ], [ %85, %.preheader ] + %108 = shl i64 %.897, 1 + %109 = add i32 %.16298, -1 + %110 = and i64 %.897, 549755813888 + %111 = icmp eq i64 %110, 0 + br i1 %111, label %.lr.ph99, label %._crit_edge100 ._crit_edge100: ; preds = %.lr.ph99, %.preheader - %.8.lcssa = phi i64 [ %87, %.preheader ], [ %110, %.lr.ph99 ] - %.162.lcssa = phi i32 [ 12, %.preheader ], [ %111, %.lr.ph99 ] - %114 = and i32 %.162.lcssa, 1 - %115 = icmp eq i32 %114, 0 - %116 = and i64 %.8.lcssa, 1099511627775 - %spec.select77 = select i1 %115, i64 %116, i64 %.8.lcssa - %117 = ashr i32 %.162.lcssa, 1 - %118 = add nsw i32 %117, 28 - %119 = add nsw i32 %117, 42 - %120 = and i32 %119, 63 - %121 = zext nneg i32 %120 to i64 - %122 = shl i64 2, %121 - %123 = add i64 %122, -4398046511104 - %124 = or i64 %123, %spec.select77 - br label %103 - -125: ; preds = %103 - %126 = add i64 %107, -1 - %127 = and i64 %126, %.10 - %128 = icmp eq i64 %127, 0 - br i1 %128, label %135, label %139 - -129: ; preds = %139, %135, %103 - %.12 = phi i64 [ %.10, %103 ], [ %.10, %135 ], [ %140, %139 ] - %130 = and i32 %.263, 63 - %131 = zext nneg i32 %130 to i64 - %132 = lshr i64 %.12, %131 - %133 = sub i64 0, %132 - %spec.select78 = select i1 %60, i64 %132, i64 %133 - %134 = trunc i64 %spec.select78 to i16 + %.8.lcssa = phi i64 [ %85, %.preheader ], [ %108, %.lr.ph99 ] + %.162.lcssa = phi i32 [ 12, %.preheader ], [ %109, %.lr.ph99 ] + %112 = and i32 %.162.lcssa, 1 + %113 = icmp eq i32 %112, 0 + %114 = and i64 %.8.lcssa, 1099511627775 + %spec.select77 = select i1 %113, i64 %114, i64 %.8.lcssa + %115 = ashr i32 %.162.lcssa, 1 + %116 = add nsw i32 %115, 28 + %117 = add nsw i32 %115, 42 + %118 = and i32 %117, 63 + %119 = zext nneg i32 %118 to i64 + %120 = shl i64 2, %119 + %121 = add i64 %120, -4398046511104 + %122 = or i64 %121, %spec.select77 + br label %101 + +123: ; preds = %101 + %124 = add i64 %105, -1 + %125 = and i64 %124, %.10 + %126 = icmp eq i64 %125, 0 + br i1 %126, label %133, label %137 + +127: ; preds = %137, %133, %101 + %.12 = phi i64 [ %.10, %101 ], [ %.10, %133 ], [ %138, %137 ] + %128 = and i32 %.263, 63 + %129 = zext nneg i32 %128 to i64 + %130 = lshr i64 %.12, %129 + %131 = sub i64 0, %130 + %spec.select78 = select i1 %59, i64 %130, i64 %131 + %132 = trunc i64 %spec.select78 to i16 br label %.thread -135: ; preds = %125 - %136 = shl i64 2, %106 - %137 = and i64 %136, %.10 - %138 = icmp eq i64 %137, 0 - br i1 %138, label %129, label %139 +133: ; preds = %123 + %134 = shl i64 2, %104 + %135 = and i64 %134, %.10 + %136 = icmp eq i64 %135, 0 + br i1 %136, label %127, label %137 -139: ; preds = %135, %125 - %140 = add i64 %107, %.10 - br label %129 +137: ; preds = %133, %123 + %138 = add i64 %105, %.10 + br label %127 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -3657,13 +3655,13 @@ define noundef i16 @"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P1 %3 = icmp eq i16 %0, -32768 %4 = icmp eq i16 %1, -32768 %or.cond = or i1 %3, %4 - br i1 %or.cond, label %51, label %5 + br i1 %or.cond, label %53, label %5 5: ; preds = %2 %6 = icmp eq i16 %0, 0 %7 = icmp eq i16 %1, 0 %or.cond1 = or i1 %6, %7 - br i1 %or.cond1, label %51, label %8 + br i1 %or.cond1, label %53, label %8 8: ; preds = %5 %9 = and i16 %0, -32768 @@ -3759,25 +3757,24 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51: ; preds %45 = zext nneg i16 %41 to i32 %46 = mul nuw nsw i32 %45, %44 %47 = icmp samesign ugt i8 %43, 1 - %48 = xor i8 %43, 2 - %49 = zext i1 %47 to i8 - %.029 = add i8 %42, %49 - %.028 = select i1 %47, i8 %48, i8 %43 - %50 = icmp samesign ult i32 %46, 536870912 - br i1 %50, label %52, label %66 - -51: ; preds = %5, %2, %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" + %48 = zext i1 %47 to i8 + %.029 = add i8 %42, %48 + %.028 = and i8 %43, 1 + %49 = icmp samesign ugt i32 %46, 536870911 + %50 = zext i1 %49 to i32 + %.032 = lshr exact i32 %46, %50 + %spec.select37 = select i1 %49, i8 %.028, i8 0 + %.130 = add i8 %.029, %spec.select37 + %51 = zext i1 %49 to i8 + %.1 = xor i8 %.028, %51 + %52 = icmp slt i8 %.130, 0 + br i1 %52, label %60, label %54 + +53: ; preds = %5, %2, %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" %.0 = phi i16 [ %.0.i52, %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" ], [ -32768, %2 ], [ 0, %5 ] ret i16 %.0 -52: ; preds = %66, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 - %.032 = phi i32 [ %46, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 ], [ %70, %66 ] - %.130 = phi i8 [ %.029, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 ], [ %spec.select37, %66 ] - %.1 = phi i8 [ %.028, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 ], [ %69, %66 ] - %53 = icmp slt i8 %.130, 0 - br i1 %53, label %60, label %54 - -54: ; preds = %52 +54: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 %55 = add nuw i8 %.130, 1 %56 = and i8 %55, 15 %57 = zext nneg i8 %56 to i16 @@ -3785,7 +3782,7 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51: ; preds %59 = xor i16 %58, 32767 br label %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit -60: ; preds = %52 +60: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 %61 = sub i8 0, %.130 %62 = and i8 %61, 15 %63 = zext nneg i8 %62 to i16 @@ -3796,61 +3793,53 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %.sroa.51.0.in.i = phi i8 [ %61, %60 ], [ %55, %54 ] %.sroa.0.0.i = phi i16 [ %64, %60 ], [ %59, %54 ] %65 = icmp ugt i8 %.sroa.51.0.in.i, 14 - br i1 %65, label %96, label %71 - -66: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 - %67 = icmp ne i8 %.028, 0 - %68 = zext i1 %67 to i8 - %spec.select37 = add i8 %.029, %68 - %69 = xor i8 %.028, 1 - %70 = lshr exact i32 %46, 1 - br label %52 - -71: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit - %72 = and i32 %.032, 268435455 + br i1 %65, label %91, label %66 + +66: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit + %67 = and i32 %.032, 268435455 %narrow = add nuw nsw i8 %.sroa.51.0.in.i, 31 - %73 = and i8 %narrow, 31 - %74 = zext nneg i8 %73 to i32 - %75 = lshr i32 %72, %74 - %76 = lshr i32 %75, 16 - %77 = trunc nuw nsw i32 %76 to i16 - %78 = icmp eq i8 %.sroa.51.0.in.i, 14 - %79 = icmp ne i8 %.1, 0 - %80 = and i32 %75, 32768 - %81 = icmp ne i32 %80, 0 - %.08.i = select i1 %78, i1 %79, i1 %81 - %.1.i = select i1 %78, i16 0, i16 %77 - %82 = zext nneg i8 %.1 to i16 - %83 = sub nsw i8 13, %.sroa.51.0.in.i - %84 = and i8 %83, 15 - %85 = zext nneg i8 %84 to i16 - %86 = shl i16 %82, %85 - %.011.i = select i1 %78, i16 0, i16 %86 - %87 = add i16 %.011.i, %.sroa.0.0.i - %88 = add i16 %87, %.1.i - br i1 %.08.i, label %89, label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" - -89: ; preds = %71 - %.not.i = icmp ne i32 %75, 0 - %.110.i = and i1 %78, %.not.i - %90 = and i32 %75, 32767 - %91 = icmp ne i32 %90, 0 - %spec.select13.i = or i1 %91, %.110.i - %92 = and i16 %88, 1 - %93 = zext i1 %spec.select13.i to i16 - %94 = or i16 %92, %93 - %95 = add i16 %94, %88 + %68 = and i8 %narrow, 31 + %69 = zext nneg i8 %68 to i32 + %70 = lshr i32 %67, %69 + %71 = lshr i32 %70, 16 + %72 = trunc nuw nsw i32 %71 to i16 + %73 = icmp eq i8 %.sroa.51.0.in.i, 14 + %74 = icmp ne i8 %.028, %51 + %75 = and i32 %70, 32768 + %76 = icmp ne i32 %75, 0 + %.08.i = select i1 %73, i1 %74, i1 %76 + %.1.i = select i1 %73, i16 0, i16 %72 + %77 = zext nneg i8 %.1 to i16 + %78 = sub nsw i8 13, %.sroa.51.0.in.i + %79 = and i8 %78, 15 + %80 = zext nneg i8 %79 to i16 + %81 = shl nuw i16 %77, %80 + %.011.i = select i1 %73, i16 0, i16 %81 + %82 = add nuw i16 %.011.i, %.sroa.0.0.i + %83 = add i16 %82, %.1.i + br i1 %.08.i, label %84, label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" + +84: ; preds = %66 + %.not.i = icmp ne i32 %70, 0 + %.110.i = and i1 %73, %.not.i + %85 = and i32 %70, 32767 + %86 = icmp ne i32 %85, 0 + %spec.select13.i = or i1 %86, %.110.i + %87 = and i16 %83, 1 + %88 = zext i1 %spec.select13.i to i16 + %89 = or i16 %87, %88 + %90 = add i16 %89, %83 br label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" -96: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit - %. = select i1 %53, i16 1, i16 32767 +91: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit + %. = select i1 %52, i16 1, i16 32767 br label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" -"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit": ; preds = %89, %71, %96 - %.031 = phi i16 [ %., %96 ], [ %95, %89 ], [ %88, %71 ] - %97 = sub i16 0, %.031 - %.0.i52 = select i1 %12, i16 %97, i16 %.031 - br label %51 +"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit": ; preds = %84, %66, %91 + %.031 = phi i16 [ %., %91 ], [ %90, %84 ], [ %83, %66 ] + %92 = sub i16 0, %.031 + %.0.i52 = select i1 %12, i16 %92, i16 %.031 + br label %53 } ; Function Attrs: nofree norecurse nosync nounwind nonlazybind memory(none) uwtable diff --git a/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll b/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll index fdf7eab393a..2a40217aaed 100644 --- a/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll +++ b/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll @@ -121,365 +121,350 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241: ; pred %53 = or i16 %52, -32768 %54 = zext i16 %53 to i32 %55 = mul nuw i32 %54, %51 - %56 = icmp samesign ugt i8 %50, 1 - %57 = xor i8 %50, 2 - %.0180 = select i1 %56, i8 %57, i8 %50 - %58 = zext i1 %56 to i8 - %.0168 = add i8 %47, %58 - %59 = icmp sgt i32 %55, -1 - br i1 %59, label %61, label %63 - -60: ; preds = %11, %108, %4, %219 - %.0165 = phi i16 [ %.0.i, %219 ], [ -32768, %4 ], [ 0, %108 ], [ %spec.select227, %11 ] + %.0180 = and i8 %50, 1 + %56 = and i8 %49, %34 + %.0168 = add i8 %47, %56 + %57 = icmp slt i32 %55, 0 + %.lobit296 = lshr i32 %55, 31 + %.0186 = lshr exact i32 %55, %.lobit296 + %58 = trunc nuw nsw i32 %.lobit296 to i8 + %.1181 = xor i8 %.0180, %58 + %spec.select221 = select i1 %57, i8 %.0180, i8 0 + %.1169 = add i8 %.0168, %spec.select221 + %59 = icmp eq i16 %2, 0 + br i1 %59, label %84, label %61 + +60: ; preds = %11, %101, %4, %212 + %.0165 = phi i16 [ %.0.i, %212 ], [ -32768, %4 ], [ 0, %101 ], [ %spec.select227, %11 ] ret i16 %.0165 -61: ; preds = %63, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 - %.0186 = phi i32 [ %55, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ], [ %67, %63 ] - %.1181 = phi i8 [ %.0180, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ], [ %66, %63 ] - %.1169 = phi i8 [ %.0168, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ], [ %spec.select221, %63 ] - %62 = icmp eq i16 %2, 0 - br i1 %62, label %91, label %68 - -63: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 - %64 = icmp ne i8 %.0180, 0 - %65 = zext i1 %64 to i8 - %spec.select221 = add i8 %.0168, %65 - %66 = xor i8 %.0180, 1 - %67 = lshr exact i32 %55, 1 - br label %61 - -68: ; preds = %61 - %69 = shl i16 %.0163, 2 - %70 = icmp samesign ult i16 %.0163, 16384 - %71 = icmp sgt i16 %69, -1 - br i1 %70, label %.preheader.i248, label %.preheader12.i242 - -.preheader12.i242: ; preds = %68 - br i1 %71, label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255, label %.lr.ph.i243 +61: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 + %62 = shl i16 %.0163, 2 + %63 = icmp samesign ult i16 %.0163, 16384 + %64 = icmp sgt i16 %62, -1 + br i1 %63, label %.preheader.i248, label %.preheader12.i242 + +.preheader12.i242: ; preds = %61 + br i1 %64, label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255, label %.lr.ph.i243 -.preheader.i248: ; preds = %68 - br i1 %71, label %.lr.ph18.i252, label %._crit_edge.i249 +.preheader.i248: ; preds = %61 + br i1 %64, label %.lr.ph18.i252, label %._crit_edge.i249 .lr.ph18.i252: ; preds = %.preheader.i248, %.lr.ph18.i252 - %.017.i253 = phi i16 [ %73, %.lr.ph18.i252 ], [ %69, %.preheader.i248 ] - %.0916.i254 = phi i8 [ %72, %.lr.ph18.i252 ], [ -1, %.preheader.i248 ] - %72 = add i8 %.0916.i254, -1 - %73 = shl nuw i16 %.017.i253, 1 - %74 = icmp sgt i16 %73, -1 - br i1 %74, label %.lr.ph18.i252, label %._crit_edge.i249 + %.017.i253 = phi i16 [ %66, %.lr.ph18.i252 ], [ %62, %.preheader.i248 ] + %.0916.i254 = phi i8 [ %65, %.lr.ph18.i252 ], [ -1, %.preheader.i248 ] + %65 = add i8 %.0916.i254, -1 + %66 = shl nuw i16 %.017.i253, 1 + %67 = icmp sgt i16 %66, -1 + br i1 %67, label %.lr.ph18.i252, label %._crit_edge.i249 ._crit_edge.i249: ; preds = %.lr.ph18.i252, %.preheader.i248 - %.09.lcssa.i250 = phi i8 [ -1, %.preheader.i248 ], [ %72, %.lr.ph18.i252 ] - %.0.lcssa.i251 = phi i16 [ %69, %.preheader.i248 ], [ %73, %.lr.ph18.i252 ] - %75 = and i16 %.0.lcssa.i251, 32764 + %.09.lcssa.i250 = phi i8 [ -1, %.preheader.i248 ], [ %65, %.lr.ph18.i252 ] + %.0.lcssa.i251 = phi i16 [ %62, %.preheader.i248 ], [ %66, %.lr.ph18.i252 ] + %68 = and i16 %.0.lcssa.i251, 32764 br label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 .lr.ph.i243: ; preds = %.preheader12.i242, %.lr.ph.i243 - %.114.i244 = phi i16 [ %77, %.lr.ph.i243 ], [ %69, %.preheader12.i242 ] - %.11013.i245 = phi i8 [ %76, %.lr.ph.i243 ], [ 0, %.preheader12.i242 ] - %76 = add nuw nsw i8 %.11013.i245, 1 - %77 = shl i16 %.114.i244, 1 - %78 = icmp sgt i16 %77, -1 - br i1 %78, label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255, label %.lr.ph.i243 + %.114.i244 = phi i16 [ %70, %.lr.ph.i243 ], [ %62, %.preheader12.i242 ] + %.11013.i245 = phi i8 [ %69, %.lr.ph.i243 ], [ 0, %.preheader12.i242 ] + %69 = add nuw nsw i8 %.11013.i245, 1 + %70 = shl i16 %.114.i244, 1 + %71 = icmp sgt i16 %70, -1 + br i1 %71, label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255, label %.lr.ph.i243 _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255: ; preds = %.lr.ph.i243, %.preheader12.i242, %._crit_edge.i249 - %.211.i246 = phi i8 [ %.09.lcssa.i250, %._crit_edge.i249 ], [ 0, %.preheader12.i242 ], [ %76, %.lr.ph.i243 ] - %.2.i247 = phi i16 [ %75, %._crit_edge.i249 ], [ %69, %.preheader12.i242 ], [ %77, %.lr.ph.i243 ] - %79 = lshr i16 %.2.i247, 14 - %80 = trunc nuw nsw i16 %79 to i8 - %81 = or i16 %.2.i247, 16384 - %82 = zext nneg i16 %81 to i32 - %83 = shl nuw nsw i32 %82, 16 - %84 = sub i8 %.1169, %.211.i246 - %85 = sext i8 %84 to i16 - %86 = shl nsw i16 %85, 1 - %87 = sub nsw i8 %.1181, %80 - %88 = sext i8 %87 to i16 - %89 = add nsw i16 %86, %88 - %90 = icmp slt i16 %89, 0 - br i1 %90, label %106, label %105 - -91: ; preds = %61, %._crit_edge, %.thread277, %173 - %.0192 = phi i8 [ %.1193261321, %.thread277 ], [ %.1193261320336, %._crit_edge ], [ %.8200, %173 ], [ 0, %61 ] - %.1187 = phi i32 [ %188, %.thread277 ], [ %.10.lcssa, %._crit_edge ], [ %179, %173 ], [ %.0186, %61 ] - %.2182 = phi i8 [ %187, %.thread277 ], [ %.3183263317337, %._crit_edge ], [ %176, %173 ], [ %.1181, %61 ] - %.0173 = phi i1 [ %.2175264316, %.thread277 ], [ %.2175264315338, %._crit_edge ], [ %19, %173 ], [ %19, %61 ] - %.0170 = phi i8 [ %spec.select223, %.thread277 ], [ %.3.lcssa, %._crit_edge ], [ %spec.select222, %173 ], [ %.1169, %61 ] - %92 = icmp slt i8 %.0170, 0 - br i1 %92, label %99, label %93 - -93: ; preds = %91 - %94 = add nuw i8 %.0170, 1 - %95 = and i8 %94, 15 - %96 = zext nneg i8 %95 to i16 - %97 = lshr i16 32767, %96 - %98 = xor i16 %97, 32767 + %.211.i246 = phi i8 [ %.09.lcssa.i250, %._crit_edge.i249 ], [ 0, %.preheader12.i242 ], [ %69, %.lr.ph.i243 ] + %.2.i247 = phi i16 [ %68, %._crit_edge.i249 ], [ %62, %.preheader12.i242 ], [ %70, %.lr.ph.i243 ] + %72 = lshr i16 %.2.i247, 14 + %73 = trunc nuw nsw i16 %72 to i8 + %74 = or i16 %.2.i247, 16384 + %75 = zext nneg i16 %74 to i32 + %76 = shl nuw nsw i32 %75, 16 + %77 = sub i8 %.1169, %.211.i246 + %78 = sext i8 %77 to i16 + %79 = shl nsw i16 %78, 1 + %80 = sub nsw i8 %.1181, %73 + %81 = sext i8 %80 to i16 + %82 = add nsw i16 %79, %81 + %83 = icmp slt i16 %82, 0 + br i1 %83, label %99, label %98 + +84: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241, %._crit_edge, %.thread277, %166 + %.0192 = phi i8 [ %.1193261323, %.thread277 ], [ %.1193261322329, %._crit_edge ], [ %.8200, %166 ], [ 0, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.1187 = phi i32 [ %181, %.thread277 ], [ %.10.lcssa, %._crit_edge ], [ %172, %166 ], [ %.0186, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.2182 = phi i8 [ %180, %.thread277 ], [ %.3183263319330, %._crit_edge ], [ %169, %166 ], [ %.1181, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.0173 = phi i1 [ %.2175264318, %.thread277 ], [ %.2175264317331, %._crit_edge ], [ %19, %166 ], [ %19, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.0170 = phi i8 [ %spec.select223, %.thread277 ], [ %.3.lcssa, %._crit_edge ], [ %spec.select222, %166 ], [ %.1169, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %85 = icmp slt i8 %.0170, 0 + br i1 %85, label %92, label %86 + +86: ; preds = %84 + %87 = add nuw i8 %.0170, 1 + %88 = and i8 %87, 15 + %89 = zext nneg i8 %88 to i16 + %90 = lshr i16 32767, %89 + %91 = xor i16 %90, 32767 br label %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit -99: ; preds = %91 - %100 = sub i8 0, %.0170 - %101 = and i8 %100, 15 - %102 = zext nneg i8 %101 to i16 - %103 = lshr i16 16384, %102 +92: ; preds = %84 + %93 = sub i8 0, %.0170 + %94 = and i8 %93, 15 + %95 = zext nneg i8 %94 to i16 + %96 = lshr i16 16384, %95 br label %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit -_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %93, %99 - %.sroa.51.0.in.i = phi i8 [ %100, %99 ], [ %94, %93 ] - %.sroa.0.0.i = phi i16 [ %103, %99 ], [ %98, %93 ] +_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %86, %92 + %.sroa.51.0.in.i = phi i8 [ %93, %92 ], [ %87, %86 ] + %.sroa.0.0.i = phi i16 [ %96, %92 ], [ %91, %86 ] %.sroa.6.0.extract.trunc = sext i8 %.sroa.51.0.in.i to i32 - %104 = icmp ugt i8 %.sroa.51.0.in.i, 14 - br i1 %104, label %192, label %189 + %97 = icmp ugt i8 %.sroa.51.0.in.i, 14 + br i1 %97, label %185, label %182 + +98: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 + %.not = icmp eq i16 %82, 0 + br i1 %.not, label %101, label %104 + +99: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 + %100 = icmp samesign ult i16 %82, -30 + br i1 %100, label %146, label %140 -105: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 - %.not = icmp eq i16 %89, 0 - br i1 %.not, label %108, label %111 +101: ; preds = %98 + %102 = icmp eq i32 %76, %.0186 + %103 = xor i1 %19, %18 + %or.cond8 = and i1 %103, %102 + br i1 %or.cond8, label %60, label %106 -106: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 - %107 = icmp samesign ult i16 %89, -30 - br i1 %107, label %153, label %147 +104: ; preds = %98 + %105 = icmp samesign ugt i16 %82, 30 + br i1 %105, label %121, label %114 -108: ; preds = %105 - %109 = icmp eq i32 %83, %.0186 - %110 = xor i1 %19, %18 - %or.cond8 = and i1 %110, %109 - br i1 %or.cond8, label %60, label %113 +106: ; preds = %101 + br i1 %103, label %107, label %.thread266 -111: ; preds = %105 - %112 = icmp samesign ugt i16 %89, 30 - br i1 %112, label %128, label %121 +107: ; preds = %106 + %108 = icmp samesign ult i32 %.0186, %76 + br i1 %108, label %112, label %110 -113: ; preds = %108 - br i1 %110, label %114, label %.thread266 +.thread266: ; preds = %106 + %109 = add nuw i32 %76, %.0186 + br label %166 -114: ; preds = %113 - %115 = icmp samesign ult i32 %.0186, %83 - br i1 %115, label %119, label %117 +110: ; preds = %107 + %111 = sub nuw nsw i32 %.0186, %76 + br label %.thread -.thread266: ; preds = %113 - %116 = add nuw i32 %83, %.0186 - br label %173 +112: ; preds = %107 + %113 = sub nuw nsw i32 %76, %.0186 + br label %.thread -117: ; preds = %114 - %118 = sub nuw nsw i32 %.0186, %83 +114: ; preds = %104 + %115 = sub nsw i16 0, %82 + %116 = and i16 %115, 31 + %117 = zext nneg i16 %116 to i32 + %118 = shl i32 %76, %117 + %119 = icmp eq i32 %118, 0 + %120 = xor i1 %19, %18 + br i1 %119, label %123, label %124 + +121: ; preds = %104 + %122 = xor i1 %19, %18 + br i1 %122, label %129, label %135 + +123: ; preds = %114 + br i1 %120, label %125, label %135 + +124: ; preds = %114 + br i1 %120, label %131, label %135 + +125: ; preds = %123 + %126 = zext nneg i16 %82 to i32 + %127 = lshr i32 %76, %126 + %128 = sub nuw nsw i32 %.0186, %127 br label %.thread -119: ; preds = %114 - %120 = sub nuw nsw i32 %83, %.0186 +129: ; preds = %121, %131 + %.4190 = phi i32 [ %134, %131 ], [ %.0186, %121 ] + %130 = add nsw i32 %.4190, -1 br label %.thread -121: ; preds = %111 - %122 = sub nsw i16 0, %89 - %123 = and i16 %122, 31 - %124 = zext nneg i16 %123 to i32 - %125 = shl i32 %83, %124 - %126 = icmp eq i32 %125, 0 - %127 = xor i1 %19, %18 - br i1 %126, label %130, label %131 - -128: ; preds = %111 - %129 = xor i1 %19, %18 - br i1 %129, label %136, label %142 - -130: ; preds = %121 - br i1 %127, label %132, label %142 - -131: ; preds = %121 - br i1 %127, label %138, label %142 - -132: ; preds = %130 - %133 = zext nneg i16 %89 to i32 - %134 = lshr i32 %83, %133 - %135 = sub nuw nsw i32 %.0186, %134 - br label %.preheader - -136: ; preds = %128, %138 - %.4190 = phi i32 [ %141, %138 ], [ %.0186, %128 ] - %137 = add nsw i32 %.4190, -1 - br label %.preheader - -138: ; preds = %131 - %139 = zext nneg i16 %89 to i32 - %140 = lshr i32 %83, %139 - %141 = sub nuw nsw i32 %.0186, %140 - br label %136 - -142: ; preds = %128, %130, %131, %162 - %.sink = phi i16 [ %163, %162 ], [ 0, %128 ], [ %89, %130 ], [ %89, %131 ] - %.6.sink = phi i32 [ %.6, %162 ], [ 0, %128 ], [ %83, %130 ], [ %83, %131 ] - %.sink352 = phi i32 [ %83, %162 ], [ %.0186, %128 ], [ %.0186, %130 ], [ %.0186, %131 ] - %.1193 = phi i8 [ %.5197, %162 ], [ 1, %128 ], [ 0, %130 ], [ 1, %131 ] - %.3183 = phi i8 [ %80, %162 ], [ %.1181, %128 ], [ %.1181, %130 ], [ %.1181, %131 ] - %.1171 = phi i8 [ %.211.i246, %162 ], [ %.1169, %128 ], [ %.1169, %130 ], [ %.1169, %131 ] - %143 = zext nneg i16 %.sink to i32 - %144 = lshr i32 %.6.sink, %143 - %145 = add nuw i32 %144, %.sink352 - %146 = icmp sgt i32 %145, -1 - br i1 %146, label %._crit_edge, label %173 - -147: ; preds = %106 - %148 = and i16 %89, 31 - %149 = zext nneg i16 %148 to i32 - %150 = shl i32 %.0186, %149 - %151 = icmp eq i32 %150, 0 - %152 = xor i1 %19, %18 - br i1 %151, label %155, label %156 - -153: ; preds = %106 - %154 = xor i1 %19, %18 - br i1 %154, label %164, label %162 - -155: ; preds = %147 - br i1 %152, label %157, label %162 - -156: ; preds = %147 - br i1 %152, label %166, label %162 - -157: ; preds = %155 - %158 = sub nsw i16 0, %89 - %159 = zext nneg i16 %158 to i32 - %160 = lshr i32 %.0186, %159 - %161 = sub nuw nsw i32 %83, %160 - br label %.preheader - -162: ; preds = %156, %155, %153 - %.5197 = phi i8 [ 1, %153 ], [ 0, %155 ], [ 1, %156 ] - %.6 = phi i32 [ 0, %153 ], [ %.0186, %155 ], [ %.0186, %156 ] - %.1 = phi i16 [ 0, %153 ], [ %89, %155 ], [ %89, %156 ] - %163 = sub nsw i16 0, %.1 - br label %142 - -164: ; preds = %153, %166 - %.7 = phi i32 [ %170, %166 ], [ %83, %153 ] - %165 = add nsw i32 %.7, -1 +131: ; preds = %124 + %132 = zext nneg i16 %82 to i32 + %133 = lshr i32 %76, %132 + %134 = sub nuw nsw i32 %.0186, %133 + br label %129 + +135: ; preds = %121, %123, %124, %155 + %.sink = phi i16 [ %156, %155 ], [ 0, %121 ], [ %82, %123 ], [ %82, %124 ] + %.6.sink = phi i32 [ %.6, %155 ], [ 0, %121 ], [ %76, %123 ], [ %76, %124 ] + %.sink354 = phi i32 [ %76, %155 ], [ %.0186, %121 ], [ %.0186, %123 ], [ %.0186, %124 ] + %.1193 = phi i8 [ %.5197, %155 ], [ 1, %121 ], [ 0, %123 ], [ 1, %124 ] + %.3183 = phi i8 [ %73, %155 ], [ %.1181, %121 ], [ %.1181, %123 ], [ %.1181, %124 ] + %.1171 = phi i8 [ %.211.i246, %155 ], [ %.1169, %121 ], [ %.1169, %123 ], [ %.1169, %124 ] + %136 = zext nneg i16 %.sink to i32 + %137 = lshr i32 %.6.sink, %136 + %138 = add nuw i32 %137, %.sink354 + %139 = icmp sgt i32 %138, -1 + br i1 %139, label %._crit_edge, label %166 + +140: ; preds = %99 + %141 = and i16 %82, 31 + %142 = zext nneg i16 %141 to i32 + %143 = shl i32 %.0186, %142 + %144 = icmp eq i32 %143, 0 + %145 = xor i1 %19, %18 + br i1 %144, label %148, label %149 + +146: ; preds = %99 + %147 = xor i1 %19, %18 + br i1 %147, label %157, label %155 + +148: ; preds = %140 + br i1 %145, label %150, label %155 + +149: ; preds = %140 + br i1 %145, label %159, label %155 + +150: ; preds = %148 + %151 = sub nsw i16 0, %82 + %152 = zext nneg i16 %151 to i32 + %153 = lshr i32 %.0186, %152 + %154 = sub nuw nsw i32 %76, %153 + br label %.thread + +155: ; preds = %149, %148, %146 + %.5197 = phi i8 [ 1, %146 ], [ 0, %148 ], [ 1, %149 ] + %.6 = phi i32 [ 0, %146 ], [ %.0186, %148 ], [ %.0186, %149 ] + %.1 = phi i16 [ 0, %146 ], [ %82, %148 ], [ %82, %149 ] + %156 = sub nsw i16 0, %.1 + br label %135 + +157: ; preds = %146, %159 + %.7 = phi i32 [ %163, %159 ], [ %76, %146 ] + %158 = add nsw i32 %.7, -1 br label %.thread -166: ; preds = %156 - %167 = sub nsw i16 0, %89 - %168 = zext nneg i16 %167 to i32 - %169 = lshr i32 %.0186, %168 - %170 = sub nuw nsw i32 %83, %169 - br label %164 - -.thread: ; preds = %164, %117, %119 - %.1171265 = phi i8 [ %.211.i246, %164 ], [ %.1169, %119 ], [ %.1169, %117 ] - %.2175264 = phi i1 [ %18, %164 ], [ %18, %119 ], [ %19, %117 ] - %.3183263 = phi i8 [ %80, %164 ], [ %.1181, %119 ], [ %.1181, %117 ] - %.3189262 = phi i32 [ %165, %164 ], [ %120, %119 ], [ %118, %117 ] - %.1193261 = phi i8 [ 1, %164 ], [ 0, %119 ], [ 0, %117 ] - %171 = icmp eq i32 %.3189262, 0 - br i1 %171, label %.thread277, label %.preheader - -.preheader: ; preds = %132, %136, %157, %.thread - %.1193261320 = phi i8 [ %.1193261, %.thread ], [ 0, %132 ], [ 1, %136 ], [ 0, %157 ] - %.3189262319 = phi i32 [ %.3189262, %.thread ], [ %135, %132 ], [ %137, %136 ], [ %161, %157 ] - %.3183263317 = phi i8 [ %.3183263, %.thread ], [ %.1181, %132 ], [ %.1181, %136 ], [ %80, %157 ] - %.2175264315 = phi i1 [ %.2175264, %.thread ], [ %19, %132 ], [ %19, %136 ], [ %18, %157 ] - %.1171265314 = phi i8 [ %.1171265, %.thread ], [ %.1169, %132 ], [ %.1169, %136 ], [ %.211.i246, %157 ] - %172 = icmp samesign ult i32 %.3189262319, 536870912 - br i1 %172, label %.lr.ph, label %._crit_edge - -173: ; preds = %.thread266, %142 - %.1171276 = phi i8 [ %.1169, %.thread266 ], [ %.1171, %142 ] - %.3183274 = phi i8 [ %.1181, %.thread266 ], [ %.3183, %142 ] - %.3189273 = phi i32 [ %116, %.thread266 ], [ %145, %142 ] - %.1193272 = phi i8 [ 0, %.thread266 ], [ %.1193, %142 ] - %174 = icmp ne i8 %.3183274, 0 - %175 = zext i1 %174 to i8 - %spec.select222 = add i8 %.1171276, %175 - %176 = xor i8 %.3183274, 1 - %177 = and i32 %.3189273, 1 - %178 = icmp eq i32 %177, 0 - %.8200 = select i1 %178, i8 %.1193272, i8 1 - %179 = lshr i32 %.3189273, 1 - br label %91 - -._crit_edge: ; preds = %.lr.ph, %142, %.preheader - %.2175264315338 = phi i1 [ %.2175264315, %.preheader ], [ %19, %142 ], [ %.2175264315, %.lr.ph ] - %.3183263317337 = phi i8 [ %.3183263317, %.preheader ], [ %.3183, %142 ], [ %.3183263317, %.lr.ph ] - %.1193261320336 = phi i8 [ %.1193261320, %.preheader ], [ %.1193, %142 ], [ %.1193261320, %.lr.ph ] - %.10.lcssa = phi i32 [ %.3189262319, %.preheader ], [ %145, %142 ], [ %183, %.lr.ph ] - %.3.lcssa = phi i8 [ %.1171265314, %.preheader ], [ %.1171, %142 ], [ %182, %.lr.ph ] - %180 = and i32 %.10.lcssa, 1073741824 - %181 = icmp eq i32 %180, 0 - br i1 %181, label %.thread277, label %91 +159: ; preds = %149 + %160 = sub nsw i16 0, %82 + %161 = zext nneg i16 %160 to i32 + %162 = lshr i32 %.0186, %161 + %163 = sub nuw nsw i32 %76, %162 + br label %157 + +.thread: ; preds = %150, %157, %125, %129, %110, %112 + %.1171265 = phi i8 [ %.211.i246, %157 ], [ %.211.i246, %150 ], [ %.1169, %129 ], [ %.1169, %125 ], [ %.1169, %112 ], [ %.1169, %110 ] + %.2175264 = phi i1 [ %18, %157 ], [ %18, %150 ], [ %19, %129 ], [ %19, %125 ], [ %18, %112 ], [ %19, %110 ] + %.3183263 = phi i8 [ %73, %157 ], [ %73, %150 ], [ %.1181, %129 ], [ %.1181, %125 ], [ %.1181, %112 ], [ %.1181, %110 ] + %.3189262 = phi i32 [ %158, %157 ], [ %154, %150 ], [ %130, %129 ], [ %128, %125 ], [ %113, %112 ], [ %111, %110 ] + %.1193261 = phi i8 [ 1, %157 ], [ 0, %150 ], [ 1, %129 ], [ 0, %125 ], [ 0, %112 ], [ 0, %110 ] + %164 = icmp eq i32 %.3189262, 0 + br i1 %164, label %.thread277, label %.preheader + +.preheader: ; preds = %.thread + %165 = icmp samesign ult i32 %.3189262, 536870912 + br i1 %165, label %.lr.ph, label %._crit_edge + +166: ; preds = %.thread266, %135 + %.1171276 = phi i8 [ %.1169, %.thread266 ], [ %.1171, %135 ] + %.3183274 = phi i8 [ %.1181, %.thread266 ], [ %.3183, %135 ] + %.3189273 = phi i32 [ %109, %.thread266 ], [ %138, %135 ] + %.1193272 = phi i8 [ 0, %.thread266 ], [ %.1193, %135 ] + %167 = icmp ne i8 %.3183274, 0 + %168 = zext i1 %167 to i8 + %spec.select222 = add i8 %.1171276, %168 + %169 = xor i8 %.3183274, 1 + %170 = and i32 %.3189273, 1 + %171 = icmp eq i32 %170, 0 + %.8200 = select i1 %171, i8 %.1193272, i8 1 + %172 = lshr i32 %.3189273, 1 + br label %84 + +._crit_edge: ; preds = %.lr.ph, %135, %.preheader + %.2175264317331 = phi i1 [ %.2175264, %.preheader ], [ %19, %135 ], [ %.2175264, %.lr.ph ] + %.3183263319330 = phi i8 [ %.3183263, %.preheader ], [ %.3183, %135 ], [ %.3183263, %.lr.ph ] + %.1193261322329 = phi i8 [ %.1193261, %.preheader ], [ %.1193, %135 ], [ %.1193261, %.lr.ph ] + %.10.lcssa = phi i32 [ %.3189262, %.preheader ], [ %138, %135 ], [ %176, %.lr.ph ] + %.3.lcssa = phi i8 [ %.1171265, %.preheader ], [ %.1171, %135 ], [ %175, %.lr.ph ] + %173 = and i32 %.10.lcssa, 1073741824 + %174 = icmp eq i32 %173, 0 + br i1 %174, label %.thread277, label %84 .lr.ph: ; preds = %.preheader, %.lr.ph - %.3294 = phi i8 [ %182, %.lr.ph ], [ %.1171265314, %.preheader ] - %.10293 = phi i32 [ %183, %.lr.ph ], [ %.3189262319, %.preheader ] - %182 = add i8 %.3294, -1 - %183 = shl nuw nsw i32 %.10293, 2 - %184 = icmp samesign ult i32 %.10293, 134217728 - br i1 %184, label %.lr.ph, label %._crit_edge + %.3294 = phi i8 [ %175, %.lr.ph ], [ %.1171265, %.preheader ] + %.10293 = phi i32 [ %176, %.lr.ph ], [ %.3189262, %.preheader ] + %175 = add i8 %.3294, -1 + %176 = shl nuw nsw i32 %.10293, 2 + %177 = icmp samesign ult i32 %.10293, 134217728 + br i1 %177, label %.lr.ph, label %._crit_edge .thread277: ; preds = %.thread, %._crit_edge - %.1193261321 = phi i8 [ %.1193261320336, %._crit_edge ], [ %.1193261, %.thread ] - %.3183263318 = phi i8 [ %.3183263317337, %._crit_edge ], [ %.3183263, %.thread ] - %.2175264316 = phi i1 [ %.2175264315338, %._crit_edge ], [ %.2175264, %.thread ] + %.1193261323 = phi i8 [ %.1193261322329, %._crit_edge ], [ %.1193261, %.thread ] + %.3183263320 = phi i8 [ %.3183263319330, %._crit_edge ], [ %.3183263, %.thread ] + %.2175264318 = phi i1 [ %.2175264317331, %._crit_edge ], [ %.2175264, %.thread ] %.2172281 = phi i8 [ %.3.lcssa, %._crit_edge ], [ %.1171265, %.thread ] %.9280 = phi i32 [ %.10.lcssa, %._crit_edge ], [ 0, %.thread ] - %185 = icmp eq i8 %.3183263318, 0 - %186 = sext i1 %185 to i8 - %spec.select223 = add i8 %.2172281, %186 - %187 = xor i8 %.3183263318, 1 - %188 = shl nuw i32 %.9280, 1 - br label %91 - -189: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit - %190 = and i32 %.1187, 1073741823 - %191 = icmp eq i8 %.sroa.51.0.in.i, 14 - br i1 %191, label %200, label %.thread322 - -192: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit - %. = select i1 %92, i16 1, i16 32767 - br label %219 - -.thread322: ; preds = %189 - %193 = add nuw nsw i32 %.sroa.6.0.extract.trunc, 17 - %194 = and i32 %193, 31 - %195 = lshr i32 %190, %194 - %196 = trunc nuw nsw i32 %195 to i16 - %197 = shl nuw i32 65536, %.sroa.6.0.extract.trunc - %198 = and i32 %197, %190 - %199 = icmp ne i32 %198, 0 - br label %202 - -200: ; preds = %189 - %.not220 = icmp eq i32 %190, 0 + %178 = icmp eq i8 %.3183263320, 0 + %179 = sext i1 %178 to i8 + %spec.select223 = add i8 %.2172281, %179 + %180 = xor i8 %.3183263320, 1 + %181 = shl nuw i32 %.9280, 1 + br label %84 + +182: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit + %183 = and i32 %.1187, 1073741823 + %184 = icmp eq i8 %.sroa.51.0.in.i, 14 + br i1 %184, label %193, label %.thread332 + +185: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit + %. = select i1 %85, i16 1, i16 32767 + br label %212 + +.thread332: ; preds = %182 + %186 = add nuw nsw i32 %.sroa.6.0.extract.trunc, 17 + %187 = and i32 %186, 31 + %188 = lshr i32 %183, %187 + %189 = trunc nuw nsw i32 %188 to i16 + %190 = shl nuw i32 65536, %.sroa.6.0.extract.trunc + %191 = and i32 %190, %183 + %192 = icmp ne i32 %191, 0 + br label %195 + +193: ; preds = %182 + %.not220 = icmp eq i32 %183, 0 %spec.select224 = select i1 %.not220, i8 %.0192, i8 1 - %201 = icmp eq i8 %.2182, 0 - br i1 %201, label %202, label %210 - -202: ; preds = %.thread322, %200 - %.0184330 = phi i16 [ %196, %.thread322 ], [ 0, %200 ] - %.0185329 = phi i1 [ %199, %.thread322 ], [ false, %200 ] - %.9201328 = phi i8 [ %.0192, %.thread322 ], [ %spec.select224, %200 ] - %203 = zext nneg i8 %.2182 to i16 - %204 = sub nsw i8 13, %.sroa.51.0.in.i - %205 = and i8 %204, 15 - %206 = zext nneg i8 %205 to i16 - %207 = shl i16 %203, %206 - %.0164 = select i1 %191, i16 0, i16 %207 - %208 = add i16 %.0164, %.sroa.0.0.i - %209 = add i16 %208, %.0184330 - br i1 %.0185329, label %210, label %219 - -210: ; preds = %200, %202 - %.9201327 = phi i8 [ %.9201328, %202 ], [ %spec.select224, %200 ] - %.0178 = phi i16 [ %209, %202 ], [ %.sroa.0.0.i, %200 ] - %211 = sub nuw nsw i32 16, %.sroa.6.0.extract.trunc - %212 = shl i32 %190, %211 - %213 = icmp eq i32 %212, 0 - %214 = and i16 %.0178, 1 - %215 = zext nneg i8 %.9201327 to i16 - %216 = select i1 %213, i16 %215, i16 1 - %217 = or i16 %214, %216 - %218 = add i16 %217, %.0178 - br label %219 - -219: ; preds = %192, %210, %202 - %.1179 = phi i16 [ %218, %210 ], [ %209, %202 ], [ %., %192 ] - %220 = sub i16 0, %.1179 - %.0.i = select i1 %.0173, i16 %220, i16 %.1179 + %194 = icmp eq i8 %.2182, 0 + br i1 %194, label %195, label %203 + +195: ; preds = %.thread332, %193 + %.0184340 = phi i16 [ %189, %.thread332 ], [ 0, %193 ] + %.0185339 = phi i1 [ %192, %.thread332 ], [ false, %193 ] + %.9201338 = phi i8 [ %.0192, %.thread332 ], [ %spec.select224, %193 ] + %196 = zext nneg i8 %.2182 to i16 + %197 = sub nsw i8 13, %.sroa.51.0.in.i + %198 = and i8 %197, 15 + %199 = zext nneg i8 %198 to i16 + %200 = shl nuw i16 %196, %199 + %.0164 = select i1 %184, i16 0, i16 %200 + %201 = add nuw i16 %.0164, %.sroa.0.0.i + %202 = add i16 %201, %.0184340 + br i1 %.0185339, label %203, label %212 + +203: ; preds = %193, %195 + %.9201337 = phi i8 [ %.9201338, %195 ], [ %spec.select224, %193 ] + %.0178 = phi i16 [ %202, %195 ], [ %.sroa.0.0.i, %193 ] + %204 = sub nuw nsw i32 16, %.sroa.6.0.extract.trunc + %205 = shl i32 %183, %204 + %206 = icmp eq i32 %205, 0 + %207 = and i16 %.0178, 1 + %208 = zext nneg i8 %.9201337 to i16 + %209 = select i1 %206, i16 %208, i16 1 + %210 = or i16 %207, %209 + %211 = add i16 %210, %.0178 + br label %212 + +212: ; preds = %185, %203, %195 + %.1179 = phi i16 [ %211, %203 ], [ %202, %195 ], [ %., %185 ] + %213 = sub i16 0, %.1179 + %.0.i = select i1 %.0173, i16 %213, i16 %.1179 br label %60 } diff --git a/bench/wireshark/optimized/in_cksum.ll b/bench/wireshark/optimized/in_cksum.ll index f9ab47b640b..f0ccdb26cbd 100644 --- a/bench/wireshark/optimized/in_cksum.ll +++ b/bench/wireshark/optimized/in_cksum.ll @@ -289,12 +289,11 @@ define range(i32 0, 65536) i32 @in_cksum_ret_partial(ptr noundef readonly captur %.sroa.12.0.extract.shift20 = lshr i32 %.12, 16 %169 = and i32 %.12, 65535 %170 = add nuw nsw i32 %169, %.sroa.12.0.extract.shift20 - %171 = icmp samesign ugt i32 %170, 65535 - %172 = zext i1 %171 to i32 - %.13 = add nuw nsw i32 %170, %172 - %173 = and i32 %.13, 65535 - %174 = xor i32 %173, 65535 - ret i32 %174 + %171 = lshr i32 %170, 16 + %.13 = add nuw nsw i32 %171, %170 + %172 = and i32 %.13, 65535 + %173 = xor i32 %172, 65535 + ret i32 %173 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) From e71ab78d39de6f10d0e2e22dc0806ebd283c9259 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 12:17:21 +0000 Subject: [PATCH 3/3] pre-commit: Remap --- bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll | 92 ++-- bench/draco/optimized/symbol_encoding.ll | 192 ++++---- bench/folly/optimized/EpollBackend.ll | 12 +- bench/quickjs/optimized/libbf.ll | 126 +++--- .../optimized/3yl6353p3hwrtv6y.ll | 10 +- .../optimized/5az6c15ag5q4gib5.ll | 412 +++++++++--------- .../softposit-rs/optimized/oveg98n4r9tnk39.ll | 348 +++++++-------- 7 files changed, 596 insertions(+), 596 deletions(-) diff --git a/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll b/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll index 68124bafcd0..f918dfd3024 100644 --- a/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll +++ b/bench/actix-rs/optimized/1ghd7r3h0kcgux6d.ll @@ -10387,13 +10387,13 @@ _ZN6brotli3enc7command26CommandRestoreDistanceCode17hf05d26418c1b43c8E.exit: ; p %68 = load i64, ptr %67, align 8, !noundef !12 %.promoted = load i32, ptr %2, align 4 %69 = zext i32 %14 to i64 - br label %158 + br label %159 70: ; preds = %_ZN6brotli3enc7command26CommandRestoreDistanceCode17hf05d26418c1b43c8E.exit, %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit ret void -.loopexit.loopexit: ; preds = %180, %173 - %71 = phi i32 [ %181, %180 ], [ %159, %173 ] +.loopexit.loopexit: ; preds = %181, %174 + %71 = phi i32 [ %182, %181 ], [ %160, %174 ] %.pre = and i32 %71, 33554431 br label %.loopexit @@ -10504,7 +10504,7 @@ _ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit: ; preds = %1 %or.cond.i = and i1 %78, %140 %141 = icmp ult i16 %.0.i, 16 %or.cond6.i = and i1 %or.cond.i, %141 - br i1 %or.cond6.i, label %154, label %142 + br i1 %or.cond6.i, label %155, label %142 142: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit %143 = lshr i16 %.0.i, 3 @@ -10522,61 +10522,61 @@ _ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit: ; preds = %1 %153 = trunc i32 %152 to i16 br label %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit -154: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit +155: ; preds = %_ZN6brotli3enc7command17GetCopyLengthCode17hab981e27915e86caE.exit %155 = shl nuw nsw i16 %.0.i, 3 %156 = and i16 %155, 64 br label %_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit -_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit: ; preds = %142, %154 - %.pn = phi i16 [ %153, %142 ], [ %156, %154 ] - %.0.i13 = or disjoint i16 %139, %.pn +_ZN6brotli3enc7command18CombineLengthCodes17he28c5563882f5f20E.exit: ; preds = %142, %155 + %.0.i13 = phi i16 [ %153, %142 ], [ %156, %155 ] + %.0.i13 = or disjoint i16 %139, %.0.i13 %157 = getelementptr inbounds nuw i8, ptr %11, i64 12 store i16 %.0.i13, ptr %157, align 4 br label %70 -158: ; preds = %.preheader, %180 - %159 = phi i32 [ %18, %.preheader ], [ %181, %180 ] - %160 = phi i32 [ %64, %.preheader ], [ %182, %180 ] - %161 = phi i32 [ %.promoted, %.preheader ], [ %183, %180 ] - %162 = and i32 %161, %14 - %163 = zext i32 %162 to i64 - %164 = add i64 %68, %163 - %165 = icmp ult i64 %164, %.val17 - br i1 %165, label %166, label %172, !prof !278 - -166: ; preds = %158 - %167 = zext i32 %161 to i64 - %168 = sub nsw i64 %167, %23 - %169 = and i64 %168, %69 - %170 = add i64 %169, %68 - %171 = icmp ult i64 %170, %.val17 - br i1 %171, label %173, label %179, !prof !278 - -172: ; preds = %158 - tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %164, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.113) #21 +159: ; preds = %.preheader, %181 + %160 = phi i32 [ %18, %.preheader ], [ %182, %181 ] + %161 = phi i32 [ %64, %.preheader ], [ %183, %181 ] + %162 = phi i32 [ %.promoted, %.preheader ], [ %184, %181 ] + %163 = and i32 %162, %14 + %164 = zext i32 %163 to i64 + %165 = add i64 %68, %164 + %166 = icmp ult i64 %165, %.val17 + br i1 %166, label %167, label %173, !prof !278 + +167: ; preds = %159 + %168 = zext i32 %162 to i64 + %169 = sub nsw i64 %168, %23 + %170 = and i64 %169, %69 + %171 = add i64 %170, %68 + %172 = icmp ult i64 %171, %.val17 + br i1 %172, label %174, label %180, !prof !278 + +173: ; preds = %159 + tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %165, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.113) #21 unreachable -173: ; preds = %166 - %174 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %164 - %175 = load i8, ptr %174, align 1, !noundef !12 - %176 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %170 - %177 = load i8, ptr %176, align 1, !noundef !12 - %178 = icmp eq i8 %175, %177 - br i1 %178, label %180, label %.loopexit.loopexit +174: ; preds = %167 + %175 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %165 + %176 = load i8, ptr %175, align 1, !noundef !12 + %177 = getelementptr inbounds [0 x i8], ptr %.val16, i64 0, i64 %171 + %178 = load i8, ptr %177, align 1, !noundef !12 + %179 = icmp eq i8 %176, %178 + br i1 %179, label %181, label %.loopexit.loopexit -179: ; preds = %166 - tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %170, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.114) #21 +180: ; preds = %167 + tail call void @_ZN4core9panicking18panic_bounds_check17h5aa5e8a957e001f9E(i64 noundef %171, i64 noundef %.val17, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.e9f42dff1fd369047582a93c3ee51670.114) #21 unreachable -180: ; preds = %173 - %181 = add i32 %159, 1 - store i32 %181, ptr %17, align 4 - %182 = add i32 %160, -1 - store i32 %182, ptr %1, align 4 - %183 = add i32 %161, 1 - store i32 %183, ptr %2, align 4 - %.old3 = icmp eq i32 %182, 0 - br i1 %.old3, label %.loopexit.loopexit, label %158 +181: ; preds = %174 + %182 = add i32 %160, 1 + store i32 %182, ptr %17, align 4 + %183 = add i32 %161, -1 + store i32 %183, ptr %1, align 4 + %184 = add i32 %162, 1 + store i32 %184, ptr %2, align 4 + %.old3 = icmp eq i32 %183, 0 + br i1 %.old3, label %.loopexit.loopexit, label %159 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/draco/optimized/symbol_encoding.ll b/bench/draco/optimized/symbol_encoding.ll index 2465e46ee1d..a8c582f6cab 100644 --- a/bench/draco/optimized/symbol_encoding.ll +++ b/bench/draco/optimized/symbol_encoding.ll @@ -1646,7 +1646,7 @@ define linkonce_odr noundef zeroext i1 @_ZN5draco16EncodeRawSymbolsINS_17RAnsSym %14 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %3, i1 true) %15 = sub nuw nsw i32 32, %14 %16 = icmp samesign ugt i32 %3, 262143 - br i1 %16, label %139, label %.thread + br i1 %16, label %140, label %.thread .thread: ; preds = %6, %13 %.0 = phi i32 [ %15, %13 ], [ 1, %6 ] @@ -1861,128 +1861,128 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit124: ; preds = %_Z .thread147: ; preds = %86, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, %.thread, %80, %84, %76 %.1 = phi i32 [ %.0, %.thread ], [ %77, %76 ], [ %81, %80 ], [ %85, %84 ], [ %.0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ], [ %spec.select, %86 ] - %88 = call i32 @llvm.smax.i32(i32 %.1, i32 1) - %89 = call i32 @llvm.umin.i32(i32 %88, i32 18) + %89 = call i32 @llvm.smax.i32(i32 %.1, i32 1) + %90 = call i32 @llvm.umin.i32(i32 %89, i32 18) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #18 - %90 = trunc nuw nsw i32 %89 to i8 - store i8 %90, ptr %11, align 1, !tbaa !13 - %91 = getelementptr inbounds nuw i8, ptr %5, i64 32 - %92 = load i64, ptr %91, align 8, !tbaa !29 - %93 = icmp slt i64 %92, 1 - br i1 %93, label %94, label %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - -94: ; preds = %.thread147 - %95 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %96 = load ptr, ptr %95, align 8, !tbaa !43 - %97 = getelementptr inbounds nuw i8, ptr %11, i64 1 - %98 = load ptr, ptr %5, align 8, !tbaa !43 - %99 = ptrtoint ptr %96 to i64 - %100 = ptrtoint ptr %98 to i64 - %101 = sub i64 %99, %100 - %102 = getelementptr inbounds i8, ptr %98, i64 %101 - call void @_ZNSt6vectorIcSaIcEE15_M_range_insertIPKhEEvN9__gnu_cxx17__normal_iteratorIPcS1_EET_S9_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(41) %5, ptr %102, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull %97) + %91 = trunc nuw nsw i32 %90 to i8 + store i8 %91, ptr %11, align 1, !tbaa !13 + %92 = getelementptr inbounds nuw i8, ptr %5, i64 32 + %93 = load i64, ptr %92, align 8, !tbaa !29 + %94 = icmp slt i64 %93, 1 + br i1 %94, label %95, label %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + +95: ; preds = %.thread147 + %96 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %97 = load ptr, ptr %96, align 8, !tbaa !43 + %98 = getelementptr inbounds nuw i8, ptr %11, i64 1 + %99 = load ptr, ptr %5, align 8, !tbaa !43 + %100 = ptrtoint ptr %97 to i64 + %101 = ptrtoint ptr %99 to i64 + %102 = sub i64 %100, %101 + %103 = getelementptr inbounds i8, ptr %99, i64 %102 + call void @_ZNSt6vectorIcSaIcEE15_M_range_insertIPKhEEvN9__gnu_cxx17__normal_iteratorIPcS1_EET_S9_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(41) %5, ptr %103, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull %98) br label %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit -_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit: ; preds = %.thread147, %94 +_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit: ; preds = %.thread147, %95 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #18 - switch i32 %89, label %default.unreachable [ - i32 18, label %137 - i32 1, label %103 - i32 2, label %105 - i32 3, label %107 - i32 4, label %109 - i32 5, label %111 - i32 6, label %113 - i32 7, label %115 - i32 8, label %117 - i32 9, label %119 - i32 10, label %121 - i32 11, label %123 - i32 12, label %125 - i32 13, label %127 - i32 14, label %129 - i32 15, label %131 - i32 16, label %133 - i32 17, label %135 + switch i32 %90, label %default.unreachable [ + i32 18, label %138 + i32 1, label %104 + i32 2, label %106 + i32 3, label %108 + i32 4, label %110 + i32 5, label %112 + i32 6, label %114 + i32 7, label %116 + i32 8, label %118 + i32 9, label %120 + i32 10, label %122 + i32 11, label %124 + i32 12, label %126 + i32 13, label %128 + i32 14, label %130 + i32 15, label %132 + i32 16, label %134 + i32 17, label %136 ] -103: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %104 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi1EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +104: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %105 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi1EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -105: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %106 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi2EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +106: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %107 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi2EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -107: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %108 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi3EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +108: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %109 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi3EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -109: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %110 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi4EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +110: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %111 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi4EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -111: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %112 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi5EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +112: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %113 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi5EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -113: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %114 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi6EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +114: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %115 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi6EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -115: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %116 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi7EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +116: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %117 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi7EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -117: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %118 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi8EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +118: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %119 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi8EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -119: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %120 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi9EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +120: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %121 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi9EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -121: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %122 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi10EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +122: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %123 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi10EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -123: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %124 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi11EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +124: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %125 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi11EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -125: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %126 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi12EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +126: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %127 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi12EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -127: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %128 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi13EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +128: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %129 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi13EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -129: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %130 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi14EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +130: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %131 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi14EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -131: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %132 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi15EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +132: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %133 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi15EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -133: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %134 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi16EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +134: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %135 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi16EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -135: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %136 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi17EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +136: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %137 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi17EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 -137: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit - %138 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi18EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) - br label %139 +138: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit + %139 = call noundef zeroext i1 @_ZN5draco24EncodeRawSymbolsInternalINS_17RAnsSymbolEncoderILi18EEEEEbPKjijPNS_13EncoderBufferE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5) + br label %140 default.unreachable: ; preds = %_ZN5draco13EncoderBuffer6EncodeIhEEbRKT_.exit unreachable -139: ; preds = %103, %105, %107, %109, %111, %113, %115, %117, %119, %121, %123, %125, %127, %129, %131, %133, %135, %137, %13 - %.0102 = phi i1 [ false, %13 ], [ %138, %137 ], [ %136, %135 ], [ %134, %133 ], [ %132, %131 ], [ %130, %129 ], [ %128, %127 ], [ %126, %125 ], [ %124, %123 ], [ %122, %121 ], [ %120, %119 ], [ %118, %117 ], [ %116, %115 ], [ %114, %113 ], [ %112, %111 ], [ %110, %109 ], [ %108, %107 ], [ %106, %105 ], [ %104, %103 ] +140: ; preds = %104, %106, %108, %110, %112, %114, %116, %118, %120, %122, %124, %126, %128, %130, %132, %134, %136, %138, %13 + %.0102 = phi i1 [ false, %13 ], [ %139, %138 ], [ %137, %136 ], [ %135, %134 ], [ %133, %132 ], [ %131, %130 ], [ %129, %128 ], [ %127, %126 ], [ %125, %124 ], [ %123, %122 ], [ %121, %120 ], [ %119, %118 ], [ %117, %116 ], [ %115, %114 ], [ %113, %112 ], [ %111, %110 ], [ %109, %108 ], [ %107, %106 ], [ %105, %104 ] ret i1 %.0102 } diff --git a/bench/folly/optimized/EpollBackend.ll b/bench/folly/optimized/EpollBackend.ll index fad9f206cad..82fa2dfc591 100644 --- a/bench/folly/optimized/EpollBackend.ll +++ b/bench/folly/optimized/EpollBackend.ll @@ -628,9 +628,9 @@ _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit48: ; preds = %9 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #21 %39 = lshr i16 %17, 1 %.lobit.i = and i16 %39, 1 - %40 = and i16 %17, 4 - %.16.i = or disjoint i16 %.lobit.i, %40 - %.1.i = zext nneg i16 %.16.i to i32 + %.lobit.i = and i16 %17, 4 + %.1.i55 = or disjoint i16 %.lobit.i, %40 + %.1.i = zext nneg i16 %.1.i55 to i32 store i32 %.1.i, ptr %4, align 4, !tbaa !61 %41 = getelementptr inbounds nuw i8, ptr %4, i64 4 store ptr %.0, ptr %41, align 4, !tbaa !55 @@ -873,9 +873,9 @@ define noundef zeroext i1 @_ZN5folly12EpollBackend16setEdgeTriggeredERNS_14Event %8 = load i16, ptr %7, align 8, !tbaa !64 %9 = lshr i16 %8, 1 %.lobit.i = and i16 %9, 1 - %10 = and i16 %8, 4 - %.16.i = or disjoint i16 %.lobit.i, %10 - %.1.i = zext nneg i16 %.16.i to i32 + %.lobit.i = and i16 %8, 4 + %.1.i18 = or disjoint i16 %.lobit.i, %10 + %.1.i = zext nneg i16 %.1.i18 to i32 %11 = or disjoint i32 %.1.i, -2147483648 store i32 %11, ptr %2, align 4, !tbaa !61 %12 = getelementptr inbounds nuw i8, ptr %2, i64 4 diff --git a/bench/quickjs/optimized/libbf.ll b/bench/quickjs/optimized/libbf.ll index 5acfdb3fcb9..4d8123c5d9b 100644 --- a/bench/quickjs/optimized/libbf.ll +++ b/bench/quickjs/optimized/libbf.ll @@ -1014,7 +1014,7 @@ get_bit.exit32.i: ; preds = %86, %85, %79, %72, br i1 %90, label %91, label %106 91: ; preds = %get_bit.exit32.i - br i1 %.not112, label %132, label %92 + br i1 %.not112, label %131, label %92 92: ; preds = %91 %93 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -1107,68 +1107,68 @@ bf_resize.exit: ; preds = %.bf_resize.exit_cri %124 = getelementptr inbounds nuw i8, ptr %0, i64 16 %125 = load i64, ptr %124, align 8, !tbaa !31 %126 = icmp slt i64 %125, %13 - br i1 %126, label %127, label %143, !prof !39 + br i1 %126, label %127, label %142, !prof !39 127: ; preds = %.loopexit %128 = and i32 %2, 8 %.not109 = icmp eq i32 %128, 0 - br i1 %.not109, label %132, label %129 + br i1 %.not109, label %131, label %129 129: ; preds = %127 %130 = lshr i32 %spec.select, 1 %131 = and i32 %130, 8 %spec.select129 = or i32 %131, %spec.select - br label %143 - -132: ; preds = %127, %91 - %133 = or i32 %spec.select, 24 - %134 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %135 = load i32, ptr %134, align 8, !tbaa !30 - %136 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %137 = load i64, ptr %136, align 8, !tbaa !32 - %.not.i.i116 = icmp eq i64 %137, 0 - br i1 %.not.i.i116, label %bf_set_zero.exit, label %138 - -138: ; preds = %132 - %139 = load ptr, ptr %0, align 8, !tbaa !28 - %.val.i.i = load ptr, ptr %139, align 8, !tbaa !19 - %140 = getelementptr i8, ptr %139, i64 8 - %.val13.i.i = load ptr, ptr %140, align 8, !tbaa !7 - %141 = tail call ptr %.val13.i.i(ptr noundef %.val.i.i, ptr noundef %54, i64 noundef 0) #21 - store ptr %141, ptr %53, align 8, !tbaa !29 - store i64 0, ptr %136, align 8, !tbaa !32 + br label %142 + +131: ; preds = %127, %91 + %132 = or i32 %spec.select, 24 + %133 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %134 = load i32, ptr %133, align 8, !tbaa !30 + %135 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %136 = load i64, ptr %135, align 8, !tbaa !32 + %.not.i.i116 = icmp eq i64 %136, 0 + br i1 %.not.i.i116, label %bf_set_zero.exit, label %137 + +137: ; preds = %131 + %138 = load ptr, ptr %0, align 8, !tbaa !28 + %.val.i.i = load ptr, ptr %138, align 8, !tbaa !19 + %139 = getelementptr i8, ptr %138, i64 8 + %.val13.i.i = load ptr, ptr %139, align 8, !tbaa !7 + %140 = tail call ptr %.val13.i.i(ptr noundef %.val.i.i, ptr noundef %54, i64 noundef 0) #21 + store ptr %140, ptr %53, align 8, !tbaa !29 + store i64 0, ptr %135, align 8, !tbaa !32 br label %bf_set_zero.exit -bf_set_zero.exit: ; preds = %132, %138 - %142 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 -9223372036854775808, ptr %142, align 8, !tbaa !31 - store i32 %135, ptr %134, align 8, !tbaa !30 +bf_set_zero.exit: ; preds = %131, %137 + %141 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 -9223372036854775808, ptr %141, align 8, !tbaa !31 + store i32 %134, ptr %133, align 8, !tbaa !30 br label %bf_resize.exit122 -143: ; preds = %129, %.loopexit +142: ; preds = %129, %.loopexit %.0128 = phi i32 [ %spec.select, %.loopexit ], [ %spec.select129, %129 ] - %144 = icmp sgt i64 %125, %12 - br i1 %144, label %145, label %149, !prof !39 + %143 = icmp sgt i64 %125, %12 + br i1 %143, label %144, label %148, !prof !39 -145: ; preds = %143 - %146 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %147 = load i32, ptr %146, align 8, !tbaa !30 - %148 = tail call fastcc i32 @bf_set_overflow(ptr noundef nonnull %0, i32 noundef %147, i64 noundef %1, i32 noundef %2) +144: ; preds = %142 + %145 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %146 = load i32, ptr %145, align 8, !tbaa !30 + %147 = tail call fastcc i32 @bf_set_overflow(ptr noundef nonnull %0, i32 noundef %146, i64 noundef %1, i32 noundef %2) br label %bf_resize.exit122 -149: ; preds = %143 - %150 = sub i64 %.pre.i, %.089 - %151 = ashr i64 %150, 6 - %152 = icmp sgt i64 %151, -1 - br i1 %152, label %153, label %.preheader +148: ; preds = %142 + %149 = sub i64 %.pre.i, %.089 + %150 = ashr i64 %149, 6 + %151 = icmp sgt i64 %150, -1 + br i1 %151, label %153, label %.preheader -153: ; preds = %149 - %154 = trunc i64 %150 to i32 +164: ; preds = %149 + %154 = trunc i64 %149 to i32 %155 = and i32 %154, 63 %.not111 = icmp eq i32 %155, 0 - br i1 %.not111, label %.preheader, label %156 + br i1 %.not111, label %171, label %156 -156: ; preds = %153 +169: ; preds = %164 %157 = sub nuw nsw i32 64, %155 %158 = zext nneg i32 %157 to i64 %notmask.i = shl nsw i64 -1, %158 @@ -1181,19 +1181,19 @@ bf_set_zero.exit: ; preds = %132, %138 store i64 %164, ptr %162, align 8, !tbaa !33 br label %.preheader -.preheader: ; preds = %149, %153, %156 +171: ; preds = %149, %153, %169 %.3.ph = phi i64 [ 0, %149 ], [ %151, %153 ], [ %151, %156 ] br label %165 -165: ; preds = %.preheader, %165 - %.3 = phi i64 [ %169, %165 ], [ %.3.ph, %.preheader ] +165:; preds = %171, %165 + %.3 = phi i64 [ %169, %165 ], [ %.3.ph, %171 ] %166 = getelementptr inbounds i64, ptr %54, i64 %.3 %167 = load i64, ptr %166, align 8, !tbaa !33 %168 = icmp eq i64 %167, 0 %169 = add i64 %.3, 1 br i1 %168, label %165, label %170, !llvm.loop !43 -170: ; preds = %165 +170: ; preds = %165 %171 = icmp sgt i64 %.3, 0 br i1 %171, label %172, label %176 @@ -1211,26 +1211,26 @@ bf_set_zero.exit: ; preds = %132, %138 %.not.i118 = icmp eq i64 %.091, %178 br i1 %.not.i118, label %bf_resize.exit122, label %179 -179: ; preds = %176 - %180 = load ptr, ptr %0, align 8, !tbaa !28 - %181 = load ptr, ptr %53, align 8, !tbaa !29 - %182 = shl i64 %.091, 3 - %.val.i119 = load ptr, ptr %180, align 8, !tbaa !19 - %183 = getelementptr i8, ptr %180, i64 8 - %.val13.i120 = load ptr, ptr %183, align 8, !tbaa !7 - %184 = tail call ptr %.val13.i120(ptr noundef %.val.i119, ptr noundef %181, i64 noundef %182) #21 - %185 = icmp eq ptr %184, null - %186 = icmp ne i64 %.091, 0 - %or.cond.i = and i1 %186, %185 - br i1 %or.cond.i, label %bf_resize.exit122, label %187 - -187: ; preds = %179 - store ptr %184, ptr %53, align 8, !tbaa !29 +178: ; preds = %176 + %179 = load ptr, ptr %0, align 8, !tbaa !28 + %180 = load ptr, ptr %53, align 8, !tbaa !29 + %181 = shl i64 %.091, 3 + %.val.i119 = load ptr, ptr %179, align 8, !tbaa !19 + %182 = getelementptr i8, ptr %179, i64 8 + %.val13.i120 = load ptr, ptr %182, align 8, !tbaa !7 + %183 = tail call ptr %.val13.i120(ptr noundef %.val.i119, ptr noundef %180, i64 noundef %181) #21 + %184 = icmp eq ptr %183, null + %185 = icmp ne i64 %.091, 0 + %or.cond.i = and i1 %185, %184 + br i1 %or.cond.i, label %bf_resize.exit122, label %186 + +186: ; preds = %178 + store ptr %183, ptr %53, align 8, !tbaa !29 store i64 %.091, ptr %177, align 8, !tbaa !32 br label %bf_resize.exit122 -bf_resize.exit122: ; preds = %187, %179, %176, %145, %bf_set_zero.exit, %bf_resize.exit - %.090 = phi i32 [ %105, %bf_resize.exit ], [ %133, %bf_set_zero.exit ], [ %148, %145 ], [ %.0128, %176 ], [ %.0128, %179 ], [ %.0128, %187 ] +bf_resize.exit122: ; preds = %186, %178, %176, %144, %bf_set_zero.exit, %bf_resize.exit + %.090 = phi i32 [ %105, %bf_resize.exit ], [ %132, %bf_set_zero.exit ], [ %147, %144 ], [ %.0128, %176 ], [ %.0128, %178 ], [ %.0128, %186 ] ret i32 %.090 } diff --git a/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll b/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll index 408a92d0fac..84c3f57a2a4 100644 --- a/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll +++ b/bench/softposit-rs/optimized/3yl6353p3hwrtv6y.ll @@ -88,7 +88,7 @@ define void @_ZN9softposit7quire163ops3fdp17h6da150bf3eda9608E(ptr noalias nound %10 = icmp eq i16 %1, 0 %11 = icmp eq i16 %2, 0 %or.cond5 = or i1 %10, %11 - br i1 %or.cond5, label %61, label %12 + br i1 %or.cond5, label %54, label %12 12: ; preds = %9 %13 = and i16 %1, -32768 @@ -204,9 +204,9 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64: ; preds .sink.split: ; preds = %4, %73 %.sink = phi i128 [ %.039, %73 ], [ -170141183460469231731687303715884105728, %4 ] store i128 %.sink, ptr %0, align 16 - br label %61 + br label %54 -61: ; preds = %.sink.split, %9 +54: ; preds = %.sink.split, %9 ret void 62: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 @@ -214,10 +214,10 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64: ; preds %64 = zext nneg i32 %.035 to i128 %65 = and i16 %63, 127 %66 = zext nneg i16 %65 to i128 - %67 = lshr i128 %64, %66 + %66 = lshr i128 %64, %66 br label %73 -68: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 +67: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit64 %69 = zext nneg i32 %.035 to i128 %70 = and i16 %59, 127 %71 = zext nneg i16 %70 to i128 diff --git a/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll b/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll index 7a014ec6133..2fc837361c0 100644 --- a/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll +++ b/bench/softposit-rs/optimized/5az6c15ag5q4gib5.ll @@ -2857,92 +2857,92 @@ define noundef i16 @"_ZN9softposit5p16e14math6tan_pi41_$LT$impl$u20$softposit..p %4 = icmp slt i16 %0, 0 %spec.select = select i1 %4, i64 %3, i64 %2 %5 = icmp samesign ugt i64 %spec.select, 31743 - br i1 %5, label %8, label %6 + br i1 %5, label %8, label %7 -6: ; preds = %1 - %7 = icmp eq i64 %spec.select, 0 - br i1 %7, label %.thread, label %10 +7: ; preds = %1 + %8 = icmp eq i64 %spec.select, 0 + br i1 %8, label %.thread, label %11 -8: ; preds = %1 - %9 = icmp eq i64 %spec.select, 32768 - %. = select i1 %9, i16 -32768, i16 0 +9: ; preds = %1 + %10 = icmp eq i64 %spec.select, 32768 + %. = select i1 %10, i16 -32768, i16 0 br label %.thread -10: ; preds = %6 - %11 = icmp samesign ult i64 %spec.select, 16384 - br i1 %11, label %.preheader81, label %.preheader82 +11: ; preds = %7 + %12 = icmp samesign ult i64 %spec.select, 16384 + br i1 %12, label %.preheader81, label %.preheader82 -.preheader82: ; preds = %10 - %12 = and i64 %spec.select, 8192 - %13 = icmp eq i64 %12, 0 - br i1 %13, label %.loopexit.thread, label %.lr.ph +.preheader82: ; preds = %11 + %13 = and i64 %spec.select, 8192 + %14 = icmp eq i64 %13, 0 + br i1 %14, label %.loopexit.thread, label %.lr.ph -.preheader81: ; preds = %10 - %14 = icmp samesign ult i64 %spec.select, 8192 - br i1 %14, label %.lr.ph89, label %.loopexit.thread +.preheader81: ; preds = %11 + %15 = icmp samesign ult i64 %spec.select, 8192 + br i1 %15, label %.lr.ph89, label %.loopexit.thread -15: ; preds = %37, %42 - %.165 = phi i64 [ %46, %42 ], [ %41, %37 ] - %16 = and i64 %.165, 268435455 - %17 = icmp eq i64 %16, 0 - br i1 %17, label %.thread, label %47 +16: ; preds = %38, %42 + %.165 = phi i64 [ %47, %42 ], [ %42, %38 ] + %17 = and i64 %.165, 268435455 + %18 = icmp eq i64 %17, 0 + br i1 %18, label %.thread, label %47 .lr.ph89: ; preds = %.preheader81, %.lr.ph89 - %.06088 = phi i32 [ %19, %.lr.ph89 ], [ 14, %.preheader81 ] - %.26687 = phi i64 [ %18, %.lr.ph89 ], [ %spec.select, %.preheader81 ] - %18 = shl i64 %.26687, 1 - %19 = add i32 %.06088, -2 - %20 = and i64 %.26687, 4096 - %21 = icmp eq i64 %20, 0 - br i1 %21, label %.lr.ph89, label %.loopexit + %.06088 = phi i32 [ %20, %.lr.ph89 ], [ 14, %.preheader81 ] + %.26687 = phi i64 [ %19, %.lr.ph89 ], [ %spec.select, %.preheader81 ] + %19 = shl i64 %.26687, 1 + %20 = add i32 %.06088, -2 + %21 = and i64 %.26687, 4096 + %22 = icmp eq i64 %21, 0 + br i1 %22, label %.lr.ph89, label %.loopexit .loopexit.thread: ; preds = %.preheader81, %.preheader82 %.2.ph = phi i32 [ 16, %.preheader82 ], [ 14, %.preheader81 ] - %22 = trunc nuw nsw i64 %spec.select to i32 - %23 = lshr i32 %22, 12 - %24 = and i32 %23, 1 - %spec.select73113 = or disjoint i32 %24, %.2.ph - %25 = and i64 %spec.select, 4095 - %26 = or disjoint i64 %25, 4096 - br label %37 + %23 = trunc nuw nsw i64 %spec.select to i32 + %24 = lshr i32 %23, 12 + %25 = and i32 %24, 1 + %spec.select73113 = or disjoint i32 %25, %.2.ph + %26 = and i64 %spec.select, 4095 + %27 = or disjoint i64 %26, 4096 + br label %38 .loopexit: ; preds = %.lr.ph, %.lr.ph89 - %.4 = phi i64 [ %18, %.lr.ph89 ], [ %33, %.lr.ph ] - %.2 = phi i32 [ %19, %.lr.ph89 ], [ %34, %.lr.ph ] - %27 = trunc i64 %.4 to i32 - %28 = lshr i32 %27, 12 - %29 = and i32 %28, 1 - %spec.select73 = or disjoint i32 %29, %.2 - %30 = and i64 %.4, 4094 - %31 = or disjoint i64 %30, 4096 - %32 = icmp slt i32 %.2, 0 - br i1 %32, label %42, label %37 + %.4 = phi i64 [ %19, %.lr.ph89 ], [ %34, %.lr.ph ] + %.2 = phi i32 [ %20, %.lr.ph89 ], [ %35, %.lr.ph ] + %28 = trunc i64 %.4 to i32 + %29 = lshr i32 %28, 12 + %30 = and i32 %29, 1 + %spec.select73 = or disjoint i32 %30, %.2 + %31 = and i64 %.4, 4094 + %32 = or disjoint i64 %31, 4096 + %33 = icmp slt i32 %.2, 0 + br i1 %33, label %42, label %38 .lr.ph: ; preds = %.preheader82, %.lr.ph - %.185 = phi i32 [ %34, %.lr.ph ], [ 16, %.preheader82 ] - %.36784 = phi i64 [ %33, %.lr.ph ], [ %spec.select, %.preheader82 ] - %33 = shl i64 %.36784, 1 - %34 = add i32 %.185, 2 - %35 = and i64 %.36784, 4096 - %36 = icmp eq i64 %35, 0 - br i1 %36, label %.loopexit, label %.lr.ph - -37: ; preds = %.loopexit.thread, %.loopexit - %38 = phi i64 [ %26, %.loopexit.thread ], [ %31, %.loopexit ] + %.185 = phi i32 [ %35, %.lr.ph ], [ 16, %.preheader82 ] + %.36784 = phi i64 [ %34, %.lr.ph ], [ %spec.select, %.preheader82 ] + %34 = shl i64 %.36784, 1 + %35 = add i32 %.185, 2 + %36 = and i64 %.36784, 4096 + %37 = icmp eq i64 %36, 0 + br i1 %37, label %.loopexit, label %.lr.ph + +38: ; preds = %.loopexit.thread, %.loopexit + %39 = phi i64 [ %27, %.loopexit.thread ], [ %32, %.loopexit ] %spec.select73114 = phi i32 [ %spec.select73113, %.loopexit.thread ], [ %spec.select73, %.loopexit ] - %39 = and i32 %spec.select73114, 63 - %40 = zext nneg i32 %39 to i64 - %41 = shl i64 %38, %40 - br label %15 + %40 = and i32 %spec.select73114, 63 + %41 = zext nneg i32 %40 to i64 + %42 = shl i64 %39, %41 + br label %16 -42: ; preds = %.loopexit +51: ; preds = %.loopexit %43 = sub i32 0, %spec.select73 %44 = and i32 %43, 63 %45 = zext nneg i32 %44 to i64 %46 = lshr i64 %31, %45 br label %15 -47: ; preds = %15 +56: ; preds = %15 %48 = and i64 %.165, 134217727 %49 = icmp eq i64 %48, 0 br i1 %49, label %.thread, label %50 @@ -2964,11 +2964,11 @@ define noundef i16 @"_ZN9softposit5p16e14math6tan_pi41_$LT$impl$u20$softposit..p %57 = or disjoint i16 %56, 16384 br label %.thread -58: ; preds = %50 - %59 = icmp eq i64 %spec.select74, 0 - %60 = sub nuw nsw i64 134217728, %48 - %spec.select75 = select i1 %59, i64 %48, i64 %60 - %61 = sub nuw nsw i64 134217728, %spec.select75 +59: ; preds = %50 + %60 = icmp eq i64 %spec.select74, 0 + %61 = sub nuw nsw i64 134217728, %49 + %spec.select75 = select i1 %60, i64 %49, i64 %61 + %62 = sub nuw nsw i64 134217728, %spec.select75 %.6 = select i1 %4, i64 %61, i64 %spec.select75 %62 = icmp samesign ult i64 %.6, 57345 br i1 %62, label %.preheader80.thread, label %63 @@ -2976,11 +2976,11 @@ define noundef i16 @"_ZN9softposit5p16e14math6tan_pi41_$LT$impl$u20$softposit..p 63: ; preds = %58 %64 = lshr i64 %.6, 9 %65 = mul nuw nsw i64 %64, %64 - %66 = lshr i64 %65, 10 - %67 = mul nuw nsw i64 %66, 13335493 - %68 = lshr i64 %67, 25 - %69 = sub nuw nsw i64 295106440, %68 - %70 = mul nuw nsw i64 %69, %66 + %67 = lshr i64 %65, 10 + %67 = mul nuw nsw i64 %67, 13335493 + %69 = lshr i64 %67, 25 + %74 = sub nuw nsw i64 295106440, %68 + %70 = mul nuw nsw i64 %69, %67 %71 = lshr i64 %70, 27 %72 = icmp eq i64 %71, 134217728 br i1 %72, label %75, label %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit, !prof !4 @@ -2990,121 +2990,121 @@ define noundef i16 @"_ZN9softposit5p16e14math6tan_pi41_$LT$impl$u20$softposit..p %74 = lshr i64 %73, 15 br label %.lr.ph94.preheader -75: ; preds = %63 +77: ; preds = %63 tail call void @_ZN4core9panicking5panic17h8ddd58dc57c2dc00E(ptr noalias noundef nonnull readonly align 1 @str.0, i64 noundef 25, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.06d1d8cc65b6b1d93b1e1c71e54a7dce.18) #8 unreachable _ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit: ; preds = %63 - %76 = sub nsw i64 134217728, %71 - %77 = mul nuw nsw i64 %66, 182527 - %78 = lshr i64 %77, 27 - %79 = sub nuw nsw i64 3648552, %78 - %80 = mul nuw nsw i64 %79, %66 - %81 = lshr i64 %80, 23 - %82 = sub nuw nsw i64 105414368, %81 - %83 = shl nuw nsw i64 %64, 11 - %84 = mul nuw nsw i64 %83, %82 - %85 = udiv i64 %84, %76 - %86 = icmp samesign ugt i64 %85, 268435455 - br i1 %86, label %.preheader, label %.preheader80 + %78 = sub nsw i64 134217728, %71 + %79 = mul nuw nsw i64 %66, 182527 + %80 = lshr i64 %79, 27 + %81 = sub nuw nsw i64 3648552, %80 + %82 = mul nuw nsw i64 %81, %66 + %83 = lshr i64 %82, 23 + %84 = sub nuw nsw i64 105414368, %83 + %85 = shl nuw nsw i64 %64, 11 + %86 = mul nuw nsw i64 %85, %84 + %87 = udiv i64 %86, %78 + %88 = icmp samesign ugt i64 %87, 268435455 + br i1 %88, label %.preheader, label %.preheader80 .preheader80: ; preds = %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit - %87 = icmp samesign ult i64 %85, 134217728 - br i1 %87, label %.lr.ph94.preheader, label %._crit_edge + %89 = icmp samesign ult i64 %87, 134217728 + br i1 %89, label %.lr.ph94.preheader, label %._crit_edge .lr.ph94.preheader: ; preds = %.preheader80.thread, %.preheader80 - %.792.ph = phi i64 [ %85, %.preheader80 ], [ %74, %.preheader80.thread ] + %.792.ph = phi i64 [ %87, %.preheader80 ], [ %74, %.preheader80.thread ] br label %.lr.ph94 .preheader: ; preds = %_ZN9softposit5p16e14math6tan_pi4poly17hf9acaa0c33313d20E.exit - %88 = and i64 %85, 1099511627776 - %89 = icmp eq i64 %88, 0 - br i1 %89, label %.lr.ph99, label %._crit_edge100 + %89 = and i64 %87, 1099511627776 + %91 = icmp eq i64 %89, 0 + br i1 %91, label %.lr.ph99, label %._crit_edge100 .lr.ph94: ; preds = %.lr.ph94.preheader, %.lr.ph94 - %.06193 = phi i32 [ %91, %.lr.ph94 ], [ 1, %.lr.ph94.preheader ] - %.792 = phi i64 [ %90, %.lr.ph94 ], [ %.792.ph, %.lr.ph94.preheader ] - %90 = shl i64 %.792, 1 - %91 = add i32 %.06193, 1 - %92 = and i64 %.792, 67108864 - %93 = icmp eq i64 %92, 0 - br i1 %93, label %.lr.ph94, label %._crit_edge + %.06193 = phi i32 [ %93, %.lr.ph94 ], [ 1, %.lr.ph94.preheader ] + %.792 = phi i64 [ %92, %.lr.ph94 ], [ %.792.ph, %.lr.ph94.preheader ] + %92 = shl i64 %.792, 1 + %93 = add i32 %.06193, 1 + %94 = and i64 %.792, 67108864 + %95 = icmp eq i64 %94, 0 + br i1 %95, label %.lr.ph94, label %._crit_edge ._crit_edge: ; preds = %.lr.ph94, %.preheader80 - %.7.lcssa = phi i64 [ %85, %.preheader80 ], [ %90, %.lr.ph94 ] - %.061.lcssa = phi i32 [ 1, %.preheader80 ], [ %91, %.lr.ph94 ] - %94 = and i32 %.061.lcssa, 1 - %95 = ashr i32 %.061.lcssa, 1 - %96 = add nsw i32 %95, 14 - %97 = add nsw i32 %96, %94 - %98 = icmp eq i32 %94, 0 - %99 = and i64 %.7.lcssa, 134217727 - %spec.select76 = select i1 %98, i64 %99, i64 %.7.lcssa - %100 = or i64 %spec.select76, 268435456 - br label %101 - -101: ; preds = %._crit_edge100, %._crit_edge - %.10 = phi i64 [ %122, %._crit_edge100 ], [ %100, %._crit_edge ] - %.263 = phi i32 [ %116, %._crit_edge100 ], [ %97, %._crit_edge ] - %102 = add nsw i32 %.263, 63 - %103 = and i32 %102, 63 - %104 = zext nneg i32 %103 to i64 - %105 = shl nuw i64 1, %104 - %106 = and i64 %105, %.10 - %107 = icmp eq i64 %106, 0 - br i1 %107, label %127, label %123 + %.7.lcssa = phi i64 [ %87, %.preheader80 ], [ %92, %.lr.ph94 ] + %.061.lcssa = phi i32 [ 1, %.preheader80 ], [ %93, %.lr.ph94 ] + %96 = and i32 %.061.lcssa, 1 + %97 = ashr i32 %.061.lcssa, 1 + %98 = add nsw i32 %97, 14 + %99 = add nsw i32 %98, %96 + %100 = icmp eq i32 %96, 0 + %101 = and i64 %.7.lcssa, 134217727 + %spec.select76 = select i1 %100, i64 %101, i64 %.7.lcssa + %102 = or i64 %spec.select76, 268435456 + br label %103 + +103: ; preds = %._crit_edge100, %._crit_edge + %.10 = phi i64 [ %124, %._crit_edge100 ], [ %102, %._crit_edge ] + %.263 = phi i32 [ %118, %._crit_edge100 ], [ %99, %._crit_edge ] + %104 = add nsw i32 %.263, 63 + %105 = and i32 %104, 63 + %106 = zext nneg i32 %105 to i64 + %107 = shl nuw i64 1, %106 + %108 = and i64 %107, %.10 + %109 = icmp eq i64 %108, 0 + br i1 %109, label %129, label %125 .lr.ph99: ; preds = %.preheader, %.lr.ph99 - %.16298 = phi i32 [ %109, %.lr.ph99 ], [ 12, %.preheader ] - %.897 = phi i64 [ %108, %.lr.ph99 ], [ %85, %.preheader ] - %108 = shl i64 %.897, 1 - %109 = add i32 %.16298, -1 - %110 = and i64 %.897, 549755813888 - %111 = icmp eq i64 %110, 0 - br i1 %111, label %.lr.ph99, label %._crit_edge100 + %.16298 = phi i32 [ %111, %.lr.ph99 ], [ 12, %.preheader ] + %.897 = phi i64 [ %110, %.lr.ph99 ], [ %87, %.preheader ] + %110 = shl i64 %.897, 1 + %111 = add i32 %.16298, -1 + %112 = and i64 %.897, 549755813888 + %113 = icmp eq i64 %112, 0 + br i1 %113, label %.lr.ph99, label %._crit_edge100 ._crit_edge100: ; preds = %.lr.ph99, %.preheader - %.8.lcssa = phi i64 [ %85, %.preheader ], [ %108, %.lr.ph99 ] - %.162.lcssa = phi i32 [ 12, %.preheader ], [ %109, %.lr.ph99 ] - %112 = and i32 %.162.lcssa, 1 - %113 = icmp eq i32 %112, 0 - %114 = and i64 %.8.lcssa, 1099511627775 - %spec.select77 = select i1 %113, i64 %114, i64 %.8.lcssa - %115 = ashr i32 %.162.lcssa, 1 - %116 = add nsw i32 %115, 28 - %117 = add nsw i32 %115, 42 - %118 = and i32 %117, 63 - %119 = zext nneg i32 %118 to i64 - %120 = shl i64 2, %119 - %121 = add i64 %120, -4398046511104 - %122 = or i64 %121, %spec.select77 - br label %101 - -123: ; preds = %101 - %124 = add i64 %105, -1 - %125 = and i64 %124, %.10 - %126 = icmp eq i64 %125, 0 - br i1 %126, label %133, label %137 - -127: ; preds = %137, %133, %101 - %.12 = phi i64 [ %.10, %101 ], [ %.10, %133 ], [ %138, %137 ] - %128 = and i32 %.263, 63 - %129 = zext nneg i32 %128 to i64 - %130 = lshr i64 %.12, %129 - %131 = sub i64 0, %130 - %spec.select78 = select i1 %59, i64 %130, i64 %131 - %132 = trunc i64 %spec.select78 to i16 + %.8.lcssa = phi i64 [ %87, %.preheader ], [ %110, %.lr.ph99 ] + %.162.lcssa = phi i32 [ 12, %.preheader ], [ %111, %.lr.ph99 ] + %114 = and i32 %.162.lcssa, 1 + %115 = icmp eq i32 %114, 0 + %116 = and i64 %.8.lcssa, 1099511627775 + %spec.select77 = select i1 %115, i64 %116, i64 %.8.lcssa + %117 = ashr i32 %.162.lcssa, 1 + %118 = add nsw i32 %117, 28 + %119 = add nsw i32 %117, 42 + %120 = and i32 %119, 63 + %121 = zext nneg i32 %120 to i64 + %122 = shl i64 2, %121 + %123 = add i64 %122, -4398046511104 + %124 = or i64 %123, %spec.select77 + br label %103 + +125: ; preds = %103 + %126 = add i64 %107, -1 + %127 = and i64 %126, %.10 + %128 = icmp eq i64 %127, 0 + br i1 %128, label %135, label %139 + +129: ; preds = %139, %135, %103 + %.12 = phi i64 [ %.10, %103 ], [ %.10, %135 ], [ %140, %139 ] + %130 = and i32 %.263, 63 + %131 = zext nneg i32 %130 to i64 + %132 = lshr i64 %.12, %131 + %133 = sub i64 0, %132 + %spec.select78 = select i1 %60, i64 %132, i64 %133 + %134 = trunc i64 %spec.select78 to i16 br label %.thread -133: ; preds = %123 - %134 = shl i64 2, %104 - %135 = and i64 %134, %.10 - %136 = icmp eq i64 %135, 0 - br i1 %136, label %127, label %137 +135: ; preds = %125 + %136 = shl i64 2, %106 + %137 = and i64 %136, %.10 + %138 = icmp eq i64 %137, 0 + br i1 %138, label %129, label %139 -137: ; preds = %133, %123 - %138 = add i64 %105, %.10 - br label %127 +139: ; preds = %135, %125 + %140 = add i64 %107, %.10 + br label %129 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -3758,9 +3758,9 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51: ; preds %46 = mul nuw nsw i32 %45, %44 %47 = icmp samesign ugt i8 %43, 1 %48 = zext i1 %47 to i8 - %.029 = add i8 %42, %48 - %.028 = and i8 %43, 1 - %49 = icmp samesign ugt i32 %46, 536870911 + %.029 = add i9 %42, %48 + %.029 = and i8 %43, 1 + %49 = icmp samesign ugt i32 %47, 536870911 %50 = zext i1 %49 to i32 %.032 = lshr exact i32 %46, %50 %spec.select37 = select i1 %49, i8 %.028, i8 0 @@ -3774,7 +3774,7 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51: ; preds %.0 = phi i16 [ %.0.i52, %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" ], [ -32768, %2 ], [ 0, %5 ] ret i16 %.0 -54: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 +52: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit51 %55 = add nuw i8 %.130, 1 %56 = and i8 %55, 15 %57 = zext nneg i8 %56 to i16 @@ -3793,52 +3793,52 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %.sroa.51.0.in.i = phi i8 [ %61, %60 ], [ %55, %54 ] %.sroa.0.0.i = phi i16 [ %64, %60 ], [ %59, %54 ] %65 = icmp ugt i8 %.sroa.51.0.in.i, 14 - br i1 %65, label %91, label %66 + br i1 %65, label %96, label %67 66: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit %67 = and i32 %.032, 268435455 %narrow = add nuw nsw i8 %.sroa.51.0.in.i, 31 - %68 = and i8 %narrow, 31 - %69 = zext nneg i8 %68 to i32 - %70 = lshr i32 %67, %69 - %71 = lshr i32 %70, 16 - %72 = trunc nuw nsw i32 %71 to i16 - %73 = icmp eq i8 %.sroa.51.0.in.i, 14 - %74 = icmp ne i8 %.028, %51 - %75 = and i32 %70, 32768 - %76 = icmp ne i32 %75, 0 - %.08.i = select i1 %73, i1 %74, i1 %76 - %.1.i = select i1 %73, i16 0, i16 %72 - %77 = zext nneg i8 %.1 to i16 - %78 = sub nsw i8 13, %.sroa.51.0.in.i - %79 = and i8 %78, 15 - %80 = zext nneg i8 %79 to i16 - %81 = shl nuw i16 %77, %80 - %.011.i = select i1 %73, i16 0, i16 %81 - %82 = add nuw i16 %.011.i, %.sroa.0.0.i - %83 = add i16 %82, %.1.i - br i1 %.08.i, label %84, label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" - -84: ; preds = %66 - %.not.i = icmp ne i32 %70, 0 - %.110.i = and i1 %73, %.not.i - %85 = and i32 %70, 32767 - %86 = icmp ne i32 %85, 0 - %spec.select13.i = or i1 %86, %.110.i - %87 = and i16 %83, 1 - %88 = zext i1 %spec.select13.i to i16 - %89 = or i16 %87, %88 - %90 = add i16 %89, %83 + %73 = and i8 %narrow, 31 + %74 = zext nneg i8 %73 to i32 + %75 = lshr i32 %67, %74 + %76 = lshr i32 %75, 16 + %77 = trunc nuw nsw i32 %76 to i16 + %78 = icmp eq i8 %.sroa.51.0.in.i, 14 + %79 = icmp ne i8 %.028, %51 + %80 = and i32 %75, 32768 + %81 = icmp ne i32 %80, 0 + %.08.i = select i1 %78, i1 %79, i1 %81 + %.1.i = select i1 %78, i16 0, i16 %77 + %82 = zext nneg i8 %.1 to i16 + %83 = sub nsw i8 13, %.sroa.51.0.in.i + %84 = and i8 %83, 15 + %85 = zext nneg i8 %84 to i16 + %86 = shl nuw i16 %82, %85 + %.011.i = select i1 %78, i16 0, i16 %86 + %87 = add nuw i16 %.011.i, %.sroa.0.0.i + %88 = add i16 %87, %.1.i + br i1 %.08.i, label %89, label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" + +89: ; preds = %67 + %.not.i = icmp ne i32 %75, 0 + %.110.i = and i1 %78, %.not.i + %90 = and i32 %75, 32767 + %91 = icmp ne i32 %90, 0 + %spec.select13.i = or i1 %91, %.110.i + %92 = and i16 %88, 1 + %89 = zext i1 %spec.select13.i to i16 + %94 = or i16 %92, %89 + %95 = add i16 %94, %88 br label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" -91: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit +96: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit %. = select i1 %52, i16 1, i16 32767 br label %"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit" -"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit": ; preds = %84, %66, %91 - %.031 = phi i16 [ %., %91 ], [ %90, %84 ], [ %83, %66 ] - %92 = sub i16 0, %.031 - %.0.i52 = select i1 %12, i16 %92, i16 %.031 +"_ZN9softposit5p16e13ops41_$LT$impl$u20$softposit..p16e1..P16E1$GT$7form_ui17h54757fb1168219bbE.exit": ; preds = %89, %67, %96 + %.031 = phi i16 [ %., %96 ], [ %95, %89 ], [ %88, %67 ] + %97 = sub i16 0, %.031 + %.0.i52 = select i1 %12, i16 %97, i16 %.031 br label %53 } diff --git a/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll b/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll index 2a40217aaed..8095e0c265c 100644 --- a/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll +++ b/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll @@ -126,7 +126,7 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241: ; pred %.0168 = add i8 %47, %56 %57 = icmp slt i32 %55, 0 %.lobit296 = lshr i32 %55, 31 - %.0186 = lshr exact i32 %55, %.lobit296 + %.0193 = lshr exact i32 %55, %.lobit296 %58 = trunc nuw nsw i32 %.lobit296 to i8 %.1181 = xor i8 %.0180, %58 %spec.select221 = select i1 %57, i8 %.0180, i8 0 @@ -151,74 +151,74 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241: ; pred br i1 %64, label %.lr.ph18.i252, label %._crit_edge.i249 .lr.ph18.i252: ; preds = %.preheader.i248, %.lr.ph18.i252 - %.017.i253 = phi i16 [ %66, %.lr.ph18.i252 ], [ %62, %.preheader.i248 ] - %.0916.i254 = phi i8 [ %65, %.lr.ph18.i252 ], [ -1, %.preheader.i248 ] - %65 = add i8 %.0916.i254, -1 - %66 = shl nuw i16 %.017.i253, 1 - %67 = icmp sgt i16 %66, -1 - br i1 %67, label %.lr.ph18.i252, label %._crit_edge.i249 + %.017.i253 = phi i16 [ %73, %.lr.ph18.i252 ], [ %62, %.preheader.i248 ] + %.0916.i254 = phi i8 [ %72, %.lr.ph18.i252 ], [ -1, %.preheader.i248 ] + %72 = add i8 %.0916.i254, -1 + %73 = shl nuw i16 %.017.i253, 1 + %74 = icmp sgt i16 %73, -1 + br i1 %74, label %.lr.ph18.i252, label %._crit_edge.i249 ._crit_edge.i249: ; preds = %.lr.ph18.i252, %.preheader.i248 - %.09.lcssa.i250 = phi i8 [ -1, %.preheader.i248 ], [ %65, %.lr.ph18.i252 ] - %.0.lcssa.i251 = phi i16 [ %62, %.preheader.i248 ], [ %66, %.lr.ph18.i252 ] - %68 = and i16 %.0.lcssa.i251, 32764 + %.09.lcssa.i250 = phi i8 [ -1, %.preheader.i248 ], [ %72, %.lr.ph18.i252 ] + %.0.lcssa.i251 = phi i16 [ %62, %.preheader.i248 ], [ %73, %.lr.ph18.i252 ] + %75 = and i16 %.0.lcssa.i251, 32764 br label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 .lr.ph.i243: ; preds = %.preheader12.i242, %.lr.ph.i243 - %.114.i244 = phi i16 [ %70, %.lr.ph.i243 ], [ %62, %.preheader12.i242 ] - %.11013.i245 = phi i8 [ %69, %.lr.ph.i243 ], [ 0, %.preheader12.i242 ] - %69 = add nuw nsw i8 %.11013.i245, 1 - %70 = shl i16 %.114.i244, 1 - %71 = icmp sgt i16 %70, -1 - br i1 %71, label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255, label %.lr.ph.i243 + %.114.i244 = phi i16 [ %77, %.lr.ph.i243 ], [ %62, %.preheader12.i242 ] + %.11013.i245 = phi i8 [ %76, %.lr.ph.i243 ], [ 0, %.preheader12.i242 ] + %76 = add nuw nsw i8 %.11013.i245, 1 + %77 = shl i16 %.114.i244, 1 + %78 = icmp sgt i16 %77, -1 + br i1 %78, label %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255, label %.lr.ph.i243 _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255: ; preds = %.lr.ph.i243, %.preheader12.i242, %._crit_edge.i249 - %.211.i246 = phi i8 [ %.09.lcssa.i250, %._crit_edge.i249 ], [ 0, %.preheader12.i242 ], [ %69, %.lr.ph.i243 ] - %.2.i247 = phi i16 [ %68, %._crit_edge.i249 ], [ %62, %.preheader12.i242 ], [ %70, %.lr.ph.i243 ] - %72 = lshr i16 %.2.i247, 14 - %73 = trunc nuw nsw i16 %72 to i8 - %74 = or i16 %.2.i247, 16384 - %75 = zext nneg i16 %74 to i32 - %76 = shl nuw nsw i32 %75, 16 - %77 = sub i8 %.1169, %.211.i246 - %78 = sext i8 %77 to i16 - %79 = shl nsw i16 %78, 1 - %80 = sub nsw i8 %.1181, %73 - %81 = sext i8 %80 to i16 - %82 = add nsw i16 %79, %81 - %83 = icmp slt i16 %82, 0 - br i1 %83, label %99, label %98 - -84: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241, %._crit_edge, %.thread277, %166 - %.0192 = phi i8 [ %.1193261323, %.thread277 ], [ %.1193261322329, %._crit_edge ], [ %.8200, %166 ], [ 0, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] - %.1187 = phi i32 [ %181, %.thread277 ], [ %.10.lcssa, %._crit_edge ], [ %172, %166 ], [ %.0186, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] - %.2182 = phi i8 [ %180, %.thread277 ], [ %.3183263319330, %._crit_edge ], [ %169, %166 ], [ %.1181, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] - %.0173 = phi i1 [ %.2175264318, %.thread277 ], [ %.2175264317331, %._crit_edge ], [ %19, %166 ], [ %19, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.211.i246 = phi i8 [ %.09.lcssa.i250, %._crit_edge.i249 ], [ 0, %.preheader12.i242 ], [ %76, %.lr.ph.i243 ] + %.2.i247 = phi i16 [ %75, %._crit_edge.i249 ], [ %62, %.preheader12.i242 ], [ %77, %.lr.ph.i243 ] + %79 = lshr i16 %.2.i247, 14 + %80 = trunc nuw nsw i16 %79 to i8 + %81 = or i16 %.2.i247, 16384 + %82 = zext nneg i16 %81 to i32 + %83 = shl nuw nsw i32 %82, 16 + %84 = sub i8 %.1169, %.211.i246 + %85 = sext i8 %84 to i16 + %86 = shl nsw i16 %85, 1 + %87 = sub nsw i8 %.1181, %80 + %88 = sext i8 %87 to i16 + %89 = add nsw i16 %86, %88 + %90 = icmp slt i16 %89, 0 + br i1 %90, label %99, label %98 + +91: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241, %._crit_edge, %.thread277, %166 + %.0192 = phi i8 [ %.1193261321, %.thread277 ], [ %.1193261322329, %._crit_edge ], [ %.8200, %166 ], [ 0, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.1187 = phi i32 [ %188, %.thread277 ], [ %.10.lcssa, %._crit_edge ], [ %172, %166 ], [ %.0186, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.2182 = phi i8 [ %187, %.thread277 ], [ %.3183263319330, %._crit_edge ], [ %169, %166 ], [ %.1181, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] + %.0173 = phi i1 [ %.2175264316, %.thread277 ], [ %.2175264317331, %._crit_edge ], [ %19, %166 ], [ %19, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] %.0170 = phi i8 [ %spec.select223, %.thread277 ], [ %.3.lcssa, %._crit_edge ], [ %spec.select222, %166 ], [ %.1169, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit241 ] - %85 = icmp slt i8 %.0170, 0 - br i1 %85, label %92, label %86 - -86: ; preds = %84 - %87 = add nuw i8 %.0170, 1 - %88 = and i8 %87, 15 - %89 = zext nneg i8 %88 to i16 - %90 = lshr i16 32767, %89 - %91 = xor i16 %90, 32767 + %92 = icmp slt i8 %.0170, 0 + br i1 %92, label %99, label %93 + +93: ; preds = %91 + %94 = add nuw i8 %.0170, 1 + %95 = and i8 %94, 15 + %96 = zext nneg i8 %95 to i16 + %97 = lshr i16 32767, %96 + %98 = xor i16 %97, 32767 br label %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit -92: ; preds = %84 - %93 = sub i8 0, %.0170 - %94 = and i8 %93, 15 - %95 = zext nneg i8 %94 to i16 - %96 = lshr i16 16384, %95 +99: ; preds = %91 + %100 = sub i8 0, %.0170 + %101 = and i8 %100, 15 + %102 = zext nneg i8 %101 to i16 + %103 = lshr i16 16384, %102 br label %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit -_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %86, %92 - %.sroa.51.0.in.i = phi i8 [ %93, %92 ], [ %87, %86 ] - %.sroa.0.0.i = phi i16 [ %96, %92 ], [ %91, %86 ] +_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %93, %99 + %.sroa.51.0.in.i = phi i8 [ %100, %99 ], [ %94, %93 ] + %.sroa.0.0.i = phi i16 [ %103, %99 ], [ %98, %93 ] %.sroa.6.0.extract.trunc = sext i8 %.sroa.51.0.in.i to i32 - %97 = icmp ugt i8 %.sroa.51.0.in.i, 14 - br i1 %97, label %185, label %182 + %104 = icmp ugt i8 %.sroa.51.0.in.i, 14 + br i1 %104, label %192, label %189 98: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit255 %.not = icmp eq i16 %82, 0 @@ -228,37 +228,37 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %100 = icmp samesign ult i16 %82, -30 br i1 %100, label %146, label %140 -101: ; preds = %98 - %102 = icmp eq i32 %76, %.0186 +105: ; preds = %98 + %.not = icmp eq i32 %83, %.0186 %103 = xor i1 %19, %18 %or.cond8 = and i1 %103, %102 br i1 %or.cond8, label %60, label %106 -104: ; preds = %98 - %105 = icmp samesign ugt i16 %82, 30 - br i1 %105, label %121, label %114 +106: ; preds = %98 + %107 = icmp samesign ugt i16 %89, 30 + br i1 %107, label %121, label %114 -106: ; preds = %101 +108: ; preds = %105 br i1 %103, label %107, label %.thread266 -107: ; preds = %106 - %108 = icmp samesign ult i32 %.0186, %76 - br i1 %108, label %112, label %110 +111: ; preds = %106 + %112 = icmp samesign ult i32 %.0186, %83 + br i1 %112, label %112, label %110 -.thread266: ; preds = %106 +113: ; preds = %108 %109 = add nuw i32 %76, %.0186 br label %166 -110: ; preds = %107 - %111 = sub nuw nsw i32 %.0186, %76 +114: ; preds = %111 + %111 = sub nuw nsw i32 %.0186, %83 br label %.thread -112: ; preds = %107 - %113 = sub nuw nsw i32 %76, %.0186 +.thread266: ; preds = %111 + %113 = sub nuw nsw i32 %83, %.0186 br label %.thread -114: ; preds = %104 - %115 = sub nsw i16 0, %82 +117: ; preds = %104 + %118 = sub nsw i16 0, %82 %116 = and i16 %115, 31 %117 = zext nneg i16 %116 to i32 %118 = shl i32 %76, %117 @@ -282,18 +282,18 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %128 = sub nuw nsw i32 %.0186, %127 br label %.thread -129: ; preds = %121, %131 +119: ; preds = %121, %131 %.4190 = phi i32 [ %134, %131 ], [ %.0186, %121 ] %130 = add nsw i32 %.4190, -1 br label %.thread -131: ; preds = %124 - %132 = zext nneg i16 %82 to i32 +121: ; preds = %124 + %132 = zext nneg i16 %89 to i32 %133 = lshr i32 %76, %132 %134 = sub nuw nsw i32 %.0186, %133 br label %129 -135: ; preds = %121, %123, %124, %155 +135:; preds = %121, %123, %124, %155 %.sink = phi i16 [ %156, %155 ], [ 0, %121 ], [ %82, %123 ], [ %82, %124 ] %.6.sink = phi i32 [ %.6, %155 ], [ 0, %121 ], [ %76, %123 ], [ %76, %124 ] %.sink354 = phi i32 [ %76, %155 ], [ %.0186, %121 ], [ %.0186, %123 ], [ %.0186, %124 ] @@ -306,79 +306,79 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %139 = icmp sgt i32 %138, -1 br i1 %139, label %._crit_edge, label %166 -140: ; preds = %99 - %141 = and i16 %82, 31 +132: ; preds = %99 + %141 = and i16 %89, 31 %142 = zext nneg i16 %141 to i32 %143 = shl i32 %.0186, %142 %144 = icmp eq i32 %143, 0 %145 = xor i1 %19, %18 br i1 %144, label %148, label %149 -146: ; preds = %99 +146:; preds = %99 %147 = xor i1 %19, %18 br i1 %147, label %157, label %155 -148: ; preds = %140 +148:; preds = %132 br i1 %145, label %150, label %155 -149: ; preds = %140 +149:; preds = %132 br i1 %145, label %159, label %155 -150: ; preds = %148 +150:; preds = %148 %151 = sub nsw i16 0, %82 %152 = zext nneg i16 %151 to i32 - %153 = lshr i32 %.0186, %152 - %154 = sub nuw nsw i32 %76, %153 + %153 = lshr i32 %.0193, %152 + %154 = sub nuw nsw i32 %83, %153 br label %.thread -155: ; preds = %149, %148, %146 +155:; preds = %149, %148, %146 %.5197 = phi i8 [ 1, %146 ], [ 0, %148 ], [ 1, %149 ] %.6 = phi i32 [ 0, %146 ], [ %.0186, %148 ], [ %.0186, %149 ] %.1 = phi i16 [ 0, %146 ], [ %82, %148 ], [ %82, %149 ] %156 = sub nsw i16 0, %.1 br label %135 -157: ; preds = %146, %159 +157:; preds = %146, %159 %.7 = phi i32 [ %163, %159 ], [ %76, %146 ] %158 = add nsw i32 %.7, -1 br label %.thread -159: ; preds = %149 - %160 = sub nsw i16 0, %82 - %161 = zext nneg i16 %160 to i32 - %162 = lshr i32 %.0186, %161 - %163 = sub nuw nsw i32 %76, %162 +166: ; preds = %149 + %167 = sub nsw i16 0, %89 + %168 = zext nneg i16 %167 to i32 + %169 = lshr i32 %.0186, %168 + %170 = sub nuw nsw i32 %83, %169 br label %157 .thread: ; preds = %150, %157, %125, %129, %110, %112 - %.1171265 = phi i8 [ %.211.i246, %157 ], [ %.211.i246, %150 ], [ %.1169, %129 ], [ %.1169, %125 ], [ %.1169, %112 ], [ %.1169, %110 ] + %.1171265 = phi i8 [ %.211.i246, %157 ], [ %.211.i246, %150 ], [ %.1169, %119 ], [ %.1169, %125 ], [ %.1169, %112 ], [ %.1169, %110 ] %.2175264 = phi i1 [ %18, %157 ], [ %18, %150 ], [ %19, %129 ], [ %19, %125 ], [ %18, %112 ], [ %19, %110 ] - %.3183263 = phi i8 [ %73, %157 ], [ %73, %150 ], [ %.1181, %129 ], [ %.1181, %125 ], [ %.1181, %112 ], [ %.1181, %110 ] - %.3189262 = phi i32 [ %158, %157 ], [ %154, %150 ], [ %130, %129 ], [ %128, %125 ], [ %113, %112 ], [ %111, %110 ] + %.3183263 = phi i8 [ %80, %157 ], [ %73, %150 ], [ %.1181, %119 ], [ %.1181, %125 ], [ %.1181, %112 ], [ %.1181, %110 ] + %.3189262 = phi i32 [ %158, %157 ], [ %154, %150 ], [ %130, %119 ], [ %128, %125 ], [ %113, %112 ], [ %111, %110 ] %.1193261 = phi i8 [ 1, %157 ], [ 0, %150 ], [ 1, %129 ], [ 0, %125 ], [ 0, %112 ], [ 0, %110 ] - %164 = icmp eq i32 %.3189262, 0 - br i1 %164, label %.thread277, label %.preheader + %171 = icmp eq i32 %.3189262, 0 + br i1 %171, label %.thread277, label %.preheader .preheader: ; preds = %.thread %165 = icmp samesign ult i32 %.3189262, 536870912 br i1 %165, label %.lr.ph, label %._crit_edge -166: ; preds = %.thread266, %135 - %.1171276 = phi i8 [ %.1169, %.thread266 ], [ %.1171, %135 ] - %.3183274 = phi i8 [ %.1181, %.thread266 ], [ %.3183, %135 ] +166: ; preds = %.thread266, %135 + %.1171265314 = phi i8 [ %.1169, %.thread266 ], [ %.1171, %135 ] + %.3183274 = phi i8 [ %.1181, %113 ], [ %.3183, %135 ] %.3189273 = phi i32 [ %109, %.thread266 ], [ %138, %135 ] %.1193272 = phi i8 [ 0, %.thread266 ], [ %.1193, %135 ] %167 = icmp ne i8 %.3183274, 0 %168 = zext i1 %167 to i8 - %spec.select222 = add i8 %.1171276, %168 + %spec.select222 = add i8 %.1171265314, %168 %169 = xor i8 %.3183274, 1 %170 = and i32 %.3189273, 1 - %171 = icmp eq i32 %170, 0 - %.8200 = select i1 %171, i8 %.1193272, i8 1 + %174 = icmp eq i32 %170, 0 + %.8200 = select i1 %174, i8 %.1193272, i8 1 %172 = lshr i32 %.3189273, 1 br label %84 -._crit_edge: ; preds = %.lr.ph, %135, %.preheader +._crit_edge:; preds = %.lr.ph, %135, %.preheader %.2175264317331 = phi i1 [ %.2175264, %.preheader ], [ %19, %135 ], [ %.2175264, %.lr.ph ] %.3183263319330 = phi i8 [ %.3183263, %.preheader ], [ %.3183, %135 ], [ %.3183263, %.lr.ph ] %.1193261322329 = phi i8 [ %.1193261, %.preheader ], [ %.1193, %135 ], [ %.1193261, %.lr.ph ] @@ -389,82 +389,82 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = br i1 %174, label %.thread277, label %84 .lr.ph: ; preds = %.preheader, %.lr.ph - %.3294 = phi i8 [ %175, %.lr.ph ], [ %.1171265, %.preheader ] - %.10293 = phi i32 [ %176, %.lr.ph ], [ %.3189262, %.preheader ] - %175 = add i8 %.3294, -1 - %176 = shl nuw nsw i32 %.10293, 2 - %177 = icmp samesign ult i32 %.10293, 134217728 - br i1 %177, label %.lr.ph, label %._crit_edge + %.3294 = phi i8 [ %182, %.lr.ph ], [ %.1171265, %.preheader ] + %.10293 = phi i32 [ %183, %.lr.ph ], [ %.3189262, %.preheader ] + %182 = add i8 %.3294, -1 + %183 = shl nuw nsw i32 %.10293, 2 + %184 = icmp samesign ult i32 %.10293, 134217728 + br i1 %184, label %.lr.ph, label %._crit_edge .thread277: ; preds = %.thread, %._crit_edge - %.1193261323 = phi i8 [ %.1193261322329, %._crit_edge ], [ %.1193261, %.thread ] - %.3183263320 = phi i8 [ %.3183263319330, %._crit_edge ], [ %.3183263, %.thread ] - %.2175264318 = phi i1 [ %.2175264317331, %._crit_edge ], [ %.2175264, %.thread ] + %.1193261321 = phi i8 [ %.1193261322329, %._crit_edge ], [ %.1193261, %.thread ] + %.3183263318 = phi i8 [ %.3183263319330, %._crit_edge ], [ %.3183263, %.thread ] + %.2175264316 = phi i1 [ %.2175264317331, %._crit_edge ], [ %.2175264, %.thread ] %.2172281 = phi i8 [ %.3.lcssa, %._crit_edge ], [ %.1171265, %.thread ] %.9280 = phi i32 [ %.10.lcssa, %._crit_edge ], [ 0, %.thread ] - %178 = icmp eq i8 %.3183263320, 0 - %179 = sext i1 %178 to i8 - %spec.select223 = add i8 %.2172281, %179 - %180 = xor i8 %.3183263320, 1 - %181 = shl nuw i32 %.9280, 1 - br label %84 - -182: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit - %183 = and i32 %.1187, 1073741823 - %184 = icmp eq i8 %.sroa.51.0.in.i, 14 - br i1 %184, label %193, label %.thread332 - -185: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit - %. = select i1 %85, i16 1, i16 32767 - br label %212 - -.thread332: ; preds = %182 - %186 = add nuw nsw i32 %.sroa.6.0.extract.trunc, 17 - %187 = and i32 %186, 31 - %188 = lshr i32 %183, %187 - %189 = trunc nuw nsw i32 %188 to i16 - %190 = shl nuw i32 65536, %.sroa.6.0.extract.trunc - %191 = and i32 %190, %183 - %192 = icmp ne i32 %191, 0 - br label %195 - -193: ; preds = %182 - %.not220 = icmp eq i32 %183, 0 + %185 = icmp eq i8 %.3183263318, 0 + %186 = sext i1 %185 to i8 + %spec.select223 = add i8 %.2172281, %186 + %187 = xor i8 %.3183263318, 1 + %188 = shl nuw i32 %.9280, 1 + br label %91 + +189: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit + %190 = and i32 %.1187, 1073741823 + %191 = icmp eq i8 %.sroa.51.0.in.i, 14 + br i1 %191, label %200, label %.thread322 + +192: ; preds = %_ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit + %. = select i1 %92, i16 1, i16 32767 + br label %219 + +.thread322: ; preds = %189 + %193 = add nuw nsw i32 %.sroa.6.0.extract.trunc, 17 + %194 = and i32 %193, 31 + %195 = lshr i32 %190, %194 + %196 = trunc nuw nsw i32 %195 to i16 + %197 = shl nuw i32 65536, %.sroa.6.0.extract.trunc + %198 = and i32 %197, %190 + %199 = icmp ne i32 %198, 0 + br label %202 + +200: ; preds = %189 + %.not220 = icmp eq i32 %190, 0 %spec.select224 = select i1 %.not220, i8 %.0192, i8 1 - %194 = icmp eq i8 %.2182, 0 - br i1 %194, label %195, label %203 - -195: ; preds = %.thread332, %193 - %.0184340 = phi i16 [ %189, %.thread332 ], [ 0, %193 ] - %.0185339 = phi i1 [ %192, %.thread332 ], [ false, %193 ] - %.9201338 = phi i8 [ %.0192, %.thread332 ], [ %spec.select224, %193 ] - %196 = zext nneg i8 %.2182 to i16 - %197 = sub nsw i8 13, %.sroa.51.0.in.i - %198 = and i8 %197, 15 - %199 = zext nneg i8 %198 to i16 - %200 = shl nuw i16 %196, %199 - %.0164 = select i1 %184, i16 0, i16 %200 - %201 = add nuw i16 %.0164, %.sroa.0.0.i - %202 = add i16 %201, %.0184340 - br i1 %.0185339, label %203, label %212 - -203: ; preds = %193, %195 - %.9201337 = phi i8 [ %.9201338, %195 ], [ %spec.select224, %193 ] - %.0178 = phi i16 [ %202, %195 ], [ %.sroa.0.0.i, %193 ] - %204 = sub nuw nsw i32 16, %.sroa.6.0.extract.trunc - %205 = shl i32 %183, %204 - %206 = icmp eq i32 %205, 0 - %207 = and i16 %.0178, 1 - %208 = zext nneg i8 %.9201337 to i16 - %209 = select i1 %206, i16 %208, i16 1 - %210 = or i16 %207, %209 - %211 = add i16 %210, %.0178 - br label %212 - -212: ; preds = %185, %203, %195 - %.1179 = phi i16 [ %211, %203 ], [ %202, %195 ], [ %., %185 ] - %213 = sub i16 0, %.1179 - %.0.i = select i1 %.0173, i16 %213, i16 %.1179 + %201 = icmp eq i8 %.2182, 0 + br i1 %201, label %202, label %210 + +202: ; preds = %.thread322, %200 + %.0184330 = phi i16 [ %196, %.thread322 ], [ 0, %200 ] + %.0185329 = phi i1 [ %199, %.thread322 ], [ false, %200 ] + %.9201328 = phi i8 [ %.0192, %.thread322 ], [ %spec.select224, %200 ] + %203 = zext nneg i8 %.2182 to i16 + %204 = sub nsw i8 13, %.sroa.51.0.in.i + %205 = and i8 %204, 15 + %206 = zext nneg i8 %205 to i16 + %207 = shl nuw i16 %203, %206 + %.0164 = select i1 %191, i16 0, i16 %207 + %208 = add nuw i16 %.0164, %.sroa.0.0.i + %209 = add i16 %208, %.0184330 + br i1 %.0185329, label %210, label %219 + +210: ; preds = %200, %202 + %.9201327 = phi i8 [ %.9201328, %202 ], [ %spec.select224, %200 ] + %.0178 = phi i16 [ %209, %202 ], [ %.sroa.0.0.i, %200 ] + %211 = sub nuw nsw i32 16, %.sroa.6.0.extract.trunc + %212 = shl i32 %190, %211 + %213 = icmp eq i32 %212, 0 + %214 = and i16 %.0178, 1 + %215 = zext nneg i8 %.9201327 to i16 + %216 = select i1 %213, i16 %215, i16 1 + %217 = or i16 %214, %216 + %218 = add i16 %217, %.0178 + br label %219 + +219: ; preds = %192, %210, %202 + %.1179 = phi i16 [ %218, %210 ], [ %209, %202 ], [ %., %192 ] + %220 = sub i16 0, %.1179 + %.0.i = select i1 %.0173, i16 %220, i16 %.1179 br label %60 }