diff --git a/bench/abc/optimized/bacWriteVer.ll b/bench/abc/optimized/bacWriteVer.ll index 5d835df3d4e..b9f9f3fdc67 100644 --- a/bench/abc/optimized/bacWriteVer.ll +++ b/bench/abc/optimized/bacWriteVer.ll @@ -1105,7 +1105,7 @@ Vec_StrPrintStr.exit110.preheader.i: ; preds = %Vec_StrPush.exit.i1 .lr.ph.i111.i: ; preds = %.lr.ph.i %.not54.i = icmp eq i32 %.049236.i, 0 %203 = select i1 %.not54.i, ptr @.str.10, ptr @.str.65 - %204 = select i1 %.not54.i, i64 1, i64 3 + %204 = select i1 %.not54.i, i64 0, i64 2 br label %205 205: ; preds = %Vec_StrPush.exit.i117.i, %.lr.ph.i111.i @@ -1174,7 +1174,7 @@ Vec_StrPush.exit.i117.i: ; preds = %228, %Vec_StrGrow.e %234 = getelementptr inbounds i8, ptr %230, i64 %233 store i8 %207, ptr %234, align 1, !tbaa !43 %indvars.iv.next.i118.i = add nuw nsw i64 %indvars.iv.i114.i, 1 - %exitcond.not.i119.i = icmp eq i64 %indvars.iv.next.i118.i, %204 + %exitcond.not.i119.i = icmp eq i64 %204, %indvars.iv.i114.i br i1 %exitcond.not.i119.i, label %Vec_StrPrintStr.exit123.i, label %205, !llvm.loop !46 Vec_StrPrintStr.exit123.i: ; preds = %Vec_StrPush.exit.i117.i @@ -1421,7 +1421,7 @@ Bac_BoxBiNum.exit.i: ; preds = %333, %.preheader.i %.0.lcssa.i.i = phi i64 [ 0, %.preheader.i ], [ %indvars.iv.i164.i, %333 ] %.not53.i = icmp eq i64 %indvars.iv687, %.0.lcssa.i.i %337 = select i1 %.not53.i, ptr @.str.10, ptr @.str.65 - %338 = select i1 %.not53.i, i64 1, i64 3 + %338 = select i1 %.not53.i, i64 0, i64 2 br label %339 339: ; preds = %Vec_StrPush.exit.i172.i, %Bac_BoxBiNum.exit.i @@ -1490,7 +1490,7 @@ Vec_StrPush.exit.i172.i: ; preds = %362, %Vec_StrGrow.e %368 = getelementptr inbounds i8, ptr %364, i64 %367 store i8 %341, ptr %368, align 1, !tbaa !43 %indvars.iv.next.i173.i = add nuw nsw i64 %indvars.iv.i169.i, 1 - %exitcond.not.i174.i = icmp eq i64 %indvars.iv.next.i173.i, %338 + %exitcond.not.i174.i = icmp eq i64 %338, %indvars.iv.i169.i br i1 %exitcond.not.i174.i, label %Vec_StrPrintStr.exit178.i, label %339, !llvm.loop !46 Vec_StrPrintStr.exit178.i: ; preds = %Vec_StrPush.exit.i172.i diff --git a/bench/abc/optimized/cbaWriteVer.ll b/bench/abc/optimized/cbaWriteVer.ll index f2aeed58847..eeb5abf6d00 100644 --- a/bench/abc/optimized/cbaWriteVer.ll +++ b/bench/abc/optimized/cbaWriteVer.ll @@ -4085,7 +4085,7 @@ define void @Cba_ManWriteVerilogNtk(ptr noundef %0, i32 noundef %1) local_unname %10 = getelementptr i8, ptr %0, i64 44 %.val871 = load i32, ptr %10, align 4, !tbaa !22 %11 = add nsw i32 %.val871, %.val870 - %12 = icmp sgt i32 %11, 5 + %12 = icmp slt i32 %11, 6 %13 = getelementptr i8, ptr %0, i64 156 %.val872 = load i32, ptr %13, align 4, !tbaa !22 %14 = ashr i32 %.val872, 5 @@ -4486,8 +4486,8 @@ Vec_StrPush.exit.i1022: ; preds = %187, %Vec_StrGrow.e br i1 %exitcond.not.i1024, label %Vec_StrPrintStr.exit1028, label %164, !llvm.loop !59 Vec_StrPrintStr.exit1028: ; preds = %Vec_StrPush.exit.i1022, %Vec_StrPrintStr.exit - %194 = select i1 %12, ptr @.str.73, ptr @.str.74 - %195 = select i1 %12, i64 7, i64 3 + %194 = select i1 %12, ptr @.str.74, ptr @.str.73 + %195 = select i1 %12, i64 2, i64 6 br label %196 196: ; preds = %Vec_StrPush.exit.i1035, %Vec_StrPrintStr.exit1028 @@ -4556,7 +4556,7 @@ Vec_StrPush.exit.i1035: ; preds = %219, %Vec_StrGrow.e %225 = getelementptr inbounds i8, ptr %221, i64 %224 store i8 %198, ptr %225, align 1, !tbaa !15 %indvars.iv.next.i1036 = add nuw nsw i64 %indvars.iv.i1032, 1 - %exitcond.not.i1037 = icmp eq i64 %indvars.iv.next.i1036, %195 + %exitcond.not.i1037 = icmp eq i64 %195, %indvars.iv.i1032 br i1 %exitcond.not.i1037, label %Vec_StrPrintStr.exit1041, label %196, !llvm.loop !59 Vec_StrPrintStr.exit1041: ; preds = %Vec_StrPush.exit.i1035 @@ -4817,8 +4817,8 @@ Vec_StrPrintStr.exit1080: ; preds = %Vec_StrPush.exit.i1 br i1 %328, label %229, label %.critedge2, !llvm.loop !68 .critedge2: ; preds = %Vec_StrPrintStr.exit1080, %Vec_StrPrintStr.exit1041 - %329 = select i1 %12, ptr @.str.76, ptr @.str.77 - %330 = select i1 %12, i64 5, i64 3 + %329 = select i1 %12, ptr @.str.77, ptr @.str.76 + %330 = select i1 %12, i64 2, i64 4 br label %331 331: ; preds = %Vec_StrPush.exit.i1087, %.critedge2 @@ -4887,7 +4887,7 @@ Vec_StrPush.exit.i1087: ; preds = %354, %Vec_StrGrow.e %360 = getelementptr inbounds i8, ptr %356, i64 %359 store i8 %333, ptr %360, align 1, !tbaa !15 %indvars.iv.next.i1088 = add nuw nsw i64 %indvars.iv.i1084, 1 - %exitcond.not.i1089 = icmp eq i64 %indvars.iv.next.i1088, %330 + %exitcond.not.i1089 = icmp eq i64 %330, %indvars.iv.i1084 br i1 %exitcond.not.i1089, label %Vec_StrPrintStr.exit1093, label %331, !llvm.loop !59 Vec_StrPrintStr.exit1093: ; preds = %Vec_StrPush.exit.i1087 @@ -4911,8 +4911,8 @@ Vec_StrPrintStr.exit1093: ; preds = %Vec_StrPush.exit.i1 br label %Cba_ManWriteLineFile.exit Cba_ManWriteLineFile.exit: ; preds = %Vec_StrPrintStr.exit1093, %363, %365 - %370 = select i1 %12, ptr @.str.78, ptr @.str.79 - %371 = select i1 %12, i64 1, i64 2 + %370 = select i1 %12, ptr @.str.79, ptr @.str.78 + %371 = zext i1 %12 to i64 br label %372 372: ; preds = %Vec_StrPush.exit.i1100, %Cba_ManWriteLineFile.exit @@ -4981,7 +4981,7 @@ Vec_StrPush.exit.i1100: ; preds = %395, %Vec_StrGrow.e %401 = getelementptr inbounds i8, ptr %397, i64 %400 store i8 %374, ptr %401, align 1, !tbaa !15 %indvars.iv.next.i1101 = add nuw nsw i64 %indvars.iv.i1097, 1 - %exitcond.not.i1102 = icmp eq i64 %indvars.iv.next.i1101, %371 + %exitcond.not.i1102 = icmp eq i64 %indvars.iv.i1097, %371 br i1 %exitcond.not.i1102, label %Vec_StrPrintStr.exit1106.preheader, label %372, !llvm.loop !59 Vec_StrPrintStr.exit1106.preheader: ; preds = %Vec_StrPush.exit.i1100 @@ -5085,7 +5085,7 @@ Vec_StrPrintStr.exit1119: ; preds = %Vec_StrPush.exit.i1 %442 = load i8, ptr %441, align 1, !tbaa !15 %.not2580 = icmp eq i8 %442, 1 %443 = select i1 %.not2580, ptr @.str.81, ptr @.str.82 - %444 = select i1 %.not2580, i64 6, i64 7 + %444 = select i1 %.not2580, i64 5, i64 6 br label %445 445: ; preds = %Vec_StrPush.exit.i1126, %Vec_StrPrintStr.exit1119 @@ -5154,7 +5154,7 @@ Vec_StrPush.exit.i1126: ; preds = %468, %Vec_StrGrow.e %474 = getelementptr inbounds i8, ptr %470, i64 %473 store i8 %447, ptr %474, align 1, !tbaa !15 %indvars.iv.next.i1127 = add nuw nsw i64 %indvars.iv.i1123, 1 - %exitcond.not.i1128 = icmp eq i64 %indvars.iv.next.i1127, %444 + %exitcond.not.i1128 = icmp eq i64 %444, %indvars.iv.i1123 br i1 %exitcond.not.i1128, label %Vec_StrPrintStr.exit1132, label %445, !llvm.loop !59 Vec_StrPrintStr.exit1132: ; preds = %Vec_StrPush.exit.i1126 @@ -10292,7 +10292,7 @@ Vec_StrPush.exit.i1935: ; preds = %2636, %Vec_StrGrow. Vec_StrPrintStr.exit1941: ; preds = %Vec_StrPush.exit.i1935 tail call void @Cba_ManWriteFonName(ptr noundef nonnull %0, i32 noundef %2329, i32 noundef 0, i32 noundef 0) %2643 = select i1 %2327, ptr @.str.131, ptr @.str.132 - %2644 = select i1 %2327, i64 4, i64 3 + %2644 = select i1 %2327, i64 3, i64 2 br label %2645 2645: ; preds = %Vec_StrPush.exit.i1949, %Vec_StrPrintStr.exit1941 @@ -10361,7 +10361,7 @@ Vec_StrPush.exit.i1949: ; preds = %2668, %Vec_StrGrow. %2674 = getelementptr inbounds i8, ptr %2670, i64 %2673 store i8 %2647, ptr %2674, align 1, !tbaa !15 %indvars.iv.next.i1950 = add nuw nsw i64 %indvars.iv.i1946, 1 - %exitcond.not.i1951 = icmp eq i64 %indvars.iv.next.i1950, %2644 + %exitcond.not.i1951 = icmp eq i64 %2644, %indvars.iv.i1946 br i1 %exitcond.not.i1951, label %Vec_StrPrintStr.exit1955, label %2645, !llvm.loop !59 Vec_StrPrintStr.exit1955: ; preds = %Vec_StrPush.exit.i1949 @@ -10592,7 +10592,7 @@ Vec_StrPrintStr.exit1997: ; preds = %Vec_StrPush.exit.i1 .lr.ph.i1999: ; preds = %Vec_StrPrintStr.exit1997 %2761 = select i1 %2490, ptr @.str.134, ptr @.str.129 - %2762 = select i1 %2490, i64 13, i64 8 + %2762 = select i1 %2490, i64 12, i64 7 br label %2763 2763: ; preds = %Vec_StrPush.exit.i2005, %.lr.ph.i1999 @@ -10661,7 +10661,7 @@ Vec_StrPush.exit.i2005: ; preds = %2786, %Vec_StrGrow. %2792 = getelementptr inbounds i8, ptr %2788, i64 %2791 store i8 %2765, ptr %2792, align 1, !tbaa !15 %indvars.iv.next.i2006 = add nuw nsw i64 %indvars.iv.i2002, 1 - %exitcond.not.i2007 = icmp eq i64 %indvars.iv.next.i2006, %2762 + %exitcond.not.i2007 = icmp eq i64 %2762, %indvars.iv.i2002 br i1 %exitcond.not.i2007, label %Vec_StrPrintStr.exit2011, label %2763, !llvm.loop !59 Vec_StrPrintStr.exit2011: ; preds = %Vec_StrPush.exit.i2005 @@ -10740,7 +10740,7 @@ Vec_StrPush.exit.i2019: ; preds = %2816, %Vec_StrGrow. Vec_StrPrintStr.exit2025: ; preds = %Vec_StrPush.exit.i2019 tail call void @Cba_ManWriteFonName(ptr noundef nonnull %0, i32 noundef %2329, i32 noundef 0, i32 noundef 0) %2823 = select i1 %2327, ptr @.str.131, ptr @.str.132 - %2824 = select i1 %2327, i64 4, i64 3 + %2824 = select i1 %2327, i64 3, i64 2 br label %2825 2825: ; preds = %Vec_StrPush.exit.i2033, %Vec_StrPrintStr.exit2025 @@ -10809,7 +10809,7 @@ Vec_StrPush.exit.i2033: ; preds = %2848, %Vec_StrGrow. %2854 = getelementptr inbounds i8, ptr %2850, i64 %2853 store i8 %2827, ptr %2854, align 1, !tbaa !15 %indvars.iv.next.i2034 = add nuw nsw i64 %indvars.iv.i2030, 1 - %exitcond.not.i2035 = icmp eq i64 %indvars.iv.next.i2034, %2824 + %exitcond.not.i2035 = icmp eq i64 %2824, %indvars.iv.i2030 br i1 %exitcond.not.i2035, label %Vec_StrPrintStr.exit2039, label %2825, !llvm.loop !59 Vec_StrPrintStr.exit2039: ; preds = %Vec_StrPush.exit.i2033 @@ -11038,7 +11038,7 @@ Vec_StrPush.exit.i2075: ; preds = %2934, %Vec_StrGrow. Vec_StrPrintStr.exit2081: ; preds = %Vec_StrPush.exit.i2075, %Vec_StrPrintStr.exit1997 %2941 = or i1 %2490, %2523 %2942 = select i1 %2941, ptr @.str.135, ptr @.str.136 - %2943 = select i1 %2941, i64 9, i64 4 + %2943 = select i1 %2941, i64 8, i64 3 br label %2944 2944: ; preds = %Vec_StrPush.exit.i2089, %Vec_StrPrintStr.exit2081 @@ -11107,7 +11107,7 @@ Vec_StrPush.exit.i2089: ; preds = %2967, %Vec_StrGrow. %2973 = getelementptr inbounds i8, ptr %2969, i64 %2972 store i8 %2946, ptr %2973, align 1, !tbaa !15 %indvars.iv.next.i2090 = add nuw nsw i64 %indvars.iv.i2086, 1 - %exitcond.not.i2091 = icmp eq i64 %indvars.iv.next.i2090, %2943 + %exitcond.not.i2091 = icmp eq i64 %2943, %indvars.iv.i2086 br i1 %exitcond.not.i2091, label %Vec_StrPrintStr.exit2095, label %2944, !llvm.loop !59 Vec_StrPrintStr.exit2095: ; preds = %Vec_StrPush.exit.i2089 diff --git a/bench/abc/optimized/inflate.ll b/bench/abc/optimized/inflate.ll index c1e0b158d85..2f4ea2b0a58 100644 --- a/bench/abc/optimized/inflate.ll +++ b/bench/abc/optimized/inflate.ll @@ -3588,15 +3588,14 @@ define range(i32 -5, 1) i32 @inflateSync(ptr noundef captures(address_is_null) % %.01415.i = phi i32 [ 0, %.lr.ph.preheader.i ], [ %.1.i, %.lr.ph.i ] %33 = getelementptr inbounds nuw i8, ptr %2, i64 %indvars.iv.i %34 = load i8, ptr %33, align 1, !tbaa !37 - %35 = zext i8 %34 to i32 - %36 = icmp samesign ult i32 %.01415.i, 2 - %37 = select i1 %36, i32 0, i32 255 - %38 = icmp eq i32 %37, %35 - %39 = add nuw nsw i32 %.01415.i, 1 + %35 = icmp samesign ugt i32 %.01415.i, 1 + %36 = sext i1 %35 to i8 + %37 = icmp eq i8 %34, %36 + %38 = add nuw nsw i32 %.01415.i, 1 %.not.i = icmp eq i8 %34, 0 %40 = sub nuw nsw i32 4, %.01415.i %spec.select.i = select i1 %.not.i, i32 %40, i32 0 - %.1.i = select i1 %38, i32 %39, i32 %spec.select.i + %.1.i = select i1 %37, i32 %38, i32 %spec.select.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %41 = icmp samesign ult i64 %indvars.iv.next.i, %32 %42 = icmp samesign ult i32 %.1.i, 4 @@ -3629,15 +3628,14 @@ syncsearch.exit: ; preds = %.lr.ph.i, %.thread %.01415.i46 = phi i32 [ %46, %.lr.ph.preheader.i43 ], [ %.1.i49, %.lr.ph.i44 ] %54 = getelementptr inbounds nuw i8, ptr %49, i64 %indvars.iv.i45 %55 = load i8, ptr %54, align 1, !tbaa !37 - %56 = zext i8 %55 to i32 - %57 = icmp samesign ult i32 %.01415.i46, 2 - %58 = select i1 %57, i32 0, i32 255 - %59 = icmp eq i32 %58, %56 - %60 = add nuw nsw i32 %.01415.i46, 1 - %.not.i47 = icmp eq i8 %55, 0 - %61 = sub nuw nsw i32 4, %.01415.i46 - %spec.select.i48 = select i1 %.not.i47, i32 %61, i32 0 - %.1.i49 = select i1 %59, i32 %60, i32 %spec.select.i48 + %55 = icmp samesign ugt i32 %.01415.i46, 1 + %56 = sext i1 %55 to i8 + %57 = icmp eq i8 %54, %56 + %58 = add nuw nsw i32 %.01415.i46, 1 + %.not.i47 = icmp eq i8 %54, 0 + %59 = sub nuw nsw i32 4, %.01415.i46 + %spec.select.i48 = select i1 %.not.i47, i32 %59, i32 0 + %spec.select.i48 = select i1 %57, i32 %58, i32 %spec.select.i48 %indvars.iv.next.i50 = add nuw nsw i64 %indvars.iv.i45, 1 %62 = icmp samesign ult i64 %indvars.iv.next.i50, %53 %63 = icmp samesign ult i32 %.1.i49, 4 @@ -3649,8 +3647,8 @@ syncsearch.exit: ; preds = %.lr.ph.i, %.thread br label %syncsearch.exit52 syncsearch.exit52: ; preds = %45, %._crit_edge.loopexit.i51 - %.014.lcssa.i41 = phi i32 [ %46, %45 ], [ %.1.i49, %._crit_edge.loopexit.i51 ] - %.0.lcssa.i42 = phi i32 [ 0, %45 ], [ %65, %._crit_edge.loopexit.i51 ] + %.014.lcssa.i41 = phi i32 [ %46, %44 ], [ %.1.i49, %._crit_edge.loopexit.i51 ] + %.0.lcssa.i42 = phi i32 [ 0, %44 ], [ %65, %._crit_edge.loopexit.i51 ] store i32 %.014.lcssa.i41, ptr %48, align 4, !tbaa !99 %66 = load i32, ptr %9, align 8, !tbaa !42 %67 = sub i32 %66, %.0.lcssa.i42 diff --git a/bench/arrow/optimized/align_util.ll b/bench/arrow/optimized/align_util.ll index d17bc59f19a..2b4027b6ddf 100644 --- a/bench/arrow/optimized/align_util.ll +++ b/bench/arrow/optimized/align_util.ll @@ -7981,12 +7981,12 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %61 = getelementptr inbounds i8, ptr %1, i64 %.idx %62 = and i64 %59, -9223372036854775745 %63 = icmp ugt i64 %62, -9223372036854775808 - %storemerge.idx.i.i.i75.neg = select i1 %63, i64 8, i64 0 %storemerge.idx.i.i.i75 = select i1 %63, i64 -8, i64 0 %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %61, i64 %storemerge.idx.i.i.i75 %64 = trunc i64 %59 to i32 %65 = and i32 %64, 63 - %.not.i.i.i = icmp eq i64 %.idx, %storemerge.idx.i.i.i75.neg + %storemerge.idx.i.i.i75.neg158 = zext i1 %63 to i64 + %.not.i.i.i = icmp eq i64 %60, %storemerge.idx.i.i.i75.neg158 br i1 %.not.i.i.i, label %91, label %66 66: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -8180,12 +8180,12 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %154 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %.idx158 %155 = and i64 %152, -9223372036854775745 %156 = icmp ugt i64 %155, -9223372036854775808 - %storemerge.idx.i.i.i85.neg = select i1 %156, i64 8, i64 0 %storemerge.idx.i.i.i85 = select i1 %156, i64 -8, i64 0 %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %154, i64 %storemerge.idx.i.i.i85 %157 = trunc i64 %152 to i32 %158 = and i32 %157, 63 - %.not.i.i.i89 = icmp eq i64 %.idx158, %storemerge.idx.i.i.i85.neg + %storemerge.idx.i.i.i85.neg160 = zext i1 %156 to i64 + %.not.i.i.i89 = icmp eq i64 %153, %storemerge.idx.i.i.i85.neg160 br i1 %.not.i.i.i89, label %185, label %159 159: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit diff --git a/bench/assimp/optimized/zip.ll b/bench/assimp/optimized/zip.ll index 042fb121abb..69c813a87cb 100644 --- a/bench/assimp/optimized/zip.ll +++ b/bench/assimp/optimized/zip.ll @@ -25875,8 +25875,8 @@ define internal fastcc void @tdefl_optimize_huffman_table(ptr noundef nonnull ca %.phi.trans.insert.i = getelementptr inbounds nuw i8, ptr %6, i64 1024 %.pre.i = load i32, ptr %.phi.trans.insert.i, align 16 %36 = freeze i32 %.pre.i - %37 = icmp eq i32 %.173, %36 - %spec.select.i = select i1 %37, i64 1, i64 2 + %37 = icmp ne i32 %.173, %36 + %spec.select89.i = zext i1 %37 to i64 br label %.critedge.preheader.split55.us.i .lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.preheader.i @@ -25947,7 +25947,7 @@ define internal fastcc void @tdefl_optimize_huffman_table(ptr noundef nonnull ca call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #35 %indvars.iv.next71.i = add nuw nsw i64 %indvars.iv70.i, 1 %71 = add nuw nsw i32 %.03854.us.i, 8 - %exitcond74.not.i = icmp eq i64 %indvars.iv.next71.i, %spec.select.i + %exitcond74.not.i = icmp eq i64 %indvars.iv70.i, %spec.select89.i br i1 %exitcond74.not.i, label %tdefl_radix_sort_syms.exit, label %.critedge.preheader.split55.us.i tdefl_radix_sort_syms.exit.thread: ; preds = %72 diff --git a/bench/boost/optimized/src.ll b/bench/boost/optimized/src.ll index 6df8818f845..5f069858a47 100644 --- a/bench/boost/optimized/src.ll +++ b/bench/boost/optimized/src.ll @@ -61571,7 +61571,7 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p br label %15 15: ; preds = %.preheader341, %15 - %.1 = phi ptr [ %20, %15 ], [ %.1.ph, %.preheader341 ] + %.1 = phi ptr [ %20, %15 ], [ %.1.ph, %.preheader343 ] %16 = load i8, ptr %.1, align 1, !tbaa !15 %17 = icmp eq i8 %16, 48 %18 = icmp ne ptr %.1, %1 @@ -61581,17 +61581,16 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p 21: ; preds = %15 %.not = icmp eq i32 %5, 4 - %. = select i1 %.not, i32 80, i32 69 %.248 = select i1 %.not, i32 112, i32 101 %22 = icmp eq ptr %.1, %1 br i1 %22, label %27, label %23 23: ; preds = %21 - %..neg = select i1 %.not, i32 -80, i32 -69 %24 = sext i8 %16 to i32 %25 = icmp eq i32 %.248, %24 - %26 = icmp eq i32 %..neg, %24 - %or.cond250 = or i1 %25, %26 + %..neg272 = select i1 %.not, i8 -80, i8 -69 + %26 = icmp eq i8 %..neg272, %16 + %or.cond250 = or i1 %26, %25 br i1 %or.cond250, label %27, label %28 27: ; preds = %23, %21 @@ -61671,8 +61670,8 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p br i1 %56, label %.lr.ph289, label %._crit_edge .lr.ph289: ; preds = %.preheader277, %.lr.ph289 - %.4288 = phi ptr [ %57, %.lr.ph289 ], [ %52, %.preheader277 ] - %.1229287 = phi i64 [ %58, %.lr.ph289 ], [ 0, %.preheader277 ] + %.4288 = phi ptr [ %57, %.lr.ph291 ], [ %52, %.preheader279 ] + %.1229287 = phi i64 [ %58, %.lr.ph291 ], [ 0, %.preheader279 ] %57 = getelementptr inbounds nuw i8, ptr %.4288, i64 1 %58 = add nsw i64 %.1229287, -1 %59 = load i8, ptr %57, align 1, !tbaa !15 @@ -61682,9 +61681,9 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p br i1 %62, label %.lr.ph289, label %._crit_edge, !llvm.loop !767 ._crit_edge: ; preds = %.lr.ph289, %.preheader277 - %63 = phi i8 [ %53, %.preheader277 ], [ %59, %.lr.ph289 ] - %.1229.lcssa = phi i64 [ 0, %.preheader277 ], [ %58, %.lr.ph289 ] - %.4.lcssa = phi ptr [ %52, %.preheader277 ], [ %57, %.lr.ph289 ] + %63 = phi i8 [ %53, %.preheader279 ], [ %59, %.lr.ph291 ] + %.1229.lcssa = phi i64 [ 0, %.preheader279 ], [ %58, %.lr.ph291 ] + %.4.lcssa = phi ptr [ %52, %.preheader279 ], [ %57, %.lr.ph291 ] %64 = icmp eq ptr %.4.lcssa, %1 br i1 %64, label %_ZN5boost4json6detail8charconv6detail10from_charsImEENS2_19from_chars_result_tIcEEPKcS8_RT_i.exit.thread, label %._crit_edge311 @@ -61696,8 +61695,8 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p br i1 %66, label %.lr.ph295, label %.critedge3 .lr.ph295: ; preds = %._crit_edge311, %69 - %.5293 = phi ptr [ %72, %69 ], [ %.3, %._crit_edge311 ] - %.1217292 = phi i64 [ %73, %69 ], [ %.0216.lcssa, %._crit_edge311 ] + %.5293 = phi ptr [ %72, %69 ], [ %.3, %._crit_edge313 ] + %.1217292 = phi i64 [ %73, %69 ], [ %.0216.lcssa, %._crit_edge313 ] %67 = icmp ne ptr %.5293, %1 %68 = icmp samesign ult i64 %.1217292, 19 %or.cond20 = select i1 %67, i1 %68, i1 false @@ -61714,10 +61713,10 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p br i1 %75, label %.lr.ph295, label %.critedge3, !llvm.loop !768 .critedge3: ; preds = %69, %.lr.ph295, %._crit_edge311, %48 - %.2230 = phi i64 [ 0, %48 ], [ %.0228, %._crit_edge311 ], [ %.0228, %.lr.ph295 ], [ %.0228, %69 ] - %.0224 = phi i64 [ 0, %48 ], [ %.0216.lcssa, %._crit_edge311 ], [ %.0216.lcssa, %.lr.ph295 ], [ %.0216.lcssa, %69 ] - %.2218 = phi i64 [ %.0216.lcssa, %48 ], [ %.0216.lcssa, %._crit_edge311 ], [ %73, %69 ], [ %.1217292, %.lr.ph295 ] - %.6 = phi ptr [ %.2.lcssa, %48 ], [ %.3, %._crit_edge311 ], [ %72, %69 ], [ %.5293, %.lr.ph295 ] + %.2230 = phi i64 [ 0, %48 ], [ %.0228, %._crit_edge313 ], [ %.0228, %.lr.ph297 ], [ %.0228, %69 ] + %.0224 = phi i64 [ 0, %48 ], [ %.0216.lcssa, %._crit_edge313 ], [ %.0216.lcssa, %.lr.ph297 ], [ %.0216.lcssa, %69 ] + %.2218 = phi i64 [ %.0216.lcssa, %48 ], [ %.0216.lcssa, %._crit_edge313 ], [ %73, %69 ], [ %.1217292, %.lr.ph297 ] + %.6 = phi ptr [ %.2.lcssa, %48 ], [ %.3, %._crit_edge313 ], [ %72, %69 ], [ %.5293, %.lr.ph297 ] %76 = icmp eq i64 %.2218, 19 br i1 %76, label %.preheader276.preheader, label %.critedge5 @@ -61726,10 +61725,10 @@ define linkonce_odr hidden { ptr, i32 } @_ZN5boost4json6detail8charconv6detail6p br label %.preheader276 .preheader276: ; preds = %.preheader276.preheader, %83 - %77 = phi i8 [ %87, %83 ], [ %.pre312, %.preheader276.preheader ] - %.0232 = phi i8 [ %.1233, %83 ], [ 0, %.preheader276.preheader ] - %.1226 = phi i64 [ %spec.select, %83 ], [ 0, %.preheader276.preheader ] - %.8 = phi ptr [ %84, %83 ], [ %.6, %.preheader276.preheader ] + %77 = phi i8 [ %87, %83 ], [ %.pre312, %.preheader278.preheader ] + %.0232 = phi i8 [ %.1233, %83 ], [ 0, %.preheader278.preheader ] + %.1226 = phi i64 [ %spec.select, %83 ], [ 0, %.preheader278.preheader ] + %.8 = phi ptr [ %84, %83 ], [ %.6, %.preheader278.preheader ] %78 = tail call noundef zeroext i1 %_ZN5boost4json6detail8charconv6detail15is_integer_charEc._ZN5boost4json6detail8charconv6detail11is_hex_charEc(i8 noundef signext %77) #48, !callees !765 br i1 %78, label %82, label %79 @@ -61901,9 +61900,10 @@ _ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit: ; br label %_ZN5boost4json6detail8charconv6detail10from_charsImEENS2_19from_chars_result_tIcEEPKcS8_RT_i.exit.thread _ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit.thread: ; preds = %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit, %97, %92 + %.275 = phi i8 [ 80, %97 ], [ 69, %92 ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ], [ 80, %_ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit ] %141 = zext nneg i8 %91 to i32 %142 = icmp eq i32 %.248, %141 - %143 = icmp eq i32 %., %141 + %143 = icmp eq i8 %.275, %91 %or.cond252 = or i1 %142, %143 br i1 %or.cond252, label %144, label %_ZN5boost4json6detail8charconv6detail10from_charsImEENS2_19from_chars_result_tIcEEPKcS8_RT_i.exit.thread @@ -62006,8 +62006,8 @@ _ZN5boost4json6detail8charconv6detail12is_delimiterEcNS2_12chars_formatE.exit.th br i1 %185, label %.lr.ph303, label %.critedge10, !llvm.loop !773 .critedge10: ; preds = %179, %.lr.ph303 - %.5221.lcssa = phi i64 [ %182, %179 ], [ %.5221301, %.lr.ph303 ] - %.11.lcssa = phi ptr [ %181, %179 ], [ %.11302, %.lr.ph303 ] + %.5221.lcssa = phi i64 [ %182, %179 ], [ %.5221301, %.lr.ph305 ] + %.11.lcssa = phi ptr [ %181, %179 ], [ %.11302, %.lr.ph305 ] %186 = icmp ne ptr %.11.lcssa, %1 %187 = icmp eq i64 %.5221.lcssa, 6 %or.cond12 = select i1 %186, i1 %187, i1 false diff --git a/bench/boost/optimized/test_codecvt.ll b/bench/boost/optimized/test_codecvt.ll index a1fe8e9a56f..0f079fea7d3 100644 --- a/bench/boost/optimized/test_codecvt.ll +++ b/bench/boost/optimized/test_codecvt.ll @@ -8144,8 +8144,8 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 br label %20 20: ; preds = %.lr.ph, %55 - %21 = phi ptr [ %2, %.lr.ph ], [ %57, %55 ] - %.194 = phi ptr [ %.032, %.lr.ph ], [ %.0.i, %55 ] + %21 = phi ptr [ %2, %.lr.ph ], [ %57, %54 ] + %.194 = phi ptr [ %.032, %.lr.ph ], [ %.0.i, %54 ] %22 = call noundef i32 @_ZN5boost6nowide3utf10utf_traitsIcLi1EE6decodeIPKcEEjRT_S7_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %3) switch i32 %22, label %23 [ i32 -1, label %.thread54 @@ -8154,11 +8154,10 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 23: ; preds = %20 %24 = icmp ugt i32 %22, 65535 - %spec.select81 = select i1 %24, i64 2, i64 1 %25 = ptrtoint ptr %.194 to i64 %26 = sub i64 %19, %25 - %27 = ashr exact i64 %26, 1 - %.not49 = icmp slt i64 %27, %spec.select81 + %spec.select8183 = select i1 %24, i64 4, i64 2 + %.not49 = icmp sgt i64 %spec.select8183, %26 %28 = icmp ult i32 %22, 65536 br i1 %.not49, label %44, label %31, !prof !144 @@ -8172,7 +8171,7 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 br i1 %28, label %.thread59, label %34, !prof !149 .thread59: ; preds = %.thread54, %31 - %.031535761 = phi i32 [ %22, %31 ], [ 65533, %.thread54 ] + %.031535761 = phi i32 [ %22, %30 ], [ 65533, %.thread54 ] %32 = trunc nuw i32 %.031535761 to i16 %33 = getelementptr inbounds nuw i8, ptr %.194, i64 2 br label %55 @@ -8194,7 +8193,7 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 br i1 %28, label %.thread62, label %46, !prof !149 .thread62: ; preds = %.thread54, %44 - %.031535864 = phi i32 [ %22, %44 ], [ 65533, %.thread54 ] + %.031535864 = phi i32 [ %22, %43 ], [ 65533, %.thread54 ] %45 = trunc nuw i32 %.031535864 to i16 br label %.thread77 @@ -8209,16 +8208,16 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 br label %.thread77 .thread77: ; preds = %46, %.thread62 - %.sroa.5.0 = phi i16 [ 0, %.thread62 ], [ %53, %46 ] - %.sink.i50 = phi i16 [ %45, %.thread62 ], [ %50, %46 ] + %.sroa.5.0 = phi i16 [ 0, %.thread62 ], [ %53, %45 ] + %.sink.i50 = phi i16 [ %45, %.thread62 ], [ %50, %45 ] %54 = getelementptr inbounds nuw i8, ptr %.194, i64 2 store i16 %.sink.i50, ptr %.194, align 2, !tbaa !79 %.pre = load ptr, ptr %9, align 8, !tbaa !55 br label %.thread71 55: ; preds = %34, %.thread59 - %.sink.i = phi i16 [ %32, %.thread59 ], [ %38, %34 ] - %.0.i = phi ptr [ %33, %.thread59 ], [ %43, %34 ] + %.sink.i = phi i16 [ %32, %.thread59 ], [ %38, %33 ] + %.0.i = phi ptr [ %33, %.thread59 ], [ %43, %33 ] store i16 %.sink.i, ptr %.194, align 2, !tbaa !79 %56 = icmp ult ptr %.0.i, %6 %57 = load ptr, ptr %9, align 8 @@ -8232,9 +8231,9 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 br label %64 .thread71: ; preds = %55, %15, %.thread77 - %61 = phi ptr [ %.pre, %.thread77 ], [ %2, %15 ], [ %57, %55 ] - %storemerge = phi ptr [ %54, %.thread77 ], [ %.032, %15 ], [ %.0.i, %55 ] - %.23575 = phi i16 [ %.sroa.5.0, %.thread77 ], [ %.033, %15 ], [ %.033, %55 ] + %61 = phi ptr [ %.pre, %.thread77 ], [ %2, %15 ], [ %57, %54 ] + %storemerge = phi ptr [ %54, %.thread77 ], [ %.032, %15 ], [ %.0.i, %54 ] + %.23575 = phi i16 [ %.sroa.5.0, %.thread77 ], [ %.033, %15 ], [ %.033, %54 ] store ptr %61, ptr %4, align 8, !tbaa !55 store ptr %storemerge, ptr %7, align 8, !tbaa !55 %62 = icmp ne ptr %61, %3 @@ -8244,8 +8243,8 @@ define linkonce_odr hidden noundef i32 @_ZNK5boost6nowide12utf8_codecvtIDsLi2EE5 br label %64 64: ; preds = %60, %.thread71 - %.23576 = phi i16 [ %.033, %60 ], [ %.23575, %.thread71 ] - %.340 = phi i32 [ 1, %60 ], [ %spec.select, %.thread71 ] + %.23576 = phi i16 [ %.033, %59 ], [ %.23575, %.thread71 ] + %.340 = phi i32 [ 1, %59 ], [ %spec.select, %.thread71 ] %.sroa.0.0.extract.trunc.i = trunc i16 %.23576 to i8 %.sroa.2.0.extract.shift.i = lshr i16 %.23576, 8 %.sroa.2.0.extract.trunc.i = trunc nuw i16 %.sroa.2.0.extract.shift.i to i8 diff --git a/bench/box2d/optimized/imgui_demo.ll b/bench/box2d/optimized/imgui_demo.ll index b745292153e..4a26b5d93c2 100644 --- a/bench/box2d/optimized/imgui_demo.ll +++ b/bench/box2d/optimized/imgui_demo.ll @@ -21777,7 +21777,7 @@ _ZL10HelpMarkerPKc.exit639: ; preds = %1411, %1413 call void @_ZN5ImGui16TableSetupColumnEPKcifj(ptr noundef nonnull @.str.1465, i32 noundef 0, float noundef 0.000000e+00, i32 noundef 0) call void @_ZN5ImGui15TableHeadersRowEv() %1431 = icmp eq i32 %.0452835, 1 - %1432 = select i1 %1431, i32 27, i32 9 + %1432 = select i1 %1431, i32 26, i32 8 br label %1434 1433: ; preds = %1434 @@ -21789,7 +21789,7 @@ _ZL10HelpMarkerPKc.exit639: ; preds = %1411, %1413 %1435 = call noundef zeroext i1 @_ZN5ImGui15TableNextColumnEv() call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.1701, i32 noundef %.0449834) %1436 = add nuw nsw i32 %.0449834, 1 - %exitcond939.not = icmp eq i32 %1436, %1432 + %exitcond939.not = icmp eq i32 %1432, %.0449834 br i1 %exitcond939.not, label %1433, label %1434, !llvm.loop !348 .critedge: ; preds = %1422 diff --git a/bench/brotli/optimized/backward_references_hq.ll b/bench/brotli/optimized/backward_references_hq.ll index 46e14e0934f..84403306684 100644 --- a/bench/brotli/optimized/backward_references_hq.ll +++ b/bench/brotli/optimized/backward_references_hq.ll @@ -4562,8 +4562,6 @@ ZopfliCostModelSetFromCommands.exit: ; preds = %.lr.ph86.i, %785, % %805 = shl nuw i64 1, %804 %806 = add i64 %805, -16 %807 = load i32, ptr %690, align 4, !tbaa !44 - %808 = icmp slt i32 %807, 11 - %809 = select i1 %808, i64 150, i64 325 call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %16) #13 store i32 0, ptr %671, align 4, !tbaa !31 store float 0.000000e+00, ptr %691, align 4, !tbaa !7 @@ -4571,6 +4569,8 @@ ZopfliCostModelSetFromCommands.exit: ; preds = %.lr.ph86.i, %785, % br i1 %645, label %.lr.ph78.i, label %._crit_edge.i334 .lr.ph78.i: ; preds = %ZopfliCostModelSetFromCommands.exit + %808 = icmp slt i32 %807, 11 + %809 = select i1 %808, i32 150, i32 325 %810 = add i64 %693, %802 %.reass633 = add i64 %805, %invariant.op br label %811 @@ -4595,16 +4595,16 @@ ZopfliCostModelSetFromCommands.exit: ; preds = %.lr.ph86.i, %785, % %gep75.i = getelementptr %struct.BackwardMatch, ptr %invariant.gep74.i, i64 %820 %823 = load i32, ptr %gep75.i, align 4, !tbaa !70 %824 = lshr i32 %823, 5 - %825 = zext nneg i32 %824 to i64 - %826 = icmp samesign ult i64 %809, %825 - br i1 %826, label %827, label %829 + %825 = icmp samesign ult i32 %809, %824 + br i1 %825, label %826, label %829 827: ; preds = %822 - %828 = call i64 @llvm.umax.i64(i64 %825, i64 %spec.store.select.i) + %827 = zext nneg i32 %824 to i64 + %828 = call i64 @llvm.umax.i64(i64 %827, i64 %spec.store.select.i) br label %829 829: ; preds = %827, %822, %811 - %.0.i338 = phi i64 [ %828, %827 ], [ %spec.store.select.i, %822 ], [ %spec.store.select.i, %811 ] + %.0.i338 = phi i64 [ %828, %826 ], [ %spec.store.select.i, %822 ], [ %spec.store.select.i, %811 ] %830 = icmp ugt i64 %.0.i338, 1 br i1 %830, label %.lr.ph.preheader.i, label %911 diff --git a/bench/brotli/optimized/block_splitter.ll b/bench/brotli/optimized/block_splitter.ll index 8c864322bd8..87a2f857896 100644 --- a/bench/brotli/optimized/block_splitter.ll +++ b/bench/brotli/optimized/block_splitter.ll @@ -386,9 +386,9 @@ RefineEntropyCodesLiteral.exit.i: ; preds = %HistogramAddHistogr %188 = getelementptr inbounds nuw i8, ptr %6, i64 4 %189 = load i32, ptr %188, align 4, !tbaa !37 %.inv.i = icmp sgt i32 %189, 10 - %190 = select i1 %.inv.i, i64 10, i64 3 - %191 = add i64 %14, -1 - %192 = getelementptr inbounds nuw i8, ptr %174, i64 %191 + %190 = add i64 %14, -1 + %191 = getelementptr inbounds nuw i8, ptr %174, i64 %190 + %192 = select i1 %.inv.i, i64 9, i64 2 br label %193 193: ; preds = %BuildBlockHistogramsLiteral.exit.i, %184 @@ -561,15 +561,15 @@ BitCost.exit.i.i: ; preds = %226, %223, %215 br i1 %exitcond148.not.i.i, label %.lr.ph.preheader.i.i, label %236, !llvm.loop !59 .lr.ph.preheader.i.i: ; preds = %276 - %278 = load i8, ptr %192, align 1, !tbaa !26 - %279 = mul i64 %195, %191 + %278 = load i8, ptr %191, align 1, !tbaa !26 + %279 = mul i64 %195, %190 br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %294, %.lr.ph.preheader.i.i %.0107142.i.i = phi i8 [ %.1.i159.i, %294 ], [ %278, %.lr.ph.preheader.i.i ] %.0108141.i.i = phi i64 [ %283, %294 ], [ %279, %.lr.ph.preheader.i.i ] %.0109140.i.i = phi i64 [ %.1110.i.i, %294 ], [ 1, %.lr.ph.preheader.i.i ] - %.1117139.i.i = phi i64 [ %282, %294 ], [ %191, %.lr.ph.preheader.i.i ] + %.1117139.i.i = phi i64 [ %282, %294 ], [ %190, %.lr.ph.preheader.i.i ] %280 = and i8 %.0107142.i.i, 7 %281 = shl nuw i8 1, %280 %282 = add i64 %.1117139.i.i, -1 @@ -691,7 +691,7 @@ ClearHistogramsLiteral.exit.i.i: ; preds = %ClearHistogramsLite BuildBlockHistogramsLiteral.exit.i: ; preds = %ClearHistogramsLiteral.exit.i.i %333 = add nuw nsw i64 %.0179.i, 1 - %exitcond.not.i65 = icmp eq i64 %333, %190 + %exitcond.not.i65 = icmp eq i64 %192, %.0179.i br i1 %exitcond.not.i65, label %334, label %193, !llvm.loop !66 334: ; preds = %BuildBlockHistogramsLiteral.exit.i @@ -1570,9 +1570,9 @@ RefineEntropyCodesCommand.exit.i: ; preds = %HistogramAddHistogr %750 = getelementptr inbounds nuw i8, ptr %6, i64 4 %751 = load i32, ptr %750, align 4, !tbaa !37 %.inv.i90 = icmp sgt i32 %751, 10 - %752 = select i1 %.inv.i90, i64 10, i64 3 - %753 = add i64 %2, -1 - %754 = getelementptr inbounds nuw i8, ptr %736, i64 %753 + %752 = add i64 %2, -1 + %753 = getelementptr inbounds nuw i8, ptr %736, i64 %752 + %754 = select i1 %.inv.i90, i64 9, i64 2 br label %755 755: ; preds = %BuildBlockHistogramsCommand.exit.i, %746 @@ -1745,15 +1745,15 @@ BitCost.exit.i.i100: ; preds = %788, %785, %777 br i1 %exitcond148.not.i.i112, label %.lr.ph.preheader.i.i113, label %798, !llvm.loop !101 .lr.ph.preheader.i.i113: ; preds = %838 - %840 = load i8, ptr %754, align 1, !tbaa !26 - %841 = mul i64 %757, %753 + %840 = load i8, ptr %753, align 1, !tbaa !26 + %841 = mul i64 %757, %752 br label %.lr.ph.i.i114 .lr.ph.i.i114: ; preds = %856, %.lr.ph.preheader.i.i113 %.0107142.i.i115 = phi i8 [ %.1.i159.i123, %856 ], [ %840, %.lr.ph.preheader.i.i113 ] %.0108141.i.i116 = phi i64 [ %845, %856 ], [ %841, %.lr.ph.preheader.i.i113 ] %.0109140.i.i117 = phi i64 [ %.1110.i.i122, %856 ], [ 1, %.lr.ph.preheader.i.i113 ] - %.1117139.i.i118 = phi i64 [ %844, %856 ], [ %753, %.lr.ph.preheader.i.i113 ] + %.1117139.i.i118 = phi i64 [ %844, %856 ], [ %752, %.lr.ph.preheader.i.i113 ] %842 = and i8 %.0107142.i.i115, 7 %843 = shl nuw i8 1, %842 %844 = add i64 %.1117139.i.i118, -1 @@ -1875,7 +1875,7 @@ ClearHistogramsCommand.exit.i.i: ; preds = %ClearHistogramsComm BuildBlockHistogramsCommand.exit.i: ; preds = %ClearHistogramsCommand.exit.i.i %895 = add nuw nsw i64 %.0180.i, 1 - %exitcond.not.i145 = icmp eq i64 %895, %752 + %exitcond.not.i145 = icmp eq i64 %754, %.0180.i br i1 %exitcond.not.i145, label %896, label %755, !llvm.loop !107 896: ; preds = %BuildBlockHistogramsCommand.exit.i @@ -2778,9 +2778,9 @@ RefineEntropyCodesDistance.exit.i: ; preds = %HistogramAddHistogr %1327 = getelementptr inbounds nuw i8, ptr %6, i64 4 %1328 = load i32, ptr %1327, align 4, !tbaa !37 %.inv.i265 = icmp sgt i32 %1328, 10 - %1329 = select i1 %.inv.i265, i64 10, i64 3 - %1330 = add i64 %.1, -1 - %1331 = getelementptr inbounds nuw i8, ptr %1313, i64 %1330 + %1329 = add i64 %.1, -1 + %1330 = getelementptr inbounds nuw i8, ptr %1313, i64 %1329 + %1331 = select i1 %.inv.i265, i64 9, i64 2 br label %1332 1332: ; preds = %BuildBlockHistogramsDistance.exit.i, %1323 @@ -2953,15 +2953,15 @@ BitCost.exit.i.i277: ; preds = %1365, %1362, %1354 br i1 %exitcond148.not.i.i289, label %.lr.ph.preheader.i.i290, label %1375, !llvm.loop !141 .lr.ph.preheader.i.i290: ; preds = %1415 - %1417 = load i8, ptr %1331, align 1, !tbaa !26 - %1418 = mul i64 %1334, %1330 + %1417 = load i8, ptr %1330, align 1, !tbaa !26 + %1418 = mul i64 %1334, %1329 br label %.lr.ph.i.i291 .lr.ph.i.i291: ; preds = %1433, %.lr.ph.preheader.i.i290 %.0107142.i.i292 = phi i8 [ %.1.i159.i300, %1433 ], [ %1417, %.lr.ph.preheader.i.i290 ] %.0108141.i.i293 = phi i64 [ %1422, %1433 ], [ %1418, %.lr.ph.preheader.i.i290 ] %.0109140.i.i294 = phi i64 [ %.1110.i.i299, %1433 ], [ 1, %.lr.ph.preheader.i.i290 ] - %.1117139.i.i295 = phi i64 [ %1421, %1433 ], [ %1330, %.lr.ph.preheader.i.i290 ] + %.1117139.i.i295 = phi i64 [ %1421, %1433 ], [ %1329, %.lr.ph.preheader.i.i290 ] %1419 = and i8 %.0107142.i.i292, 7 %1420 = shl nuw i8 1, %1419 %1421 = add i64 %.1117139.i.i295, -1 @@ -3083,7 +3083,7 @@ ClearHistogramsDistance.exit.i.i: ; preds = %ClearHistogramsDist BuildBlockHistogramsDistance.exit.i: ; preds = %ClearHistogramsDistance.exit.i.i %1472 = add nuw nsw i64 %.0180.i266, 1 - %exitcond.not.i322 = icmp eq i64 %1472, %1329 + %exitcond.not.i322 = icmp eq i64 %1331, %.0180.i266 br i1 %exitcond.not.i322, label %1473, label %1332, !llvm.loop !147 1473: ; preds = %BuildBlockHistogramsDistance.exit.i diff --git a/bench/clamav/optimized/unpack.ll b/bench/clamav/optimized/unpack.ll index 8ab6348129e..c3fc7aa6c67 100644 --- a/bench/clamav/optimized/unpack.ll +++ b/bench/clamav/optimized/unpack.ll @@ -14220,28 +14220,30 @@ define noundef ptr @_ZN6Unpack11ApplyFilterEPhjP12UnpackFilter(ptr noundef nonnu %7 = getelementptr inbounds nuw i8, ptr %0, i64 19856 %8 = load i64, ptr %7, align 8, !tbaa !169 %9 = trunc i64 %8 to i32 - %10 = icmp eq i8 %5, 2 - %11 = select i1 %10, i32 233, i32 232 %invariant.op = add i32 %9, 1 %12 = icmp ugt i32 %2, 4 br i1 %12, label %.lr.ph87, label %.loopexit -.lr.ph87: ; preds = %6, %33 - %.06585 = phi ptr [ %.166, %33 ], [ %1, %6 ] - %.06784 = phi i32 [ %.168, %33 ], [ 0, %6 ] - %13 = getelementptr inbounds nuw i8, ptr %.06585, i64 1 - %14 = load i8, ptr %.06585, align 1, !tbaa !27 - %15 = add i32 %.06784, 1 - %16 = icmp eq i8 %14, -24 - %17 = zext i8 %14 to i32 - %18 = icmp eq i32 %11, %17 - %or.cond = or i1 %16, %18 +.lr.ph87: ; preds = %6 + %11 = icmp eq i8 %5, 2 + %12 = select i1 %11, i8 -23, i8 -24 + br label %13 + +13:; preds = %.lr.ph87, %33 + %.06585 = phi ptr [ %1, %.lr.ph87 ], [ %.166, %33 ] + %.06784 = phi i32 [ 0, %.lr.ph87 ], [ %.168, %33 ] + %14 = getelementptr inbounds nuw i8, ptr %.06585, i64 1 + %15 = load i8, ptr %.06585, align 1, !tbaa !27 + %16 = add i32 %.06784, 1 + %17 = icmp eq i8 %15, -24 + %18 = icmp eq i8 %12, %15 + %or.cond = or i1 %17, %18 br i1 %or.cond, label %19, label %33 -19: ; preds = %.lr.ph87 +19: ; preds = %13 %.reass = add i32 %.06784, %invariant.op %20 = and i32 %.reass, 16777215 - %21 = load i32, ptr %13, align 4, !tbaa !93 + %21 = load i32, ptr %14, align 4, !tbaa !93 %.not = icmp sgt i32 %21, -1 br i1 %.not, label %27, label %22 @@ -14264,7 +14266,7 @@ define noundef ptr @_ZN6Unpack11ApplyFilterEPhjP12UnpackFilter(ptr noundef nonnu .sink.split: ; preds = %25, %28 %.sink = phi i32 [ %29, %28 ], [ %26, %25 ] - store i32 %.sink, ptr %13, align 4, !tbaa !93 + store i32 %.sink, ptr %14, align 4, !tbaa !93 br label %30 30: ; preds = %.sink.split, %27, %22 @@ -14272,12 +14274,12 @@ define noundef ptr @_ZN6Unpack11ApplyFilterEPhjP12UnpackFilter(ptr noundef nonnu %32 = add i32 %.06784, 5 br label %33 -33: ; preds = %.lr.ph87, %30 - %.168 = phi i32 [ %32, %30 ], [ %15, %.lr.ph87 ] - %.166 = phi ptr [ %31, %30 ], [ %13, %.lr.ph87 ] +33: ; preds = %13, %30 + %.168 = phi i32 [ %32, %30 ], [ %16, %13 ] + %.166 = phi ptr [ %31, %30 ], [ %14, %13 ] %34 = add i32 %.168, 4 %35 = icmp ult i32 %34, %2 - br i1 %35, label %.lr.ph87, label %.loopexit, !llvm.loop !322 + br i1 %35, label %13, label %.loopexit, !llvm.loop !322 36: ; preds = %4 %37 = getelementptr inbounds nuw i8, ptr %0, i64 19856 diff --git a/bench/cmake/optimized/ftp.ll b/bench/cmake/optimized/ftp.ll index de80cfc713b..ca602a034be 100644 --- a/bench/cmake/optimized/ftp.ll +++ b/bench/cmake/optimized/ftp.ll @@ -4778,26 +4778,25 @@ _ftp_state.exit: ; preds = %16, %20, %26, %32, %.not19 = icmp eq i32 %49, 0 %50 = getelementptr i8, ptr %3, i64 1272 %.val.i = load i8, ptr %50, align 8, !tbaa !21 - %51 = sext i8 %.val.i to i32 - %52 = select i1 %.not19, i32 73, i32 65 - %.not20 = icmp eq i32 %52, %51 - br i1 %.not20, label %59, label %53 - -53: ; preds = %46 - %54 = getelementptr inbounds nuw i8, ptr %39, i64 16 - store i32 1, ptr %54, align 8, !tbaa !97 - %55 = load i32, ptr %47, align 4 - %56 = and i32 %55, 16384 - %57 = icmp ne i32 %56, 0 - %58 = tail call fastcc i32 @ftp_nb_type(ptr noundef nonnull %0, ptr noundef nonnull %3, i1 noundef zeroext %57, i8 noundef zeroext 19) + %51 = select i1 %.not19, i8 73, i8 65 + %.not20 = icmp eq i8 %51, %.val.i + br i1 %.not20, label %58, label %52 + +52: ; preds = %46 + %53 = getelementptr inbounds nuw i8, ptr %39, i64 16 + store i32 1, ptr %53, align 8, !tbaa !97 + %54 = load i32, ptr %47, align 4 + %55 = and i32 %54, 16384 + %56 = icmp ne i32 %55, 0 + %57 = tail call fastcc i32 @ftp_nb_type(ptr noundef nonnull %0, ptr noundef nonnull %3, i1 noundef zeroext %56, i8 noundef zeroext 19) br label %ftp_state_type.exit 59: ; preds = %46, %43, %37 %60 = tail call fastcc i32 @ftp_state_size(ptr noundef nonnull %0, ptr noundef %3) br label %ftp_state_type.exit -ftp_state_type.exit: ; preds = %59, %53, %14, %_ftp_state.exit - %.0 = phi i32 [ %15, %14 ], [ 0, %_ftp_state.exit ], [ %60, %59 ], [ %58, %53 ] +ftp_state_type.exit: ; preds = %59, %52, %14, %_ftp_state.exit + %.0 = phi i32 [ %15, %14 ], [ 0, %_ftp_state.exit ], [ %60, %58 ], [ %57, %52 ] ret i32 %.0 } @@ -5250,26 +5249,25 @@ _ftp_state.exit126: ; preds = %205, %213, %219, %2 %.not21.i = icmp eq i32 %254, 0 %255 = getelementptr i8, ptr %244, i64 1272 %.val.i128 = load i8, ptr %255, align 8, !tbaa !21 - %256 = sext i8 %.val.i128 to i32 - %257 = select i1 %.not21.i, i32 73, i32 65 - %.not22.i = icmp eq i32 %257, %256 - br i1 %.not22.i, label %264, label %258 - -258: ; preds = %251 - %259 = getelementptr inbounds nuw i8, ptr %243, i64 16 - store i32 1, ptr %259, align 8, !tbaa !97 - %260 = load i32, ptr %252, align 4 - %261 = and i32 %260, 16384 - %262 = icmp ne i32 %261, 0 - %263 = call fastcc i32 @ftp_nb_type(ptr noundef nonnull %0, ptr noundef nonnull %244, i1 noundef zeroext %262, i8 noundef zeroext 19) + %256 = select i1 %.not21.i, i8 73, i8 65 + %.not22.i = icmp eq i8 %256, %.val.i128 + br i1 %.not22.i, label %263, label %257 + +257: ; preds = %251 + %258 = getelementptr inbounds nuw i8, ptr %243, i64 16 + store i32 1, ptr %258, align 8, !tbaa !97 + %259 = load i32, ptr %252, align 4 + %260 = and i32 %259, 16384 + %261 = icmp ne i32 %260, 0 + %262 = call fastcc i32 @ftp_nb_type(ptr noundef nonnull %0, ptr noundef nonnull %244, i1 noundef zeroext %261, i8 noundef zeroext 19) br label %ftp_state_type.exit 264: ; preds = %251, %248, %242 %265 = call fastcc i32 @ftp_state_size(ptr noundef nonnull %0, ptr noundef %244) br label %ftp_state_type.exit -ftp_state_type.exit: ; preds = %264, %258, %.thread155, %_ftp_state.exit126, %_ftp_state.exit - %.3 = phi i32 [ 0, %_ftp_state.exit126 ], [ 0, %_ftp_state.exit ], [ %.175.ph, %.thread155 ], [ %265, %264 ], [ %263, %258 ] +ftp_state_type.exit: ; preds = %264, %257, %.thread155, %_ftp_state.exit126, %_ftp_state.exit + %.3 = phi i32 [ 0, %_ftp_state.exit126 ], [ 0, %_ftp_state.exit ], [ %.175.ph, %.thread155 ], [ %265, %263 ], [ %262, %257 ] ret i32 %.3 } diff --git a/bench/cpp-httplib/optimized/httplib.ll b/bench/cpp-httplib/optimized/httplib.ll index 9ec152fa7f8..819c10b0b07 100644 --- a/bench/cpp-httplib/optimized/httplib.ll +++ b/bench/cpp-httplib/optimized/httplib.ll @@ -96608,8 +96608,8 @@ _ZNKSt5ctypeIcE6narrowEcc.exit: ; preds = %8, %17, %22 store i64 0, ptr %77, align 8, !tbaa !7 %78 = load ptr, ptr %76, align 8, !tbaa !13 store i8 0, ptr %78, align 1, !tbaa !14 - %79 = select i1 %74, i32 2, i32 4 - %80 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %79 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %80 = select i1 %74, i32 1, i32 3 br label %83 81: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit @@ -96648,7 +96648,7 @@ _ZNKSt5ctypeIcE6narrowEcc.exit: ; preds = %8, %17, %22 %101 = load i64, ptr %77, align 8, !tbaa !7 %102 = add i64 %101, 1 %103 = load ptr, ptr %76, align 8, !tbaa !13 - %104 = icmp eq ptr %103, %80 + %104 = icmp eq ptr %103, %79 br i1 %104, label %105, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i 105: ; preds = %98 @@ -96657,7 +96657,7 @@ _ZNKSt5ctypeIcE6narrowEcc.exit: ; preds = %8, %17, %22 br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i: ; preds = %105, %98 - %107 = load i64, ptr %80, align 8 + %107 = load i64, ptr %79, align 8 %108 = select i1 %104, i64 15, i64 %107 %109 = icmp ugt i64 %102, %108 br i1 %109, label %110, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit @@ -96676,7 +96676,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit: ; preds = %_ZNKS %114 = getelementptr inbounds nuw i8, ptr %113, i64 %102 store i8 0, ptr %114, align 1, !tbaa !14 %115 = add nuw nsw i32 %.060, 1 - %exitcond.not = icmp eq i32 %115, %79 + %exitcond.not = icmp eq i32 %80, %.060 br i1 %exitcond.not, label %81, label %83, !llvm.loop !1347 116: ; preds = %73 diff --git a/bench/cpython/optimized/longobject.ll b/bench/cpython/optimized/longobject.ll index 1f114c0106e..f9090751695 100644 --- a/bench/cpython/optimized/longobject.ll +++ b/bench/cpython/optimized/longobject.ll @@ -2470,20 +2470,19 @@ define dso_local ptr @_PyLong_FromByteArray(ptr noundef readonly captures(none) %10 = load i8, ptr %.079, align 1, !tbaa !29 %.fr = freeze i8 %10 %11 = icmp sgt i8 %.fr, -1 - %spec.select123 = select i1 %11, i32 0, i32 255 - br label %.thread + br label %12 .thread: ; preds = %9, %6 - %.072110 = phi i1 [ true, %6 ], [ %11, %9 ] - %12 = phi i32 [ 0, %6 ], [ %spec.select123, %9 ] - br label %13 + %.072110 = phi i1 [ %11, %9 ], [ true, %6 ] + %not..072 = xor i1 %.072, true + %13 = sext i1 %not..072 to i8 + br label %14 13: ; preds = %.thread, %16 - %.07495 = phi ptr [ %.079, %.thread ], [ %18, %16 ] - %.07594 = phi i64 [ 0, %.thread ], [ %17, %16 ] + %.07495 = phi ptr [ %.079, %12 ], [ %18, %16 ] + %.07594 = phi i64 [ 0, %12 ], [ %17, %16 ] %14 = load i8, ptr %.07495, align 1, !tbaa !29 - %15 = zext i8 %14 to i32 - %.not90 = icmp eq i32 %12, %15 + %.not90 = icmp eq i8 %14, %13 br i1 %.not90, label %16, label %19 16: ; preds = %13 @@ -2493,7 +2492,7 @@ define dso_local ptr @_PyLong_FromByteArray(ptr noundef readonly captures(none) br i1 %exitcond.not, label %19, label %13, !llvm.loop !57 19: ; preds = %13, %16 - %.075.lcssa = phi i64 [ %.07594, %13 ], [ %1, %16 ] + %.075.lcssa = phi i64 [ %.07594, %14 ], [ %1, %16 ] %20 = sub i64 %1, %.075.lcssa %21 = icmp uge i64 %20, %1 %or.cond.not = or i1 %.072110, %21 @@ -2632,7 +2631,7 @@ define dso_local ptr @_PyLong_FromByteArray(ptr noundef readonly captures(none) br label %87 87: ; preds = %88, %.thread116 - %.0.i = phi i64 [ %85, %.thread116 ], [ %89, %88 ] + %.0.i = phi i64 [ %85, %.thread ], [ %89, %88 ] %.not13.i = icmp eq i64 %.0.i, 0 br i1 %.not13.i, label %.critedge.thread.i, label %88 @@ -3300,67 +3299,65 @@ _PyLong_NumBits.exit.thread: ; preds = %80, %_PyLong_NumBit %100 = and i64 %.val.i177180, 3 %101 = icmp eq i64 %100, 2 %102 = add nsw i64 %2, -1 - br i1 %101, label %.lr.ph169, label %124 + br i1 %101, label %.lr.ph169, label %122 .lr.ph169: ; preds = %99 - %103 = select i1 %11, i32 128, i32 0 - %104 = select i1 %11, i32 0, i32 128 + %103 = select i1 %11, i8 -128, i8 0 + %104 = select i1 %11, i8 0, i8 -128 br label %105 -._crit_edge: ; preds = %119 +._crit_edge: ; preds = %117 %spec.select = select i1 %.188.in, i64 %2, i64 %94 br label %_fits_in_n_bits.exit.thread -105: ; preds = %.lr.ph169, %119 - %.085168 = phi i64 [ 0, %.lr.ph169 ], [ %120, %119 ] - %.086167 = phi ptr [ %1, %.lr.ph169 ], [ %121, %119 ] +105: ; preds = %.lr.ph169, %117 + %.085168 = phi i64 [ 0, %.lr.ph169 ], [ %118, %117 ] + %.086167 = phi ptr [ %1, %.lr.ph169 ], [ %119, %117 ] %106 = icmp eq i64 %.085168, 0 - br i1 %106, label %107, label %111 + br i1 %106, label %107, label %110 107: ; preds = %105 %108 = load i8, ptr %.086167, align 1, !tbaa !29 - %109 = zext i8 %108 to i32 - %110 = icmp eq i32 %104, %109 - br label %119 - -111: ; preds = %105 - %112 = icmp slt i64 %.085168, %102 - %113 = load i8, ptr %.086167, align 1, !tbaa !29 - br i1 %112, label %114, label %116 - -114: ; preds = %111 - %115 = icmp eq i8 %113, 0 - br label %119 - -116: ; preds = %111 - %117 = zext i8 %113 to i32 - %118 = icmp eq i32 %103, %117 - br label %119 - -119: ; preds = %107, %116, %114 - %.188.in = phi i1 [ %110, %107 ], [ %115, %114 ], [ %118, %116 ] - %120 = add nuw nsw i64 %.085168, 1 - %121 = getelementptr i8, ptr %.086167, i64 1 - %122 = icmp slt i64 %120, %2 - %123 = select i1 %122, i1 %.188.in, i1 false - br i1 %123, label %105, label %._crit_edge, !llvm.loop !69 - -124: ; preds = %99 - %125 = select i1 %11, i64 %102, i64 0 - %126 = getelementptr i8, ptr %1, i64 %125 - %127 = load i8, ptr %126, align 1, !tbaa !29 - %.not115 = icmp sgt i8 %127, -1 - br i1 %.not115, label %_fits_in_n_bits.exit.thread, label %128 - -128: ; preds = %124 - %129 = and i32 %3, 4 - %.not116 = icmp eq i32 %129, 0 - %130 = zext i1 %.not116 to i64 - %spec.select132 = add nuw nsw i64 %2, %130 + %109 = icmp eq i8 %104, %108 + br label %117 + +114: ; preds = %105 + %115 = icmp slt i64 %.085168, %102 + %112 = load i8, ptr %.086167, align 1, !tbaa !29 + br i1 %111, label %113, label %115 + +116: ; preds = %110 + %114 = icmp eq i8 %112, 0 + br label %117 + +115: ; preds = %110 + %116 = icmp eq i8 %103, %112 + br label %117 + +117:; preds = %107, %115, %113 + %.188.in = phi i1 [ %109, %107 ], [ %114, %113 ], [ %116, %115 ] + %118 = add nuw nsw i64 %.085168, 1 + %119 = getelementptr i8, ptr %.086167, i64 1 + %120 = icmp slt i64 %118, %2 + %121 = select i1 %120, i1 %.188.in, i1 false + br i1 %121, label %105, label %._crit_edge, !llvm.loop !69 + +122:; preds = %99 + %123 = select i1 %11, i64 %102, i64 0 + %124 = getelementptr i8, ptr %1, i64 %123 + %125 = load i8, ptr %124, align 1, !tbaa !29 + %.not115 = icmp sgt i8 %125, -1 + br i1 %.not115, label %_fits_in_n_bits.exit.thread, label %126 + +126:; preds = %122 + %127 = and i32 %3, 4 + %.not116 = icmp eq i32 %127, 0 + %128 = zext i1 %.not116 to i64 + %spec.select132 = add nuw nsw i64 %2, %128 br label %_fits_in_n_bits.exit.thread -_fits_in_n_bits.exit.thread: ; preds = %73, %.loopexit, %128, %_fits_in_n_bits.exit142.thread, %_PyLong_NumBits.exit, %_PyLong_NumBits.exit.thread, %._crit_edge, %124, %69, %_fits_in_n_bits.exit, %37, %62 - %.096 = phi i64 [ 8, %37 ], [ 8, %62 ], [ %2, %_fits_in_n_bits.exit ], [ 8, %69 ], [ %spec.select, %._crit_edge ], [ %94, %_PyLong_NumBits.exit.thread ], [ %93, %_PyLong_NumBits.exit ], [ %94, %124 ], [ %spec.select131, %_fits_in_n_bits.exit142.thread ], [ %spec.select132, %128 ], [ 8, %.loopexit ], [ 8, %73 ] +_fits_in_n_bits.exit.thread: ; preds = %73, %.loopexit, %126, %_fits_in_n_bits.exit142.thread, %_PyLong_NumBits.exit, %_PyLong_NumBits.exit.thread, %._crit_edge, %122, %69, %_fits_in_n_bits.exit, %37, %62 + %.096 = phi i64 [ 8, %37 ], [ 8, %62 ], [ %2, %_fits_in_n_bits.exit ], [ 8, %69 ], [ %spec.select, %._crit_edge ], [ %94, %_PyLong_NumBits.exit.thread ], [ %93, %_PyLong_NumBits.exit ], [ %94, %122 ], [ %spec.select131, %_fits_in_n_bits.exit142.thread ], [ %spec.select132, %126 ], [ 8, %.loopexit ], [ 8, %73 ] br i1 %.not.not.not, label %131, label %Py_DECREF.exit134 131: ; preds = %_fits_in_n_bits.exit.thread @@ -3379,7 +3376,7 @@ _fits_in_n_bits.exit.thread: ; preds = %73, %.loopexit, %12 br label %Py_DECREF.exit134 Py_DECREF.exit134: ; preds = %20, %17, %27, %_fits_in_n_bits.exit.thread, %29, %31, %34, %131, %133, %136, %8 - %.0 = phi i64 [ -1, %8 ], [ -1, %20 ], [ -1, %17 ], [ -1, %27 ], [ %.096, %_fits_in_n_bits.exit.thread ], [ -1, %29 ], [ -1, %31 ], [ -1, %34 ], [ %.096, %131 ], [ %.096, %133 ], [ %.096, %136 ] + %.0 = phi i64 [ -1, %8 ], [ -1, %20 ], [ -1, %17 ], [ -1, %27 ], [ %.096, %_fits_in_n_bits.exit.thread ], [ -1, %29 ], [ -1, %31 ], [ -1, %34 ], [ %.096, %129 ], [ %.096, %131 ], [ %.096, %134 ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #16 ret i64 %.0 } diff --git a/bench/curl/optimized/tool_findfile.ll b/bench/curl/optimized/tool_findfile.ll index d052b099a3b..c7f40b7bdf8 100644 --- a/bench/curl/optimized/tool_findfile.ll +++ b/bench/curl/optimized/tool_findfile.ll @@ -136,16 +136,15 @@ declare ptr @curl_maprintf(ptr noundef, ...) local_unnamed_addr #1 ; Function Attrs: nounwind uwtable define internal fastcc noalias ptr @checkhome(ptr noundef nonnull %0, ptr noundef %1, i1 noundef zeroext %2) unnamed_addr #0 { - %4 = select i1 %2, i32 2, i32 1 - %5 = getelementptr inbounds nuw i8, ptr %1, i64 1 + %4 = getelementptr inbounds nuw i8, ptr %1, i64 1 br i1 %2, label %.split.us, label %.split .split.us: ; preds = %3, %14 - %indvars.iv = phi i64 [ %indvars.iv.next, %14 ], [ 0, %3 ] + %indvars.iv = phi i64 [ %indvars.iv.next, %13 ], [ 0, %3 ] %6 = getelementptr inbounds nuw [2 x i8], ptr @__const.checkhome.pref, i64 0, i64 %indvars.iv %7 = load i8, ptr %6, align 1, !tbaa !4 %8 = sext i8 %7 to i32 - %9 = tail call ptr (ptr, ...) @curl_maprintf(ptr noundef nonnull @.str.6, ptr noundef nonnull %0, i32 noundef %8, ptr noundef nonnull %5) #5 + %9 = tail call ptr (ptr, ...) @curl_maprintf(ptr noundef nonnull @.str.6, ptr noundef nonnull %0, i32 noundef %8, ptr noundef nonnull %4) #5 %.not.us = icmp eq ptr %9, null br i1 %.not.us, label %14, label %10 @@ -164,7 +163,7 @@ define internal fastcc noalias ptr @checkhome(ptr noundef nonnull %0, ptr nounde br i1 %exitcond41.not, label %.loopexit, label %.split.us, !llvm.loop !21 .split: ; preds = %3, %22 - %.02228 = phi i32 [ %23, %22 ], [ 0, %3 ] + %.02228 = phi i32 [ %23, %21 ], [ 0, %3 ] %15 = tail call ptr (ptr, ...) @curl_maprintf(ptr noundef nonnull @.str.7, ptr noundef nonnull %0, ptr noundef %1) #5 %.not = icmp eq ptr %15, null br i1 %.not, label %22, label %16 @@ -179,8 +178,8 @@ define internal fastcc noalias ptr @checkhome(ptr noundef nonnull %0, ptr nounde br label %22 .split30.us: ; preds = %16, %10 - %.us-phi = phi i32 [ %11, %10 ], [ %17, %16 ] - %.us-phi31 = phi ptr [ %9, %10 ], [ %15, %16 ] + %.us-phi = phi i32 [ %11, %9 ], [ %17, %15 ] + %.us-phi31 = phi ptr [ %9, %9 ], [ %15, %15 ] %20 = tail call noalias ptr @strdup(ptr noundef nonnull %.us-phi31) #5 %21 = tail call i32 @close(i32 noundef %.us-phi) #5 tail call void @curl_free(ptr noundef nonnull %.us-phi31) #5 @@ -188,11 +187,11 @@ define internal fastcc noalias ptr @checkhome(ptr noundef nonnull %0, ptr nounde 22: ; preds = %.split, %19 %23 = add nuw nsw i32 %.02228, 1 - %exitcond.not = icmp eq i32 %23, %4 + %exitcond.not = icmp eq i32 %.02228, 0 br i1 %exitcond.not, label %.loopexit, label %.split, !llvm.loop !21 .loopexit: ; preds = %22, %14, %.split30.us - %.4 = phi ptr [ %20, %.split30.us ], [ null, %14 ], [ null, %22 ] + %.4 = phi ptr [ %110, %.split30.us ], [ null, %13 ], [ null, %21 ] ret ptr %.4 } diff --git a/bench/cvc5/optimized/model_engine.ll b/bench/cvc5/optimized/model_engine.ll index 50d76be8040..7348ba8b369 100644 --- a/bench/cvc5/optimized/model_engine.ll +++ b/bench/cvc5/optimized/model_engine.ll @@ -662,18 +662,18 @@ _ZN4cvc58internal12NodeTemplateILb1EED2Ev.exit233: ; preds = %_ZN4cvc58internal1 .lr.ph721: ; preds = %.critedge132 %186 = icmp eq i32 %185, 1 - %187 = select i1 %186, i32 2, i32 1 - %188 = getelementptr inbounds nuw i8, ptr %0, i64 72 - %189 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %190 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %191 = getelementptr inbounds nuw i8, ptr %0, i64 96 - %192 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %193 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %187 = getelementptr inbounds nuw i8, ptr %0, i64 72 + %188 = getelementptr inbounds nuw i8, ptr %0, i64 88 + %189 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %190 = getelementptr inbounds nuw i8, ptr %0, i64 96 + %191 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %192 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %193 = zext i1 %186 to i32 br label %194 194: ; preds = %._crit_edge719, %.lr.ph721 %storemerge720 = phi i32 [ 0, %.lr.ph721 ], [ %355, %._crit_edge719 ] - %195 = load ptr, ptr %189, align 8, !tbaa !293 + %195 = load ptr, ptr %188, align 8, !tbaa !293 %.not5.i.i.i = icmp eq ptr %195, null br i1 %.not5.i.i.i, label %_ZNSt13unordered_setIN4cvc58internal12NodeTemplateILb1EEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv.exit, label %.lr.ph.i.i.i @@ -713,11 +713,11 @@ _ZNSt8__detail16_Hashtable_allocISaINS_10_Hash_nodeIN4cvc58internal12NodeTemplat br i1 %.not.i.i.i, label %_ZNSt13unordered_setIN4cvc58internal12NodeTemplateILb1EEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv.exit, label %.lr.ph.i.i.i, !llvm.loop !295 _ZNSt13unordered_setIN4cvc58internal12NodeTemplateILb1EEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv.exit: ; preds = %_ZNSt8__detail16_Hashtable_allocISaINS_10_Hash_nodeIN4cvc58internal12NodeTemplateILb1EEELb1EEEEE18_M_deallocate_nodeEPS6_.exit.i.i.i, %194 - %211 = load ptr, ptr %188, align 8, !tbaa !32 - %212 = load i64, ptr %190, align 8, !tbaa !33 + %211 = load ptr, ptr %187, align 8, !tbaa !32 + %212 = load i64, ptr %189, align 8, !tbaa !33 %213 = shl i64 %212, 3 call void @llvm.memset.p0.i64(ptr align 8 %211, i8 0, i64 %213, i1 false) - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %189, i8 0, i64 16, i1 false) + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %188, i8 0, i64 16, i1 false) %214 = call noundef i64 @_ZNK4cvc58internal6theory11quantifiers15FirstOrderModel25getNumAssertedQuantifiersEv(ptr noundef nonnull align 8 dereferenceable(664) %14) %.not725 = icmp eq i64 %214, 0 br i1 %.not725, label %._crit_edge719, label %_ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit338 @@ -807,7 +807,7 @@ _ZN4cvc58internal12NodeTemplateILb1EED2Ev.exit368: ; preds = %240, %243, %249 br i1 %239, label %296, label %_ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit394 _ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit394: ; preds = %_ZN4cvc58internal12NodeTemplateILb1EED2Ev.exit368 - %253 = load i64, ptr %191, align 8, !tbaa !298 + %253 = load i64, ptr %190, align 8, !tbaa !298 %.not.not.i = icmp eq i64 %253, 0 br i1 %.not.not.i, label %254, label %.thread.i @@ -816,7 +816,7 @@ _ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit394: ; preds = %_ZN4cvc58internal br label %256 256: ; preds = %257, %254 - %.sroa.023.0.in.i = phi ptr [ %189, %254 ], [ %.sroa.023.0.i, %257 ] + %.sroa.023.0.in.i = phi ptr [ %188, %254 ], [ %.sroa.023.0.i, %257 ] %.sroa.023.0.i = load ptr, ptr %.sroa.023.0.in.i, align 8, !tbaa !294 %.not.i528 = icmp eq ptr %.sroa.023.0.i, null br i1 %.not.i528, label %.thread.i, label %257 @@ -828,18 +828,18 @@ _ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit394: ; preds = %_ZN4cvc58internal br i1 %260, label %_ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit364, label %256, !llvm.loop !299 .thread.i: ; preds = %256, %_ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit394 - %261 = invoke noundef i64 @_ZNKSt4hashIN4cvc58internal12NodeTemplateILb1EEEEclERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %188, ptr noundef nonnull align 8 dereferenceable(8) %8) + %261 = invoke noundef i64 @_ZNKSt4hashIN4cvc58internal12NodeTemplateILb1EEEEclERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %187, ptr noundef nonnull align 8 dereferenceable(8) %8) to label %.noexc529 unwind label %218 .noexc529: ; preds = %.thread.i - %262 = load i64, ptr %190, align 8, !tbaa !33 + %262 = load i64, ptr %189, align 8, !tbaa !33 %263 = urem i64 %261, %262 - %264 = load i64, ptr %191, align 8, !tbaa !298 + %264 = load i64, ptr %190, align 8, !tbaa !298 %.not32.i = icmp eq i64 %264, 0 br i1 %.not32.i, label %.critedge.i, label %265 265: ; preds = %.noexc529 - %266 = load ptr, ptr %188, align 8, !tbaa !32 + %266 = load ptr, ptr %187, align 8, !tbaa !32 %267 = getelementptr inbounds nuw ptr, ptr %266, i64 %263 %268 = load ptr, ptr %267, align 8, !tbaa !300 %.not.i.i.i526 = icmp eq ptr %268, null @@ -883,13 +883,13 @@ _ZN4cvc58internal11Cvc5ostreamlsEPFRSoS2_E.exit394: ; preds = %_ZN4cvc58internal .critedge.i: ; preds = %.lr.ph.i.i.i527, %..loopexit_crit_edge21.i.i.i, %265, %.noexc529 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #19 - %290 = invoke noundef ptr @_ZNSt8__detail16_Hashtable_allocISaINS_10_Hash_nodeIN4cvc58internal12NodeTemplateILb1EEELb1EEEEE16_M_allocate_nodeIJRKS5_EEEPS6_DpOT_(ptr noundef nonnull align 1 dereferenceable(1) %188, ptr noundef nonnull align 8 dereferenceable(8) %8) + %290 = invoke noundef ptr @_ZNSt8__detail16_Hashtable_allocISaINS_10_Hash_nodeIN4cvc58internal12NodeTemplateILb1EEELb1EEEEE16_M_allocate_nodeIJRKS5_EEEPS6_DpOT_(ptr noundef nonnull align 1 dereferenceable(1) %187, ptr noundef nonnull align 8 dereferenceable(8) %8) to label %.noexc530 unwind label %218 .noexc530: ; preds = %.critedge.i - store ptr %188, ptr %2, align 8, !tbaa !304 - store ptr %290, ptr %192, align 8, !tbaa !308 - %291 = invoke ptr @_ZNSt10_HashtableIN4cvc58internal12NodeTemplateILb1EEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb1ELb1ELb1EEEE21_M_insert_unique_nodeEmmPNS5_10_Hash_nodeIS3_Lb1EEEm(ptr noundef nonnull align 8 dereferenceable(56) %188, i64 noundef %263, i64 noundef %261, ptr noundef %290, i64 noundef 1) + store ptr %187, ptr %2, align 8, !tbaa !304 + store ptr %290, ptr %191, align 8, !tbaa !308 + %291 = invoke ptr @_ZNSt10_HashtableIN4cvc58internal12NodeTemplateILb1EEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb1ELb1ELb1EEEE21_M_insert_unique_nodeEmmPNS5_10_Hash_nodeIS3_Lb1EEEm(ptr noundef nonnull align 8 dereferenceable(56) %187, i64 noundef %263, i64 noundef %261, ptr noundef %290, i64 noundef 1) to label %_ZNSt10_HashtableIN4cvc58internal12NodeTemplateILb1EEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb1ELb1ELb1EEEE12_Scoped_nodeD2Ev.exit.i unwind label %292 _ZNSt10_HashtableIN4cvc58internal12NodeTemplateILb1EEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb1ELb1ELb1EEEE12_Scoped_nodeD2Ev.exit.i: ; preds = %.noexc530 @@ -970,7 +970,7 @@ _ZN4cvc58internal12NodeTemplateILb1EEC2ERKS2_.exit397: ; preds = %309, %303, %31 unreachable _ZN4cvc58internal12NodeTemplateILb1EED2Ev.exit399: ; preds = %313, %317, %323 - %327 = load ptr, ptr %193, align 8, !tbaa !309 + %327 = load ptr, ptr %192, align 8, !tbaa !309 %328 = load ptr, ptr %327, align 8, !tbaa !3 %329 = getelementptr inbounds nuw i8, ptr %328, i64 72 %330 = load ptr, ptr %329, align 8 @@ -1039,7 +1039,7 @@ _ZN4cvc58internal12NodeTemplateILb1EED2Ev.exit401: ; preds = %_ZN4cvc58internal1 %353 = load i32, ptr %179, align 4, !tbaa !28 %354 = icmp sgt i32 %353, 0 %355 = add nuw nsw i32 %storemerge720, 1 - %exitcond.not = icmp eq i32 %355, %187 + %exitcond.not = icmp eq i32 %storemerge720, %193 %or.cond = select i1 %354, i1 true, i1 %exitcond.not br i1 %or.cond, label %._crit_edge722, label %194, !llvm.loop !311 diff --git a/bench/ffmpeg/optimized/filter.ll b/bench/ffmpeg/optimized/filter.ll index 5142ba82597..f81a1a6d690 100644 --- a/bench/ffmpeg/optimized/filter.ll +++ b/bench/ffmpeg/optimized/filter.ll @@ -2753,7 +2753,7 @@ define internal fastcc void @vvc_deblock(ptr %.4580552.val, i32 noundef %0, i32 .lr.ph11.us.preheader: ; preds = %41 %66 = sext i32 %.0172 to i64 %67 = sext i32 %.0170 to i64 - %wide.trip.count30 = select i1 %.not, i64 1, i64 3 + %wide.trip.count30 = select i1 %.not, i64 0, i64 2 br label %.lr.ph11.us .lr.ph11.us: ; preds = %.lr.ph11.us.preheader, %._crit_edge12.us @@ -2801,7 +2801,7 @@ define internal fastcc void @vvc_deblock(ptr %.4580552.val, i32 noundef %0, i32 ._crit_edge12.us: ; preds = %._crit_edge8.us.us, %.lr.ph11.us %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1 - %exitcond31.not = icmp eq i64 %indvars.iv.next28, %wide.trip.count30 + %exitcond31.not = icmp eq i64 %wide.trip.count30, %indvars.iv27 br i1 %exitcond31.not, label %.split18.us, label %.lr.ph11.us, !llvm.loop !167 .lr.ph7.us.us: ; preds = %.lr.ph7.us.us.preheader, %._crit_edge8.us.us @@ -3853,8 +3853,8 @@ alf_get_edges.exit.i: ; preds = %is_virtual_boundary %262 = getelementptr inbounds nuw i8, ptr %8, i64 8 %263 = getelementptr inbounds nuw i8, ptr %8, i64 16 %264 = getelementptr inbounds nuw i8, ptr %8, i64 24 - %265 = select i1 %66, i32 2, i32 1 - %266 = select i1 %65, i32 2, i32 1 + %265 = zext i1 %66 to i32 + %266 = zext i1 %65 to i32 br label %.preheader.i .preheader.i: ; preds = %269, %alf_get_edges.exit.i @@ -3868,7 +3868,7 @@ alf_get_edges.exit.i: ; preds = %is_virtual_boundary 269: ; preds = %alf_get_subblock.exit.i %270 = add nuw nsw i32 %.049108.i, 1 - %exitcond110.not.i = icmp eq i32 %270, %266 + %exitcond110.not.i = icmp eq i32 %.049108.i, %266 br i1 %exitcond110.not.i, label %alf_get_subblocks.exit, label %.preheader.i, !llvm.loop !181 271: ; preds = %alf_get_subblock.exit.i, %.preheader.i @@ -3922,7 +3922,7 @@ alf_get_subblock.exit.i: ; preds = %282 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8 %283 = add nuw nsw i32 %.0106.i, 1 %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i32 %283, %265 + %exitcond.not.i = icmp eq i32 %.0106.i, %265 br i1 %exitcond.not.i, label %269, label %271, !llvm.loop !184 alf_get_subblocks.exit: ; preds = %269 @@ -3953,11 +3953,9 @@ alf_get_subblocks.exit: ; preds = %269 %302 = getelementptr inbounds nuw i8, ptr %0, i64 3309584 %303 = getelementptr inbounds nuw i8, ptr %0, i64 3276816 %304 = getelementptr inbounds nuw i8, ptr %0, i64 4477968 - %305 = trunc i64 %.050107.i to i32 - %306 = add i32 %265, %305 - %smax = call i32 @llvm.smax.i32(i32 %306, i32 1) - %wide.trip.count = zext nneg i32 %smax to i64 - br label %307 + %sext = shl i64 %indvars.iv.next.i, 32 + %305 = ashr exact i64 %sext, 32 + br label %306 ._crit_edge: ; preds = %316, %alf_get_subblocks.exit call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #8 @@ -3965,7 +3963,7 @@ alf_get_subblocks.exit: ; preds = %269 ret void 307: ; preds = %.lr.ph, %316 - %indvars.iv183 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next184, %316 ] + %indvars.iv183 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next184, %315 ] %308 = getelementptr inbounds nuw %struct.VVCRect, ptr %10, i64 %indvars.iv183 %309 = getelementptr inbounds nuw i8, ptr %308, i64 4 %310 = getelementptr inbounds nuw i8, ptr %308, i64 8 @@ -3978,11 +3976,11 @@ alf_get_subblocks.exit: ; preds = %269 316: ; preds = %alf_filter_cc.exit %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next184, %wide.trip.count - br i1 %exitcond.not, label %._crit_edge, label %307, !llvm.loop !185 + %exitcond.not = icmp slt i64 %indvars.iv.next184, %305 + br i1 %exitcond.not, label %306, label %._crit_edge, !llvm.loop !185 317: ; preds = %307, %alf_filter_cc.exit - %indvars.iv = phi i64 [ 0, %307 ], [ %indvars.iv.next, %alf_filter_cc.exit ] + %indvars.iv = phi i64 [ 0, %306 ], [ %indvars.iv.next, %alf_filter_cc.exit ] %318 = load ptr, ptr %13, align 8, !tbaa !18 %319 = getelementptr inbounds nuw i8, ptr %318, i64 8 %320 = getelementptr inbounds nuw [3 x i8], ptr %319, i64 0, i64 %indvars.iv diff --git a/bench/ffmpeg/optimized/intra.ll b/bench/ffmpeg/optimized/intra.ll index 0bf57b34209..a71e8980ad9 100644 --- a/bench/ffmpeg/optimized/intra.ll +++ b/bench/ffmpeg/optimized/intra.ll @@ -358,12 +358,17 @@ vvc_predict_ibc.exit: ; preds = %64, %50, %49, %46, .lr.ph54.split.preheader.i: ; preds = %.lr.ph54.i %123 = zext i1 %112 to i64 %124 = or i1 %112, %narrow.i - %wide.trip.count.i = select i1 %124, i64 2, i64 1 + %wide.trip.count72.i = zext i1 %124 to i64 br label %.lr.ph54.split.i -.lr.ph54.split.i: ; preds = %._crit_edge.i, %.lr.ph54.split.preheader.i - %indvars.iv.i60 = phi i64 [ %123, %.lr.ph54.split.preheader.i ], [ %indvars.iv.next.i62, %._crit_edge.i ] +.lr.ph54.split.i: ; preds = %._crit_edge.i + %indvars.iv.next.i62 = add nuw nsw i64 %indvars.iv.i60, 1 %.01946.i = load ptr, ptr %120, align 8, !tbaa !127 + br label %.lr.ph54.split.i + +.lr.ph54.split.i: ; preds = %.lr.ph54.splitthread-pre-split.i, %.lr.ph54.split.preheader.i + %.01946.i = phi ptr [ %.01946.pr.i, %.lr.ph54.splitthread-pre-split.i ], [ %121, %.lr.ph54.split.preheader.i ] + %indvars.iv.i60 = phi i64 [ %indvars.iv.next.i62, %.lr.ph54.splitthread-pre-split.i ], [ %123, %.lr.ph54.split.preheader.i ] %.not2247.i = icmp eq ptr %.01946.i, null br i1 %.not2247.i, label %._crit_edge.i, label %.lr.ph.i61 @@ -374,8 +379,7 @@ vvc_predict_ibc.exit: ; preds = %64, %50, %49, %46, br label %128 ._crit_edge.i: ; preds = %itransform.exit.i, %.lr.ph54.split.i - %indvars.iv.next.i62 = add nuw nsw i64 %indvars.iv.i60, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i62, %wide.trip.count.i + %exitcond.not.i = icmp eq i64 %indvars.iv.i60, %wide.trip.count72.i br i1 %exitcond.not.i, label %reconstruct.exit, label %.lr.ph54.split.i, !llvm.loop !128 128: ; preds = %itransform.exit.i, %.lr.ph.i61 diff --git a/bench/ffmpeg/optimized/subtitles.ll b/bench/ffmpeg/optimized/subtitles.ll index 72b29e166a2..91e4257b826 100644 --- a/bench/ffmpeg/optimized/subtitles.ll +++ b/bench/ffmpeg/optimized/subtitles.ll @@ -1254,7 +1254,7 @@ define range(i32 -2147483647, -2147483648) i32 @ff_smil_extract_next_text_chunk( .thread: ; preds = %3, %5 %8 = phi i8 [ %7, %5 ], [ %4, %3 ] %9 = icmp eq i8 %8, 60 - %10 = select i1 %9, i32 62, i32 60 + %10 = select i1 %9, i32 1040187392, i32 1006632960 br label %11 11: ; preds = %16, %.thread @@ -1270,10 +1270,9 @@ define range(i32 -2147483647, -2147483648) i32 @ff_smil_extract_next_text_chunk( 16: ; preds = %11 %17 = add nuw nsw i32 %.019, 1 %sext = shl i32 %13, 24 - %18 = ashr exact i32 %sext, 24 - %.not23 = icmp eq i32 %18, %10 + %.not23 = icmp eq i32 %10, %sext %.not24 = icmp eq i32 %sext, 0 - %or.cond = or i1 %.not24, %.not23 + %or.cond = or i1 %.not23, %.not24 br i1 %or.cond, label %.critedge, label %11, !llvm.loop !66 .critedge: ; preds = %16 @@ -1294,7 +1293,7 @@ define range(i32 -2147483647, -2147483648) i32 @ff_smil_extract_next_text_chunk( br label %.loopexit .loopexit: ; preds = %11, %5, %20 - %.0 = phi i32 [ %23, %20 ], [ 0, %5 ], [ -1094995529, %11 ] + %.0 = phi i32 [ %23, %19 ], [ 0, %5 ], [ -1094995529, %11 ] ret i32 %.0 } diff --git a/bench/gromacs/optimized/wall.ll b/bench/gromacs/optimized/wall.ll index 2dec4ae9152..3a7aaa9cff8 100644 --- a/bench/gromacs/optimized/wall.ll +++ b/bench/gromacs/optimized/wall.ll @@ -716,8 +716,7 @@ define noundef float @_Z8do_wallsRK10t_inputrecRK10t_forcerecPA3_KfN3gmx8ArrayRe %64 = load float, ptr %63, align 4, !tbaa !233 %65 = load ptr, ptr %10, align 8, !tbaa !259 %.not = icmp eq i32 %8, 0 - %66 = select i1 %.not, i32 1, i32 2 - %67 = icmp sgt i32 %7, 0 + %66 = icmp sgt i32 %7, 0 %.sroa.0182.0.copyload = load ptr, ptr %5, align 8 %68 = fsub float 1.000000e+00, %11 %69 = load i64, ptr %6, align 8 @@ -731,12 +730,14 @@ define noundef float @_Z8do_wallsRK10t_inputrecRK10t_forcerecPA3_KfN3gmx8ArrayRe %77 = inttoptr i64 %76 to ptr %78 = sitofp i32 %7 to double %79 = getelementptr inbounds nuw i8, ptr %13, i64 672 - br i1 %67, label %.split.us219.preheader, label %.split + br i1 %66, label %.split.us219.preheader, label %.split .split.us219.preheader: ; preds = %._crit_edge %.sroa.speculated = tail call i32 @llvm.smin.i32(i32 %20, i32 2) %wide.trip.count266 = zext nneg i32 %7 to i64 %wide.trip.count261 = zext nneg i32 %.sroa.speculated to i64 + %not..not = xor i1 %.not, true + %79 = zext i1 %not..not to i32 br label %.split.us219 .split.us219: ; preds = %.split.us219.preheader, %._crit_edge210.us @@ -761,7 +762,7 @@ define noundef float @_Z8do_wallsRK10t_inputrecRK10t_forcerecPA3_KfN3gmx8ArrayRe %86 = fadd double %85, %78 store double %86, ptr %79, align 8, !tbaa !261 %87 = add nuw nsw i32 %.0161216.us, 1 - %exitcond269.not = icmp eq i32 %87, %66 + %exitcond269.not = icmp eq i32 %.0161216.us, %79 br i1 %exitcond269.not, label %.split225.us.loopexit, label %.split.us219, !llvm.loop !262 .preheader.us.us: ; preds = %.split.us219, %._crit_edge205.us.us diff --git a/bench/hdf5/optimized/H5Tbit.ll b/bench/hdf5/optimized/H5Tbit.ll index eefbfc72bd3..82cf07555db 100644 --- a/bench/hdf5/optimized/H5Tbit.ll +++ b/bench/hdf5/optimized/H5Tbit.ll @@ -727,8 +727,8 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br label %19 19: ; preds = %.lr.ph137, %26 - %.091136 = phi i64 [ %15, %.lr.ph137 ], [ %27, %26 ] - %.199135 = phi i64 [ %2, %.lr.ph137 ], [ %28, %26 ] + %.091136 = phi i64 [ %15, %.lr.ph138 ], [ %27, %26 ] + %.199135 = phi i64 [ %2, %.lr.ph138 ], [ %28, %26 ] %20 = trunc nuw nsw i64 %.091136 to i32 %21 = lshr i32 %18, %20 %22 = trunc i32 %21 to i1 @@ -748,18 +748,19 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br i1 %31, label %19, label %._crit_edge138, !llvm.loop !23 ._crit_edge138: ; preds = %26, %.preheader113 - %.199.lcssa = phi i64 [ 0, %.preheader113 ], [ %28, %26 ] + %.199.lcssa = phi i64 [ 0, %.preheader114 ], [ %28, %26 ] %32 = add nuw nsw i64 %14, 1 br label %33 33: ; preds = %._crit_edge138, %13 - %.098 = phi i64 [ %.199.lcssa, %._crit_edge138 ], [ %2, %13 ] - %.095 = phi i64 [ %32, %._crit_edge138 ], [ %14, %13 ] + %.098 = phi i64 [ %.199.lcssa, %._crit_edge139 ], [ %2, %13 ] + %.095 = phi i64 [ %32, %._crit_edge139 ], [ %14, %13 ] %34 = icmp ugt i64 %.098, 7 br i1 %34, label %.lr.ph144, label %.preheader .lr.ph144: ; preds = %33 - %35 = select i1 %4, i32 0, i32 255 + %not.111 = xor i1 %4, true + %35 = sext i1 %not.111 to i8 %36 = add i64 %.098, -8 %37 = lshr i64 %36, 3 %38 = add nuw nsw i64 %.095, %37 @@ -767,8 +768,8 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br label %43 .preheader: ; preds = %.loopexit112, %33 - %.2100.lcssa = phi i64 [ %.098, %33 ], [ %57, %.loopexit112 ] - %.196.lcssa = phi i64 [ %.095, %33 ], [ %39, %.loopexit112 ] + %.2100.lcssa = phi i64 [ %.098, %33 ], [ %57, %.loopexit113 ] + %.196.lcssa = phi i64 [ %.095, %33 ], [ %39, %.loopexit113 ] %.not150 = icmp eq i64 %.2100.lcssa, 0 br i1 %.not150, label %.loopexit, label %.lr.ph148 @@ -779,32 +780,35 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br label %60 43: ; preds = %.lr.ph144, %.loopexit112 - %.196142 = phi i64 [ %.095, %.lr.ph144 ], [ %58, %.loopexit112 ] - %.2100141 = phi i64 [ %.098, %.lr.ph144 ], [ %57, %.loopexit112 ] + %.196142 = phi i64 [ %.095, %.lr.ph145 ], [ %58, %.loopexit113 ] + %.2100141 = phi i64 [ %.098, %.lr.ph145 ], [ %57, %.loopexit113 ] %44 = getelementptr inbounds i8, ptr %0, i64 %.196142 %45 = load i8, ptr %44, align 1, !tbaa !10 + %.not110 = icmp eq i8 %45, %35 + br i1 %.not110, label %.loopexit113, label %.preheader112 + +.preheader112: ; preds = %43 %46 = zext i8 %45 to i32 - %.not110 = icmp eq i32 %35, %46 - br i1 %.not110, label %.loopexit112, label %.preheader111 - -.preheader111: ; preds = %43, %55 - %.092140 = phi i64 [ %56, %55 ], [ 0, %43 ] - %47 = trunc nuw nsw i64 %.092140 to i32 - %48 = lshr i32 %46, %47 - %49 = trunc i32 %48 to i1 - %50 = xor i1 %4, %49 - br i1 %50, label %55, label %51 - -51: ; preds = %.preheader111 - %52 = shl nsw i64 %.196142, 3 - %53 = sub i64 %52, %1 - %54 = add i64 %53, %.092140 + br label %47 + +47: ; preds = %.preheader112, %56 + %.092141 = phi i64 [ 0, %.preheader112 ], [ %57, %56 ] + %48 = trunc nuw nsw i64 %.092141 to i32 + %49 = lshr i32 %46, %48 + %50 = trunc i32 %49 to i1 + %51 = xor i1 %4, %50 + br i1 %51, label %56, label %52 + +52: ; preds = %47 + %53 = shl nsw i64 %.196143, 3 + %54 = sub i64 %53, %1 + %55 = add i64 %54, %.092141 br label %.loopexit -55: ; preds = %.preheader111 - %56 = add nuw nsw i64 %.092140, 1 +55: ; preds = %47 + %56 = add nuw nsw i64 %.092141, 1 %exitcond.not = icmp eq i64 %56, 8 - br i1 %exitcond.not, label %.loopexit112, label %.preheader111, !llvm.loop !24 + br i1 %exitcond.not, label %.loopexit112, label %47, !llvm.loop !24 .loopexit112: ; preds = %55, %43 %57 = add i64 %.2100141, -8 @@ -813,7 +817,7 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br i1 %59, label %43, label %.preheader, !llvm.loop !25 60: ; preds = %.lr.ph148, %69 - %.193147 = phi i64 [ 0, %.lr.ph148 ], [ %70, %69 ] + %.193147 = phi i64 [ 0, %.lr.ph149 ], [ %70, %70 ] %61 = trunc i64 %.193147 to i32 %62 = lshr i32 %42, %61 %63 = trunc i32 %62 to i1 @@ -851,7 +855,7 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br label %83 83: ; preds = %.preheader117, %93 - %.1130 = phi i64 [ %78, %.preheader117 ], [ %84, %93 ] + %.1130 = phi i64 [ %78, %.preheader118 ], [ %84, %94 ] %84 = add nsw i64 %.1130, -1 %85 = trunc nuw nsw i64 %84 to i32 %86 = lshr i32 %81, %85 @@ -874,52 +878,56 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br label %96 96: ; preds = %94, %71 - %.3101 = phi i64 [ %82, %94 ], [ %2, %71 ] - %.297 = phi i64 [ %95, %94 ], [ %74, %71 ] + %.3101 = phi i64 [ %82, %95 ], [ %2, %72 ] + %.297 = phi i64 [ %95, %95 ], [ %74, %72 ] %97 = icmp ugt i64 %.3101, 7 br i1 %97, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %96 - %98 = select i1 %4, i32 0, i32 255 - br label %99 - -99: ; preds = %.lr.ph, %.loopexit116 - %.3133 = phi i64 [ %.297, %.lr.ph ], [ %114, %.loopexit116 ] - %.5132 = phi i64 [ %.3101, %.lr.ph ], [ %113, %.loopexit116 ] - %100 = getelementptr inbounds i8, ptr %0, i64 %.3133 - %101 = load i8, ptr %100, align 1, !tbaa !10 - %102 = zext i8 %101 to i32 - %.not108 = icmp eq i32 %98, %102 + %not. = xor i1 %4, true + %99 = sext i1 %not. to i8 + br label %100 + +100: ; preds = %.lr.ph, %.loopexit116 + %.5132 = phi i64 [ %.297, %.lr.ph ], [ %116, %.loopexit117 ] + %.5133 = phi i64 [ %.3101, %.lr.ph ], [ %113, %.loopexit117 ] + %101 = getelementptr inbounds i8, ptr %0, i64 %.3134 + %102 = load i8, ptr %101, align 1, !tbaa !10 + %.not108 = icmp eq i8 %102, %99 br i1 %.not108, label %.loopexit116, label %.preheader115 -.preheader115: ; preds = %99, %111 - %.294131 = phi i64 [ %112, %111 ], [ 7, %99 ] - %103 = trunc i64 %.294131 to i32 - %104 = lshr i32 %102, %103 - %105 = trunc i32 %104 to i1 - %106 = xor i1 %4, %105 - br i1 %106, label %111, label %107 - -107: ; preds = %.preheader115 - %108 = shl nsw i64 %.3133, 3 - %109 = sub i64 %108, %1 - %110 = add i64 %109, %.294131 +.preheader115: ; preds = %100 + %103 = zext i8 %102 to i32 + br label %104 + +104:; preds = %.preheader116, %113 + %.294132 = phi i64 [ 7, %.preheader116 ], [ %114, %113 ] + %105 = trunc i64 %.294132 to i32 + %106 = lshr i32 %103, %105 + %107 = trunc i32 %106 to i1 + %108 = xor i1 %4, %107 + br i1 %108, label %113, label %109 + +109: ; preds = %104 + %110 = shl nsw i64 %.3134, 3 + %111 = sub i64 %110, %1 + %112 = add i64 %111, %.294132 br label %.loopexit -111: ; preds = %.preheader115 - %112 = add nsw i64 %.294131, -1 - %.not167 = icmp eq i64 %.294131, 0 - br i1 %.not167, label %.loopexit116, label %.preheader115, !llvm.loop !28 +111: ; preds = %104 + %112 = add nsw i64 %.294132, -1 + %.not167 = icmp eq i64 %.294132, 0 + br i1 %.not167, label %.loopexit116, label %104, !llvm.loop !28 -.loopexit116: ; preds = %111, %99 - %113 = add i64 %.5132, -8 - %114 = add nsw i64 %.3133, -1 +.loopexit116: ; preds = %111, %100 + %113 = add i64 %.5133, -8 + %114 = add nsw i64 %.3134, -1 %115 = icmp ugt i64 %113, 7 - br i1 %115, label %99, label %._crit_edge, !llvm.loop !29 + br i1 %115, label %100, label %._crit_edge, !llvm.loop !29 ._crit_edge: ; preds = %.loopexit116, %96 - %.5.lcssa = phi i64 [ %.3101, %96 ], [ %113, %.loopexit116 ] - %.3.lcssa = phi i64 [ %.297, %96 ], [ %114, %.loopexit116 ] + %.5.lcssa = phi i64 [ %.3101, %97 ], [ %113, %.loopexit117 ] + %.3.lcssa = phi i64 [ %.297, %97 ], [ %114, %.loopexit117 ] %.not107 = icmp eq i64 %.5.lcssa, 0 br i1 %.not107, label %.loopexit, label %116 @@ -931,7 +939,7 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 br label %121 121: ; preds = %123, %116 - %.2 = phi i64 [ %117, %116 ], [ %124, %123 ] + %.2 = phi i64 [ %117, %118 ], [ %124, %125 ] %122 = icmp ugt i64 %.2, %75 br i1 %122, label %123, label %.loopexit @@ -949,8 +957,8 @@ define i64 @H5T__bit_find(ptr noundef readonly captures(none) %0, i64 noundef %1 %132 = add i64 %131, %124 br label %.loopexit -.loopexit: ; preds = %121, %69, %.preheader, %24, %51, %65, %89, %107, %129, %12, %._crit_edge, %5 - %.0 = phi i64 [ -1, %12 ], [ %25, %24 ], [ %54, %51 ], [ %68, %65 ], [ %92, %89 ], [ %110, %107 ], [ %132, %129 ], [ -1, %._crit_edge ], [ -1, %5 ], [ -1, %.preheader ], [ -1, %69 ], [ -1, %121 ] +.loopexit: ; preds = %121, %69, %.preheader, %24, %52, %65, %89, %109, %129, %12, %._crit_edge, %5 + %.0 = phi i64 [ -1, %12 ], [ %25, %24 ], [ %55, %52 ], [ %68, %66 ], [ %92, %90 ], [ %112, %109 ], [ %132, %131 ], [ -1, %._crit_edge ], [ -1, %5 ], [ -1, %.preheader ], [ -1, %70 ], [ -1, %123 ] ret i64 %.0 } diff --git a/bench/icu/optimized/ucnv_lmb.ll b/bench/icu/optimized/ucnv_lmb.ll index 007a34d14a5..af74b8c5867 100644 --- a/bench/icu/optimized/ucnv_lmb.ll +++ b/bench/icu/optimized/ucnv_lmb.ll @@ -350,9 +350,9 @@ define internal void @_ZL17_LMBCSFromUnicodeP25UConverterFromUnicodeArgsP10UErro br label %32 32: ; preds = %.lr.ph453, %.critedge75.thread - %33 = phi ptr [ %20, %.lr.ph453 ], [ %568, %.critedge75.thread ] - %.0185452 = phi i32 [ 0, %.lr.ph453 ], [ %567, %.critedge75.thread ] - %.0356451 = phi i8 [ 0, %.lr.ph453 ], [ %.1357, %.critedge75.thread ] + %33 = phi ptr [ %20, %.lr.ph454 ], [ %568, %.critedge75.thread ] + %.0185452 = phi i32 [ 0, %.lr.ph454 ], [ %567, %.critedge75.thread ] + %.0356451 = phi i8 [ 0, %.lr.ph454 ], [ %.1357, %.critedge75.thread ] %34 = load i32, ptr %1, align 4, !tbaa !16 %35 = icmp slt i32 %34, 1 br i1 %35, label %36, label %.critedge @@ -377,7 +377,7 @@ define internal void @_ZL17_LMBCSFromUnicodeP25UConverterFromUnicodeArgsP10UErro switch.early.test: ; preds = %41 %trunc = trunc nuw i16 %.fr438 to i8 - switch i8 %trunc, label %.thread458 [ + switch i8 %trunc, label %.thread460 [ i8 -9, label %.thread i8 -41, label %.thread i8 -74, label %.thread @@ -408,7 +408,7 @@ switch.early.test: ; preds = %41 br label %.thread432 switch.early.test224: ; preds = %.thread458, %.thread, %46 - %49 = phi i16 [ %45, %.thread ], [ %47, %46 ], [ %44, %.thread458 ] + %49 = phi i16 [ %45, %.thread ], [ %47, %46 ], [ %44, %.thread460 ] switch i16 %.fr438, label %switch.early.test225 [ i16 25, label %50 i16 13, label %50 @@ -988,7 +988,7 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit273: ; preds = % br label %301 301: ; preds = %297, %.thread460 - %.1.i284 = phi ptr [ %300, %297 ], [ %.034.i278463, %.thread460 ] + %.1.i284 = phi ptr [ %300, %297 ], [ %.034.i278463, %.thread462 ] %302 = lshr i32 %283, 16 %303 = trunc i32 %302 to i8 %304 = getelementptr inbounds nuw i8, ptr %.1.i284, i64 1 @@ -997,8 +997,8 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit273: ; preds = % br label %305 305: ; preds = %301, %.thread460 - %306 = phi i32 [ %.pre.i285, %301 ], [ %283, %.thread460 ] - %.2.i282 = phi ptr [ %304, %301 ], [ %.034.i278463, %.thread460 ] + %306 = phi i32 [ %.pre.i285, %301 ], [ %283, %.thread462 ] + %.2.i282 = phi ptr [ %304, %301 ], [ %.034.i278463, %.thread462 ] %307 = lshr i32 %306, 8 %308 = trunc i32 %307 to i8 %309 = getelementptr inbounds nuw i8, ptr %.2.i282, i64 1 @@ -1007,15 +1007,15 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit273: ; preds = % br label %310 310: ; preds = %305, %.thread460 - %311 = phi i32 [ %.pre1.i283, %305 ], [ %283, %.thread460 ] - %.3.i280 = phi ptr [ %309, %305 ], [ %.034.i278463, %.thread460 ] + %311 = phi i32 [ %.pre1.i283, %305 ], [ %283, %.thread462 ] + %.3.i280 = phi ptr [ %309, %305 ], [ %.034.i278463, %.thread462 ] %312 = trunc i32 %311 to i8 %313 = getelementptr inbounds nuw i8, ptr %.3.i280, i64 1 store i8 %312, ptr %.3.i280, align 1, !tbaa !42 br label %314 314: ; preds = %310, %.thread460 - %.4.i281 = phi ptr [ %.034.i278463, %.thread460 ], [ %313, %310 ] + %.4.i281 = phi ptr [ %.034.i278463, %.thread462 ], [ %313, %310 ] %315 = ptrtoint ptr %.4.i281 to i64 %316 = ptrtoint ptr %.1384 to i64 %317 = sub i64 %315, %316 @@ -1286,10 +1286,10 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit312: ; preds = % .thread419: ; preds = %381, %433 %434 = icmp ne i8 %.06.i373382, -127 - %435 = select i1 %434, i8 1, i8 16 + %435 = select i1 %434, i64 1, i64 16 %436 = add i8 %.06.i373382, 127 %437 = icmp ult i8 %436, 2 - %spec.select228 = select i1 %437, i32 19, i32 11 + %spec.select228 = select i1 %437, i64 19, i64 11 %438 = zext i16 %.fr438 to i32 %439 = getelementptr inbounds nuw i8, ptr %.1384, i64 1 %440 = getelementptr inbounds nuw i8, ptr %.1384, i64 2 @@ -1297,75 +1297,77 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit312: ; preds = % br label %442 442: ; preds = %.thread419, %489 - %.0181443 = phi i8 [ %435, %.thread419 ], [ %490, %489 ] - %.8364442 = phi i8 [ %.5361, %.thread419 ], [ %.9365, %489 ] - %443 = zext nneg i8 %.0181443 to i64 - %444 = getelementptr inbounds nuw [20 x ptr], ptr %17, i64 0, i64 %443 - %445 = load ptr, ptr %444, align 8, !tbaa !12 - %.not218 = icmp eq ptr %445, null - br i1 %.not218, label %489, label %446 - -446: ; preds = %442 - %447 = getelementptr inbounds nuw [20 x i8], ptr %13, i64 0, i64 %443 - %448 = load i8, ptr %447, align 1, !tbaa !42 - %.not219 = icmp eq i8 %448, 0 - br i1 %.not219, label %449, label %489 - -449: ; preds = %446 + %.0181443 = phi i64 [ %435, %.thread419 ], [ %490, %491 ] + %.8364442 = phi i8 [ %.5361, %.thread419 ], [ %.9365, %491 ] + %443 = getelementptr inbounds nuw [20 x ptr], ptr %17, i64 0, i64 %.0181443 + %444 = load ptr, ptr %443, align 8, !tbaa !12 + %.not218 = icmp eq ptr %444, null + br i1 %.not218, label %491, label %445 + +445: ; preds = %442 + %446 = getelementptr inbounds nuw [20 x i8], ptr %13, i64 0, i64 %.0181443 + %447 = load i8, ptr %446, align 1, !tbaa !42 + %.not219 = icmp eq i8 %447, 0 + br i1 %.not219, label %448, label %491 + +448: ; preds = %445 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8 - %450 = call i32 @ucnv_MBCSFromUChar32_77(ptr noundef nonnull %445, i32 noundef %438, ptr noundef nonnull %4, i8 noundef signext 0) + %450 = call i32 @ucnv_MBCSFromUChar32_77(ptr noundef nonnull %444, i32 noundef %438, ptr noundef nonnull %4, i8 noundef signext 0) %451 = icmp sgt i32 %450, 0 br i1 %451, label %453, label %452 -452: ; preds = %449 - store i8 1, ptr %447, align 1, !tbaa !42 +452: ; preds = %448 + store i8 1, ptr %446, align 1, !tbaa !42 br label %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 -453: ; preds = %449 +453: ; preds = %448 %454 = load i32, ptr %4, align 4, !tbaa !32 %455 = shl i32 %450, 3 %456 = add i32 %455, -8 %457 = load i8, ptr %28, align 8, !tbaa !48 - %.not37.i315 = icmp eq i8 %457, %.0181443 - br i1 %.not37.i315, label %462, label %458 - -458: ; preds = %453 - store i8 %.0181443, ptr %.1384, align 1, !tbaa !42 - %459 = icmp eq i32 %450, 1 - %460 = icmp samesign ugt i8 %.0181443, 15 - %or.cond.i316 = and i1 %460, %459 - br i1 %or.cond.i316, label %461, label %462 - -461: ; preds = %458 - store i8 %.0181443, ptr %439, align 1, !tbaa !42 - br label %462 - -462: ; preds = %461, %458, %453 - %.034.i317 = phi ptr [ %440, %461 ], [ %439, %458 ], [ %.1384, %453 ] - %463 = icmp eq i32 %450, 1 - %464 = shl i32 224, %456 - %465 = and i32 %454, %464 - %466 = icmp eq i32 %465, 0 - %or.cond5.i318 = select i1 %463, i1 %466, i1 false - br i1 %or.cond5.i318, label %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325, label %467 - -467: ; preds = %462 - switch i32 %450, label %485 [ + %457 = zext i8 %457 to i64 + %.not37.i315 = icmp eq i64 %.0181443, %457 + br i1 %.not37.i315, label %463, label %458 + +458:; preds = %452 + %459 = trunc nuw nsw i64 %.0181443 to i8 + store i8 %459, ptr %.1384, align 1, !tbaa !42 + %460 = icmp eq i32 %449, 1 + %461 = icmp samesign ugt i64 %.0181443, 15 + %or.cond.i316 = and i1 %461, %460 + br i1 %or.cond.i316, label %462, label %463 + +462:; preds = %458 + store i8 %459, ptr %439, align 1, !tbaa !42 + br label %463 + +463:; preds = %462, %458, %452 + %.034.i317 = phi ptr [ %440, %462 ], [ %439, %458 ], [ %.1384, %452 ] + %464 = icmp eq i32 %449, 1 + %465 = shl i32 224, %455 + %466 = and i32 %453, %465 + %467 = icmp eq i32 %466, 0 + %or.cond5.i318 = select i1 %464, i1 %467, i1 false + %468 = trunc nuw nsw i64 %.0181443 to i8 + br i1 %or.cond5.i318, label %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325, label %469 + +469: ; preds = %463 + switch i32 %449, label %487 [ i32 4, label %468 - i32 3, label %472 - i32 2, label %476 - i32 1, label %481 + i32 3, label %474 + i32 2, label %478 + i32 1, label %483 ] -468: ; preds = %467 +468: ; preds = %469 %469 = lshr i32 %454, 24 %470 = trunc nuw i32 %469 to i8 %471 = getelementptr inbounds nuw i8, ptr %.034.i317, i64 1 store i8 %470, ptr %.034.i317, align 1, !tbaa !42 br label %472 -472: ; preds = %468, %467 - %.1.i323 = phi ptr [ %471, %468 ], [ %.034.i317, %467 ] +472: ; preds = %468, %469 + %.1.i323 = phi ptr [ %471, %470 ], [ %.034.i317, %469 ] %473 = lshr i32 %454, 16 %474 = trunc i32 %473 to i8 %475 = getelementptr inbounds nuw i8, ptr %.1.i323, i64 1 @@ -1373,9 +1375,9 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit312: ; preds = % %.pre.i324 = load i32, ptr %4, align 4, !tbaa !32 br label %476 -476: ; preds = %472, %467 - %477 = phi i32 [ %.pre.i324, %472 ], [ %454, %467 ] - %.2.i321 = phi ptr [ %475, %472 ], [ %.034.i317, %467 ] +476: ; preds = %472, %469 + %477 = phi i32 [ %.pre.i324, %474 ], [ %454, %469 ] + %.2.i321 = phi ptr [ %475, %474 ], [ %.034.i317, %469 ] %478 = lshr i32 %477, 8 %479 = trunc i32 %478 to i8 %480 = getelementptr inbounds nuw i8, ptr %.2.i321, i64 1 @@ -1383,33 +1385,32 @@ _ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit312: ; preds = % %.pre1.i322 = load i32, ptr %4, align 4, !tbaa !32 br label %481 -481: ; preds = %476, %467 - %482 = phi i32 [ %.pre1.i322, %476 ], [ %454, %467 ] - %.3.i319 = phi ptr [ %480, %476 ], [ %.034.i317, %467 ] +481: ; preds = %476, %469 + %482 = phi i32 [ %.pre1.i322, %478 ], [ %454, %469 ] + %.3.i319 = phi ptr [ %480, %478 ], [ %.034.i317, %469 ] %483 = trunc i32 %482 to i8 %484 = getelementptr inbounds nuw i8, ptr %.3.i319, i64 1 store i8 %483, ptr %.3.i319, align 1, !tbaa !42 br label %485 -485: ; preds = %481, %467 - %.4.i320 = phi ptr [ %.034.i317, %467 ], [ %484, %481 ] +485: ; preds = %481, %469 + %.4.i320 = phi ptr [ %.034.i317, %469 ], [ %484, %483 ] %486 = ptrtoint ptr %.4.i320 to i64 %487 = sub i64 %486, %441 %488 = trunc i64 %487 to i32 br label %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 -_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325: ; preds = %452, %462, %485 - %.17 = phi i8 [ %.0181443, %462 ], [ %.0181443, %485 ], [ %.8364442, %452 ] - %.0.i313 = phi i32 [ 0, %462 ], [ %488, %485 ], [ 0, %452 ] +_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325: ; preds = %452, %463, %485 + %.17 = phi i8 [ %468, %463 ], [ %468, %487 ], [ %.8364442, %451 ] + %.0.i313 = phi i32 [ 0, %463 ], [ %488, %487 ], [ 0, %451 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8 br label %489 -489: ; preds = %442, %446, %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 - %.9365 = phi i8 [ %.8364442, %442 ], [ %.17, %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 ], [ %.8364442, %446 ] - %.10 = phi i32 [ 0, %442 ], [ %.0.i313, %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 ], [ 0, %446 ] - %490 = add nuw nsw i8 %.0181443, 1 - %491 = zext nneg i8 %490 to i32 - %492 = icmp samesign uge i32 %spec.select228, %491 +489: ; preds = %442, %445, %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 + %.9365 = phi i8 [ %.8364442, %442 ], [ %.17, %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 ], [ %.8364442, %445 ] + %.10 = phi i32 [ 0, %442 ], [ %.0.i313, %_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa.exit325 ], [ 0, %445 ] + %490 = add nuw nsw i64 %.0181443, 1 + %492 = icmp samesign ugt i64 %spec.select228, %.0181443 %.not217 = icmp eq i32 %.10, 0 %493 = select i1 %492, i1 %.not217, i1 false br i1 %493, label %442, label %494, !llvm.loop !49 diff --git a/bench/icu/optimized/utrie_swap.ll b/bench/icu/optimized/utrie_swap.ll index c39c53d79a8..1d6e6f665be 100644 --- a/bench/icu/optimized/utrie_swap.ll +++ b/bench/icu/optimized/utrie_swap.ll @@ -310,32 +310,32 @@ define range(i32 0, 4325387) i32 @ucptrie_swap_77(ptr noundef %0, ptr noundef %1 %41 = zext i16 %34 to i32 %42 = or disjoint i32 %40, %41 %43 = icmp eq i32 %37, 0 - %44 = select i1 %43, i32 1024, i32 64 - %45 = icmp ne i32 %21, 1416784179 - %46 = icmp samesign ugt i32 %37, 1 - %or.cond7 = select i1 %45, i1 true, i1 %46 - br i1 %or.cond7, label %55, label %47 - -47: ; preds = %17 - %48 = and i32 %35, 56 - %49 = icmp ne i32 %48, 0 - %50 = icmp samesign ugt i32 %38, 2 - %or.cond9 = select i1 %49, i1 true, i1 %50 - br i1 %or.cond9, label %55, label %51 - -51: ; preds = %47 - %52 = zext i16 %30 to i32 - %53 = icmp samesign ugt i32 %44, %52 - %54 = icmp samesign ult i32 %42, 128 - %or.cond11 = select i1 %53, i1 true, i1 %54 - br i1 %or.cond11, label %55, label %56 - -55: ; preds = %51, %47, %17 + %44 = icmp ne i32 %21, 1416784179 + %45 = icmp samesign ugt i32 %37, 1 + %or.cond7 = select i1 %44, i1 true, i1 %45 + br i1 %or.cond7, label %54, label %46 + +46: ; preds = %17 + %47 = and i32 %35, 56 + %48 = icmp ne i32 %47, 0 + %49 = icmp samesign ugt i32 %38, 2 + %or.cond9 = select i1 %48, i1 true, i1 %49 + br i1 %or.cond9, label %54, label %50 + +50: ; preds = %46 + %51 = select i1 %43, i16 1024, i16 64 + %52 = icmp ugt i16 %51, %30 + %53 = icmp samesign ult i32 %42, 128 + %or.cond11 = select i1 %52, i1 true, i1 %53 + br i1 %or.cond11, label %54, label %55 + +54: ; preds = %50, %46, %17 store i32 3, ptr %4, align 4, !tbaa !3 br label %.thread -56: ; preds = %51 - %57 = shl nuw nsw i32 %52, 1 +56: ; preds = %50 + %56 = zext i16 %30 to i32 + %57 = shl nuw nsw i32 %56, 1 %narrow = add nuw nsw i32 %57, 16 switch i32 %38, label %default.unreachable [ i32 0, label %58 @@ -355,7 +355,7 @@ default.unreachable: ; preds = %64, %56 unreachable 62: ; preds = %56, %60, %58 - %.pn = phi i32 [ %59, %58 ], [ %61, %60 ], [ %42, %56 ] + %.pn = phi i32 [ %59, %58 ], [ %61, %60 ], [ %42, %55 ] %.095 = add nuw nsw i32 %narrow, %.pn br i1 %12, label %63, label %.thread @@ -409,8 +409,8 @@ default.unreachable: ; preds = %64, %56 store i32 8, ptr %4, align 4, !tbaa !3 br label %.thread -.thread: ; preds = %79, %83, %88, %87, %62, %90, %55, %5, %16, %14 - %.0 = phi i32 [ 0, %14 ], [ 0, %16 ], [ 0, %5 ], [ 0, %55 ], [ 0, %90 ], [ %.095, %62 ], [ %.095, %87 ], [ %.095, %88 ], [ %.095, %83 ], [ %.095, %79 ] +.thread: ; preds = %79, %83, %88, %87, %62, %90, %54, %5, %16, %14 + %.0 = phi i32 [ 0, %14 ], [ 0, %16 ], [ 0, %5 ], [ 0, %54 ], [ 0, %90 ], [ %.095, %62 ], [ %.095, %87 ], [ %.095, %88 ], [ %.095, %83 ], [ %.095, %79 ] ret i32 %.0 } diff --git a/bench/jq/optimized/regcomp.ll b/bench/jq/optimized/regcomp.ll index b1484385da0..a52fa0a7d06 100644 --- a/bench/jq/optimized/regcomp.ll +++ b/bench/jq/optimized/regcomp.ll @@ -11051,16 +11051,16 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n %53 = getelementptr inbounds nuw i8, ptr %.0115, i64 24 %54 = load i32, ptr %53, align 8, !tbaa !20 %.not152 = icmp eq i32 %54, 0 - %55 = select i1 %.not152, i32 256, i32 128 - %56 = getelementptr inbounds nuw i8, ptr %2, i64 96 - %57 = getelementptr inbounds nuw i8, ptr %.0114, i64 20 + %55 = getelementptr inbounds nuw i8, ptr %2, i64 96 + %56 = getelementptr inbounds nuw i8, ptr %.0114, i64 20 + %57 = select i1 %.not152, i32 255, i32 127 br label %58 58: ; preds = %52, %71 %.0116206 = phi i32 [ 0, %52 ], [ %72, %71 ] %59 = lshr i32 %.0116206, 5 %60 = zext nneg i32 %59 to i64 - %61 = getelementptr inbounds nuw [8 x i32], ptr %57, i64 0, i64 %60 + %61 = getelementptr inbounds nuw [8 x i32], ptr %56, i64 0, i64 %60 %62 = load i32, ptr %61, align 4, !tbaa !4 %63 = and i32 %.0116206, 31 %64 = shl nuw i32 1, %63 @@ -11069,7 +11069,7 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n br i1 %.not153, label %71, label %66 66: ; preds = %58 - %67 = load ptr, ptr %56, align 8, !tbaa !13 + %67 = load ptr, ptr %55, align 8, !tbaa !13 %68 = getelementptr inbounds nuw i8, ptr %67, i64 88 %69 = load ptr, ptr %68, align 8, !tbaa !266 %70 = tail call i32 %69(i32 noundef %.0116206, i32 noundef 12) #22 @@ -11078,7 +11078,7 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n 71: ; preds = %58, %66 %72 = add nuw nsw i32 %.0116206, 1 - %exitcond233.not = icmp eq i32 %72, %55 + %exitcond233.not = icmp eq i32 %57, %.0116206 br i1 %exitcond233.not, label %.thread160, label %58, !llvm.loop !267 73: ; preds = %40 @@ -11095,9 +11095,9 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n %79 = getelementptr inbounds nuw i8, ptr %.0115, i64 24 %80 = load i32, ptr %79, align 8, !tbaa !20 %.not147.not = icmp eq i32 %80, 0 - %81 = select i1 %.not147.not, i32 256, i32 128 - %82 = getelementptr inbounds nuw i8, ptr %2, i64 96 - %83 = getelementptr inbounds nuw i8, ptr %.0114, i64 20 + %81 = getelementptr inbounds nuw i8, ptr %2, i64 96 + %82 = getelementptr inbounds nuw i8, ptr %.0114, i64 20 + %83 = select i1 %.not147.not, i32 255, i32 127 br label %84 .preheader: ; preds = %97 @@ -11105,7 +11105,7 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n 84: ; preds = %78, %97 %.1117200 = phi i32 [ 0, %78 ], [ %98, %97 ] - %85 = load ptr, ptr %82, align 8, !tbaa !13 + %85 = load ptr, ptr %81, align 8, !tbaa !13 %86 = getelementptr inbounds nuw i8, ptr %85, i64 88 %87 = load ptr, ptr %86, align 8, !tbaa !266 %88 = tail call i32 %87(i32 noundef %.1117200, i32 noundef 12) #22 @@ -11115,7 +11115,7 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n 89: ; preds = %84 %90 = lshr i32 %.1117200, 5 %91 = zext nneg i32 %90 to i64 - %92 = getelementptr inbounds nuw [8 x i32], ptr %83, i64 0, i64 %91 + %92 = getelementptr inbounds nuw [8 x i32], ptr %82, i64 0, i64 %91 %93 = load i32, ptr %92, align 4, !tbaa !4 %94 = and i32 %.1117200, 31 %95 = shl nuw i32 1, %94 @@ -11125,7 +11125,7 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n 97: ; preds = %84, %89 %98 = add nuw nsw i32 %.1117200, 1 - %exitcond229.not = icmp eq i32 %98, %81 + %exitcond229.not = icmp eq i32 %83, %.1117200 br i1 %exitcond229.not, label %.preheader, label %84, !llvm.loop !268 99: ; preds = %.lr.ph202 @@ -11137,7 +11137,7 @@ define internal fastcc i32 @is_exclusive(ptr noundef nonnull readonly captures(n %.2118201 = phi i32 [ %100, %99 ], [ 128, %.preheader ] %101 = lshr i32 %.2118201, 5 %102 = zext nneg i32 %101 to i64 - %103 = getelementptr inbounds nuw [8 x i32], ptr %83, i64 0, i64 %102 + %103 = getelementptr inbounds nuw [8 x i32], ptr %82, i64 0, i64 %102 %104 = load i32, ptr %103, align 4, !tbaa !4 %105 = and i32 %.2118201, 31 %106 = shl nuw i32 1, %105 diff --git a/bench/libjpeg-turbo/optimized/jdhuff.ll b/bench/libjpeg-turbo/optimized/jdhuff.ll index 029388f958a..cf2c3cc076e 100644 --- a/bench/libjpeg-turbo/optimized/jdhuff.ll +++ b/bench/libjpeg-turbo/optimized/jdhuff.ll @@ -309,33 +309,32 @@ define void @jpeg_make_d_derived_tbl(ptr noundef %0, i32 noundef %1, i32 noundef %wide.trip.count = zext nneg i32 %.1.lcssa to i64 br label %136 -136: ; preds = %.lr.ph159, %149 - %indvars.iv189 = phi i64 [ 0, %.lr.ph159 ], [ %indvars.iv.next190, %149 ] +136: ; preds = %.lr.ph159, %148 + %indvars.iv189 = phi i64 [ 0, %.lr.ph159 ], [ %indvars.iv.next190, %148 ] %137 = getelementptr inbounds nuw [256 x i8], ptr %107, i64 0, i64 %indvars.iv189 %138 = load i8, ptr %137, align 1, !tbaa !33 - %139 = zext i8 %138 to i32 - %140 = load ptr, ptr %135, align 8, !tbaa !52 - %141 = getelementptr inbounds nuw i8, ptr %140, i64 20 - %142 = load i32, ptr %141, align 4, !tbaa !53 - %.not118 = icmp eq i32 %142, 0 - %143 = select i1 %.not118, i32 15, i32 16 - %144 = icmp samesign ult i32 %143, %139 - br i1 %144, label %145, label %149 - -145: ; preds = %136 - %146 = load ptr, ptr %0, align 8, !tbaa !3 - %147 = getelementptr inbounds nuw i8, ptr %146, i64 40 - store i32 8, ptr %147, align 8, !tbaa !30 - %148 = load ptr, ptr %146, align 8, !tbaa !34 - tail call void %148(ptr noundef nonnull %0) #5 - br label %149 - -149: ; preds = %145, %136 + %139 = load ptr, ptr %135, align 8, !tbaa !52 + %140 = getelementptr inbounds nuw i8, ptr %139, i64 20 + %141 = load i32, ptr %140, align 4, !tbaa !53 + %.not118 = icmp eq i32 %141, 0 + %142 = select i1 %.not118, i8 15, i8 16 + %143 = icmp ult i8 %142, %138 + br i1 %143, label %144, label %148 + +144: ; preds = %136 + %145 = load ptr, ptr %0, align 8, !tbaa !3 + %146 = getelementptr inbounds nuw i8, ptr %145, i64 40 + store i32 8, ptr %146, align 8, !tbaa !30 + %147 = load ptr, ptr %145, align 8, !tbaa !34 + tail call void %147(ptr noundef nonnull %0) #5 + br label %148 + +148: ; preds = %144, %136 %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1 %exitcond192.not = icmp eq i64 %indvars.iv.next190, %wide.trip.count br i1 %exitcond192.not, label %.loopexit, label %136, !llvm.loop !55 -.loopexit: ; preds = %149, %133 +.loopexit: ; preds = %148, %133 call void @llvm.lifetime.end.p0(i64 1028, ptr nonnull %6) #5 call void @llvm.lifetime.end.p0(i64 257, ptr nonnull %5) #5 ret void diff --git a/bench/libquic/optimized/inflate.ll b/bench/libquic/optimized/inflate.ll index 66095e65b20..145dfaec940 100644 --- a/bench/libquic/optimized/inflate.ll +++ b/bench/libquic/optimized/inflate.ll @@ -3777,15 +3777,14 @@ define range(i32 -5, 1) i32 @MOZ_Z_inflateSync(ptr noundef captures(address_is_n %.01415.i = phi i32 [ 0, %.lr.ph.preheader.i ], [ %.1.i, %.lr.ph.i ] %33 = getelementptr inbounds nuw i8, ptr %2, i64 %indvars.iv.i %34 = load i8, ptr %33, align 1, !tbaa !37 - %35 = zext i8 %34 to i32 - %36 = icmp samesign ult i32 %.01415.i, 2 - %37 = select i1 %36, i32 0, i32 255 - %38 = icmp eq i32 %37, %35 - %39 = add nuw nsw i32 %.01415.i, 1 + %35 = icmp samesign ugt i32 %.01415.i, 1 + %36 = sext i1 %35 to i8 + %37 = icmp eq i8 %34, %36 + %38 = add nuw nsw i32 %.01415.i, 1 %.not.i = icmp eq i8 %34, 0 %40 = sub nuw nsw i32 4, %.01415.i %spec.select.i = select i1 %.not.i, i32 %40, i32 0 - %.1.i = select i1 %38, i32 %39, i32 %spec.select.i + %.1.i = select i1 %37, i32 %38, i32 %spec.select.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %41 = icmp samesign ult i64 %indvars.iv.next.i, %32 %42 = icmp samesign ult i32 %.1.i, 4 @@ -3818,15 +3817,14 @@ syncsearch.exit: ; preds = %.lr.ph.i, %.thread %.01415.i46 = phi i32 [ %46, %.lr.ph.preheader.i43 ], [ %.1.i49, %.lr.ph.i44 ] %54 = getelementptr inbounds nuw i8, ptr %49, i64 %indvars.iv.i45 %55 = load i8, ptr %54, align 1, !tbaa !37 - %56 = zext i8 %55 to i32 - %57 = icmp samesign ult i32 %.01415.i46, 2 - %58 = select i1 %57, i32 0, i32 255 - %59 = icmp eq i32 %58, %56 - %60 = add nuw nsw i32 %.01415.i46, 1 - %.not.i47 = icmp eq i8 %55, 0 - %61 = sub nuw nsw i32 4, %.01415.i46 - %spec.select.i48 = select i1 %.not.i47, i32 %61, i32 0 - %.1.i49 = select i1 %59, i32 %60, i32 %spec.select.i48 + %55 = icmp samesign ugt i32 %.01415.i46, 1 + %56 = sext i1 %55 to i8 + %57 = icmp eq i8 %54, %56 + %58 = add nuw nsw i32 %.01415.i46, 1 + %.not.i47 = icmp eq i8 %54, 0 + %59 = sub nuw nsw i32 4, %.01415.i46 + %spec.select.i48 = select i1 %.not.i47, i32 %59, i32 0 + %spec.select.i48 = select i1 %57, i32 %58, i32 %spec.select.i48 %indvars.iv.next.i50 = add nuw nsw i64 %indvars.iv.i45, 1 %62 = icmp samesign ult i64 %indvars.iv.next.i50, %53 %63 = icmp samesign ult i32 %.1.i49, 4 @@ -3838,8 +3836,8 @@ syncsearch.exit: ; preds = %.lr.ph.i, %.thread br label %syncsearch.exit52 syncsearch.exit52: ; preds = %45, %._crit_edge.loopexit.i51 - %.014.lcssa.i41 = phi i32 [ %46, %45 ], [ %.1.i49, %._crit_edge.loopexit.i51 ] - %.0.lcssa.i42 = phi i32 [ 0, %45 ], [ %65, %._crit_edge.loopexit.i51 ] + %.014.lcssa.i41 = phi i32 [ %46, %44 ], [ %.1.i49, %._crit_edge.loopexit.i51 ] + %.0.lcssa.i42 = phi i32 [ 0, %44 ], [ %65, %._crit_edge.loopexit.i51 ] store i32 %.014.lcssa.i41, ptr %48, align 4, !tbaa !98 %66 = load i32, ptr %9, align 8, !tbaa !42 %67 = sub i32 %66, %.0.lcssa.i42 diff --git a/bench/libwebp/optimized/tree_enc.ll b/bench/libwebp/optimized/tree_enc.ll index 89659a211a3..20b21d84a56 100644 --- a/bench/libwebp/optimized/tree_enc.ll +++ b/bench/libwebp/optimized/tree_enc.ll @@ -102,14 +102,13 @@ define hidden void @VP8CodeIntraModes(ptr noundef %0) local_unnamed_addr #4 { 44: ; preds = %38 %45 = load i8, ptr %13, align 1, !tbaa !31 - %46 = zext i8 %45 to i32 - %47 = and i32 %46, 253 - %48 = icmp eq i32 %47, 1 - %49 = zext i1 %48 to i32 - %50 = call i32 @VP8PutBit(ptr noundef nonnull %3, i32 noundef %49, i32 noundef 156) #6 - %.not.i40 = icmp eq i32 %50, 0 - %.sink7.v.i = select i1 %.not.i40, i32 2, i32 1 - %.sink7.i = icmp eq i32 %.sink7.v.i, %46 + %46 = and i8 %45, -3 + %47 = icmp eq i8 %46, 1 + %48 = zext i1 %47 to i32 + %49 = call i32 @VP8PutBit(ptr noundef nonnull %3, i32 noundef %48, i32 noundef 156) #6 + %.not.i40 = icmp eq i32 %49, 0 + %.sink7.v.i43 = select i1 %.not.i40, i8 2, i8 1 + %.sink7.i = icmp eq i8 %.sink7.v.i43, %45 %.sink6.i = select i1 %.not.i40, i32 163, i32 128 %51 = zext i1 %.sink7.i to i32 %52 = call i32 @VP8PutBit(ptr noundef nonnull %3, i32 noundef %51, i32 noundef %.sink6.i) #6 @@ -123,17 +122,17 @@ define hidden void @VP8CodeIntraModes(ptr noundef %0) local_unnamed_addr #4 { br label %58 58: ; preds = %53, %124 - %.047 = phi ptr [ %13, %53 ], [ %125, %124 ] - %.03446 = phi i32 [ 0, %53 ], [ %126, %124 ] - %.03645 = phi ptr [ %57, %53 ], [ %.047, %124 ] + %.047 = phi ptr [ %13, %52 ], [ %125, %123 ] + %.03446 = phi i32 [ 0, %52 ], [ %126, %123 ] + %.03645 = phi ptr [ %57, %52 ], [ %.047, %123 ] %59 = getelementptr inbounds i8, ptr %.047, i64 -1 %60 = load i8, ptr %59, align 1, !tbaa !31 %61 = zext i8 %60 to i32 br label %62 62: ; preds = %58, %PutI4Mode.exit - %indvars.iv = phi i64 [ 0, %58 ], [ %indvars.iv.next, %PutI4Mode.exit ] - %.03344 = phi i32 [ %61, %58 ], [ %70, %PutI4Mode.exit ] + %indvars.iv = phi i64 [ 0, %57 ], [ %indvars.iv.next, %PutI4Mode.exit ] + %.03344 = phi i32 [ %61, %57 ], [ %70, %PutI4Mode.exit ] %63 = getelementptr inbounds nuw i8, ptr %.03645, i64 %indvars.iv %64 = load i8, ptr %63, align 1, !tbaa !31 %65 = zext i8 %64 to i64 @@ -211,8 +210,8 @@ define hidden void @VP8CodeIntraModes(ptr noundef %0) local_unnamed_addr #4 { br i1 %.not32.i, label %PutI4Mode.exit, label %.sink.split.i .sink.split.i: ; preds = %111, %97 - %.sink.i = phi i32 [ 4, %97 ], [ 8, %111 ] - %.sink36.i = phi i64 [ 5, %97 ], [ 8, %111 ] + %.sink.i = phi i32 [ 4, %96 ], [ 8, %110 ] + %.sink36.i = phi i64 [ 5, %96 ], [ 8, %110 ] %118 = icmp ne i32 %.sink.i, %70 %119 = zext i1 %118 to i32 %120 = getelementptr inbounds nuw i8, ptr %67, i64 %.sink36.i diff --git a/bench/libzmq/optimized/ip_resolver.ll b/bench/libzmq/optimized/ip_resolver.ll index 9d1ac65ab4b..c941e4f17e3 100644 --- a/bench/libzmq/optimized/ip_resolver.ll +++ b/bench/libzmq/optimized/ip_resolver.ll @@ -1533,7 +1533,7 @@ define noundef range(i32 -1, 1) i32 @_ZN3zmq13ip_resolver_t16resolve_nic_nameEPN %32 = getelementptr inbounds nuw i8, ptr %0, i64 10 %33 = load i8, ptr %32, align 2, !range !22 %34 = trunc nuw i8 %33 to i1 - %35 = select i1 %34, i32 10, i32 2 + %35 = select i1 %34, i16 10, i16 2 br label %36 36: ; preds = %.lr.ph, %.thread44 @@ -1545,25 +1545,23 @@ define noundef range(i32 -1, 1) i32 @_ZN3zmq13ip_resolver_t16resolve_nic_nameEPN 40: ; preds = %36 %41 = load i16, ptr %38, align 2, !tbaa !62 - %42 = zext i16 %41 to i32 - %43 = icmp eq i32 %35, %42 - br i1 %43, label %44, label %.thread44 - -44: ; preds = %40 - %45 = getelementptr inbounds nuw i8, ptr %.02255, i64 8 - %46 = load ptr, ptr %45, align 8, !tbaa !64 - %47 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %46) #22 - %.not37 = icmp eq i32 %47, 0 + %42 = icmp eq i16 %35, %41 + br i1 %42, label %43, label %.thread44 + +43: ; preds = %40 + %44 = getelementptr inbounds nuw i8, ptr %.02255, i64 8 + %45 = load ptr, ptr %44, align 8, !tbaa !64 + %46 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %45) #22 + %.not37 = icmp eq i32 %46, 0 br i1 %.not37, label %.thread47, label %.thread44 -.thread47: ; preds = %44 - %48 = icmp eq i16 %41, 2 - %49 = select i1 %48, i64 16, i64 28 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 2 dereferenceable(16) %38, i64 %49, i1 false) +.thread47: ; preds = %43 + %47 = select i1 %34, i64 28, i64 16 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 2 dereferenceable(16) %38, i64 %47, i1 false) call void @freeifaddrs(ptr noundef nonnull %31) #21 br label %52 -.thread44: ; preds = %40, %44, %36 +.thread44: ; preds = %40, %43, %36 %.022 = load ptr, ptr %.02255, align 8, !tbaa !52 %.not36 = icmp eq ptr %.022, null br i1 %.not36, label %._crit_edge, label %36, !llvm.loop !65 diff --git a/bench/lief/optimized/hmac_drbg.ll b/bench/lief/optimized/hmac_drbg.ll index f06e087b6cb..84202407889 100644 --- a/bench/lief/optimized/hmac_drbg.ll +++ b/bench/lief/optimized/hmac_drbg.ll @@ -42,6 +42,7 @@ define hidden i32 @mbedtls_hmac_drbg_update(ptr noundef %0, ptr noundef %1, i64 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #12 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #12 %12 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %13 = select i1 %11, i8 2, i8 1 store i8 0, ptr %4, align 1, !tbaa !13 br i1 %11, label %.split.us, label %.split @@ -89,7 +90,7 @@ define hidden i32 @mbedtls_hmac_drbg_update(ptr noundef %0, ptr noundef %1, i64 %29 = load i8, ptr %4, align 1, !tbaa !13 %30 = add i8 %29, 1 store i8 %30, ptr %4, align 1, !tbaa !13 - %31 = icmp ult i8 %30, 2 + %31 = icmp ugt i8 %13, %31 br i1 %31, label %.split.us, label %.split39.us, !llvm.loop !14 .split: ; preds = %3, %45 @@ -131,11 +132,11 @@ define hidden i32 @mbedtls_hmac_drbg_update(ptr noundef %0, ptr noundef %1, i64 %46 = load i8, ptr %4, align 1, !tbaa !13 %47 = add i8 %46, 1 store i8 %47, ptr %4, align 1, !tbaa !13 - %48 = icmp eq i8 %47, 0 + %48 = icmp ugt i8 %13, %48 br i1 %48, label %.split, label %.split39.us, !llvm.loop !14 .split39.us: ; preds = %.split, %33, %35, %37, %39, %41, %43, %45, %.split.us, %14, %16, %18, %20, %22, %24, %26, %28 - %.us-phi = phi i32 [ %13, %.split.us ], [ %15, %14 ], [ %17, %16 ], [ %19, %18 ], [ %21, %20 ], [ %23, %22 ], [ %25, %24 ], [ %27, %26 ], [ 0, %28 ], [ %32, %.split ], [ %34, %33 ], [ %36, %35 ], [ %38, %37 ], [ %40, %39 ], [ %42, %41 ], [ %44, %43 ], [ 0, %45 ] + %.us-phi = phi i32 [ %13, %.split.us ], [ %15, %15 ], [ %17, %17 ], [ %20, %19 ], [ %22, %21 ], [ %24, %23 ], [ %26, %25 ], [ %28, %27 ], [ 0, %29 ], [ %33, %.split ], [ %35, %34 ], [ %37, %36 ], [ %39, %38 ], [ %41, %40 ], [ %43, %42 ], [ %45, %44 ], [ 0, %46 ] call void @mbedtls_platform_zeroize(ptr noundef nonnull %5, i64 noundef 64) #12 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #12 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #12 diff --git a/bench/linux/optimized/hdmi.ll b/bench/linux/optimized/hdmi.ll index a53a79cdccd..84c893be526 100644 --- a/bench/linux/optimized/hdmi.ll +++ b/bench/linux/optimized/hdmi.ll @@ -1537,7 +1537,7 @@ define dso_local range(i64 -28, 260) i64 @hdmi_drm_infoframe_pack(ptr noundef re ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define dso_local range(i32 -22, 1) i32 @hdmi_infoframe_check(ptr noundef captures(none) %0) #9 align 16 { %2 = load i32, ptr %0, align 4 - switch i32 %2, label %61 [ + switch i32 %2, label %60 [ i32 130, label %3 i32 131, label %16 i32 132, label %25 @@ -1620,15 +1620,14 @@ define dso_local range(i32 -22, 1) i32 @hdmi_infoframe_check(ptr noundef capture br i1 %53, label %54, label %63 54: ; preds = %._crit_edge - %55 = zext nneg i8 %49 to i32 - %56 = and i1 %52, %51 - %57 = select i1 %56, i32 4, i32 5 - %58 = icmp eq i32 %57, %55 - %59 = select i1 %44, i1 true, i1 %58 - %60 = select i1 %59, i32 0, i32 -22 - br label %63 - -61: ; preds = %1 + %55 = and i1 %52, %51 + %56 = select i1 %55, i8 4, i8 5 + %57 = icmp eq i8 %56, %49 + %58 = or i1 %44, %57 + %59 = select i1 %58, i32 0, i32 -22 + br label %62 + +60: ; preds = %1 tail call void asm sideeffect "336: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 336b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 336) #15, !srcloc !12 %62 = load i32, ptr %0, align 4 tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str, i32 noundef %62) #15 @@ -1638,8 +1637,8 @@ define dso_local range(i32 -22, 1) i32 @hdmi_infoframe_check(ptr noundef capture tail call void asm sideeffect "339: nop\0A\09.pushsection .discard.instr_end\0A\09.long 339b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 339) #15, !srcloc !16 br label %63 -63: ; preds = %61, %54, %._crit_edge, %38, %34, %29, %25, %20, %16, %11, %7, %3 - %64 = phi i32 [ -22, %61 ], [ -22, %7 ], [ -22, %3 ], [ %15, %11 ], [ -22, %16 ], [ %24, %20 ], [ -22, %25 ], [ %33, %29 ], [ -22, %34 ], [ -22, %38 ], [ %60, %54 ], [ -22, %._crit_edge ] +63: ; preds = %60, %54, %._crit_edge, %38, %34, %29, %25, %20, %16, %11, %7, %3 + %64 = phi i32 [ -22, %60 ], [ -22, %7 ], [ -22, %3 ], [ %15, %11 ], [ -22, %16 ], [ %24, %20 ], [ -22, %25 ], [ %33, %29 ], [ -22, %34 ], [ -22, %38 ], [ %59, %54 ], [ -22, %._crit_edge ] ret i32 %64 } @@ -1854,7 +1853,7 @@ hdmi_audio_infoframe_pack_only.exit: ; preds = %13, %9, %112, %54, ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid define dso_local range(i64 -28, 260) i64 @hdmi_infoframe_pack(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) #9 align 16 { %4 = load i32, ptr %0, align 4 - switch i32 %4, label %162 [ + switch i32 %4, label %161 [ i32 130, label %5 i32 135, label %19 i32 131, label %29 @@ -2086,15 +2085,14 @@ define dso_local range(i64 -28, 260) i64 @hdmi_infoframe_pack(ptr noundef captur br i1 %153, label %154, label %hdmi_audio_infoframe_pack_only.exit 154: ; preds = %._crit_edge - %155 = zext nneg i8 %149 to i32 - %156 = and i1 %152, %151 - %157 = select i1 %156, i32 4, i32 5 - %158 = icmp eq i32 %157, %155 - %159 = select i1 %144, i1 true, i1 %158 - br i1 %159, label %160, label %hdmi_audio_infoframe_pack_only.exit - -160: ; preds = %154 - %161 = tail call i64 @hdmi_vendor_infoframe_pack_only(ptr noundef %0, ptr noundef %1, i64 noundef %2), !range !10 + %155 = and i1 %152, %151 + %156 = select i1 %155, i8 4, i8 5 + %157 = icmp eq i8 %156, %149 + %158 = or i1 %144, %157 + br i1 %158, label %159, label %hdmi_audio_infoframe_pack_only.exit + +159: ; preds = %154 + %160 = tail call i64 @hdmi_vendor_infoframe_pack_only(ptr noundef %0, ptr noundef %1, i64 noundef %2), !range !10 br label %hdmi_audio_infoframe_pack_only.exit 162: ; preds = %3 @@ -2107,8 +2105,8 @@ define dso_local range(i64 -28, 260) i64 @hdmi_infoframe_pack(ptr noundef captur tail call void asm sideeffect "349: nop\0A\09.pushsection .discard.instr_end\0A\09.long 349b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 349) #15, !srcloc !26 br label %hdmi_audio_infoframe_pack_only.exit -hdmi_audio_infoframe_pack_only.exit: ; preds = %138, %154, %._crit_edge, %134, %70, %66, %33, %29, %23, %19, %5, %9, %13, %132, %74, %162, %160, %64, %37, %27, %17 - %164 = phi i64 [ -22, %162 ], [ %18, %17 ], [ %28, %27 ], [ 29, %64 ], [ -28, %37 ], [ %161, %160 ], [ 14, %132 ], [ -28, %74 ], [ -22, %13 ], [ -22, %9 ], [ -22, %5 ], [ -22, %19 ], [ -22, %23 ], [ -22, %29 ], [ -22, %33 ], [ -22, %66 ], [ -22, %70 ], [ -22, %134 ], [ -22, %._crit_edge ], [ -22, %154 ], [ -22, %138 ] +hdmi_audio_infoframe_pack_only.exit: ; preds = %138, %154, %._crit_edge, %134, %70, %66, %33, %29, %23, %19, %5, %9, %13, %132, %74, %162, %159, %64, %37, %27, %17 + %164 = phi i64 [ -22, %161 ], [ %18, %17 ], [ %28, %27 ], [ 29, %64 ], [ -28, %37 ], [ %160, %159 ], [ 14, %132 ], [ -28, %74 ], [ -22, %13 ], [ -22, %9 ], [ -22, %5 ], [ -22, %19 ], [ -22, %23 ], [ -22, %29 ], [ -22, %33 ], [ -22, %66 ], [ -22, %70 ], [ -22, %134 ], [ -22, %._crit_edge ], [ -22, %154 ], [ -22, %138 ] ret i64 %164 } diff --git a/bench/linux/optimized/i9xx_wm.ll b/bench/linux/optimized/i9xx_wm.ll index 2dad0065d81..bd828c6c792 100644 --- a/bench/linux/optimized/i9xx_wm.ll +++ b/bench/linux/optimized/i9xx_wm.ll @@ -3218,9 +3218,9 @@ define internal noundef range(i32 -22, 1) i32 @vlv_compute_pipe_wm(ptr noundef r br i1 %79, label %69, label %171, !llvm.loop !78 80: ; preds = %.thread42, %52 - %81 = phi i64 [ 0, %52 ], [ %136, %.thread42 ] - %82 = phi i8 [ 0, %52 ], [ %135, %.thread42 ] - %83 = phi i32 [ 0, %52 ], [ %137, %.thread42 ] + %81 = phi i64 [ 0, %52 ], [ %136, %.thread14 ] + %82 = phi i8 [ 0, %52 ], [ %135, %.thread14 ] + %83 = phi i32 [ 0, %52 ], [ %137, %.thread14 ] %84 = load ptr, ptr %31, align 8 %85 = load ptr, ptr %84, align 8 %86 = getelementptr inbounds nuw i8, ptr %85, i64 6888 @@ -3304,14 +3304,14 @@ define internal noundef range(i32 -22, 1) i32 @vlv_compute_pipe_wm(ptr noundef r br label %.loopexit20 .loopexit20: ; preds = %.thread42, %.thread - %142 = phi i8 [ %82, %.thread ], [ %135, %.thread42 ] - %143 = phi i32 [ %141, %.thread ], [ %137, %.thread42 ] + %142 = phi i8 [ %82, %.thread ], [ %135, %.thread14 ] + %143 = phi i32 [ %141, %.thread ], [ %137, %.thread14 ] %144 = icmp ne i8 %142, 0 br label %145 145: ; preds = %.loopexit20, %48 - %146 = phi i32 [ 0, %48 ], [ %143, %.loopexit20 ] - %147 = phi i1 [ false, %48 ], [ %144, %.loopexit20 ] + %146 = phi i32 [ 0, %48 ], [ %143, %.loopexit23 ] + %147 = phi i1 [ false, %48 ], [ %144, %.loopexit23 ] %148 = load ptr, ptr %9, align 8 %149 = load ptr, ptr %148, align 8 %150 = getelementptr inbounds nuw i8, ptr %149, i64 7024 @@ -3499,8 +3499,8 @@ define internal noundef range(i32 -22, 1) i32 @vlv_compute_pipe_wm(ptr noundef r br label %287 287: ; preds = %.thread14, %276 - %288 = phi i64 [ 0, %276 ], [ %308, %.thread14 ] - %289 = phi i32 [ %281, %276 ], [ %307, %.thread14 ] + %288 = phi i64 [ 0, %276 ], [ %308, %.thread17 ] + %289 = phi i32 [ %281, %276 ], [ %307, %.thread17 ] %290 = load i8, ptr %247, align 1 %291 = zext i8 %290 to i64 %292 = shl nuw nsw i64 1, %288 @@ -3576,7 +3576,7 @@ define internal noundef range(i32 -22, 1) i32 @vlv_compute_pipe_wm(ptr noundef r br i1 %329, label %343, label %.thread18, !prof !83 .thread18: ; preds = %.thread17, %328 - %330 = phi i32 [ %307, %328 ], [ 0, %.thread17 ] + %330 = phi i32 [ %307, %328 ], [ 0, %.thread20 ] tail call void asm sideeffect "975: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 975b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 975) #14, !srcloc !89 %331 = getelementptr inbounds nuw i8, ptr %223, i64 8 %332 = load ptr, ptr %331, align 8 @@ -3592,7 +3592,7 @@ define internal noundef range(i32 -22, 1) i32 @vlv_compute_pipe_wm(ptr noundef r br label %340 340: ; preds = %338, %.thread18 - %341 = phi ptr [ %339, %338 ], [ %336, %.thread18 ] + %341 = phi ptr [ %339, %338 ], [ %336, %.thread21 ] tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str, ptr noundef %333, ptr noundef %341, ptr noundef nonnull @.str.26) #14 tail call void asm sideeffect "976: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 976b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 976) #14, !srcloc !90 tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.2, i32 1519, i32 2313, i64 12) #14, !srcloc !91 @@ -3627,7 +3627,7 @@ define internal noundef range(i32 -22, 1) i32 @vlv_compute_pipe_wm(ptr noundef r br label %.thread19 .thread19: ; preds = %214, %354, %.loopexit21 - %356 = phi i32 [ %355, %354 ], [ 0, %.loopexit21 ], [ -22, %214 ] + %356 = phi i32 [ %355, %354 ], [ 0, %.loopexit24 ], [ -22, %214 ] ret i32 %356 } diff --git a/bench/linux/optimized/intel_display.ll b/bench/linux/optimized/intel_display.ll index 54d525dcf2c..227c4ab8db1 100644 --- a/bench/linux/optimized/intel_display.ll +++ b/bench/linux/optimized/intel_display.ll @@ -16080,16 +16080,15 @@ define dso_local range(i32 0, 5) i32 @intel_mode_valid_max_plane_size(ptr nounde br i1 %15, label %23, label %16 16: ; preds = %7 - %17 = select i1 %8, i32 4320, i32 4096 - %18 = getelementptr inbounds nuw i8, ptr %1, i64 14 - %19 = load i16, ptr %18, align 2 - %20 = zext i16 %19 to i32 - %21 = icmp samesign ult i32 %17, %20 - %22 = select i1 %21, i32 4, i32 0 - br label %23 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 14 + %18 = load i16, ptr %17, align 2 + %19 = select i1 %8, i16 4320, i16 4096 + %20 = icmp ult i16 %19, %18 + %21 = select i1 %20, i32 4, i32 0 + br label %22 23: ; preds = %16, %7, %3 - %24 = phi i32 [ 0, %3 ], [ 3, %7 ], [ %22, %16 ] + %24 = phi i32 [ 0, %3 ], [ 3, %7 ], [ %21, %16 ] ret i32 %24 } diff --git a/bench/linux/optimized/intel_fbc.ll b/bench/linux/optimized/intel_fbc.ll index 801f53a4e33..24e74cf6f8d 100644 --- a/bench/linux/optimized/intel_fbc.ll +++ b/bench/linux/optimized/intel_fbc.ll @@ -2479,7 +2479,7 @@ define internal fastcc zeroext i1 @intel_fbc_is_ok(ptr noundef readonly captures %2 = getelementptr inbounds nuw i8, ptr %0, i64 456 %3 = load ptr, ptr %2, align 8 %4 = icmp eq ptr %3, null - br i1 %4, label %5, label %95 + br i1 %4, label %5, label %94 5: ; preds = %1 %6 = load ptr, ptr %0, align 8 @@ -2494,7 +2494,7 @@ define internal fastcc zeroext i1 @intel_fbc_is_ok(ptr noundef readonly captures %13 = load i64, ptr %12, align 8 %14 = and i64 %13, 1 %15 = icmp eq i64 %14, 0 - br i1 %15, label %95, label %16 + br i1 %15, label %94, label %16 16: ; preds = %11 %17 = getelementptr inbounds nuw i8, ptr %0, i64 216 @@ -2502,13 +2502,13 @@ define internal fastcc zeroext i1 @intel_fbc_is_ok(ptr noundef readonly captures %19 = getelementptr inbounds nuw i8, ptr %18, i64 216 %20 = load ptr, ptr %19, align 8 %21 = icmp eq ptr %20, null - br i1 %21, label %95, label %22 + br i1 %21, label %94, label %22 22: ; preds = %16 %23 = getelementptr inbounds nuw i8, ptr %20, i64 200 %24 = load i32, ptr %23, align 8 %25 = icmp eq i32 %24, -1 - br i1 %25, label %95, label %26 + br i1 %25, label %94, label %26 26: ; preds = %22, %5 %27 = getelementptr inbounds nuw i8, ptr %6, i64 1352 @@ -2520,88 +2520,87 @@ define internal fastcc zeroext i1 @intel_fbc_is_ok(ptr noundef readonly captures %33 = getelementptr inbounds nuw i8, ptr %32, i64 6 %34 = load i8, ptr %33, align 2 %35 = icmp eq i8 %34, 2 - %36 = select i1 %35, i32 2, i32 1 - %37 = getelementptr inbounds nuw i8, ptr %28, i64 396 - %38 = load i8, ptr %37, align 4 - %39 = zext i8 %38 to i32 - %40 = icmp samesign ugt i32 %36, %39 - br i1 %40, label %95, label %41 - -41: ; preds = %26 - %42 = getelementptr inbounds nuw i8, ptr %0, i64 108 - %43 = getelementptr inbounds nuw i8, ptr %0, i64 120 - %44 = load i32, ptr %43, align 4 - %45 = getelementptr inbounds nuw i8, ptr %0, i64 112 - %46 = load i32, ptr %45, align 4 - %47 = sub i32 %44, %46 - %48 = ashr i32 %47, 16 - %49 = icmp eq i16 %9, 7 - br i1 %49, label %50, label %52 + %36 = getelementptr inbounds nuw i8, ptr %28, i64 396 + %37 = load i8, ptr %36, align 4 + %38 = select i1 %35, i8 2, i8 1 + %39 = icmp ugt i8 %38, %37 + br i1 %39, label %94, label %40 + +40: ; preds = %26 + %41 = getelementptr inbounds nuw i8, ptr %0, i64 108 + %42 = getelementptr inbounds nuw i8, ptr %0, i64 120 + %43 = load i32, ptr %42, align 4 + %44 = getelementptr inbounds nuw i8, ptr %0, i64 112 + %45 = load i32, ptr %44, align 4 + %46 = sub i32 %43, %45 + %47 = ashr i32 %46, 16 + %48 = icmp eq i16 %9, 7 + br i1 %48, label %49, label %51 -50: ; preds = %41 - %51 = tail call i32 @llvm.smin.i32(i32 %48, i32 2048) +50: ; preds = %40 + %51 = tail call i32 @llvm.smin.i32(i32 %47, i32 2048) br label %56 -52: ; preds = %41 +52: ; preds = %40 %53 = icmp ugt i16 %9, 7 br i1 %53, label %54, label %56 54: ; preds = %52 - %55 = tail call i32 @llvm.smin.i32(i32 %48, i32 2560) + %55 = tail call i32 @llvm.smin.i32(i32 %47, i32 2560) br label %56 56: ; preds = %54, %52, %50 - %57 = phi i32 [ %51, %50 ], [ %55, %54 ], [ %48, %52 ] + %57 = phi i32 [ %51, %49 ], [ %55, %53 ], [ %47, %51 ] %58 = getelementptr inbounds nuw i8, ptr %0, i64 308 %59 = load i32, ptr %58, align 4 %60 = getelementptr inbounds nuw i8, ptr %0, i64 196 %61 = load i32, ptr %60, align 4 %62 = and i32 %61, 10 %63 = icmp eq i32 %62, 0 - br i1 %63, label %64, label %67 + br i1 %63, label %64, label %66 64: ; preds = %56 %65 = zext i8 %34 to i32 %66 = udiv i32 %59, %65 - br label %67 - -67: ; preds = %64, %56 - %68 = phi i32 [ %59, %56 ], [ %66, %64 ] - %69 = shl i32 %68, 2 - br i1 %10, label %70, label %86 - -70: ; preds = %67 - %71 = add i32 %69, 511 - %72 = and i32 %71, -512 - %73 = getelementptr inbounds nuw i8, ptr %0, i64 116 - %74 = load i32, ptr %73, align 4 - %75 = load i32, ptr %42, align 4 - %76 = sub i32 %74, %75 - %77 = ashr i32 %76, 12 - %78 = lshr i32 %77, 2 - %79 = and i32 %78, 1073741820 - %80 = icmp ugt i16 %9, 10 - %81 = add nuw nsw i32 %79, 64 - %82 = select i1 %80, i32 %81, i32 %79 - %83 = add nuw nsw i32 %82, 511 - %84 = and i32 %83, 1073741312 - %85 = tail call i32 @llvm.umax.i32(i32 %72, i32 %84) - br label %86 - -86: ; preds = %70, %67 - %87 = phi i32 [ %85, %70 ], [ %69, %67 ] - %88 = mul i32 %87, %57 - %89 = zext i32 %88 to i64 - %90 = zext i8 %38 to i64 - %91 = getelementptr inbounds nuw i8, ptr %28, i64 56 - %92 = tail call i64 @i915_gem_stolen_node_size(ptr noundef nonnull %91) #12 - %93 = mul i64 %92, %90 - %94 = icmp uge i64 %93, %89 - br label %95 + br label %66 + +95: ; preds = %63, %56 + %96 = phi i32 [ %58, %55 ], [ %65, %63 ] + %68 = shl i32 %96, 2 + br i1 %10, label %69, label %85 -95: ; preds = %86, %26, %22, %16, %11, %1 - %96 = phi i1 [ false, %22 ], [ false, %1 ], [ false, %26 ], [ %94, %86 ], [ false, %16 ], [ false, %11 ] - ret i1 %96 +69: ; preds = %66 + %70 = add i32 %68, 511 + %71 = and i32 %70, -512 + %72 = getelementptr inbounds nuw i8, ptr %0, i64 116 + %73 = load i32, ptr %72, align 4 + %74 = load i32, ptr %41, align 4 + %75 = sub i32 %73, %74 + %76 = ashr i32 %75, 12 + %77 = lshr i32 %76, 2 + %78 = and i32 %77, 1073741820 + %79 = icmp ugt i16 %9, 10 + %80 = add nuw nsw i32 %78, 64 + %81 = select i1 %79, i32 %80, i32 %78 + %82 = add nuw nsw i32 %81, 511 + %83 = and i32 %82, 1073741312 + %84 = tail call i32 @llvm.umax.i32(i32 %71, i32 %83) + br label %85 + +85: ; preds = %69, %66 + %86 = phi i32 [ %84, %69 ], [ %68, %66 ] + %87 = mul i32 %86, %56 + %88 = zext i32 %87 to i64 + %89 = zext i8 %37 to i64 + %90 = getelementptr inbounds nuw i8, ptr %28, i64 56 + %91 = tail call i64 @i915_gem_stolen_node_size(ptr noundef nonnull %90) #12 + %92 = mul i64 %91, %89 + %93 = icmp uge i64 %92, %88 + br label %94 + +94: ; preds = %85, %26, %22, %16, %11, %1 + %95 = phi i1 [ false, %22 ], [ false, %1 ], [ false, %26 ], [ %93, %85 ], [ false, %16 ], [ false, %11 ] + ret i1 %95 } ; Function Attrs: fn_ret_thunk_extern mustprogress nofree norecurse nosync nounwind null_pointer_is_valid willreturn memory(read, inaccessiblemem: none) diff --git a/bench/linux/optimized/tcp_metrics.ll b/bench/linux/optimized/tcp_metrics.ll index 1b6094ff684..3621dc61496 100644 --- a/bench/linux/optimized/tcp_metrics.ll +++ b/bench/linux/optimized/tcp_metrics.ll @@ -409,7 +409,7 @@ define internal fastcc ptr @tcp_get_metrics(ptr noundef readonly captures(none) br label %40 40: ; preds = %31, %24, %8 - %41 = phi i64 [ 2, %8 ], [ 2, %24 ], [ 4, %31 ] + %41 = phi i64 [ 1, %8 ], [ 1, %24 ], [ 3, %31 ] %42 = phi i16 [ 2, %8 ], [ 2, %24 ], [ 10, %31 ] %43 = phi i32 [ %13, %8 ], [ %29, %24 ], [ %39, %31 ] %44 = load ptr, ptr %1, align 8 @@ -446,8 +446,8 @@ define internal fastcc ptr @tcp_get_metrics(ptr noundef readonly captures(none) %69 = load i32, ptr %68, align 4 %70 = icmp eq i32 %67, %69 %71 = add nuw nsw i64 %65, 1 - %72 = icmp ne i64 %71, %41 - %73 = select i1 %70, i1 %72, i1 false + %72 = icmp ne i64 %41, %65 + %73 = and i1 %72, %70 br i1 %73, label %.preheader60, label %74, !llvm.loop !6 74: ; preds = %.preheader60 @@ -468,8 +468,8 @@ define internal fastcc ptr @tcp_get_metrics(ptr noundef readonly captures(none) %84 = load i32, ptr %83, align 4 %85 = icmp eq i32 %82, %84 %86 = add nuw nsw i64 %80, 1 - %87 = icmp ne i64 %86, %41 - %88 = select i1 %85, i1 %87, i1 false + %87 = icmp ne i64 %41, %80 + %88 = and i1 %87, %85 br i1 %88, label %.preheader59, label %89, !llvm.loop !6 89: ; preds = %.preheader59 @@ -528,8 +528,8 @@ define internal fastcc ptr @tcp_get_metrics(ptr noundef readonly captures(none) %124 = load i32, ptr %123, align 4 %125 = icmp eq i32 %122, %124 %126 = add nuw nsw i64 %120, 1 - %127 = icmp ne i64 %126, %41 - %128 = select i1 %125, i1 %127, i1 false + %127 = icmp ne i64 %41, %120 + %128 = and i1 %127, %125 br i1 %128, label %.preheader57, label %129, !llvm.loop !6 129: ; preds = %.preheader57 @@ -550,8 +550,8 @@ define internal fastcc ptr @tcp_get_metrics(ptr noundef readonly captures(none) %139 = load i32, ptr %138, align 4 %140 = icmp eq i32 %137, %139 %141 = add nuw nsw i64 %135, 1 - %142 = icmp ne i64 %141, %41 - %143 = select i1 %140, i1 %142, i1 false + %142 = icmp ne i64 %41, %135 + %143 = and i1 %142, %140 br i1 %143, label %.preheader56, label %144, !llvm.loop !6 144: ; preds = %.preheader56 @@ -897,7 +897,7 @@ define dso_local noundef zeroext i1 @tcp_peer_is_proven(ptr noundef readonly cap 45: ; preds = %28 %46 = icmp eq i16 %10, 2 - %47 = select i1 %46, i64 2, i64 4 + %47 = select i1 %46, i64 1, i64 3 br label %48 48: ; preds = %83, %45 @@ -916,8 +916,8 @@ define dso_local noundef zeroext i1 @tcp_peer_is_proven(ptr noundef readonly cap %58 = load i32, ptr %57, align 4 %59 = icmp eq i32 %56, %58 %60 = add nuw nsw i64 %54, 1 - %61 = icmp ne i64 %60, %47 - %62 = select i1 %59, i1 %61, i1 false + %61 = icmp ne i64 %47, %54 + %62 = and i1 %61, %59 br i1 %62, label %.preheader17, label %63, !llvm.loop !6 63: ; preds = %.preheader17 @@ -938,8 +938,8 @@ define dso_local noundef zeroext i1 @tcp_peer_is_proven(ptr noundef readonly cap %73 = load i32, ptr %72, align 4 %74 = icmp eq i32 %71, %73 %75 = add nuw nsw i64 %69, 1 - %76 = icmp ne i64 %75, %47 - %77 = select i1 %74, i1 %76, i1 false + %76 = icmp ne i64 %47, %69 + %77 = and i1 %76, %74 br i1 %77, label %.preheader, label %78, !llvm.loop !6 78: ; preds = %.preheader @@ -1584,12 +1584,12 @@ define internal range(i32 -2147483648, 1) i32 @tcp_metrics_nl_cmd_get(ptr readno br i1 %88, label %.thread12, label %89 89: ; preds = %76 - %90 = select i1 %.not.not, i64 4, i64 2 + %90 = select i1 %.not.not, i64 3, i64 1 br i1 %64, label %.split.us.preheader, label %.split .split.us.preheader: ; preds = %89 %91 = icmp eq i16 %63, 2 - %92 = select i1 %91, i64 2, i64 4 + %92 = select i1 %91, i64 1, i64 3 br label %.split.us .split.us: ; preds = %.split.us.preheader, %127 @@ -1608,8 +1608,8 @@ define internal range(i32 -2147483648, 1) i32 @tcp_metrics_nl_cmd_get(ptr readno %102 = load i32, ptr %101, align 4 %103 = icmp eq i32 %100, %102 %104 = add nuw nsw i64 %98, 1 - %105 = icmp ne i64 %104, %90 - %106 = select i1 %103, i1 %105, i1 false + %105 = icmp ne i64 %90, %98 + %106 = and i1 %105, %103 br i1 %106, label %.preheader34, label %107, !llvm.loop !6 107: ; preds = %.preheader34 @@ -1630,8 +1630,8 @@ define internal range(i32 -2147483648, 1) i32 @tcp_metrics_nl_cmd_get(ptr readno %117 = load i32, ptr %116, align 4 %118 = icmp eq i32 %115, %117 %119 = add nuw nsw i64 %113, 1 - %120 = icmp ne i64 %119, %92 - %121 = select i1 %118, i1 %120, i1 false + %120 = icmp ne i64 %92, %113 + %121 = and i1 %120, %118 br i1 %121, label %.preheader, label %122, !llvm.loop !6 122: ; preds = %.preheader @@ -1664,8 +1664,8 @@ define internal range(i32 -2147483648, 1) i32 @tcp_metrics_nl_cmd_get(ptr readno %139 = load i32, ptr %138, align 4 %140 = icmp eq i32 %137, %139 %141 = add nuw nsw i64 %135, 1 - %142 = icmp ne i64 %141, %90 - %143 = select i1 %140, i1 %142, i1 false + %142 = icmp ne i64 %90, %135 + %143 = and i1 %142, %140 br i1 %143, label %.preheader35, label %144, !llvm.loop !6 144: ; preds = %.preheader35 @@ -2096,7 +2096,7 @@ define internal range(i32 -22, 1) i32 @tcp_metrics_nl_cmd_del(ptr readnone captu 142: ; preds = %.split.us %143 = icmp eq i16 %139, 2 - %144 = select i1 %143, i64 2, i64 4 + %144 = select i1 %143, i64 1, i64 3 br label %145 145: ; preds = %145, %142 @@ -2107,8 +2107,8 @@ define internal range(i32 -22, 1) i32 @tcp_metrics_nl_cmd_del(ptr readnone captu %150 = load i32, ptr %149, align 4 %151 = icmp eq i32 %148, %150 %152 = add nuw nsw i64 %146, 1 - %153 = icmp ne i64 %152, %144 - %154 = select i1 %151, i1 %153, i1 false + %153 = icmp ne i64 %144, %146 + %154 = and i1 %153, %151 br i1 %154, label %145, label %155, !llvm.loop !6 155: ; preds = %145 @@ -2124,7 +2124,7 @@ define internal range(i32 -22, 1) i32 @tcp_metrics_nl_cmd_del(ptr readnone captu 162: ; preds = %156 %163 = icmp eq i16 %159, 2 - %164 = select i1 %163, i64 2, i64 4 + %164 = select i1 %163, i64 1, i64 3 br label %165 165: ; preds = %165, %162 @@ -2135,8 +2135,8 @@ define internal range(i32 -22, 1) i32 @tcp_metrics_nl_cmd_del(ptr readnone captu %170 = load i32, ptr %169, align 4 %171 = icmp eq i32 %168, %170 %172 = add nuw nsw i64 %166, 1 - %173 = icmp ne i64 %172, %164 - %174 = select i1 %171, i1 %173, i1 false + %173 = icmp ne i64 %164, %166 + %174 = and i1 %173, %171 br i1 %174, label %165, label %175, !llvm.loop !6 175: ; preds = %165 @@ -2176,7 +2176,7 @@ define internal range(i32 -22, 1) i32 @tcp_metrics_nl_cmd_del(ptr readnone captu 196: ; preds = %.split %197 = icmp eq i16 %193, 2 - %198 = select i1 %197, i64 2, i64 4 + %198 = select i1 %197, i64 1, i64 3 br label %199 199: ; preds = %199, %196 @@ -2187,8 +2187,8 @@ define internal range(i32 -22, 1) i32 @tcp_metrics_nl_cmd_del(ptr readnone captu %204 = load i32, ptr %203, align 4 %205 = icmp eq i32 %202, %204 %206 = add nuw nsw i64 %200, 1 - %207 = icmp ne i64 %206, %198 - %208 = select i1 %205, i1 %207, i1 false + %207 = icmp ne i64 %198, %200 + %208 = and i1 %207, %205 br i1 %208, label %199, label %209, !llvm.loop !6 209: ; preds = %199 diff --git a/bench/llama.cpp/optimized/unicode.ll b/bench/llama.cpp/optimized/unicode.ll index 3cd35d44ca7..4d52366813e 100644 --- a/bench/llama.cpp/optimized/unicode.ll +++ b/bench/llama.cpp/optimized/unicode.ll @@ -15345,8 +15345,8 @@ _ZNKSt5ctypeIcE6narrowEcc.exit: ; preds = %8, %17, %22 store i64 0, ptr %77, align 8, !tbaa !13 %78 = load ptr, ptr %76, align 8, !tbaa !7 store i8 0, ptr %78, align 1, !tbaa !12 - %79 = select i1 %74, i32 2, i32 4 - %80 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %79 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %80 = select i1 %74, i32 1, i32 3 br label %83 81: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit @@ -15385,7 +15385,7 @@ _ZNKSt5ctypeIcE6narrowEcc.exit: ; preds = %8, %17, %22 %101 = load i64, ptr %77, align 8, !tbaa !13 %102 = add i64 %101, 1 %103 = load ptr, ptr %76, align 8, !tbaa !7 - %104 = icmp eq ptr %103, %80 + %104 = icmp eq ptr %103, %79 br i1 %104, label %105, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i 105: ; preds = %98 @@ -15394,7 +15394,7 @@ _ZNKSt5ctypeIcE6narrowEcc.exit: ; preds = %8, %17, %22 br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i: ; preds = %105, %98 - %107 = load i64, ptr %80, align 8 + %107 = load i64, ptr %79, align 8 %108 = select i1 %104, i64 15, i64 %107 %109 = icmp ugt i64 %102, %108 br i1 %109, label %110, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit @@ -15413,7 +15413,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit: ; preds = %_ZNKS %114 = getelementptr inbounds nuw i8, ptr %113, i64 %102 store i8 0, ptr %114, align 1, !tbaa !12 %115 = add nuw nsw i32 %.060, 1 - %exitcond.not = icmp eq i32 %115, %79 + %exitcond.not = icmp eq i32 %80, %.060 br i1 %exitcond.not, label %81, label %83, !llvm.loop !433 116: ; preds = %73 @@ -45523,8 +45523,8 @@ define linkonce_odr void @_ZNSt8__detail8_ScannerIwE18_M_eat_escape_ecmaEv(ptr n store i64 0, ptr %72, align 8, !tbaa !199 %73 = load ptr, ptr %71, align 8, !tbaa !206 store i32 0, ptr %73, align 4, !tbaa !201 - %74 = select i1 %69, i32 2, i32 4 - %75 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %74 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %75 = select i1 %69, i32 1, i32 3 br label %78 76: ; preds = %_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLEw.exit @@ -45561,7 +45561,7 @@ define linkonce_odr void @_ZNSt8__detail8_ScannerIwE18_M_eat_escape_ecmaEv(ptr n %95 = load i64, ptr %72, align 8, !tbaa !199 %96 = add i64 %95, 1 %97 = load ptr, ptr %71, align 8, !tbaa !206 - %98 = icmp eq ptr %97, %75 + %98 = icmp eq ptr %97, %74 br i1 %98, label %99, label %_ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE8capacityEv.exit.i.i 99: ; preds = %91 @@ -45570,7 +45570,7 @@ define linkonce_odr void @_ZNSt8__detail8_ScannerIwE18_M_eat_escape_ecmaEv(ptr n br label %_ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE8capacityEv.exit.i.i _ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE8capacityEv.exit.i.i: ; preds = %99, %91 - %101 = load i64, ptr %75, align 8 + %101 = load i64, ptr %74, align 8 %102 = select i1 %98, i64 3, i64 %101 %103 = icmp ugt i64 %96, %102 br i1 %103, label %104, label %_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLEw.exit @@ -45588,7 +45588,7 @@ _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLEw.exit: ; preds = %_ZNKS %107 = getelementptr inbounds nuw i32, ptr %105, i64 %96 store i32 0, ptr %107, align 4, !tbaa !201 %108 = add nuw nsw i32 %.051, 1 - %exitcond.not = icmp eq i32 %108, %74 + %exitcond.not = icmp eq i32 %75, %.051 br i1 %exitcond.not, label %76, label %78, !llvm.loop !1004 109: ; preds = %68 diff --git a/bench/llvm/optimized/Action.ll b/bench/llvm/optimized/Action.ll index 40ad0ba2f23..49054e99146 100644 --- a/bench/llvm/optimized/Action.ll +++ b/bench/llvm/optimized/Action.ll @@ -1287,33 +1287,32 @@ define dso_local noundef ptr @_ZNK5clang6driver13OffloadAction17getHostDependenc ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local noundef zeroext i1 @_ZNK5clang6driver13OffloadAction25hasSingleDeviceDependenceEb(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(136) %0, i1 noundef zeroext %1) local_unnamed_addr #7 align 2 { - br i1 %1, label %3, label %11 + br i1 %1, label %3, label %10 3: ; preds = %2 %4 = getelementptr inbounds nuw i8, ptr %0, i64 24 %5 = load i32, ptr %4, align 8, !tbaa !25 - %6 = zext i32 %5 to i64 - %7 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %8 = load ptr, ptr %7, align 8, !tbaa !51 - %.not2 = icmp eq ptr %8, null - %9 = select i1 %.not2, i64 1, i64 2 - %10 = icmp eq i64 %9, %6 - br label %18 - -11: ; preds = %2 - %12 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %13 = load ptr, ptr %12, align 8, !tbaa !51 - %.not = icmp eq ptr %13, null - br i1 %.not, label %14, label %18 - -14: ; preds = %11 - %15 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %16 = load i32, ptr %15, align 8, !tbaa !25 - %17 = icmp eq i32 %16, 1 - br label %18 - -18: ; preds = %11, %14, %3 - %.0 = phi i1 [ %10, %3 ], [ false, %11 ], [ %17, %14 ] + %6 = getelementptr inbounds nuw i8, ptr %0, i64 88 + %7 = load ptr, ptr %6, align 8, !tbaa !51 + %.not2 = icmp eq ptr %7, null + %8 = select i1 %.not2, i32 1, i32 2 + %9 = icmp eq i32 %8, %5 + br label %17 + +10: ; preds = %2 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 88 + %12 = load ptr, ptr %11, align 8, !tbaa !51 + %.not = icmp eq ptr %12, null + br i1 %.not, label %13, label %17 + +13: ; preds = %10 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %15 = load i32, ptr %14, align 8, !tbaa !25 + %16 = icmp eq i32 %15, 1 + br label %17 + +17: ; preds = %10, %13, %3 + %.0 = phi i1 [ %9, %3 ], [ false, %10 ], [ %16, %13 ] ret i1 %.0 } diff --git a/bench/llvm/optimized/CodeGenDAGPatterns.ll b/bench/llvm/optimized/CodeGenDAGPatterns.ll index 3af6c9e2b00..0bf98c19be8 100644 --- a/bench/llvm/optimized/CodeGenDAGPatterns.ll +++ b/bench/llvm/optimized/CodeGenDAGPatterns.ll @@ -46162,95 +46162,97 @@ _ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEED2Ev.exit338: ; preds = %_ZN4 br i1 %.not94, label %._crit_edge, label %.lr.ph, !llvm.loop !1291 506: ; preds = %_ZNK4llvm15TreePatternNode22isCommutativeIntrinsicERKNS_18CodeGenDAGPatternsE.exit - %507 = zext i1 %488 to i64 - %508 = select i1 %488, i64 3, i64 2 + %507 = zext i1 %488 to i32 + %508 = select i1 %488, i32 2, i32 1 br label %509 509: ; preds = %506, %527 - %indvars.iv358 = phi i64 [ %507, %506 ], [ %indvars.iv.next359, %527 ] - %.091356 = phi i1 [ true, %506 ], [ %.1, %527 ] + %indvars.iv358 = phi i1 [ true, %506 ], [ %.1, %528 ] + %.091356 = phi i32 [ %507, %506 ], [ %529, %528 ] %510 = load ptr, ptr %0, align 8, !tbaa !337 %511 = getelementptr inbounds nuw i8, ptr %510, i64 152 - %512 = load ptr, ptr %511, align 8, !tbaa !410 - %513 = getelementptr inbounds nuw %"class.llvm::IntrusiveRefCntPtr", ptr %512, i64 %indvars.iv358 - %514 = load ptr, ptr %513, align 8, !tbaa !337 - %515 = getelementptr inbounds nuw i8, ptr %514, i64 56 - %.0.copyload.i.i.i.i.i.i.i.i339 = load i64, ptr %515, align 8 - %516 = and i64 %.0.copyload.i.i.i.i.i.i.i.i339, 4 - %.not351 = icmp eq i64 %516, 0 - br i1 %.not351, label %527, label %517 - -517: ; preds = %509 - %518 = and i64 %.0.copyload.i.i.i.i.i.i.i.i339, -8 - %519 = inttoptr i64 %518 to ptr - %520 = getelementptr inbounds nuw i8, ptr %519, i64 8 - %521 = load i8, ptr %520, align 8, !tbaa !258 - %522 = icmp ne i8 %521, 5 - %.not96352 = icmp eq i64 %518, 0 - %.not96 = or i1 %.not96352, %522 - br i1 %.not96, label %527, label %523 - -523: ; preds = %517 - %524 = getelementptr inbounds nuw i8, ptr %519, i64 24 - %525 = load ptr, ptr %524, align 8, !tbaa !367 - %526 = call noundef zeroext i1 @_ZNK4llvm6Record12isSubClassOfENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(192) %525, ptr nonnull @.str.269, i64 8) - %not. = xor i1 %526, true + %512 = zext i32 %.092355 to i64 + %513 = load ptr, ptr %511, align 8, !tbaa !410 + %514 = getelementptr inbounds nuw %"class.llvm::IntrusiveRefCntPtr", ptr %513, i64 %512 + %515 = load ptr, ptr %514, align 8, !tbaa !337 + %516 = getelementptr inbounds nuw i8, ptr %515, i64 56 + %.0.copyload.i.i.i.i.i.i.i.i339 = load i64, ptr %516, align 8 + %517 = and i64 %.0.copyload.i.i.i.i.i.i.i.i339, 4 + %.not351 = icmp eq i64 %517, 0 + br i1 %.not351, label %528, label %518 + +518:; preds = %509 + %519 = and i64 %.0.copyload.i.i.i.i.i.i.i.i339, -8 + %520 = inttoptr i64 %519 to ptr + %521 = getelementptr inbounds nuw i8, ptr %520, i64 8 + %522 = load i8, ptr %521, align 8, !tbaa !258 + %.not96352 = icmp ne i8 %522, 5 + %.not96352 = icmp eq i64 %519, 0 + %.not96 = or i1 %.not96352, %523 + br i1 %.not96, label %528, label %524 + +524: ; preds = %518 + %525 = getelementptr inbounds nuw i8, ptr %520, i64 24 + %526 = load ptr, ptr %525, align 8, !tbaa !367 + %527 = call noundef zeroext i1 @_ZNK4llvm6Record12isSubClassOfENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(192) %526, ptr nonnull @.str.269, i64 8) + %not. = xor i1 %527, true %spec.select = select i1 %not., i1 %.091356, i1 false br label %527 -527: ; preds = %517, %523, %509 - %.1 = phi i1 [ %.091356, %509 ], [ %spec.select, %523 ], [ %.091356, %517 ] - %indvars.iv.next359 = add nuw nsw i64 %indvars.iv358, 1 - %.not95 = icmp eq i64 %indvars.iv.next359, %508 +527: ; preds = %518, %524, %509 + %.1 = phi i1 [ %.091356, %509 ], [ %spec.select, %524 ], [ %.091356, %518 ] + %indvars.iv.next359 = add i32 %.092355, 1 + %.not95 = icmp eq i32 %508, %.092355 br i1 %.not95, label %528, label %509, !llvm.loop !1292 528: ; preds = %527 br i1 %.1, label %529, label %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEED2Ev.exit345 529: ; preds = %528 - %530 = load ptr, ptr %37, align 8, !tbaa !486 - %531 = getelementptr inbounds nuw %"class.std::vector", ptr %530, i64 %507 - %532 = select i1 %488, i64 2, i64 1 - %533 = getelementptr inbounds nuw %"class.std::vector", ptr %530, i64 %532 - %534 = load ptr, ptr %531, align 8, !tbaa !410 - %535 = getelementptr inbounds nuw i8, ptr %531, i64 8 - %536 = load ptr, ptr %535, align 8, !tbaa !409 - %537 = getelementptr inbounds nuw i8, ptr %531, i64 16 - %538 = load ptr, ptr %537, align 8, !tbaa !475 - %539 = load ptr, ptr %533, align 8, !tbaa !410 - store ptr %539, ptr %531, align 8, !tbaa !410 - %540 = getelementptr inbounds nuw i8, ptr %533, i64 8 - %541 = load ptr, ptr %540, align 8, !tbaa !409 - store ptr %541, ptr %535, align 8, !tbaa !409 - %542 = getelementptr inbounds nuw i8, ptr %533, i64 16 - %543 = load ptr, ptr %542, align 8, !tbaa !475 - store ptr %543, ptr %537, align 8, !tbaa !475 - store ptr %534, ptr %533, align 8, !tbaa !410 - store ptr %536, ptr %540, align 8, !tbaa !409 - store ptr %538, ptr %542, align 8, !tbaa !475 - %544 = load ptr, ptr %0, align 8, !tbaa !337 - store ptr %544, ptr %40, align 8, !tbaa !337 - %.not.i.i341 = icmp eq ptr %544, null - br i1 %.not.i.i341, label %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEC2ERKS2_.exit342.thread, label %545 - -_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEC2ERKS2_.exit342.thread: ; preds = %529 + %532 = zext i1 %488 to i64 + %533 = load ptr, ptr %37, align 8, !tbaa !486 + %534 = getelementptr inbounds nuw %"class.std::vector", ptr %533, i64 %532 + %535 = select i1 %488, i64 2, i64 1 + %536 = getelementptr inbounds nuw %"class.std::vector", ptr %533, i64 %535 + %537 = load ptr, ptr %534, align 8, !tbaa !410 + %538 = getelementptr inbounds nuw i8, ptr %534, i64 8 + %539 = load ptr, ptr %538, align 8, !tbaa !409 + %540 = getelementptr inbounds nuw i8, ptr %534, i64 16 + %539 = load ptr, ptr %540, align 8, !tbaa !475 + %542 = load ptr, ptr %536, align 8, !tbaa !410 + store ptr %542, ptr %534, align 8, !tbaa !410 + %543 = getelementptr inbounds nuw i8, ptr %536, i64 8 + %544 = load ptr, ptr %543, align 8, !tbaa !409 + store ptr %544, ptr %538, align 8, !tbaa !409 + %545 = getelementptr inbounds nuw i8, ptr %536, i64 16 + %546 = load ptr, ptr %545, align 8, !tbaa !475 + store ptr %546, ptr %540, align 8, !tbaa !475 + store ptr %537, ptr %536, align 8, !tbaa !410 + store ptr %539, ptr %543, align 8, !tbaa !409 + store ptr %541, ptr %545, align 8, !tbaa !475 + %547 = load ptr, ptr %0, align 8, !tbaa !337 + store ptr %547, ptr %40, align 8, !tbaa !337 + %.not.i.i341 = icmp eq ptr %547, null + br i1 %.not.i.i341, label %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEC2ERKS2_.exit342.thread, label %548 + +_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEC2ERKS2_.exit342.thread: ; preds = %531 call fastcc void @_ZL20CombineChildVariantsN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEERKSt6vectorIS3_IS2_SaIS2_EESaIS5_EERS5_RNS_18CodeGenDAGPatternsERKNS_9StringSetINS_15MallocAllocatorEEE(ptr noundef %40, ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(1252) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) br label %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEED2Ev.exit345 545: ; preds = %529 - %546 = load i32, ptr %544, align 4, !tbaa !469 + %546 = load i32, ptr %547, align 4, !tbaa !469 %547 = add i32 %546, 1 - store i32 %547, ptr %544, align 4, !tbaa !469 + store i32 %547, ptr %547, align 4, !tbaa !469 call fastcc void @_ZL20CombineChildVariantsN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEERKSt6vectorIS3_IS2_SaIS2_EESaIS5_EERS5_RNS_18CodeGenDAGPatternsERKNS_9StringSetINS_15MallocAllocatorEEE(ptr noundef %40, ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(1252) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) - %548 = load i32, ptr %544, align 4, !tbaa !469 + %548 = load i32, ptr %547, align 4, !tbaa !469 %549 = add i32 %548, -1 - store i32 %549, ptr %544, align 4, !tbaa !469 + store i32 %549, ptr %547, align 4, !tbaa !469 %.not.i.i.i344 = icmp eq i32 %549, 0 br i1 %.not.i.i.i344, label %550, label %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEED2Ev.exit345 550: ; preds = %545 - call void @_ZN4llvm15TreePatternNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %544) #32 - call void @_ZdlPvm(ptr noundef nonnull align 4 dereferenceable(4) %544, i64 noundef 184) #36 + call void @_ZN4llvm15TreePatternNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %547) #32 + call void @_ZdlPvm(ptr noundef nonnull align 4 dereferenceable(4) %547, i64 noundef 184) #36 br label %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEED2Ev.exit345 _ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEED2Ev.exit345: ; preds = %550, %545, %_ZN4llvm18IntrusiveRefCntPtrINS_15TreePatternNodeEEC2ERKS2_.exit342.thread, %528, %_ZNK4llvm15TreePatternNode22isCommutativeIntrinsicERKNS_18CodeGenDAGPatternsE.exit diff --git a/bench/llvm/optimized/CombinerHelper.ll b/bench/llvm/optimized/CombinerHelper.ll index 8569e4e92dc..7246a0e048b 100644 --- a/bench/llvm/optimized/CombinerHelper.ll +++ b/bench/llvm/optimized/CombinerHelper.ll @@ -7792,8 +7792,6 @@ define dso_local noundef zeroext i1 @_ZNK4llvm14CombinerHelper18matchCombineDivR %11 = getelementptr inbounds nuw i8, ptr %10, i64 36 %12 = load i32, ptr %11, align 4, !tbaa !204 %.037 = select i1 %.032.in, i32 60, i32 61 - %.036 = select i1 %.032.in, i32 58, i32 59 - %.035 = select i1 %.032.in, i32 56, i32 57 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #30 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #30 %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -7889,6 +7887,8 @@ _ZNK4llvm14CombinerHelper24isLegalOrBeforeLegalizerERKNS_13LegalityQueryE.exit._ .lr.ph: ; preds = %52, %49 %.sroa.0.0.i.i = phi ptr [ %.0.i.i.i, %49 ], [ %storemerge.i.i.i.i, %52 ] %55 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %.03546 = select i1 %.032.in, i16 56, i16 57 + %.03647 = select i1 %.032.in, i16 58, i16 59 br i1 %switch, label %.lr.ph.split.us, label %.lr.ph.split .lr.ph.split.us: ; preds = %_ZN4llvm19MachineRegisterInfo26defusechain_instr_iteratorILb1ELb0ELb1ELb0ELb1ELb0EE7advanceEv.exit.i.us, %.lr.ph @@ -7904,9 +7904,8 @@ _ZNK4llvm14CombinerHelper24isLegalOrBeforeLegalizerERKNS_13LegalityQueryE.exit._ 62: ; preds = %.lr.ph.split.us %63 = getelementptr inbounds nuw i8, ptr %57, i64 68 %64 = load i16, ptr %63, align 4, !tbaa !228 - %65 = zext i16 %64 to i32 - %66 = icmp eq i32 %.036, %65 - br i1 %66, label %67, label %80 + %65 = icmp eq i16 %.03647, %64 + br i1 %65, label %66, label %79 67: ; preds = %62 %68 = load ptr, ptr %9, align 8, !tbaa !241 @@ -7930,7 +7929,7 @@ _ZNK4llvm14CombinerHelper24isLegalOrBeforeLegalizerERKNS_13LegalityQueryE.exit._ br label %.critedge2.i.i.us .critedge2.i.i.us: ; preds = %.critedge2.i.i.us.backedge, %80 - %.pn.i.i.us = phi ptr [ %.sroa.041.050.us, %80 ], [ %storemerge.i.i.us, %.critedge2.i.i.us.backedge ] + %.pn.i.i.us = phi ptr [ %.sroa.041.050.us, %79 ], [ %storemerge.i.i.us, %.critedge2.i.i.us.backedge ] %storemerge.in.i.i.us = getelementptr inbounds nuw i8, ptr %.pn.i.i.us, i64 24 %storemerge.i.i.us = load ptr, ptr %storemerge.in.i.i.us, align 8, !tbaa !204 %.not.i.i.us = icmp eq ptr %storemerge.i.i.us, null @@ -7964,38 +7963,37 @@ _ZN4llvm19MachineRegisterInfo26defusechain_instr_iteratorILb1ELb0ELb1ELb0ELb1ELb .critedge: ; preds = %.lr.ph.split %94 = getelementptr inbounds nuw i8, ptr %89, i64 68 %95 = load i16, ptr %94, align 4, !tbaa !228 - %96 = zext i16 %95 to i32 - %97 = icmp eq i32 %.035, %96 - br i1 %97, label %98, label %111 - -98: ; preds = %.critedge - %99 = load ptr, ptr %9, align 8, !tbaa !241 - %100 = getelementptr inbounds nuw i8, ptr %99, i64 64 - %101 = getelementptr inbounds nuw i8, ptr %89, i64 32 - %102 = load ptr, ptr %101, align 8, !tbaa !241 - %103 = getelementptr inbounds nuw i8, ptr %102, i64 64 - %104 = call noundef zeroext i1 @_ZNK4llvm14CombinerHelper14matchEqualDefsERKNS_14MachineOperandES3_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %100, ptr noundef nonnull align 8 dereferenceable(32) %103) - br i1 %104, label %105, label %111 - -105: ; preds = %98 - %106 = load ptr, ptr %9, align 8, !tbaa !241 + %95 = icmp eq i16 %.03546, %95 + br i1 %95, label %96, label %109 + +96: ; preds = %.critedge + %97 = load ptr, ptr %9, align 8, !tbaa !241 + %98 = getelementptr inbounds nuw i8, ptr %97, i64 64 + %100 = getelementptr inbounds nuw i8, ptr %89, i64 32 + %100 = load ptr, ptr %99, align 8, !tbaa !241 + %101 = getelementptr inbounds nuw i8, ptr %100, i64 64 + %102 = call noundef zeroext i1 @_ZNK4llvm14CombinerHelper14matchEqualDefsERKNS_14MachineOperandES3_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %98, ptr noundef nonnull align 8 dereferenceable(32) %101) + br i1 %102, label %103, label %109 + +103: ; preds = %96 + %104 = load ptr, ptr %9, align 8, !tbaa !241 + %105 = getelementptr inbounds nuw i8, ptr %104, i64 32 + %106 = load ptr, ptr %99, align 8, !tbaa !241 %107 = getelementptr inbounds nuw i8, ptr %106, i64 32 - %108 = load ptr, ptr %101, align 8, !tbaa !241 - %109 = getelementptr inbounds nuw i8, ptr %108, i64 32 - %110 = call noundef zeroext i1 @_ZNK4llvm14CombinerHelper14matchEqualDefsERKNS_14MachineOperandES3_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %107, ptr noundef nonnull align 8 dereferenceable(32) %109) - br i1 %110, label %.critedge39, label %111 + %108 = call noundef zeroext i1 @_ZNK4llvm14CombinerHelper14matchEqualDefsERKNS_14MachineOperandES3_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %105, ptr noundef nonnull align 8 dereferenceable(32) %107) + br i1 %108, label %.critedge39, label %109 -.critedge39: ; preds = %105, %74 - %.us-phi = phi ptr [ %57, %74 ], [ %89, %105 ] +.critedge39: ; preds = %103, %74 + %.us-phi = phi ptr [ %57, %73 ], [ %89, %103 ] store ptr %.us-phi, ptr %2, align 8, !tbaa !244 br label %.loopexit -111: ; preds = %105, %98, %.critedge, %.lr.ph.split +111: ; preds = %103, %96, %.critedge, %.lr.ph.split %112 = load ptr, ptr %88, align 8, !tbaa !220 br label %.critedge2.i.i .critedge2.i.i: ; preds = %.critedge2.i.i.backedge, %111 - %.pn.i.i = phi ptr [ %.sroa.041.050, %111 ], [ %storemerge.i.i, %.critedge2.i.i.backedge ] + %.pn.i.i = phi ptr [ %.sroa.041.050, %109 ], [ %storemerge.i.i, %.critedge2.i.i.backedge ] %storemerge.in.i.i = getelementptr inbounds nuw i8, ptr %.pn.i.i, i64 24 %storemerge.i.i = load ptr, ptr %storemerge.in.i.i, align 8, !tbaa !204 %.not.i.i = icmp eq ptr %storemerge.i.i, null diff --git a/bench/llvm/optimized/RISCVAsmPrinter.ll b/bench/llvm/optimized/RISCVAsmPrinter.ll index 55ebe2fc723..b3f0b647d84 100644 --- a/bench/llvm/optimized/RISCVAsmPrinter.ll +++ b/bench/llvm/optimized/RISCVAsmPrinter.ll @@ -9537,11 +9537,10 @@ _ZN12_GLOBAL__N_115RISCVAsmPrinter14EmitToStreamerERN4llvm10MCStreamerERKNS1_6MC _ZN4llvm13MCInstBuilderD2Ev.exit: ; preds = %_ZN12_GLOBAL__N_115RISCVAsmPrinter14EmitToStreamerERN4llvm10MCStreamerERKNS1_6MCInstE.exit, %56 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #17 - %57 = select i1 %16, i32 33, i32 21 - %58 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %59 = getelementptr inbounds nuw i8, ptr %7, i64 32 - %60 = getelementptr inbounds nuw i8, ptr %7, i64 24 - %61 = getelementptr inbounds nuw i8, ptr %7, i64 28 + %57 = getelementptr inbounds nuw i8, ptr %7, i64 16 + %58 = getelementptr inbounds nuw i8, ptr %7, i64 32 + %59 = getelementptr inbounds nuw i8, ptr %7, i64 24 + %60 = getelementptr inbounds nuw i8, ptr %7, i64 28 %.sroa.22.0..sroa_idx.i.i.i18 = getelementptr inbounds nuw i8, ptr %7, i64 40 %62 = getelementptr inbounds nuw i8, ptr %3, i64 16 %63 = getelementptr inbounds nuw i8, ptr %3, i64 32 @@ -9551,6 +9550,7 @@ _ZN4llvm13MCInstBuilderD2Ev.exit: ; preds = %_ZN12_GLOBAL__N_115 %.sroa.22.0..sroa_idx.i.i.i23 = getelementptr inbounds nuw i8, ptr %7, i64 56 %67 = getelementptr inbounds nuw i8, ptr %7, i64 64 %.sroa.22.0..sroa_idx.i.i.i27 = getelementptr inbounds nuw i8, ptr %7, i64 72 + %67 = select i1 %16, i8 32, i8 20 br label %_ZN4llvm13MCInstBuilder6addImmEl.exit 68: ; preds = %_ZN4llvm13MCInstBuilderD2Ev.exit30 @@ -9567,17 +9567,17 @@ _ZN4llvm13MCInstBuilder6addImmEl.exit: ; preds = %_ZN4llvm13MCInstBui %73 = load ptr, ptr %17, align 8, !tbaa !11 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #17 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %7, i8 0, i64 16, i1 false) - store ptr %59, ptr %58, align 8, !tbaa !257 - store i32 6, ptr %61, align 4, !tbaa !259 + store ptr %58, ptr %57, align 8, !tbaa !257 + store i32 6, ptr %60, align 4, !tbaa !259 store i32 11754, ptr %7, align 8, !tbaa !320 - store i8 1, ptr %59, align 8 + store i8 1, ptr %58, align 8 store i64 43, ptr %.sroa.22.0..sroa_idx.i.i.i18, align 8 store i8 1, ptr %66, align 8 store i64 43, ptr %.sroa.22.0..sroa_idx.i.i.i23, align 8 %.val.pre = load ptr, ptr %42, align 8, !tbaa !141 store i8 2, ptr %67, align 8 store i64 0, ptr %.sroa.22.0..sroa_idx.i.i.i27, align 8 - store i32 3, ptr %60, align 8, !tbaa !258 + store i32 3, ptr %59, align 8, !tbaa !258 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #17 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %3, i8 0, i64 16, i1 false) store ptr %63, ptr %62, align 8, !tbaa !257 @@ -9599,8 +9599,8 @@ _ZN4llvm13MCInstBuilder6addImmEl.exit: ; preds = %_ZN4llvm13MCInstBui _ZN12_GLOBAL__N_115RISCVAsmPrinter14EmitToStreamerERN4llvm10MCStreamerERKNS1_6MCInstE.exit29: ; preds = %_ZN4llvm13MCInstBuilder6addImmEl.exit, %80 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #17 - %81 = load ptr, ptr %58, align 8, !tbaa !257 - %82 = icmp eq ptr %81, %59 + %81 = load ptr, ptr %57, align 8, !tbaa !257 + %82 = icmp eq ptr %81, %58 br i1 %82, label %_ZN4llvm13MCInstBuilderD2Ev.exit30, label %83 83: ; preds = %_ZN12_GLOBAL__N_115RISCVAsmPrinter14EmitToStreamerERN4llvm10MCStreamerERKNS1_6MCInstE.exit29 @@ -9609,10 +9609,9 @@ _ZN12_GLOBAL__N_115RISCVAsmPrinter14EmitToStreamerERN4llvm10MCStreamerERKNS1_6MC _ZN4llvm13MCInstBuilderD2Ev.exit30: ; preds = %_ZN12_GLOBAL__N_115RISCVAsmPrinter14EmitToStreamerERN4llvm10MCStreamerERKNS1_6MCInstE.exit29, %83 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #17 - %84 = add i8 %.037, 1 - %85 = sext i8 %84 to i32 - %86 = icmp sgt i32 %57, %85 - br i1 %86, label %_ZN4llvm13MCInstBuilder6addImmEl.exit, label %68, !llvm.loop !841 + %84 = add nuw nsw i8 %.037, 1 + %exitcond.not = icmp eq i8 %67, %.037 + br i1 %exitcond.not, label %68, label %_ZN4llvm13MCInstBuilder6addImmEl.exit, !llvm.loop !841 } declare noundef ptr @_ZN4llvm9MCContext16createTempSymbolERKNS_5TwineEb(ptr noundef nonnull align 8 dereferenceable(2432), ptr noundef nonnull align 8 dereferenceable(34), i1 noundef zeroext) local_unnamed_addr #2 diff --git a/bench/llvm/optimized/WasmObjectFile.ll b/bench/llvm/optimized/WasmObjectFile.ll index 365e0753129..a416bbb2bd7 100644 --- a/bench/llvm/optimized/WasmObjectFile.ll +++ b/bench/llvm/optimized/WasmObjectFile.ll @@ -2662,8 +2662,8 @@ switch.early.test.i.i.i.i: ; preds = %317 .critedge.i.i.i.i: ; preds = %317 %319 = icmp slt i64 %.048.i.i.i.i, 0 - %320 = select i1 %319, i64 127, i64 0 - %.not57.i.i.i.i = icmp eq i64 %320, %315 + %320 = select i1 %319, i8 127, i8 0 + %.not57.i.i.i.i = icmp eq i8 %320, %314 br i1 %.not57.i.i.i.i, label %321, label %328 321: ; preds = %.critedge.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %312 @@ -2838,8 +2838,8 @@ switch.early.test.i.i.i.i149: ; preds = %384 .critedge.i.i.i.i146: ; preds = %384 %386 = icmp slt i64 %.048.i.i.i.i140, 0 - %387 = select i1 %386, i64 127, i64 0 - %.not57.i.i.i.i147 = icmp eq i64 %387, %382 + %387 = select i1 %386, i8 127, i8 0 + %.not57.i.i.i.i147 = icmp eq i8 %387, %381 br i1 %.not57.i.i.i.i147, label %388, label %395 388: ; preds = %.critedge.i.i.i.i146, %switch.early.test.i.i.i.i149, %switch.early.test.i.i.i.i149, %switch.early.test.i.i.i.i149, %switch.early.test.i.i.i.i149, %379 @@ -5211,8 +5211,8 @@ switch.early.test.i.i.i.i: ; preds = %119 .critedge.i.i.i.i: ; preds = %119 %121 = icmp slt i64 %.048.i.i.i.i, 0 - %122 = select i1 %121, i64 127, i64 0 - %.not57.i.i.i.i = icmp eq i64 %122, %117 + %122 = select i1 %121, i8 127, i8 0 + %.not57.i.i.i.i = icmp eq i8 %122, %116 br i1 %.not57.i.i.i.i, label %123, label %130 123: ; preds = %.critedge.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %114 @@ -6594,8 +6594,8 @@ switch.early.test.i.i.i.i: ; preds = %210 .critedge.i.i.i.i: ; preds = %210 %212 = icmp slt i64 %.048.i.i.i.i, 0 - %213 = select i1 %212, i64 127, i64 0 - %.not57.i.i.i.i = icmp eq i64 %213, %208 + %213 = select i1 %212, i8 127, i8 0 + %.not57.i.i.i.i = icmp eq i8 %213, %207 br i1 %.not57.i.i.i.i, label %214, label %221 214: ; preds = %.critedge.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %205 @@ -6766,8 +6766,8 @@ switch.early.test.i.i.i.i116: ; preds = %269 .critedge.i.i.i.i113: ; preds = %269 %271 = icmp slt i64 %.048.i.i.i.i107, 0 - %272 = select i1 %271, i64 127, i64 0 - %.not57.i.i.i.i114 = icmp eq i64 %272, %267 + %272 = select i1 %271, i8 127, i8 0 + %.not57.i.i.i.i114 = icmp eq i8 %272, %266 br i1 %.not57.i.i.i.i114, label %273, label %280 273: ; preds = %.critedge.i.i.i.i113, %switch.early.test.i.i.i.i116, %switch.early.test.i.i.i.i116, %switch.early.test.i.i.i.i116, %switch.early.test.i.i.i.i116, %264 @@ -17154,8 +17154,8 @@ switch.early.test.i.i.i: ; preds = %364 .critedge.i.i.i: ; preds = %364 %366 = icmp slt i64 %.048.i.i.i, 0 - %367 = select i1 %366, i64 127, i64 0 - %.not57.i.i.i = icmp eq i64 %367, %362 + %367 = select i1 %366, i8 127, i8 0 + %.not57.i.i.i = icmp eq i8 %367, %361 br i1 %.not57.i.i.i, label %368, label %375 368: ; preds = %.critedge.i.i.i, %switch.early.test.i.i.i, %switch.early.test.i.i.i, %switch.early.test.i.i.i, %switch.early.test.i.i.i, %359 @@ -17321,8 +17321,8 @@ switch.early.test.i.i.i160: ; preds = %438 .critedge.i.i.i157: ; preds = %438 %440 = icmp slt i64 %.048.i.i.i149, 0 - %441 = select i1 %440, i64 127, i64 0 - %.not57.i.i.i158 = icmp eq i64 %441, %436 + %441 = select i1 %440, i8 127, i8 0 + %.not57.i.i.i158 = icmp eq i8 %441, %435 br i1 %.not57.i.i.i158, label %442, label %449 442: ; preds = %.critedge.i.i.i157, %switch.early.test.i.i.i160, %switch.early.test.i.i.i160, %switch.early.test.i.i.i160, %switch.early.test.i.i.i160, %433 @@ -17775,8 +17775,8 @@ switch.early.test.i.i: ; preds = %13 .critedge.i.i: ; preds = %13 %15 = icmp slt i64 %.048.i.i, 0 - %16 = select i1 %15, i64 127, i64 0 - %.not57.i.i = icmp eq i64 %16, %11 + %16 = select i1 %15, i8 127, i8 0 + %.not57.i.i = icmp eq i8 %16, %10 br i1 %.not57.i.i, label %17, label %24 17: ; preds = %.critedge.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %8 @@ -18037,8 +18037,8 @@ switch.early.test.i.i.i.i: ; preds = %37 .critedge.i.i.i.i: ; preds = %37 %39 = icmp slt i64 %.048.i.i.i.i, 0 - %40 = select i1 %39, i64 127, i64 0 - %.not57.i.i.i.i = icmp eq i64 %40, %35 + %40 = select i1 %39, i8 127, i8 0 + %.not57.i.i.i.i = icmp eq i8 %40, %34 br i1 %.not57.i.i.i.i, label %41, label %48 41: ; preds = %.critedge.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %32 @@ -18157,8 +18157,8 @@ switch.early.test.i.i: ; preds = %13 .critedge.i.i: ; preds = %13 %15 = icmp slt i64 %.048.i.i, 0 - %16 = select i1 %15, i64 127, i64 0 - %.not57.i.i = icmp eq i64 %16, %11 + %16 = select i1 %15, i8 127, i8 0 + %.not57.i.i = icmp eq i8 %16, %10 br i1 %.not57.i.i, label %17, label %24 17: ; preds = %.critedge.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %switch.early.test.i.i, %8 @@ -18465,8 +18465,8 @@ switch.early.test.i.i.i.i: ; preds = %40 .critedge.i.i.i.i: ; preds = %40 %42 = icmp slt i64 %.048.i.i.i.i, 0 - %43 = select i1 %42, i64 127, i64 0 - %.not57.i.i.i.i = icmp eq i64 %43, %38 + %43 = select i1 %42, i8 127, i8 0 + %.not57.i.i.i.i = icmp eq i8 %43, %37 br i1 %.not57.i.i.i.i, label %44, label %51 44: ; preds = %.critedge.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %35 @@ -18587,8 +18587,8 @@ switch.early.test.i.i.i: ; preds = %20 .critedge.i.i.i: ; preds = %20 %22 = icmp slt i64 %.048.i.i.i, 0 - %23 = select i1 %22, i64 127, i64 0 - %.not57.i.i.i = icmp eq i64 %23, %18 + %23 = select i1 %22, i8 127, i8 0 + %.not57.i.i.i = icmp eq i8 %23, %17 br i1 %.not57.i.i.i, label %24, label %31 24: ; preds = %.critedge.i.i.i, %switch.early.test.i.i.i, %switch.early.test.i.i.i, %switch.early.test.i.i.i, %switch.early.test.i.i.i, %15 @@ -18797,8 +18797,8 @@ switch.early.test.i.i.i.i: ; preds = %103 .critedge.i.i.i.i: ; preds = %103 %105 = icmp slt i64 %.048.i.i.i.i, 0 - %106 = select i1 %105, i64 127, i64 0 - %.not57.i.i.i.i = icmp eq i64 %106, %101 + %106 = select i1 %105, i8 127, i8 0 + %.not57.i.i.i.i = icmp eq i8 %106, %100 br i1 %.not57.i.i.i.i, label %107, label %114 107: ; preds = %.critedge.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %switch.early.test.i.i.i.i, %98 diff --git a/bench/llvm/optimized/X86ISelLoweringCall.ll b/bench/llvm/optimized/X86ISelLoweringCall.ll index ba5545c2f0a..a41600b6633 100644 --- a/bench/llvm/optimized/X86ISelLoweringCall.ll +++ b/bench/llvm/optimized/X86ISelLoweringCall.ll @@ -13936,58 +13936,61 @@ _ZN4llvm3isaINS_19GlobalAddressSDNodeENS_7SDValueEEEbRKT0_.exit: ; preds = %191 br i1 %186, label %197, label %.loopexit 197: ; preds = %196, %_ZN4llvm3isaINS_19GlobalAddressSDNodeENS_7SDValueEEEbRKT0_.exit - %198 = select i1 %186, i32 2, i32 3 - %199 = load ptr, ptr %3, align 8, !tbaa !582 - %200 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %201 = load i32, ptr %200, align 8, !tbaa !584 - %202 = zext i32 %201 to i64 - %.idx298 = shl nuw nsw i64 %202, 5 - %203 = getelementptr inbounds nuw i8, ptr %199, i64 %.idx298 - %.not221292 = icmp eq i32 %201, 0 + %198 = load ptr, ptr %3, align 8, !tbaa !582 + %199 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %200 = load i32, ptr %199, align 8, !tbaa !584 + %201 = zext i32 %200 to i64 + %.idx298 = shl nuw nsw i64 %201, 5 + %202 = getelementptr inbounds nuw i8, ptr %198, i64 %.idx298 + %.not221292 = icmp eq i32 %200, 0 br i1 %.not221292, label %.loopexit, label %.lr.ph295 -.lr.ph295: ; preds = %197, %221 - %.0203294 = phi ptr [ %222, %221 ], [ %199, %197 ] - %.0205293 = phi i32 [ %.1206.ph, %221 ], [ 0, %197 ] - %204 = getelementptr inbounds nuw i8, ptr %.0203294, i64 8 - %205 = load i8, ptr %204, align 8, !tbaa !621 - br label %206 - -206: ; preds = %212, %.lr.ph295 - %.0813.i.i.i249 = phi i64 [ 0, %.lr.ph295 ], [ %213, %212 ] - %.0912.i.i.i250 = phi i64 [ 3, %.lr.ph295 ], [ %.1.i.i.i251, %212 ] - %207 = getelementptr inbounds nuw [3 x i8], ptr @__const._ZSt24__find_uniq_type_in_packIN4llvm8RegisterEJS1_ljEEmv.__found, i64 0, i64 %.0813.i.i.i249 - %208 = load i8, ptr %207, align 1, !tbaa !740, !range !153, !noundef !154 - %209 = trunc nuw i8 %208 to i1 - br i1 %209, label %210, label %212 - -210: ; preds = %206 - %211 = icmp samesign ult i64 %.0912.i.i.i250, 3 - br i1 %211, label %_ZNK4llvm11CCValAssign8isRegLocEv.exit254, label %212 - -212: ; preds = %210, %206 - %.1.i.i.i251 = phi i64 [ %.0912.i.i.i250, %206 ], [ %.0813.i.i.i249, %210 ] - %213 = add nuw nsw i64 %.0813.i.i.i249, 1 - %exitcond.i.i.i252 = icmp eq i64 %213, 3 - br i1 %exitcond.i.i.i252, label %_ZNK4llvm11CCValAssign8isRegLocEv.exit254, label %206, !llvm.loop !741 - -_ZNK4llvm11CCValAssign8isRegLocEv.exit254: ; preds = %210, %212 - %spec.select.i.i.i253 = phi i64 [ 3, %210 ], [ %.1.i.i.i251, %212 ] - %214 = zext i8 %205 to i64 - %215 = icmp eq i64 %spec.select.i.i.i253, %214 - br i1 %215, label %216, label %221 - -216: ; preds = %_ZNK4llvm11CCValAssign8isRegLocEv.exit254 - %.not.i.i.i255 = icmp eq i8 %205, 0 - br i1 %.not.i.i.i255, label %_ZNK4llvm11CCValAssign9getLocRegEv.exit257, label %217 - -217: ; preds = %216 +.lr.ph295: ; preds = %197 + %203 = select i1 %186, i32 1, i32 2 + br label %204 + +204:; preds = %.lr.ph295, %221 + %.0203294 = phi ptr [ %198, %.lr.ph295 ], [ %223, %222 ] + %.0205293 = phi i32 [ 0, %.lr.ph295 ], [ %.1206.ph, %222 ] + %205 = getelementptr inbounds nuw i8, ptr %.0203294, i64 8 + %206 = load i8, ptr %205, align 8, !tbaa !621 + br label %207 + +207:; preds = %213, %204 + %.0813.i.i.i249 = phi i64 [ 0, %204 ], [ %214, %213 ] + %.0912.i.i.i250 = phi i64 [ 3, %204 ], [ %.1.i.i.i251, %213 ] + %208 = getelementptr inbounds nuw [3 x i8], ptr @__const._ZSt24__find_uniq_type_in_packIN4llvm8RegisterEJS1_ljEEmv.__found, i64 0, i64 %.0813.i.i.i249 + %209 = load i8, ptr %208, align 1, !tbaa !740, !range !153, !noundef !154 + %210 = trunc nuw i8 %209 to i1 + br i1 %210, label %211, label %213 + +212: ; preds = %207 + %212 = icmp samesign ult i64 %.0912.i.i.i250, 3 + br i1 %212, label %_ZNK4llvm11CCValAssign8isRegLocEv.exit254, label %213 + +213:; preds = %211, %207 + %.1.i.i.i251 = phi i64 [ %.0912.i.i.i250, %207 ], [ %.0813.i.i.i249, %211 ] + %214 = add nuw nsw i64 %.0813.i.i.i249, 1 + %exitcond.i.i.i252 = icmp eq i64 %214, 3 + br i1 %exitcond.i.i.i252, label %_ZNK4llvm11CCValAssign8isRegLocEv.exit254, label %207, !llvm.loop !741 + +_ZNK4llvm11CCValAssign8isRegLocEv.exit254:; preds = %211, %213 + %spec.select.i.i.i253 = phi i64 [ 3, %211 ], [ %.1.i.i.i251, %213 ] + %215 = zext i8 %206 to i64 + %.not.i.i.i255 = icmp eq i64 %spec.select.i.i.i253, %215 + br i1 %.not.i.i.i255, label %217, label %221 + +217: ; preds = %_ZNK4llvm11CCValAssign8isRegLocEv.exit254 + %.not.i.i.i255 = icmp eq i8 %206, 0 + br i1 %.not.i.i.i255, label %_ZNK4llvm11CCValAssign9getLocRegEv.exit257, label %218 + +218: ; preds = %217 call void @abort() #25 unreachable -_ZNK4llvm11CCValAssign9getLocRegEv.exit257: ; preds = %216 +_ZNK4llvm11CCValAssign9getLocRegEv.exit257: ; preds = %217 %.sroa.0.0.copyload.i256 = load i32, ptr %.0203294, align 4, !tbaa !163 - switch i32 %.sroa.0.0.copyload.i256, label %221 [ + switch i32 %.sroa.0.0.copyload.i256, label %222 [ i32 22, label %218 i32 27, label %218 i32 25, label %218 @@ -13995,14 +13998,14 @@ _ZNK4llvm11CCValAssign9getLocRegEv.exit257: ; preds = %216 218: ; preds = %_ZNK4llvm11CCValAssign9getLocRegEv.exit257, %_ZNK4llvm11CCValAssign9getLocRegEv.exit257, %_ZNK4llvm11CCValAssign9getLocRegEv.exit257 %219 = add i32 %.0205293, 1 - %220 = icmp eq i32 %219, %198 + %220 = icmp eq i32 %203, %.0205293 br i1 %220, label %.critedge235, label %221 221: ; preds = %_ZNK4llvm11CCValAssign8isRegLocEv.exit254, %_ZNK4llvm11CCValAssign9getLocRegEv.exit257, %218 - %.1206.ph = phi i32 [ %219, %218 ], [ %.0205293, %_ZNK4llvm11CCValAssign9getLocRegEv.exit257 ], [ %.0205293, %_ZNK4llvm11CCValAssign8isRegLocEv.exit254 ] + %.1206.ph = phi i32 [ %219, %219 ], [ %.0205293, %_ZNK4llvm11CCValAssign9getLocRegEv.exit257 ], [ %.0205293, %_ZNK4llvm11CCValAssign8isRegLocEv.exit254 ] %222 = getelementptr inbounds nuw i8, ptr %.0203294, i64 32 - %.not221 = icmp eq ptr %222, %203 - br i1 %.not221, label %.loopexit, label %.lr.ph295 + %.not221 = icmp eq ptr %222, %202 + br i1 %.not221, label %.loopexit, label %204 .loopexit: ; preds = %221, %197, %_ZN4llvm3isaINS_19GlobalAddressSDNodeENS_7SDValueEEEbRKT0_.exit, %196, %.critedge233 %223 = getelementptr inbounds nuw i8, ptr %23, i64 32 @@ -14042,7 +14045,7 @@ _ZNK4llvm11CCValAssign9getLocRegEv.exit257: ; preds = %216 br label %.critedge235 .critedge235: ; preds = %_ZNK4llvm11CCValAssign8isRegLocEv.exit, %_ZNK4llvm11CCValAssign15getLocMemOffsetEv.exit, %.lr.ph291, %218, %_ZN4llvm11SmallVectorINS_11CCValAssignELj16EED2Ev.exit, %246, %241, %244, %_ZNK4llvm18TargetRegisterInfo19hasStackRealignmentERKNS_15MachineFunctionE.exit.thread, %34, %_ZNK4llvm18TargetRegisterInfo19hasStackRealignmentERKNS_15MachineFunctionE.exit, %.critedge276, %.loopexit, %139, %136, %81, %_ZL15canGuaranteeTCOj.exit, %41, %5 - %.0 = phi i1 [ false, %5 ], [ false, %34 ], [ false, %41 ], [ %or.cond18, %_ZL15canGuaranteeTCOj.exit ], [ false, %_ZNK4llvm18TargetRegisterInfo19hasStackRealignmentERKNS_15MachineFunctionE.exit ], [ false, %_ZNK4llvm18TargetRegisterInfo19hasStackRealignmentERKNS_15MachineFunctionE.exit.thread ], [ false, %81 ], [ false, %_ZN4llvm11SmallVectorINS_11CCValAssignELj16EED2Ev.exit ], [ false, %.critedge276 ], [ false, %136 ], [ false, %139 ], [ false, %.loopexit ], [ true, %246 ], [ false, %241 ], [ false, %244 ], [ false, %218 ], [ false, %.lr.ph291 ], [ false, %_ZNK4llvm11CCValAssign15getLocMemOffsetEv.exit ], [ false, %_ZNK4llvm11CCValAssign8isRegLocEv.exit ] + %.0 = phi i1 [ false, %5 ], [ false, %34 ], [ false, %41 ], [ %or.cond18, %_ZL15canGuaranteeTCOj.exit ], [ false, %_ZNK4llvm18TargetRegisterInfo19hasStackRealignmentERKNS_15MachineFunctionE.exit ], [ false, %_ZNK4llvm18TargetRegisterInfo19hasStackRealignmentERKNS_15MachineFunctionE.exit.thread ], [ false, %81 ], [ false, %_ZN4llvm11SmallVectorINS_11CCValAssignELj16EED2Ev.exit ], [ false, %.critedge276 ], [ false, %136 ], [ false, %139 ], [ false, %.loopexit ], [ true, %247 ], [ false, %242 ], [ false, %245 ], [ false, %219 ], [ false, %.lr.ph291 ], [ false, %_ZNK4llvm11CCValAssign15getLocMemOffsetEv.exit ], [ false, %_ZNK4llvm11CCValAssign8isRegLocEv.exit ] ret i1 %.0 } diff --git a/bench/llvm/optimized/X86InstrInfo.ll b/bench/llvm/optimized/X86InstrInfo.ll index 03c6a7cfc28..5cfc1fedf20 100644 --- a/bench/llvm/optimized/X86InstrInfo.ll +++ b/bench/llvm/optimized/X86InstrInfo.ll @@ -13356,50 +13356,49 @@ _ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit: ; preds = %80 = getelementptr inbounds nuw i8, ptr %79, i64 477 %81 = load i8, ptr %80, align 1, !tbaa !88, !range !68, !noundef !69 %82 = trunc nuw i8 %81 to i1 - %83 = select i1 %82, i32 5016, i32 5011 - %84 = getelementptr inbounds nuw i8, ptr %.sroa.072.093, i64 68 - %85 = load i16, ptr %84, align 4, !tbaa !221 - %86 = zext i16 %85 to i32 - %87 = icmp eq i32 %83, %86 - br i1 %87, label %88, label %.thread80 - -88: ; preds = %.loopexit - %89 = getelementptr inbounds nuw i8, ptr %.sroa.072.093, i64 40 - %90 = load i24, ptr %89, align 8 - %91 = icmp eq i24 %90, 3 - br i1 %91, label %92, label %.thread80 - -92: ; preds = %88 - %93 = getelementptr inbounds nuw i8, ptr %.sroa.072.093, i64 32 - %94 = load ptr, ptr %93, align 8, !tbaa !239 - %95 = getelementptr inbounds nuw i8, ptr %94, i64 32 - %96 = call noundef zeroext i1 @_ZNK4llvm14MachineOperand13isIdenticalToERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %94, ptr noundef nonnull align 8 dereferenceable(32) %95) #32 - br i1 %96, label %97, label %.thread80 - -97: ; preds = %92 - %98 = load ptr, ptr %5, align 8, !tbaa !45 - %99 = getelementptr inbounds nuw i8, ptr %98, i64 16 - %100 = load i64, ptr %99, align 8, !tbaa !240 - %101 = and i64 %100, -2 - %switch = icmp eq i64 %101, 4 - br i1 %switch, label %102, label %.thread80 - -102: ; preds = %97 - %103 = load ptr, ptr %93, align 8, !tbaa !239 - %104 = getelementptr inbounds nuw i8, ptr %2, i64 8 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %104, ptr noundef nonnull align 8 dereferenceable(32) %103, i64 32, i1 false), !tbaa.struct !418 - %105 = getelementptr inbounds nuw i8, ptr %2, i64 40 - store i32 1, ptr %105, align 8, !tbaa !240 + %83 = getelementptr inbounds nuw i8, ptr %.sroa.072.093, i64 68 + %84 = load i16, ptr %83, align 4, !tbaa !221 + %85 = select i1 %82, i16 5016, i16 5011 + %86 = icmp eq i16 %85, %84 + br i1 %86, label %87, label %.thread80 + +87: ; preds = %.loopexit + %88 = getelementptr inbounds nuw i8, ptr %.sroa.072.093, i64 40 + %89 = load i24, ptr %88, align 8 + %90 = icmp eq i24 %89, 3 + br i1 %90, label %91, label %.thread80 + +91: ; preds = %87 + %92 = getelementptr inbounds nuw i8, ptr %.sroa.072.093, i64 32 + %93 = load ptr, ptr %92, align 8, !tbaa !239 + %94 = getelementptr inbounds nuw i8, ptr %93, i64 32 + %95 = call noundef zeroext i1 @_ZNK4llvm14MachineOperand13isIdenticalToERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %93, ptr noundef nonnull align 8 dereferenceable(32) %94) #32 + br i1 %95, label %96, label %.thread80 + +96: ; preds = %91 + %97 = load ptr, ptr %5, align 8, !tbaa !45 + %98 = getelementptr inbounds nuw i8, ptr %97, i64 16 + %99 = load i64, ptr %98, align 8, !tbaa !240 + %100 = and i64 %99, -2 + %switch = icmp eq i64 %100, 4 + br i1 %switch, label %101, label %.thread80 + +92: ; preds = %96 + %102 = load ptr, ptr %92, align 8, !tbaa !239 + %103 = getelementptr inbounds nuw i8, ptr %2, i64 8 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %103, ptr noundef nonnull align 8 dereferenceable(32) %102, i64 32, i1 false), !tbaa.struct !418 + %104 = getelementptr inbounds nuw i8, ptr %2, i64 40 + store i32 1, ptr %104, align 8, !tbaa !240 %.sroa.566.0..sroa_idx = getelementptr inbounds nuw i8, ptr %2, i64 48 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %.sroa.566.0..sroa_idx, i8 0, i64 16, i1 false) - %106 = load i64, ptr %99, align 8, !tbaa !240 + %106 = load i64, ptr %98, align 8, !tbaa !240 %107 = icmp eq i64 %106, 5 %108 = zext i1 %107 to i32 store i32 %108, ptr %2, align 8, !tbaa !824 br label %.thread80 -.thread80: ; preds = %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit.i.i.i.i, %97, %.loopexit, %88, %92, %102, %4 - %.0 = phi i1 [ true, %4 ], [ false, %102 ], [ true, %92 ], [ true, %88 ], [ true, %.loopexit ], [ true, %97 ], [ true, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit.i.i.i.i ], [ true, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit ] +.thread80: ; preds = %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit.i.i.i.i, %96, %.loopexit, %87, %91, %101, %4 + %.0 = phi i1 [ true, %4 ], [ false, %101 ], [ true, %91 ], [ true, %87 ], [ true, %.loopexit ], [ true, %96 ], [ true, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit.i.i.i.i ], [ true, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb1EEppEv.exit ] %109 = load ptr, ptr %6, align 8, !tbaa !45 %110 = icmp eq ptr %109, %10 br i1 %110, label %_ZN4llvm11SmallVectorIPNS_12MachineInstrELj4EED2Ev.exit, label %111 diff --git a/bench/llvm/optimized/X86ReturnThunks.ll b/bench/llvm/optimized/X86ReturnThunks.ll index b8bee2e2677..d8a423c66a8 100644 --- a/bench/llvm/optimized/X86ReturnThunks.ll +++ b/bench/llvm/optimized/X86ReturnThunks.ll @@ -239,8 +239,6 @@ _ZN4llvmeqENS_9StringRefES0_.exit.thread63: ; preds = %11, %_ZN4llvmeqENS_ %18 = load ptr, ptr %17, align 8, !tbaa !144 %19 = getelementptr inbounds nuw i8, ptr %18, i64 552 %20 = load i32, ptr %19, align 8, !tbaa !145 - %21 = icmp eq i32 %20, 38 - %22 = select i1 %21, i32 3739, i32 3738 call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #13 %23 = getelementptr inbounds nuw i8, ptr %4, i64 16 store ptr %23, ptr %4, align 8, !tbaa !155 @@ -254,6 +252,11 @@ _ZN4llvmeqENS_9StringRefES0_.exit.thread63: ; preds = %11, %_ZN4llvmeqENS_ %.not6873 = icmp eq ptr %.sroa.058.072, %27 br i1 %.not6873, label %._crit_edge76, label %.lr.ph75 +.lr.ph75: ; preds = %_ZN4llvmeqENS_9StringRefES0_.exit.thread63 + %26 = icmp eq i32 %20, 38 + %27 = select i1 %26, i16 3739, i16 3738 + br label %46 + ._crit_edge76: ; preds = %._crit_edge, %_ZN4llvmeqENS_9StringRefES0_.exit.thread63 %28 = load ptr, ptr %1, align 8, !tbaa !28 %29 = getelementptr inbounds nuw i8, ptr %28, i64 40 @@ -281,8 +284,8 @@ _ZN4llvmeqENS_9StringRefES0_.exit.thread63: ; preds = %11, %_ZN4llvmeqENS_ %45 = getelementptr inbounds nuw i8, ptr %3, i64 24 br label %81 -.lr.ph75: ; preds = %_ZN4llvmeqENS_9StringRefES0_.exit.thread63, %._crit_edge - %.sroa.058.074 = phi ptr [ %.sroa.058.0, %._crit_edge ], [ %.sroa.058.072, %_ZN4llvmeqENS_9StringRefES0_.exit.thread63 ] +.lr.ph75: ; preds = %.lr.ph75, %._crit_edge + %.sroa.058.074 = phi ptr [ %.sroa.058.072, %.lr.ph75 ], [ %.sroa.058.0, %._crit_edge ] %46 = call ptr @_ZN4llvm17MachineBasicBlock18getFirstTerminatorEv(ptr noundef nonnull align 8 dereferenceable(288) %.sroa.058.074) #13 %47 = getelementptr inbounds nuw i8, ptr %.sroa.058.074, i64 48 %.not6970 = icmp eq ptr %46, %47 @@ -295,11 +298,10 @@ _ZN4llvmeqENS_9StringRefES0_.exit.thread63: ; preds = %11, %_ZN4llvmeqENS_ br i1 %.not68, label %._crit_edge76, label %.lr.ph75 .lr.ph: ; preds = %.lr.ph75, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit - %.sroa.053.071 = phi ptr [ %77, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit ], [ %46, %.lr.ph75 ] + %.sroa.053.071 = phi ptr [ %77, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit ], [ %.lr.ph75, %46 ] %49 = getelementptr inbounds nuw i8, ptr %.sroa.053.071, i64 68 %50 = load i16, ptr %49, align 4, !tbaa !171 - %51 = zext i16 %50 to i32 - %52 = icmp eq i32 %22, %51 + %52 = icmp eq i16 %27, %50 br i1 %52, label %53, label %66 53: ; preds = %.lr.ph diff --git a/bench/lua/optimized/lstrlib.ll b/bench/lua/optimized/lstrlib.ll index b0a57bc684b..d57b19fa3b3 100644 --- a/bench/lua/optimized/lstrlib.ll +++ b/bench/lua/optimized/lstrlib.ll @@ -2731,7 +2731,7 @@ copywithendian.exit75: ; preds = %.preheader93, %69 br label %.lr.ph46.split.us.i .lr.ph46.split.us.i: ; preds = %111, %.lr.ph46.split.us.preheader.i - %indvars.iv57.i = phi i64 [ 8, %.lr.ph46.split.us.preheader.i ], [ %indvars.iv.next58.i, %111 ] + %indvars.iv57.i = phi i64 [ 8, %.lr.ph48.split.us.preheader.i ], [ %indvars.iv.next58.i, %111 ] %104 = xor i64 %indvars.iv57.i, -1 %105 = add i64 %36, %104 %sext80 = shl i64 %105, 32 @@ -2751,7 +2751,7 @@ copywithendian.exit75: ; preds = %.preheader93, %69 br i1 %exitcond.not, label %unpackint.exit, label %.lr.ph46.split.us.i .lr.ph46.split.i: ; preds = %116, %.lr.ph46.split.preheader.i - %indvars.iv53.i = phi i64 [ %102, %.lr.ph46.split.preheader.i ], [ %indvars.iv.next54.i, %116 ] + %indvars.iv53.i = phi i64 [ %102, %.lr.ph48.split.preheader.i ], [ %indvars.iv.next54.i, %116 ] %112 = getelementptr inbounds nuw i8, ptr %81, i64 %indvars.iv53.i %113 = load i8, ptr %112, align 1, !tbaa !9 %.not39.i = icmp eq i8 %113, 0 @@ -4961,62 +4961,60 @@ define internal fastcc i64 @unpackint(ptr noundef %0, ptr noundef readonly captu br i1 %.not, label %.loopexit, label %.lr.ph46 .lr.ph46: ; preds = %33 - %.not37 = icmp eq i32 %4, 0 - %34 = icmp sgt i64 %.0.lcssa, -1 - %35 = select i1 %.not37, i1 true, i1 %34 - %36 = select i1 %35, i32 0, i32 255 + %.not37 = icmp ne i32 %4, 0 + %34 = icmp slt i64 %.0.lcssa, 0 + %35 = select i1 %.not37, i1 %34, i1 false %.not38 = icmp eq i32 %2, 0 - br i1 %.not38, label %.lr.ph46.split.us.preheader, label %.lr.ph46.split.preheader - -.lr.ph46.split.preheader: ; preds = %.lr.ph46 - %37 = zext nneg i32 %6 to i64 - br label %.lr.ph46.split - -.lr.ph46.split.us.preheader: ; preds = %.lr.ph46 - %38 = zext nneg i32 %3 to i64 - br label %.lr.ph46.split.us - -.lr.ph46.split.us: ; preds = %.lr.ph46.split.us.preheader, %48 - %indvars.iv57 = phi i64 [ 8, %.lr.ph46.split.us.preheader ], [ %indvars.iv.next58, %48 ] - %39 = trunc nsw i64 %indvars.iv57 to i32 - %40 = xor i32 %39, -1 - %41 = add nsw i32 %3, %40 - %42 = sext i32 %41 to i64 - %43 = getelementptr inbounds i8, ptr %1, i64 %42 - %44 = load i8, ptr %43, align 1, !tbaa !9 - %45 = zext i8 %44 to i32 - %.not39.us = icmp eq i32 %36, %45 + %35 = sext i1 %.not41 to i8 + br i1 %.not38, label %.lr.ph48.split.us.preheader, label %.lr.ph48.split.preheader + +.lr.ph48.split.preheader:; preds = %.lr.ph48 + %36 = zext nneg i32 %6 to i64 + br label %.lr.ph48.split + +.lr.ph48.split.us.preheader:; preds = %.lr.ph48 + %37 = zext nneg i32 %3 to i64 + br label %.lr.ph48.split.us + +.lr.ph48.split.us:; preds = %.lr.ph48.split.us.preheader, %48 + %indvars.iv59 = phi i64 [ 8, %.lr.ph48.split.us.preheader ], [ %indvars.iv.next60, %46 ] + %38 = trunc nsw i64 %indvars.iv59 to i32 + %39 = xor i32 %38, -1 + %40 = add nsw i32 %3, %39 + %41 = sext i32 %40 to i64 + %42 = getelementptr inbounds i8, ptr %1, i64 %41 + %43 = load i8, ptr %42, align 1, !tbaa !9 + %.not39.us = icmp eq i8 %43, %35 br i1 %.not39.us, label %48, label %46, !prof !10 -46: ; preds = %.lr.ph46.split.us +46: ; preds = %.lr.ph48.split.us %47 = tail call i32 (ptr, ptr, ...) @luaL_error(ptr noundef %0, ptr noundef nonnull @.str.75, i32 noundef %3) #12 br label %48 -48: ; preds = %.lr.ph46.split.us, %46 - %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1 - %49 = icmp samesign ult i64 %indvars.iv.next58, %38 - br i1 %49, label %.lr.ph46.split.us, label %.loopexit +48: ; preds = %.lr.ph48.split.us, %46 + %indvars.iv.next58 = add nuw nsw i64 %indvars.iv59, 1 + %49 = icmp samesign ult i64 %indvars.iv.next58, %37 + br i1 %49, label %.lr.ph48.split.us, label %.loopexit -.lr.ph46.split: ; preds = %.lr.ph46.split.preheader, %55 - %indvars.iv53 = phi i64 [ %37, %.lr.ph46.split.preheader ], [ %indvars.iv.next54, %55 ] +.lr.ph46.split: ; preds = %.lr.ph48.split.preheader, %55 + %indvars.iv53 = phi i64 [ %36, %.lr.ph48.split.preheader ], [ %indvars.iv.next54, %52 ] %50 = getelementptr inbounds nuw i8, ptr %1, i64 %indvars.iv53 %51 = load i8, ptr %50, align 1, !tbaa !9 - %52 = zext i8 %51 to i32 - %.not39 = icmp eq i32 %36, %52 - br i1 %.not39, label %55, label %53, !prof !10 + %.not39 = icmp eq i8 %51, %35 + br i1 %.not39, label %52, label %50, !prof !10 -53: ; preds = %.lr.ph46.split - %54 = tail call i32 (ptr, ptr, ...) @luaL_error(ptr noundef %0, ptr noundef nonnull @.str.75, i32 noundef %3) #12 - br label %55 +50: ; preds = %.lr.ph48.split + %51 = tail call i32 (ptr, ptr, ...) @luaL_error(ptr noundef %0, ptr noundef nonnull @.str.75, i32 noundef %3) #12 + br label %52 -55: ; preds = %.lr.ph46.split, %53 +55: ; preds = %.lr.ph46.split, %50 %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1 %56 = trunc nuw i64 %indvars.iv.next54 to i32 %57 = icmp sgt i32 %3, %56 br i1 %57, label %.lr.ph46.split, label %.loopexit .loopexit: ; preds = %55, %48, %33, %._crit_edge.thread, %26 - %.1 = phi i64 [ %32, %26 ], [ %.0.lcssa60, %._crit_edge.thread ], [ %.0.lcssa, %33 ], [ %.0.lcssa, %48 ], [ %.0.lcssa, %55 ] + %.1 = phi i64 [ %32, %26 ], [ %.0.lcssa60, %._crit_edge.thread ], [ %.0.lcssa, %33 ], [ %.0.lcssa, %46 ], [ %.0.lcssa, %52 ] ret i64 %.1 } diff --git a/bench/luajit/optimized/lj_load.ll b/bench/luajit/optimized/lj_load.ll index 747d861f9c5..4415ea82480 100644 --- a/bench/luajit/optimized/lj_load.ll +++ b/bench/luajit/optimized/lj_load.ll @@ -82,20 +82,19 @@ define internal noalias noundef ptr @cpparser(ptr noundef %0, ptr readnone captu .lr.ph: ; preds = %.preheader %.not34 = icmp eq i32 %7, 0 - %11 = select i1 %.not34, i32 116, i32 98 + %11 = select i1 %.not34, i8 116, i8 98 %12 = getelementptr inbounds nuw i8, ptr %2, i64 180 br label %13 13: ; preds = %.lr.ph, %20 - %14 = phi i8 [ %10, %.lr.ph ], [ %21, %20 ] - %.pn = phi ptr [ %9, %.lr.ph ], [ %15, %20 ] - %.036 = phi i32 [ 1, %.lr.ph ], [ %spec.select, %20 ] + %14 = phi i8 [ %10, %.lr.ph ], [ %21, %19 ] + %.pn = phi ptr [ %9, %.lr.ph ], [ %15, %19 ] + %.036 = phi i32 [ 1, %.lr.ph ], [ %spec.select, %19 ] %15 = getelementptr inbounds nuw i8, ptr %.pn, i64 1 - %16 = sext i8 %14 to i32 - %17 = icmp eq i32 %11, %16 - %spec.select = select i1 %17, i32 0, i32 %.036 - %18 = icmp eq i8 %14, 87 - br i1 %18, label %19, label %20 + %16 = icmp eq i8 %11, %14 + %spec.select = select i1 %16, i32 0, i32 %.036 + %17 = icmp eq i8 %14, 87 + br i1 %17, label %18, label %19 19: ; preds = %13 store i32 0, ptr %12, align 4, !tbaa !41 @@ -135,7 +134,7 @@ define internal noalias noundef ptr @cpparser(ptr noundef %0, ptr readnone captu br label %34 34: ; preds = %32, %30 - %35 = phi ptr [ %31, %30 ], [ %33, %32 ] + %35 = phi ptr [ %31, %29 ], [ %33, %31 ] %36 = getelementptr inbounds nuw i8, ptr %2, i64 180 %37 = load i32, ptr %36, align 4, !tbaa !41 %38 = icmp eq i32 %37, 1 @@ -149,8 +148,8 @@ define internal noalias noundef ptr @cpparser(ptr noundef %0, ptr readnone captu br label %44 44: ; preds = %34, %39 - %.sink = phi ptr [ %43, %39 ], [ %35, %34 ] - %.sink40 = phi i64 [ -1266637395197952, %39 ], [ -1125899906842624, %34 ] + %.sink = phi ptr [ %43, %38 ], [ %35, %33 ] + %.sink40 = phi i64 [ -1266637395197952, %38 ], [ -1125899906842624, %33 ] %45 = getelementptr inbounds nuw i8, ptr %0, i64 40 %46 = load ptr, ptr %45, align 8, !tbaa !44 %47 = getelementptr inbounds nuw i8, ptr %46, i64 8 diff --git a/bench/luajit/optimized/lj_strscan.ll b/bench/luajit/optimized/lj_strscan.ll index 7a176a86b80..566e0851c8a 100644 --- a/bench/luajit/optimized/lj_strscan.ll +++ b/bench/luajit/optimized/lj_strscan.ll @@ -317,30 +317,29 @@ thread-pre-split: ; preds = %22, %4 148: ; preds = %146 %149 = or i8 %107, 32 - %150 = zext i8 %149 to i32 - %151 = icmp eq i32 %.0215, 16 - %152 = select i1 %151, i32 112, i32 101 - %153 = icmp eq i32 %152, %150 - br i1 %153, label %154, label %185 - -154: ; preds = %148 - %155 = getelementptr inbounds nuw i8, ptr %.8, i64 1 - %156 = load i8, ptr %155, align 1, !tbaa !4 - switch i8 %156, label %160 [ - i8 43, label %157 + %150 = icmp eq i32 %.0215, 16 + %151 = select i1 %150, i8 112, i8 101 + %152 = icmp eq i8 %151, %149 + br i1 %152, label %153, label %184 + +153: ; preds = %148 + %154 = getelementptr inbounds nuw i8, ptr %.8, i64 1 + %155 = load i8, ptr %154, align 1, !tbaa !4 + switch i8 %155, label %159 [ + i8 43, label %156 i8 45, label %157 ] -157: ; preds = %154, %154 +157: ; preds = %153, %153 %158 = getelementptr inbounds nuw i8, ptr %.8, i64 2 - %159 = icmp ne i8 %156, 45 + %159 = icmp ne i8 %155, 45 %.pre324 = load i8, ptr %158, align 1, !tbaa !4 br label %160 -160: ; preds = %154, %157 - %161 = phi i8 [ %.pre324, %157 ], [ %156, %154 ] - %.0192 = phi i1 [ %159, %157 ], [ true, %154 ] - %.10 = phi ptr [ %158, %157 ], [ %155, %154 ] +160: ; preds = %153, %157 + %161 = phi i8 [ %.pre324, %156 ], [ %155, %153 ] + %.0192 = phi i1 [ %159, %156 ], [ true, %153 ] + %.10 = phi ptr [ %158, %156 ], [ %154, %153 ] %162 = zext i8 %161 to i64 %163 = getelementptr inbounds nuw i8, ptr getelementptr inbounds nuw (i8, ptr @lj_char_bits, i64 1), i64 %162 %164 = load i8, ptr %163, align 1, !tbaa !4 @@ -354,8 +353,8 @@ thread-pre-split: ; preds = %22, %4 br label %169 169: ; preds = %175, %166 - %.0193 = phi i32 [ %168, %166 ], [ %179, %175 ] - %.10.pn = phi ptr [ %.10, %166 ], [ %.12, %175 ] + %.0193 = phi i32 [ %168, %165 ], [ %179, %174 ] + %.10.pn = phi ptr [ %.10, %165 ], [ %.12, %174 ] %.12 = getelementptr inbounds nuw i8, ptr %.10.pn, i64 1 %170 = load i8, ptr %.12, align 1, !tbaa !4 %171 = zext i8 %170 to i64 @@ -380,10 +379,10 @@ thread-pre-split: ; preds = %22, %4 br label %185 185: ; preds = %181, %148, %146 - %186 = phi i8 [ %170, %181 ], [ %107, %148 ], [ %107, %146 ] - %.1220 = phi i32 [ 1, %181 ], [ %.0219, %148 ], [ %.0219, %146 ] - %.2196 = phi i32 [ %184, %181 ], [ %.0194, %148 ], [ %.0194, %146 ] - %.9 = phi ptr [ %.12, %181 ], [ %.8, %148 ], [ %.8, %146 ] + %186 = phi i8 [ %170, %180 ], [ %107, %148 ], [ %107, %146 ] + %.1220 = phi i32 [ 1, %180 ], [ %.0219, %148 ], [ %.0219, %146 ] + %.2196 = phi i32 [ %184, %180 ], [ %.0194, %148 ], [ %.0194, %146 ] + %.9 = phi ptr [ %.12, %180 ], [ %.8, %148 ], [ %.8, %146 ] %.not247 = icmp eq i8 %186, 0 br i1 %.not247, label %234, label %187 @@ -413,49 +412,49 @@ thread-pre-split: ; preds = %22, %4 %198 = load i8, ptr %spec.select264, align 1, !tbaa !4 %199 = and i8 %198, -33 %200 = icmp eq i8 %199, 76 - br i1 %200, label %201, label %212 - -201: ; preds = %196 - %202 = getelementptr inbounds nuw i8, ptr %spec.select264, i64 1 - %203 = load i8, ptr %202, align 1, !tbaa !4 - %204 = and i8 %203, -33 - %205 = icmp eq i8 %204, 76 - br i1 %205, label %206, label %209 - -206: ; preds = %201 - %207 = getelementptr inbounds nuw i8, ptr %spec.select264, i64 2 - %208 = add nuw nsw i32 %spec.select263, 2 - br label %212 - -209: ; preds = %201 - br i1 %.not239, label %210, label %.thread270 + br i1 %200, label %200, label %211 -210: ; preds = %209 - %211 = add nuw nsw i32 %spec.select263, 2 - br label %212 - -212: ; preds = %206, %210, %196 - %.5224 = phi i32 [ %208, %206 ], [ %211, %210 ], [ %spec.select263, %196 ] - %.16 = phi ptr [ %207, %206 ], [ %202, %210 ], [ %spec.select264, %196 ] - %213 = load i8, ptr %.16, align 1, !tbaa !4 - %214 = and i8 %213, -33 - %215 = icmp eq i8 %214, 85 - br i1 %215, label %216, label %220 - -216: ; preds = %212 - switch i32 %.5224, label %220 [ - i32 5, label %217 - i32 3, label %217 +210: ; preds = %195 + %201 = getelementptr inbounds nuw i8, ptr %spec.select264, i64 1 + %202 = load i8, ptr %201, align 1, !tbaa !4 + %203 = and i8 %202, -33 + %204 = icmp eq i8 %203, 76 + br i1 %204, label %205, label %216 + +205:; preds = %210 + %206 = getelementptr inbounds nuw i8, ptr %spec.select264, i64 2 + %207 = add nuw nsw i32 %spec.select264, 2 + br label %211 + +216: ; preds = %210 + br i1 %.not239, label %209, label %.thread270 + +209: ; preds = %217 + %210 = add nuw nsw i32 %spec.select263, 2 + br label %211 + +211: ; preds = %205, %209, %195 + %.5224 = phi i32 [ %207, %205 ], [ %210, %209 ], [ %spec.select263, %195 ] + %.16 = phi ptr [ %206, %205 ], [ %201, %209 ], [ %spec.select264, %195 ] + %212 = load i8, ptr %.16, align 1, !tbaa !4 + %213 = and i8 %212, -33 + %214 = icmp eq i8 %213, 85 + br i1 %214, label %215, label %219 + +215: ; preds = %211 + switch i32 %.5224, label %219 [ + i32 5, label %216 + i32 3, label %216 ] -217: ; preds = %216, %216 +217: ; preds = %215, %215 %218 = getelementptr inbounds nuw i8, ptr %.16, i64 1 %219 = add nuw nsw i32 %.5224, 1 br label %220 -220: ; preds = %216, %217, %212 - %.6225 = phi i32 [ %219, %217 ], [ %.5224, %216 ], [ %.5224, %212 ] - %.17 = phi ptr [ %218, %217 ], [ %.16, %216 ], [ %.16, %212 ] +220: ; preds = %215, %217, %211 + %.6225 = phi i32 [ %219, %216 ], [ %.5224, %215 ], [ %.5224, %211 ] + %.17 = phi ptr [ %217, %216 ], [ %.16, %215 ], [ %.16, %211 ] %221 = icmp ne i32 %.6225, 4 %brmerge = or i1 %.not239, %221 br i1 %brmerge, label %222, label %.thread270 @@ -468,12 +467,12 @@ thread-pre-split: ; preds = %22, %4 br i1 %or.cond, label %.thread270, label %225 225: ; preds = %194, %222, %192 - %.3222 = phi i32 [ 2, %192 ], [ %.6225, %222 ], [ %.1220, %194 ] - %.14 = phi ptr [ %193, %192 ], [ %.17, %222 ], [ %.9, %194 ] + %.3222 = phi i32 [ 2, %191 ], [ %.6225, %221 ], [ %.1220, %193 ] + %.14 = phi ptr [ %193, %191 ], [ %.17, %221 ], [ %.9, %193 ] br label %226 226: ; preds = %226, %225 - %.18 = phi ptr [ %.14, %225 ], [ %232, %226 ] + %.18 = phi ptr [ %.14, %224 ], [ %232, %225 ] %227 = load i8, ptr %.18, align 1, !tbaa !4 %228 = zext i8 %227 to i64 %229 = getelementptr inbounds nuw i8, ptr getelementptr inbounds nuw (i8, ptr @lj_char_bits, i64 1), i64 %228 @@ -488,8 +487,8 @@ thread-pre-split: ; preds = %22, %4 br i1 %.not251, label %234, label %.thread270 234: ; preds = %233, %185 - %.2221 = phi i32 [ %.3222, %233 ], [ %.1220, %185 ] - %.13 = phi ptr [ %.18, %233 ], [ %.9, %185 ] + %.2221 = phi i32 [ %.3222, %232 ], [ %.1220, %184 ] + %.13 = phi ptr [ %.18, %232 ], [ %.9, %184 ] %235 = icmp ult ptr %.13, %6 br i1 %235, label %.thread270, label %236 @@ -573,7 +572,7 @@ thread-pre-split: ; preds = %22, %4 br label %272 272: ; preds = %269, %.thread277, %267 - %.7226 = phi i32 [ %268, %267 ], [ %270, %269 ], [ %271, %.thread277 ] + %.7226 = phi i32 [ %268, %266 ], [ %270, %268 ], [ %271, %.thread277 ] %273 = icmp ne i32 %.7226, 1 %274 = and i32 %3, 1 %.not252 = icmp eq i32 %274, 0 @@ -596,8 +595,8 @@ thread-pre-split: ; preds = %22, %4 store i32 %280, ptr %2, align 8, !tbaa !4 br label %.thread270 -.thread270: ; preds = %102, %121, %175, %278, %160, %272, %275, %283, %249, %256, %257, %264, %124, %127, %.critedge, %190, %209, %222, %220, %233, %234, %82, %80 - %.1 = phi i32 [ 1, %82 ], [ 0, %80 ], [ 1, %249 ], [ 1, %256 ], [ 3, %257 ], [ 3, %283 ], [ %265, %264 ], [ 0, %124 ], [ 0, %127 ], [ 0, %.critedge ], [ 0, %190 ], [ 0, %209 ], [ 0, %222 ], [ 0, %220 ], [ 0, %233 ], [ 0, %234 ], [ 1, %275 ], [ %.7226, %272 ], [ 0, %160 ], [ 1, %278 ], [ 0, %175 ], [ 0, %121 ], [ 0, %102 ] +.thread270: ; preds = %102, %121, %175, %278, %160, %272, %275, %283, %249, %256, %257, %264, %124, %127, %.critedge, %190, %208, %221, %219, %232, %233, %82, %80 + %.1 = phi i32 [ 1, %82 ], [ 0, %80 ], [ 1, %248 ], [ 1, %255 ], [ 3, %256 ], [ 3, %282 ], [ %264, %263 ], [ 0, %124 ], [ 0, %127 ], [ 0, %.critedge ], [ 0, %189 ], [ 0, %208 ], [ 0, %221 ], [ 0, %219 ], [ 0, %232 ], [ 0, %233 ], [ 1, %274 ], [ %.7226, %271 ], [ 0, %159 ], [ 1, %277 ], [ 0, %174 ], [ 0, %121 ], [ 0, %102 ] ret i32 %.1 } diff --git a/bench/luau/optimized/lstrlib.ll b/bench/luau/optimized/lstrlib.ll index 9443d57095d..d0ef3f3ef1a 100644 --- a/bench/luau/optimized/lstrlib.ll +++ b/bench/luau/optimized/lstrlib.ll @@ -2009,8 +2009,8 @@ define internal noundef range(i32 -2147483647, -2147483648) i32 @_ZL10str_unpack br i1 %.not63181, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %19, %204 - %.0183 = phi i32 [ %205, %204 ], [ %spec.store.select, %19 ] - %.058182 = phi i32 [ %.159, %204 ], [ 0, %19 ] + %.0183 = phi i32 [ %205, %201 ], [ %spec.store.select, %19 ] + %.058182 = phi i32 [ %.159, %201 ], [ 0, %19 ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #14 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #14 %23 = sext i32 %.0183 to i64 @@ -2037,8 +2037,8 @@ define internal noundef range(i32 -2147483647, -2147483648) i32 @_ZL10str_unpack i32 0, label %36 i32 1, label %86 i32 2, label %124 - i32 3, label %145 - i32 4, label %148 + i32 3, label %142 + i32 4, label %145 i32 5, label %192 i32 7, label %204 i32 6, label %204 @@ -2106,55 +2106,53 @@ define internal noundef range(i32 -2147483647, -2147483648) i32 @_ZL10str_unpack br i1 %.not.i, label %_ZL9unpackintP9lua_StatePKciii.exit, label %.lr.ph46.i .lr.ph46.i: ; preds = %66 - %67 = icmp sgt i64 %.0.lcssa.i, -1 - %68 = select i1 %67, i32 0, i32 255 + %.0.lcssa.i.lobit = ashr i64 %.0.lcssa.i, 63 + %67 = trunc nsw i64 %.0.lcssa.i.lobit to i8 br i1 %.not41.i, label %.lr.ph46.split.us.preheader.i, label %.lr.ph46.split.preheader.i .lr.ph46.split.preheader.i: ; preds = %.lr.ph46.i %69 = zext nneg i32 %39 to i64 - br label %.lr.ph46.split.i + br label %.lr.ph48.split.i .lr.ph46.split.us.preheader.i: ; preds = %.lr.ph46.i %70 = zext nneg i32 %27 to i64 br label %.lr.ph46.split.us.i -.lr.ph46.split.us.i: ; preds = %78, %.lr.ph46.split.us.preheader.i - %indvars.iv58.i = phi i64 [ 8, %.lr.ph46.split.us.preheader.i ], [ %indvars.iv.next59.i, %78 ] +.lr.ph46.split.us.i: ; preds = %76, %.lr.ph46.split.us.preheader.i + %indvars.iv58.i = phi i64 [ 8, %.lr.ph48.split.us.preheader.i ], [ %indvars.iv.next61.i, %76 ] %71 = trunc nsw i64 %indvars.iv58.i to i32 %72 = xor i32 %71, -1 %73 = add nsw i32 %27, %72 %74 = sext i32 %73 to i64 %75 = getelementptr inbounds i8, ptr %38, i64 %74 %76 = load i8, ptr %75, align 1, !tbaa !8 - %77 = zext i8 %76 to i32 - %.not39.us.i = icmp eq i32 %68, %77 - br i1 %.not39.us.i, label %78, label %.split.us.i - -78: ; preds = %.lr.ph46.split.us.i - %indvars.iv.next59.i = add nuw nsw i64 %indvars.iv58.i, 1 - %exitcond213.not = icmp eq i64 %indvars.iv.next59.i, %70 - br i1 %exitcond213.not, label %_ZL9unpackintP9lua_StatePKciii.exit, label %.lr.ph46.split.us.i, !llvm.loop !62 - -79: ; preds = %.lr.ph46.split.i - %indvars.iv.next55.i = add nuw nsw i64 %indvars.iv54.i, 1 - %80 = trunc nuw i64 %indvars.iv.next55.i to i32 - %81 = icmp sgt i32 %27, %80 - br i1 %81, label %.lr.ph46.split.i, label %_ZL9unpackintP9lua_StatePKciii.exit, !llvm.loop !62 - -.lr.ph46.split.i: ; preds = %79, %.lr.ph46.split.preheader.i - %indvars.iv54.i = phi i64 [ %69, %.lr.ph46.split.preheader.i ], [ %indvars.iv.next55.i, %79 ] - %82 = getelementptr inbounds nuw i8, ptr %38, i64 %indvars.iv54.i - %83 = load i8, ptr %82, align 1, !tbaa !8 - %84 = zext i8 %83 to i32 - %.not39.i = icmp eq i32 %68, %84 - br i1 %.not39.i, label %79, label %.split.us.i - -.split.us.i: ; preds = %.lr.ph46.split.i, %.lr.ph46.split.us.i + %.not39.us.i = icmp eq i8 %76, %67 + br i1 %.not39.us.i, label %76, label %.split.us.i + +76: ; preds = %.lr.ph48.split.us.i + %indvars.iv.next61.i = add nuw nsw i64 %indvars.iv60.i, 1 + %exitcond213.not = icmp eq i64 %indvars.iv.next61.i, %69 + br i1 %exitcond213.not, label %_ZL9unpackintP9lua_StatePKciii.exit, label %.lr.ph48.split.us.i, !llvm.loop !62 + +77: ; preds = %.lr.ph48.split.i + %indvars.iv.next57.i = add nuw nsw i64 %indvars.iv56.i, 1 + %78 = trunc nuw i64 %indvars.iv.next57.i to i32 + %79 = icmp sgt i32 %27, %78 + br i1 %79, label %.lr.ph48.split.i, label %_ZL9unpackintP9lua_StatePKciii.exit, !llvm.loop !62 + +.lr.ph48.split.i: ; preds = %77, %.lr.ph48.split.preheader.i + %indvars.iv56.i = phi i64 [ %69, %.lr.ph48.split.preheader.i ], [ %indvars.iv.next57.i, %77 ] + %80 = getelementptr inbounds nuw i8, ptr %38, i64 %indvars.iv56.i + %81 = load i8, ptr %80, align 1, !tbaa !8 + %.not39.i = icmp eq i8 %81, %67 + br i1 %.not39.i, label %77, label %.split.us.i + +.split.us.i:; preds = %.lr.ph48.split.i, %.lr.ph48.split.us.i call void (ptr, ptr, ...) @_Z11luaL_errorLP9lua_StatePKcz(ptr noundef %0, ptr noundef nonnull @.str.63, i32 noundef %27) #15 unreachable -_ZL9unpackintP9lua_StatePKciii.exit: ; preds = %79, %78, %._crit_edge.thread.i, %66 - %.1.i = phi i64 [ %65, %._crit_edge.thread.i ], [ %.0.lcssa.i, %66 ], [ %.0.lcssa.i, %78 ], [ %.0.lcssa.i, %79 ] +_ZL9unpackintP9lua_StatePKciii.exit: ; preds = %77, %76, %._crit_edge.thread.i, %66 + %.1.i = phi i64 [ %65, %._crit_edge.thread.i ], [ %.0.lcssa.i, %66 ], [ %.0.lcssa.i, %76 ], [ %.0.lcssa.i, %77 ] %85 = sitofp i64 %.1.i to double call void @_Z14lua_pushnumberP9lua_Stated(ptr noundef %0, double noundef %85) br label %204 @@ -2217,7 +2215,7 @@ _ZL9unpackintP9lua_StatePKciii.exit: ; preds = %79, %78, %._crit_ed br label %.lr.ph46.split.us.i87 .lr.ph46.split.us.i87: ; preds = %117, %.lr.ph46.split.us.preheader.i86 - %indvars.iv58.i88 = phi i64 [ 8, %.lr.ph46.split.us.preheader.i86 ], [ %indvars.iv.next59.i90, %117 ] + %indvars.iv58.i88 = phi i64 [ 8, %.lr.ph48.split.us.preheader.i86 ], [ %indvars.iv.next59.i90, %114 ] %111 = trunc nsw i64 %indvars.iv58.i88 to i32 %112 = xor i32 %111, -1 %113 = add nsw i32 %27, %112 @@ -2239,7 +2237,7 @@ _ZL9unpackintP9lua_StatePKciii.exit: ; preds = %79, %78, %._crit_ed br i1 %120, label %.lr.ph46.split.i81, label %_ZL9unpackintP9lua_StatePKciii.exit95, !llvm.loop !62 .lr.ph46.split.i81: ; preds = %118, %.lr.ph46.split.preheader.i80 - %indvars.iv54.i82 = phi i64 [ %109, %.lr.ph46.split.preheader.i80 ], [ %indvars.iv.next55.i85, %118 ] + %indvars.iv54.i82 = phi i64 [ %109, %.lr.ph48.split.preheader.i80 ], [ %indvars.iv.next55.i85, %115 ] %121 = getelementptr inbounds nuw i8, ptr %88, i64 %indvars.iv54.i82 %122 = load i8, ptr %121, align 1, !tbaa !8 %.not39.i83 = icmp eq i8 %122, 0 @@ -2250,7 +2248,7 @@ _ZL9unpackintP9lua_StatePKciii.exit: ; preds = %79, %78, %._crit_ed unreachable _ZL9unpackintP9lua_StatePKciii.exit95: ; preds = %118, %117, %._crit_edge.i75.thread, %._crit_edge.i75, %86 - %.1.i68 = phi i64 [ 0, %86 ], [ %101, %._crit_edge.i75 ], [ %107, %._crit_edge.i75.thread ], [ %101, %117 ], [ %107, %118 ] + %.1.i68 = phi i64 [ 0, %83 ], [ %101, %._crit_edge.i75 ], [ %107, %._crit_edge.i75.thread ], [ %101, %114 ], [ %107, %115 ] %123 = uitofp i64 %.1.i68 to double call void @_Z14lua_pushnumberP9lua_Stated(ptr noundef %0, double noundef %123) br label %204 @@ -2318,40 +2316,40 @@ _ZL14copywithendianPVcPVKcii.exit.thread: ; preds = %133, %.preheader.i, br label %144 144: ; preds = %141, %_ZL14copywithendianPVcPVKcii.exit.thread, %138 - %.060 = phi double [ %140, %138 ], [ %142, %141 ], [ %143, %_ZL14copywithendianPVcPVKcii.exit.thread ] + %.060 = phi double [ %140, %135 ], [ %142, %138 ], [ %143, %_ZL14copywithendianPVcPVKcii.exit.thread ] call void @_Z14lua_pushnumberP9lua_Stated(ptr noundef %0, double noundef %.060) call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #14 br label %204 +142: ; preds = %33 + %143 = sext i32 %34 to i64 + %144 = getelementptr inbounds i8, ptr %9, i64 %143 + call void @_Z15lua_pushlstringP9lua_StatePKcm(ptr noundef %0, ptr noundef %144, i64 noundef %28) + br label %201 + 145: ; preds = %33 %146 = sext i32 %34 to i64 %147 = getelementptr inbounds i8, ptr %9, i64 %146 - call void @_Z15lua_pushlstringP9lua_StatePKcm(ptr noundef %0, ptr noundef %147, i64 noundef %28) - br label %204 - -148: ; preds = %33 - %149 = sext i32 %34 to i64 - %150 = getelementptr inbounds i8, ptr %9, i64 %149 - %151 = call i32 @llvm.smin.i32(i32 %27, i32 8) - %152 = icmp sgt i32 %27, 0 - br i1 %152, label %.lr.ph.i102, label %_ZL9unpackintP9lua_StatePKciii.exit128.thread + %148 = call i32 @llvm.smin.i32(i32 %27, i32 8) + %149 = icmp sgt i32 %27, 0 + br i1 %149, label %.lr.ph.i102, label %_ZL9unpackintP9lua_StatePKciii.exit128.thread -.lr.ph.i102: ; preds = %148 - %153 = load i32, ptr %20, align 8, !tbaa !52 - %.not41.i103 = icmp eq i32 %153, 0 - %154 = call i32 @llvm.umin.i32(i32 %27, i32 8) - %155 = zext nneg i32 %154 to i64 - br i1 %.not41.i103, label %.lr.ph.split.us.i124, label %.lr.ph.split.i104 +.lr.ph.i102:; preds = %145 + %150 = load i32, ptr %20, align 8, !tbaa !52 + %.not43.i103 = icmp eq i32 %150, 0 + %151 = call i32 @llvm.umin.i32(i32 %27, i32 8) + %152 = zext nneg i32 %151 to i64 + br i1 %.not43.i103, label %.lr.ph.split.us.i124, label %.lr.ph.split.i104 .lr.ph.split.us.i124: ; preds = %.lr.ph.i102, %.lr.ph.split.us.i124 - %indvars.iv52.i125 = phi i64 [ %indvars.iv.next53.i127, %.lr.ph.split.us.i124 ], [ %155, %.lr.ph.i102 ] + %indvars.iv52.i125 = phi i64 [ %indvars.iv.next53.i127, %.lr.ph.split.us.i124 ], [ %152, %.lr.ph.i102 ] %.043.us.i126 = phi i64 [ %163, %.lr.ph.split.us.i124 ], [ 0, %.lr.ph.i102 ] %indvars.iv.next53.i127 = add nsw i64 %indvars.iv52.i125, -1 %156 = shl i64 %.043.us.i126, 8 %157 = trunc nsw i64 %indvars.iv52.i125 to i32 %158 = sub i32 %27, %157 %159 = sext i32 %158 to i64 - %160 = getelementptr inbounds i8, ptr %150, i64 %159 + %160 = getelementptr inbounds i8, ptr %147, i64 %159 %161 = load i8, ptr %160, align 1, !tbaa !8 %162 = zext i8 %161 to i64 %163 = or disjoint i64 %156, %162 @@ -2359,11 +2357,11 @@ _ZL14copywithendianPVcPVKcii.exit.thread: ; preds = %133, %.preheader.i, br i1 %164, label %.lr.ph.split.us.i124, label %._crit_edge.i108, !llvm.loop !61 .lr.ph.split.i104: ; preds = %.lr.ph.i102, %.lr.ph.split.i104 - %indvars.iv.i105 = phi i64 [ %indvars.iv.next.i107, %.lr.ph.split.i104 ], [ %155, %.lr.ph.i102 ] + %indvars.iv.i105 = phi i64 [ %indvars.iv.next.i107, %.lr.ph.split.i104 ], [ %152, %.lr.ph.i102 ] %.043.i106 = phi i64 [ %169, %.lr.ph.split.i104 ], [ 0, %.lr.ph.i102 ] %indvars.iv.next.i107 = add nsw i64 %indvars.iv.i105, -1 %165 = shl i64 %.043.i106, 8 - %166 = getelementptr inbounds i8, ptr %150, i64 %indvars.iv.next.i107 + %166 = getelementptr inbounds i8, ptr %147, i64 %indvars.iv.next.i107 %167 = load i8, ptr %166, align 1, !tbaa !8 %168 = zext i8 %167 to i64 %169 = or disjoint i64 %165, %168 @@ -2379,7 +2377,7 @@ _ZL14copywithendianPVcPVKcii.exit.thread: ; preds = %133, %.preheader.i, br i1 %switch133221, label %_ZL9unpackintP9lua_StatePKciii.exit128, label %.lr.ph46.split.preheader.i113 .lr.ph46.split.preheader.i113: ; preds = %._crit_edge.i108.thread - %171 = zext nneg i32 %151 to i64 + %171 = zext nneg i32 %148 to i64 br label %.lr.ph46.split.i114 .lr.ph46.split.us.preheader.i119: ; preds = %._crit_edge.i108 @@ -2387,12 +2385,12 @@ _ZL14copywithendianPVcPVKcii.exit.thread: ; preds = %133, %.preheader.i, br label %.lr.ph46.split.us.i120 .lr.ph46.split.us.i120: ; preds = %179, %.lr.ph46.split.us.preheader.i119 - %indvars.iv58.i121 = phi i64 [ 8, %.lr.ph46.split.us.preheader.i119 ], [ %indvars.iv.next59.i123, %179 ] + %indvars.iv58.i121 = phi i64 [ 8, %.lr.ph48.split.us.preheader.i119 ], [ %indvars.iv.next59.i123, %176 ] %173 = trunc nsw i64 %indvars.iv58.i121 to i32 %174 = xor i32 %173, -1 %175 = add nsw i32 %27, %174 %176 = sext i32 %175 to i64 - %177 = getelementptr inbounds i8, ptr %150, i64 %176 + %177 = getelementptr inbounds i8, ptr %147, i64 %176 %178 = load i8, ptr %177, align 1, !tbaa !8 %.not39.us.i122 = icmp eq i8 %178, 0 br i1 %.not39.us.i122, label %179, label %.split.us.i117 @@ -2409,8 +2407,8 @@ _ZL14copywithendianPVcPVKcii.exit.thread: ; preds = %133, %.preheader.i, br i1 %182, label %.lr.ph46.split.i114, label %_ZL9unpackintP9lua_StatePKciii.exit128, !llvm.loop !62 .lr.ph46.split.i114: ; preds = %180, %.lr.ph46.split.preheader.i113 - %indvars.iv54.i115 = phi i64 [ %171, %.lr.ph46.split.preheader.i113 ], [ %indvars.iv.next55.i118, %180 ] - %183 = getelementptr inbounds nuw i8, ptr %150, i64 %indvars.iv54.i115 + %indvars.iv54.i115 = phi i64 [ %171, %.lr.ph48.split.preheader.i113 ], [ %indvars.iv.next55.i118, %177 ] + %183 = getelementptr inbounds nuw i8, ptr %147, i64 %indvars.iv54.i115 %184 = load i8, ptr %183, align 1, !tbaa !8 %.not39.i116 = icmp eq i8 %184, 0 br i1 %.not39.i116, label %180, label %.split.us.i117 @@ -2420,9 +2418,9 @@ _ZL14copywithendianPVcPVKcii.exit.thread: ; preds = %133, %.preheader.i, unreachable _ZL9unpackintP9lua_StatePKciii.exit128: ; preds = %180, %179, %._crit_edge.i108.thread, %._crit_edge.i108 - %.0.lcssa.i109223 = phi i64 [ %169, %._crit_edge.i108.thread ], [ %163, %._crit_edge.i108 ], [ %163, %179 ], [ %169, %180 ] + %.0.lcssa.i109223 = phi i64 [ %169, %._crit_edge.i108.thread ], [ %163, %._crit_edge.i108 ], [ %163, %176 ], [ %169, %177 ] %185 = load i64, ptr %4, align 8, !tbaa !4 - %186 = add nsw i64 %149, %28 + %186 = add nsw i64 %146, %28 %187 = sub i64 %185, %186 %.not65 = icmp ugt i64 %.0.lcssa.i109223, %187 br i1 %.not65, label %188, label %_ZL9unpackintP9lua_StatePKciii.exit128.thread @@ -2431,9 +2429,9 @@ _ZL9unpackintP9lua_StatePKciii.exit128: ; preds = %180, %179, %._crit_ call void @_Z14luaL_argerrorLP9lua_StateiPKc(ptr noundef %0, i32 noundef 2, ptr noundef nonnull @.str.60) #15 unreachable -_ZL9unpackintP9lua_StatePKciii.exit128.thread: ; preds = %148, %_ZL9unpackintP9lua_StatePKciii.exit128 - %.1.i101131 = phi i64 [ %.0.lcssa.i109223, %_ZL9unpackintP9lua_StatePKciii.exit128 ], [ 0, %148 ] - %189 = getelementptr inbounds i8, ptr %150, i64 %28 +_ZL9unpackintP9lua_StatePKciii.exit128.thread: ; preds = %145, %_ZL9unpackintP9lua_StatePKciii.exit128 + %.1.i101131 = phi i64 [ %.0.lcssa.i109223, %_ZL9unpackintP9lua_StatePKciii.exit128 ], [ 0, %145 ] + %189 = getelementptr inbounds i8, ptr %147, i64 %28 call void @_Z15lua_pushlstringP9lua_StatePKcm(ptr noundef %0, ptr noundef %189, i64 noundef %.1.i101131) %190 = trunc i64 %.1.i101131 to i32 %191 = add nsw i32 %34, %190 @@ -2462,9 +2460,9 @@ _ZL9unpackintP9lua_StatePKciii.exit128.thread: ; preds = %148, %_ZL9unpackint default.unreachable214: ; preds = %33 unreachable -204: ; preds = %33, %33, %33, %200, %_ZL9unpackintP9lua_StatePKciii.exit128.thread, %145, %144, %_ZL9unpackintP9lua_StatePKciii.exit95, %_ZL9unpackintP9lua_StatePKciii.exit - %.159 = phi i32 [ %35, %_ZL9unpackintP9lua_StatePKciii.exit ], [ %35, %_ZL9unpackintP9lua_StatePKciii.exit95 ], [ %35, %144 ], [ %35, %145 ], [ %35, %_ZL9unpackintP9lua_StatePKciii.exit128.thread ], [ %35, %200 ], [ %.058182, %33 ], [ %.058182, %33 ], [ %.058182, %33 ] - %.1 = phi i32 [ %34, %_ZL9unpackintP9lua_StatePKciii.exit ], [ %34, %_ZL9unpackintP9lua_StatePKciii.exit95 ], [ %34, %144 ], [ %34, %145 ], [ %191, %_ZL9unpackintP9lua_StatePKciii.exit128.thread ], [ %203, %200 ], [ %34, %33 ], [ %34, %33 ], [ %34, %33 ] +204: ; preds = %33, %33, %33, %200, %_ZL9unpackintP9lua_StatePKciii.exit128.thread, %142, %144, %_ZL9unpackintP9lua_StatePKciii.exit95, %_ZL9unpackintP9lua_StatePKciii.exit + %.159 = phi i32 [ %35, %_ZL9unpackintP9lua_StatePKciii.exit ], [ %35, %_ZL9unpackintP9lua_StatePKciii.exit95 ], [ %35, %141 ], [ %35, %142 ], [ %35, %_ZL9unpackintP9lua_StatePKciii.exit128.thread ], [ %35, %197 ], [ %.058182, %33 ], [ %.058182, %33 ], [ %.058182, %33 ] + %.1 = phi i32 [ %34, %_ZL9unpackintP9lua_StatePKciii.exit ], [ %34, %_ZL9unpackintP9lua_StatePKciii.exit95 ], [ %34, %141 ], [ %34, %142 ], [ %191, %_ZL9unpackintP9lua_StatePKciii.exit128.thread ], [ %203, %197 ], [ %34, %33 ], [ %34, %33 ], [ %34, %33 ] %205 = add nsw i32 %.1, %27 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #14 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #14 diff --git a/bench/mold/optimized/icf.cc.X86_64.ll b/bench/mold/optimized/icf.cc.X86_64.ll index 3d371b7d6ec..7015aaf6032 100644 --- a/bench/mold/optimized/icf.cc.X86_64.ll +++ b/bench/mold/optimized/icf.cc.X86_64.ll @@ -2901,8 +2901,8 @@ _ZN3tbb6detail2d112parallel_forIlZN4moldL17count_num_classesINS3_6X86_64EEElSt4s %888 = load atomic i64, ptr %820 acquire, align 8, !noalias !219 %.0.i.i.i.i.i.i.i.i.i = inttoptr i64 %888 to ptr %889 = icmp eq ptr %scevgep.i.i.i.i.i87, %.0.i.i.i.i.i.i.i.i.i - %890 = select i1 %889, i64 3, i64 64 - %891 = load ptr, ptr %819, align 8, !tbaa !205, !noalias !219 + %890 = load ptr, ptr %819, align 8, !tbaa !205, !noalias !219 + %891 = select i1 %889, i64 2, i64 63 br label %892 892: ; preds = %897, %_ZN3tbb6detail2d112parallel_forIlZN4moldL17count_num_classesINS3_6X86_64EEElSt4spanISt5arrayIhLm16EELm18446744073709551615EERNS1_20affinity_partitionerEEUllE_EEvT_SD_RKT0_SB_.exit.i @@ -2910,7 +2910,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4moldL17count_num_classesINS3_6X86_64EEElSt4s %893 = getelementptr inbounds nuw %"struct.std::atomic.255", ptr %.0.i.i.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i.i.i %894 = load atomic i64, ptr %893 monotonic, align 8, !noalias !219 %.0.i.i.i.i.i.i.i.i = inttoptr i64 %894 to ptr - %.not.i.i.i.i.i2.i = icmp ult ptr %891, %.0.i.i.i.i.i.i.i.i + %.not.i.i.i.i.i2.i = icmp ult ptr %890, %.0.i.i.i.i.i.i.i.i br i1 %.not.i.i.i.i.i2.i, label %897, label %.thread.i.i.i.i.i.i .thread.i.i.i.i.i.i: ; preds = %892 @@ -2920,7 +2920,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4moldL17count_num_classesINS3_6X86_64EEElSt4s 897: ; preds = %892 %898 = add nuw nsw i64 %.01015.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i = icmp eq i64 %898, %890 + %exitcond.not.i.i.i.i.i.i = icmp eq i64 %891, %.01015.i.i.i.i.i.i br i1 %exitcond.not.i.i.i.i.i.i, label %_ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit.i.i, label %892, !llvm.loop !222 _ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit.i.i: ; preds = %897, %.thread.i.i.i.i.i.i @@ -2957,8 +2957,8 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI %911 = load atomic i64, ptr %820 acquire, align 8, !noalias !226 %.0.i.i.i.i.i.i.i2.i.i = inttoptr i64 %911 to ptr %912 = icmp eq ptr %scevgep.i.i.i.i.i87, %.0.i.i.i.i.i.i.i2.i.i - %913 = select i1 %912, i64 3, i64 64 - %914 = load ptr, ptr %819, align 8, !tbaa !205, !noalias !226 + %913 = load ptr, ptr %819, align 8, !tbaa !205, !noalias !226 + %914 = select i1 %912, i64 2, i64 63 br label %915 915: ; preds = %920, %908 @@ -2966,7 +2966,7 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI %916 = getelementptr inbounds nuw %"struct.std::atomic.255", ptr %.0.i.i.i.i.i.i.i2.i.i, i64 %.01015.i.i.i.i3.i.i %917 = load atomic i64, ptr %916 monotonic, align 8, !noalias !226 %.0.i.i.i.i.i.i4.i.i = inttoptr i64 %917 to ptr - %.not.i.i.i.i5.i.i = icmp ult ptr %914, %.0.i.i.i.i.i.i4.i.i + %.not.i.i.i.i5.i.i = icmp ult ptr %913, %.0.i.i.i.i.i.i4.i.i br i1 %.not.i.i.i.i5.i.i, label %920, label %.thread.i.i.i.i6.i.i .thread.i.i.i.i6.i.i: ; preds = %915 @@ -2976,7 +2976,7 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI 920: ; preds = %915 %921 = add nuw nsw i64 %.01015.i.i.i.i3.i.i, 1 - %exitcond.not.i.i.i.i9.i.i = icmp eq i64 %921, %913 + %exitcond.not.i.i.i.i9.i.i = icmp eq i64 %914, %.01015.i.i.i.i3.i.i br i1 %exitcond.not.i.i.i.i9.i.i, label %_ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit10.i.i, label %915, !llvm.loop !222 _ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit10.i.i: ; preds = %920, %.thread.i.i.i.i6.i.i @@ -3422,8 +3422,8 @@ _ZN3tbb6detail2d217parallel_for_eachISt6vectorIPN4mold10ObjectFileINS4_6X86_64EE %1088 = load atomic i64, ptr %1050 acquire, align 8, !noalias !527 %.0.i.i.i.i.i.i.i.i112 = inttoptr i64 %1088 to ptr %1089 = icmp eq ptr %scevgep.i.i.i.i, %.0.i.i.i.i.i.i.i.i112 - %1090 = select i1 %1089, i64 3, i64 64 - %1091 = load ptr, ptr %16, align 8, !tbaa !503, !noalias !527 + %1090 = load ptr, ptr %16, align 8, !tbaa !503, !noalias !527 + %1091 = select i1 %1089, i64 2, i64 63 br label %1092 1092: ; preds = %1097, %_ZN3tbb6detail2d217parallel_for_eachISt6vectorIPN4mold10ObjectFileINS4_6X86_64EEESaIS8_EEZNS4_L18print_icf_sectionsIS6_EEvRNS4_7ContextIT_EEEUlS8_E_EEvRSD_RKT0_.exit.i @@ -3431,7 +3431,7 @@ _ZN3tbb6detail2d217parallel_for_eachISt6vectorIPN4mold10ObjectFileINS4_6X86_64EE %1093 = getelementptr inbounds nuw %"struct.std::atomic.567", ptr %.0.i.i.i.i.i.i.i.i112, i64 %.01015.i.i.i.i.i %1094 = load atomic i64, ptr %1093 monotonic, align 8, !noalias !527 %.0.i.i.i.i.i.i.i = inttoptr i64 %1094 to ptr - %.not.i.i.i.i15.i = icmp ult ptr %1091, %.0.i.i.i.i.i.i.i + %.not.i.i.i.i15.i = icmp ult ptr %1090, %.0.i.i.i.i.i.i.i br i1 %.not.i.i.i.i15.i, label %1097, label %.thread.i.i.i.i.i .thread.i.i.i.i.i: ; preds = %1092 @@ -3441,7 +3441,7 @@ _ZN3tbb6detail2d217parallel_for_eachISt6vectorIPN4mold10ObjectFileINS4_6X86_64EE 1097: ; preds = %1092 %1098 = add nuw nsw i64 %.01015.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i = icmp eq i64 %1098, %1090 + %exitcond.not.i.i.i.i.i = icmp eq i64 %1091, %.01015.i.i.i.i.i br i1 %exitcond.not.i.i.i.i.i, label %_ZN3tbb6detail2d117concurrent_vectorIPN4mold12InputSectionINS3_6X86_64EEENS1_23cache_aligned_allocatorIS7_EEE3endEv.exit.i, label %1092, !llvm.loop !530 _ZN3tbb6detail2d117concurrent_vectorIPN4mold12InputSectionINS3_6X86_64EEENS1_23cache_aligned_allocatorIS7_EEE3endEv.exit.i: ; preds = %1097, %.thread.i.i.i.i.i @@ -3703,8 +3703,8 @@ _ZN3tbb6detail2d113parallel_sortINS1_15vector_iteratorINS1_17concurrent_vectorIP %1202 = load atomic i64, ptr %1050 acquire, align 8, !noalias !563 %.0.i.i.i.i.i.i.i18.i = inttoptr i64 %1202 to ptr %1203 = icmp eq ptr %scevgep.i.i.i.i, %.0.i.i.i.i.i.i.i18.i - %1204 = select i1 %1203, i64 3, i64 64 - %1205 = load ptr, ptr %16, align 8, !tbaa !503, !noalias !563 + %1204 = load ptr, ptr %16, align 8, !tbaa !503, !noalias !563 + %1205 = select i1 %1203, i64 2, i64 63 br label %1206 1206: ; preds = %1211, %_ZN3tbb6detail2d113parallel_sortINS1_15vector_iteratorINS1_17concurrent_vectorIPN4mold12InputSectionINS5_6X86_64EEENS1_23cache_aligned_allocatorIS9_EEEES9_EEZNS5_L18print_icf_sectionsIS7_EEvRNS5_7ContextIT_EEEUlS9_S9_E_EEvSG_SG_RKT0_.exit.i @@ -3712,7 +3712,7 @@ _ZN3tbb6detail2d113parallel_sortINS1_15vector_iteratorINS1_17concurrent_vectorIP %1207 = getelementptr inbounds nuw %"struct.std::atomic.567", ptr %.0.i.i.i.i.i.i.i18.i, i64 %.01015.i.i.i.i19.i %1208 = load atomic i64, ptr %1207 monotonic, align 8, !noalias !563 %.0.i.i.i.i.i.i20.i = inttoptr i64 %1208 to ptr - %.not.i.i.i.i21.i = icmp ult ptr %1205, %.0.i.i.i.i.i.i20.i + %.not.i.i.i.i21.i = icmp ult ptr %1204, %.0.i.i.i.i.i.i20.i br i1 %.not.i.i.i.i21.i, label %1211, label %.thread.i.i.i.i22.i .thread.i.i.i.i22.i: ; preds = %1206 @@ -3722,7 +3722,7 @@ _ZN3tbb6detail2d113parallel_sortINS1_15vector_iteratorINS1_17concurrent_vectorIP 1211: ; preds = %1206 %1212 = add nuw nsw i64 %.01015.i.i.i.i19.i, 1 - %exitcond.not.i.i.i.i25.i = icmp eq i64 %1212, %1204 + %exitcond.not.i.i.i.i25.i = icmp eq i64 %1205, %.01015.i.i.i.i19.i br i1 %exitcond.not.i.i.i.i25.i, label %_ZN3tbb6detail2d117concurrent_vectorIPN4mold12InputSectionINS3_6X86_64EEENS1_23cache_aligned_allocatorIS7_EEE3endEv.exit26.i, label %1206, !llvm.loop !530 _ZN3tbb6detail2d117concurrent_vectorIPN4mold12InputSectionINS3_6X86_64EEENS1_23cache_aligned_allocatorIS7_EEE3endEv.exit26.i: ; preds = %1211, %.thread.i.i.i.i22.i @@ -5050,8 +5050,8 @@ _ZN3tbb6detail2d112parallel_forIlZN4moldL9propagateINS3_6X86_64EEElSt4spanISt6ve %85 = load atomic i64, ptr %49 acquire, align 8, !noalias !648 %.0.i.i.i.i.i.i.i.i = inttoptr i64 %85 to ptr %86 = icmp eq ptr %scevgep.i.i.i.i, %.0.i.i.i.i.i.i.i.i - %87 = select i1 %86, i64 3, i64 64 - %88 = load ptr, ptr %48, align 8, !tbaa !205, !noalias !648 + %87 = load ptr, ptr %48, align 8, !tbaa !205, !noalias !648 + %88 = select i1 %86, i64 2, i64 63 br label %89 89: ; preds = %94, %_ZN3tbb6detail2d112parallel_forIlZN4moldL9propagateINS3_6X86_64EEElSt4spanISt6vectorISt5arrayIhLm16EESaIS9_EELm18446744073709551615EES6_IjLm18446744073709551615EESD_RbS6_IhLm18446744073709551615EERNS1_20affinity_partitionerEEUllE_EEvT_SJ_RKT0_SH_.exit @@ -5059,7 +5059,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4moldL9propagateINS3_6X86_64EEElSt4spanISt6ve %90 = getelementptr inbounds nuw %"struct.std::atomic.255", ptr %.0.i.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i.i %91 = load atomic i64, ptr %90 monotonic, align 8, !noalias !648 %.0.i.i.i.i.i.i.i = inttoptr i64 %91 to ptr - %.not.i.i.i.i.i4 = icmp ult ptr %88, %.0.i.i.i.i.i.i.i + %.not.i.i.i.i.i4 = icmp ult ptr %87, %.0.i.i.i.i.i.i.i br i1 %.not.i.i.i.i.i4, label %94, label %.thread.i.i.i.i.i .thread.i.i.i.i.i: ; preds = %89 @@ -5069,7 +5069,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4moldL9propagateINS3_6X86_64EEElSt4spanISt6ve 94: ; preds = %89 %95 = add nuw nsw i64 %.01015.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i = icmp eq i64 %95, %87 + %exitcond.not.i.i.i.i.i = icmp eq i64 %88, %.01015.i.i.i.i.i br i1 %exitcond.not.i.i.i.i.i, label %_ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit.i, label %89, !llvm.loop !222 _ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit.i: ; preds = %94, %.thread.i.i.i.i.i @@ -5107,8 +5107,8 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI %109 = load atomic i64, ptr %49 acquire, align 8, !noalias !651 %.0.i.i.i.i.i.i.i2.i = inttoptr i64 %109 to ptr %110 = icmp eq ptr %scevgep.i.i.i.i, %.0.i.i.i.i.i.i.i2.i - %111 = select i1 %110, i64 3, i64 64 - %112 = load ptr, ptr %48, align 8, !tbaa !205, !noalias !651 + %111 = load ptr, ptr %48, align 8, !tbaa !205, !noalias !651 + %112 = select i1 %110, i64 2, i64 63 br label %113 113: ; preds = %118, %106 @@ -5116,7 +5116,7 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI %114 = getelementptr inbounds nuw %"struct.std::atomic.255", ptr %.0.i.i.i.i.i.i.i2.i, i64 %.01015.i.i.i.i3.i %115 = load atomic i64, ptr %114 monotonic, align 8, !noalias !651 %.0.i.i.i.i.i.i4.i = inttoptr i64 %115 to ptr - %.not.i.i.i.i5.i = icmp ult ptr %112, %.0.i.i.i.i.i.i4.i + %.not.i.i.i.i5.i = icmp ult ptr %111, %.0.i.i.i.i.i.i4.i br i1 %.not.i.i.i.i5.i, label %118, label %.thread.i.i.i.i6.i .thread.i.i.i.i6.i: ; preds = %113 @@ -5126,7 +5126,7 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI 118: ; preds = %113 %119 = add nuw nsw i64 %.01015.i.i.i.i3.i, 1 - %exitcond.not.i.i.i.i9.i = icmp eq i64 %119, %111 + %exitcond.not.i.i.i.i9.i = icmp eq i64 %112, %.01015.i.i.i.i3.i br i1 %exitcond.not.i.i.i.i9.i, label %_ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit10.i, label %113, !llvm.loop !222 _ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit10.i: ; preds = %118, %.thread.i.i.i.i6.i diff --git a/bench/mold/optimized/passes.cc.X86_64.ll b/bench/mold/optimized/passes.cc.X86_64.ll index 4c088d0c727..b8f410c0fcf 100644 --- a/bench/mold/optimized/passes.cc.X86_64.ll +++ b/bench/mold/optimized/passes.cc.X86_64.ll @@ -11677,8 +11677,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS %.0.i.i.i.i.i.i.i.i.i = inttoptr i64 %27 to ptr %28 = getelementptr inbounds nuw i8, ptr %0, i64 2520 %29 = icmp eq ptr %28, %.0.i.i.i.i.i.i.i.i.i - %30 = select i1 %29, i64 3, i64 64 - %31 = load ptr, ptr %22, align 8, !tbaa !790, !noalias !789 + %30 = load ptr, ptr %22, align 8, !tbaa !790, !noalias !789 + %31 = select i1 %29, i64 2, i64 63 br label %32 32: ; preds = %37, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit @@ -11686,7 +11686,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS %33 = getelementptr inbounds nuw %"struct.std::atomic.106", ptr %.0.i.i.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i.i.i %34 = load atomic i64, ptr %33 monotonic, align 8, !noalias !789 %.0.i.i.i.i.i.i.i.i = inttoptr i64 %34 to ptr - %.not.i.i.i.i.i.i = icmp ult ptr %31, %.0.i.i.i.i.i.i.i.i + %.not.i.i.i.i.i.i = icmp ult ptr %30, %.0.i.i.i.i.i.i.i.i br i1 %.not.i.i.i.i.i.i, label %37, label %.thread.i.i.i.i.i.i .thread.i.i.i.i.i.i: ; preds = %32 @@ -11696,7 +11696,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %_ZNKS 37: ; preds = %32 %38 = add nuw nsw i64 %.01015.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i = icmp eq i64 %38, %30 + %exitcond.not.i.i.i.i.i.i = icmp eq i64 %31, %.01015.i.i.i.i.i.i br i1 %exitcond.not.i.i.i.i.i.i, label %_ZN3tbb6detail2d217parallel_for_eachINS0_2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS6_6X86_64EEESt14default_deleteIS9_EENS3_23cache_aligned_allocatorISC_EEEEZNS6_22create_merged_sectionsIS8_EEvRNS6_7ContextIT_EEEUlRSC_E_EEvRSI_RKT0_.exit, label %32, !llvm.loop !791 _ZN3tbb6detail2d217parallel_for_eachINS0_2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS6_6X86_64EEESt14default_deleteIS9_EENS3_23cache_aligned_allocatorISC_EEEEZNS6_22create_merged_sectionsIS8_EEvRNS6_7ContextIT_EEEUlRSC_E_EEvRSI_RKT0_.exit: ; preds = %37, %.thread.i.i.i.i.i.i @@ -11915,8 +11915,8 @@ _ZN3tbb6detail2d126enumerable_thread_specificISt13unordered_mapIN4mold16OutputSe %.0.i.i.i.i.i.i.i = inttoptr i64 %69 to ptr %70 = getelementptr inbounds nuw i8, ptr %0, i64 3096 %71 = icmp eq ptr %70, %.0.i.i.i.i.i.i.i - %72 = select i1 %71, i64 3, i64 64 - %73 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !823 + %72 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !823 + %73 = select i1 %71, i64 2, i64 63 br label %74 74: ; preds = %79, %_ZN3tbb6detail2d126enumerable_thread_specificISt13unordered_mapIN4mold16OutputSectionKeyEPNS4_13OutputSectionINS4_6X86_64EEENS5_4HashESt8equal_toIS5_ESaISt4pairIKS5_S9_EEENS1_23cache_aligned_allocatorISH_EELNS1_18ets_key_usage_typeE1EEC2Ev.exit @@ -11924,7 +11924,7 @@ _ZN3tbb6detail2d126enumerable_thread_specificISt13unordered_mapIN4mold16OutputSe %75 = getelementptr inbounds nuw %"struct.std::atomic.170", ptr %.0.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i %76 = load atomic i64, ptr %75 monotonic, align 8, !noalias !823 %.0.i.i.i.i.i.i = inttoptr i64 %76 to ptr - %.not.i.i.i.i = icmp ult ptr %73, %.0.i.i.i.i.i.i + %.not.i.i.i.i = icmp ult ptr %72, %.0.i.i.i.i.i.i br i1 %.not.i.i.i.i, label %79, label %.thread.i.i.i.i .thread.i.i.i.i: ; preds = %74 @@ -11934,7 +11934,7 @@ _ZN3tbb6detail2d126enumerable_thread_specificISt13unordered_mapIN4mold16OutputSe 79: ; preds = %74 %80 = add nuw nsw i64 %.01015.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %80, %72 + %exitcond.not.i.i.i.i = icmp eq i64 %73, %.01015.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit, label %74, !llvm.loop !827 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit: ; preds = %79, %.thread.i.i.i.i @@ -11981,8 +11981,8 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEv %94 = load atomic i64, ptr %68 acquire, align 8, !noalias !835 %.0.i.i.i.i.i.i.i39 = inttoptr i64 %94 to ptr %95 = icmp eq ptr %70, %.0.i.i.i.i.i.i.i39 - %96 = select i1 %95, i64 3, i64 64 - %97 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !835 + %96 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !835 + %97 = select i1 %95, i64 2, i64 63 br label %98 98: ; preds = %103, %_ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEvRNS3_7ContextIT_EEEUllE_EEvS7_S7_RKT0_.exit @@ -11990,7 +11990,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEv %99 = getelementptr inbounds nuw %"struct.std::atomic.170", ptr %.0.i.i.i.i.i.i.i39, i64 %.01015.i.i.i.i40 %100 = load atomic i64, ptr %99 monotonic, align 8, !noalias !835 %.0.i.i.i.i.i.i41 = inttoptr i64 %100 to ptr - %.not.i.i.i.i42 = icmp ult ptr %97, %.0.i.i.i.i.i.i41 + %.not.i.i.i.i42 = icmp ult ptr %96, %.0.i.i.i.i.i.i41 br i1 %.not.i.i.i.i42, label %103, label %.thread.i.i.i.i43 .thread.i.i.i.i43: ; preds = %98 @@ -12000,7 +12000,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEv 103: ; preds = %98 %104 = add nuw nsw i64 %.01015.i.i.i.i40, 1 - %exitcond.not.i.i.i.i46 = icmp eq i64 %104, %96 + %exitcond.not.i.i.i.i46 = icmp eq i64 %97, %.01015.i.i.i.i40 br i1 %exitcond.not.i.i.i.i46, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit47, label %98, !llvm.loop !827 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit47: ; preds = %103, %.thread.i.i.i.i43 @@ -12094,8 +12094,8 @@ _ZNSt6vectorIS_IPN4mold12InputSectionINS0_6X86_64EEESaIS4_EESaIS6_EE6resizeEm.ex %149 = load atomic i64, ptr %68 acquire, align 8, !noalias !847 %.0.i.i.i.i.i.i.i52 = inttoptr i64 %149 to ptr %150 = icmp eq ptr %70, %.0.i.i.i.i.i.i.i52 - %151 = select i1 %150, i64 3, i64 64 - %152 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !847 + %151 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !847 + %152 = select i1 %150, i64 2, i64 63 br label %153 153: ; preds = %158, %._crit_edge250 @@ -12103,7 +12103,7 @@ _ZNSt6vectorIS_IPN4mold12InputSectionINS0_6X86_64EEESaIS4_EESaIS6_EE6resizeEm.ex %154 = getelementptr inbounds nuw %"struct.std::atomic.170", ptr %.0.i.i.i.i.i.i.i52, i64 %.01015.i.i.i.i53 %155 = load atomic i64, ptr %154 monotonic, align 8, !noalias !847 %.0.i.i.i.i.i.i54 = inttoptr i64 %155 to ptr - %.not.i.i.i.i55 = icmp ult ptr %152, %.0.i.i.i.i.i.i54 + %.not.i.i.i.i55 = icmp ult ptr %151, %.0.i.i.i.i.i.i54 br i1 %.not.i.i.i.i55, label %158, label %.thread.i.i.i.i56 .thread.i.i.i.i56: ; preds = %153 @@ -12113,7 +12113,7 @@ _ZNSt6vectorIS_IPN4mold12InputSectionINS0_6X86_64EEESaIS4_EESaIS6_EE6resizeEm.ex 158: ; preds = %153 %159 = add nuw nsw i64 %.01015.i.i.i.i53, 1 - %exitcond.not.i.i.i.i59 = icmp eq i64 %159, %151 + %exitcond.not.i.i.i.i59 = icmp eq i64 %152, %.01015.i.i.i.i53 br i1 %exitcond.not.i.i.i.i59, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit60, label %153, !llvm.loop !827 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit60: ; preds = %158, %.thread.i.i.i.i56 @@ -12210,8 +12210,8 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEv %204 = load atomic i64, ptr %68 acquire, align 8, !noalias !856 %.0.i.i.i.i.i.i.i70 = inttoptr i64 %204 to ptr %205 = icmp eq ptr %70, %.0.i.i.i.i.i.i.i70 - %206 = select i1 %205, i64 3, i64 64 - %207 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !856 + %206 = load ptr, ptr %65, align 8, !tbaa !826, !noalias !856 + %207 = select i1 %205, i64 2, i64 63 br label %208 208: ; preds = %213, %._crit_edge255 @@ -12219,7 +12219,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEv %209 = getelementptr inbounds nuw %"struct.std::atomic.170", ptr %.0.i.i.i.i.i.i.i70, i64 %.01015.i.i.i.i71 %210 = load atomic i64, ptr %209 monotonic, align 8, !noalias !856 %.0.i.i.i.i.i.i72 = inttoptr i64 %210 to ptr - %.not.i.i.i.i73 = icmp ult ptr %207, %.0.i.i.i.i.i.i72 + %.not.i.i.i.i73 = icmp ult ptr %206, %.0.i.i.i.i.i.i72 br i1 %.not.i.i.i.i73, label %213, label %.thread.i.i.i.i74 .thread.i.i.i.i74: ; preds = %208 @@ -12229,7 +12229,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold22create_output_sectionsINS3_6X86_64EEEv 213: ; preds = %208 %214 = add nuw nsw i64 %.01015.i.i.i.i71, 1 - %exitcond.not.i.i.i.i77 = icmp eq i64 %214, %206 + %exitcond.not.i.i.i.i77 = icmp eq i64 %207, %.01015.i.i.i.i71 br i1 %exitcond.not.i.i.i.i77, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit78, label %208, !llvm.loop !827 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13OutputSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit78: ; preds = %213, %.thread.i.i.i.i74 @@ -12525,8 +12525,8 @@ _ZNSt6vectorIS_IPN4mold12InputSectionINS0_6X86_64EEESaIS4_EESaIS6_EE5clearEv.exi %.0.i.i.i.i.i.i.i99 = inttoptr i64 %344 to ptr %345 = getelementptr inbounds nuw i8, ptr %0, i64 2520 %346 = icmp eq ptr %345, %.0.i.i.i.i.i.i.i99 - %347 = select i1 %346, i64 3, i64 64 - %348 = load ptr, ptr %340, align 8, !tbaa !790, !noalias !865 + %347 = load ptr, ptr %340, align 8, !tbaa !790, !noalias !865 + %348 = select i1 %346, i64 2, i64 63 br label %349 349: ; preds = %354, %._crit_edge263 @@ -12534,7 +12534,7 @@ _ZNSt6vectorIS_IPN4mold12InputSectionINS0_6X86_64EEESaIS4_EESaIS6_EE5clearEv.exi %350 = getelementptr inbounds nuw %"struct.std::atomic.106", ptr %.0.i.i.i.i.i.i.i99, i64 %.01015.i.i.i.i100 %351 = load atomic i64, ptr %350 monotonic, align 8, !noalias !865 %.0.i.i.i.i.i.i101 = inttoptr i64 %351 to ptr - %.not.i.i.i.i102 = icmp ult ptr %348, %.0.i.i.i.i.i.i101 + %.not.i.i.i.i102 = icmp ult ptr %347, %.0.i.i.i.i.i.i101 br i1 %.not.i.i.i.i102, label %354, label %.thread.i.i.i.i103 .thread.i.i.i.i103: ; preds = %349 @@ -12544,7 +12544,7 @@ _ZNSt6vectorIS_IPN4mold12InputSectionINS0_6X86_64EEESaIS4_EESaIS6_EE5clearEv.exi 354: ; preds = %349 %355 = add nuw nsw i64 %.01015.i.i.i.i100, 1 - %exitcond.not.i.i.i.i106 = icmp eq i64 %355, %347 + %exitcond.not.i.i.i.i106 = icmp eq i64 %348, %.01015.i.i.i.i100 br i1 %exitcond.not.i.i.i.i106, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit, label %349, !llvm.loop !791 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit: ; preds = %354, %.thread.i.i.i.i103 @@ -16955,8 +16955,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64: ; preds = %_ZN %.0.i.i.i.i.i.i.i = inttoptr i64 %367 to ptr %368 = getelementptr inbounds nuw i8, ptr %0, i64 2952 %369 = icmp eq ptr %368, %.0.i.i.i.i.i.i.i - %370 = select i1 %369, i64 3, i64 64 - %371 = load ptr, ptr %363, align 8, !tbaa !1053, !noalias !1050 + %370 = load ptr, ptr %363, align 8, !tbaa !1053, !noalias !1050 + %371 = select i1 %369, i64 2, i64 63 br label %372 372: ; preds = %377, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64 @@ -16964,7 +16964,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64: ; preds = %_ZN %373 = getelementptr inbounds nuw %"struct.std::atomic.154", ptr %.0.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i %374 = load atomic i64, ptr %373 monotonic, align 8, !noalias !1050 %.0.i.i.i.i.i.i = inttoptr i64 %374 to ptr - %.not.i.i.i.i65 = icmp ult ptr %371, %.0.i.i.i.i.i.i + %.not.i.i.i.i65 = icmp ult ptr %370, %.0.i.i.i.i.i.i br i1 %.not.i.i.i.i65, label %377, label %.thread.i.i.i.i .thread.i.i.i.i: ; preds = %372 @@ -16974,7 +16974,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit64: ; preds = %_ZN 377: ; preds = %372 %378 = add nuw nsw i64 %.01015.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %378, %370 + %exitcond.not.i.i.i.i = icmp eq i64 %371, %.01015.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold10MappedFileESt14default_deleteIS5_EENS1_23cache_aligned_allocatorIS8_EEE3endEv.exit, label %372, !llvm.loop !1054 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold10MappedFileESt14default_deleteIS5_EENS1_23cache_aligned_allocatorIS8_EEE3endEv.exit: ; preds = %377, %.thread.i.i.i.i @@ -22120,8 +22120,8 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold12sort_dynsymsINS3_6X86_64EEEvRNS3_7Cont %105 = load atomic i64, ptr %89 acquire, align 8, !noalias !1217 %.0.i.i.i.i.i.i.i.i = inttoptr i64 %105 to ptr %106 = icmp eq ptr %scevgep.i.i.i.i, %.0.i.i.i.i.i.i.i.i - %107 = select i1 %106, i64 3, i64 64 - %108 = load ptr, ptr %88, align 8, !tbaa !1208, !noalias !1217 + %107 = load ptr, ptr %88, align 8, !tbaa !1208, !noalias !1217 + %108 = select i1 %106, i64 2, i64 63 br label %109 109: ; preds = %114, %_ZN3tbb6detail2d112parallel_forIlZN4mold12sort_dynsymsINS3_6X86_64EEEvRNS3_7ContextIT_EEEUllE_EEvS7_S7_RKT0_.exit @@ -22129,7 +22129,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold12sort_dynsymsINS3_6X86_64EEEvRNS3_7Cont %110 = getelementptr inbounds nuw %"struct.std::atomic.598", ptr %.0.i.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i.i %111 = load atomic i64, ptr %110 monotonic, align 8, !noalias !1217 %.0.i.i.i.i.i.i.i = inttoptr i64 %111 to ptr - %.not.i.i.i.i.i22 = icmp ult ptr %108, %.0.i.i.i.i.i.i.i + %.not.i.i.i.i.i22 = icmp ult ptr %107, %.0.i.i.i.i.i.i.i br i1 %.not.i.i.i.i.i22, label %114, label %.thread.i.i.i.i.i .thread.i.i.i.i.i: ; preds = %109 @@ -22139,7 +22139,7 @@ _ZN3tbb6detail2d112parallel_forIlZN4mold12sort_dynsymsINS3_6X86_64EEEvRNS3_7Cont 114: ; preds = %109 %115 = add nuw nsw i64 %.01015.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i = icmp eq i64 %115, %107 + %exitcond.not.i.i.i.i.i = icmp eq i64 %108, %.01015.i.i.i.i.i br i1 %exitcond.not.i.i.i.i.i, label %_ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit.i, label %109, !llvm.loop !1220 _ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit.i: ; preds = %114, %.thread.i.i.i.i.i @@ -22177,8 +22177,8 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI %129 = load atomic i64, ptr %89 acquire, align 8, !noalias !1224 %.0.i.i.i.i.i.i.i2.i = inttoptr i64 %129 to ptr %130 = icmp eq ptr %scevgep.i.i.i.i, %.0.i.i.i.i.i.i.i2.i - %131 = select i1 %130, i64 3, i64 64 - %132 = load ptr, ptr %88, align 8, !tbaa !1208, !noalias !1224 + %131 = load ptr, ptr %88, align 8, !tbaa !1208, !noalias !1224 + %132 = select i1 %130, i64 2, i64 63 br label %133 133: ; preds = %138, %126 @@ -22186,7 +22186,7 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI %134 = getelementptr inbounds nuw %"struct.std::atomic.598", ptr %.0.i.i.i.i.i.i.i2.i, i64 %.01015.i.i.i.i3.i %135 = load atomic i64, ptr %134 monotonic, align 8, !noalias !1224 %.0.i.i.i.i.i.i4.i = inttoptr i64 %135 to ptr - %.not.i.i.i.i5.i = icmp ult ptr %132, %.0.i.i.i.i.i.i4.i + %.not.i.i.i.i5.i = icmp ult ptr %131, %.0.i.i.i.i.i.i4.i br i1 %.not.i.i.i.i5.i, label %138, label %.thread.i.i.i.i6.i .thread.i.i.i.i6.i: ; preds = %133 @@ -22196,7 +22196,7 @@ _ZNK3tbb6detail2d135enumerable_thread_specific_iteratorINS1_17concurrent_vectorI 138: ; preds = %133 %139 = add nuw nsw i64 %.01015.i.i.i.i3.i, 1 - %exitcond.not.i.i.i.i9.i = icmp eq i64 %139, %131 + %exitcond.not.i.i.i.i9.i = icmp eq i64 %132, %.01015.i.i.i.i3.i br i1 %exitcond.not.i.i.i.i9.i, label %_ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit10.i, label %133, !llvm.loop !1220 _ZN3tbb6detail2d126enumerable_thread_specificIlNS1_23cache_aligned_allocatorIlEELNS1_18ets_key_usage_typeE1EE3endEv.exit10.i: ; preds = %138, %.thread.i.i.i.i6.i @@ -27249,8 +27249,8 @@ define weak_odr dso_local void @_ZN4mold21write_dependency_fileINS_6X86_64EEEvRN %.0.i.i.i.i.i.i.i = inttoptr i64 %18 to ptr %19 = getelementptr inbounds nuw i8, ptr %0, i64 2952 %20 = icmp eq ptr %19, %.0.i.i.i.i.i.i.i - %21 = select i1 %20, i64 3, i64 64 - %22 = load ptr, ptr %14, align 8, !tbaa !1053, !noalias !1360 + %21 = load ptr, ptr %14, align 8, !tbaa !1053, !noalias !1360 + %22 = select i1 %20, i64 2, i64 63 br label %23 23: ; preds = %28, %1 @@ -27258,7 +27258,7 @@ define weak_odr dso_local void @_ZN4mold21write_dependency_fileINS_6X86_64EEEvRN %24 = getelementptr inbounds nuw %"struct.std::atomic.154", ptr %.0.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i %25 = load atomic i64, ptr %24 monotonic, align 8, !noalias !1360 %.0.i.i.i.i.i.i = inttoptr i64 %25 to ptr - %.not.i.i.i.i = icmp ult ptr %22, %.0.i.i.i.i.i.i + %.not.i.i.i.i = icmp ult ptr %21, %.0.i.i.i.i.i.i br i1 %.not.i.i.i.i, label %28, label %.thread.i.i.i.i .thread.i.i.i.i: ; preds = %23 @@ -27268,7 +27268,7 @@ define weak_odr dso_local void @_ZN4mold21write_dependency_fileINS_6X86_64EEEvRN 28: ; preds = %23 %29 = add nuw nsw i64 %.01015.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %29, %21 + %exitcond.not.i.i.i.i = icmp eq i64 %22, %.01015.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold10MappedFileESt14default_deleteIS5_EENS1_23cache_aligned_allocatorIS8_EEE3endEv.exit, label %23, !llvm.loop !1054 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold10MappedFileESt14default_deleteIS5_EENS1_23cache_aligned_allocatorIS8_EEE3endEv.exit: ; preds = %28, %.thread.i.i.i.i @@ -28411,8 +28411,8 @@ _ZN4mold7CounterpLEi.exit81: ; preds = %288, %291 %.0.i.i.i.i.i.i.i = inttoptr i64 %314 to ptr %315 = getelementptr inbounds nuw i8, ptr %0, i64 2952 %316 = icmp eq ptr %315, %.0.i.i.i.i.i.i.i - %317 = select i1 %316, i64 3, i64 64 - %318 = load ptr, ptr %310, align 8, !tbaa !1053, !noalias !1392 + %317 = load ptr, ptr %310, align 8, !tbaa !1053, !noalias !1392 + %318 = select i1 %316, i64 2, i64 63 br label %319 319: ; preds = %324, %309 @@ -28420,7 +28420,7 @@ _ZN4mold7CounterpLEi.exit81: ; preds = %288, %291 %320 = getelementptr inbounds nuw %"struct.std::atomic.154", ptr %.0.i.i.i.i.i.i.i, i64 %.01015.i.i.i.i %321 = load atomic i64, ptr %320 monotonic, align 8, !noalias !1392 %.0.i.i.i.i.i.i = inttoptr i64 %321 to ptr - %.not.i.i.i.i = icmp ult ptr %318, %.0.i.i.i.i.i.i + %.not.i.i.i.i = icmp ult ptr %317, %.0.i.i.i.i.i.i br i1 %.not.i.i.i.i, label %324, label %.thread.i.i.i.i .thread.i.i.i.i: ; preds = %319 @@ -28430,7 +28430,7 @@ _ZN4mold7CounterpLEi.exit81: ; preds = %288, %291 324: ; preds = %319 %325 = add nuw nsw i64 %.01015.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %325, %317 + %exitcond.not.i.i.i.i = icmp eq i64 %318, %.01015.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold10MappedFileESt14default_deleteIS5_EENS1_23cache_aligned_allocatorIS8_EEE3endEv.exit, label %319, !llvm.loop !1054 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold10MappedFileESt14default_deleteIS5_EENS1_23cache_aligned_allocatorIS8_EEE3endEv.exit: ; preds = %324, %.thread.i.i.i.i @@ -28625,8 +28625,8 @@ _ZN4mold7CounterpLEi.exit84: ; preds = %.lr.ph267.split, %3 %.0.i.i.i.i.i.i.i85 = inttoptr i64 %428 to ptr %429 = getelementptr inbounds nuw i8, ptr %0, i64 2520 %430 = icmp eq ptr %429, %.0.i.i.i.i.i.i.i85 - %431 = select i1 %430, i64 3, i64 64 - %432 = load ptr, ptr %424, align 8, !tbaa !790, !noalias !1399 + %431 = load ptr, ptr %424, align 8, !tbaa !790, !noalias !1399 + %432 = select i1 %430, i64 2, i64 63 br label %433 433: ; preds = %438, %423 @@ -28634,7 +28634,7 @@ _ZN4mold7CounterpLEi.exit84: ; preds = %.lr.ph267.split, %3 %434 = getelementptr inbounds nuw %"struct.std::atomic.106", ptr %.0.i.i.i.i.i.i.i85, i64 %.01015.i.i.i.i86 %435 = load atomic i64, ptr %434 monotonic, align 8, !noalias !1399 %.0.i.i.i.i.i.i87 = inttoptr i64 %435 to ptr - %.not.i.i.i.i88 = icmp ult ptr %432, %.0.i.i.i.i.i.i87 + %.not.i.i.i.i88 = icmp ult ptr %431, %.0.i.i.i.i.i.i87 br i1 %.not.i.i.i.i88, label %438, label %.thread.i.i.i.i89 .thread.i.i.i.i89: ; preds = %433 @@ -28644,7 +28644,7 @@ _ZN4mold7CounterpLEi.exit84: ; preds = %.lr.ph267.split, %3 438: ; preds = %433 %439 = add nuw nsw i64 %.01015.i.i.i.i86, 1 - %exitcond.not.i.i.i.i92 = icmp eq i64 %439, %431 + %exitcond.not.i.i.i.i92 = icmp eq i64 %432, %.01015.i.i.i.i86 br i1 %exitcond.not.i.i.i.i92, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit, label %433, !llvm.loop !791 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit: ; preds = %438, %.thread.i.i.i.i89 @@ -28659,8 +28659,8 @@ _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X %441 = load atomic i64, ptr %427 acquire, align 8, !noalias !1402 %.0.i.i.i.i.i.i.i94 = inttoptr i64 %441 to ptr %442 = icmp eq ptr %429, %.0.i.i.i.i.i.i.i94 - %443 = select i1 %442, i64 3, i64 64 - %444 = load ptr, ptr %424, align 8, !tbaa !790, !noalias !1402 + %443 = load ptr, ptr %424, align 8, !tbaa !790, !noalias !1402 + %444 = select i1 %442, i64 2, i64 63 br label %445 445: ; preds = %450, %._crit_edge275 @@ -28668,7 +28668,7 @@ _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X %446 = getelementptr inbounds nuw %"struct.std::atomic.106", ptr %.0.i.i.i.i.i.i.i94, i64 %.01015.i.i.i.i95 %447 = load atomic i64, ptr %446 monotonic, align 8, !noalias !1402 %.0.i.i.i.i.i.i96 = inttoptr i64 %447 to ptr - %.not.i.i.i.i97 = icmp ult ptr %444, %.0.i.i.i.i.i.i96 + %.not.i.i.i.i97 = icmp ult ptr %443, %.0.i.i.i.i.i.i96 br i1 %.not.i.i.i.i97, label %450, label %.thread.i.i.i.i98 .thread.i.i.i.i98: ; preds = %445 @@ -28678,7 +28678,7 @@ _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X 450: ; preds = %445 %451 = add nuw nsw i64 %.01015.i.i.i.i95, 1 - %exitcond.not.i.i.i.i101 = icmp eq i64 %451, %443 + %exitcond.not.i.i.i.i101 = icmp eq i64 %444, %.01015.i.i.i.i95 br i1 %exitcond.not.i.i.i.i101, label %_ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit102, label %445, !llvm.loop !791 _ZN3tbb6detail2d117concurrent_vectorISt10unique_ptrIN4mold13MergedSectionINS4_6X86_64EEESt14default_deleteIS7_EENS1_23cache_aligned_allocatorISA_EEE3endEv.exit102: ; preds = %450, %.thread.i.i.i.i98 @@ -64308,8 +64308,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEmc.exit99: ; preds store i64 0, ptr %116, align 8, !tbaa !17 %117 = load ptr, ptr %115, align 8, !tbaa !343 store i8 0, ptr %117, align 1, !tbaa !19 - %118 = select i1 %114, i32 2, i32 4 - %119 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %118 = getelementptr inbounds nuw i8, ptr %0, i64 216 + %119 = select i1 %114, i32 1, i32 3 br label %122 120: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit @@ -64347,7 +64347,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEmc.exit99: ; preds %139 = load i64, ptr %116, align 8, !tbaa !17 %140 = add i64 %139, 1 %141 = load ptr, ptr %115, align 8, !tbaa !343 - %142 = icmp eq ptr %141, %119 + %142 = icmp eq ptr %141, %118 br i1 %142, label %143, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i101 143: ; preds = %136 @@ -64356,7 +64356,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEmc.exit99: ; preds br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i101 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i101: ; preds = %143, %136 - %145 = load i64, ptr %119, align 8 + %145 = load i64, ptr %118, align 8 %146 = select i1 %142, i64 15, i64 %145 %147 = icmp ugt i64 %140, %146 br i1 %147, label %148, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit @@ -64375,7 +64375,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit: ; preds = %_ZNKS %152 = getelementptr inbounds nuw i8, ptr %151, i64 %140 store i8 0, ptr %152, align 1, !tbaa !19 %153 = add nuw nsw i32 %.0110, 1 - %exitcond.not = icmp eq i32 %153, %118 + %exitcond.not = icmp eq i32 %119, %.0110 br i1 %exitcond.not, label %120, label %122, !llvm.loop !2335 154: ; preds = %.loopexit diff --git a/bench/node/optimized/libnode.node_sockaddr.ll b/bench/node/optimized/libnode.node_sockaddr.ll index e55f255cdef..8f3df0bccc1 100644 --- a/bench/node/optimized/libnode.node_sockaddr.ll +++ b/bench/node/optimized/libnode.node_sockaddr.ll @@ -591,11 +591,10 @@ entry: do.body.i: ; preds = %entry %0 = load i32, ptr %len.i, align 4, !noalias !5 - %conv.i = sext i32 %0 to i64 %1 = load i16, ptr %address_.i.i, align 8, !alias.scope !5 %cmp.i.i.i.i = icmp eq i16 %1, 2 - %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i64 16, i64 28 - %cmp3.not.i = icmp eq i64 %cond.i.i.i.i, %conv.i + %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i32 16, i32 28 + %cmp3.not.i = icmp eq i32 %cond.i.i.i.i, %0 br i1 %cmp3.not.i, label %_ZN4node12_GLOBAL__N_112FromUVHandleI8uv_tcp_sPFiPKS2_P8sockaddrPiEEENS_13SocketAddressET0_RKT_.exit, label %do.body8.i do.body8.i: ; preds = %do.body.i @@ -629,11 +628,10 @@ entry: do.body.i: ; preds = %entry %0 = load i32, ptr %len.i, align 4, !noalias !9 - %conv.i = sext i32 %0 to i64 %1 = load i16, ptr %address_.i.i, align 8, !alias.scope !9 %cmp.i.i.i.i = icmp eq i16 %1, 2 - %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i64 16, i64 28 - %cmp3.not.i = icmp eq i64 %cond.i.i.i.i, %conv.i + %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i32 16, i32 28 + %cmp3.not.i = icmp eq i32 %cond.i.i.i.i, %0 br i1 %cmp3.not.i, label %_ZN4node12_GLOBAL__N_112FromUVHandleI8uv_udp_sPFiPKS2_P8sockaddrPiEEENS_13SocketAddressET0_RKT_.exit, label %do.body8.i do.body8.i: ; preds = %do.body.i @@ -667,11 +665,10 @@ entry: do.body.i: ; preds = %entry %0 = load i32, ptr %len.i, align 4, !noalias !13 - %conv.i = sext i32 %0 to i64 %1 = load i16, ptr %address_.i.i, align 8, !alias.scope !13 %cmp.i.i.i.i = icmp eq i16 %1, 2 - %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i64 16, i64 28 - %cmp3.not.i = icmp eq i64 %cond.i.i.i.i, %conv.i + %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i32 16, i32 28 + %cmp3.not.i = icmp eq i32 %cond.i.i.i.i, %0 br i1 %cmp3.not.i, label %_ZN4node12_GLOBAL__N_112FromUVHandleI8uv_tcp_sPFiPKS2_P8sockaddrPiEEENS_13SocketAddressET0_RKT_.exit, label %do.body8.i do.body8.i: ; preds = %do.body.i @@ -705,11 +702,10 @@ entry: do.body.i: ; preds = %entry %0 = load i32, ptr %len.i, align 4, !noalias !16 - %conv.i = sext i32 %0 to i64 %1 = load i16, ptr %address_.i.i, align 8, !alias.scope !16 %cmp.i.i.i.i = icmp eq i16 %1, 2 - %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i64 16, i64 28 - %cmp3.not.i = icmp eq i64 %cond.i.i.i.i, %conv.i + %cond.i.i.i.i = select i1 %cmp.i.i.i.i, i32 16, i32 28 + %cmp3.not.i = icmp eq i32 %cond.i.i.i.i, %0 br i1 %cmp3.not.i, label %_ZN4node12_GLOBAL__N_112FromUVHandleI8uv_udp_sPFiPKS2_P8sockaddrPiEEENS_13SocketAddressET0_RKT_.exit, label %do.body8.i do.body8.i: ; preds = %do.body.i diff --git a/bench/open3d/optimized/FileGLTF.ll b/bench/open3d/optimized/FileGLTF.ll index 1afbeecaf16..c147e49ebe8 100644 --- a/bench/open3d/optimized/FileGLTF.ll +++ b/bench/open3d/optimized/FileGLTF.ll @@ -205167,19 +205167,22 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222: ; preds = % store i32 %389, ptr %361, align 4, !tbaa !521 %390 = mul nsw i64 %134, 3 store i64 %390, ptr %362, align 8, !tbaa !522 - %391 = select i1 %162, i64 4, i64 2 - %392 = select i1 %162, i64 2, i64 1 - %393 = shl nsw i64 %390, %392 - %394 = trunc i64 %184 to i32 - store i32 %394, ptr %18, align 8, !tbaa !486 - %395 = load ptr, ptr %168, align 8, !tbaa !648 - %396 = getelementptr inbounds nuw %"struct.tinygltf::BufferView", ptr %395, i64 %184, i32 4 - %397 = load i64, ptr %396, align 8, !tbaa !556 - store i64 %397, ptr %359, align 8, !tbaa !520 - %398 = add i64 %397, %393 - store i64 %398, ptr %396, align 8, !tbaa !556 + %391 = select i1 %162, i64 2, i64 1 + %392 = shl nsw i64 %390, %391 + %393 = trunc i64 %184 to i32 + store i32 %393, ptr %18, align 8, !tbaa !486 + %394 = load ptr, ptr %168, align 8, !tbaa !648 + %395 = getelementptr inbounds nuw %"struct.tinygltf::BufferView", ptr %394, i64 %184, i32 4 + %396 = load i64, ptr %395, align 8, !tbaa !556 + store i64 %396, ptr %359, align 8, !tbaa !520 + %397 = add i64 %396, %392 + store i64 %397, ptr %395, align 8, !tbaa !556 %.not = icmp eq ptr %129, %130 - br i1 %.not, label %._crit_edge, label %.lr.ph + br i1 %.not, label %._crit_edge, label %.lr.ph.preheader + +.lr.ph.preheader: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222 + %398 = select i1 %162, i64 3, i64 1 + br label %.lr.ph ._crit_edge.loopexit: ; preds = %442 %399 = ptrtoint ptr %.sroa.13.3 to i64 @@ -205291,11 +205294,11 @@ _ZNSt6vectorIdSaIdEE17_M_realloc_insertIJdEEEvN9__gnu_cxx17__normal_iteratorIPdS cleanup br label %_ZNSt6vectorIhSaIhEED2Ev.exit398 -.lr.ph: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222, %442 - %.0152585 = phi i64 [ %443, %442 ], [ 0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222 ] - %.sroa.0422.0584 = phi ptr [ %.sroa.0422.4, %442 ], [ null, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222 ] - %.sroa.13.0583 = phi ptr [ %.sroa.13.3, %442 ], [ null, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222 ] - %.sroa.21.0582 = phi ptr [ %.sroa.21.4, %442 ], [ null, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit222 ] +.lr.ph: ; preds = %.lr.ph.preheader, %442 + %.0152585 = phi i64 [ %443, %442 ], [ 0, %.lr.ph.preheader ] + %.sroa.0422.0584 = phi ptr [ %.sroa.0422.4, %442 ], [ null, %.lr.ph.preheader ] + %.sroa.13.0583 = phi ptr [ %.sroa.13.3, %442 ], [ null, %.lr.ph.preheader ] + %.sroa.21.0582 = phi ptr [ %.sroa.21.4, %442 ], [ null, %.lr.ph.preheader ] %440 = load ptr, ptr %127, align 8, !tbaa !3938 %441 = getelementptr inbounds nuw %"class.Eigen::Matrix.502", ptr %440, i64 %.0152585 br label %444 @@ -205389,7 +205392,7 @@ _ZNSt6vectorIhSaIhEE9push_backERKh.exit: ; preds = %_ZNSt6vectorIhSaIhE %.sroa.0422.4 = phi ptr [ %464, %_ZNSt6vectorIhSaIhEE17_M_realloc_insertIJRKhEEEvN9__gnu_cxx17__normal_iteratorIPhS1_EEDpOT_.exit.i ], [ %.sroa.0422.2576, %450 ] %.sroa.13.3 = getelementptr inbounds nuw i8, ptr %.pn460, i64 1 %471 = add nuw nsw i64 %.0156577, 1 - %exitcond.not = icmp eq i64 %471, %391 + %exitcond.not = icmp eq i64 %398, %.0156577 br i1 %exitcond.not, label %446, label %448, !llvm.loop !4612 .loopexit471: ; preds = %462 diff --git a/bench/openblas/optimized/dgsvj0.ll b/bench/openblas/optimized/dgsvj0.ll index 1e37f2964fa..514d420a5b5 100644 --- a/bench/openblas/optimized/dgsvj0.ll +++ b/bench/openblas/optimized/dgsvj0.ll @@ -201,23 +201,23 @@ define void @dgsvj0_(ptr noundef %0, ptr noundef %1, ptr noundef readonly captur %.012731697 = phi double [ 0.000000e+00, %.lr.ph1703 ], [ %.111284, %.loopexit1426 ] %indvars.iv1760 = add i32 %indvars.iv1760.in, -1 %103 = sext i32 %indvars.iv to i64 - %.inv1786 = icmp slt i32 %indvars.iv1760, 1 - %104 = select i1 %.inv1786, i32 1, i32 2 - %105 = add nsw i32 %.012361701, -1 - %106 = mul nsw i32 %105, %spec.select - %107 = sub nsw i32 %.0, %.012361701 - store i32 %107, ptr %20, align 4, !tbaa !3 - %.not13611552 = icmp slt i32 %107, 0 + %104 = add nsw i32 %.012361701, -1 + %105 = mul nsw i32 %104, %spec.select + %106 = sub nsw i32 %.0, %.012361701 + store i32 %106, ptr %20, align 4, !tbaa !3 + %.not13611552 = icmp slt i32 %106, 0 br i1 %.not13611552, label %._crit_edge1561, label %.lr.ph1560.preheader .lr.ph1560.preheader: ; preds = %102 - %108 = add nsw i32 %106, 1 + %.inv1786 = icmp sgt i32 %indvars.iv1760, 0 + %107 = add nsw i32 %105, 1 + %108 = zext i1 %.inv1786 to i32 br label %.lr.ph1560 .lr.ph1560: ; preds = %.lr.ph1560.preheader, %._crit_edge %indvars.iv1752 = phi i32 [ %indvars.iv, %.lr.ph1560.preheader ], [ %indvars.iv.next1753, %._crit_edge ] %indvars.iv1750 = phi i32 [ %spec.select, %.lr.ph1560.preheader ], [ %indvars.iv.next1751, %._crit_edge ] - %.012371558 = phi i32 [ %108, %.lr.ph1560.preheader ], [ %110, %._crit_edge ] + %.012371558 = phi i32 [ %107, %.lr.ph1560.preheader ], [ %110, %._crit_edge ] %.11557 = phi i32 [ %.012391700, %.lr.ph1560.preheader ], [ %.2.lcssa, %._crit_edge ] %.112411556 = phi i32 [ %.012401699, %.lr.ph1560.preheader ], [ %.21242.lcssa, %._crit_edge ] %.012551555 = phi i32 [ 0, %.lr.ph1560.preheader ], [ %449, %._crit_edge ] @@ -892,7 +892,7 @@ thread-pre-split: ; preds = %144, %158 %449 = add nuw nsw i32 %.012551555, 1 %indvars.iv.next1751 = add i32 %indvars.iv1750, %spec.select %indvars.iv.next1753 = add i32 %indvars.iv1752, %indvars.iv1750 - %exitcond.not = icmp eq i32 %449, %104 + %exitcond.not = icmp eq i32 %.012551555, %108 br i1 %exitcond.not, label %._crit_edge1561, label %.lr.ph1560, !llvm.loop !13 ._crit_edge1561: ; preds = %._crit_edge, %102 @@ -918,7 +918,7 @@ thread-pre-split: ; preds = %144, %158 store i32 %451, ptr %20, align 4, !tbaa !3 %455 = load i32, ptr %2, align 4, !tbaa !3 %.1392 = call i32 @llvm.smin.i32(i32 %451, i32 %455) - %.not13641663.not = icmp slt i32 %106, %.1392 + %.not13641663.not = icmp slt i32 %105, %.1392 br i1 %.not13641663.not, label %.lr.ph1673, label %._crit_edge1674 .lr.ph1673: ; preds = %.lr.ph1686 @@ -1577,7 +1577,7 @@ thread-pre-split: ; preds = %144, %158 %.12 = phi i32 [ %.11, %767 ], [ %.1.lcssa, %._crit_edge1561 ], [ %.9.lcssa, %._crit_edge1674 ] %786 = load i32, ptr %2, align 4, !tbaa !3 %.1401 = call i32 @llvm.smin.i32(i32 %451, i32 %786) - %.not13721691.not = icmp slt i32 %106, %.1401 + %.not13721691.not = icmp slt i32 %105, %.1401 br i1 %.not13721691.not, label %.lr.ph1694.preheader, label %.loopexit1426 .lr.ph1694.preheader: ; preds = %.loopexit1427 diff --git a/bench/openjdk/optimized/intrinsicnode.ll b/bench/openjdk/optimized/intrinsicnode.ll index 4543115f932..19f756635eb 100644 --- a/bench/openjdk/optimized/intrinsicnode.ll +++ b/bench/openjdk/optimized/intrinsicnode.ll @@ -1855,41 +1855,41 @@ define hidden noundef ptr @_ZNK16CompressBitsNode5ValueEP8PhaseGVN(ptr noundef n %34 = getelementptr inbounds nuw [0 x %"struct.Type::TypeInfo"], ptr @_ZN4Type10_type_infoE, i64 0, i64 %33, i32 1 %35 = load i8, ptr %34, align 4 %36 = icmp eq i8 %35, 10 - %37 = select i1 %36, i32 32, i32 64 - %38 = load ptr, ptr %15, align 8 - %39 = getelementptr inbounds nuw i8, ptr %38, i64 184 - %40 = load ptr, ptr %39, align 8 - %41 = tail call noundef i64 %40(ptr noundef nonnull align 8 dereferenceable(22) %15) #5 - %42 = load ptr, ptr %15, align 8 - %43 = getelementptr inbounds nuw i8, ptr %42, i64 176 - %44 = load ptr, ptr %43, align 8 - %45 = tail call noundef i64 %44(ptr noundef nonnull align 8 dereferenceable(22) %15) #5 - %46 = icmp eq i64 %41, %45 - br i1 %46, label %47, label %74 + %37 = load ptr, ptr %15, align 8 + %38 = getelementptr inbounds nuw i8, ptr %37, i64 184 + %39 = load ptr, ptr %38, align 8 + %40 = tail call noundef i64 %39(ptr noundef nonnull align 8 dereferenceable(22) %15) #5 + %41 = load ptr, ptr %15, align 8 + %42 = getelementptr inbounds nuw i8, ptr %41, i64 176 + %43 = load ptr, ptr %42, align 8 + %44 = tail call noundef i64 %43(ptr noundef nonnull align 8 dereferenceable(22) %15) #5 + %45 = icmp eq i64 %40, %44 + br i1 %45, label %46, label %74 47: ; preds = %26 %48 = load ptr, ptr %22, align 8 %49 = getelementptr inbounds nuw i8, ptr %48, i64 184 %50 = load ptr, ptr %49, align 8 - %51 = tail call noundef i64 %50(ptr noundef nonnull align 8 dereferenceable(22) %22) #5 + %51 = tail call noundef i64 %49(ptr noundef nonnull align 8 dereferenceable(22) %22) #5 %52 = load ptr, ptr %22, align 8 %53 = getelementptr inbounds nuw i8, ptr %52, i64 176 %54 = load ptr, ptr %53, align 8 - %55 = tail call noundef i64 %54(ptr noundef nonnull align 8 dereferenceable(22) %22) #5 + %55 = tail call noundef i64 %53(ptr noundef nonnull align 8 dereferenceable(22) %22) #5 %56 = icmp eq i64 %51, %55 br i1 %56, label %57, label %74 57: ; preds = %47 %58 = tail call noundef i64 @_ZNK11TypeInteger15get_con_as_longE9BasicType(ptr noundef nonnull align 8 dereferenceable(22) %15, i8 noundef zeroext %35) #5 %59 = tail call noundef i64 @_ZNK11TypeInteger15get_con_as_longE9BasicType(ptr noundef nonnull align 8 dereferenceable(22) %22, i8 noundef zeroext %35) #5 + %59 = select i1 %36, i32 31, i32 63 br label %.lr.ph.i .lr.ph.i: ; preds = %57, %.lr.ph.i - %.019.i = phi i32 [ %.1.i, %.lr.ph.i ], [ 0, %57 ] - %.01018.i = phi i32 [ %68, %.lr.ph.i ], [ 0, %57 ] - %.01117.i = phi i64 [ %.112.i, %.lr.ph.i ], [ 0, %57 ] - %.01316.i = phi i64 [ %66, %.lr.ph.i ], [ %58, %57 ] - %.01415.i = phi i64 [ %67, %.lr.ph.i ], [ %59, %57 ] + %.019.i = phi i32 [ %.1.i, %.lr.ph.i ], [ 0, %56 ] + %.01018.i = phi i32 [ %68, %.lr.ph.i ], [ 0, %56 ] + %.01117.i = phi i64 [ %.112.i, %.lr.ph.i ], [ 0, %56 ] + %.01316.i = phi i64 [ %66, %.lr.ph.i ], [ %58, %56 ] + %.01415.i = phi i64 [ %67, %.lr.ph.i ], [ %59, %56 ] %60 = and i64 %.01415.i, 1 %.not.i = icmp eq i64 %60, 0 %61 = and i64 %.01316.i, 1 @@ -1902,7 +1902,7 @@ define hidden noundef ptr @_ZNK16CompressBitsNode5ValueEP8PhaseGVN(ptr noundef n %66 = ashr i64 %.01316.i, 1 %67 = ashr i64 %.01415.i, 1 %68 = add nuw nsw i32 %.01018.i, 1 - %exitcond.not.i = icmp eq i32 %68, %37 + %exitcond.not.i = icmp eq i32 %59, %.01018.i br i1 %exitcond.not.i, label %_ZN16CompressBitsNode13compress_bitsElli.exit, label %.lr.ph.i, !llvm.loop !6 _ZN16CompressBitsNode13compress_bitsElli.exit: ; preds = %.lr.ph.i @@ -2186,7 +2186,7 @@ define hidden noundef ptr @_ZNK14ExpandBitsNode5ValueEP8PhaseGVN(ptr noundef non 56: ; preds = %46 %57 = tail call noundef i64 @_ZNK11TypeInteger15get_con_as_longE9BasicType(ptr noundef nonnull align 8 dereferenceable(22) %15, i8 noundef zeroext %35) #5 %58 = tail call noundef i64 @_ZNK11TypeInteger15get_con_as_longE9BasicType(ptr noundef nonnull align 8 dereferenceable(22) %22, i8 noundef zeroext %35) #5 - %wide.trip.count.i = select i1 %36, i64 32, i64 64 + %wide.trip.count.i = select i1 %36, i64 31, i64 63 br label %.lr.ph.i .lr.ph.i: ; preds = %.lr.ph.i, %56 @@ -2203,7 +2203,7 @@ define hidden noundef ptr @_ZNK14ExpandBitsNode5ValueEP8PhaseGVN(ptr noundef non %.1.i = or i64 %62, %.01016.i %63 = ashr i64 %.01314.i, 1 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i + %exitcond.not.i = icmp eq i64 %wide.trip.count.i, %indvars.iv.i br i1 %exitcond.not.i, label %_ZN14ExpandBitsNode11expand_bitsElli.exit, label %.lr.ph.i, !llvm.loop !8 _ZN14ExpandBitsNode11expand_bitsElli.exit: ; preds = %.lr.ph.i diff --git a/bench/openjdk/optimized/rewriter.ll b/bench/openjdk/optimized/rewriter.ll index 27f32ebc25d..451be0cfd99 100644 --- a/bench/openjdk/optimized/rewriter.ll +++ b/bench/openjdk/optimized/rewriter.ll @@ -2035,48 +2035,47 @@ _Z17is_reference_type9BasicTypeb.exit.thread: ; preds = %15, %15, %15, %25 br label %_Z17is_reference_type9BasicTypeb.exit 52: ; preds = %5 - %53 = select i1 %3, i32 231, i32 230 - %54 = load i8, ptr %1, align 1 - %55 = zext i8 %54 to i32 - %56 = icmp eq i32 %53, %55 - br i1 %56, label %57, label %_Z17is_reference_type9BasicTypeb.exit - -57: ; preds = %52 - %58 = sext i32 %2 to i64 - %59 = getelementptr inbounds i8, ptr %1, i64 %58 - %60 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %61 = load ptr, ptr %60, align 8 - br i1 %3, label %62, label %73 - -62: ; preds = %57 - %.0.i.i = load i16, ptr %59, align 1 - %63 = zext i16 %.0.i.i to i64 - %64 = getelementptr inbounds nuw i32, ptr %61, i64 %63 - %65 = load i32, ptr %64, align 4 + %53 = load i8, ptr %1, align 1 + %54 = select i1 %3, i8 -25, i8 -26 + %55 = icmp eq i8 %54, %53 + br i1 %55, label %56, label %_Z17is_reference_type9BasicTypeb.exit + +56: ; preds = %52 + %57 = sext i32 %2 to i64 + %58 = getelementptr inbounds i8, ptr %1, i64 %57 + %59 = getelementptr inbounds nuw i8, ptr %0, i64 88 + %60 = load ptr, ptr %59, align 8 + br i1 %3, label %61, label %72 + +61: ; preds = %56 + %.0.i.i = load i16, ptr %58, align 1 + %62 = zext i16 %.0.i.i to i64 + %63 = getelementptr inbounds nuw i32, ptr %60, i64 %62 + %64 = load i32, ptr %63, align 4 store i8 19, ptr %1, align 1 - %66 = trunc i32 %65 to i16 + %66 = trunc i32 %64 to i16 %67 = tail call noundef i16 @llvm.bswap.i16(i16 %66) - %68 = ptrtoint ptr %59 to i64 + %68 = ptrtoint ptr %58 to i64 %69 = and i64 %68, 1 %70 = icmp eq i64 %69, 0 br i1 %70, label %71, label %72 -71: ; preds = %62 - store i16 %67, ptr %59, align 2 +71: ; preds = %61 + store i16 %67, ptr %58, align 2 br label %_Z17is_reference_type9BasicTypeb.exit -72: ; preds = %62 - store i16 %67, ptr %59, align 1 +72: ; preds = %61 + store i16 %67, ptr %58, align 1 br label %_Z17is_reference_type9BasicTypeb.exit -73: ; preds = %57 - %74 = load i8, ptr %59, align 1 +73: ; preds = %56 + %74 = load i8, ptr %58, align 1 %75 = zext i8 %74 to i64 - %76 = getelementptr inbounds nuw i32, ptr %61, i64 %75 + %76 = getelementptr inbounds nuw i32, ptr %60, i64 %75 %77 = load i32, ptr %76, align 4 store i8 18, ptr %1, align 1 %78 = trunc i32 %77 to i8 - store i8 %78, ptr %59, align 1 + store i8 %78, ptr %58, align 1 br label %_Z17is_reference_type9BasicTypeb.exit _Z17is_reference_type9BasicTypeb.exit: ; preds = %15, %72, %71, %49, %48, %25, %52, %73, %50 diff --git a/bench/openspiel/optimized/backgammon.ll b/bench/openspiel/optimized/backgammon.ll index 047270e5bce..cb1983c9371 100644 --- a/bench/openspiel/optimized/backgammon.ll +++ b/bench/openspiel/optimized/backgammon.ll @@ -7968,7 +7968,7 @@ define noundef zeroext i1 @_ZNK10open_spiel10backgammon15BackgammonState9AllInHo %33 = load ptr, ptr %32, align 8 %34 = getelementptr inbounds nuw %"class.std::vector.6", ptr %33, i64 %12 %35 = load ptr, ptr %34, align 8 - %wide.trip.count = select i1 %30, i64 18, i64 24 + %wide.trip.count = select i1 %30, i64 17, i64 23 br label %36 36: ; preds = %36, %29 @@ -7977,8 +7977,8 @@ define noundef zeroext i1 @_ZNK10open_spiel10backgammon15BackgammonState9AllInHo %38 = load i32, ptr %37, align 4 %39 = icmp slt i32 %38, 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp ne i64 %indvars.iv.next, %wide.trip.count - %or.cond.not = select i1 %39, i1 %exitcond.not, i1 false + %exitcond.not = icmp ne i64 %wide.trip.count, %indvars.iv + %or.cond.not = and i1 %exitcond.not, %39 br i1 %or.cond.not, label %36, label %.loopexit, !llvm.loop !31 .loopexit: ; preds = %36, %2 @@ -9061,12 +9061,12 @@ define noundef range(i32 0, 2) i32 @_ZNK10open_spiel10backgammon15BackgammonStat %23 = load ptr, ptr %22, align 8 %24 = getelementptr inbounds %"class.std::vector.6", ptr %23, i64 %8 %25 = load ptr, ptr %24, align 8 - %wide.trip.count = select i1 %20, i64 6, i64 24 + %wide.trip.count = select i1 %20, i64 5, i64 23 br label %27 26: ; preds = %27 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %wide.trip.count, %indvars.iv br i1 %exitcond.not, label %.loopexit, label %27, !llvm.loop !38 27: ; preds = %19, %26 @@ -12484,12 +12484,12 @@ _ZNK10open_spiel10backgammon15BackgammonState10IsGammonedEi.exit.thread: ; preds %41 = load ptr, ptr %40, align 8 %42 = getelementptr inbounds nuw %"class.std::vector.6", ptr %41, i64 %.013 %43 = load ptr, ptr %42, align 8 - %wide.trip.count.i = select i1 %.not29, i64 24, i64 6 + %wide.trip.count.i = select i1 %.not29, i64 23, i64 5 br label %45 44: ; preds = %45 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i + %exitcond.not.i = icmp eq i64 %wide.trip.count.i, %indvars.iv.i br i1 %exitcond.not.i, label %_ZNK10open_spiel10backgammon15BackgammonState10IsGammonedEi.exit18, label %45, !llvm.loop !38 45: ; preds = %44, %38 diff --git a/bench/openvdb/optimized/FastSweeping.ll b/bench/openvdb/optimized/FastSweeping.ll index 80447744c22..471ddde681d 100644 --- a/bench/openvdb/optimized/FastSweeping.ll +++ b/bench/openvdb/optimized/FastSweeping.ll @@ -181192,8 +181192,8 @@ for.cond: ; preds = %invoke.cont8, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !2316 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !2316 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -181211,7 +181211,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont12, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont12: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -188517,8 +188517,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !2421 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !2421 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -188536,7 +188536,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -193479,8 +193479,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !2482 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !2482 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -193498,7 +193498,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -198441,8 +198441,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !2543 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !2543 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -198460,7 +198460,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -307194,8 +307194,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !3850 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !3850 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -307213,7 +307213,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -312253,8 +312253,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !3914 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !3914 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -312272,7 +312272,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -317215,8 +317215,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !3975 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !3975 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -317234,7 +317234,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i @@ -322177,8 +322177,8 @@ for.cond: ; preds = %invoke.cont6, %for. %12 = load atomic i64, ptr %my_segment_table.i.i.i.i acquire, align 8, !noalias !4036 %atomic-temp.i.0.i.i.i.i.i.i = inttoptr i64 %12 to ptr %cmp.i.i.i.i.i = icmp eq ptr %my_embedded_table.i.i.i.i, %atomic-temp.i.0.i.i.i.i.i.i - %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 3, i64 64 %13 = load ptr, ptr %my_locals.i, align 8, !noalias !4036 + %cond.i11.i.i.i.i = select i1 %cmp.i.i.i.i.i, i64 2, i64 63 br label %for.body.i.i.i.i for.body.i.i.i.i: ; preds = %for.inc.i.i.i.i, %for.cond @@ -322196,7 +322196,7 @@ if.then.i.i.i.i: ; preds = %for.body.i.i.i.i for.inc.i.i.i.i: ; preds = %for.body.i.i.i.i %inc.i.i.i.i = add nuw nsw i64 %seg_index.09.i.i.i.i, 1 - %exitcond.not.i.i.i.i = icmp eq i64 %inc.i.i.i.i, %cond.i.i.i.i.i + %exitcond.not.i.i.i.i = icmp eq i64 %cond.i11.i.i.i.i, %seg_index.09.i.i.i.i br i1 %exitcond.not.i.i.i.i, label %invoke.cont10, label %for.body.i.i.i.i, !llvm.loop !2319 invoke.cont10: ; preds = %for.inc.i.i.i.i, %if.then.i.i.i.i diff --git a/bench/php/optimized/pcre2_substitute.ll b/bench/php/optimized/pcre2_substitute.ll index c05a6e027af..de35f4b8acb 100644 --- a/bench/php/optimized/pcre2_substitute.ll +++ b/bench/php/optimized/pcre2_substitute.ll @@ -2497,12 +2497,12 @@ define internal fastcc i64 @default_substitute_case_callout(ptr noundef %0, i64 br label %28 28: ; preds = %188, %25 - %.0119 = phi i64 [ %3, %25 ], [ %.1120, %188 ] - %.1117 = phi i32 [ %.0116, %25 ], [ %.0115, %188 ] - %.0113 = phi ptr [ %2, %25 ], [ %.1114, %188 ] - %.0111 = phi i32 [ 0, %25 ], [ %.1112, %188 ] - %.0108 = phi i64 [ 0, %25 ], [ %189, %188 ] - %.0100 = phi ptr [ %0, %25 ], [ %.1101, %188 ] + %.0119 = phi i64 [ %3, %25 ], [ %.1120, %187 ] + %.1117 = phi i32 [ %.0116, %25 ], [ %.0115, %187 ] + %.0113 = phi ptr [ %2, %25 ], [ %.1114, %187 ] + %.0111 = phi i32 [ 0, %25 ], [ %.1112, %187 ] + %.0108 = phi i64 [ 0, %25 ], [ %189, %187 ] + %.0100 = phi ptr [ %0, %25 ], [ %.1101, %187 ] %29 = icmp ult ptr %.0100, %8 br i1 %29, label %30, label %.thread @@ -2653,10 +2653,9 @@ define internal fastcc i64 @default_substitute_case_callout(ptr noundef %0, i64 br i1 %147, label %148, label %175 148: ; preds = %128 - %149 = zext i8 %143 to i32 %.not128 = icmp eq i32 %.1117, 0 - %150 = select i1 %.not128, i32 5, i32 9 - %.not129 = icmp eq i32 %150, %149 + %150 = select i1 %.not128, i8 5, i8 9 + %.not129 = icmp eq i8 %150, %143 br i1 %.not129, label %175, label %151 151: ; preds = %148 @@ -2691,7 +2690,7 @@ define internal fastcc i64 @default_substitute_case_callout(ptr noundef %0, i64 br label %175 175: ; preds = %128, %148, %151, %155, %169 - %.2105 = phi i32 [ %174, %169 ], [ %.0103, %155 ], [ %154, %151 ], [ %.0103, %148 ], [ %.0103, %128 ] + %.2105 = phi i32 [ %174, %168 ], [ %.0103, %154 ], [ %154, %150 ], [ %.0103, %148 ], [ %.0103, %128 ] br i1 %12, label %176, label %179 176: ; preds = %175 @@ -2705,7 +2704,7 @@ define internal fastcc i64 @default_substitute_case_callout(ptr noundef %0, i64 br label %181 181: ; preds = %179, %176 - %.0102 = phi i64 [ %178, %176 ], [ 1, %179 ] + %.0102 = phi i64 [ %178, %175 ], [ 1, %178 ] %.not130 = icmp ne i32 %.0111, 0 %.not131 = icmp ugt i64 %.0102, %.0119 %or.cond134.not.not = select i1 %.not130, i1 true, i1 %.not131 @@ -2718,9 +2717,9 @@ define internal fastcc i64 @default_substitute_case_callout(ptr noundef %0, i64 br label %185 185: ; preds = %181, %182 - %.1120 = phi i64 [ %184, %182 ], [ %.0119, %181 ] - %.1114 = phi ptr [ %183, %182 ], [ %.0113, %181 ] - %.1112 = phi i32 [ 0, %182 ], [ 1, %181 ] + %.1120 = phi i64 [ %184, %181 ], [ %.0119, %180 ] + %.1114 = phi ptr [ %183, %181 ], [ %.0113, %180 ] + %.1112 = phi i32 [ 0, %181 ], [ 1, %180 ] %186 = xor i64 %.0108, -1 %187 = icmp ugt i64 %.0102, %186 br i1 %187, label %.thread, label %188 @@ -2746,7 +2745,7 @@ define internal fastcc i64 @default_substitute_case_callout(ptr noundef %0, i64 br label %.thread .thread: ; preds = %185, %28, %195, %14, %6 - %.0 = phi i64 [ 0, %6 ], [ 0, %14 ], [ %.3, %195 ], [ -1, %185 ], [ %.0108, %28 ] + %.0 = phi i64 [ 0, %6 ], [ 0, %14 ], [ %.3, %194 ], [ -1, %184 ], [ %.0108, %28 ] call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %7) #7 ret i64 %.0 } diff --git a/bench/php/optimized/quot_print.ll b/bench/php/optimized/quot_print.ll index 6049eb11cf3..5129940b614 100644 --- a/bench/php/optimized/quot_print.ll +++ b/bench/php/optimized/quot_print.ll @@ -10,7 +10,6 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: nounwind uwtable define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly captures(none) %0, i64 noundef %1, i32 noundef %2) local_unnamed_addr #0 { %.not = icmp eq i32 %2, 0 - %spec.store.select = select i1 %.not, i32 0, i32 95 %4 = icmp ugt i64 %1, 1 br i1 %4, label %.lr.ph, label %.critedge @@ -55,20 +54,24 @@ define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly capture %.not85102 = icmp eq i64 %1, 0 br i1 %.not85102, label %.critedge2, label %.lr.ph107 -.lr.ph107: ; preds = %.critedge, %82 - %.062106 = phi i64 [ %.163, %82 ], [ 0, %.critedge ] - %.065105 = phi ptr [ %.166, %82 ], [ %20, %.critedge ] - %.2104 = phi ptr [ %.5, %82 ], [ %0, %.critedge ] - %.271103 = phi i64 [ %.574, %82 ], [ %1, %.critedge ] - %21 = load i8, ptr %.2104, align 1, !tbaa !4 - switch i8 %21, label %75 [ +.lr.ph107: ; preds = %.critedge + %spec.store.select87 = select i1 %.not, i8 0, i8 95 + br label %21 + +21:; preds = %.lr.ph107, %82 + %.062107 = phi i64 [ 0, %.lr.ph108 ], [ %.163, %82 ] + %.065106 = phi ptr [ %20, %.lr.ph108 ], [ %.166, %82 ] + %.2105 = phi ptr [ %0, %.lr.ph108 ], [ %.5, %82 ] + %.271104 = phi i64 [ %1, %.lr.ph108 ], [ %.574, %82 ] + %22 = load i8, ptr %.2105, align 1, !tbaa !4 + switch i8 %22, label %76 [ i8 0, label %.critedge2 i8 61, label %22 ] -22: ; preds = %.lr.ph107 - %23 = add i64 %.271103, -1 - %24 = getelementptr inbounds nuw i8, ptr %.2104, i64 1 +22: ; preds = %21 + %23 = add i64 %.271104, -1 + %24 = getelementptr inbounds nuw i8, ptr %.2105, i64 1 %25 = icmp eq i64 %23, 0 br i1 %25, label %.critedge2, label %26 @@ -85,11 +88,11 @@ define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly capture br i1 %33, label %34, label %52 34: ; preds = %29 - %35 = icmp eq i64 %.271103, 2 + %35 = icmp eq i64 %.271104, 2 br i1 %35, label %43, label %36 36: ; preds = %34 - %37 = getelementptr inbounds nuw i8, ptr %.2104, i64 2 + %37 = getelementptr inbounds nuw i8, ptr %.2105, i64 2 %38 = load i8, ptr %37, align 1, !tbaa !4 %39 = zext i8 %38 to i64 %40 = getelementptr inbounds nuw [256 x i32], ptr @php_quot_print_decode.hexval_tbl, i64 0, i64 %39 @@ -105,11 +108,11 @@ define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly capture %45 = shl nuw nsw i32 %32, 4 %46 = or disjoint i32 %41, %45 %47 = trunc nuw i32 %46 to i8 - %48 = getelementptr inbounds nuw i8, ptr %.065105, i64 1 - store i8 %47, ptr %.065105, align 1, !tbaa !4 - %49 = add i64 %.062106, 1 - %50 = add i64 %.271103, -3 - %51 = getelementptr inbounds nuw i8, ptr %.2104, i64 3 + %48 = getelementptr inbounds nuw i8, ptr %.065106, i64 1 + store i8 %47, ptr %.065106, align 1, !tbaa !4 + %49 = add i64 %.062107, 1 + %50 = add i64 %.271104, -3 + %51 = getelementptr inbounds nuw i8, ptr %.2105, i64 3 br label %82 52: ; preds = %29 @@ -135,8 +138,8 @@ define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly capture br label %.lr.ph129 .lr.ph129: ; preds = %.lr.ph129.backedge, %.lr.ph129.preheader - %.3128 = phi ptr [ %24, %.lr.ph129.preheader ], [ %57, %.lr.ph129.backedge ] - %.372127 = phi i64 [ %23, %.lr.ph129.preheader ], [ %54, %.lr.ph129.backedge ] + %.3128 = phi ptr [ %24, %.lr.ph130.preheader ], [ %57, %.lr.ph130.backedge ] + %.372127 = phi i64 [ %23, %.lr.ph130.preheader ], [ %54, %.lr.ph130.backedge ] %54 = add i64 %.372127, -1 %55 = icmp eq i64 %54, 0 br i1 %55, label %63, label %56 @@ -173,8 +176,8 @@ define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly capture br label %71 71: ; preds = %66, %.preheader._crit_edge - %.473 = phi i64 [ %.372.lcssa, %.preheader._crit_edge ], [ %spec.select, %66 ] - %.4 = phi ptr [ %.3.lcssa, %.preheader._crit_edge ], [ %spec.select87, %66 ] + %.473 = phi i64 [ %.372.lcssa, %.preheader._crit_edge ], [ %spec.select, %67 ] + %.4 = phi ptr [ %.3.lcssa, %.preheader._crit_edge ], [ %spec.select87, %67 ] %72 = add i64 %.473, -1 %73 = getelementptr inbounds nuw i8, ptr %.4, i64 1 br label %82 @@ -183,34 +186,33 @@ define dso_local noundef ptr @php_quot_print_decode(ptr noundef readonly capture tail call void @_efree(ptr noundef nonnull %16) #9 br label %83 -75: ; preds = %.lr.ph107 - %76 = zext i8 %21 to i32 - %77 = icmp eq i32 %spec.store.select, %76 - %spec.select88 = select i1 %77, i8 32, i8 %21 - %78 = getelementptr inbounds nuw i8, ptr %.065105, i64 1 - store i8 %spec.select88, ptr %.065105, align 1, !tbaa !4 - %79 = add i64 %.271103, -1 - %80 = getelementptr inbounds nuw i8, ptr %.2104, i64 1 - %81 = add i64 %.062106, 1 +75: ; preds = %21 + %77 = icmp eq i8 %spec.store.select87, %22 + %spec.select89 = select i1 %77, i8 32, i8 %22 + %78 = getelementptr inbounds nuw i8, ptr %.065106, i64 1 + store i8 %spec.select89, ptr %.065106, align 1, !tbaa !4 + %79 = add i64 %.271104, -1 + %80 = getelementptr inbounds nuw i8, ptr %.2105, i64 1 + %81 = add i64 %.062107, 1 br label %82 82: ; preds = %44, %71, %75 - %.574 = phi i64 [ %50, %44 ], [ %72, %71 ], [ %79, %75 ] - %.5 = phi ptr [ %51, %44 ], [ %73, %71 ], [ %80, %75 ] - %.166 = phi ptr [ %48, %44 ], [ %.065105, %71 ], [ %78, %75 ] - %.163 = phi i64 [ %49, %44 ], [ %.062106, %71 ], [ %81, %75 ] + %.574 = phi i64 [ %50, %45 ], [ %72, %72 ], [ %79, %76 ] + %.5 = phi ptr [ %51, %45 ], [ %73, %72 ], [ %80, %76 ] + %.166 = phi ptr [ %48, %45 ], [ %.065106, %72 ], [ %78, %76 ] + %.163 = phi i64 [ %49, %45 ], [ %.062107, %72 ], [ %81, %76 ] %.not85 = icmp eq i64 %.574, 0 - br i1 %.not85, label %.critedge2, label %.lr.ph107 + br i1 %.not85, label %.critedge2, label %21 -.critedge2: ; preds = %26, %22, %82, %.lr.ph107, %.critedge - %.065.lcssa = phi ptr [ %20, %.critedge ], [ %.065105, %.lr.ph107 ], [ %.166, %82 ], [ %.065105, %22 ], [ %.065105, %26 ] - %.062.lcssa = phi i64 [ 0, %.critedge ], [ %.062106, %.lr.ph107 ], [ %.163, %82 ], [ %.062106, %22 ], [ %.062106, %26 ] +.critedge2: ; preds = %26, %22, %82, %21, %.critedge + %.065.lcssa = phi ptr [ %20, %.critedge ], [ %.065106, %21 ], [ %.166, %82 ], [ %.065106, %23 ], [ %.065106, %27 ] + %.062.lcssa = phi i64 [ 0, %.critedge ], [ %.062107, %21 ], [ %.163, %82 ], [ %.062107, %23 ], [ %.062107, %27 ] store i8 0, ptr %.065.lcssa, align 1, !tbaa !4 store i64 %.062.lcssa, ptr %19, align 8, !tbaa !13 br label %83 83: ; preds = %.critedge2, %74, %63, %43 - %.0 = phi ptr [ %16, %.critedge2 ], [ null, %43 ], [ null, %63 ], [ null, %74 ] + %.0 = phi ptr [ %16, %.critedge2 ], [ null, %44 ], [ null, %64 ], [ null, %75 ] ret ptr %.0 } diff --git a/bench/pingora-rs/optimized/63snncgsqpi17trm0hdteq5vk.ll b/bench/pingora-rs/optimized/63snncgsqpi17trm0hdteq5vk.ll index 303f86290ad..e6e4810aaa1 100644 --- a/bench/pingora-rs/optimized/63snncgsqpi17trm0hdteq5vk.ll +++ b/bench/pingora-rs/optimized/63snncgsqpi17trm0hdteq5vk.ll @@ -8022,7 +8022,6 @@ _ZN6brotli3enc14block_splitter18RefineEntropyCodes17h9470e8526edcced8E.exit.i: ; %247 = getelementptr inbounds nuw i8, ptr %122, i64 8 store i64 %246, ptr %247, align 8, !noalias !265 %248 = icmp slt i32 %.val29, 12 - %..i = select i1 %248, i64 3, i64 10 %249 = icmp ugt i64 %133, %136 %250 = getelementptr inbounds nuw i8, ptr %135, i64 %133 %.sroa.4250.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %93, i64 4 @@ -8045,6 +8044,7 @@ _ZN6brotli3enc14block_splitter18RefineEntropyCodes17h9470e8526edcced8E.exit.i: ; %253 = icmp eq i64 %233, 0 %254 = icmp ult i64 %251, %218 %255 = getelementptr inbounds nuw i8, ptr %217, i64 %251 + %.830.i = select i1 %248, i64 2, i64 9 br label %731 256: ; preds = %_ZN6brotli3enc14block_splitter20BuildBlockHistograms17h8eb2c873dc460cb9E.exit.i @@ -9154,9 +9154,9 @@ _ZN6brotli3enc7cluster30BrotliHistogramBitCostDistance17h196f578f145a4e42E.exit2 br label %.invoke.i.i .invoke.i.i: ; preds = %716, %714, %706, %684, %.lr.ph.i111._crit_edge.i, %.lr.ph810.i.i, %659, %657, %652, %642, %.lr.ph817.i.i, %633, %625, %694, %.lr.ph.i, %.invoke.i.loopexit862.split.loop.exit1017.i - %630 = phi i64 [ %umax.le.i, %.invoke.i.loopexit862.split.loop.exit1017.i ], [ %.sroa.041.0808.i.i, %.lr.ph.i ], [ %.sroa.0103.4802.i480.i, %694 ], [ %628, %625 ], [ %634, %633 ], [ 64, %.lr.ph817.i.i ], [ %645, %642 ], [ %645, %652 ], [ %.sroa.034.1814.i.i, %657 ], [ %664, %659 ], [ %.sroa.041.0808.i.i, %.lr.ph810.i.i ], [ %.sroa.041.0808.i.i, %.lr.ph.i111._crit_edge.i ], [ %.sroa.041.0808.i.i, %684 ], [ %.sroa.0.0799.i.i, %706 ], [ %.sroa.0136.0798.i.i, %714 ], [ %712, %716 ] - %631 = phi i64 [ %272, %.invoke.i.loopexit862.split.loop.exit1017.i ], [ %.val324.i.i, %.lr.ph.i ], [ %136, %694 ], [ 64, %625 ], [ %264, %633 ], [ 64, %.lr.ph817.i.i ], [ %.val408.i.i, %642 ], [ 64, %652 ], [ %.val340.i.i, %657 ], [ 64, %659 ], [ %.val322.i.i, %684 ], [ %.val406.i.i, %.lr.ph.i111._crit_edge.i ], [ %.val330.i.i, %.lr.ph810.i.i ], [ %272, %706 ], [ %218, %714 ], [ %218, %716 ] - %632 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.180, %.invoke.i.loopexit862.split.loop.exit1017.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.186, %.lr.ph.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.187, %694 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.169, %625 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.170, %633 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.171, %.lr.ph817.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.172, %642 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.175, %652 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.176, %657 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.178, %659 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.182, %684 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.181, %.lr.ph.i111._crit_edge.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.179, %.lr.ph810.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.188, %706 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.189, %714 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.190, %716 ] + %630 = phi i64 [ %umax.le.i, %.invoke.i.loopexit863.split.loop.exit1018.i ], [ %.sroa.041.0808.i.i, %.lr.ph.i ], [ %.sroa.0103.4802.i480.i, %694 ], [ %628, %625 ], [ %634, %633 ], [ 64, %.lr.ph817.i.i ], [ %645, %642 ], [ %645, %652 ], [ %.sroa.034.1814.i.i, %657 ], [ %664, %659 ], [ %.sroa.041.0808.i.i, %.lr.ph810.i.i ], [ %.sroa.041.0808.i.i, %.lr.ph.i111._crit_edge.i ], [ %.sroa.041.0808.i.i, %684 ], [ %.sroa.0.0799.i.i, %706 ], [ %.sroa.0136.0798.i.i, %714 ], [ %712, %716 ] + %631 = phi i64 [ %272, %.invoke.i.loopexit863.split.loop.exit1018.i ], [ %.val324.i.i, %.lr.ph.i ], [ %136, %694 ], [ 64, %625 ], [ %264, %633 ], [ 64, %.lr.ph817.i.i ], [ %.val408.i.i, %642 ], [ 64, %652 ], [ %.val340.i.i, %657 ], [ 64, %659 ], [ %.val322.i.i, %684 ], [ %.val406.i.i, %.lr.ph.i111._crit_edge.i ], [ %.val330.i.i, %.lr.ph810.i.i ], [ %272, %706 ], [ %218, %714 ], [ %218, %716 ] + %632 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.180, %.invoke.i.loopexit863.split.loop.exit1018.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.186, %.lr.ph.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.187, %694 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.169, %625 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.170, %633 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.171, %.lr.ph817.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.172, %642 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.175, %652 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.176, %657 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.178, %659 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.182, %684 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.181, %.lr.ph.i111._crit_edge.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.179, %.lr.ph810.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.188, %706 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.189, %714 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.190, %716 ] invoke void @_ZN4core9panicking18panic_bounds_check17h2d3ab0b83311a572E(i64 noundef %630, i64 noundef %631, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %632) #18 to label %.cont.i.i unwind label %.thread446.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i.i, !noalias !298 @@ -9592,7 +9592,7 @@ _ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit. %774 = phi i64 [ 0, %.lr.ph400.split.us.i.i ], [ %241, %.lr.ph397.i.i ], [ %233, %.lr.ph392.i.i ], [ %227, %.noexc144.i ], [ %157, %919 ], [ %227, %918 ], [ %136, %957 ], [ %157, %952 ], [ %218, %.noexc151.i ], [ %218, %.preheader.i123.i ], [ %218, %789 ], [ %241, %.lr.ph413.i.i ], [ %218, %.lr.ph400.split.i.i ], [ %227, %940 ], [ %157, %.preheader329.i.i ], [ %218, %_ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit._crit_edge.i.i ] %775 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.112, %.lr.ph400.split.us.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.217, %.lr.ph397.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.119, %.lr.ph392.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.131, %.noexc144.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.130, %919 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.129, %918 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.215, %957 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.214, %952 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.213, %.noexc151.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.135, %.preheader.i123.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.109, %789 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.108, %.lr.ph413.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.112, %.lr.ph400.split.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.134, %940 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.132, %.preheader329.i.i ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.107, %_ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit._crit_edge.i.i ] invoke void @_ZN4core9panicking18panic_bounds_check17h2d3ab0b83311a572E(i64 noundef %773, i64 noundef %774, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %775) #18 - to label %.cont1031.i unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i, !noalias !260 + to label %.cont1032.i unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i, !noalias !260 .cont1031.i: ; preds = %.invoke1030.i unreachable @@ -10041,7 +10041,7 @@ _ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit. _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h8eb2c873dc460cb9E.exit.i: ; preds = %.noexc154.i %964 = add nuw nsw i64 %.sroa.018.0477.i, 1 - %exitcond.not.i = icmp eq i64 %964, %..i + %exitcond.not.i = icmp eq i64 %.830.i, %.sroa.018.0477.i br i1 %exitcond.not.i, label %256, label %731 .loopexit.i: ; preds = %922 @@ -10065,9 +10065,9 @@ _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h8eb2c873dc460cb9E.exit.i: br label %.loopexit.split-lp.i .loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i: ; preds = %.invoke1030.i, %.split406.us.i.invoke.i, %.invoke.i, %258, %257, %256 - %.sroa.024.3.ph.ph.ph.ph.ph.i = phi i1 [ false, %256 ], [ false, %257 ], [ false, %258 ], [ true, %.invoke.i ], [ true, %.split406.us.i.invoke.i ], [ true, %.invoke1030.i ] - %.sroa.023.2.ph.ph.ph.ph.ph.i = phi i1 [ true, %256 ], [ false, %257 ], [ false, %258 ], [ true, %.invoke.i ], [ true, %.split406.us.i.invoke.i ], [ true, %.invoke1030.i ] - %.sroa.022.1.ph.ph.ph.ph.ph.i = phi i1 [ true, %256 ], [ true, %257 ], [ false, %258 ], [ true, %.invoke.i ], [ true, %.split406.us.i.invoke.i ], [ true, %.invoke1030.i ] + %.sroa.024.3.ph.ph.ph.ph.ph.i = phi i1 [ false, %256 ], [ false, %257 ], [ false, %258 ], [ true, %.invoke.i ], [ true, %.split406.us.i.invoke.i ], [ true, %.invoke1031.i ] + %.sroa.023.2.ph.ph.ph.ph.ph.i = phi i1 [ true, %256 ], [ false, %257 ], [ false, %258 ], [ true, %.invoke.i ], [ true, %.split406.us.i.invoke.i ], [ true, %.invoke1031.i ] + %.sroa.022.1.ph.ph.ph.ph.ph.i = phi i1 [ true, %256 ], [ true, %257 ], [ false, %258 ], [ true, %.invoke.i ], [ true, %.split406.us.i.invoke.i ], [ true, %.invoke1031.i ] %lpad.loopexit.split-lp129.i = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp.i @@ -10105,8 +10105,8 @@ _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h8eb2c873dc460cb9E.exit.i: to label %.thread81.thread.thread.i unwind label %965, !noalias !260 .thread81.thread.thread.i: ; preds = %969, %727, %267, %.thread81.i, %.thread4.i, %.thread81.thread.thread837.i - %.sroa.026.19.i = phi i1 [ true, %.thread4.i ], [ false, %267 ], [ false, %727 ], [ %.sroa.026.5.ph.ph.i, %.thread81.thread.thread837.i ], [ true, %969 ], [ true, %.thread81.i ] - %.pn.pn.pn.pn8.i = phi { ptr, i32 } [ %224, %.thread4.i ], [ %.pn263.pn.pn.pn.pn.pn.i.i, %267 ], [ %.pn263.pn.pn.pn.pn.pn.pn430.i.i, %727 ], [ %lpad.thr_comm.i, %.thread81.thread.thread837.i ], [ %.pn.pn.pn15.i, %969 ], [ %.pn.pn.pn.i, %.thread81.i ] + %.sroa.026.19.i = phi i1 [ true, %.thread4.i ], [ false, %267 ], [ false, %727 ], [ %.sroa.026.5.ph.ph.i, %.thread81.thread.thread838.i ], [ true, %969 ], [ true, %.thread81.i ] + %.pn.pn.pn.pn8.i = phi { ptr, i32 } [ %224, %.thread4.i ], [ %.pn263.pn.pn.pn.pn.pn.i.i, %267 ], [ %.pn263.pn.pn.pn.pn.pn.pn430.i.i, %727 ], [ %lpad.thr_comm.i, %.thread81.thread.thread838.i ], [ %.pn.pn.pn15.i, %969 ], [ %.pn.pn.pn.i, %.thread81.i ] invoke void @"_ZN4core3ptr64drop_in_place$LT$alloc_stdlib..heap_alloc..WrapBox$LT$u8$GT$$GT$17hb6c382cbc1d625feE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %126) #20 to label %153 unwind label %965, !noalias !260 @@ -10561,7 +10561,6 @@ _ZN6brotli3enc14block_splitter18RefineEntropyCodes17h8c3c9009db553577E.exit.i: ; %1127 = getelementptr inbounds nuw i8, ptr %84, i64 8 store i64 %1126, ptr %1127, align 8, !noalias !454 %1128 = icmp slt i32 %.val29, 12 - %..i95 = select i1 %1128, i64 3, i64 10 %1129 = icmp ugt i64 %3, %1018 %1130 = getelementptr inbounds nuw i8, ptr %1017, i64 %1063 %.sroa.4250.0..sroa_idx.i.i96 = getelementptr inbounds nuw i8, ptr %55, i64 4 @@ -10584,6 +10583,7 @@ _ZN6brotli3enc14block_splitter18RefineEntropyCodes17h8c3c9009db553577E.exit.i: ; %1133 = icmp eq i64 %1113, 0 %1134 = icmp ult i64 %1131, %1098 %1135 = getelementptr inbounds nuw i8, ptr %1097, i64 %1131 + %.830.i110 = select i1 %1128, i64 2, i64 9 br label %1611 1136: ; preds = %_ZN6brotli3enc14block_splitter20BuildBlockHistograms17h76a0009526212306E.exit.i @@ -11693,9 +11693,9 @@ _ZN6brotli3enc7cluster30BrotliHistogramBitCostDistance17h8e6f50bb6efdc9deE.exit2 br label %.invoke.i.i295 .invoke.i.i295: ; preds = %1596, %1594, %1586, %1564, %.lr.ph.i111._crit_edge.i332, %.lr.ph810.i.i319, %1539, %1537, %1532, %1522, %.lr.ph817.i.i345, %1513, %1505, %1574, %.lr.ph.i326, %.invoke.i.loopexit862.split.loop.exit1017.i322 - %1510 = phi i64 [ %umax.le.i323, %.invoke.i.loopexit862.split.loop.exit1017.i322 ], [ %.sroa.041.0808.i.i320, %.lr.ph.i326 ], [ %.sroa.0103.4802.i480.i327, %1574 ], [ %1508, %1505 ], [ %1514, %1513 ], [ 64, %.lr.ph817.i.i345 ], [ %1525, %1522 ], [ %1525, %1532 ], [ %.sroa.034.1814.i.i347, %1537 ], [ %1544, %1539 ], [ %.sroa.041.0808.i.i320, %.lr.ph810.i.i319 ], [ %.sroa.041.0808.i.i320, %.lr.ph.i111._crit_edge.i332 ], [ %.sroa.041.0808.i.i320, %1564 ], [ %.sroa.0.0799.i.i293, %1586 ], [ %.sroa.0136.0798.i.i294, %1594 ], [ %1592, %1596 ] - %1511 = phi i64 [ %1152, %.invoke.i.loopexit862.split.loop.exit1017.i322 ], [ %.val390.i.i, %.lr.ph.i326 ], [ %1018, %1574 ], [ 64, %1505 ], [ %1144, %1513 ], [ 64, %.lr.ph817.i.i345 ], [ %.val408.i.i351, %1522 ], [ 64, %1532 ], [ %.val322.i.i352, %1537 ], [ 64, %1539 ], [ %.val388.i.i, %1564 ], [ %.val406.i.i334, %.lr.ph.i111._crit_edge.i332 ], [ %.val396.i.i, %.lr.ph810.i.i319 ], [ %1152, %1586 ], [ %1098, %1594 ], [ %1098, %1596 ] - %1512 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.180, %.invoke.i.loopexit862.split.loop.exit1017.i322 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.186, %.lr.ph.i326 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.187, %1574 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.169, %1505 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.170, %1513 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.171, %.lr.ph817.i.i345 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.172, %1522 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.175, %1532 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.176, %1537 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.178, %1539 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.182, %1564 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.181, %.lr.ph.i111._crit_edge.i332 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.179, %.lr.ph810.i.i319 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.188, %1586 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.189, %1594 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.190, %1596 ] + %1510 = phi i64 [ %umax.le.i323, %.invoke.i.loopexit863.split.loop.exit1018.i322 ], [ %.sroa.041.0808.i.i320, %.lr.ph.i326 ], [ %.sroa.0103.4802.i480.i327, %1574 ], [ %1508, %1505 ], [ %1514, %1513 ], [ 64, %.lr.ph817.i.i345 ], [ %1525, %1522 ], [ %1525, %1532 ], [ %.sroa.034.1814.i.i347, %1537 ], [ %1544, %1539 ], [ %.sroa.041.0808.i.i320, %.lr.ph810.i.i319 ], [ %.sroa.041.0808.i.i320, %.lr.ph.i111._crit_edge.i332 ], [ %.sroa.041.0808.i.i320, %1564 ], [ %.sroa.0.0799.i.i293, %1586 ], [ %.sroa.0136.0798.i.i294, %1594 ], [ %1592, %1596 ] + %1511 = phi i64 [ %1152, %.invoke.i.loopexit863.split.loop.exit1018.i322 ], [ %.val390.i.i, %.lr.ph.i326 ], [ %1018, %1574 ], [ 64, %1505 ], [ %1144, %1513 ], [ 64, %.lr.ph817.i.i345 ], [ %.val408.i.i351, %1522 ], [ 64, %1532 ], [ %.val322.i.i352, %1537 ], [ 64, %1539 ], [ %.val388.i.i, %1564 ], [ %.val406.i.i334, %.lr.ph.i111._crit_edge.i332 ], [ %.val396.i.i, %.lr.ph810.i.i319 ], [ %1152, %1586 ], [ %1098, %1594 ], [ %1098, %1596 ] + %1512 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.180, %.invoke.i.loopexit863.split.loop.exit1018.i322 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.186, %.lr.ph.i326 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.187, %1574 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.169, %1505 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.170, %1513 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.171, %.lr.ph817.i.i345 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.172, %1522 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.175, %1532 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.176, %1537 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.178, %1539 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.182, %1564 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.181, %.lr.ph.i111._crit_edge.i332 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.179, %.lr.ph810.i.i319 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.188, %1586 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.189, %1594 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.190, %1596 ] invoke void @_ZN4core9panicking18panic_bounds_check17h2d3ab0b83311a572E(i64 noundef %1510, i64 noundef %1511, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %1512) #18 to label %.cont.i.i302 unwind label %.thread446.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i.i296, !noalias !487 @@ -12131,7 +12131,7 @@ _ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit. %1654 = phi i64 [ 0, %.lr.ph400.split.us.i.i502 ], [ %1121, %.lr.ph397.i.i217 ], [ %1113, %.lr.ph392.i.i187 ], [ %1107, %.noexc144.i137 ], [ %1037, %1799 ], [ %1107, %1798 ], [ %1018, %1837 ], [ %1037, %1832 ], [ %1098, %.noexc151.i261 ], [ %1098, %.preheader.i123.i505 ], [ %1098, %1669 ], [ %1121, %.lr.ph413.i.i247 ], [ %1098, %.lr.ph400.split.i.i163 ], [ %1107, %1820 ], [ %1037, %.preheader329.i.i116 ], [ %1098, %_ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit._crit_edge.i.i245 ] %1655 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.112, %.lr.ph400.split.us.i.i502 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.217, %.lr.ph397.i.i217 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.119, %.lr.ph392.i.i187 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.131, %.noexc144.i137 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.130, %1799 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.129, %1798 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.215, %1837 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.214, %1832 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.213, %.noexc151.i261 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.135, %.preheader.i123.i505 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.109, %1669 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.108, %.lr.ph413.i.i247 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.112, %.lr.ph400.split.i.i163 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.134, %1820 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.132, %.preheader329.i.i116 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.107, %_ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit._crit_edge.i.i245 ] invoke void @_ZN4core9panicking18panic_bounds_check17h2d3ab0b83311a572E(i64 noundef %1653, i64 noundef %1654, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %1655) #18 - to label %.cont1031.i144 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i139, !noalias !449 + to label %.cont1032.i144 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i139, !noalias !449 .cont1031.i144: ; preds = %.invoke1030.i138 unreachable @@ -12580,7 +12580,7 @@ _ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit. _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h76a0009526212306E.exit.i: ; preds = %.noexc154.i267 %1844 = add nuw nsw i64 %.sroa.018.0477.i112, 1 - %exitcond.not.i269 = icmp eq i64 %1844, %..i95 + %exitcond.not.i269 = icmp eq i64 %.830.i110, %.sroa.018.0477.i112 br i1 %exitcond.not.i269, label %1136, label %1611 .loopexit.i129: ; preds = %1802 @@ -12604,9 +12604,9 @@ _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h76a0009526212306E.exit.i: br label %.loopexit.split-lp.i131 .loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i139: ; preds = %.invoke1030.i138, %.split406.us.i.invoke.i173, %.invoke.i499, %1138, %1137, %1136 - %.sroa.024.3.ph.ph.ph.ph.ph.i140 = phi i1 [ false, %1136 ], [ false, %1137 ], [ false, %1138 ], [ true, %.invoke.i499 ], [ true, %.split406.us.i.invoke.i173 ], [ true, %.invoke1030.i138 ] - %.sroa.023.2.ph.ph.ph.ph.ph.i141 = phi i1 [ true, %1136 ], [ false, %1137 ], [ false, %1138 ], [ true, %.invoke.i499 ], [ true, %.split406.us.i.invoke.i173 ], [ true, %.invoke1030.i138 ] - %.sroa.022.1.ph.ph.ph.ph.ph.i142 = phi i1 [ true, %1136 ], [ true, %1137 ], [ false, %1138 ], [ true, %.invoke.i499 ], [ true, %.split406.us.i.invoke.i173 ], [ true, %.invoke1030.i138 ] + %.sroa.024.3.ph.ph.ph.ph.ph.i140 = phi i1 [ false, %1136 ], [ false, %1137 ], [ false, %1138 ], [ true, %.invoke.i499 ], [ true, %.split406.us.i.invoke.i173 ], [ true, %.invoke1031.i138 ] + %.sroa.023.2.ph.ph.ph.ph.ph.i141 = phi i1 [ true, %1136 ], [ false, %1137 ], [ false, %1138 ], [ true, %.invoke.i499 ], [ true, %.split406.us.i.invoke.i173 ], [ true, %.invoke1031.i138 ] + %.sroa.022.1.ph.ph.ph.ph.ph.i142 = phi i1 [ true, %1136 ], [ true, %1137 ], [ false, %1138 ], [ true, %.invoke.i499 ], [ true, %.split406.us.i.invoke.i173 ], [ true, %.invoke1031.i138 ] %lpad.loopexit.split-lp129.i143 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp.i131 @@ -12644,8 +12644,8 @@ _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h76a0009526212306E.exit.i: to label %.thread81.thread.thread.i76 unwind label %1845, !noalias !449 .thread81.thread.thread.i76: ; preds = %1849, %1607, %1147, %.thread81.i84, %.thread4.i75, %.thread81.thread.thread837.i270 - %.sroa.026.19.i77 = phi i1 [ true, %.thread4.i75 ], [ false, %1147 ], [ false, %1607 ], [ %.sroa.026.5.ph.ph.i271, %.thread81.thread.thread837.i270 ], [ true, %1849 ], [ true, %.thread81.i84 ] - %.pn.pn.pn.pn8.i78 = phi { ptr, i32 } [ %1104, %.thread4.i75 ], [ %.pn263.pn.pn.pn.pn.pn.i.i277, %1147 ], [ %.pn263.pn.pn.pn.pn.pn.pn430.i.i275, %1607 ], [ %lpad.thr_comm.i272, %.thread81.thread.thread837.i270 ], [ %.pn.pn.pn15.i80, %1849 ], [ %.pn.pn.pn.i85, %.thread81.i84 ] + %.sroa.026.19.i77 = phi i1 [ true, %.thread4.i75 ], [ false, %1147 ], [ false, %1607 ], [ %.sroa.026.5.ph.ph.i271, %.thread81.thread.thread838.i270 ], [ true, %1849 ], [ true, %.thread81.i84 ] + %.pn.pn.pn.pn8.i78 = phi { ptr, i32 } [ %1104, %.thread4.i75 ], [ %.pn263.pn.pn.pn.pn.pn.i.i277, %1147 ], [ %.pn263.pn.pn.pn.pn.pn.pn430.i.i275, %1607 ], [ %lpad.thr_comm.i272, %.thread81.thread.thread838.i270 ], [ %.pn.pn.pn15.i80, %1849 ], [ %.pn.pn.pn.i85, %.thread81.i84 ] invoke void @"_ZN4core3ptr64drop_in_place$LT$alloc_stdlib..heap_alloc..WrapBox$LT$u8$GT$$GT$17hb6c382cbc1d625feE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %88) #20 to label %1033 unwind label %1845, !noalias !449 @@ -13095,7 +13095,6 @@ _ZN6brotli3enc14block_splitter18RefineEntropyCodes17h3573ab36b94fb891E.exit.i: ; %2004 = getelementptr inbounds nuw i8, ptr %46, i64 8 store i64 %2003, ptr %2004, align 8, !noalias !642 %2005 = icmp slt i32 %.val29, 12 - %..i584 = select i1 %2005, i64 3, i64 10 %2006 = icmp ugt i64 %.sroa.08.1, %1896 %2007 = getelementptr inbounds nuw i8, ptr %1895, i64 %1940 %.sroa.4250.0..sroa_idx.i.i585 = getelementptr inbounds nuw i8, ptr %17, i64 4 @@ -13118,6 +13117,7 @@ _ZN6brotli3enc14block_splitter18RefineEntropyCodes17h3573ab36b94fb891E.exit.i: ; %2010 = icmp eq i64 %1990, 0 %2011 = icmp ult i64 %2008, %1975 %2012 = getelementptr inbounds nuw i8, ptr %1974, i64 %2008 + %.830.i599 = select i1 %2005, i64 2, i64 9 br label %2488 2013: ; preds = %_ZN6brotli3enc14block_splitter20BuildBlockHistograms17h450c30cec7ce6203E.exit.i @@ -14227,9 +14227,9 @@ _ZN6brotli3enc7cluster30BrotliHistogramBitCostDistance17hbd5292ca2d7f4f70E.exit2 br label %.invoke.i.i785 .invoke.i.i785: ; preds = %2473, %2471, %2463, %2441, %.lr.ph.i111._crit_edge.i826, %.lr.ph810.i.i809, %2416, %2414, %2409, %2399, %.lr.ph817.i.i845, %2390, %2382, %2451, %.lr.ph.i818, %.invoke.i.loopexit862.split.loop.exit1017.i814 - %2387 = phi i64 [ %umax.le.i815, %.invoke.i.loopexit862.split.loop.exit1017.i814 ], [ %.sroa.041.0808.i.i810, %.lr.ph.i818 ], [ %.sroa.0103.4802.i480.i819, %2451 ], [ %2385, %2382 ], [ %2391, %2390 ], [ 64, %.lr.ph817.i.i845 ], [ %2402, %2399 ], [ %2402, %2409 ], [ %.sroa.034.1814.i.i847, %2414 ], [ %2421, %2416 ], [ %.sroa.041.0808.i.i810, %.lr.ph810.i.i809 ], [ %.sroa.041.0808.i.i810, %.lr.ph.i111._crit_edge.i826 ], [ %.sroa.041.0808.i.i810, %2441 ], [ %.sroa.0.0799.i.i783, %2463 ], [ %.sroa.0136.0798.i.i784, %2471 ], [ %2469, %2473 ] - %2388 = phi i64 [ %2029, %.invoke.i.loopexit862.split.loop.exit1017.i814 ], [ %.val390.i.i821, %.lr.ph.i818 ], [ %1896, %2451 ], [ 64, %2382 ], [ %2021, %2390 ], [ 64, %.lr.ph817.i.i845 ], [ %.val408.i.i851, %2399 ], [ 64, %2409 ], [ %.val322.i.i854, %2414 ], [ 64, %2416 ], [ %.val388.i.i832, %2441 ], [ %.val406.i.i828, %.lr.ph.i111._crit_edge.i826 ], [ %.val396.i.i812, %.lr.ph810.i.i809 ], [ %2029, %2463 ], [ %1975, %2471 ], [ %1975, %2473 ] - %2389 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.180, %.invoke.i.loopexit862.split.loop.exit1017.i814 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.186, %.lr.ph.i818 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.187, %2451 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.169, %2382 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.170, %2390 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.171, %.lr.ph817.i.i845 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.172, %2399 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.175, %2409 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.176, %2414 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.178, %2416 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.182, %2441 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.181, %.lr.ph.i111._crit_edge.i826 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.179, %.lr.ph810.i.i809 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.188, %2463 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.189, %2471 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.190, %2473 ] + %2387 = phi i64 [ %umax.le.i815, %.invoke.i.loopexit863.split.loop.exit1018.i814 ], [ %.sroa.041.0808.i.i810, %.lr.ph.i818 ], [ %.sroa.0103.4802.i480.i819, %2451 ], [ %2385, %2382 ], [ %2391, %2390 ], [ 64, %.lr.ph817.i.i845 ], [ %2402, %2399 ], [ %2402, %2409 ], [ %.sroa.034.1814.i.i847, %2414 ], [ %2421, %2416 ], [ %.sroa.041.0808.i.i810, %.lr.ph810.i.i809 ], [ %.sroa.041.0808.i.i810, %.lr.ph.i111._crit_edge.i826 ], [ %.sroa.041.0808.i.i810, %2441 ], [ %.sroa.0.0799.i.i783, %2463 ], [ %.sroa.0136.0798.i.i784, %2471 ], [ %2469, %2473 ] + %2388 = phi i64 [ %2029, %.invoke.i.loopexit863.split.loop.exit1018.i814 ], [ %.val390.i.i821, %.lr.ph.i818 ], [ %1896, %2451 ], [ 64, %2382 ], [ %2021, %2390 ], [ 64, %.lr.ph817.i.i845 ], [ %.val408.i.i851, %2399 ], [ 64, %2409 ], [ %.val322.i.i854, %2414 ], [ 64, %2416 ], [ %.val388.i.i832, %2441 ], [ %.val406.i.i828, %.lr.ph.i111._crit_edge.i826 ], [ %.val396.i.i812, %.lr.ph810.i.i809 ], [ %2029, %2463 ], [ %1975, %2471 ], [ %1975, %2473 ] + %2389 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.180, %.invoke.i.loopexit863.split.loop.exit1018.i814 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.186, %.lr.ph.i818 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.187, %2451 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.169, %2382 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.170, %2390 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.171, %.lr.ph817.i.i845 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.172, %2399 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.175, %2409 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.176, %2414 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.178, %2416 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.182, %2441 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.181, %.lr.ph.i111._crit_edge.i826 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.179, %.lr.ph810.i.i809 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.188, %2463 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.189, %2471 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.190, %2473 ] invoke void @_ZN4core9panicking18panic_bounds_check17h2d3ab0b83311a572E(i64 noundef %2387, i64 noundef %2388, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %2389) #18 to label %.cont.i.i792 unwind label %.thread446.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i.i786, !noalias !675 @@ -14665,7 +14665,7 @@ _ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit. %2531 = phi i64 [ 0, %.lr.ph400.split.us.i.i1022 ], [ %1998, %.lr.ph397.i.i707 ], [ %1990, %.lr.ph392.i.i677 ], [ %1984, %.noexc144.i626 ], [ %1914, %2676 ], [ %1984, %2675 ], [ %1896, %2714 ], [ %1914, %2709 ], [ %1975, %.noexc151.i751 ], [ %1975, %.preheader.i123.i1026 ], [ %1975, %2546 ], [ %1998, %.lr.ph413.i.i737 ], [ %1975, %.lr.ph400.split.i.i653 ], [ %1984, %2697 ], [ %1914, %.preheader329.i.i605 ], [ %1975, %_ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit._crit_edge.i.i735 ] %2532 = phi ptr [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.112, %.lr.ph400.split.us.i.i1022 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.217, %.lr.ph397.i.i707 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.119, %.lr.ph392.i.i677 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.131, %.noexc144.i626 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.130, %2676 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.129, %2675 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.215, %2714 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.214, %2709 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.213, %.noexc151.i751 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.135, %.preheader.i123.i1026 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.109, %2546 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.108, %.lr.ph413.i.i737 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.112, %.lr.ph400.split.i.i653 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.134, %2697 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.132, %.preheader329.i.i605 ], [ @anon.14565fd8bf24fc52b307f6d9f637eb2a.107, %_ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit._crit_edge.i.i735 ] invoke void @_ZN4core9panicking18panic_bounds_check17h2d3ab0b83311a572E(i64 noundef %2530, i64 noundef %2531, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %2532) #18 - to label %.cont1031.i633 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i628, !noalias !637 + to label %.cont1032.i633 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i628, !noalias !637 .cont1031.i633: ; preds = %.invoke1030.i627 unreachable @@ -15114,7 +15114,7 @@ _ZN6brotli3enc14block_splitter22update_cost_and_signal17h526b4db181ff434aE.exit. _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h450c30cec7ce6203E.exit.i: ; preds = %.noexc154.i757 %2721 = add nuw nsw i64 %.sroa.018.0477.i601, 1 - %exitcond.not.i759 = icmp eq i64 %2721, %..i584 + %exitcond.not.i759 = icmp eq i64 %.830.i599, %.sroa.018.0477.i601 br i1 %exitcond.not.i759, label %2013, label %2488 .loopexit.i618: ; preds = %2679 @@ -15138,9 +15138,9 @@ _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h450c30cec7ce6203E.exit.i: br label %.loopexit.split-lp.i620 .loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i628: ; preds = %.invoke1030.i627, %.split406.us.i.invoke.i663, %.invoke.i1019, %2015, %2014, %2013 - %.sroa.024.3.ph.ph.ph.ph.ph.i629 = phi i1 [ false, %2013 ], [ false, %2014 ], [ false, %2015 ], [ true, %.invoke.i1019 ], [ true, %.split406.us.i.invoke.i663 ], [ true, %.invoke1030.i627 ] - %.sroa.023.2.ph.ph.ph.ph.ph.i630 = phi i1 [ true, %2013 ], [ false, %2014 ], [ false, %2015 ], [ true, %.invoke.i1019 ], [ true, %.split406.us.i.invoke.i663 ], [ true, %.invoke1030.i627 ] - %.sroa.022.1.ph.ph.ph.ph.ph.i631 = phi i1 [ true, %2013 ], [ true, %2014 ], [ false, %2015 ], [ true, %.invoke.i1019 ], [ true, %.split406.us.i.invoke.i663 ], [ true, %.invoke1030.i627 ] + %.sroa.024.3.ph.ph.ph.ph.ph.i629 = phi i1 [ false, %2013 ], [ false, %2014 ], [ false, %2015 ], [ true, %.invoke.i1019 ], [ true, %.split406.us.i.invoke.i663 ], [ true, %.invoke1031.i627 ] + %.sroa.023.2.ph.ph.ph.ph.ph.i630 = phi i1 [ true, %2013 ], [ false, %2014 ], [ false, %2015 ], [ true, %.invoke.i1019 ], [ true, %.split406.us.i.invoke.i663 ], [ true, %.invoke1031.i627 ] + %.sroa.022.1.ph.ph.ph.ph.ph.i631 = phi i1 [ true, %2013 ], [ true, %2014 ], [ false, %2015 ], [ true, %.invoke.i1019 ], [ true, %.split406.us.i.invoke.i663 ], [ true, %.invoke1031.i627 ] %lpad.loopexit.split-lp129.i632 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp.i620 @@ -15178,8 +15178,8 @@ _ZN6brotli3enc14block_splitter20BuildBlockHistograms17h450c30cec7ce6203E.exit.i: to label %.thread81.thread.thread.i565 unwind label %2722, !noalias !637 .thread81.thread.thread.i565: ; preds = %2726, %2484, %2024, %.thread81.i573, %.thread4.i564, %.thread81.thread.thread837.i760 - %.sroa.026.19.i566 = phi i1 [ true, %.thread4.i564 ], [ false, %2024 ], [ false, %2484 ], [ %.sroa.026.5.ph.ph.i761, %.thread81.thread.thread837.i760 ], [ true, %2726 ], [ true, %.thread81.i573 ] - %.pn.pn.pn.pn8.i567 = phi { ptr, i32 } [ %1981, %.thread4.i564 ], [ %.pn263.pn.pn.pn.pn.pn.i.i767, %2024 ], [ %.pn263.pn.pn.pn.pn.pn.pn430.i.i765, %2484 ], [ %lpad.thr_comm.i762, %.thread81.thread.thread837.i760 ], [ %.pn.pn.pn15.i569, %2726 ], [ %.pn.pn.pn.i574, %.thread81.i573 ] + %.sroa.026.19.i566 = phi i1 [ true, %.thread4.i564 ], [ false, %2024 ], [ false, %2484 ], [ %.sroa.026.5.ph.ph.i761, %.thread81.thread.thread838.i760 ], [ true, %2726 ], [ true, %.thread81.i573 ] + %.pn.pn.pn.pn8.i567 = phi { ptr, i32 } [ %1981, %.thread4.i564 ], [ %.pn263.pn.pn.pn.pn.pn.i.i767, %2024 ], [ %.pn263.pn.pn.pn.pn.pn.pn430.i.i765, %2484 ], [ %lpad.thr_comm.i762, %.thread81.thread.thread838.i760 ], [ %.pn.pn.pn15.i569, %2726 ], [ %.pn.pn.pn.i574, %.thread81.i573 ] invoke void @"_ZN4core3ptr64drop_in_place$LT$alloc_stdlib..heap_alloc..WrapBox$LT$u8$GT$$GT$17hb6c382cbc1d625feE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %50) #20 to label %1910 unwind label %2722, !noalias !637 diff --git a/bench/postgres/optimized/copyfromparse.ll b/bench/postgres/optimized/copyfromparse.ll index 8e02d543702..5244a5ef870 100644 --- a/bench/postgres/optimized/copyfromparse.ll +++ b/bench/postgres/optimized/copyfromparse.ll @@ -923,21 +923,21 @@ CopyLoadInputBuf.exit._crit_edge.i: ; preds = %CopyLoadInputBuf.ex br i1 %210, label %211, label %232 211: ; preds = %202 - %212 = sext i8 %209 to i32 - %213 = icmp ne i8 %209, 13 - %214 = icmp slt i32 %206, %.1188.i - %215 = trunc nuw i8 %.1180.i to i1 - %216 = or i1 %213, %214 - %or.cond198.i = select i1 %216, i1 true, i1 %215 - br i1 %or.cond198.i, label %217, label %.thread.i.backedge - -217: ; preds = %211 + %212 = icmp ne i8 %209, 13 + %213 = icmp slt i32 %206, %.1188.i + %214 = trunc nuw i8 %.1180.i to i1 + %215 = or i1 %212, %213 + %or.cond198.i = select i1 %215, i1 true, i1 %214 + br i1 %or.cond198.i, label %216, label %.thread.i.backedge + +216: ; preds = %211 + %217 = sext i8 %209 to i32 %218 = trunc nuw i8 %.0171.i to i1 - %219 = icmp eq i32 %.0164.i, %212 + %219 = icmp eq i32 %.0164.i, %217 %or.cond199.i = select i1 %218, i1 %219, i1 false %220 = zext i1 %or.cond199.i to i8 %.3169.i = xor i8 %.0166.i, %220 - %.not.i = icmp eq i32 %.0165.i, %212 + %.not.i = icmp eq i32 %.0165.i, %217 %221 = xor i8 %.3169.i, -1 %222 = select i1 %.not.i, i8 %221, i8 0 %.3174.i = xor i8 %222, %.0171.i @@ -945,11 +945,11 @@ CopyLoadInputBuf.exit._crit_edge.i: ; preds = %CopyLoadInputBuf.ex %223 = trunc i8 %.3174.i to i1 br i1 %223, label %224, label %232 -224: ; preds = %217 +224: ; preds = %216 %225 = load i32, ptr %34, align 8 %226 = icmp eq i32 %225, 1 - %227 = select i1 %226, i32 10, i32 13 - %228 = icmp eq i32 %227, %212 + %227 = select i1 %226, i8 10, i8 13 + %228 = icmp eq i8 %227, %209 br i1 %228, label %229, label %232 229: ; preds = %224 @@ -958,9 +958,9 @@ CopyLoadInputBuf.exit._crit_edge.i: ; preds = %CopyLoadInputBuf.ex store i64 %231, ptr %35, align 8 br label %232 -232: ; preds = %229, %224, %217, %202 - %.2173.i = phi i8 [ 1, %229 ], [ 1, %224 ], [ 0, %217 ], [ %.0171.i, %202 ] - %.2168.i = phi i8 [ %.4170.i, %229 ], [ %.4170.i, %224 ], [ %.4170.i, %217 ], [ %.0166.i, %202 ] +232: ; preds = %229, %224, %216, %202 + %.2173.i = phi i8 [ 1, %229 ], [ 1, %224 ], [ 0, %216 ], [ %.0171.i, %202 ] + %.2168.i = phi i8 [ %.4170.i, %229 ], [ %.4170.i, %224 ], [ %.4170.i, %216 ], [ %.0166.i, %202 ] switch i8 %209, label %.thread.i.backedge [ i8 13, label %233 i8 10, label %267 diff --git a/bench/postgres/optimized/nbtsearch.ll b/bench/postgres/optimized/nbtsearch.ll index 31cf9d4dbe0..09bc0f54f5a 100644 --- a/bench/postgres/optimized/nbtsearch.ll +++ b/bench/postgres/optimized/nbtsearch.ll @@ -564,155 +564,154 @@ define dso_local i32 @_bt_compare(ptr noundef readonly captures(none) %0, ptr no %12 = load i16, ptr %11, align 4 %13 = and i16 %12, 1 %.not = icmp eq i16 %13, 0 - br i1 %.not, label %14, label %21 + br i1 %.not, label %14, label %20 14: ; preds = %4 - %15 = zext i16 %3 to i32 - %16 = getelementptr inbounds nuw i8, ptr %10, i64 4 - %17 = load i32, ptr %16, align 4 - %18 = icmp eq i32 %17, 0 - %19 = select i1 %18, i32 1, i32 2 - %20 = icmp eq i32 %19, %15 - br i1 %20, label %.thread104, label %21 - -21: ; preds = %14, %4 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 24 - %23 = zext i16 %3 to i64 - %24 = add nsw i64 %23, -1 - %25 = getelementptr inbounds [0 x %struct.ItemIdData], ptr %22, i64 0, i64 %24 - %.val = load i32, ptr %25, align 4 - %26 = and i32 %.val, 32767 - %27 = zext nneg i32 %26 to i64 - %28 = getelementptr inbounds nuw i8, ptr %2, i64 %27 - %29 = getelementptr inbounds nuw i8, ptr %28, i64 6 - %30 = load i16, ptr %29, align 2 - %31 = and i16 %30, 8192 - %32 = icmp eq i16 %31, 0 - br i1 %32, label %BTreeTupleIsPivot.exit.thread, label %BTreeTupleIsPivot.exit - -BTreeTupleIsPivot.exit: ; preds = %21 - %33 = getelementptr i8, ptr %28, i64 4 - %.val.i = load i16, ptr %33, align 2 - %34 = and i16 %.val.i, 8192 - %.not.i = icmp eq i16 %34, 0 - br i1 %.not.i, label %35, label %BTreeTupleIsPivot.exit.thread - -35: ; preds = %BTreeTupleIsPivot.exit - %36 = and i16 %.val.i, 4095 - %37 = zext nneg i16 %36 to i32 - br label %43 - -BTreeTupleIsPivot.exit.thread: ; preds = %21, %BTreeTupleIsPivot.exit - %38 = getelementptr inbounds nuw i8, ptr %0, i64 328 - %39 = load ptr, ptr %38, align 8 - %40 = getelementptr inbounds nuw i8, ptr %39, i64 8 - %41 = load i16, ptr %40, align 4 - %42 = sext i16 %41 to i32 - br label %43 - -43: ; preds = %BTreeTupleIsPivot.exit.thread, %35 - %44 = phi i32 [ %37, %35 ], [ %42, %BTreeTupleIsPivot.exit.thread ] - %45 = getelementptr inbounds nuw i8, ptr %1, i64 16 - %46 = load i32, ptr %45, align 8 - %. = tail call i32 @llvm.smin.i32(i32 %44, i32 %46) + %15 = getelementptr inbounds nuw i8, ptr %10, i64 4 + %16 = load i32, ptr %15, align 4 + %17 = icmp eq i32 %16, 0 + %18 = select i1 %17, i16 1, i16 2 + %19 = icmp eq i16 %18, %3 + br i1 %19, label %.thread104, label %20 + +20: ; preds = %14, %4 + %21 = getelementptr inbounds nuw i8, ptr %2, i64 24 + %22 = zext i16 %3 to i64 + %23 = add nsw i64 %22, -1 + %24 = getelementptr inbounds [0 x %struct.ItemIdData], ptr %21, i64 0, i64 %23 + %.val = load i32, ptr %24, align 4 + %25 = and i32 %.val, 32767 + %26 = zext nneg i32 %25 to i64 + %27 = getelementptr inbounds nuw i8, ptr %2, i64 %26 + %28 = getelementptr inbounds nuw i8, ptr %27, i64 6 + %29 = load i16, ptr %28, align 2 + %30 = and i16 %29, 8192 + %31 = icmp eq i16 %30, 0 + br i1 %31, label %BTreeTupleIsPivot.exit.thread, label %BTreeTupleIsPivot.exit + +BTreeTupleIsPivot.exit: ; preds = %20 + %32 = getelementptr i8, ptr %27, i64 4 + %.val.i = load i16, ptr %32, align 2 + %33 = and i16 %.val.i, 8192 + %.not.i = icmp eq i16 %33, 0 + br i1 %.not.i, label %34, label %BTreeTupleIsPivot.exit.thread + +34: ; preds = %BTreeTupleIsPivot.exit + %35 = and i16 %.val.i, 4095 + %36 = zext nneg i16 %35 to i32 + br label %42 + +BTreeTupleIsPivot.exit.thread: ; preds = %20, %BTreeTupleIsPivot.exit + %37 = getelementptr inbounds nuw i8, ptr %0, i64 328 + %38 = load ptr, ptr %37, align 8 + %39 = getelementptr inbounds nuw i8, ptr %38, i64 8 + %40 = load i16, ptr %39, align 4 + %41 = sext i16 %40 to i32 + br label %42 + +42: ; preds = %BTreeTupleIsPivot.exit.thread, %34 + %43 = phi i32 [ %36, %34 ], [ %41, %BTreeTupleIsPivot.exit.thread ] + %44 = getelementptr inbounds nuw i8, ptr %1, i64 16 + %45 = load i32, ptr %44, align 8 + %. = tail call i32 @llvm.smin.i32(i32 %43, i32 %45) %.not70116 = icmp slt i32 %., 1 br i1 %.not70116, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %43 +.lr.ph: ; preds = %42 %47 = getelementptr inbounds nuw i8, ptr %1, i64 24 %48 = getelementptr inbounds nuw i8, ptr %6, i64 24 - %49 = getelementptr inbounds nuw i8, ptr %28, i64 8 - br label %50 - -50: ; preds = %.lr.ph, %.thread96 - %.059118 = phi i32 [ 1, %.lr.ph ], [ %122, %.thread96 ] - %.063117 = phi ptr [ %47, %.lr.ph ], [ %.164101, %.thread96 ] - %51 = getelementptr inbounds nuw i8, ptr %.063117, i64 4 - %52 = load i16, ptr %51, align 4 - %53 = sext i16 %52 to i32 - %.val.i80 = load i16, ptr %29, align 2 - %54 = icmp slt i16 %.val.i80, 0 - %55 = add nsw i32 %53, -1 - br i1 %54, label %89, label %56 + %49 = getelementptr inbounds nuw i8, ptr %27, i64 8 + br label %56 -56: ; preds = %50 - %57 = sext i32 %55 to i64 - %58 = getelementptr inbounds [0 x %struct.CompactAttribute], ptr %48, i64 0, i64 %57 - %59 = load i32, ptr %58, align 4 - %60 = icmp sgt i32 %59, -1 - br i1 %60, label %61, label %87 - -61: ; preds = %56 - %62 = zext nneg i32 %59 to i64 - %63 = getelementptr inbounds nuw i8, ptr %49, i64 %62 - %64 = getelementptr inbounds nuw i8, ptr %58, i64 6 - %65 = load i8, ptr %64, align 2, !range !5, !noundef !6 - %66 = trunc nuw i8 %65 to i1 - br i1 %66, label %67, label %85 - -67: ; preds = %61 - %68 = getelementptr inbounds nuw i8, ptr %58, i64 4 - %69 = load i16, ptr %68, align 4 - switch i16 %69, label %81 [ - i16 1, label %70 - i16 2, label %73 - i16 4, label %76 - i16 8, label %79 +56: ; preds = %.lr.ph, %.thread96 + %.059118 = phi i32 [ 1, %.lr.ph ], [ %121, %.thread96 ] + %.063117 = phi ptr [ %48, %.lr.ph ], [ %.164101, %.thread96 ] + %50 = getelementptr inbounds nuw i8, ptr %.063118, i64 4 + %51 = load i16, ptr %50, align 4 + %52 = sext i16 %51 to i32 + %.val.i80 = load i16, ptr %28, align 2 + %53 = icmp slt i16 %.val.i80, 0 + %54 = add nsw i32 %52, -1 + br i1 %53, label %88, label %55 + +55:; preds = %56 + %56 = sext i32 %54 to i64 + %57 = getelementptr inbounds [0 x %struct.CompactAttribute], ptr %47, i64 0, i64 %56 + %58 = load i32, ptr %57, align 4 + %59 = icmp sgt i32 %58, -1 + br i1 %59, label %60, label %86 + +60:; preds = %55 + %61 = zext nneg i32 %58 to i64 + %62 = getelementptr inbounds nuw i8, ptr %48, i64 %61 + %63 = getelementptr inbounds nuw i8, ptr %57, i64 6 + %64 = load i8, ptr %63, align 2, !range !5, !noundef !6 + %65 = trunc nuw i8 %64 to i1 + br i1 %65, label %66, label %84 + +66: ; preds = %60 + %67 = getelementptr inbounds nuw i8, ptr %57, i64 4 + %68 = load i16, ptr %67, align 4 + switch i16 %68, label %80 [ + i16 1, label %69 + i16 2, label %72 + i16 4, label %75 + i16 8, label %78 ] -70: ; preds = %67 - %71 = load i8, ptr %63, align 1 +70: ; preds = %66 + %71 = load i8, ptr %62, align 1 %72 = sext i8 %71 to i64 br label %index_getattr.exit -73: ; preds = %67 - %74 = load i16, ptr %63, align 2 +73: ; preds = %66 + %74 = load i16, ptr %62, align 2 %75 = sext i16 %74 to i64 br label %index_getattr.exit -76: ; preds = %67 - %77 = load i32, ptr %63, align 4 +76: ; preds = %66 + %77 = load i32, ptr %62, align 4 %78 = sext i32 %77 to i64 br label %index_getattr.exit -79: ; preds = %67 - %80 = load i64, ptr %63, align 8 +79: ; preds = %66 + %80 = load i64, ptr %62, align 8 br label %index_getattr.exit -81: ; preds = %67 - %82 = sext i16 %69 to i32 +81: ; preds = %66 + %82 = sext i16 %68 to i32 %83 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 tail call void @llvm.assume(i1 %83) %84 = tail call i32 (ptr, ...) @errmsg_internal(ptr noundef nonnull @.str.6, i32 noundef range(i32 -32768, 32768) %82) #7 tail call void @errfinish(ptr noundef nonnull @.str.7, i32 noundef 70, ptr noundef nonnull @__func__.fetch_att) #7 unreachable -85: ; preds = %61 - %86 = ptrtoint ptr %63 to i64 +85: ; preds = %60 + %86 = ptrtoint ptr %62 to i64 br label %index_getattr.exit -87: ; preds = %56 - %88 = tail call i64 @nocache_index_getattr(ptr noundef nonnull %28, i32 noundef range(i32 -32768, 32768) %53, ptr noundef nonnull %6) #7 +87: ; preds = %55 + %88 = tail call i64 @nocache_index_getattr(ptr noundef nonnull %27, i32 noundef range(i32 -32768, 32768) %52, ptr noundef nonnull %6) #7 br label %index_getattr.exit -89: ; preds = %50 - %90 = ashr i32 %55, 3 +89: ; preds = %56 + %90 = ashr i32 %54, 3 %91 = sext i32 %90 to i64 %92 = getelementptr inbounds i8, ptr %49, i64 %91 %93 = load i8, ptr %92, align 1 %94 = zext i8 %93 to i32 - %95 = and i32 %55, 7 + %95 = and i32 %54, 7 %96 = shl nuw nsw i32 1, %95 %97 = and i32 %96, %94 %.not.i19.i = icmp eq i32 %97, 0 br i1 %.not.i19.i, label %index_getattr.exit.thread, label %98 98: ; preds = %89 - %99 = tail call i64 @nocache_index_getattr(ptr noundef nonnull %28, i32 noundef range(i32 -32768, 32768) %53, ptr noundef %6) #7 + %99 = tail call i64 @nocache_index_getattr(ptr noundef nonnull %27, i32 noundef range(i32 -32768, 32768) %52, ptr noundef %6) #7 br label %index_getattr.exit index_getattr.exit: ; preds = %70, %73, %76, %79, %85, %87, %98 - %.1.i = phi i64 [ %99, %98 ], [ %72, %70 ], [ %75, %73 ], [ %78, %76 ], [ %80, %79 ], [ %86, %85 ], [ %88, %87 ] + %.1.i = phi i64 [ %99, %97 ], [ %72, %69 ], [ %75, %72 ], [ %78, %75 ], [ %80, %78 ], [ %86, %84 ], [ %88, %86 ] %100 = load i32, ptr %.063117, align 8 %101 = and i32 %100, 1 %.not71 = icmp eq i32 %101, 0 @@ -755,7 +754,7 @@ index_getattr.exit.thread: ; preds = %89 br i1 %119, label %.thread104, label %121 121: ; preds = %118, %108 - %.062 = phi i32 [ %115, %108 ], [ %120, %118 ] + %.062 = phi i32 [ %115, %107 ], [ %120, %117 ] %.not75 = icmp eq i32 %.062, 0 br i1 %.not75, label %.thread96, label %.thread104 @@ -763,25 +762,25 @@ index_getattr.exit.thread: ; preds = %89 %.164101 = getelementptr inbounds nuw i8, ptr %.063117, i64 72 %122 = add nuw nsw i32 %.059118, 1 %exitcond.not = icmp eq i32 %.059118, %. - br i1 %exitcond.not, label %._crit_edge.loopexit, label %50, !llvm.loop !11 + br i1 %exitcond.not, label %._crit_edge.loopexit, label %56, !llvm.loop !11 ._crit_edge.loopexit: ; preds = %.thread96 - %.pre = load i32, ptr %45, align 8 + %.pre = load i32, ptr %44, align 8 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %43 - %123 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %46, %43 ] - %124 = icmp sgt i32 %123, %44 +._crit_edge: ; preds = %._crit_edge.loopexit, %42 + %123 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %45, %42 ] + %124 = icmp sgt i32 %123, %43 br i1 %124, label %.thread104, label %125 125: ; preds = %._crit_edge - %126 = load i16, ptr %29, align 2 + %126 = load i16, ptr %28, align 2 %127 = and i16 %126, 8192 %128 = icmp eq i16 %127, 0 br i1 %128, label %BTreeTupleGetHeapTID.exit, label %BTreeTupleIsPivot.exit.i BTreeTupleIsPivot.exit.i: ; preds = %125 - %129 = getelementptr i8, ptr %28, i64 4 + %129 = getelementptr i8, ptr %27, i64 4 %.val.i.i = load i16, ptr %129, align 2 %130 = and i16 %.val.i.i, 8192 %.not.i.i = icmp eq i16 %130, 0 @@ -795,43 +794,43 @@ BTreeTupleIsPivot.exit.i: ; preds = %125 133: ; preds = %131 %134 = and i16 %126, 8191 %135 = zext nneg i16 %134 to i64 - %136 = getelementptr inbounds nuw i8, ptr %28, i64 %135 + %136 = getelementptr inbounds nuw i8, ptr %27, i64 %135 %137 = getelementptr inbounds i8, ptr %136, i64 -6 br label %BTreeTupleGetHeapTID.exit BTreeTupleIsPosting.exit.i: ; preds = %BTreeTupleIsPivot.exit.i - %.val.i11.i = load i16, ptr %28, align 2 - %138 = getelementptr i8, ptr %28, i64 2 + %.val.i11.i = load i16, ptr %27, align 2 + %138 = getelementptr i8, ptr %27, i64 2 %.val2.i.i = load i16, ptr %138, align 2 %139 = zext i16 %.val.i11.i to i64 %140 = shl nuw nsw i64 %139, 16 %141 = zext i16 %.val2.i.i to i64 - %142 = getelementptr inbounds nuw i8, ptr %28, i64 %140 + %142 = getelementptr inbounds nuw i8, ptr %27, i64 %140 %143 = getelementptr inbounds nuw i8, ptr %142, i64 %141 br label %BTreeTupleGetHeapTID.exit BTreeTupleGetHeapTID.exit: ; preds = %125, %133, %BTreeTupleIsPosting.exit.i - %.0.i81 = phi ptr [ %137, %133 ], [ %143, %BTreeTupleIsPosting.exit.i ], [ %28, %125 ] + %.0.i81 = phi ptr [ %137, %132 ], [ %143, %BTreeTupleIsPosting.exit.i ], [ %27, %124 ] %144 = getelementptr inbounds nuw i8, ptr %1, i64 8 %145 = load ptr, ptr %144, align 8 %146 = icmp eq ptr %145, null - br i1 %146, label %150, label %161 + br i1 %146, label %156, label %161 BTreeTupleGetHeapTID.exit.thread: ; preds = %131 %147 = getelementptr inbounds nuw i8, ptr %1, i64 8 %148 = load ptr, ptr %147, align 8 %149 = icmp eq ptr %148, null - br i1 %149, label %150, label %.thread104 + br i1 %149, label %156, label %.thread104 -150: ; preds = %BTreeTupleGetHeapTID.exit.thread, %BTreeTupleGetHeapTID.exit +156: ; preds = %BTreeTupleGetHeapTID.exit.thread, %BTreeTupleGetHeapTID.exit %.0.i81108 = phi ptr [ null, %BTreeTupleGetHeapTID.exit.thread ], [ %.0.i81, %BTreeTupleGetHeapTID.exit ] %151 = getelementptr inbounds nuw i8, ptr %1, i64 4 %152 = load i8, ptr %151, align 4, !range !5, !noundef !6 %153 = trunc nuw i8 %152 to i1 br i1 %153, label %160, label %154 -154: ; preds = %150 - %155 = icmp eq i32 %123, %44 +154: ; preds = %156 + %155 = icmp eq i32 %123, %43 %156 = icmp eq ptr %.0.i81108, null %or.cond = select i1 %155, i1 %156, i1 false br i1 %or.cond, label %157, label %160 @@ -841,7 +840,7 @@ BTreeTupleGetHeapTID.exit.thread: ; preds = %131 %159 = trunc nuw i8 %158 to i1 br i1 %159, label %.thread104, label %160 -160: ; preds = %157, %154, %150 +160: ; preds = %157, %154, %156 br label %.thread104 161: ; preds = %BTreeTupleGetHeapTID.exit @@ -850,13 +849,13 @@ BTreeTupleGetHeapTID.exit.thread: ; preds = %131 br i1 %163, label %.thread104, label %164 164: ; preds = %161 - %165 = load i16, ptr %29, align 2 + %165 = load i16, ptr %28, align 2 %166 = and i16 %165, 8192 %167 = icmp eq i16 %166, 0 br i1 %167, label %.thread104, label %BTreeTupleIsPosting.exit BTreeTupleIsPosting.exit: ; preds = %164 - %168 = getelementptr i8, ptr %28, i64 4 + %168 = getelementptr i8, ptr %27, i64 4 %.val.i83 = load i16, ptr %168, align 2 %169 = and i16 %.val.i83, 8192 %.not112 = icmp eq i16 %169, 0 @@ -864,11 +863,11 @@ BTreeTupleIsPosting.exit: ; preds = %164 BTreeTupleGetMaxHeapTID.exit: ; preds = %BTreeTupleIsPosting.exit %170 = load ptr, ptr %144, align 8 - %.val.i.i.i = load i16, ptr %28, align 2 + %.val.i.i.i = load i16, ptr %27, align 2 %171 = zext i16 %.val.i.i.i to i64 %172 = shl nuw nsw i64 %171, 16 - %173 = getelementptr inbounds nuw i8, ptr %28, i64 %172 - %174 = getelementptr i8, ptr %28, i64 2 + %173 = getelementptr inbounds nuw i8, ptr %27, i64 %172 + %174 = getelementptr i8, ptr %27, i64 2 %.val2.i.i.i = load i16, ptr %174, align 2 %175 = zext i16 %.val2.i.i.i to i64 %176 = getelementptr inbounds nuw i8, ptr %173, i64 %175 @@ -882,7 +881,7 @@ BTreeTupleGetMaxHeapTID.exit: ; preds = %BTreeTupleIsPosting br label %.thread104 .thread104: ; preds = %118, %121, %164, %BTreeTupleGetHeapTID.exit.thread, %106, %104, %BTreeTupleGetMaxHeapTID.exit, %161, %BTreeTupleIsPosting.exit, %157, %._crit_edge, %14, %160 - %.0 = phi i32 [ 0, %160 ], [ 1, %14 ], [ 1, %._crit_edge ], [ 1, %157 ], [ %162, %BTreeTupleIsPosting.exit ], [ %162, %161 ], [ %.78, %BTreeTupleGetMaxHeapTID.exit ], [ %.77, %106 ], [ %.76, %104 ], [ 1, %BTreeTupleGetHeapTID.exit.thread ], [ %162, %164 ], [ 1, %118 ], [ %.062, %121 ] + %.0 = phi i32 [ 0, %159 ], [ 1, %14 ], [ 1, %._crit_edge ], [ 1, %156 ], [ %162, %BTreeTupleIsPosting.exit ], [ %162, %160 ], [ %.78, %BTreeTupleGetMaxHeapTID.exit ], [ %.77, %105 ], [ %.76, %103 ], [ 1, %BTreeTupleGetHeapTID.exit.thread ], [ %162, %163 ], [ 1, %117 ], [ %.062, %120 ] ret i32 %.0 } diff --git a/bench/postgres/optimized/nbtutils.ll b/bench/postgres/optimized/nbtutils.ll index 6444c2d9607..de5e5f3dc96 100644 --- a/bench/postgres/optimized/nbtutils.ll +++ b/bench/postgres/optimized/nbtutils.ll @@ -2433,7 +2433,7 @@ BufferGetPage.exit: ; preds = %.thread, %19, %13 %61 = icmp eq i32 %60, 0 %62 = getelementptr inbounds nuw i8, ptr %3, i64 48 %63 = getelementptr inbounds nuw i8, ptr %3, i64 136 - %64 = select i1 %61, i32 1, i32 2 + %64 = select i1 %61, i16 1, i16 2 %65 = getelementptr inbounds nuw i8, ptr %.0, i64 24 %wide.trip.count135 = zext nneg i32 %5 to i64 br label %.outer @@ -2452,10 +2452,9 @@ BufferGetPage.exit: ; preds = %.thread, %19, %13 %71 = getelementptr inbounds [1358 x %struct.BTScanPosItem], ptr %63, i64 0, i64 %70 %72 = getelementptr inbounds nuw i8, ptr %71, i64 6 %73 = load i16, ptr %72, align 2 - %74 = zext i16 %73 to i32 - %75 = icmp samesign ugt i32 %64, %74 + %74 = icmp ugt i16 %64, %73 %.not120 = icmp ugt i16 %73, %.0.i - %or.cond = select i1 %75, i1 true, i1 %.not120 + %or.cond = select i1 %74, i1 true, i1 %.not120 %.pre = add nuw nsw i64 %indvars.iv133, 1 br i1 %or.cond, label %.loopexit, label %.lr.ph123 @@ -2464,8 +2463,8 @@ BufferGetPage.exit: ; preds = %.thread, %19, %13 br label %77 77: ; preds = %.lr.ph123, %119 - %.075122 = phi i16 [ %73, %.lr.ph123 ], [ %120, %119 ] - %.077121 = phi ptr [ %71, %.lr.ph123 ], [ %.5102, %119 ] + %.075122 = phi i16 [ %73, %.lr.ph123 ], [ %120, %118 ] + %.077121 = phi ptr [ %71, %.lr.ph123 ], [ %.5102, %118 ] %78 = zext i16 %.075122 to i64 %79 = add nsw i64 %78, -1 %80 = getelementptr inbounds [0 x %struct.ItemIdData], ptr %65, i64 0, i64 %79 @@ -2498,9 +2497,9 @@ BTreeTupleIsPosting.exit: ; preds = %77 br label %94 94: ; preds = %.lr.ph, %112 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %112 ] - %.069114 = phi i32 [ %76, %.lr.ph ], [ %.1.ph, %112 ] - %.178113 = phi ptr [ %.077121, %.lr.ph ], [ %.380.ph, %112 ] + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %111 ] + %.069114 = phi i32 [ %76, %.lr.ph ], [ %.1.ph, %111 ] + %.178113 = phi ptr [ %.077121, %.lr.ph ], [ %.380.ph, %111 ] %.val.i.i = load i16, ptr %83, align 2 %.val2.i.i = load i16, ptr %93, align 2 %95 = zext i16 %.val.i.i to i64 @@ -2527,8 +2526,8 @@ BTreeTupleIsPosting.exit: ; preds = %77 br label %112 112: ; preds = %104, %102 - %.380.ph = phi ptr [ %.178113, %102 ], [ %111, %104 ] - %.1.ph = phi i32 [ %.069114, %102 ], [ %106, %104 ] + %.380.ph = phi ptr [ %.178113, %101 ], [ %111, %103 ] + %.1.ph = phi i32 [ %.069114, %101 ], [ %106, %103 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %._crit_edge.thread, label %94, !llvm.loop !17 @@ -2538,8 +2537,8 @@ BTreeTupleIsPosting.exit: ; preds = %77 br label %._crit_edge ._crit_edge: ; preds = %._crit_edge.loopexit, %90 - %.178.lcssa = phi ptr [ %.077121, %90 ], [ %.178113, %._crit_edge.loopexit ] - %.067.lcssa = phi i32 [ 0, %90 ], [ %113, %._crit_edge.loopexit ] + %.178.lcssa = phi ptr [ %.077121, %89 ], [ %.178113, %._crit_edge.loopexit ] + %.067.lcssa = phi i32 [ 0, %89 ], [ %113, %._crit_edge.loopexit ] %114 = icmp eq i32 %.067.lcssa, %92 br i1 %114, label %._crit_edge.thread, label %119 @@ -2548,7 +2547,7 @@ BTreeTupleIsPosting.exit.thread: ; preds = %77, %BTreeTupleIsPo br i1 %115, label %._crit_edge.thread, label %119 ._crit_edge.thread: ; preds = %112, %._crit_edge, %BTreeTupleIsPosting.exit.thread - %.5103 = phi ptr [ %.178.lcssa, %._crit_edge ], [ %.077121, %BTreeTupleIsPosting.exit.thread ], [ %.380.ph, %112 ] + %.5103 = phi ptr [ %.178.lcssa, %._crit_edge ], [ %.077121, %BTreeTupleIsPosting.exit.thread ], [ %.380.ph, %111 ] %116 = load i32, ptr %80, align 4 %117 = and i32 %116, 98304 %118 = icmp eq i32 %117, 98304 @@ -3281,15 +3280,14 @@ BTreeTupleIsPosting.exit61.thread: ; preds = %.thread, %.thread90 %39 = sext i16 %10 to i32 %40 = and i16 %16, 1 %.not47 = icmp eq i16 %40, 0 - %41 = zext i16 %3 to i32 - %42 = getelementptr inbounds nuw i8, ptr %14, i64 4 - %43 = load i32, ptr %42, align 4 - %44 = icmp eq i32 %43, 0 - %45 = select i1 %44, i32 1, i32 2 - br i1 %.not47, label %55, label %46 + %41 = getelementptr inbounds nuw i8, ptr %14, i64 4 + %42 = load i32, ptr %41, align 4 + %43 = icmp eq i32 %42, 0 + %44 = select i1 %43, i16 1, i16 2 + br i1 %.not47, label %55, label %45 46: ; preds = %BTreeTupleIsPosting.exit61.thread - %.not48 = icmp samesign ugt i32 %45, %41 + %.not48 = icmp ugt i16 %44, %3 br i1 %.not48, label %52, label %47 47: ; preds = %46 @@ -3317,7 +3315,7 @@ BTreeTupleIsPivot.exit65: ; preds = %47 br label %BTreeTupleIsPivot.exit69.thread 55: ; preds = %BTreeTupleIsPosting.exit61.thread - %56 = icmp eq i32 %45, %41 + %56 = icmp eq i16 %44, %3 br i1 %56, label %57, label %62 57: ; preds = %55 @@ -3364,7 +3362,7 @@ BTreeTupleIsPosting.exit72: ; preds = %BTreeTupleIsPivot.e br label %BTreeTupleIsPivot.exit69.thread BTreeTupleIsPivot.exit69.thread: ; preds = %57, %.thread90, %BTreeTupleIsPivot.exit65, %65, %BTreeTupleIsPivot.exit65.thread, %BTreeTupleIsPosting.exit72, %BTreeTupleIsPivot.exit69, %59, %4, %69, %63, %53 - %.0 = phi i1 [ %72, %69 ], [ %54, %53 ], [ %64, %63 ], [ true, %4 ], [ %61, %59 ], [ false, %BTreeTupleIsPivot.exit69 ], [ false, %BTreeTupleIsPosting.exit72 ], [ %48, %BTreeTupleIsPivot.exit65.thread ], [ false, %65 ], [ %spec.select, %BTreeTupleIsPivot.exit65 ], [ false, %.thread90 ], [ %.mux, %57 ] + %.0 = phi i1 [ %72, %68 ], [ %54, %52 ], [ %64, %62 ], [ true, %4 ], [ %61, %58 ], [ false, %BTreeTupleIsPivot.exit69 ], [ false, %BTreeTupleIsPosting.exit72 ], [ %48, %BTreeTupleIsPivot.exit65.thread ], [ false, %64 ], [ %spec.select, %BTreeTupleIsPivot.exit65 ], [ false, %.thread90 ], [ %.mux, %56 ] ret i1 %.0 } diff --git a/bench/postgres/optimized/network.ll b/bench/postgres/optimized/network.ll index 43b8dc47991..e67b6dbc12a 100644 --- a/bench/postgres/optimized/network.ll +++ b/bench/postgres/optimized/network.ll @@ -581,8 +581,8 @@ define dso_local noundef i64 @inet_to_cidr(ptr noundef readonly captures(none) % %11 = zext i8 %10 to i32 %12 = load i8, ptr %8, align 1 %13 = icmp eq i8 %12, 2 - %14 = select i1 %13, i32 32, i32 128 - %15 = icmp samesign ult i32 %14, %11 + %14 = select i1 %13, i8 32, i8 -128 + %15 = icmp ult i8 %14, %10 br i1 %15, label %16, label %19 16: ; preds = %1 @@ -624,10 +624,10 @@ define dso_local noundef i64 @inet_to_cidr(ptr noundef readonly captures(none) % %.not32.i = icmp eq i8 %39, 0 %40 = select i1 %.not32.i, ptr %24, ptr %23 %41 = getelementptr inbounds nuw i8, ptr %40, i64 2 - %.lhs.trunc = add i8 %10, 7 - %42 = lshr i8 %.lhs.trunc, 3 - %43 = zext nneg i8 %42 to i64 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %37, ptr nonnull align 1 %41, i64 %43, i1 false) + %42 = zext i8 %10 to i64 + %.lhs.trunc = add nuw nsw i64 %42, 7 + %.zext = lshr i64 %.lhs.trunc, 3 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %37, ptr nonnull align 1 %41, i64 %.zext, i1 false) %44 = and i32 %11, 7 %.not33.i = icmp eq i32 %44, 0 br i1 %.not33.i, label %cidr_set_masklen_internal.exit, label %45 @@ -2353,7 +2353,7 @@ define dso_local noundef i64 @network_broadcast(ptr noundef readonly captures(no %21 = getelementptr inbounds nuw i8, ptr %6, i64 4 %22 = select i1 %.not43, ptr %21, ptr %20 %23 = getelementptr inbounds nuw i8, ptr %22, i64 2 - %wide.trip.count = select i1 %13, i64 4, i64 16 + %wide.trip.count = select i1 %13, i64 3, i64 15 br label %24 24: ; preds = %1, %33 @@ -2384,7 +2384,7 @@ define dso_local noundef i64 @network_broadcast(ptr noundef readonly captures(no %37 = getelementptr inbounds nuw i8, ptr %23, i64 %indvars.iv store i8 %36, ptr %37, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %wide.trip.count, %indvars.iv br i1 %exitcond.not, label %38, label %24, !llvm.loop !26 38: ; preds = %33 @@ -2954,7 +2954,7 @@ define dso_local double @convert_network_to_scalar(i64 noundef %0, i32 noundef % %11 = icmp eq i8 %10, 2 %12 = uitofp i8 %10 to double %13 = getelementptr inbounds nuw i8, ptr %9, i64 2 - %wide.trip.count = select i1 %11, i64 4, i64 5 + %wide.trip.count = select i1 %11, i64 3, i64 4 br label %14 14: ; preds = %4, %14 @@ -2966,7 +2966,7 @@ define dso_local double @convert_network_to_scalar(i64 noundef %0, i32 noundef % %18 = uitofp i8 %17 to double %19 = fadd double %15, %18 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %wide.trip.count, %indvars.iv br i1 %exitcond.not, label %.loopexit, label %14, !llvm.loop !29 20: ; preds = %3 diff --git a/bench/qemu/optimized/virtio.ll b/bench/qemu/optimized/virtio.ll index a5e77fccdaa..95457f0b354 100644 --- a/bench/qemu/optimized/virtio.ll +++ b/bench/qemu/optimized/virtio.ll @@ -10172,18 +10172,17 @@ define internal zeroext i1 @virtio_device_endian_needed(ptr noundef readonly cap br i1 %.not6, label %8, label %12 8: ; preds = %5 - %9 = zext i8 %3 to i32 - %10 = tail call zeroext i1 @target_words_bigendian() #24 - %..i = select i1 %10, i32 2, i32 1 - %11 = icmp ne i32 %..i, %9 - br label %14 + %9 = tail call zeroext i1 @target_words_bigendian() #24 + %..i7 = select i1 %9, i8 2, i8 1 + %10 = icmp ne i8 %..i7, %3 + br label %13 12: ; preds = %5 %13 = icmp ne i8 %3, 1 br label %14 14: ; preds = %12, %8 - %.0 = phi i1 [ %13, %12 ], [ %11, %8 ] + %.0 = phi i1 [ %13, %11 ], [ %10, %8 ] ret i1 %.0 } diff --git a/bench/redis/optimized/bitops.ll b/bench/redis/optimized/bitops.ll index 5aacbfe4f61..9e159bc8bbf 100644 --- a/bench/redis/optimized/bitops.ll +++ b/bench/redis/optimized/bitops.ll @@ -279,24 +279,26 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #1 ; Function Attrs: nounwind uwtable define dso_local i64 @redisBitpos(ptr noundef %0, i64 noundef %1, i32 noundef %2) local_unnamed_addr #4 { %.not = icmp eq i32 %2, 0 - %4 = select i1 %.not, i64 255, i64 0 - %5 = ptrtoint ptr %0 to i64 - %6 = and i64 %5, 7 - %7 = icmp eq i64 %6, 0 - %8 = icmp eq i64 %1, 0 - %.not5868 = or i1 %7, %8 + %4 = ptrtoint ptr %0 to i64 + %5 = and i64 %4, 7 + %6 = icmp eq i64 %5, 0 + %7 = icmp eq i64 %1, 0 + %.not5868 = or i1 %6, %7 br i1 %.not5868, label %.critedge, label %.lr.ph -.lr.ph: ; preds = %3, %11 - %.04071 = phi i64 [ %14, %11 ], [ 0, %3 ] - %.04470 = phi ptr [ %12, %11 ], [ %0, %3 ] - %.05069 = phi i64 [ %13, %11 ], [ %1, %3 ] - %9 = load i8, ptr %.04470, align 1, !tbaa !5 - %10 = zext i8 %9 to i64 - %.not54 = icmp eq i64 %4, %10 +.lr.ph: ; preds = %3 + %8 = sext i1 %.not to i8 + br label %9 + +9:; preds = %.lr.ph, %11 + %.04071 = phi i64 [ 0, %.lr.ph ], [ %14, %11 ] + %.04470 = phi ptr [ %0, %.lr.ph ], [ %12, %11 ] + %.05069 = phi i64 [ %1, %.lr.ph ], [ %13, %11 ] + %10 = load i8, ptr %.04470, align 1, !tbaa !5 + %.not54 = icmp eq i8 %10, %8 br i1 %.not54, label %11, label %.loopexit62 -11: ; preds = %.lr.ph +11: ; preds = %9 %12 = getelementptr inbounds nuw i8, ptr %.04470, i64 1 %13 = add i64 %.05069, -1 %14 = add nuw nsw i64 %.04071, 8 @@ -305,7 +307,7 @@ define dso_local i64 @redisBitpos(ptr noundef %0, i64 noundef %1, i32 noundef %2 %17 = icmp eq i64 %16, 0 %18 = icmp eq i64 %13, 0 %.not58 = select i1 %17, i1 true, i1 %18 - br i1 %.not58, label %.critedge, label %.lr.ph, !llvm.loop !18 + br i1 %.not58, label %.critedge, label %9, !llvm.loop !18 .critedge: ; preds = %11, %3 %.050.lcssa = phi i64 [ %1, %3 ], [ %13, %11 ] @@ -330,10 +332,10 @@ define dso_local i64 @redisBitpos(ptr noundef %0, i64 noundef %1, i32 noundef %2 %26 = icmp ugt i64 %24, 7 br i1 %26, label %.lr.ph77, label %.loopexit62, !llvm.loop !19 -.loopexit62: ; preds = %.lr.ph, %.lr.ph77, %22, %.critedge - %.151 = phi i64 [ %.050.lcssa, %.critedge ], [ %.25274, %.lr.ph77 ], [ %24, %22 ], [ %.05069, %.lr.ph ] - %.047 = phi ptr [ %.044.lcssa, %.critedge ], [ %.14875, %.lr.ph77 ], [ %23, %22 ], [ %.04470, %.lr.ph ] - %.1 = phi i64 [ %.040.lcssa, %.critedge ], [ %.276, %.lr.ph77 ], [ %25, %22 ], [ %.04071, %.lr.ph ] +.loopexit62: ; preds = %9, %.lr.ph77, %22, %.critedge + %.151 = phi i64 [ %.050.lcssa, %.critedge ], [ %.25274, %.lr.ph77 ], [ %24, %22 ], [ %.05069, %9 ] + %.047 = phi ptr [ %.044.lcssa, %.critedge ], [ %.14875, %.lr.ph77 ], [ %23, %22 ], [ %.04470, %9 ] + %.1 = phi i64 [ %.040.lcssa, %.critedge ], [ %.276, %.lr.ph77 ], [ %25, %22 ], [ %.04071, %9 ] br label %27 27: ; preds = %.loopexit62, %35 diff --git a/bench/spike/optimized/f16_roundToInt.ll b/bench/spike/optimized/f16_roundToInt.ll index e5fda0f9269..15e0a3d3f6e 100644 --- a/bench/spike/optimized/f16_roundToInt.ll +++ b/bench/spike/optimized/f16_roundToInt.ll @@ -30,7 +30,7 @@ define i16 @f16_roundToInt(i16 %0, i8 noundef zeroext %1, i1 noundef zeroext %2) 14: ; preds = %10, %9 %15 = and i64 %4, 32768 - switch i8 %1, label %58 [ + switch i8 %1, label %57 [ i8 0, label %16 i8 4, label %20 i8 2, label %23 @@ -105,10 +105,9 @@ define i16 @f16_roundToInt(i16 %0, i8 noundef zeroext %1, i1 noundef zeroext %2) br label %51 46: ; preds = %32 - %47 = zext i8 %1 to i32 %.not = icmp sgt i16 %0, -1 - %48 = select i1 %.not, i32 3, i32 2 - %49 = icmp eq i32 %48, %47 + %48 = select i1 %.not, i8 3, i8 2 + %49 = icmp eq i8 %48, %1 %50 = select i1 %49, i64 %35, i64 0 %spec.select = add nuw nsw i64 %50, %4 br label %51 @@ -129,12 +128,12 @@ define i16 @f16_roundToInt(i16 %0, i8 noundef zeroext %1, i1 noundef zeroext %2) br label %58 58: ; preds = %51, %54, %14, %23, %24, %16, %21, %20, %30 - %.0 = phi i64 [ %15, %14 ], [ %22, %21 ], [ %15, %16 ], [ %15, %20 ], [ %spec.store.select, %23 ], [ %spec.store.select1, %24 ], [ %31, %30 ], [ %53, %54 ], [ %53, %51 ] + %.0 = phi i64 [ %15, %14 ], [ %22, %21 ], [ %15, %16 ], [ %15, %20 ], [ %spec.store.select, %23 ], [ %spec.store.select1, %24 ], [ %31, %30 ], [ %53, %53 ], [ %53, %50 ] %59 = trunc i64 %.0 to i16 br label %60 60: ; preds = %27, %8, %58 - %.sroa.045.0 = phi i16 [ %59, %58 ], [ %0, %8 ], [ %0, %27 ] + %.sroa.045.0 = phi i16 [ %59, %57 ], [ %0, %8 ], [ %0, %27 ] ret i16 %.sroa.045.0 } diff --git a/bench/spike/optimized/f64_roundToInt.ll b/bench/spike/optimized/f64_roundToInt.ll index e360b6821f0..ae4d7cead11 100644 --- a/bench/spike/optimized/f64_roundToInt.ll +++ b/bench/spike/optimized/f64_roundToInt.ll @@ -29,7 +29,7 @@ define i64 @f64_roundToInt(i64 %0, i8 noundef zeroext %1, i1 noundef zeroext %2) 14: ; preds = %10, %9 %15 = and i64 %0, -9223372036854775808 - switch i8 %1, label %58 [ + switch i8 %1, label %57 [ i8 0, label %16 i8 4, label %20 i8 2, label %23 @@ -103,10 +103,9 @@ define i64 @f64_roundToInt(i64 %0, i8 noundef zeroext %1, i1 noundef zeroext %2) br label %51 46: ; preds = %32 - %47 = zext i8 %1 to i32 %.not = icmp sgt i64 %0, -1 - %48 = select i1 %.not, i32 3, i32 2 - %49 = icmp eq i32 %48, %47 + %48 = select i1 %.not, i8 3, i8 2 + %49 = icmp eq i8 %48, %1 %50 = select i1 %49, i64 %35, i64 0 %spec.select = add i64 %50, %0 br label %51 @@ -127,7 +126,7 @@ define i64 @f64_roundToInt(i64 %0, i8 noundef zeroext %1, i1 noundef zeroext %2) br label %58 58: ; preds = %30, %20, %21, %16, %24, %23, %14, %54, %51, %27, %7 - %.sroa.044.0 = phi i64 [ %0, %7 ], [ %0, %27 ], [ %15, %14 ], [ %22, %21 ], [ %15, %16 ], [ %15, %20 ], [ %spec.store.select, %23 ], [ %spec.store.select1, %24 ], [ %31, %30 ], [ %53, %54 ], [ %53, %51 ] + %.sroa.044.0 = phi i64 [ %0, %7 ], [ %0, %27 ], [ %15, %14 ], [ %22, %21 ], [ %15, %16 ], [ %15, %20 ], [ %spec.store.select, %23 ], [ %spec.store.select1, %24 ], [ %31, %30 ], [ %53, %53 ], [ %52, %50 ] ret i64 %.sroa.044.0 } diff --git a/bench/spike/optimized/s_addMagsF16.ll b/bench/spike/optimized/s_addMagsF16.ll index f627da8aec5..c1d1557c76e 100644 --- a/bench/spike/optimized/s_addMagsF16.ll +++ b/bench/spike/optimized/s_addMagsF16.ll @@ -172,20 +172,19 @@ define i16 @softfloat_addMagsF16(i64 noundef %0, i64 noundef %1) local_unnamed_a br i1 %.not113, label %100, label %87 87: ; preds = %84 - %88 = sext i8 %86 to i32 - %89 = and i64 %.1, 32768 - %.not114 = icmp eq i64 %89, 0 - %90 = select i1 %.not114, i32 3, i32 2 - %91 = icmp eq i32 %90, %88 - br i1 %91, label %92, label %97 - -92: ; preds = %87 - %93 = add i64 %.1, 1 - %94 = and i64 %93, 32767 - %95 = icmp eq i64 %94, 31744 - br i1 %95, label %96, label %100 - -96: ; preds = %92 + %88 = and i64 %.1, 32768 + %.not114 = icmp eq i64 %88, 0 + %89 = select i1 %.not114, i8 3, i8 2 + %90 = icmp eq i8 %89, %86 + br i1 %90, label %91, label %96 + +91: ; preds = %87 + %92 = add i64 %.1, 1 + %93 = and i64 %92, 32767 + %94 = icmp eq i64 %93, 31744 + br i1 %94, label %95, label %100 + +95: ; preds = %91 tail call void @softfloat_raiseFlags(i8 noundef zeroext 5) #3 br label %100 @@ -195,8 +194,8 @@ define i16 @softfloat_addMagsF16(i64 noundef %0, i64 noundef %1) local_unnamed_a %spec.select = or i64 %.1, %99 br label %100 -100: ; preds = %97, %96, %92, %84 - %.2 = phi i64 [ %93, %96 ], [ %93, %92 ], [ %.1, %84 ], [ %spec.select, %97 ] +100: ; preds = %97, %95, %91, %84 + %.2 = phi i64 [ %92, %95 ], [ %92, %91 ], [ %.1, %84 ], [ %spec.select, %96 ] %101 = tail call align 1 ptr @llvm.threadlocal.address.p0(ptr align 1 @softfloat_exceptionFlags) %102 = load i8, ptr %101, align 1, !tbaa !3 %103 = or i8 %102, 1 @@ -215,12 +214,12 @@ define i16 @softfloat_addMagsF16(i64 noundef %0, i64 noundef %1) local_unnamed_a br label %110 110: ; preds = %14, %53, %50, %39, %104, %100, %82, %35, %12 - %.0 = phi i64 [ %83, %82 ], [ %36, %35 ], [ %.2, %100 ], [ %42, %39 ], [ %109, %104 ], [ %0, %50 ], [ %0, %53 ], [ %13, %12 ], [ %0, %14 ] + %.0 = phi i64 [ %83, %82 ], [ %36, %35 ], [ %.2, %99 ], [ %42, %39 ], [ %109, %103 ], [ %0, %50 ], [ %0, %53 ], [ %13, %12 ], [ %0, %14 ] %111 = trunc i64 %.0 to i16 br label %112 112: ; preds = %110, %78 - %.sroa.084.0 = phi i16 [ %111, %110 ], [ %81, %78 ] + %.sroa.084.0 = phi i16 [ %111, %109 ], [ %81, %78 ] ret i16 %.sroa.084.0 } diff --git a/bench/spike/optimized/s_roundMToI64.ll b/bench/spike/optimized/s_roundMToI64.ll index cf7a344ad86..2b7b975f041 100644 --- a/bench/spike/optimized/s_roundMToI64.ll +++ b/bench/spike/optimized/s_roundMToI64.ll @@ -11,61 +11,60 @@ define i64 @softfloat_roundMToI64(i1 noundef zeroext %0, ptr noundef readonly ca %6 = load i32, ptr %1, align 4, !tbaa !3 %7 = icmp ne i8 %2, 4 %or.cond = xor i1 %5, %7 - br i1 %or.cond, label %8, label %22 + br i1 %or.cond, label %8, label %21 8: ; preds = %4 - %9 = zext i8 %2 to i32 - %10 = select i1 %0, i32 2, i32 3 - %11 = icmp eq i32 %10, %9 - %12 = icmp ne i32 %6, 0 - %13 = select i1 %11, i1 %12, i1 false - %14 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %15 = load i32, ptr %14, align 4, !tbaa !3 - %16 = zext i32 %15 to i64 - %17 = shl nuw i64 %16, 32 - %18 = getelementptr inbounds nuw i8, ptr %1, i64 4 - %19 = load i32, ptr %18, align 4, !tbaa !3 - %20 = zext i32 %19 to i64 - %21 = or disjoint i64 %17, %20 - br i1 %13, label %32, label %39 - -22: ; preds = %4 - %23 = icmp slt i32 %6, 0 - %24 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %25 = load i32, ptr %24, align 4, !tbaa !3 - %26 = zext i32 %25 to i64 - %27 = shl nuw i64 %26, 32 - %28 = getelementptr inbounds nuw i8, ptr %1, i64 4 - %29 = load i32, ptr %28, align 4, !tbaa !3 - %30 = zext i32 %29 to i64 - %31 = or disjoint i64 %27, %30 - br i1 %23, label %32, label %39 - -32: ; preds = %8, %22 - %33 = phi i64 [ %21, %8 ], [ %31, %22 ] - %34 = add i64 %33, 1 - %.not = icmp eq i64 %34, 0 - br i1 %.not, label %49, label %35 - -35: ; preds = %32 - %36 = and i32 %6, 2147483647 - %37 = icmp eq i32 %36, 0 - %or.cond4 = and i1 %5, %37 - %38 = and i64 %34, -2 - %spec.select = select i1 %or.cond4, i64 %38, i64 %34 - br label %39 - -39: ; preds = %8, %35, %22 - %.033 = phi i64 [ %31, %22 ], [ %spec.select, %35 ], [ %21, %8 ] - %40 = sub i64 0, %.033 - %41 = select i1 %0, i64 %40, i64 %.033 + %9 = select i1 %0, i8 2, i8 3 + %10 = icmp eq i8 %9, %2 + %11 = icmp ne i32 %6, 0 + %12 = select i1 %10, i1 %11, i1 false + %13 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %14 = load i32, ptr %13, align 4, !tbaa !3 + %15 = zext i32 %14 to i64 + %16 = shl nuw i64 %15, 32 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 4 + %18 = load i32, ptr %17, align 4, !tbaa !3 + %19 = zext i32 %18 to i64 + %20 = or disjoint i64 %16, %19 + br i1 %12, label %31, label %38 + +21: ; preds = %4 + %22 = icmp slt i32 %6, 0 + %23 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %24 = load i32, ptr %23, align 4, !tbaa !3 + %25 = zext i32 %24 to i64 + %26 = shl nuw i64 %25, 32 + %27 = getelementptr inbounds nuw i8, ptr %1, i64 4 + %28 = load i32, ptr %27, align 4, !tbaa !3 + %29 = zext i32 %28 to i64 + %30 = or disjoint i64 %26, %29 + br i1 %22, label %31, label %38 + +31: ; preds = %8, %21 + %32 = phi i64 [ %20, %8 ], [ %30, %21 ] + %33 = add i64 %32, 1 + %.not = icmp eq i64 %33, 0 + br i1 %.not, label %48, label %34 + +34: ; preds = %31 + %35 = and i32 %6, 2147483647 + %36 = icmp eq i32 %35, 0 + %or.cond4 = and i1 %5, %36 + %or.cond4 = and i64 %33, -2 + %spec.select = select i1 %or.cond4, i64 %37, i64 %33 + br label %38 + +38: ; preds = %8, %34, %21 + %.033 = phi i64 [ %30, %21 ], [ %spec.select, %34 ], [ %20, %8 ] + %39 = sub i64 0, %.033 + %40 = select i1 %0, i64 %39, i64 %.033 %.not37 = icmp eq i64 %.033, 0 - %42 = icmp sgt i64 %41, -1 + %42 = icmp sgt i64 %40, -1 %.not3839 = xor i1 %0, %42 %or.cond40 = or i1 %.not37, %.not3839 br i1 %or.cond40, label %43, label %49 -43: ; preds = %39 +43: ; preds = %38 %44 = icmp ne i32 %6, 0 %or.cond6 = select i1 %3, i1 %44, i1 false br i1 %or.cond6, label %45, label %51 @@ -77,13 +76,13 @@ define i64 @softfloat_roundMToI64(i1 noundef zeroext %0, ptr noundef readonly ca store i8 %48, ptr %46, align 1, !tbaa !7 br label %51 -49: ; preds = %39, %32 +49: ; preds = %38, %31 tail call void @softfloat_raiseFlags(i8 noundef zeroext 16) #3 %50 = select i1 %0, i64 -9223372036854775808, i64 9223372036854775807 br label %51 51: ; preds = %43, %45, %49 - %.0 = phi i64 [ %50, %49 ], [ %41, %45 ], [ %41, %43 ] + %.0 = phi i64 [ %50, %48 ], [ %40, %44 ], [ %40, %42 ] ret i64 %.0 } diff --git a/bench/spike/optimized/s_roundPackToBF16.ll b/bench/spike/optimized/s_roundPackToBF16.ll index 4ad44012499..96c92454fb1 100644 --- a/bench/spike/optimized/s_roundPackToBF16.ll +++ b/bench/spike/optimized/s_roundPackToBF16.ll @@ -14,71 +14,70 @@ define i16 @softfloat_roundPackToBF16(i1 noundef zeroext %0, i64 noundef %1, i64 %6 = icmp eq i8 %5, 0 %7 = icmp ne i8 %5, 4 %or.cond = xor i1 %6, %7 - %8 = zext i8 %5 to i32 - %9 = select i1 %0, i32 2, i32 3 - %10 = icmp eq i32 %9, %8 - %11 = select i1 %10, i8 127, i8 0 - %.046 = select i1 %or.cond, i8 %11, i8 64 - %12 = trunc i64 %2 to i8 - %13 = trunc i64 %1 to i32 - %14 = icmp ugt i32 %13, 252 - br i1 %14, label %15, label %58 - -15: ; preds = %3 - %16 = icmp slt i64 %1, 0 - br i1 %16, label %17, label %49 - -17: ; preds = %15 - %18 = tail call align 1 ptr @llvm.threadlocal.address.p0(ptr align 1 @softfloat_detectTininess) - %19 = load i8, ptr %18, align 1, !tbaa !3 - %20 = icmp eq i8 %19, 0 - %21 = icmp ne i64 %1, -1 - %or.cond4 = or i1 %21, %20 - br i1 %or.cond4, label %26, label %22 - -22: ; preds = %17 - %23 = zext nneg i8 %.046 to i64 - %24 = add i64 %2, %23 - %25 = icmp ult i64 %24, 32768 - br label %26 - -26: ; preds = %22, %17 - %27 = phi i1 [ true, %17 ], [ %25, %22 ] - %28 = trunc i64 %2 to i32 - %29 = sub nsw i64 0, %1 - %30 = icmp samesign ult i64 %29, 31 - br i1 %30, label %31, label %40 - -31: ; preds = %26 - %32 = trunc nuw nsw i64 %29 to i32 - %33 = lshr i32 %28, %32 - %34 = sub nsw i32 0, %32 - %35 = and i32 %34, 31 - %36 = shl i32 %28, %35 - %37 = icmp ne i32 %36, 0 - %38 = zext i1 %37 to i32 - %39 = or i32 %33, %38 + %8 = select i1 %0, i8 2, i8 3 + %9 = icmp eq i8 %8, %5 + %10 = select i1 %9, i8 127, i8 0 + %11 = select i1 %or.cond, i8 %10, i8 64 + %11 = trunc i64 %2 to i8 + %12 = trunc i64 %1 to i32 + %13 = icmp ugt i32 %12, 252 + br i1 %13, label %14, label %57 + +14: ; preds = %3 + %15 = icmp slt i64 %1, 0 + br i1 %15, label %16, label %48 + +16: ; preds = %14 + %17 = tail call align 1 ptr @llvm.threadlocal.address.p0(ptr align 1 @softfloat_detectTininess) + %18 = load i8, ptr %17, align 1, !tbaa !3 + %19 = icmp eq i8 %18, 0 + %20 = icmp ne i64 %1, -1 + %or.cond4 = or i1 %20, %19 + br i1 %or.cond4, label %25, label %21 + +21: ; preds = %16 + %22 = zext nneg i8 %11 to i64 + %23 = add i64 %2, %22 + %24 = icmp ult i64 %23, 32768 + br label %25 + +25: ; preds = %21, %16 + %26 = phi i1 [ true, %16 ], [ %24, %21 ] + %27 = trunc i64 %2 to i32 + %28 = sub nsw i64 0, %1 + %29 = icmp samesign ult i64 %28, 31 + br i1 %29, label %30, label %39 + +30: ; preds = %25 + %31 = trunc nuw nsw i64 %28 to i32 + %32 = lshr i32 %27, %31 + %33 = sub nsw i32 0, %31 + %34 = and i32 %33, 31 + %35 = shl i32 %27, %34 + %36 = icmp ne i32 %35, 0 + %37 = zext i1 %36 to i32 + %38 = or i32 %32, %37 br label %softfloat_shiftRightJam32.exit -40: ; preds = %26 - %41 = icmp ne i32 %28, 0 +40: ; preds = %25 + %41 = icmp ne i32 %27, 0 %42 = zext i1 %41 to i32 br label %softfloat_shiftRightJam32.exit -softfloat_shiftRightJam32.exit: ; preds = %31, %40 - %43 = phi i32 [ %39, %31 ], [ %42, %40 ] +softfloat_shiftRightJam32.exit: ; preds = %30, %40 + %43 = phi i32 [ %38, %30 ], [ %42, %39 ] %44 = zext nneg i32 %43 to i64 %45 = trunc i32 %43 to i8 %46 = and i32 %43, 127 %47 = icmp ne i32 %46, 0 - %or.cond7 = select i1 %27, i1 %47, i1 false + %or.cond7 = select i1 %26, i1 %47, i1 false br i1 %or.cond7, label %48, label %58 48: ; preds = %softfloat_shiftRightJam32.exit tail call void @softfloat_raiseFlags(i8 noundef zeroext 2) #3 br label %58 -49: ; preds = %15 +49: ; preds = %14 %50 = icmp samesign ugt i64 %1, 253 br i1 %50, label %55, label %51 @@ -97,9 +96,9 @@ softfloat_shiftRightJam32.exit: ; preds = %31, %40 br label %80 58: ; preds = %48, %softfloat_shiftRightJam32.exit, %51, %3 - %.045.in = phi i8 [ %45, %48 ], [ %45, %softfloat_shiftRightJam32.exit ], [ %12, %51 ], [ %12, %3 ] - %.043 = phi i64 [ %44, %48 ], [ %44, %softfloat_shiftRightJam32.exit ], [ %2, %51 ], [ %2, %3 ] - %.0 = phi i64 [ 0, %48 ], [ 0, %softfloat_shiftRightJam32.exit ], [ 253, %51 ], [ %1, %3 ] + %.045.in = phi i8 [ %45, %47 ], [ %45, %softfloat_shiftRightJam32.exit ], [ %11, %50 ], [ %11, %3 ] + %.043 = phi i64 [ %44, %47 ], [ %44, %softfloat_shiftRightJam32.exit ], [ %2, %50 ], [ %2, %3 ] + %.0 = phi i64 [ 0, %47 ], [ 0, %softfloat_shiftRightJam32.exit ], [ 253, %50 ], [ %1, %3 ] %.045 = and i8 %.045.in, 127 %59 = zext nneg i8 %.046 to i64 %60 = add i64 %.043, %59 @@ -130,8 +129,8 @@ softfloat_shiftRightJam32.exit: ; preds = %31, %40 br label %74 74: ; preds = %69, %67 - %.144 = phi i64 [ %68, %67 ], [ %73, %69 ] - %.1 = phi i64 [ %.0, %67 ], [ %spec.select55, %69 ] + %.144 = phi i64 [ %68, %66 ], [ %73, %68 ] + %.1 = phi i64 [ %.0, %66 ], [ %spec.select55, %68 ] %75 = select i1 %0, i64 32768, i64 0 %76 = shl i64 %.1, 7 %77 = and i64 %76, 8388480 @@ -140,7 +139,7 @@ softfloat_shiftRightJam32.exit: ; preds = %31, %40 br label %80 80: ; preds = %74, %55 - %.042 = phi i64 [ %79, %74 ], [ %57, %55 ] + %.042 = phi i64 [ %79, %73 ], [ %57, %54 ] %81 = trunc i64 %.042 to i16 ret i16 %81 } diff --git a/bench/spike/optimized/s_roundPackToI32.ll b/bench/spike/optimized/s_roundPackToI32.ll index 7b8f1564631..7953ada1e75 100644 --- a/bench/spike/optimized/s_roundPackToI32.ll +++ b/bench/spike/optimized/s_roundPackToI32.ll @@ -10,19 +10,18 @@ define range(i64 -2147483648, 2147483648) i64 @softfloat_roundPackToI32(i1 nound %5 = icmp eq i8 %2, 0 %6 = icmp ne i8 %2, 4 %or.cond = xor i1 %5, %6 - %7 = zext i8 %2 to i32 - %8 = select i1 %0, i32 2, i32 3 - %9 = icmp eq i32 %8, %7 - %10 = select i1 %9, i64 127, i64 0 - %.029 = select i1 %or.cond, i64 %10, i64 64 - %11 = add i64 %.029, %1 - %.not = icmp ult i64 %11, 549755813888 - br i1 %.not, label %12, label %30 + %7 = select i1 %0, i8 2, i8 3 + %8 = icmp eq i8 %7, %2 + %9 = select i1 %8, i64 127, i64 0 + %10 = select i1 %or.cond, i64 %9, i64 64 + %10 = add i64 %10, %1 + %.not = icmp ult i64 %10, 549755813888 + br i1 %.not, label %11, label %29 12: ; preds = %4 %13 = trunc i64 %1 to i32 %14 = and i32 %13, 127 - %15 = lshr i64 %11, 7 + %15 = lshr i64 %10, 7 %.not32 = icmp eq i32 %14, 64 %16 = and i1 %5, %.not32 %17 = zext i1 %16 to i64 @@ -56,7 +55,7 @@ define range(i64 -2147483648, 2147483648) i64 @softfloat_roundPackToI32(i1 nound br label %32 32: ; preds = %24, %26, %30 - %.0 = phi i64 [ %31, %30 ], [ %22, %26 ], [ %22, %24 ] + %.0 = phi i64 [ %31, %29 ], [ %22, %25 ], [ %22, %23 ] ret i64 %.0 } diff --git a/bench/spike/optimized/s_roundPackToI64.ll b/bench/spike/optimized/s_roundPackToI64.ll index a77124a056c..a75a121a5ec 100644 --- a/bench/spike/optimized/s_roundPackToI64.ll +++ b/bench/spike/optimized/s_roundPackToI64.ll @@ -10,45 +10,44 @@ define i64 @softfloat_roundPackToI64(i1 noundef zeroext %0, i64 noundef %1, i64 %6 = icmp eq i8 %3, 0 %7 = icmp ne i8 %3, 4 %or.cond = xor i1 %6, %7 - br i1 %or.cond, label %8, label %14 + br i1 %or.cond, label %8, label %13 8: ; preds = %5 - %9 = zext i8 %3 to i32 - %10 = select i1 %0, i32 2, i32 3 - %11 = icmp eq i32 %10, %9 - %12 = icmp ne i64 %2, 0 - %13 = and i1 %12, %11 - br i1 %13, label %16, label %24 - -14: ; preds = %5 - %15 = icmp slt i64 %2, 0 - br i1 %15, label %16, label %24 - -16: ; preds = %8, %14 - %17 = add i64 %1, 1 - %.not = icmp eq i64 %17, 0 - br i1 %.not, label %34, label %18 - -18: ; preds = %16 - %19 = and i64 %2, 9223372036854775807 - %.not33 = icmp eq i64 %19, 0 - %20 = and i1 %.not33, %6 - %21 = zext i1 %20 to i64 - %22 = xor i64 %21, -1 - %23 = and i64 %17, %22 - br label %24 - -24: ; preds = %8, %18, %14 - %.028 = phi i64 [ %23, %18 ], [ %1, %14 ], [ %1, %8 ] - %25 = sub i64 0, %.028 - %26 = select i1 %0, i64 %25, i64 %.028 + %9 = select i1 %0, i8 2, i8 3 + %10 = icmp eq i8 %9, %3 + %11 = icmp ne i64 %2, 0 + %12 = and i1 %11, %10 + br i1 %12, label %15, label %23 + +13: ; preds = %5 + %14 = icmp slt i64 %2, 0 + br i1 %14, label %15, label %23 + +15: ; preds = %8, %13 + %16 = add i64 %1, 1 + %.not = icmp eq i64 %16, 0 + br i1 %.not, label %34, label %17 + +17: ; preds = %15 + %18 = and i64 %2, 9223372036854775807 + %.not33 = icmp eq i64 %18, 0 + %19 = and i1 %.not33, %6 + %20 = zext i1 %19 to i64 + %21 = xor i64 %20, -1 + %22 = and i64 %16, %21 + br label %23 + +23: ; preds = %8, %17, %13 + %.028 = phi i64 [ %22, %17 ], [ %1, %13 ], [ %1, %8 ] + %24 = sub i64 0, %.028 + %25 = select i1 %0, i64 %24, i64 %.028 %.not34 = icmp eq i64 %.028, 0 - %27 = icmp sgt i64 %26, -1 + %27 = icmp sgt i64 %25, -1 %.not3536 = xor i1 %0, %27 %or.cond37 = or i1 %.not34, %.not3536 br i1 %or.cond37, label %28, label %34 -28: ; preds = %24 +28: ; preds = %23 %29 = icmp ne i64 %2, 0 %or.cond4 = and i1 %29, %4 br i1 %or.cond4, label %30, label %36 @@ -60,13 +59,13 @@ define i64 @softfloat_roundPackToI64(i1 noundef zeroext %0, i64 noundef %1, i64 store i8 %33, ptr %31, align 1, !tbaa !3 br label %36 -34: ; preds = %24, %16 +34: ; preds = %23, %15 tail call void @softfloat_raiseFlags(i8 noundef zeroext 16) #3 %35 = select i1 %0, i64 -9223372036854775808, i64 9223372036854775807 br label %36 36: ; preds = %28, %30, %34 - %.0 = phi i64 [ %35, %34 ], [ %26, %30 ], [ %26, %28 ] + %.0 = phi i64 [ %35, %33 ], [ %25, %29 ], [ %25, %27 ] ret i64 %.0 } diff --git a/bench/spike/optimized/s_roundPackToUI32.ll b/bench/spike/optimized/s_roundPackToUI32.ll index b9a22a6324f..f231fa777ee 100644 --- a/bench/spike/optimized/s_roundPackToUI32.ll +++ b/bench/spike/optimized/s_roundPackToUI32.ll @@ -10,19 +10,18 @@ define range(i64 0, 4294967296) i64 @softfloat_roundPackToUI32(i1 noundef zeroex %5 = icmp eq i8 %2, 0 %6 = icmp ne i8 %2, 4 %or.cond = xor i1 %5, %6 - %7 = zext i8 %2 to i32 - %8 = select i1 %0, i32 2, i32 3 - %9 = icmp eq i32 %8, %7 - %10 = select i1 %9, i64 127, i64 0 - %.027 = select i1 %or.cond, i64 %10, i64 64 - %11 = add i64 %.027, %1 - %.not = icmp ult i64 %11, 549755813888 - br i1 %.not, label %12, label %27 + %7 = select i1 %0, i8 2, i8 3 + %8 = icmp eq i8 %7, %2 + %9 = select i1 %8, i64 127, i64 0 + %10 = select i1 %or.cond, i64 %9, i64 64 + %10 = add i64 %10, %1 + %.not = icmp ult i64 %10, 549755813888 + br i1 %.not, label %11, label %27 12: ; preds = %4 %13 = trunc i64 %1 to i32 %14 = and i32 %13, 127 - %15 = lshr i64 %11, 7 + %15 = lshr i64 %10, 7 %.not29 = icmp eq i32 %14, 64 %16 = and i1 %5, %.not29 %17 = zext i1 %16 to i64 @@ -50,7 +49,7 @@ define range(i64 0, 4294967296) i64 @softfloat_roundPackToUI32(i1 noundef zeroex br label %29 29: ; preds = %21, %23, %27 - %.0 = phi i64 [ %28, %27 ], [ %19, %23 ], [ %19, %21 ] + %.0 = phi i64 [ %28, %26 ], [ %19, %22 ], [ %19, %20 ] ret i64 %.0 } diff --git a/bench/spike/optimized/s_roundToUI32.ll b/bench/spike/optimized/s_roundToUI32.ll index c82d4a58c29..12ff9095750 100644 --- a/bench/spike/optimized/s_roundToUI32.ll +++ b/bench/spike/optimized/s_roundToUI32.ll @@ -10,19 +10,18 @@ define range(i64 0, 4294967296) i64 @softfloat_roundToUI32(i1 noundef zeroext %0 %5 = icmp eq i8 %2, 0 %6 = icmp ne i8 %2, 4 %or.cond = xor i1 %5, %6 - %7 = zext i8 %2 to i32 - %8 = select i1 %0, i32 2, i32 3 - %9 = icmp eq i32 %8, %7 - %10 = select i1 %9, i64 4095, i64 0 - %.026 = select i1 %or.cond, i64 %10, i64 2048 - %11 = and i64 %1, 4095 - %12 = add i64 %.026, %1 - %.not = icmp ult i64 %12, 17592186044416 - br i1 %.not, label %13, label %26 + %7 = select i1 %0, i8 2, i8 3 + %8 = icmp eq i8 %7, %2 + %9 = select i1 %8, i64 4095, i64 0 + %10 = select i1 %or.cond, i64 %9, i64 2048 + %10 = and i64 %1, 4095 + %11 = add i64 %10, %1 + %.not = icmp ult i64 %11, 17592186044416 + br i1 %.not, label %12, label %26 13: ; preds = %4 - %14 = lshr i64 %12, 12 - %.not28 = icmp eq i64 %11, 2048 + %14 = lshr i64 %11, 12 + %.not28 = icmp eq i64 %10, 2048 %15 = and i1 %.not28, %5 %16 = zext i1 %15 to i64 %17 = xor i64 %16, -1 @@ -32,7 +31,7 @@ define range(i64 0, 4294967296) i64 @softfloat_roundToUI32(i1 noundef zeroext %0 br i1 %or.cond4, label %26, label %20 20: ; preds = %13 - %21 = icmp ne i64 %11, 0 + %21 = icmp ne i64 %10, 0 %or.cond6 = and i1 %3, %21 br i1 %or.cond6, label %22, label %28 @@ -49,7 +48,7 @@ define range(i64 0, 4294967296) i64 @softfloat_roundToUI32(i1 noundef zeroext %0 br label %28 28: ; preds = %20, %22, %26 - %.0 = phi i64 [ %27, %26 ], [ %18, %22 ], [ %18, %20 ] + %.0 = phi i64 [ %27, %25 ], [ %18, %21 ], [ %18, %19 ] ret i64 %.0 } diff --git a/bench/sqlite/optimized/sqlite3.ll b/bench/sqlite/optimized/sqlite3.ll index 625e834303b..9b46f355089 100644 --- a/bench/sqlite/optimized/sqlite3.ll +++ b/bench/sqlite/optimized/sqlite3.ll @@ -291245,17 +291245,17 @@ sqlite3StrICmp.exit.thread: ; preds = %..critedge31_crit_e ; Function Attrs: nounwind uwtable define internal fastcc i32 @sqlite3TriggerColmask(ptr noundef %0, ptr noundef %1, ptr noundef readonly captures(address_is_null) %2, i32 noundef range(i32 0, 2) %3, i32 noundef range(i32 1, 4) %4, ptr noundef nonnull %5, i32 noundef %6) unnamed_addr #0 { %.not = icmp eq ptr %2, null - %8 = select i1 %.not, i32 129, i32 130 - %9 = getelementptr inbounds nuw i8, ptr %5, i64 63 - %10 = load i8, ptr %9, align 1, !tbaa !691 - %11 = icmp eq i8 %10, 2 - br i1 %11, label %.loopexit, label %.preheader + %8 = getelementptr inbounds nuw i8, ptr %5, i64 63 + %9 = load i8, ptr %8, align 1, !tbaa !691 + %10 = icmp eq i8 %9, 2 + br i1 %10, label %.loopexit, label %.preheader .preheader: ; preds = %7 %.not2438 = icmp eq ptr %1, null br i1 %.not2438, label %.loopexit, label %.lr.ph42 .lr.ph42: ; preds = %.preheader + %11 = select i1 %.not, i8 -127, i8 -126 %12 = getelementptr i8, ptr %2, i64 16 %13 = getelementptr inbounds nuw i8, ptr %0, i64 152 %14 = zext nneg i32 %3 to i64 @@ -291266,9 +291266,8 @@ define internal fastcc i32 @sqlite3TriggerColmask(ptr noundef %0, ptr noundef %1 %.02239.us = phi i32 [ %.2.us, %checkColumnOverlap.exit.thread.us ], [ 0, %.lr.ph42 ] %15 = getelementptr inbounds nuw i8, ptr %.02140.us, i64 16 %16 = load i8, ptr %15, align 8, !tbaa !2527 - %17 = zext i8 %16 to i32 - %18 = icmp eq i32 %8, %17 - br i1 %18, label %19, label %checkColumnOverlap.exit.thread.us + %17 = icmp eq i8 %11, %16 + br i1 %17, label %18, label %checkColumnOverlap.exit.thread.us 19: ; preds = %.lr.ph42.split.us %20 = getelementptr inbounds nuw i8, ptr %.02140.us, i64 17 @@ -291294,7 +291293,7 @@ checkColumnOverlap.exit.us: ; preds = %19 br i1 %.not19.i36.us, label %getRowTrigger.exit.us, label %.lr.ph.us .lr.ph.us: ; preds = %26, %.critedge2.i.us - %.0.i37.us = phi ptr [ %.0.i.us, %.critedge2.i.us ], [ %.0.i35.us, %26 ] + %.0.i37.us = phi ptr [ %.0.i.us, %.critedge2.i.us ], [ %.0.i35.us, %25 ] %29 = load ptr, ptr %.0.i37.us, align 8, !tbaa !3229 %.not20.i.us = icmp eq ptr %29, %.02140.us br i1 %.not20.i.us, label %30, label %.critedge2.i.us @@ -291320,7 +291319,7 @@ getRowTrigger.exit.us: ; preds = %.critedge2.i.us, %2 br i1 %.not28.us, label %checkColumnOverlap.exit.thread.us, label %getRowTrigger.exit.thread.us getRowTrigger.exit.thread.us: ; preds = %30, %getRowTrigger.exit.us - %.1.i33.us = phi ptr [ %34, %getRowTrigger.exit.us ], [ %.0.i37.us, %30 ] + %.1.i33.us = phi ptr [ %34, %getRowTrigger.exit.us ], [ %.0.i37.us, %29 ] %37 = getelementptr inbounds nuw i8, ptr %.1.i33.us, i64 28 %38 = getelementptr inbounds nuw [2 x i32], ptr %37, i64 0, i64 %14 %39 = load i32, ptr %38, align 4, !tbaa !16 @@ -291328,7 +291327,7 @@ getRowTrigger.exit.thread.us: ; preds = %30, %getRowTrigger. br label %checkColumnOverlap.exit.thread.us checkColumnOverlap.exit.thread.us: ; preds = %getRowTrigger.exit.thread.us, %getRowTrigger.exit.us, %checkColumnOverlap.exit.us, %19, %.lr.ph42.split.us - %.2.us = phi i32 [ %.02239.us, %19 ], [ %.02239.us, %.lr.ph42.split.us ], [ -1, %checkColumnOverlap.exit.us ], [ %40, %getRowTrigger.exit.thread.us ], [ %.02239.us, %getRowTrigger.exit.us ] + %.2.us = phi i32 [ %.02239.us, %18 ], [ %.02239.us, %.lr.ph42.split.us ], [ -1, %checkColumnOverlap.exit.us ], [ %40, %getRowTrigger.exit.thread.us ], [ %.02239.us, %getRowTrigger.exit.us ] %41 = getelementptr inbounds nuw i8, ptr %.02140.us, i64 64 %42 = load ptr, ptr %41, align 8, !tbaa !1744 %.not24.us = icmp eq ptr %42, null @@ -291339,19 +291338,18 @@ checkColumnOverlap.exit.thread.us: ; preds = %getRowTrigger.exit. %.02239 = phi i32 [ %.2, %checkColumnOverlap.exit.thread ], [ 0, %.lr.ph42 ] %43 = getelementptr inbounds nuw i8, ptr %.02140, i64 16 %44 = load i8, ptr %43, align 8, !tbaa !2527 - %45 = zext i8 %44 to i32 - %46 = icmp eq i32 %8, %45 - br i1 %46, label %47, label %checkColumnOverlap.exit.thread + %44 = icmp eq i8 %11, %43 + br i1 %44, label %45, label %checkColumnOverlap.exit.thread -47: ; preds = %.lr.ph42.split - %48 = getelementptr inbounds nuw i8, ptr %.02140, i64 17 - %49 = load i8, ptr %48, align 1, !tbaa !2528 - %50 = zext i8 %49 to i32 - %51 = and i32 %4, %50 - %.not25 = icmp eq i32 %51, 0 - br i1 %.not25, label %checkColumnOverlap.exit.thread, label %52 +45: ; preds = %.lr.ph42.split + %46 = getelementptr inbounds nuw i8, ptr %.02140, i64 17 + %47 = load i8, ptr %46, align 1, !tbaa !2528 + %48 = zext i8 %47 to i32 + %49 = and i32 %4, %48 + %.not25 = icmp eq i32 %49, 0 + br i1 %.not25, label %checkColumnOverlap.exit.thread, label %50 -52: ; preds = %47 +52: ; preds = %45 %53 = getelementptr inbounds nuw i8, ptr %.02140, i64 32 %54 = load ptr, ptr %53, align 8, !tbaa !130 %55 = icmp eq ptr %54, null @@ -291387,8 +291385,8 @@ checkColumnOverlap.exit.thread.us: ; preds = %getRowTrigger.exit. br label %66 66: ; preds = %79, %63 - %.013.i.i.us.i = phi ptr [ %62, %63 ], [ %81, %79 ] - %.0.i.i.us.i = phi ptr [ %65, %63 ], [ %80, %79 ] + %.013.i.i.us.i = phi ptr [ %62, %61 ], [ %81, %77 ] + %.0.i.i.us.i = phi ptr [ %65, %61 ], [ %80, %77 ] %67 = load i8, ptr %.0.i.i.us.i, align 1, !tbaa !198 %68 = load i8, ptr %.013.i.i.us.i, align 1, !tbaa !198 %69 = icmp eq i8 %67, %68 @@ -291439,7 +291437,7 @@ checkColumnOverlap.exit: ; preds = %77, %52 br i1 %.not19.i36, label %getRowTrigger.exit, label %.lr.ph .lr.ph: ; preds = %84, %.critedge2.i - %.0.i37 = phi ptr [ %.0.i, %.critedge2.i ], [ %.0.i35, %84 ] + %.0.i37 = phi ptr [ %.0.i, %.critedge2.i ], [ %.0.i35, %82 ] %87 = load ptr, ptr %.0.i37, align 8, !tbaa !3229 %.not20.i = icmp eq ptr %87, %.02140 br i1 %.not20.i, label %88, label %.critedge2.i @@ -291465,15 +291463,15 @@ getRowTrigger.exit: ; preds = %.critedge2.i, %84 br i1 %.not28, label %checkColumnOverlap.exit.thread, label %getRowTrigger.exit.thread getRowTrigger.exit.thread: ; preds = %88, %getRowTrigger.exit - %.1.i33 = phi ptr [ %92, %getRowTrigger.exit ], [ %.0.i37, %88 ] + %.1.i33 = phi ptr [ %92, %getRowTrigger.exit ], [ %.0.i37, %86 ] %95 = getelementptr inbounds nuw i8, ptr %.1.i33, i64 28 %96 = getelementptr inbounds nuw [2 x i32], ptr %95, i64 0, i64 %14 %97 = load i32, ptr %96, align 4, !tbaa !16 %98 = or i32 %97, %.02239 br label %checkColumnOverlap.exit.thread -checkColumnOverlap.exit.thread: ; preds = %sqlite3IdListIndex.exit.thread.loopexit.us.i, %.lr.ph.i, %.preheader.i, %getRowTrigger.exit, %getRowTrigger.exit.thread, %checkColumnOverlap.exit, %.lr.ph42.split, %47 - %.2 = phi i32 [ %.02239, %47 ], [ %.02239, %.lr.ph42.split ], [ -1, %checkColumnOverlap.exit ], [ %98, %getRowTrigger.exit.thread ], [ %.02239, %getRowTrigger.exit ], [ %.02239, %.preheader.i ], [ %.02239, %.lr.ph.i ], [ %.02239, %sqlite3IdListIndex.exit.thread.loopexit.us.i ] +checkColumnOverlap.exit.thread: ; preds = %sqlite3IdListIndex.exit.thread.loopexit.us.i, %.lr.ph.i, %.preheader.i, %getRowTrigger.exit, %getRowTrigger.exit.thread, %checkColumnOverlap.exit, %.lr.ph42.split, %45 + %.2 = phi i32 [ %.02239, %45 ], [ %.02239, %.lr.ph42.split ], [ -1, %checkColumnOverlap.exit ], [ %98, %getRowTrigger.exit.thread ], [ %.02239, %getRowTrigger.exit ], [ %.02239, %.preheader.i ], [ %.02239, %.lr.ph.i ], [ %.02239, %sqlite3IdListIndex.exit.thread.loopexit.us.i ] %99 = getelementptr inbounds nuw i8, ptr %.02140, i64 64 %100 = load ptr, ptr %99, align 8, !tbaa !1744 %.not24 = icmp eq ptr %100, null diff --git a/bench/stockfish/optimized/position.ll b/bench/stockfish/optimized/position.ll index d22bba56263..df8197cf7fb 100644 --- a/bench/stockfish/optimized/position.ll +++ b/bench/stockfish/optimized/position.ll @@ -841,17 +841,17 @@ _ZNKSt17basic_string_viewIcSt11char_traitsIcEE4findEcm.exit.thread: ; preds = %3 180: ; preds = %173 %181 = load i8, ptr %6, align 1 - %182 = zext i8 %181 to i32 - %183 = load i32, ptr %74, align 4 - %184 = icmp eq i32 %183, 0 - %185 = select i1 %184, i32 54, i32 51 - %186 = icmp eq i32 %185, %182 - br i1 %186, label %187, label %.critedge35 - -187: ; preds = %180 + %182 = load i32, ptr %74, align 4 + %183 = icmp eq i32 %182, 0 + %184 = select i1 %183, i8 54, i8 51 + %185 = icmp eq i8 %184, %181 + br i1 %185, label %186, label %.critedge35 + +186: ; preds = %180 + %187 = zext nneg i8 %181 to i32 %188 = load i8, ptr %5, align 1 %189 = zext i8 %188 to i32 - %190 = shl nuw nsw i32 %182, 3 + %190 = shl nuw nsw i32 %187, 3 %191 = add nuw nsw i32 %190, -489 %192 = add nsw i32 %191, %189 %193 = load ptr, ptr %9, align 8 @@ -878,7 +878,7 @@ _ZNKSt17basic_string_viewIcSt11char_traitsIcEE4findEcm.exit.thread: ; preds = %3 %.not27 = icmp eq i64 %212, 0 br i1 %.not27, label %.critedge35, label %213 -213: ; preds = %187 +213: ; preds = %186 %214 = getelementptr inbounds nuw [2 x i64], ptr %204, i64 0, i64 %200 %215 = load i64, ptr %214, align 8 %216 = icmp eq i32 %195, 1 @@ -905,7 +905,7 @@ _ZNKSt17basic_string_viewIcSt11char_traitsIcEE4findEcm.exit.thread: ; preds = %3 %.not29 = icmp eq i64 %233, 0 br i1 %.not29, label %236, label %.critedge35 -.critedge35: ; preds = %180, %173, %.critedge2, %213, %187, %223 +.critedge35: ; preds = %180, %173, %.critedge2, %213, %186, %223 %234 = load ptr, ptr %9, align 8 %235 = getelementptr inbounds nuw i8, ptr %234, i64 36 store i32 64, ptr %235, align 4 diff --git a/bench/wireshark/optimized/packet-dof.ll b/bench/wireshark/optimized/packet-dof.ll index 5f244db7309..8737ef42288 100644 --- a/bench/wireshark/optimized/packet-dof.ll +++ b/bench/wireshark/optimized/packet-dof.ll @@ -5858,28 +5858,31 @@ dof_oid_create_standard_string.exit: ; preds = %6, %12, %18 22: ; preds = %dof_oid_create_standard_string.exit, %4 %23 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef 0) %24 = icmp slt i8 %23, 0 - %25 = and i8 %23, 64 - %.not80 = icmp eq i8 %25, 0 - %26 = and i8 %23, 63 - %..i = select i1 %.not80, i32 2, i32 4 - %.020.i = select i1 %24, i8 %26, i8 %23 - %27 = zext nneg i8 %.020.i to i32 + %25 = and i8 %23, 63 + %.020.i = select i1 %24, i8 %25, i8 %23 + %26 = zext nneg i8 %.020.i to i32 br i1 %24, label %.lr.ph.i, label %read_c4.exit -.lr.ph.i: ; preds = %22, %.lr.ph.i - %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ 1, %22 ] - %.02229.i = phi i32 [ %31, %.lr.ph.i ], [ %27, %22 ] +.lr.ph.i:; preds = %22 + %27 = and i8 %23, 64 + %.not81 = icmp eq i8 %27, 0 + %..i80 = select i1 %.not81, i32 1, i32 3 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %.lr.ph.i.preheader, %.lr.ph.i + %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ 1, %.lr.ph.i.preheader ] + %.02229.i = phi i32 [ %31, %.lr.ph.i ], [ %26, %.lr.ph.i.preheader ] %28 = shl i32 %.02229.i, 8 %29 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i) %30 = zext i8 %29 to i32 %31 = or disjoint i32 %28, %30 - %.023.i = add nuw i32 %.02331.i, 1 - %exitcond.not.i = icmp eq i32 %.023.i, %..i + %.023.i = add nuw nsw i32 %.02331.i, 1 + %exitcond.not.i = icmp eq i32 %..i80, %.02331.i br i1 %exitcond.not.i, label %read_c4.exit, label %.lr.ph.i, !llvm.loop !33 read_c4.exit: ; preds = %.lr.ph.i, %22 - %.022.lcssa.i = phi i32 [ %27, %22 ], [ %31, %.lr.ph.i ] - %.023.lcssa.i = phi i32 [ 1, %22 ], [ %..i, %.lr.ph.i ] + %.022.lcssa.i = phi i32 [ %26, %22 ], [ %31, %.lr.ph.i ] + %.023.lcssa.i = phi i32 [ 1, %22 ], [ %.023.i, %.lr.ph.i ] %32 = load i32, ptr @hf_oid_class, align 4 %33 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %2, i32 noundef %32, ptr noundef %0, i32 noundef 0, i32 noundef %.023.lcssa.i, i32 noundef %.022.lcssa.i, ptr noundef nonnull @.str.696, i32 noundef %.022.lcssa.i) %34 = icmp ult i32 %.022.lcssa.i, 128 @@ -7129,7 +7132,7 @@ DOFObjectID_GetIDClass.exit: ; preds = %.lr.ph.i.i DOFObjectID_GetIDClass.exit.thread: ; preds = %DOFObjectID_GetIDClass.exit %switch = icmp eq i8 %9, 2 - %spec.select151 = select i1 %switch, i64 2, i64 4 + %spec.select151 = select i1 %switch, i64 1, i64 3 br label %.lr.ph.i.i49 .lr.ph.i.i49: ; preds = %.lr.ph.i.i49, %DOFObjectID_GetIDClass.exit.thread @@ -7141,7 +7144,7 @@ DOFObjectID_GetIDClass.exit.thread: ; preds = %DOFObjectID_GetIDCl %58 = load i8, ptr %57, align 1 %59 = zext i8 %58 to i32 %60 = or disjoint i32 %56, %59 - %exitcond.not.i.i53 = icmp eq i64 %indvars.iv.next.i.i52, %spec.select151 + %exitcond.not.i.i53 = icmp eq i64 %spec.select151, %indvars.iv.i.i50 br i1 %exitcond.not.i.i53, label %DOFObjectID_GetIDClass.exit56, label %.lr.ph.i.i49, !llvm.loop !38 DOFObjectID_GetIDClass.exit56: ; preds = %.lr.ph.i.i49 @@ -8454,30 +8457,33 @@ define internal i32 @dissect_dnp_1(ptr noundef %0, ptr noundef %1, ptr noundef % 40: ; preds = %37 %41 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %38) %42 = icmp slt i8 %41, 0 - %43 = and i8 %41, 64 - %.not169 = icmp eq i8 %43, 0 - %44 = and i8 %41, 63 - %..i = select i1 %.not169, i32 2, i32 3 - %.020.i = select i1 %42, i8 %44, i8 %41 - %45 = zext nneg i8 %.020.i to i32 + %43 = and i8 %41, 63 + %.020.i = select i1 %42, i8 %43, i8 %41 + %44 = zext nneg i8 %.020.i to i32 %.02328.i = add nuw nsw i32 %38, 1 br i1 %42, label %.lr.ph.i, label %read_c3.exit -.lr.ph.i: ; preds = %40, %.lr.ph.i - %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ %.02328.i, %40 ] - %.030.i = phi i32 [ %50, %.lr.ph.i ], [ 1, %40 ] - %.02229.i = phi i32 [ %49, %.lr.ph.i ], [ %45, %40 ] +.lr.ph.i: ; preds = %40 + %45 = and i8 %41, 64 + %.not170 = icmp eq i8 %45, 0 + %..i169 = select i1 %.not170, i32 1, i32 2 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %.lr.ph.i.preheader, %.lr.ph.i + %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ %.02328.i, %.lr.ph.i.preheader ] + %.030.i = phi i32 [ %50, %.lr.ph.i ], [ 1, %.lr.ph.i.preheader ] + %.02229.i = phi i32 [ %49, %.lr.ph.i ], [ %44, %.lr.ph.i.preheader ] %46 = shl i32 %.02229.i, 8 %47 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i) %48 = zext i8 %47 to i32 %49 = or disjoint i32 %46, %48 %50 = add nuw nsw i32 %.030.i, 1 - %.023.i = add nuw nsw i32 %.02331.i, 1 - %exitcond.not.i = icmp eq i32 %50, %..i + %.023.i = add i32 %.02331.i, 1 + %exitcond.not.i = icmp eq i32 %..i169, %.030.i br i1 %exitcond.not.i, label %read_c3.exit, label %.lr.ph.i, !llvm.loop !52 read_c3.exit: ; preds = %.lr.ph.i, %40 - %.022.lcssa.i = phi i32 [ %45, %40 ], [ %49, %.lr.ph.i ] + %.022.lcssa.i = phi i32 [ %44, %40 ], [ %49, %.lr.ph.i ] %.023.lcssa.i = phi i32 [ %.02328.i, %40 ], [ %.023.i, %.lr.ph.i ] %51 = load i32, ptr @hf_2009_9_dnp_1_srcport, align 4 %52 = sub i32 %.023.lcssa.i, %38 @@ -8534,30 +8540,33 @@ proto_item_set_generated.exit: ; preds = %69, %66, %63, %vali 74: ; preds = %proto_item_set_generated.exit %75 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.1) %76 = icmp slt i8 %75, 0 - %77 = and i8 %75, 64 - %.not170 = icmp eq i8 %77, 0 - %78 = and i8 %75, 63 - %..i128 = select i1 %.not170, i32 2, i32 3 - %.020.i130 = select i1 %76, i8 %78, i8 %75 - %79 = zext nneg i8 %.020.i130 to i32 + %77 = and i8 %75, 63 + %.020.i130 = select i1 %76, i8 %77, i8 %75 + %78 = zext nneg i8 %.020.i130 to i32 %.02328.i131 = add i32 %.1, 1 br i1 %76, label %.lr.ph.i135, label %read_c3.exit141 -.lr.ph.i135: ; preds = %74, %.lr.ph.i135 - %.02331.i136 = phi i32 [ %.023.i139, %.lr.ph.i135 ], [ %.02328.i131, %74 ] - %.030.i137 = phi i32 [ %84, %.lr.ph.i135 ], [ 1, %74 ] - %.02229.i138 = phi i32 [ %83, %.lr.ph.i135 ], [ %79, %74 ] +.lr.ph.i135: ; preds = %74 + %79 = and i8 %75, 64 + %.not172 = icmp eq i8 %79, 0 + %..i128171 = select i1 %.not172, i32 1, i32 2 + br label %.lr.ph.i135 + +.lr.ph.i135: ; preds = %.lr.ph.i135.preheader, %.lr.ph.i135 + %.02331.i136 = phi i32 [ %.023.i139, %.lr.ph.i135 ], [ %.02328.i131, %.lr.ph.i135.preheader ] + %.030.i137 = phi i32 [ %84, %.lr.ph.i135 ], [ 1, %.lr.ph.i135.preheader ] + %.02229.i138 = phi i32 [ %83, %.lr.ph.i135 ], [ %78, %.lr.ph.i135.preheader ] %80 = shl i32 %.02229.i138, 8 %81 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i136) %82 = zext i8 %81 to i32 %83 = or disjoint i32 %80, %82 %84 = add nuw nsw i32 %.030.i137, 1 - %.023.i139 = add nuw nsw i32 %.02331.i136, 1 - %exitcond.not.i140 = icmp eq i32 %84, %..i128 + %.023.i139 = add i32 %.02331.i136, 1 + %exitcond.not.i140 = icmp eq i32 %..i128171, %.030.i137 br i1 %exitcond.not.i140, label %read_c3.exit141, label %.lr.ph.i135, !llvm.loop !52 read_c3.exit141: ; preds = %.lr.ph.i135, %74 - %.022.lcssa.i132 = phi i32 [ %79, %74 ], [ %83, %.lr.ph.i135 ] + %.022.lcssa.i132 = phi i32 [ %78, %74 ], [ %83, %.lr.ph.i135 ] %.023.lcssa.i133 = phi i32 [ %.02328.i131, %74 ], [ %.023.i139, %.lr.ph.i135 ] %85 = load i32, ptr @hf_2009_9_dnp_1_dstport, align 4 %86 = sub i32 %.023.lcssa.i133, %.1 @@ -9166,7 +9175,7 @@ proto_item_set_generated.exit527: ; preds = %176, %173, %dof_oid %213 = lshr i32 %184, 5 %214 = and i32 %213, 3 %215 = getelementptr inbounds nuw i8, ptr %15, i64 80 - switch i32 %214, label %default.unreachable680 [ + switch i32 %214, label %default.unreachable682 [ i32 0, label %.thread608 i32 1, label %242 i32 2, label %216 @@ -9603,30 +9612,33 @@ validate_c4.exit: ; preds = %282, %285 444: ; preds = %423 %445 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %442) %446 = icmp slt i8 %445, 0 - %447 = and i8 %445, 64 - %.not659 = icmp eq i8 %447, 0 - %448 = and i8 %445, 63 - %..i532 = select i1 %.not659, i32 2, i32 4 - %.020.i534 = select i1 %446, i8 %448, i8 %445 - %449 = zext nneg i8 %.020.i534 to i32 + %447 = and i8 %445, 63 + %.020.i534 = select i1 %446, i8 %447, i8 %445 + %448 = zext nneg i8 %.020.i534 to i32 %.02328.i535 = add i32 %.5426, 2 br i1 %446, label %.lr.ph.i539, label %read_c4.exit545 -.lr.ph.i539: ; preds = %444, %.lr.ph.i539 - %.02331.i540 = phi i32 [ %.023.i543, %.lr.ph.i539 ], [ %.02328.i535, %444 ] - %.030.i541 = phi i32 [ %454, %.lr.ph.i539 ], [ 1, %444 ] - %.02229.i542 = phi i32 [ %453, %.lr.ph.i539 ], [ %449, %444 ] +.lr.ph.i539: ; preds = %444 + %449 = and i8 %445, 64 + %.not660 = icmp eq i8 %449, 0 + %..i532659 = select i1 %.not660, i32 1, i32 3 + br label %.lr.ph.i539 + +.lr.ph.i539: ; preds = %.lr.ph.i539.preheader, %.lr.ph.i539 + %.02331.i540 = phi i32 [ %.023.i543, %.lr.ph.i539 ], [ %.02328.i535, %.lr.ph.i539.preheader ] + %.030.i541 = phi i32 [ %454, %.lr.ph.i539 ], [ 1, %.lr.ph.i539.preheader ] + %.02229.i542 = phi i32 [ %453, %.lr.ph.i539 ], [ %448, %.lr.ph.i539.preheader ] %450 = shl i32 %.02229.i542, 8 %451 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i540) %452 = zext i8 %451 to i32 %453 = or disjoint i32 %450, %452 %454 = add nuw nsw i32 %.030.i541, 1 %.023.i543 = add i32 %.02331.i540, 1 - %exitcond.not.i544 = icmp eq i32 %454, %..i532 + %exitcond.not.i544 = icmp eq i32 %..i532659, %.030.i541 br i1 %exitcond.not.i544, label %read_c4.exit545, label %.lr.ph.i539, !llvm.loop !33 read_c4.exit545: ; preds = %.lr.ph.i539, %444 - %.022.lcssa.i536 = phi i32 [ %449, %444 ], [ %453, %.lr.ph.i539 ] + %.022.lcssa.i536 = phi i32 [ %448, %444 ], [ %453, %.lr.ph.i539 ] %.023.lcssa.i537 = phi i32 [ %.02328.i535, %444 ], [ %.023.i543, %.lr.ph.i539 ] %455 = load i32, ptr @hf_2009_12_dpp_2_3_sec_ssid, align 4 %456 = sub i32 %.023.lcssa.i537, %442 @@ -9698,30 +9710,33 @@ validate_c4.exit548: ; preds = %464, %461, %423 482: ; preds = %.critedge %483 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.7428) %484 = icmp slt i8 %483, 0 - %485 = and i8 %483, 64 - %.not660 = icmp eq i8 %485, 0 - %486 = and i8 %483, 63 - %..i549 = select i1 %.not660, i32 2, i32 4 - %.020.i551 = select i1 %484, i8 %486, i8 %483 - %487 = zext nneg i8 %.020.i551 to i32 + %485 = and i8 %483, 63 + %.020.i551 = select i1 %484, i8 %485, i8 %483 + %486 = zext nneg i8 %.020.i551 to i32 %.02328.i552 = add i32 %.7428, 1 br i1 %484, label %.lr.ph.i556, label %read_c4.exit562 -.lr.ph.i556: ; preds = %482, %.lr.ph.i556 - %.02331.i557 = phi i32 [ %.023.i560, %.lr.ph.i556 ], [ %.02328.i552, %482 ] - %.030.i558 = phi i32 [ %492, %.lr.ph.i556 ], [ 1, %482 ] - %.02229.i559 = phi i32 [ %491, %.lr.ph.i556 ], [ %487, %482 ] +.lr.ph.i556: ; preds = %482 + %487 = and i8 %483, 64 + %.not662 = icmp eq i8 %487, 0 + %..i549661 = select i1 %.not662, i32 1, i32 3 + br label %.lr.ph.i556 + +.lr.ph.i556: ; preds = %.lr.ph.i556.preheader, %.lr.ph.i556 + %.02331.i557 = phi i32 [ %.023.i560, %.lr.ph.i556 ], [ %.02328.i552, %.lr.ph.i556.preheader ] + %.030.i558 = phi i32 [ %492, %.lr.ph.i556 ], [ 1, %.lr.ph.i556.preheader ] + %.02229.i559 = phi i32 [ %491, %.lr.ph.i556 ], [ %486, %.lr.ph.i556.preheader ] %488 = shl i32 %.02229.i559, 8 %489 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i557) %490 = zext i8 %489 to i32 %491 = or disjoint i32 %488, %490 %492 = add nuw nsw i32 %.030.i558, 1 %.023.i560 = add i32 %.02331.i557, 1 - %exitcond.not.i561 = icmp eq i32 %492, %..i549 + %exitcond.not.i561 = icmp eq i32 %..i549661, %.030.i558 br i1 %exitcond.not.i561, label %read_c4.exit562, label %.lr.ph.i556, !llvm.loop !33 read_c4.exit562: ; preds = %.lr.ph.i556, %482 - %.022.lcssa.i553 = phi i32 [ %487, %482 ], [ %491, %.lr.ph.i556 ] + %.022.lcssa.i553 = phi i32 [ %486, %482 ], [ %491, %.lr.ph.i556 ] %.023.lcssa.i554 = phi i32 [ %.02328.i552, %482 ], [ %.023.i560, %.lr.ph.i556 ] %493 = load i32, ptr @hf_2009_12_dpp_2_3_sec_rdid, align 4 %494 = sub i32 %.023.lcssa.i554, %.7428 @@ -10390,30 +10405,33 @@ validate_c2.exit: ; preds = %read_c2.exit, %19 %21 = add nsw i16 %.in, -1 %22 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.034) %23 = icmp slt i8 %22, 0 - %24 = and i8 %22, 64 - %.not32 = icmp eq i8 %24, 0 - %25 = and i8 %22, 63 - %..i = select i1 %.not32, i32 2, i32 4 - %.020.i = select i1 %23, i8 %25, i8 %22 - %26 = zext nneg i8 %.020.i to i32 - %.02328.i = add i32 %.034, 1 + %24 = and i8 %22, 63 + %.020.i = select i1 %23, i8 %24, i8 %22 + %25 = zext nneg i8 %.020.i to i32 + %.02328.i = add i32 %.035, 1 br i1 %23, label %.lr.ph.i, label %read_c4.exit -.lr.ph.i: ; preds = %.lr.ph, %.lr.ph.i - %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ %.02328.i, %.lr.ph ] - %.030.i = phi i32 [ %31, %.lr.ph.i ], [ 1, %.lr.ph ] - %.02229.i = phi i32 [ %30, %.lr.ph.i ], [ %26, %.lr.ph ] +.lr.ph.i:; preds = %.lr.ph + %26 = and i8 %22, 64 + %.not33 = icmp eq i8 %26, 0 + %..i32 = select i1 %.not33, i32 1, i32 3 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.i + %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ %.02328.i, %.lr.ph.i.preheader ] + %.030.i = phi i32 [ %31, %.lr.ph.i ], [ 1, %.lr.ph.i.preheader ] + %.02229.i = phi i32 [ %30, %.lr.ph.i ], [ %25, %.lr.ph.i.preheader ] %27 = shl i32 %.02229.i, 8 %28 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i) %29 = zext i8 %28 to i32 %30 = or disjoint i32 %27, %29 %31 = add nuw nsw i32 %.030.i, 1 %.023.i = add i32 %.02331.i, 1 - %exitcond.not.i = icmp eq i32 %31, %..i + %exitcond.not.i = icmp eq i32 %..i32, %.030.i br i1 %exitcond.not.i, label %read_c4.exit, label %.lr.ph.i, !llvm.loop !33 read_c4.exit: ; preds = %.lr.ph.i, %.lr.ph - %.022.lcssa.i = phi i32 [ %26, %.lr.ph ], [ %30, %.lr.ph.i ] + %.022.lcssa.i = phi i32 [ %25, %.lr.ph ], [ %30, %.lr.ph.i ] %.023.lcssa.i = phi i32 [ %.02328.i, %.lr.ph ], [ %.023.i, %.lr.ph.i ] %switch.tableidx = add i32 %.022.lcssa.i, -1073741821 %32 = icmp ult i32 %switch.tableidx, 3 @@ -14847,28 +14865,31 @@ define internal fastcc range(i32 0, 32774) i32 @dissect_2008_4_tep_2_2_1(ptr nou 10: ; preds = %6 %11 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef 0) %12 = icmp slt i8 %11, 0 - %13 = and i8 %11, 64 - %.not = icmp eq i8 %13, 0 - %14 = and i8 %11, 63 - %..i = select i1 %.not, i32 2, i32 4 - %.020.i = select i1 %12, i8 %14, i8 %11 - %15 = zext nneg i8 %.020.i to i32 + %13 = and i8 %11, 63 + %.020.i = select i1 %12, i8 %13, i8 %11 + %14 = zext nneg i8 %.020.i to i32 br i1 %12, label %.lr.ph.i, label %._crit_edge.i -.lr.ph.i: ; preds = %10, %.lr.ph.i - %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ 1, %10 ] - %.02229.i = phi i32 [ %19, %.lr.ph.i ], [ %15, %10 ] +.lr.ph.i:; preds = %10 + %15 = and i8 %11, 64 + %.not = icmp eq i8 %15, 0 + %..i1 = select i1 %.not, i32 1, i32 3 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %.lr.ph.i.preheader, %.lr.ph.i + %.02331.i = phi i32 [ %.023.i, %.lr.ph.i ], [ 1, %.lr.ph.i.preheader ] + %.02229.i = phi i32 [ %19, %.lr.ph.i ], [ %14, %.lr.ph.i.preheader ] %16 = shl i32 %.02229.i, 8 %17 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.02331.i) %18 = zext i8 %17 to i32 %19 = or disjoint i32 %16, %18 - %.023.i = add nuw i32 %.02331.i, 1 - %exitcond.not.i = icmp eq i32 %.023.i, %..i + %.023.i = add nuw nsw i32 %.02331.i, 1 + %exitcond.not.i = icmp eq i32 %..i1, %.02331.i br i1 %exitcond.not.i, label %._crit_edge.i, label %.lr.ph.i, !llvm.loop !33 ._crit_edge.i: ; preds = %.lr.ph.i, %10 - %.022.lcssa.i = phi i32 [ %15, %10 ], [ %19, %.lr.ph.i ] - %.023.lcssa.i = phi i32 [ 1, %10 ], [ %..i, %.lr.ph.i ] + %.022.lcssa.i = phi i32 [ %14, %10 ], [ %19, %.lr.ph.i ] + %.023.lcssa.i = phi i32 [ 1, %10 ], [ %.023.i, %.lr.ph.i ] %.not27.i = icmp eq ptr %3, null br i1 %.not27.i, label %._crit_edge.i.read_c4.exit_crit_edge, label %20 @@ -15125,30 +15146,33 @@ validate_c2.exit: ; preds = %read_c2.exit, %19 %36 = add nsw i16 %.in.i, -1 %37 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %26, i32 noundef %.0276.i) %38 = icmp slt i8 %37, 0 - %39 = and i8 %37, 64 - %.not4.i = icmp eq i8 %39, 0 - %40 = and i8 %37, 63 - %..i.i = select i1 %.not4.i, i32 2, i32 4 - %.020.i.i = select i1 %38, i8 %40, i8 %37 - %41 = zext nneg i8 %.020.i.i to i32 - %.02328.i.i = add i32 %.0276.i, 1 - br i1 %38, label %.lr.ph.i.i, label %read_c4.exit.i - -.lr.ph.i.i: ; preds = %.lr.ph.i, %.lr.ph.i.i - %.02331.i.i = phi i32 [ %.023.i.i, %.lr.ph.i.i ], [ %.02328.i.i, %.lr.ph.i ] - %.030.i.i = phi i32 [ %46, %.lr.ph.i.i ], [ 1, %.lr.ph.i ] - %.02229.i.i = phi i32 [ %45, %.lr.ph.i.i ], [ %41, %.lr.ph.i ] + %39 = and i8 %37, 63 + %.020.i.i = select i1 %38, i8 %39, i8 %37 + %40 = zext nneg i8 %.020.i.i to i32 + %.02328.i.i = add i32 %.0277.i, 1 + br i1 %38, label %.lr.ph.i.preheader.i, label %read_c4.exit.i + +.lr.ph.i.preheader.i:; preds = %.lr.ph.i + %41 = and i8 %37, 64 + %.not5.i = icmp eq i8 %41, 0 + %..i4.i = select i1 %.not5.i, i32 1, i32 3 + br label %.lr.ph.i.i + +.lr.ph.i.i: ; preds = %.lr.ph.i.i, %.lr.ph.i.preheader.i + %.02331.i.i = phi i32 [ %.023.i.i, %.lr.ph.i.i ], [ %.02328.i.i, %.lr.ph.i.preheader.i ] + %.030.i.i = phi i32 [ %46, %.lr.ph.i.i ], [ 1, %.lr.ph.i.preheader.i ] + %.02229.i.i = phi i32 [ %45, %.lr.ph.i.i ], [ %40, %.lr.ph.i.preheader.i ] %42 = shl i32 %.02229.i.i, 8 %43 = tail call zeroext i8 @tvb_get_uint8(ptr noundef %26, i32 noundef %.02331.i.i) %44 = zext i8 %43 to i32 %45 = or disjoint i32 %42, %44 %46 = add nuw nsw i32 %.030.i.i, 1 %.023.i.i = add i32 %.02331.i.i, 1 - %exitcond.not.i.i = icmp eq i32 %46, %..i.i + %exitcond.not.i.i = icmp eq i32 %..i4.i, %.030.i.i br i1 %exitcond.not.i.i, label %read_c4.exit.i, label %.lr.ph.i.i, !llvm.loop !33 read_c4.exit.i: ; preds = %.lr.ph.i.i, %.lr.ph.i - %.022.lcssa.i.i = phi i32 [ %41, %.lr.ph.i ], [ %45, %.lr.ph.i.i ] + %.022.lcssa.i.i = phi i32 [ %40, %.lr.ph.i ], [ %45, %.lr.ph.i.i ] %.023.lcssa.i.i = phi i32 [ %.02328.i.i, %.lr.ph.i ], [ %.023.i.i, %.lr.ph.i.i ] %switch.tableidx = add i32 %.022.lcssa.i.i, -1073741821 %47 = icmp ult i32 %switch.tableidx, 3 diff --git a/bench/wireshark/optimized/packet-ieee80211.ll b/bench/wireshark/optimized/packet-ieee80211.ll index 645bb1210f8..9dc164523df 100644 --- a/bench/wireshark/optimized/packet-ieee80211.ll +++ b/bench/wireshark/optimized/packet-ieee80211.ll @@ -46623,8 +46623,8 @@ define internal fastcc noundef i32 @dissect_ieee80211_block_ack_details(ptr noun br i1 %5, label %.preheader304, label %.preheader305 .preheader304: ; preds = %116, %.preheader304 - %.1276 = phi i32 [ %135, %.preheader304 ], [ %21, %116 ] - %.1253275 = phi i32 [ %136, %.preheader304 ], [ 0, %116 ] + %.1276 = phi i32 [ %135, %.preheader305 ], [ %21, %116 ] + %.1253275 = phi i32 [ %136, %.preheader305 ], [ 0, %116 ] %122 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.1276) %123 = and i8 %122, 15 %124 = load i32, ptr @ett_block_ack_tid, align 4 @@ -46644,8 +46644,8 @@ define internal fastcc noundef i32 @dissect_ieee80211_block_ack_details(ptr noun br i1 %exitcond288.not, label %.loopexit, label %.preheader304, !llvm.loop !228 .preheader305: ; preds = %116, %.preheader305 - %.2274 = phi i32 [ %153, %.preheader305 ], [ %21, %116 ] - %.2254273 = phi i32 [ %154, %.preheader305 ], [ 0, %116 ] + %.2274 = phi i32 [ %153, %.preheader306 ], [ %21, %116 ] + %.2254273 = phi i32 [ %154, %.preheader306 ], [ 0, %116 ] %137 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %.2274) %138 = and i8 %137, 15 %139 = load i32, ptr @ett_block_ack_tid, align 4 @@ -46738,9 +46738,9 @@ define internal fastcc noundef i32 @dissect_ieee80211_block_ack_details(ptr noun %197 = call ptr @proto_item_add_subtree(ptr noundef %195, i32 noundef %196) %198 = shl nuw nsw i32 %.0, 3 %199 = icmp eq i32 %.0, 4 - %spec.select = select i1 %199, i64 32, i64 64 %200 = zext nneg i16 %183 to i64 %201 = zext nneg i32 %198 to i64 + %wide.trip.count300 = select i1 %199, i64 31, i64 63 br label %202 202: ; preds = %193, %222 @@ -46773,7 +46773,7 @@ define internal fastcc noundef i32 @dissect_ieee80211_block_ack_details(ptr noun 221: ; preds = %208, %211 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %spec.select + %exitcond.not = icmp eq i64 %wide.trip.count300, %indvars.iv br i1 %exitcond.not, label %222, label %208, !llvm.loop !230 222: ; preds = %221 @@ -46809,7 +46809,7 @@ define internal fastcc noundef i32 @dissect_ieee80211_block_ack_details(ptr noun br i1 %241, label %.lr.ph, label %.loopexit, !llvm.loop !232 .loopexit: ; preds = %237, %.preheader305, %.preheader304, %.preheader, %155, %163, %82, %108, %37, %77, %28, %33, %7 - %.0251 = phi i32 [ %21, %7 ], [ %32, %28 ], [ %36, %33 ], [ %42, %37 ], [ %78, %77 ], [ %86, %82 ], [ %112, %108 ], [ %162, %155 ], [ %166, %163 ], [ %21, %.preheader ], [ %135, %.preheader304 ], [ %153, %.preheader305 ], [ %.4, %237 ] + %.0251 = phi i32 [ %21, %7 ], [ %32, %28 ], [ %36, %33 ], [ %42, %37 ], [ %78, %77 ], [ %86, %82 ], [ %112, %108 ], [ %162, %155 ], [ %166, %163 ], [ %21, %.preheader ], [ %135, %.preheader305 ], [ %153, %.preheader306 ], [ %.4, %237 ] %242 = load ptr, ptr %8, align 8 %243 = sub i32 %.0251, %3 call void @proto_item_set_len(ptr noundef %242, i32 noundef %243) diff --git a/bench/wireshark/optimized/packet-usb-audio.ll b/bench/wireshark/optimized/packet-usb-audio.ll index 51ef697bdd2..701649bfd07 100644 --- a/bench/wireshark/optimized/packet-usb-audio.ll +++ b/bench/wireshark/optimized/packet-usb-audio.ll @@ -3325,27 +3325,26 @@ has_data_stage.exit: ; preds = %74 %78 = getelementptr inbounds nuw i8, ptr %75, i64 28 %79 = load i8, ptr %78, align 4 %80 = and i8 %79, -128 - %81 = zext i8 %80 to i32 - %82 = load i8, ptr %51, align 4, !range !6, !noundef !7 - %83 = trunc nuw i8 %82 to i1 - %84 = select i1 %83, i32 0, i32 128 - %85 = icmp eq i32 %84, %81 - br i1 %85, label %86, label %has_data_stage.exit.thread - -86: ; preds = %has_data_stage.exit + %81 = load i8, ptr %51, align 4, !range !6, !noundef !7 + %82 = xor i8 %81, -1 + %83 = shl i8 %82, 7 + %84 = icmp eq i8 %83, %80 + br i1 %84, label %85, label %has_data_stage.exit.thread + +85: ; preds = %has_data_stage.exit call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9 %87 = load i32, ptr @ett_parameter_block, align 4 %88 = call ptr @proto_tree_add_subtree(ptr noundef %2, ptr noundef %0, i32 noundef %.0, i32 noundef -1, i32 noundef %87, ptr noundef nonnull %6, ptr noundef nonnull %.0618097) br i1 %.not708296, label %93, label %89 -89: ; preds = %86 +89: ; preds = %85 %90 = load i32, ptr %.0608495, align 4 %91 = call ptr @proto_tree_add_item(ptr noundef %88, i32 noundef %90, ptr noundef %0, i32 noundef %.0, i32 noundef %.0598694, i32 noundef -2147483648) %92 = add i32 %.0, %.0598694 br label %93 -93: ; preds = %89, %86 - %.2 = phi i32 [ %92, %89 ], [ %.0, %86 ] +93: ; preds = %89, %85 + %.2 = phi i32 [ %92, %88 ], [ %.0, %85 ] %94 = call i32 @tvb_captured_length_remaining(ptr noundef %0, i32 noundef %.2) %.not71 = icmp eq i32 %94, 0 br i1 %.not71, label %100, label %95 @@ -3358,12 +3357,12 @@ has_data_stage.exit: ; preds = %74 br label %100 100: ; preds = %95, %93 - %.3 = phi i32 [ %99, %95 ], [ %.2, %93 ] + %.3 = phi i32 [ %99, %94 ], [ %.2, %92 ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9 br label %has_data_stage.exit.thread has_data_stage.exit.thread: ; preds = %74, %100, %has_data_stage.exit - %.1 = phi i32 [ %.3, %100 ], [ %.0, %has_data_stage.exit ], [ %.0, %74 ] + %.1 = phi i32 [ %.3, %99 ], [ %.0, %has_data_stage.exit ], [ %.0, %74 ] call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9 ret i32 %.1 } @@ -3554,14 +3553,13 @@ has_data_stage.exit.i: ; preds = %90 %94 = getelementptr inbounds nuw i8, ptr %91, i64 28 %95 = load i8, ptr %94, align 4 %96 = and i8 %95, -128 - %97 = zext i8 %96 to i32 - %98 = load i8, ptr %18, align 4, !range !6, !noundef !7 - %99 = trunc nuw i8 %98 to i1 - %100 = select i1 %99, i32 0, i32 128 - %101 = icmp eq i32 %100, %97 - br i1 %101, label %102, label %dissect_v2_control_cur_range.exit - -102: ; preds = %has_data_stage.exit.i + %97 = load i8, ptr %18, align 4, !range !6, !noundef !7 + %98 = xor i8 %98, -1 + %99 = shl i8 %98, 7 + %100 = icmp eq i8 %99, %96 + br i1 %100, label %101, label %dissect_v2_control_cur_range.exit + +101: ; preds = %has_data_stage.exit.i call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9 switch i32 %.0100115129.i, label %default.unreachable [ @@ -3571,38 +3569,38 @@ has_data_stage.exit.i: ; preds = %90 i32 0, label %118 ] -103: ; preds = %102 +103: ; preds = %101 %104 = load i32, ptr @hf_parameter_bcur, align 4 %105 = load i32, ptr @hf_parameter_bmin, align 4 %106 = load i32, ptr @hf_parameter_bmax, align 4 %107 = load i32, ptr @hf_parameter_bres, align 4 br label %118 -108: ; preds = %102 +108: ; preds = %101 %109 = load i32, ptr @hf_parameter_wcur, align 4 %110 = load i32, ptr @hf_parameter_wmin, align 4 %111 = load i32, ptr @hf_parameter_wmax, align 4 %112 = load i32, ptr @hf_parameter_wres, align 4 br label %118 -113: ; preds = %102 +113: ; preds = %101 %114 = load i32, ptr @hf_parameter_dcur, align 4 %115 = load i32, ptr @hf_parameter_dmin, align 4 %116 = load i32, ptr @hf_parameter_dmax, align 4 %117 = load i32, ptr @hf_parameter_dres, align 4 br label %118 -default.unreachable: ; preds = %102 +default.unreachable: ; preds = %101 unreachable -118: ; preds = %113, %108, %103, %102 - %.096.i = phi ptr [ @.str.828, %103 ], [ @.str.829, %108 ], [ @.str.830, %113 ], [ @.str.831, %102 ] - %.not106.i = phi i1 [ false, %103 ], [ false, %108 ], [ false, %113 ], [ true, %102 ] - %.095.i = phi i32 [ 1, %103 ], [ 2, %108 ], [ 4, %113 ], [ %.0100115129.i, %102 ] - %.094.i = phi i32 [ %104, %103 ], [ %109, %108 ], [ %114, %113 ], [ %.0100115129.i, %102 ] - %.093.i = phi i32 [ %105, %103 ], [ %110, %108 ], [ %115, %113 ], [ %.0100115129.i, %102 ] - %.092.i = phi i32 [ %106, %103 ], [ %111, %108 ], [ %116, %113 ], [ %.0100115129.i, %102 ] - %.091.i = phi i32 [ %107, %103 ], [ %112, %108 ], [ %117, %113 ], [ %.0100115129.i, %102 ] +118: ; preds = %113, %108, %103, %101 + %.096.i = phi ptr [ @.str.828, %102 ], [ @.str.829, %107 ], [ @.str.830, %112 ], [ @.str.831, %101 ] + %.not106.i = phi i1 [ false, %102 ], [ false, %107 ], [ false, %112 ], [ true, %101 ] + %.095.i = phi i32 [ 1, %102 ], [ 2, %107 ], [ 4, %112 ], [ %.0100115129.i, %101 ] + %.094.i = phi i32 [ %104, %102 ], [ %109, %107 ], [ %114, %112 ], [ %.0100115129.i, %101 ] + %.093.i = phi i32 [ %105, %102 ], [ %110, %107 ], [ %115, %112 ], [ %.0100115129.i, %101 ] + %.092.i = phi i32 [ %106, %102 ], [ %111, %107 ], [ %116, %112 ], [ %.0100115129.i, %101 ] + %.091.i = phi i32 [ %107, %102 ], [ %112, %107 ], [ %117, %112 ], [ %.0100115129.i, %101 ] %119 = load i32, ptr @ett_parameter_block, align 4 %120 = call ptr @proto_tree_add_subtree(ptr noundef %2, ptr noundef %0, i32 noundef %.097.i, i32 noundef -1, i32 noundef %119, ptr noundef nonnull %6, ptr noundef nonnull %.096.i) br i1 %.not105117128.i, label %123, label %121 @@ -3651,15 +3649,15 @@ default.unreachable: ; preds = %102 br label %146 146: ; preds = %._crit_edge, %142 - %invariant.op130.i.pre-phi = phi i32 [ %.pre, %._crit_edge ], [ %144, %142 ] - %.090.i = phi i32 [ %137, %._crit_edge ], [ %145, %142 ] + %invariant.op130.i.pre-phi = phi i32 [ %.pre, %._crit_edge ], [ %144, %141 ] + %.090.i = phi i32 [ %137, %._crit_edge ], [ %145, %141 ] %invariant.op.i = shl nuw nsw i32 %.095.i, 1 %.not.i = icmp eq i32 %.090.i, 0 br i1 %.not.i, label %.loopexit.i, label %.lr.ph.i .lr.ph.i: ; preds = %146, %.lr.ph.i - %.0133.i = phi i32 [ %151, %.lr.ph.i ], [ 0, %146 ] - %.2132.i = phi i32 [ %.reass131.i, %.lr.ph.i ], [ %131, %146 ] + %.0133.i = phi i32 [ %151, %.lr.ph.i ], [ 0, %145 ] + %.2132.i = phi i32 [ %.reass131.i, %.lr.ph.i ], [ %131, %145 ] %147 = call ptr @proto_tree_add_item(ptr noundef %120, i32 noundef %.093.i, ptr noundef %0, i32 noundef %.2132.i, i32 noundef %.095.i, i32 noundef -2147483648) %148 = add i32 %.2132.i, %.095.i %149 = call ptr @proto_tree_add_item(ptr noundef %120, i32 noundef %.092.i, ptr noundef %0, i32 noundef %148, i32 noundef %.095.i, i32 noundef -2147483648) @@ -3686,7 +3684,7 @@ default.unreachable: ; preds = %102 br label %.loopexit.i .loopexit.i: ; preds = %.lr.ph.i, %156, %153, %146, %140, %128 - %.3.i = phi i32 [ %155, %153 ], [ %160, %156 ], [ %131, %146 ], [ %131, %128 ], [ %131, %140 ], [ %.reass131.i, %.lr.ph.i ] + %.3.i = phi i32 [ %155, %152 ], [ %160, %155 ], [ %131, %145 ], [ %131, %127 ], [ %131, %139 ], [ %.reass131.i, %.lr.ph.i ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9 br label %dissect_v2_control_cur_range.exit diff --git a/bench/yosys/optimized/blifparse.ll b/bench/yosys/optimized/blifparse.ll index 558784f2015..c55b139ef18 100644 --- a/bench/yosys/optimized/blifparse.ll +++ b/bench/yosys/optimized/blifparse.ll @@ -10923,13 +10923,12 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit1822: ; preds = %3 br i1 %.not671, label %.thread2058, label %3988 3988: ; preds = %.lr.ph5619 - %3989 = sext i8 %3987 to i32 - %3990 = trunc nuw nsw i64 %indvars.iv8834 to i32 - %3991 = shl nuw nsw i32 1, %3990 - %3992 = and i32 %3991, %3985 - %.not672 = icmp eq i32 %3992, 0 - %3993 = select i1 %.not672, i32 48, i32 49 - %.not673 = icmp eq i32 %3993, %3989 + %3989 = trunc nuw nsw i64 %indvars.iv8834 to i32 + %3990 = shl nuw nsw i32 1, %3989 + %3991 = and i32 %3990, %3985 + %.not672 = icmp eq i32 %3991, 0 + %3992 = select i1 %.not672, i8 48, i8 49 + %.not673 = icmp eq i8 %3992, %3987 br i1 %.not673, label %.thread2058, label %.loopexit2119 .thread2058: ; preds = %3988, %.lr.ph5619 @@ -10951,20 +10950,20 @@ sub_12099: ; preds = %sub_02098 .thread2061.tail: ; preds = %sub_02098, %sub_12099 %.not674 = phi i8 [ 1, %sub_02098 ], [ %3997, %sub_12099 ] %3998 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Yosys5RTLIL5Const4bitsEv(ptr noundef nonnull align 8 dereferenceable(40) %.1) - to label %3999 unwind label %.loopexit2141 + to label %3998 unwind label %.loopexit2141 3999: ; preds = %.thread2061.tail %4000 = getelementptr inbounds nuw i8, ptr %3998, i64 8 %4001 = load ptr, ptr %4000, align 8, !tbaa !115 %4002 = load ptr, ptr %3998, align 8, !tbaa !103 + %4002 = ptrtoint ptr %4000 to i64 %4003 = ptrtoint ptr %4001 to i64 - %4004 = ptrtoint ptr %4002 to i64 - %4005 = sub i64 %4003, %4004 - %.not.i.i1832 = icmp ugt i64 %4005, %indvars.iv8839 - br i1 %.not.i.i1832, label %4007, label %4006 + %4004 = sub i64 %4002, %4003 + %.not.i.i1832 = icmp ugt i64 %4004, %indvars.iv8839 + br i1 %.not.i.i1832, label %4006, label %4005 4006: ; preds = %3999 - invoke void (ptr, ...) @_ZSt24__throw_out_of_range_fmtPKcz(ptr noundef nonnull @.str.56, i64 noundef %indvars.iv8839, i64 noundef %4005) #35 + invoke void (ptr, ...) @_ZSt24__throw_out_of_range_fmtPKcz(ptr noundef nonnull @.str.56, i64 noundef %indvars.iv8839, i64 noundef %4004) #35 to label %.noexc1833 unwind label %.loopexit.split-lp2142 .noexc1833: ; preds = %4006 @@ -11006,7 +11005,7 @@ sub_12103: ; preds = %sub_02102 .thread2024: ; preds = %.tail2090, %3981, %3529, %.tail2094, %3526, %3219, %3216, %1861, %496, %492, %sub_02091, %3268, %2788, %605, %.loopexit2125, %470 %4015 = load i32, ptr %26, align 4, !tbaa !18 invoke void (ptr, ...) @_ZN5Yosys9log_errorEPKcz(ptr noundef nonnull @.str.49, i32 noundef %4015) #35 - to label %4016 unwind label %.loopexit.split-lp2186 + to label %4015 unwind label %.loopexit.split-lp2186 4016: ; preds = %.thread2024 unreachable @@ -11015,7 +11014,7 @@ sub_12103: ; preds = %sub_02102 %4017 = load i32, ptr %26, align 4, !tbaa !18 %4018 = load ptr, ptr %21, align 8, !tbaa !25 invoke void (ptr, ...) @_ZN5Yosys9log_errorEPKcz(ptr noundef nonnull @.str.50, i32 noundef %4017, ptr noundef %4018) #35 - to label %4019 unwind label %.loopexit.split-lp2186 + to label %4018 unwind label %.loopexit.split-lp2186 4019: ; preds = %.loopexit2184 unreachable diff --git a/bench/z3/optimized/fm_tactic.ll b/bench/z3/optimized/fm_tactic.ll index 33e21d52f3e..70adb357c2e 100644 --- a/bench/z3/optimized/fm_tactic.ll +++ b/bench/z3/optimized/fm_tactic.ll @@ -16083,13 +16083,12 @@ _ZN11mpq_managerILb1EE2eqERK3mpzS3_.exit.i.i.i: ; preds = %116, %105 %184 = getelementptr inbounds nuw i32, ptr %166, i64 %indvars.iv129 %185 = load i32, ptr %184, align 4, !tbaa !117 %186 = tail call noundef i32 @llvm.abs.i32(i32 %185, i1 true) - %187 = zext nneg i32 %186 to i64 - %188 = getelementptr inbounds nuw i8, ptr %168, i64 %187 - %189 = load i8, ptr %188, align 1, !tbaa !107 - %190 = sext i8 %189 to i32 - %.inv = icmp sgt i32 %185, -1 - %191 = select i1 %.inv, i32 1, i32 -1 - %.not80 = icmp eq i32 %191, %190 + %187 = icmp slt i32 %185, 0 + %188 = zext nneg i32 %186 to i64 + %189 = getelementptr inbounds nuw i8, ptr %168, i64 %188 + %190 = load i8, ptr %189, align 1, !tbaa !107 + %191 = select i1 %187, i8 -1, i8 1 + %.not80 = icmp eq i8 %191, %190 %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1 %exitcond.not = icmp ne i64 %indvars.iv.next130, %wide.trip.count %or.cond143.not = select i1 %.not80, i1 %exitcond.not, i1 false diff --git a/bench/zfp/optimized/testzfp.ll b/bench/zfp/optimized/testzfp.ll index 759261c654c..050df1028bf 100644 --- a/bench/zfp/optimized/testzfp.ll +++ b/bench/zfp/optimized/testzfp.ll @@ -3081,8 +3081,8 @@ _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit200: ; preds = %1 144: ; preds = %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit200, %_Z4hashPKvm.exit %145 = tail call ptr @zfp_stream_open(ptr noundef null) %146 = lshr exact i32 2, %64 - %147 = select i1 %63, i32 64, i32 32 - %148 = icmp eq i32 %1, 1 + %147 = icmp eq i32 %1, 1 + %148 = select i1 %63, i32 16, i32 8 br label %151 149: ; preds = %151 @@ -3099,11 +3099,11 @@ _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit200: ; preds = %1 %154 = getelementptr inbounds nuw [2 x [2 x [4 x [4 x double]]]], ptr @__const._Z4testIdEjj9ArraySize.emax, i64 0, i64 %103, i64 %104, i64 %106, i64 %153 %155 = load double, ptr %154, align 8, !tbaa !46 %156 = fptrunc double %155 to float - %157 = tail call noundef i32 @_Z9test_rateIfEjP10zfp_streamPK9zfp_fielddT_b(ptr noundef %145, ptr noundef %18, double noundef %152, float noundef %156, i1 noundef zeroext %148) + %157 = tail call noundef i32 @_Z9test_rateIfEjP10zfp_streamPK9zfp_fielddT_b(ptr noundef %145, ptr noundef %18, double noundef %152, float noundef %156, i1 noundef zeroext %147) %158 = add i32 %157, %.0173250 %159 = shl nuw nsw i32 %.0172251, 2 %160 = add i32 %.0171252, 1 - %.not179 = icmp samesign ugt i32 %159, %147 + %.not179 = icmp samesign ult i32 %148, %.0172251 br i1 %.not179, label %149, label %151 161: ; preds = %149 @@ -3716,8 +3716,8 @@ _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit200: ; preds = %1 144: ; preds = %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit200, %_Z4hashPKvm.exit %145 = tail call ptr @zfp_stream_open(ptr noundef null) %146 = lshr exact i32 2, %64 - %147 = select i1 %63, i32 64, i32 32 - %148 = icmp eq i32 %1, 1 + %147 = icmp eq i32 %1, 1 + %148 = select i1 %63, i32 16, i32 8 br label %151 149: ; preds = %151 @@ -3733,11 +3733,11 @@ _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit200: ; preds = %1 %153 = zext i32 %.0171252 to i64 %154 = getelementptr inbounds nuw [2 x [2 x [4 x [4 x double]]]], ptr @__const._Z4testIdEjj9ArraySize.emax, i64 0, i64 %103, i64 %104, i64 %106, i64 %153 %155 = load double, ptr %154, align 8, !tbaa !46 - %156 = tail call noundef i32 @_Z9test_rateIdEjP10zfp_streamPK9zfp_fielddT_b(ptr noundef %145, ptr noundef %18, double noundef %152, double noundef %155, i1 noundef zeroext %148) + %156 = tail call noundef i32 @_Z9test_rateIdEjP10zfp_streamPK9zfp_fielddT_b(ptr noundef %145, ptr noundef %18, double noundef %152, double noundef %155, i1 noundef zeroext %147) %157 = add i32 %156, %.0173250 %158 = shl nuw nsw i32 %.0172251, 2 %159 = add i32 %.0171252, 1 - %.not179 = icmp samesign ugt i32 %158, %147 + %.not179 = icmp samesign ult i32 %148, %.0172251 br i1 %.not179, label %149, label %151 160: ; preds = %149 diff --git a/bench/zlib/optimized/inflate.ll b/bench/zlib/optimized/inflate.ll index 8e9440edf2a..4e509656bd1 100644 --- a/bench/zlib/optimized/inflate.ll +++ b/bench/zlib/optimized/inflate.ll @@ -4090,15 +4090,14 @@ inflateStateCheck.exit: ; preds = %16 %.01415.i = phi i32 [ 0, %.lr.ph.preheader.i ], [ %.1.i, %.lr.ph.i ] %45 = getelementptr inbounds nuw i8, ptr %2, i64 %indvars.iv.i %46 = load i8, ptr %45, align 1, !tbaa !41 - %47 = zext i8 %46 to i32 - %48 = icmp samesign ult i32 %.01415.i, 2 - %49 = select i1 %48, i32 0, i32 255 - %50 = icmp eq i32 %49, %47 - %51 = add nuw nsw i32 %.01415.i, 1 + %47 = icmp samesign ugt i32 %.01415.i, 1 + %48 = sext i1 %47 to i8 + %49 = icmp eq i8 %46, %48 + %50 = add nuw nsw i32 %.01415.i, 1 %.not.i45 = icmp eq i8 %46, 0 %52 = sub nuw nsw i32 4, %.01415.i %spec.select.i46 = select i1 %.not.i45, i32 %52, i32 0 - %.1.i = select i1 %50, i32 %51, i32 %spec.select.i46 + %.1.i = select i1 %49, i32 %50, i32 %spec.select.i46 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %53 = icmp samesign ult i64 %indvars.iv.next.i, %44 %54 = icmp samesign ult i32 %.1.i, 4 @@ -4131,15 +4130,14 @@ syncsearch.exit: ; preds = %.lr.ph.i, %.thread %.01415.i52 = phi i32 [ %58, %.lr.ph.preheader.i49 ], [ %.1.i55, %.lr.ph.i50 ] %66 = getelementptr inbounds nuw i8, ptr %61, i64 %indvars.iv.i51 %67 = load i8, ptr %66, align 1, !tbaa !41 - %68 = zext i8 %67 to i32 - %69 = icmp samesign ult i32 %.01415.i52, 2 - %70 = select i1 %69, i32 0, i32 255 - %71 = icmp eq i32 %70, %68 - %72 = add nuw nsw i32 %.01415.i52, 1 - %.not.i53 = icmp eq i8 %67, 0 - %73 = sub nuw nsw i32 4, %.01415.i52 - %spec.select.i54 = select i1 %.not.i53, i32 %73, i32 0 - %.1.i55 = select i1 %71, i32 %72, i32 %spec.select.i54 + %67 = icmp samesign ugt i32 %.01415.i52, 1 + %68 = sext i1 %67 to i8 + %69 = icmp eq i8 %66, %68 + %70 = add nuw nsw i32 %.01415.i52, 1 + %.not.i53 = icmp eq i8 %66, 0 + %71 = sub nuw nsw i32 4, %.01415.i52 + %spec.select.i54 = select i1 %.not.i53, i32 %71, i32 0 + %spec.select.i54 = select i1 %69, i32 %70, i32 %spec.select.i54 %indvars.iv.next.i56 = add nuw nsw i64 %indvars.iv.i51, 1 %74 = icmp samesign ult i64 %indvars.iv.next.i56, %65 %75 = icmp samesign ult i32 %.1.i55, 4 @@ -4151,8 +4149,8 @@ syncsearch.exit: ; preds = %.lr.ph.i, %.thread br label %syncsearch.exit58 syncsearch.exit58: ; preds = %57, %._crit_edge.loopexit.i57 - %.014.lcssa.i47 = phi i32 [ %58, %57 ], [ %.1.i55, %._crit_edge.loopexit.i57 ] - %.0.lcssa.i48 = phi i32 [ 0, %57 ], [ %77, %._crit_edge.loopexit.i57 ] + %.014.lcssa.i47 = phi i32 [ %58, %56 ], [ %.1.i55, %._crit_edge.loopexit.i57 ] + %.0.lcssa.i48 = phi i32 [ 0, %56 ], [ %77, %._crit_edge.loopexit.i57 ] store i32 %.014.lcssa.i47, ptr %60, align 4, !tbaa !100 %78 = load i32, ptr %22, align 8, !tbaa !45 %79 = sub i32 %78, %.0.lcssa.i48 @@ -4180,7 +4178,7 @@ syncsearch.exit58: ; preds = %57, %._crit_edge.lo br label %93 93: ; preds = %85, %90 - %.sink = phi i32 [ %92, %90 ], [ 0, %85 ] + %.sink = phi i32 [ %92, %88 ], [ 0, %83 ] store i32 %.sink, ptr %89, align 8, !tbaa !21 %94 = getelementptr inbounds nuw i8, ptr %0, i64 40 %95 = load i64, ptr %94, align 8, !tbaa !97 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..27af457064f 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/147182 export COMPTIME_MODE=0 # Please rebase manually