diff --git a/bench/abc/optimized/bmcMaj.c.ll b/bench/abc/optimized/bmcMaj.c.ll index 5ae919dedfb..aa6b7166156 100644 --- a/bench/abc/optimized/bmcMaj.c.ll +++ b/bench/abc/optimized/bmcMaj.c.ll @@ -2177,7 +2177,7 @@ Vec_WecPush.exit: ; preds = %.Vec_IntGrow.exit10 92: ; preds = %22, %17 %93 = trunc nuw nsw i64 %indvars.iv58 to i32 - %94 = xor i32 %93, 1 + %94 = sub nuw nsw i32 1, %93 %95 = select i1 %.not, i32 0, i32 %94 %96 = sub nsw i64 %indvars.iv61, %indvars.iv58 %97 = zext nneg i32 %95 to i64 diff --git a/bench/abseil-cpp/optimized/cord_test.cc.ll b/bench/abseil-cpp/optimized/cord_test.cc.ll index 10ccff9747a..48e7b8fea39 100644 --- a/bench/abseil-cpp/optimized/cord_test.cc.ll +++ b/bench/abseil-cpp/optimized/cord_test.cc.ll @@ -93514,8 +93514,7 @@ if.then7.i.i: ; preds = %_ZN4absl10CordBuffe if.else12.i.i: ; preds = %if.then7.i.i %7 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.sroa.speculated.i.i, i1 true) - %sub.i7.i.i = xor i64 %7, 63 - %shl14.i.i = shl nuw nsw i64 1, %sub.i7.i.i + %shl14.i.i = lshr exact i64 -9223372036854775808, %7 br label %_ZN4absl10CordBuffer21CreateWithCustomLimitEmm.exit _ZN4absl10CordBuffer21CreateWithCustomLimitEmm.exit: ; preds = %cond.true, %if.else.i.i, %_ZN4absl10CordBuffer6IsPow2Em.exit.i.i, %if.then7.i.i, %if.else12.i.i diff --git a/bench/abseil-cpp/optimized/fastmath_test.cc.ll b/bench/abseil-cpp/optimized/fastmath_test.cc.ll index 06ae8773ccd..58fb5a77a61 100644 --- a/bench/abseil-cpp/optimized/fastmath_test.cc.ll +++ b/bench/abseil-cpp/optimized/fastmath_test.cc.ll @@ -81,7 +81,6 @@ $_ZTIN7testing8internal15TestFactoryBaseE = comdat any @_ZTIN12_GLOBAL__N_134FastMathTest_IntLog2FloorTest_TestE = internal constant { ptr, ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv120__si_class_type_infoE, i64 2), ptr @_ZTSN12_GLOBAL__N_134FastMathTest_IntLog2FloorTest_TestE, ptr @_ZTIN7testing4TestE }, align 8 @.str.8 = private unnamed_addr constant [2 x i8] c"0\00", align 1 @.str.16 = private unnamed_addr constant [2 x i8] c"i\00", align 1 -@.str.17 = private unnamed_addr constant [22 x i8] c"IntLog2Floor(i_pow_2)\00", align 1 @.str.18 = private unnamed_addr constant [37 x i8] c"static_cast(std::log2(i_pow_2))\00", align 1 @.str.19 = private unnamed_addr constant [16 x i8] c"IntLog2Floor(y)\00", align 1 @.str.20 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @@ -306,7 +305,6 @@ _ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integra %ref.tmp92 = alloca %"class.testing::internal::AssertHelper", align 8 %i = alloca i32, align 4 %gtest_ar103 = alloca %"class.testing::AssertionResult", align 8 - %ref.tmp104 = alloca i32, align 4 %ref.tmp111 = alloca %"class.testing::Message", align 8 %ref.tmp113 = alloca %"class.testing::internal::AssertHelper", align 8 %gtest_ar124 = alloca %"class.testing::AssertionResult", align 8 @@ -782,21 +780,7 @@ for.body: ; preds = %_ZN7testing15Assert %storemerge218 = phi i32 [ 0, %_ZN7testing15AssertionResultD2Ev.exit132 ], [ %inc, %for.inc171 ] %sh_prom = zext nneg i32 %storemerge218 to i64 %shl = shl nuw i64 1, %sh_prom - %cast.i.i.i = sub i32 63, %storemerge218 - %sub.i = xor i32 %cast.i.i.i, 63 - store i32 %sub.i, ptr %ref.tmp104, align 4 - %cmp.i.i134 = icmp eq i32 %storemerge218, %sub.i - br i1 %cmp.i.i134, label %if.then.i.i136, label %if.end.i.i135 - -if.then.i.i136: ; preds = %for.body call void @_ZN7testing16AssertionSuccessEv(ptr nonnull sret(%"class.testing::AssertionResult") align 8 %gtest_ar103) - br label %_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit137 - -if.end.i.i135: ; preds = %for.body - call void @_ZN7testing8internal18CmpHelperEQFailureIiiEENS_15AssertionResultEPKcS4_RKT_RKT0_(ptr nonnull sret(%"class.testing::AssertionResult") align 8 %gtest_ar103, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, ptr noundef nonnull align 4 dereferenceable(4) %i, ptr noundef nonnull align 4 dereferenceable(4) %ref.tmp104) - br label %_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit137 - -_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit137: ; preds = %if.then.i.i136, %if.end.i.i135 %50 = load i8, ptr %gtest_ar103, align 8 %tobool.i138 = trunc i8 %50 to i1 br i1 %tobool.i138, label %if.end122, label %if.else110 @@ -806,7 +790,7 @@ lpad106: ; preds = %if.else110 cleanup br label %eh.resume -if.else110: ; preds = %_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit137 +if.else110: ; preds = %for.body invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp111) to label %invoke.cont112 unwind label %lpad106 @@ -873,7 +857,7 @@ _ZN7testing7MessageD2Ev.exit154: ; preds = %ehcleanup121, %_ZNK store ptr null, ptr %ref.tmp111, align 8 br label %eh.resume -if.end122: ; preds = %_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit137, %_ZN7testing7MessageD2Ev.exit149 +if.end122: ; preds = %for.body, %_ZN7testing7MessageD2Ev.exit149 %59 = load ptr, ptr %message_.i.i139, align 8 %cmp.not.i.i156 = icmp eq ptr %59, null br i1 %cmp.not.i.i156, label %_ZN7testing15AssertionResultD2Ev.exit158, label %_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i157 @@ -1007,7 +991,7 @@ for.body148: ; preds = %for.body148.prehead %cmp.i185 = icmp ult i64 %or, 2 %73 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %or, i1 true) %cast.i.i.i186 = trunc nuw nsw i64 %73 to i32 - %sub.i187 = xor i32 %cast.i.i.i186, 63 + %sub.i187 = sub nuw nsw i32 63, %cast.i.i.i186 %cond.i188 = select i1 %cmp.i185, i32 0, i32 %sub.i187 store i32 %cond.i188, ptr %ref.tmp151, align 4 %74 = load i32, ptr %i, align 4, !noalias !10 diff --git a/bench/abseil-cpp/optimized/generate_real_test.cc.ll b/bench/abseil-cpp/optimized/generate_real_test.cc.ll index 8ca216773b4..6d64c1a925f 100644 --- a/bench/abseil-cpp/optimized/generate_real_test.cc.ll +++ b/bench/abseil-cpp/optimized/generate_real_test.cc.ll @@ -21011,11 +21011,11 @@ _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEP _ZN7testing15AssertionResultD2Ev.exit1271: ; preds = %if.end971, %_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1270 store ptr null, ptr %message_.i1268, align 8 %message_.i.i1278 = getelementptr inbounds nuw i8, ptr %gtest_ar973, i64 8 - %message_.i.i1314 = getelementptr inbounds nuw i8, ptr %gtest_ar999, i64 8 + %message_.i.i1315 = getelementptr inbounds nuw i8, ptr %gtest_ar999, i64 8 br label %for.body -for.body: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1271, %_ZN7testing15AssertionResultD2Ev.exit1333 - %indvars.iv = phi i64 [ 1, %_ZN7testing15AssertionResultD2Ev.exit1271 ], [ %indvars.iv.next, %_ZN7testing15AssertionResultD2Ev.exit1333 ] +for.body: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1271, %_ZN7testing15AssertionResultD2Ev.exit1334 + %indvars.iv = phi i64 [ 1, %_ZN7testing15AssertionResultD2Ev.exit1271 ], [ %indvars.iv.next, %_ZN7testing15AssertionResultD2Ev.exit1334 ] %461 = trunc nuw nsw i64 %indvars.iv to i32 %conv975 = uitofp nneg i32 %461 to double %mul976 = fmul double %conv975, 0x3C00000000000000 @@ -21023,10 +21023,10 @@ for.body: ; preds = %_ZN7testing15Assert %462 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %indvars.iv, i1 true) %shl.i.i = shl i64 %indvars.iv, %462 %shr.i.i = lshr i64 %shl.i.i, 11 - %sub.i.i = shl nuw nsw i64 %462, 52 + %463 = shl nuw nsw i64 %462, 52 %and4.i.i = and i64 %shr.i.i, 4503599627370495 - %463 = or disjoint i64 %and4.i.i, %sub.i.i - %or5.i.i = xor i64 %463, 4607182418800017408 + %reass.sub = sub nsw i64 %and4.i.i, %463 + %or5.i.i = add nsw i64 %reass.sub, 4607182418800017408 %464 = bitcast i64 %or5.i.i to double store i64 %or5.i.i, ptr %ref.tmp977, align 8 %cmp.i.i1272 = fcmp oeq double %mul976, %464 @@ -21138,49 +21138,47 @@ _ZN7testing15AssertionResultD2Ev.exit1297: ; preds = %if.end997, %_ZNKSt1 %476 = load double, ptr %e_minus, align 8 %mul1002 = fmul double %476, %conv975 store double %mul1002, ptr %ref.tmp1000, align 8 - %477 = or disjoint i64 %sub.i.i, -9223372036854775808 - %478 = or disjoint i64 %and4.i.i, %477 - %or5.i.i1305 = xor i64 %478, 4607182418800017408 - %479 = bitcast i64 %or5.i.i1305 to double - store i64 %or5.i.i1305, ptr %ref.tmp1003, align 8 - %cmp.i.i1306 = fcmp oeq double %mul1002, %479 - br i1 %cmp.i.i1306, label %if.then.i.i1308, label %if.end.i.i1307 - -if.then.i.i1308: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1297 + %or5.i.i1306 = add nsw i64 %reass.sub, -4616189618054758400 + %477 = bitcast i64 %or5.i.i1306 to double + store i64 %or5.i.i1306, ptr %ref.tmp1003, align 8 + %cmp.i.i1307 = fcmp oeq double %mul1002, %477 + br i1 %cmp.i.i1307, label %if.then.i.i1309, label %if.end.i.i1308 + +if.then.i.i1309: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1297 call void @_ZN7testing16AssertionSuccessEv(ptr nonnull sret(%"class.testing::AssertionResult") align 8 %gtest_ar999) - br label %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1309 + br label %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1310 -if.end.i.i1307: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1297 +if.end.i.i1308: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1297 call void @_ZN7testing8internal18CmpHelperEQFailureIddEENS_15AssertionResultEPKcS4_RKT_RKT0_(ptr nonnull sret(%"class.testing::AssertionResult") align 8 %gtest_ar999, ptr noundef nonnull @.str.198, ptr noundef nonnull @.str.199, ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1000, ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1003) - br label %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1309 + br label %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1310 -_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1309: ; preds = %if.then.i.i1308, %if.end.i.i1307 - %480 = load i8, ptr %gtest_ar999, align 8 - %tobool.i1310 = trunc i8 %480 to i1 - br i1 %tobool.i1310, label %if.end1023, label %if.else1008 +_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1310: ; preds = %if.then.i.i1309, %if.end.i.i1308 + %478 = load i8, ptr %gtest_ar999, align 8 + %tobool.i1311 = trunc i8 %478 to i1 + br i1 %tobool.i1311, label %if.end1023, label %if.else1008 -if.else1008: ; preds = %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1309 +if.else1008: ; preds = %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1310 invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1009) to label %invoke.cont1011 unwind label %lpad1010 invoke.cont1011: ; preds = %if.else1008 - %481 = load ptr, ptr %ref.tmp1009, align 8 - %add.ptr.i1311 = getelementptr inbounds nuw i8, ptr %481, i64 16 - %call2.i1312 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %add.ptr.i1311, i32 noundef %461) + %479 = load ptr, ptr %ref.tmp1009, align 8 + %add.ptr.i1312 = getelementptr inbounds nuw i8, ptr %479, i64 16 + %call2.i1313 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %add.ptr.i1312, i32 noundef %461) to label %invoke.cont1013 unwind label %lpad1012 invoke.cont1013: ; preds = %invoke.cont1011 - %482 = load ptr, ptr %message_.i.i1314, align 8 - %cmp.i.i.not.i.i1315 = icmp eq ptr %482, null - br i1 %cmp.i.i.not.i.i1315, label %invoke.cont1016, label %cond.true.i.i1316 + %480 = load ptr, ptr %message_.i.i1315, align 8 + %cmp.i.i.not.i.i1316 = icmp eq ptr %480, null + br i1 %cmp.i.i.not.i.i1316, label %invoke.cont1016, label %cond.true.i.i1317 -cond.true.i.i1316: ; preds = %invoke.cont1013 - %call4.i.i1317 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %482) #16 +cond.true.i.i1317: ; preds = %invoke.cont1013 + %call4.i.i1318 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %480) #16 br label %invoke.cont1016 -invoke.cont1016: ; preds = %cond.true.i.i1316, %invoke.cont1013 - %cond.i.i1318 = phi ptr [ %call4.i.i1317, %cond.true.i.i1316 ], [ @.str.49, %invoke.cont1013 ] - invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1015, i32 noundef 1, ptr noundef nonnull @.str.1, i32 noundef 411, ptr noundef %cond.i.i1318) +invoke.cont1016: ; preds = %cond.true.i.i1317, %invoke.cont1013 + %cond.i.i1319 = phi ptr [ %call4.i.i1318, %cond.true.i.i1317 ], [ @.str.49, %invoke.cont1013 ] + invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1015, i32 noundef 1, ptr noundef nonnull @.str.1, i32 noundef 411, ptr noundef %cond.i.i1319) to label %invoke.cont1018 unwind label %lpad1012 invoke.cont1018: ; preds = %invoke.cont1016 @@ -21189,76 +21187,76 @@ invoke.cont1018: ; preds = %invoke.cont1016 invoke.cont1020: ; preds = %invoke.cont1018 call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1015) #16 - %483 = load ptr, ptr %ref.tmp1009, align 8 - %cmp.not.i.i1320 = icmp eq ptr %483, null - br i1 %cmp.not.i.i1320, label %_ZN7testing7MessageD2Ev.exit1324, label %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1321 - -_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1321: ; preds = %invoke.cont1020 - %vtable.i.i.i1322 = load ptr, ptr %483, align 8 - %vfn.i.i.i1323 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i1322, i64 8 - %484 = load ptr, ptr %vfn.i.i.i1323, align 8 - call void %484(ptr noundef nonnull align 8 dereferenceable(128) %483) #16 - br label %_ZN7testing7MessageD2Ev.exit1324 - -_ZN7testing7MessageD2Ev.exit1324: ; preds = %invoke.cont1020, %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1321 + %481 = load ptr, ptr %ref.tmp1009, align 8 + %cmp.not.i.i1321 = icmp eq ptr %481, null + br i1 %cmp.not.i.i1321, label %_ZN7testing7MessageD2Ev.exit1325, label %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1322 + +_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1322: ; preds = %invoke.cont1020 + %vtable.i.i.i1323 = load ptr, ptr %481, align 8 + %vfn.i.i.i1324 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i1323, i64 8 + %482 = load ptr, ptr %vfn.i.i.i1324, align 8 + call void %482(ptr noundef nonnull align 8 dereferenceable(128) %481) #16 + br label %_ZN7testing7MessageD2Ev.exit1325 + +_ZN7testing7MessageD2Ev.exit1325: ; preds = %invoke.cont1020, %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1322 store ptr null, ptr %ref.tmp1009, align 8 br label %if.end1023 lpad1010: ; preds = %if.else1008 - %485 = landingpad { ptr, i32 } + %483 = landingpad { ptr, i32 } cleanup br label %eh.resume lpad1012: ; preds = %invoke.cont1011, %invoke.cont1016 - %486 = landingpad { ptr, i32 } + %484 = landingpad { ptr, i32 } cleanup br label %ehcleanup1022 lpad1019: ; preds = %invoke.cont1018 - %487 = landingpad { ptr, i32 } + %485 = landingpad { ptr, i32 } cleanup call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %ref.tmp1015) #16 br label %ehcleanup1022 ehcleanup1022: ; preds = %lpad1019, %lpad1012 - %.pn146 = phi { ptr, i32 } [ %487, %lpad1019 ], [ %486, %lpad1012 ] - %488 = load ptr, ptr %ref.tmp1009, align 8 - %cmp.not.i.i1325 = icmp eq ptr %488, null - br i1 %cmp.not.i.i1325, label %_ZN7testing7MessageD2Ev.exit1329, label %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1326 - -_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1326: ; preds = %ehcleanup1022 - %vtable.i.i.i1327 = load ptr, ptr %488, align 8 - %vfn.i.i.i1328 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i1327, i64 8 - %489 = load ptr, ptr %vfn.i.i.i1328, align 8 - call void %489(ptr noundef nonnull align 8 dereferenceable(128) %488) #16 - br label %_ZN7testing7MessageD2Ev.exit1329 - -_ZN7testing7MessageD2Ev.exit1329: ; preds = %ehcleanup1022, %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1326 + %.pn146 = phi { ptr, i32 } [ %485, %lpad1019 ], [ %484, %lpad1012 ] + %486 = load ptr, ptr %ref.tmp1009, align 8 + %cmp.not.i.i1326 = icmp eq ptr %486, null + br i1 %cmp.not.i.i1326, label %_ZN7testing7MessageD2Ev.exit1330, label %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1327 + +_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1327: ; preds = %ehcleanup1022 + %vtable.i.i.i1328 = load ptr, ptr %486, align 8 + %vfn.i.i.i1329 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i1328, i64 8 + %487 = load ptr, ptr %vfn.i.i.i1329, align 8 + call void %487(ptr noundef nonnull align 8 dereferenceable(128) %486) #16 + br label %_ZN7testing7MessageD2Ev.exit1330 + +_ZN7testing7MessageD2Ev.exit1330: ; preds = %ehcleanup1022, %_ZNKSt14default_deleteINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1327 store ptr null, ptr %ref.tmp1009, align 8 br label %eh.resume -if.end1023: ; preds = %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1309, %_ZN7testing7MessageD2Ev.exit1324 - %490 = load ptr, ptr %message_.i.i1314, align 8 - %cmp.not.i.i1331 = icmp eq ptr %490, null - br i1 %cmp.not.i.i1331, label %_ZN7testing15AssertionResultD2Ev.exit1333, label %_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1332 +if.end1023: ; preds = %_ZN7testing8internal8EqHelper7CompareIddTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_.exit1310, %_ZN7testing7MessageD2Ev.exit1325 + %488 = load ptr, ptr %message_.i.i1315, align 8 + %cmp.not.i.i1332 = icmp eq ptr %488, null + br i1 %cmp.not.i.i1332, label %_ZN7testing15AssertionResultD2Ev.exit1334, label %_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1333 -_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1332: ; preds = %if.end1023 - call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %490) #16 - call void @_ZdlPv(ptr noundef nonnull %490) #15 - br label %_ZN7testing15AssertionResultD2Ev.exit1333 +_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1333: ; preds = %if.end1023 + call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %488) #16 + call void @_ZdlPv(ptr noundef nonnull %488) #15 + br label %_ZN7testing15AssertionResultD2Ev.exit1334 -_ZN7testing15AssertionResultD2Ev.exit1333: ; preds = %if.end1023, %_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1332 - store ptr null, ptr %message_.i.i1314, align 8 +_ZN7testing15AssertionResultD2Ev.exit1334: ; preds = %if.end1023, %_ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_.exit.i.i1333 + store ptr null, ptr %message_.i.i1315, align 8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 100 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !111 -for.end: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1333 +for.end: ; preds = %_ZN7testing15AssertionResultD2Ev.exit1334 ret void -eh.resume: ; preds = %lpad1010, %_ZN7testing7MessageD2Ev.exit1329, %lpad984, %_ZN7testing7MessageD2Ev.exit1293, %lpad960, %_ZN7testing7MessageD2Ev.exit1267, %lpad933, %_ZN7testing7MessageD2Ev.exit1244, %lpad907, %_ZN7testing7MessageD2Ev.exit1219, %lpad885, %_ZN7testing7MessageD2Ev.exit1195, %lpad864, %_ZN7testing7MessageD2Ev.exit1170, %lpad843, %_ZN7testing7MessageD2Ev.exit1145, %lpad822, %_ZN7testing7MessageD2Ev.exit1120, %lpad801, %_ZN7testing7MessageD2Ev.exit1095, %lpad780, %_ZN7testing7MessageD2Ev.exit1070, %lpad759, %_ZN7testing7MessageD2Ev.exit1045, %lpad738, %_ZN7testing7MessageD2Ev.exit1020, %lpad717, %_ZN7testing7MessageD2Ev.exit995, %lpad696, %_ZN7testing7MessageD2Ev.exit970, %lpad675, %_ZN7testing7MessageD2Ev.exit945, %lpad654, %_ZN7testing7MessageD2Ev.exit920, %lpad633, %_ZN7testing7MessageD2Ev.exit895, %lpad612, %_ZN7testing7MessageD2Ev.exit870, %lpad591, %_ZN7testing7MessageD2Ev.exit845, %lpad570, %_ZN7testing7MessageD2Ev.exit820, %lpad549, %_ZN7testing7MessageD2Ev.exit795, %lpad528, %_ZN7testing7MessageD2Ev.exit770, %lpad507, %_ZN7testing7MessageD2Ev.exit745, %lpad485, %_ZN7testing7MessageD2Ev.exit720, %lpad463, %_ZN7testing7MessageD2Ev.exit695, %lpad441, %_ZN7testing7MessageD2Ev.exit670, %lpad419, %_ZN7testing7MessageD2Ev.exit645, %lpad398, %_ZN7testing7MessageD2Ev.exit620, %lpad377, %_ZN7testing7MessageD2Ev.exit595, %lpad356, %_ZN7testing7MessageD2Ev.exit571, %lpad335, %_ZN7testing7MessageD2Ev.exit547, %lpad313, %_ZN7testing7MessageD2Ev.exit526, %lpad292, %_ZN7testing7MessageD2Ev.exit501, %lpad271, %_ZN7testing7MessageD2Ev.exit476, %lpad250, %_ZN7testing7MessageD2Ev.exit451, %lpad229, %_ZN7testing7MessageD2Ev.exit426, %lpad208, %_ZN7testing7MessageD2Ev.exit401, %lpad187, %_ZN7testing7MessageD2Ev.exit376, %lpad166, %_ZN7testing7MessageD2Ev.exit351, %lpad145, %_ZN7testing7MessageD2Ev.exit326, %lpad124, %_ZN7testing7MessageD2Ev.exit301, %lpad103, %_ZN7testing7MessageD2Ev.exit276, %lpad84, %_ZN7testing7MessageD2Ev.exit251, %lpad63, %_ZN7testing7MessageD2Ev.exit226, %lpad42, %_ZN7testing7MessageD2Ev.exit201, %lpad21, %_ZN7testing7MessageD2Ev.exit176, %lpad, %_ZN7testing7MessageD2Ev.exit154 - %gtest_ar999.sink = phi ptr [ %gtest_ar, %_ZN7testing7MessageD2Ev.exit154 ], [ %gtest_ar, %lpad ], [ %gtest_ar13, %_ZN7testing7MessageD2Ev.exit176 ], [ %gtest_ar13, %lpad21 ], [ %gtest_ar34, %_ZN7testing7MessageD2Ev.exit201 ], [ %gtest_ar34, %lpad42 ], [ %gtest_ar55, %_ZN7testing7MessageD2Ev.exit226 ], [ %gtest_ar55, %lpad63 ], [ %gtest_ar78, %_ZN7testing7MessageD2Ev.exit251 ], [ %gtest_ar78, %lpad84 ], [ %gtest_ar97, %_ZN7testing7MessageD2Ev.exit276 ], [ %gtest_ar97, %lpad103 ], [ %gtest_ar116, %_ZN7testing7MessageD2Ev.exit301 ], [ %gtest_ar116, %lpad124 ], [ %gtest_ar137, %_ZN7testing7MessageD2Ev.exit326 ], [ %gtest_ar137, %lpad145 ], [ %gtest_ar158, %_ZN7testing7MessageD2Ev.exit351 ], [ %gtest_ar158, %lpad166 ], [ %gtest_ar179, %_ZN7testing7MessageD2Ev.exit376 ], [ %gtest_ar179, %lpad187 ], [ %gtest_ar200, %_ZN7testing7MessageD2Ev.exit401 ], [ %gtest_ar200, %lpad208 ], [ %gtest_ar221, %_ZN7testing7MessageD2Ev.exit426 ], [ %gtest_ar221, %lpad229 ], [ %gtest_ar242, %_ZN7testing7MessageD2Ev.exit451 ], [ %gtest_ar242, %lpad250 ], [ %gtest_ar263, %_ZN7testing7MessageD2Ev.exit476 ], [ %gtest_ar263, %lpad271 ], [ %gtest_ar284, %_ZN7testing7MessageD2Ev.exit501 ], [ %gtest_ar284, %lpad292 ], [ %gtest_ar305, %_ZN7testing7MessageD2Ev.exit526 ], [ %gtest_ar305, %lpad313 ], [ %gtest_ar326, %_ZN7testing7MessageD2Ev.exit547 ], [ %gtest_ar326, %lpad335 ], [ %gtest_ar348, %_ZN7testing7MessageD2Ev.exit571 ], [ %gtest_ar348, %lpad356 ], [ %gtest_ar369, %_ZN7testing7MessageD2Ev.exit595 ], [ %gtest_ar369, %lpad377 ], [ %gtest_ar390, %_ZN7testing7MessageD2Ev.exit620 ], [ %gtest_ar390, %lpad398 ], [ %gtest_ar411, %_ZN7testing7MessageD2Ev.exit645 ], [ %gtest_ar411, %lpad419 ], [ %gtest_ar432, %_ZN7testing7MessageD2Ev.exit670 ], [ %gtest_ar432, %lpad441 ], [ %gtest_ar454, %_ZN7testing7MessageD2Ev.exit695 ], [ %gtest_ar454, %lpad463 ], [ %gtest_ar476, %_ZN7testing7MessageD2Ev.exit720 ], [ %gtest_ar476, %lpad485 ], [ %gtest_ar498, %_ZN7testing7MessageD2Ev.exit745 ], [ %gtest_ar498, %lpad507 ], [ %gtest_ar520, %_ZN7testing7MessageD2Ev.exit770 ], [ %gtest_ar520, %lpad528 ], [ %gtest_ar541, %_ZN7testing7MessageD2Ev.exit795 ], [ %gtest_ar541, %lpad549 ], [ %gtest_ar562, %_ZN7testing7MessageD2Ev.exit820 ], [ %gtest_ar562, %lpad570 ], [ %gtest_ar583, %_ZN7testing7MessageD2Ev.exit845 ], [ %gtest_ar583, %lpad591 ], [ %gtest_ar604, %_ZN7testing7MessageD2Ev.exit870 ], [ %gtest_ar604, %lpad612 ], [ %gtest_ar625, %_ZN7testing7MessageD2Ev.exit895 ], [ %gtest_ar625, %lpad633 ], [ %gtest_ar646, %_ZN7testing7MessageD2Ev.exit920 ], [ %gtest_ar646, %lpad654 ], [ %gtest_ar667, %_ZN7testing7MessageD2Ev.exit945 ], [ %gtest_ar667, %lpad675 ], [ %gtest_ar688, %_ZN7testing7MessageD2Ev.exit970 ], [ %gtest_ar688, %lpad696 ], [ %gtest_ar709, %_ZN7testing7MessageD2Ev.exit995 ], [ %gtest_ar709, %lpad717 ], [ %gtest_ar730, %_ZN7testing7MessageD2Ev.exit1020 ], [ %gtest_ar730, %lpad738 ], [ %gtest_ar751, %_ZN7testing7MessageD2Ev.exit1045 ], [ %gtest_ar751, %lpad759 ], [ %gtest_ar772, %_ZN7testing7MessageD2Ev.exit1070 ], [ %gtest_ar772, %lpad780 ], [ %gtest_ar793, %_ZN7testing7MessageD2Ev.exit1095 ], [ %gtest_ar793, %lpad801 ], [ %gtest_ar814, %_ZN7testing7MessageD2Ev.exit1120 ], [ %gtest_ar814, %lpad822 ], [ %gtest_ar835, %_ZN7testing7MessageD2Ev.exit1145 ], [ %gtest_ar835, %lpad843 ], [ %gtest_ar856, %_ZN7testing7MessageD2Ev.exit1170 ], [ %gtest_ar856, %lpad864 ], [ %gtest_ar877, %_ZN7testing7MessageD2Ev.exit1195 ], [ %gtest_ar877, %lpad885 ], [ %gtest_ar898, %_ZN7testing7MessageD2Ev.exit1219 ], [ %gtest_ar898, %lpad907 ], [ %gtest_ar920, %_ZN7testing7MessageD2Ev.exit1244 ], [ %gtest_ar920, %lpad933 ], [ %gtest_ar946, %_ZN7testing7MessageD2Ev.exit1267 ], [ %gtest_ar946, %lpad960 ], [ %gtest_ar973, %_ZN7testing7MessageD2Ev.exit1293 ], [ %gtest_ar973, %lpad984 ], [ %gtest_ar999, %_ZN7testing7MessageD2Ev.exit1329 ], [ %gtest_ar999, %lpad1010 ] - %.pn146.pn.pn = phi { ptr, i32 } [ %.pn, %_ZN7testing7MessageD2Ev.exit154 ], [ %4, %lpad ], [ %.pn8, %_ZN7testing7MessageD2Ev.exit176 ], [ %14, %lpad21 ], [ %.pn11, %_ZN7testing7MessageD2Ev.exit201 ], [ %24, %lpad42 ], [ %.pn14, %_ZN7testing7MessageD2Ev.exit226 ], [ %34, %lpad63 ], [ %.pn17, %_ZN7testing7MessageD2Ev.exit251 ], [ %44, %lpad84 ], [ %.pn20, %_ZN7testing7MessageD2Ev.exit276 ], [ %55, %lpad103 ], [ %.pn23, %_ZN7testing7MessageD2Ev.exit301 ], [ %65, %lpad124 ], [ %.pn26, %_ZN7testing7MessageD2Ev.exit326 ], [ %75, %lpad145 ], [ %.pn29, %_ZN7testing7MessageD2Ev.exit351 ], [ %85, %lpad166 ], [ %.pn32, %_ZN7testing7MessageD2Ev.exit376 ], [ %95, %lpad187 ], [ %.pn35, %_ZN7testing7MessageD2Ev.exit401 ], [ %105, %lpad208 ], [ %.pn38, %_ZN7testing7MessageD2Ev.exit426 ], [ %115, %lpad229 ], [ %.pn41, %_ZN7testing7MessageD2Ev.exit451 ], [ %125, %lpad250 ], [ %.pn44, %_ZN7testing7MessageD2Ev.exit476 ], [ %135, %lpad271 ], [ %.pn47, %_ZN7testing7MessageD2Ev.exit501 ], [ %145, %lpad292 ], [ %.pn50, %_ZN7testing7MessageD2Ev.exit526 ], [ %155, %lpad313 ], [ %.pn53, %_ZN7testing7MessageD2Ev.exit547 ], [ %165, %lpad335 ], [ %.pn56, %_ZN7testing7MessageD2Ev.exit571 ], [ %175, %lpad356 ], [ %.pn59, %_ZN7testing7MessageD2Ev.exit595 ], [ %185, %lpad377 ], [ %.pn62, %_ZN7testing7MessageD2Ev.exit620 ], [ %195, %lpad398 ], [ %.pn65, %_ZN7testing7MessageD2Ev.exit645 ], [ %205, %lpad419 ], [ %.pn68, %_ZN7testing7MessageD2Ev.exit670 ], [ %215, %lpad441 ], [ %.pn71, %_ZN7testing7MessageD2Ev.exit695 ], [ %225, %lpad463 ], [ %.pn74, %_ZN7testing7MessageD2Ev.exit720 ], [ %235, %lpad485 ], [ %.pn77, %_ZN7testing7MessageD2Ev.exit745 ], [ %245, %lpad507 ], [ %.pn80, %_ZN7testing7MessageD2Ev.exit770 ], [ %255, %lpad528 ], [ %.pn83, %_ZN7testing7MessageD2Ev.exit795 ], [ %265, %lpad549 ], [ %.pn86, %_ZN7testing7MessageD2Ev.exit820 ], [ %275, %lpad570 ], [ %.pn89, %_ZN7testing7MessageD2Ev.exit845 ], [ %285, %lpad591 ], [ %.pn92, %_ZN7testing7MessageD2Ev.exit870 ], [ %295, %lpad612 ], [ %.pn95, %_ZN7testing7MessageD2Ev.exit895 ], [ %305, %lpad633 ], [ %.pn98, %_ZN7testing7MessageD2Ev.exit920 ], [ %315, %lpad654 ], [ %.pn101, %_ZN7testing7MessageD2Ev.exit945 ], [ %325, %lpad675 ], [ %.pn104, %_ZN7testing7MessageD2Ev.exit970 ], [ %335, %lpad696 ], [ %.pn107, %_ZN7testing7MessageD2Ev.exit995 ], [ %345, %lpad717 ], [ %.pn110, %_ZN7testing7MessageD2Ev.exit1020 ], [ %355, %lpad738 ], [ %.pn113, %_ZN7testing7MessageD2Ev.exit1045 ], [ %365, %lpad759 ], [ %.pn116, %_ZN7testing7MessageD2Ev.exit1070 ], [ %375, %lpad780 ], [ %.pn119, %_ZN7testing7MessageD2Ev.exit1095 ], [ %385, %lpad801 ], [ %.pn122, %_ZN7testing7MessageD2Ev.exit1120 ], [ %395, %lpad822 ], [ %.pn125, %_ZN7testing7MessageD2Ev.exit1145 ], [ %405, %lpad843 ], [ %.pn128, %_ZN7testing7MessageD2Ev.exit1170 ], [ %415, %lpad864 ], [ %.pn131, %_ZN7testing7MessageD2Ev.exit1195 ], [ %425, %lpad885 ], [ %.pn134, %_ZN7testing7MessageD2Ev.exit1219 ], [ %435, %lpad907 ], [ %.pn137, %_ZN7testing7MessageD2Ev.exit1244 ], [ %445, %lpad933 ], [ %.pn140, %_ZN7testing7MessageD2Ev.exit1267 ], [ %455, %lpad960 ], [ %.pn143, %_ZN7testing7MessageD2Ev.exit1293 ], [ %470, %lpad984 ], [ %.pn146, %_ZN7testing7MessageD2Ev.exit1329 ], [ %485, %lpad1010 ] +eh.resume: ; preds = %lpad1010, %_ZN7testing7MessageD2Ev.exit1330, %lpad984, %_ZN7testing7MessageD2Ev.exit1293, %lpad960, %_ZN7testing7MessageD2Ev.exit1267, %lpad933, %_ZN7testing7MessageD2Ev.exit1244, %lpad907, %_ZN7testing7MessageD2Ev.exit1219, %lpad885, %_ZN7testing7MessageD2Ev.exit1195, %lpad864, %_ZN7testing7MessageD2Ev.exit1170, %lpad843, %_ZN7testing7MessageD2Ev.exit1145, %lpad822, %_ZN7testing7MessageD2Ev.exit1120, %lpad801, %_ZN7testing7MessageD2Ev.exit1095, %lpad780, %_ZN7testing7MessageD2Ev.exit1070, %lpad759, %_ZN7testing7MessageD2Ev.exit1045, %lpad738, %_ZN7testing7MessageD2Ev.exit1020, %lpad717, %_ZN7testing7MessageD2Ev.exit995, %lpad696, %_ZN7testing7MessageD2Ev.exit970, %lpad675, %_ZN7testing7MessageD2Ev.exit945, %lpad654, %_ZN7testing7MessageD2Ev.exit920, %lpad633, %_ZN7testing7MessageD2Ev.exit895, %lpad612, %_ZN7testing7MessageD2Ev.exit870, %lpad591, %_ZN7testing7MessageD2Ev.exit845, %lpad570, %_ZN7testing7MessageD2Ev.exit820, %lpad549, %_ZN7testing7MessageD2Ev.exit795, %lpad528, %_ZN7testing7MessageD2Ev.exit770, %lpad507, %_ZN7testing7MessageD2Ev.exit745, %lpad485, %_ZN7testing7MessageD2Ev.exit720, %lpad463, %_ZN7testing7MessageD2Ev.exit695, %lpad441, %_ZN7testing7MessageD2Ev.exit670, %lpad419, %_ZN7testing7MessageD2Ev.exit645, %lpad398, %_ZN7testing7MessageD2Ev.exit620, %lpad377, %_ZN7testing7MessageD2Ev.exit595, %lpad356, %_ZN7testing7MessageD2Ev.exit571, %lpad335, %_ZN7testing7MessageD2Ev.exit547, %lpad313, %_ZN7testing7MessageD2Ev.exit526, %lpad292, %_ZN7testing7MessageD2Ev.exit501, %lpad271, %_ZN7testing7MessageD2Ev.exit476, %lpad250, %_ZN7testing7MessageD2Ev.exit451, %lpad229, %_ZN7testing7MessageD2Ev.exit426, %lpad208, %_ZN7testing7MessageD2Ev.exit401, %lpad187, %_ZN7testing7MessageD2Ev.exit376, %lpad166, %_ZN7testing7MessageD2Ev.exit351, %lpad145, %_ZN7testing7MessageD2Ev.exit326, %lpad124, %_ZN7testing7MessageD2Ev.exit301, %lpad103, %_ZN7testing7MessageD2Ev.exit276, %lpad84, %_ZN7testing7MessageD2Ev.exit251, %lpad63, %_ZN7testing7MessageD2Ev.exit226, %lpad42, %_ZN7testing7MessageD2Ev.exit201, %lpad21, %_ZN7testing7MessageD2Ev.exit176, %lpad, %_ZN7testing7MessageD2Ev.exit154 + %gtest_ar999.sink = phi ptr [ %gtest_ar, %_ZN7testing7MessageD2Ev.exit154 ], [ %gtest_ar, %lpad ], [ %gtest_ar13, %_ZN7testing7MessageD2Ev.exit176 ], [ %gtest_ar13, %lpad21 ], [ %gtest_ar34, %_ZN7testing7MessageD2Ev.exit201 ], [ %gtest_ar34, %lpad42 ], [ %gtest_ar55, %_ZN7testing7MessageD2Ev.exit226 ], [ %gtest_ar55, %lpad63 ], [ %gtest_ar78, %_ZN7testing7MessageD2Ev.exit251 ], [ %gtest_ar78, %lpad84 ], [ %gtest_ar97, %_ZN7testing7MessageD2Ev.exit276 ], [ %gtest_ar97, %lpad103 ], [ %gtest_ar116, %_ZN7testing7MessageD2Ev.exit301 ], [ %gtest_ar116, %lpad124 ], [ %gtest_ar137, %_ZN7testing7MessageD2Ev.exit326 ], [ %gtest_ar137, %lpad145 ], [ %gtest_ar158, %_ZN7testing7MessageD2Ev.exit351 ], [ %gtest_ar158, %lpad166 ], [ %gtest_ar179, %_ZN7testing7MessageD2Ev.exit376 ], [ %gtest_ar179, %lpad187 ], [ %gtest_ar200, %_ZN7testing7MessageD2Ev.exit401 ], [ %gtest_ar200, %lpad208 ], [ %gtest_ar221, %_ZN7testing7MessageD2Ev.exit426 ], [ %gtest_ar221, %lpad229 ], [ %gtest_ar242, %_ZN7testing7MessageD2Ev.exit451 ], [ %gtest_ar242, %lpad250 ], [ %gtest_ar263, %_ZN7testing7MessageD2Ev.exit476 ], [ %gtest_ar263, %lpad271 ], [ %gtest_ar284, %_ZN7testing7MessageD2Ev.exit501 ], [ %gtest_ar284, %lpad292 ], [ %gtest_ar305, %_ZN7testing7MessageD2Ev.exit526 ], [ %gtest_ar305, %lpad313 ], [ %gtest_ar326, %_ZN7testing7MessageD2Ev.exit547 ], [ %gtest_ar326, %lpad335 ], [ %gtest_ar348, %_ZN7testing7MessageD2Ev.exit571 ], [ %gtest_ar348, %lpad356 ], [ %gtest_ar369, %_ZN7testing7MessageD2Ev.exit595 ], [ %gtest_ar369, %lpad377 ], [ %gtest_ar390, %_ZN7testing7MessageD2Ev.exit620 ], [ %gtest_ar390, %lpad398 ], [ %gtest_ar411, %_ZN7testing7MessageD2Ev.exit645 ], [ %gtest_ar411, %lpad419 ], [ %gtest_ar432, %_ZN7testing7MessageD2Ev.exit670 ], [ %gtest_ar432, %lpad441 ], [ %gtest_ar454, %_ZN7testing7MessageD2Ev.exit695 ], [ %gtest_ar454, %lpad463 ], [ %gtest_ar476, %_ZN7testing7MessageD2Ev.exit720 ], [ %gtest_ar476, %lpad485 ], [ %gtest_ar498, %_ZN7testing7MessageD2Ev.exit745 ], [ %gtest_ar498, %lpad507 ], [ %gtest_ar520, %_ZN7testing7MessageD2Ev.exit770 ], [ %gtest_ar520, %lpad528 ], [ %gtest_ar541, %_ZN7testing7MessageD2Ev.exit795 ], [ %gtest_ar541, %lpad549 ], [ %gtest_ar562, %_ZN7testing7MessageD2Ev.exit820 ], [ %gtest_ar562, %lpad570 ], [ %gtest_ar583, %_ZN7testing7MessageD2Ev.exit845 ], [ %gtest_ar583, %lpad591 ], [ %gtest_ar604, %_ZN7testing7MessageD2Ev.exit870 ], [ %gtest_ar604, %lpad612 ], [ %gtest_ar625, %_ZN7testing7MessageD2Ev.exit895 ], [ %gtest_ar625, %lpad633 ], [ %gtest_ar646, %_ZN7testing7MessageD2Ev.exit920 ], [ %gtest_ar646, %lpad654 ], [ %gtest_ar667, %_ZN7testing7MessageD2Ev.exit945 ], [ %gtest_ar667, %lpad675 ], [ %gtest_ar688, %_ZN7testing7MessageD2Ev.exit970 ], [ %gtest_ar688, %lpad696 ], [ %gtest_ar709, %_ZN7testing7MessageD2Ev.exit995 ], [ %gtest_ar709, %lpad717 ], [ %gtest_ar730, %_ZN7testing7MessageD2Ev.exit1020 ], [ %gtest_ar730, %lpad738 ], [ %gtest_ar751, %_ZN7testing7MessageD2Ev.exit1045 ], [ %gtest_ar751, %lpad759 ], [ %gtest_ar772, %_ZN7testing7MessageD2Ev.exit1070 ], [ %gtest_ar772, %lpad780 ], [ %gtest_ar793, %_ZN7testing7MessageD2Ev.exit1095 ], [ %gtest_ar793, %lpad801 ], [ %gtest_ar814, %_ZN7testing7MessageD2Ev.exit1120 ], [ %gtest_ar814, %lpad822 ], [ %gtest_ar835, %_ZN7testing7MessageD2Ev.exit1145 ], [ %gtest_ar835, %lpad843 ], [ %gtest_ar856, %_ZN7testing7MessageD2Ev.exit1170 ], [ %gtest_ar856, %lpad864 ], [ %gtest_ar877, %_ZN7testing7MessageD2Ev.exit1195 ], [ %gtest_ar877, %lpad885 ], [ %gtest_ar898, %_ZN7testing7MessageD2Ev.exit1219 ], [ %gtest_ar898, %lpad907 ], [ %gtest_ar920, %_ZN7testing7MessageD2Ev.exit1244 ], [ %gtest_ar920, %lpad933 ], [ %gtest_ar946, %_ZN7testing7MessageD2Ev.exit1267 ], [ %gtest_ar946, %lpad960 ], [ %gtest_ar973, %_ZN7testing7MessageD2Ev.exit1293 ], [ %gtest_ar973, %lpad984 ], [ %gtest_ar999, %_ZN7testing7MessageD2Ev.exit1330 ], [ %gtest_ar999, %lpad1010 ] + %.pn146.pn.pn = phi { ptr, i32 } [ %.pn, %_ZN7testing7MessageD2Ev.exit154 ], [ %4, %lpad ], [ %.pn8, %_ZN7testing7MessageD2Ev.exit176 ], [ %14, %lpad21 ], [ %.pn11, %_ZN7testing7MessageD2Ev.exit201 ], [ %24, %lpad42 ], [ %.pn14, %_ZN7testing7MessageD2Ev.exit226 ], [ %34, %lpad63 ], [ %.pn17, %_ZN7testing7MessageD2Ev.exit251 ], [ %44, %lpad84 ], [ %.pn20, %_ZN7testing7MessageD2Ev.exit276 ], [ %55, %lpad103 ], [ %.pn23, %_ZN7testing7MessageD2Ev.exit301 ], [ %65, %lpad124 ], [ %.pn26, %_ZN7testing7MessageD2Ev.exit326 ], [ %75, %lpad145 ], [ %.pn29, %_ZN7testing7MessageD2Ev.exit351 ], [ %85, %lpad166 ], [ %.pn32, %_ZN7testing7MessageD2Ev.exit376 ], [ %95, %lpad187 ], [ %.pn35, %_ZN7testing7MessageD2Ev.exit401 ], [ %105, %lpad208 ], [ %.pn38, %_ZN7testing7MessageD2Ev.exit426 ], [ %115, %lpad229 ], [ %.pn41, %_ZN7testing7MessageD2Ev.exit451 ], [ %125, %lpad250 ], [ %.pn44, %_ZN7testing7MessageD2Ev.exit476 ], [ %135, %lpad271 ], [ %.pn47, %_ZN7testing7MessageD2Ev.exit501 ], [ %145, %lpad292 ], [ %.pn50, %_ZN7testing7MessageD2Ev.exit526 ], [ %155, %lpad313 ], [ %.pn53, %_ZN7testing7MessageD2Ev.exit547 ], [ %165, %lpad335 ], [ %.pn56, %_ZN7testing7MessageD2Ev.exit571 ], [ %175, %lpad356 ], [ %.pn59, %_ZN7testing7MessageD2Ev.exit595 ], [ %185, %lpad377 ], [ %.pn62, %_ZN7testing7MessageD2Ev.exit620 ], [ %195, %lpad398 ], [ %.pn65, %_ZN7testing7MessageD2Ev.exit645 ], [ %205, %lpad419 ], [ %.pn68, %_ZN7testing7MessageD2Ev.exit670 ], [ %215, %lpad441 ], [ %.pn71, %_ZN7testing7MessageD2Ev.exit695 ], [ %225, %lpad463 ], [ %.pn74, %_ZN7testing7MessageD2Ev.exit720 ], [ %235, %lpad485 ], [ %.pn77, %_ZN7testing7MessageD2Ev.exit745 ], [ %245, %lpad507 ], [ %.pn80, %_ZN7testing7MessageD2Ev.exit770 ], [ %255, %lpad528 ], [ %.pn83, %_ZN7testing7MessageD2Ev.exit795 ], [ %265, %lpad549 ], [ %.pn86, %_ZN7testing7MessageD2Ev.exit820 ], [ %275, %lpad570 ], [ %.pn89, %_ZN7testing7MessageD2Ev.exit845 ], [ %285, %lpad591 ], [ %.pn92, %_ZN7testing7MessageD2Ev.exit870 ], [ %295, %lpad612 ], [ %.pn95, %_ZN7testing7MessageD2Ev.exit895 ], [ %305, %lpad633 ], [ %.pn98, %_ZN7testing7MessageD2Ev.exit920 ], [ %315, %lpad654 ], [ %.pn101, %_ZN7testing7MessageD2Ev.exit945 ], [ %325, %lpad675 ], [ %.pn104, %_ZN7testing7MessageD2Ev.exit970 ], [ %335, %lpad696 ], [ %.pn107, %_ZN7testing7MessageD2Ev.exit995 ], [ %345, %lpad717 ], [ %.pn110, %_ZN7testing7MessageD2Ev.exit1020 ], [ %355, %lpad738 ], [ %.pn113, %_ZN7testing7MessageD2Ev.exit1045 ], [ %365, %lpad759 ], [ %.pn116, %_ZN7testing7MessageD2Ev.exit1070 ], [ %375, %lpad780 ], [ %.pn119, %_ZN7testing7MessageD2Ev.exit1095 ], [ %385, %lpad801 ], [ %.pn122, %_ZN7testing7MessageD2Ev.exit1120 ], [ %395, %lpad822 ], [ %.pn125, %_ZN7testing7MessageD2Ev.exit1145 ], [ %405, %lpad843 ], [ %.pn128, %_ZN7testing7MessageD2Ev.exit1170 ], [ %415, %lpad864 ], [ %.pn131, %_ZN7testing7MessageD2Ev.exit1195 ], [ %425, %lpad885 ], [ %.pn134, %_ZN7testing7MessageD2Ev.exit1219 ], [ %435, %lpad907 ], [ %.pn137, %_ZN7testing7MessageD2Ev.exit1244 ], [ %445, %lpad933 ], [ %.pn140, %_ZN7testing7MessageD2Ev.exit1267 ], [ %455, %lpad960 ], [ %.pn143, %_ZN7testing7MessageD2Ev.exit1293 ], [ %470, %lpad984 ], [ %.pn146, %_ZN7testing7MessageD2Ev.exit1330 ], [ %483, %lpad1010 ] call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %gtest_ar999.sink) #16 resume { ptr, i32 } %.pn146.pn.pn } diff --git a/bench/actix-rs/optimized/19s5ghr2x6s6bmh4.ll b/bench/actix-rs/optimized/19s5ghr2x6s6bmh4.ll index 00b48a6b66a..3459efa6a9a 100644 --- a/bench/actix-rs/optimized/19s5ghr2x6s6bmh4.ll +++ b/bench/actix-rs/optimized/19s5ghr2x6s6bmh4.ll @@ -1430,44 +1430,43 @@ define hidden void @"_ZN68_$LT$sha1..Sha1Core$u20$as$u20$digest..core_api..Fixed ._crit_edge: ; preds = %3 %22 = getelementptr i8, ptr %1, i64 %12 %scevgep = getelementptr i8, ptr %22, i64 1 - %23 = xor i64 %12, 63 + %23 = sub nuw nsw i64 63, %12 tail call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 0, i64 %23, i1 false), !noalias !197 - %24 = xor i64 %12, 56 - %25 = icmp samesign ult i64 %24, 8 - br i1 %25, label %._crit_edge.thread, label %34 + %24 = icmp samesign ugt i8 %11, 55 + br i1 %24, label %._crit_edge.thread, label %33 ._crit_edge.thread: ; preds = %3, %._crit_edge call void @_ZN4sha18compress8compress17hed9866f5faa45a82E(ptr noalias noundef nonnull align 4 dereferenceable(20) %9, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1) call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !198 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4) call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !199 - %26 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %26, align 8, !noalias !199 + %25 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %25, align 8, !noalias !199 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !199 - store ptr %26, ptr %6, align 8, !noalias !199 + store ptr %25, ptr %6, align 8, !noalias !199 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !199 store ptr %4, ptr %5, align 8, !noalias !199 - %27 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %27, align 8, !noalias !199 - %28 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %28, align 8, !noalias !199 - invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17ha20776bb00c0d3f0E.llvm.15740990321789950213"(ptr noundef nonnull %7, ptr noundef nonnull %26, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5) - to label %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17ha7979026d57d41b4E.exit" unwind label %29, !noalias !199 - -29: ; preds = %._crit_edge.thread - %30 = landingpad { ptr, i32 } + %26 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %26, align 8, !noalias !199 + %27 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %27, align 8, !noalias !199 + invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17ha20776bb00c0d3f0E.llvm.15740990321789950213"(ptr noundef nonnull %7, ptr noundef nonnull %25, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5) + to label %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17ha7979026d57d41b4E.exit" unwind label %28, !noalias !199 + +28: ; preds = %._crit_edge.thread + %29 = landingpad { ptr, i32 } cleanup invoke void @"_ZN82_$LT$generic_array..ArrayBuilder$LT$T$C$N$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h78b202b13be7625aE.llvm.14998522591088738574"(ptr noalias noundef nonnull align 8 dereferenceable(72) %7) - to label %"_ZN4core3ptr403drop_in_place$LT$generic_array..ArrayBuilder$LT$u8$C$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$GT$$GT$17hf063487a19fdc01fE.exit.i" unwind label %31, !noalias !199 + to label %"_ZN4core3ptr403drop_in_place$LT$generic_array..ArrayBuilder$LT$u8$C$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$GT$$GT$17hf063487a19fdc01fE.exit.i" unwind label %30, !noalias !199 -31: ; preds = %29 - %32 = landingpad { ptr, i32 } +30: ; preds = %28 + %31 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #38, !noalias !199 unreachable -"_ZN4core3ptr403drop_in_place$LT$generic_array..ArrayBuilder$LT$u8$C$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$GT$$GT$17hf063487a19fdc01fE.exit.i": ; preds = %29 - resume { ptr, i32 } %30 +"_ZN4core3ptr403drop_in_place$LT$generic_array..ArrayBuilder$LT$u8$C$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$GT$$GT$17hf063487a19fdc01fE.exit.i": ; preds = %28 + resume { ptr, i32 } %29 "_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17ha7979026d57d41b4E.exit": ; preds = %._crit_edge.thread call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5), !noalias !199 @@ -1475,37 +1474,37 @@ define hidden void @"_ZN68_$LT$sha1..Sha1Core$u20$as$u20$digest..core_api..Fixed call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !197 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !199 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4) - %33 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %19, ptr %33, align 1, !alias.scope !202, !noalias !206 + %32 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %19, ptr %32, align 1, !alias.scope !202, !noalias !206 call void @_ZN4sha18compress8compress17hed9866f5faa45a82E(ptr noalias noundef nonnull align 4 dereferenceable(20) %9, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !198 br label %_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit -34: ; preds = %._crit_edge - %35 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %19, ptr %35, align 1, !alias.scope !208, !noalias !212 +33: ; preds = %._crit_edge + %34 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %19, ptr %34, align 1, !alias.scope !208, !noalias !212 call void @_ZN4sha18compress8compress17hed9866f5faa45a82E(ptr noalias noundef nonnull align 4 dereferenceable(20) %9, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1) br label %_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit -_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit: ; preds = %34, %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17ha7979026d57d41b4E.exit" +_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit: ; preds = %33, %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17ha7979026d57d41b4E.exit" store i8 0, ptr %10, align 1, !alias.scope !191, !noalias !194 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" -36: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" +35: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %9) ret void "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit": ; preds = %_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" - %.sroa.12.035 = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit ], [ %37, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" ] - %37 = add nuw nsw i64 %.sroa.12.035, 1 - %38 = shl nuw nsw i64 %.sroa.12.035, 2 - %39 = getelementptr inbounds nuw i8, ptr %2, i64 %38 - %40 = getelementptr inbounds nuw i32, ptr %9, i64 %.sroa.12.035 - %41 = load i32, ptr %40, align 4, !noundef !4 - %42 = call i32 @llvm.bswap.i32(i32 %41) - store i32 %42, ptr %39, align 1, !alias.scope !214, !noalias !218 - %exitcond.not = icmp eq i64 %37, 5 - br i1 %exitcond.not, label %36, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" + %.sroa.12.035 = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17h3fa81f355e0d0856E.exit ], [ %36, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" ] + %36 = add nuw nsw i64 %.sroa.12.035, 1 + %37 = shl nuw nsw i64 %.sroa.12.035, 2 + %38 = getelementptr inbounds nuw i8, ptr %2, i64 %37 + %39 = getelementptr inbounds nuw i32, ptr %9, i64 %.sroa.12.035 + %40 = load i32, ptr %39, align 4, !noundef !4 + %41 = call i32 @llvm.bswap.i32(i32 %40) + store i32 %41, ptr %38, align 1, !alias.scope !214, !noalias !218 + %exitcond.not = icmp eq i64 %36, 5 + br i1 %exitcond.not, label %35, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h2c304cd278eb72ebE.exit" } ; Function Attrs: inlinehint nonlazybind uwtable diff --git a/bench/arrow/optimized/key_hash.cc.ll b/bench/arrow/optimized/key_hash.cc.ll index c4d13a82436..6a256614e26 100644 --- a/bench/arrow/optimized/key_hash.cc.ll +++ b/bench/arrow/optimized/key_hash.cc.ll @@ -1883,9 +1883,8 @@ cond.false.i: ; preds = %while.end _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.false.i %cond.i = phi i64 [ %add.i, %cond.false.i ], [ 0, %while.end ] - %3 = add i64 %length, 15 - %4 = and i64 %3, 15 - %sub.i32 = xor i64 %4, 15 + %.not = sub i64 0, %length + %sub.i32 = and i64 %.not, 15 %add.ptr.i = getelementptr inbounds nuw i8, ptr @_ZZN5arrow7compute9Hashing3210StripeMaskEiPjS2_S2_S2_E5bytes, i64 %sub.i32 %ret.0.copyload.i.i = load i32, ptr %add.ptr.i, align 1 %add.ptr7.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 4 @@ -1899,7 +1898,7 @@ _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.fa for.body.lr.ph: ; preds = %_ZN5arrow8bit_util7CeilDivEll.exit %cmp25.i = icmp sgt i64 %cond.i, 1 - %5 = add nsw i64 %cond.i, -2 + %3 = add nsw i64 %cond.i, -2 %sub7 = shl i64 %cond.i, 4 %wide.trip.count = zext i32 %num_rows_safe.0.lcssa to i64 br label %for.body @@ -1910,11 +1909,11 @@ for.cond16.preheader: ; preds = %_ZN5arrow7compute9H for.body18.lr.ph: ; preds = %for.cond16.preheader %cmp25.i48 = icmp sgt i64 %cond.i, 1 - %6 = add nsw i64 %cond.i, -2 + %4 = add nsw i64 %cond.i, -2 %sub27 = shl i64 %cond.i, 4 %mul28 = add i64 %sub27, -16 %sub32 = sub i64 %length, %mul28 - %7 = zext i32 %num_rows_safe.0.lcssa to i64 + %5 = zext i32 %num_rows_safe.0.lcssa to i64 %wide.trip.count164 = zext i32 %num_rows to i64 %last_stripe_copy.4.last_stripe_copy.4.last_stripe_copy.4.add.ptr.i89.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 4 %last_stripe_copy.8.last_stripe_copy.8.last_stripe_copy.8.add.ptr2.i91.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 8 @@ -1959,7 +1958,7 @@ for.body.i: ; preds = %for.body, %for.body %or.i23.i = tail call i32 @llvm.fshl.i32(i32 %add.i22.i, i32 %add.i22.i, i32 13) %mul1.i24.i = mul i32 %or.i23.i, -1640531535 %inc.i = add nuw nsw i64 %istripe.026.i, 1 - %exitcond.not.i = icmp eq i64 %istripe.026.i, %5 + %exitcond.not.i = icmp eq i64 %istripe.026.i, %3 br i1 %exitcond.not.i, label %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit, label %for.body.i, !llvm.loop !6 _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit: ; preds = %for.body.i, %for.body @@ -1967,14 +1966,14 @@ _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit: ; preds = %acc3.0.lcssa.i = phi i32 [ 0, %for.body ], [ %mul1.i20.i, %for.body.i ] %acc2.0.lcssa.i = phi i32 [ -2048144777, %for.body ], [ %mul1.i16.i, %for.body.i ] %acc1.0.lcssa.i = phi i32 [ 606290984, %for.body ], [ %mul1.i.i, %for.body.i ] - %8 = getelementptr i8, ptr %add.ptr, i64 %sub7 - %add.ptr9 = getelementptr i8, ptr %8, i64 -16 + %6 = getelementptr i8, ptr %add.ptr, i64 %sub7 + %add.ptr9 = getelementptr i8, ptr %6, i64 -16 %ret.0.copyload.i.i35 = load i32, ptr %add.ptr9, align 1 - %add.ptr.i36 = getelementptr i8, ptr %8, i64 -12 + %add.ptr.i36 = getelementptr i8, ptr %6, i64 -12 %ret.0.copyload.i12.i37 = load i32, ptr %add.ptr.i36, align 1 - %add.ptr2.i38 = getelementptr i8, ptr %8, i64 -8 + %add.ptr2.i38 = getelementptr i8, ptr %6, i64 -8 %ret.0.copyload.i13.i = load i32, ptr %add.ptr2.i38, align 1 - %add.ptr4.i39 = getelementptr i8, ptr %8, i64 -4 + %add.ptr4.i39 = getelementptr i8, ptr %6, i64 -4 %ret.0.copyload.i14.i = load i32, ptr %add.ptr4.i39, align 1 %and.i = and i32 %ret.0.copyload.i.i35, %ret.0.copyload.i.i %and6.i = and i32 %ret.0.copyload.i12.i37, %ret.0.copyload.i4.i @@ -2012,20 +2011,20 @@ _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit: ; preds = %shr4.i = lshr i32 %mul3.i, 16 %xor5.i = xor i32 %shr4.i, %mul3.i %arrayidx = getelementptr inbounds nuw i32, ptr %hashes, i64 %indvars.iv156 - %9 = load i32, ptr %arrayidx, align 4 - %shl.i = shl i32 %9, 6 - %shr.i46 = lshr i32 %9, 2 + %7 = load i32, ptr %arrayidx, align 4 + %shl.i = shl i32 %7, 6 + %shr.i46 = lshr i32 %7, 2 %add.i45 = add i32 %shl.i, -1640531527 %add1.i = add i32 %add.i45, %shr.i46 %add2.i = add i32 %add1.i, %xor5.i - %xor.i47 = xor i32 %add2.i, %9 + %xor.i47 = xor i32 %add2.i, %7 store i32 %xor.i47, ptr %arrayidx, align 4 %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1 %exitcond.not = icmp eq i64 %indvars.iv.next157, %wide.trip.count br i1 %exitcond.not, label %for.cond16.preheader, label %for.body, !llvm.loop !29 for.body18: ; preds = %for.body18.lr.ph, %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87 - %indvars.iv160 = phi i64 [ %7, %for.body18.lr.ph ], [ %indvars.iv.next161, %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87 ] + %indvars.iv160 = phi i64 [ %5, %for.body18.lr.ph ], [ %indvars.iv.next161, %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87 ] %mul21 = mul i64 %length, %indvars.iv160 %add.ptr22 = getelementptr inbounds i8, ptr %keys, i64 %mul21 br i1 %cmp25.i48, label %for.body.i54, label %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87 @@ -2062,7 +2061,7 @@ for.body.i54: ; preds = %for.body18, %for.bo %or.i23.i83 = tail call i32 @llvm.fshl.i32(i32 %add.i22.i82, i32 %add.i22.i82, i32 13) %mul1.i24.i84 = mul i32 %or.i23.i83, -1640531535 %inc.i85 = add nuw nsw i64 %istripe.026.i59, 1 - %exitcond.not.i86 = icmp eq i64 %istripe.026.i59, %6 + %exitcond.not.i86 = icmp eq i64 %istripe.026.i59, %4 br i1 %exitcond.not.i86, label %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87, label %for.body.i54, !llvm.loop !6 _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87: ; preds = %for.body.i54, %for.body18 @@ -2112,13 +2111,13 @@ _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit87: ; preds %shr4.i128 = lshr i32 %mul3.i127, 16 %xor5.i129 = xor i32 %shr4.i128, %mul3.i127 %arrayidx38 = getelementptr inbounds nuw i32, ptr %hashes, i64 %indvars.iv160 - %10 = load i32, ptr %arrayidx38, align 4 - %shl.i131 = shl i32 %10, 6 - %shr.i133 = lshr i32 %10, 2 + %8 = load i32, ptr %arrayidx38, align 4 + %shl.i131 = shl i32 %8, 6 + %shr.i133 = lshr i32 %8, 2 %add.i130 = add i32 %shl.i131, -1640531527 %add1.i132 = add i32 %add.i130, %shr.i133 %add2.i134 = add i32 %add1.i132, %xor5.i129 - %xor.i135 = xor i32 %add2.i134, %10 + %xor.i135 = xor i32 %add2.i134, %8 store i32 %xor.i135, ptr %arrayidx38, align 4 %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1 %exitcond165.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count164 @@ -2167,9 +2166,8 @@ cond.false.i: ; preds = %while.end _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.false.i %cond.i = phi i64 [ %add.i, %cond.false.i ], [ 0, %while.end ] - %3 = add i64 %length, 15 - %4 = and i64 %3, 15 - %sub.i28 = xor i64 %4, 15 + %.not = sub i64 0, %length + %sub.i28 = and i64 %.not, 15 %add.ptr.i = getelementptr inbounds nuw i8, ptr @_ZZN5arrow7compute9Hashing3210StripeMaskEiPjS2_S2_S2_E5bytes, i64 %sub.i28 %ret.0.copyload.i.i = load i32, ptr %add.ptr.i, align 1 %add.ptr7.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 4 @@ -2183,7 +2181,7 @@ _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.fa for.body.lr.ph: ; preds = %_ZN5arrow8bit_util7CeilDivEll.exit %cmp25.i = icmp sgt i64 %cond.i, 1 - %5 = add nsw i64 %cond.i, -2 + %3 = add nsw i64 %cond.i, -2 %sub7 = shl i64 %cond.i, 4 br i1 %cmp25.i, label %for.body.us.preheader, label %for.body.lr.ph.split @@ -2229,18 +2227,18 @@ for.body.i.us: ; preds = %for.body.i.us, %for %or.i23.i.us = tail call i32 @llvm.fshl.i32(i32 %add.i22.i.us, i32 %add.i22.i.us, i32 13) %mul1.i24.i.us = mul i32 %or.i23.i.us, -1640531535 %inc.i.us = add nuw nsw i64 %istripe.026.i.us, 1 - %exitcond.not.i.us = icmp eq i64 %istripe.026.i.us, %5 + %exitcond.not.i.us = icmp eq i64 %istripe.026.i.us, %3 br i1 %exitcond.not.i.us, label %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit.loopexit.us, label %for.body.i.us, !llvm.loop !6 _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit.loopexit.us: ; preds = %for.body.i.us - %6 = getelementptr i8, ptr %add.ptr.us, i64 %sub7 - %add.ptr9.us = getelementptr i8, ptr %6, i64 -16 + %4 = getelementptr i8, ptr %add.ptr.us, i64 %sub7 + %add.ptr9.us = getelementptr i8, ptr %4, i64 -16 %ret.0.copyload.i.i31.us = load i32, ptr %add.ptr9.us, align 1 - %add.ptr.i32.us = getelementptr i8, ptr %6, i64 -12 + %add.ptr.i32.us = getelementptr i8, ptr %4, i64 -12 %ret.0.copyload.i12.i33.us = load i32, ptr %add.ptr.i32.us, align 1 - %add.ptr2.i34.us = getelementptr i8, ptr %6, i64 -8 + %add.ptr2.i34.us = getelementptr i8, ptr %4, i64 -8 %ret.0.copyload.i13.i.us = load i32, ptr %add.ptr2.i34.us, align 1 - %add.ptr4.i35.us = getelementptr i8, ptr %6, i64 -4 + %add.ptr4.i35.us = getelementptr i8, ptr %4, i64 -4 %ret.0.copyload.i14.i.us = load i32, ptr %add.ptr4.i35.us, align 1 %and.i.us = and i32 %ret.0.copyload.i.i31.us, %ret.0.copyload.i.i %and6.i.us = and i32 %ret.0.copyload.i12.i33.us, %ret.0.copyload.i4.i @@ -2294,11 +2292,11 @@ for.cond13.preheader: ; preds = %for.body, %_ZN5arro for.body15.lr.ph: ; preds = %for.cond13.preheader %cmp25.i41 = icmp sgt i64 %cond.i, 1 - %7 = add nsw i64 %cond.i, -2 + %5 = add nsw i64 %cond.i, -2 %sub24 = shl i64 %cond.i, 4 %mul25 = add i64 %sub24, -16 %sub29 = sub i64 %length, %mul25 - %8 = zext i32 %num_rows_safe.0.lcssa to i64 + %6 = zext i32 %num_rows_safe.0.lcssa to i64 %wide.trip.count158 = zext i32 %num_rows to i64 %last_stripe_copy.4.last_stripe_copy.4.last_stripe_copy.4.add.ptr.i82.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 4 %last_stripe_copy.8.last_stripe_copy.8.last_stripe_copy.8.add.ptr2.i84.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 8 @@ -2358,7 +2356,7 @@ for.body: ; preds = %for.body.lr.ph.spli br i1 %exitcond.not, label %for.cond13.preheader, label %for.body, !llvm.loop !32 for.body15: ; preds = %for.body15.lr.ph, %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit80 - %indvars.iv154 = phi i64 [ %8, %for.body15.lr.ph ], [ %indvars.iv.next155, %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit80 ] + %indvars.iv154 = phi i64 [ %6, %for.body15.lr.ph ], [ %indvars.iv.next155, %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit80 ] %mul18 = mul i64 %length, %indvars.iv154 %add.ptr19 = getelementptr inbounds i8, ptr %keys, i64 %mul18 br i1 %cmp25.i41, label %for.body.i47, label %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit80 @@ -2395,7 +2393,7 @@ for.body.i47: ; preds = %for.body15, %for.bo %or.i23.i76 = tail call i32 @llvm.fshl.i32(i32 %add.i22.i75, i32 %add.i22.i75, i32 13) %mul1.i24.i77 = mul i32 %or.i23.i76, -1640531535 %inc.i78 = add nuw nsw i64 %istripe.026.i52, 1 - %exitcond.not.i79 = icmp eq i64 %istripe.026.i52, %7 + %exitcond.not.i79 = icmp eq i64 %istripe.026.i52, %5 br i1 %exitcond.not.i79, label %_ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit80, label %for.body.i47, !llvm.loop !6 _ZN5arrow7compute9Hashing3218ProcessFullStripesEmPKhPjS4_S4_S4_.exit80: ; preds = %for.body.i47, %for.body15 @@ -5134,9 +5132,8 @@ cond.false.i: ; preds = %while.end _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.false.i %cond.i = phi i64 [ %add.i, %cond.false.i ], [ 0, %while.end ] - %3 = add i64 %length, 31 - %4 = and i64 %3, 31 - %sub.i32 = xor i64 %4, 31 + %.not = sub i64 0, %length + %sub.i32 = and i64 %.not, 31 %add.ptr.i = getelementptr inbounds nuw i8, ptr @_ZZN5arrow7compute9Hashing6410StripeMaskEiPmS2_S2_S2_E5bytes, i64 %sub.i32 %ret.0.copyload.i.i = load i64, ptr %add.ptr.i, align 1 %add.ptr7.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 8 @@ -5150,7 +5147,7 @@ _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.fa for.body.lr.ph: ; preds = %_ZN5arrow8bit_util7CeilDivEll.exit %cmp25.i = icmp sgt i64 %cond.i, 1 - %5 = add nsw i64 %cond.i, -2 + %3 = add nsw i64 %cond.i, -2 %sub7 = shl i64 %cond.i, 5 %wide.trip.count = zext i32 %num_rows_safe.0.lcssa to i64 br label %for.body @@ -5161,11 +5158,11 @@ for.cond16.preheader: ; preds = %_ZN5arrow7compute9H for.body18.lr.ph: ; preds = %for.cond16.preheader %cmp25.i55 = icmp sgt i64 %cond.i, 1 - %6 = add nsw i64 %cond.i, -2 + %4 = add nsw i64 %cond.i, -2 %sub27 = shl i64 %cond.i, 5 %mul28 = add i64 %sub27, -32 %sub32 = sub i64 %length, %mul28 - %7 = zext i32 %num_rows_safe.0.lcssa to i64 + %5 = zext i32 %num_rows_safe.0.lcssa to i64 %wide.trip.count195 = zext i32 %num_rows to i64 %last_stripe_copy.8.last_stripe_copy.8.last_stripe_copy.8.add.ptr.i96.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 8 %last_stripe_copy.16.last_stripe_copy.16.last_stripe_copy.16.add.ptr2.i98.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 16 @@ -5210,7 +5207,7 @@ for.body.i: ; preds = %for.body, %for.body %or.i23.i = tail call i64 @llvm.fshl.i64(i64 %add.i22.i, i64 %add.i22.i, i64 31) %mul1.i24.i = mul i64 %or.i23.i, -7046029288634856825 %inc.i = add nuw nsw i64 %istripe.026.i, 1 - %exitcond.not.i = icmp eq i64 %istripe.026.i, %5 + %exitcond.not.i = icmp eq i64 %istripe.026.i, %3 br i1 %exitcond.not.i, label %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit, label %for.body.i, !llvm.loop !48 _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit: ; preds = %for.body.i, %for.body @@ -5218,14 +5215,14 @@ _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit: ; preds = %acc3.0.lcssa.i = phi i64 [ 0, %for.body ], [ %mul1.i20.i, %for.body.i ] %acc2.0.lcssa.i = phi i64 [ -4417276706812531889, %for.body ], [ %mul1.i16.i, %for.body.i ] %acc1.0.lcssa.i = phi i64 [ -2239933958592612906, %for.body ], [ %mul1.i.i, %for.body.i ] - %8 = getelementptr i8, ptr %add.ptr, i64 %sub7 - %add.ptr9 = getelementptr i8, ptr %8, i64 -32 + %6 = getelementptr i8, ptr %add.ptr, i64 %sub7 + %add.ptr9 = getelementptr i8, ptr %6, i64 -32 %ret.0.copyload.i.i35 = load i64, ptr %add.ptr9, align 1 - %add.ptr.i36 = getelementptr i8, ptr %8, i64 -24 + %add.ptr.i36 = getelementptr i8, ptr %6, i64 -24 %ret.0.copyload.i12.i37 = load i64, ptr %add.ptr.i36, align 1 - %add.ptr2.i = getelementptr i8, ptr %8, i64 -16 + %add.ptr2.i = getelementptr i8, ptr %6, i64 -16 %ret.0.copyload.i13.i = load i64, ptr %add.ptr2.i, align 1 - %add.ptr4.i = getelementptr i8, ptr %8, i64 -8 + %add.ptr4.i = getelementptr i8, ptr %6, i64 -8 %ret.0.copyload.i14.i = load i64, ptr %add.ptr4.i, align 1 %and.i = and i64 %ret.0.copyload.i.i35, %ret.0.copyload.i.i %and6.i = and i64 %ret.0.copyload.i12.i37, %ret.0.copyload.i4.i @@ -5287,20 +5284,20 @@ _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit: ; preds = %shr4.i = lshr i64 %mul3.i, 32 %xor5.i = xor i64 %shr4.i, %mul3.i %arrayidx = getelementptr inbounds nuw i64, ptr %hashes, i64 %indvars.iv187 - %9 = load i64, ptr %arrayidx, align 8 - %shl.i = shl i64 %9, 6 - %shr.i53 = lshr i64 %9, 2 + %7 = load i64, ptr %arrayidx, align 8 + %shl.i = shl i64 %7, 6 + %shr.i53 = lshr i64 %7, 2 %add.i52 = add i64 %shl.i, 2654435769 %add1.i = add i64 %add.i52, %shr.i53 %add2.i = add i64 %add1.i, %xor5.i - %xor.i54 = xor i64 %add2.i, %9 + %xor.i54 = xor i64 %add2.i, %7 store i64 %xor.i54, ptr %arrayidx, align 8 %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, 1 %exitcond.not = icmp eq i64 %indvars.iv.next188, %wide.trip.count br i1 %exitcond.not, label %for.cond16.preheader, label %for.body, !llvm.loop !71 for.body18: ; preds = %for.body18.lr.ph, %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94 - %indvars.iv191 = phi i64 [ %7, %for.body18.lr.ph ], [ %indvars.iv.next192, %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94 ] + %indvars.iv191 = phi i64 [ %5, %for.body18.lr.ph ], [ %indvars.iv.next192, %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94 ] %mul21 = mul i64 %length, %indvars.iv191 %add.ptr22 = getelementptr inbounds i8, ptr %keys, i64 %mul21 br i1 %cmp25.i55, label %for.body.i61, label %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94 @@ -5337,7 +5334,7 @@ for.body.i61: ; preds = %for.body18, %for.bo %or.i23.i90 = tail call i64 @llvm.fshl.i64(i64 %add.i22.i89, i64 %add.i22.i89, i64 31) %mul1.i24.i91 = mul i64 %or.i23.i90, -7046029288634856825 %inc.i92 = add nuw nsw i64 %istripe.026.i66, 1 - %exitcond.not.i93 = icmp eq i64 %istripe.026.i66, %6 + %exitcond.not.i93 = icmp eq i64 %istripe.026.i66, %4 br i1 %exitcond.not.i93, label %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94, label %for.body.i61, !llvm.loop !48 _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94: ; preds = %for.body.i61, %for.body18 @@ -5411,13 +5408,13 @@ _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit94: ; preds %shr4.i159 = lshr i64 %mul3.i158, 32 %xor5.i160 = xor i64 %shr4.i159, %mul3.i158 %arrayidx38 = getelementptr inbounds nuw i64, ptr %hashes, i64 %indvars.iv191 - %10 = load i64, ptr %arrayidx38, align 8 - %shl.i162 = shl i64 %10, 6 - %shr.i164 = lshr i64 %10, 2 + %8 = load i64, ptr %arrayidx38, align 8 + %shl.i162 = shl i64 %8, 6 + %shr.i164 = lshr i64 %8, 2 %add.i161 = add i64 %shl.i162, 2654435769 %add1.i163 = add i64 %add.i161, %shr.i164 %add2.i165 = add i64 %add1.i163, %xor5.i160 - %xor.i166 = xor i64 %add2.i165, %10 + %xor.i166 = xor i64 %add2.i165, %8 store i64 %xor.i166, ptr %arrayidx38, align 8 %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1 %exitcond196.not = icmp eq i64 %indvars.iv.next192, %wide.trip.count195 @@ -5466,9 +5463,8 @@ cond.false.i: ; preds = %while.end _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.false.i %cond.i = phi i64 [ %add.i, %cond.false.i ], [ 0, %while.end ] - %3 = add i64 %length, 31 - %4 = and i64 %3, 31 - %sub.i28 = xor i64 %4, 31 + %.not = sub i64 0, %length + %sub.i28 = and i64 %.not, 31 %add.ptr.i = getelementptr inbounds nuw i8, ptr @_ZZN5arrow7compute9Hashing6410StripeMaskEiPmS2_S2_S2_E5bytes, i64 %sub.i28 %ret.0.copyload.i.i = load i64, ptr %add.ptr.i, align 1 %add.ptr7.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 8 @@ -5482,7 +5478,7 @@ _ZN5arrow8bit_util7CeilDivEll.exit: ; preds = %while.end, %cond.fa for.body.lr.ph: ; preds = %_ZN5arrow8bit_util7CeilDivEll.exit %cmp25.i = icmp sgt i64 %cond.i, 1 - %5 = add nsw i64 %cond.i, -2 + %3 = add nsw i64 %cond.i, -2 %sub7 = shl i64 %cond.i, 5 %wide.trip.count = zext i32 %num_rows_safe.0.lcssa to i64 br label %for.body @@ -5493,11 +5489,11 @@ for.cond13.preheader: ; preds = %_ZN5arrow7compute9H for.body15.lr.ph: ; preds = %for.cond13.preheader %cmp25.i48 = icmp sgt i64 %cond.i, 1 - %6 = add nsw i64 %cond.i, -2 + %4 = add nsw i64 %cond.i, -2 %sub24 = shl i64 %cond.i, 5 %mul25 = add i64 %sub24, -32 %sub29 = sub i64 %length, %mul25 - %7 = zext i32 %num_rows_safe.0.lcssa to i64 + %5 = zext i32 %num_rows_safe.0.lcssa to i64 %wide.trip.count182 = zext i32 %num_rows to i64 %last_stripe_copy.8.last_stripe_copy.8.last_stripe_copy.8.add.ptr.i89.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 8 %last_stripe_copy.16.last_stripe_copy.16.last_stripe_copy.16.add.ptr2.i91.sroa_idx = getelementptr inbounds nuw i8, ptr %last_stripe_copy, i64 16 @@ -5542,7 +5538,7 @@ for.body.i: ; preds = %for.body, %for.body %or.i23.i = tail call i64 @llvm.fshl.i64(i64 %add.i22.i, i64 %add.i22.i, i64 31) %mul1.i24.i = mul i64 %or.i23.i, -7046029288634856825 %inc.i = add nuw nsw i64 %istripe.026.i, 1 - %exitcond.not.i = icmp eq i64 %istripe.026.i, %5 + %exitcond.not.i = icmp eq i64 %istripe.026.i, %3 br i1 %exitcond.not.i, label %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit, label %for.body.i, !llvm.loop !48 _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit: ; preds = %for.body.i, %for.body @@ -5550,14 +5546,14 @@ _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit: ; preds = %acc3.0.lcssa.i = phi i64 [ 0, %for.body ], [ %mul1.i20.i, %for.body.i ] %acc2.0.lcssa.i = phi i64 [ -4417276706812531889, %for.body ], [ %mul1.i16.i, %for.body.i ] %acc1.0.lcssa.i = phi i64 [ -2239933958592612906, %for.body ], [ %mul1.i.i, %for.body.i ] - %8 = getelementptr i8, ptr %add.ptr, i64 %sub7 - %add.ptr9 = getelementptr i8, ptr %8, i64 -32 + %6 = getelementptr i8, ptr %add.ptr, i64 %sub7 + %add.ptr9 = getelementptr i8, ptr %6, i64 -32 %ret.0.copyload.i.i31 = load i64, ptr %add.ptr9, align 1 - %add.ptr.i32 = getelementptr i8, ptr %8, i64 -24 + %add.ptr.i32 = getelementptr i8, ptr %6, i64 -24 %ret.0.copyload.i12.i33 = load i64, ptr %add.ptr.i32, align 1 - %add.ptr2.i = getelementptr i8, ptr %8, i64 -16 + %add.ptr2.i = getelementptr i8, ptr %6, i64 -16 %ret.0.copyload.i13.i = load i64, ptr %add.ptr2.i, align 1 - %add.ptr4.i = getelementptr i8, ptr %8, i64 -8 + %add.ptr4.i = getelementptr i8, ptr %6, i64 -8 %ret.0.copyload.i14.i = load i64, ptr %add.ptr4.i, align 1 %and.i = and i64 %ret.0.copyload.i.i31, %ret.0.copyload.i.i %and6.i = and i64 %ret.0.copyload.i12.i33, %ret.0.copyload.i4.i @@ -5625,7 +5621,7 @@ _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit: ; preds = br i1 %exitcond.not, label %for.cond13.preheader, label %for.body, !llvm.loop !74 for.body15: ; preds = %for.body15.lr.ph, %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit87 - %indvars.iv178 = phi i64 [ %7, %for.body15.lr.ph ], [ %indvars.iv.next179, %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit87 ] + %indvars.iv178 = phi i64 [ %5, %for.body15.lr.ph ], [ %indvars.iv.next179, %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit87 ] %mul18 = mul i64 %length, %indvars.iv178 %add.ptr19 = getelementptr inbounds i8, ptr %keys, i64 %mul18 br i1 %cmp25.i48, label %for.body.i54, label %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit87 @@ -5662,7 +5658,7 @@ for.body.i54: ; preds = %for.body15, %for.bo %or.i23.i83 = tail call i64 @llvm.fshl.i64(i64 %add.i22.i82, i64 %add.i22.i82, i64 31) %mul1.i24.i84 = mul i64 %or.i23.i83, -7046029288634856825 %inc.i85 = add nuw nsw i64 %istripe.026.i59, 1 - %exitcond.not.i86 = icmp eq i64 %istripe.026.i59, %6 + %exitcond.not.i86 = icmp eq i64 %istripe.026.i59, %4 br i1 %exitcond.not.i86, label %_ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit87, label %for.body.i54, !llvm.loop !48 _ZN5arrow7compute9Hashing6418ProcessFullStripesEmPKhPmS4_S4_S4_.exit87: ; preds = %for.body.i54, %for.body15 diff --git a/bench/boost/optimized/monotonic_buffer_resource.ll b/bench/boost/optimized/monotonic_buffer_resource.ll index 40ffd00c2f1..64dbcdbd000 100644 --- a/bench/boost/optimized/monotonic_buffer_resource.ll +++ b/bench/boost/optimized/monotonic_buffer_resource.ll @@ -64,28 +64,21 @@ define void @_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_b %3 = getelementptr inbounds nuw i8, ptr %0, i64 40 %4 = load i64, ptr %3, align 8, !tbaa !3 %5 = icmp ult i64 %4, %1 - br i1 %5, label %6, label %15 - -6: ; preds = %2 - %7 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %1) - %8 = icmp samesign ult i64 %7, 2 - %9 = icmp slt i64 %1, 0 - %or.cond = or i1 %8, %9 - br i1 %or.cond, label %.sink.split, label %10 - -10: ; preds = %6 - %11 = add nsw i64 %1, -1 - %12 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %11, i1 false) - %13 = sub nuw nsw i64 64, %12 - %14 = shl nuw i64 1, %13 - br label %.sink.split - -.sink.split: ; preds = %6, %10 - %.sink = phi i64 [ %14, %10 ], [ %1, %6 ] + br i1 %5, label %.sink.split, label %12 + +.sink.split: ; preds = %2 + %6 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %1) + %7 = icmp samesign ult i64 %6, 2 + %8 = icmp slt i64 %1, 0 + %or.cond = or i1 %7, %8 + %9 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %1, i1 true) + %10 = sub nuw nsw i64 64, %9 + %11 = shl nuw i64 1, %10 + %.sink = select i1 %or.cond, i64 %1, i64 %11 store i64 %.sink, ptr %3, align 8, !tbaa !3 - br label %15 + br label %12 -15: ; preds = %.sink.split, %2 +12: ; preds = %.sink.split, %2 ret void } @@ -152,27 +145,19 @@ define void @_ZN5boost9container3pmr25monotonic_buffer_resourceC2EmPNS1_15memory tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false) store i64 16, ptr %11, align 8, !tbaa !3 %12 = getelementptr inbounds nuw i8, ptr %0, i64 48 - %13 = tail call i64 @llvm.umax.i64(i64 %1, i64 1) - %14 = icmp ugt i64 %1, 16 + %13 = icmp ugt i64 %1, 16 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 0, i64 16, i1 false) - br i1 %14, label %15, label %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit - -15: ; preds = %7 - %16 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %13) - %17 = icmp samesign ult i64 %16, 2 - %18 = icmp slt i64 %13, 0 - %or.cond.i = or i1 %18, %17 - br i1 %or.cond.i, label %.sink.split.i, label %19 - -19: ; preds = %15 - %20 = add nsw i64 %13, -1 - %21 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %20, i1 false) - %22 = sub nuw nsw i64 64, %21 - %23 = shl nuw i64 1, %22 - br label %.sink.split.i - -.sink.split.i: ; preds = %19, %15 - %.sink.i = phi i64 [ %23, %19 ], [ %13, %15 ] + br i1 %13, label %.sink.split.i, label %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit + +.sink.split.i: ; preds = %7 + %14 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %1) + %15 = icmp samesign ult i64 %14, 2 + %16 = icmp slt i64 %1, 0 + %or.cond.i = or i1 %16, %15 + %17 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %1, i1 true) + %18 = sub nuw nsw i64 64, %17 + %19 = shl nuw i64 1, %18 + %.sink.i = select i1 %or.cond.i, i64 %1, i64 %19 store i64 %.sink.i, ptr %11, align 8, !tbaa !3 br label %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit @@ -202,13 +187,13 @@ define void @_ZN5boost9container3pmr25monotonic_buffer_resourceC2EPvmPNS1_15memo store i64 %2, ptr %12, align 8, !tbaa !18 %.sroa.speculated = tail call i64 @llvm.umax.i64(i64 %2, i64 256) %13 = tail call noundef range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.sroa.speculated, i1 true) - %14 = xor i64 %13, 63 + %14 = lshr exact i64 -9223372036854775808, %13 %15 = getelementptr inbounds nuw i8, ptr %0, i64 40 %16 = getelementptr inbounds nuw i8, ptr %0, i64 48 store ptr %1, ptr %16, align 8, !tbaa !19 %17 = getelementptr inbounds nuw i8, ptr %0, i64 56 store i64 %2, ptr %17, align 8, !tbaa !20 - %18 = shl nuw i64 2, %14 + %18 = shl nuw i64 %14, 1 %.inv.i.not = icmp eq i64 %13, 0 %spec.select.i = select i1 %.inv.i.not, i64 -1, i64 %18 store i64 %spec.select.i, ptr %15, align 8, !tbaa !3 @@ -409,75 +394,68 @@ define noundef ptr @_ZN5boost9container3pmr25monotonic_buffer_resource11do_alloc %17 = load i64, ptr %16, align 8, !tbaa !18 %spec.select.i = tail call noundef i64 @llvm.usub.sat.i64(i64 %17, i64 %15) %18 = icmp ult i64 %spec.select.i, %1 - br i1 %18, label %19, label %48 + br i1 %18, label %19, label %45 19: ; preds = %7 %20 = getelementptr inbounds nuw i8, ptr %0, i64 40 %21 = load i64, ptr %20, align 8, !tbaa !3 %22 = icmp ult i64 %21, %1 - br i1 %22, label %23, label %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit - -23: ; preds = %19 - %24 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %1) - %25 = icmp samesign ult i64 %24, 2 - %26 = icmp slt i64 %1, 0 - %or.cond.i = or i1 %26, %25 - br i1 %or.cond.i, label %.sink.split.i, label %27 - -27: ; preds = %23 - %28 = add nsw i64 %1, -1 - %29 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %28, i1 false) - %30 = sub nuw nsw i64 64, %29 - %31 = shl nuw i64 1, %30 - br label %.sink.split.i - -.sink.split.i: ; preds = %27, %23 - %.sink.i = phi i64 [ %31, %27 ], [ %1, %23 ] + br i1 %22, label %.sink.split.i, label %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit + +.sink.split.i: ; preds = %19 + %23 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %1) + %24 = icmp samesign ult i64 %23, 2 + %25 = icmp slt i64 %1, 0 + %or.cond.i = or i1 %25, %24 + %26 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %1, i1 true) + %27 = sub nuw nsw i64 64, %26 + %28 = shl nuw i64 1, %27 + %.sink.i = select i1 %or.cond.i, i64 %1, i64 %28 store i64 %.sink.i, ptr %20, align 8, !tbaa !3 br label %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit _ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit: ; preds = %19, %.sink.split.i - %32 = phi i64 [ %21, %19 ], [ %.sink.i, %.sink.split.i ] - %33 = icmp ugt i64 %32, -17 - br i1 %33, label %34, label %_ZN5boost9container3pmr11block_slist8allocateEm.exit + %29 = phi i64 [ %21, %19 ], [ %.sink.i, %.sink.split.i ] + %30 = icmp ugt i64 %29, -17 + br i1 %30, label %31, label %_ZN5boost9container3pmr11block_slist8allocateEm.exit -34: ; preds = %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit +31: ; preds = %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit tail call void @_ZN5boost9container15throw_bad_allocEv() #18 unreachable _ZN5boost9container3pmr11block_slist8allocateEm.exit: ; preds = %_ZN5boost9container3pmr25monotonic_buffer_resource32increase_next_buffer_at_least_toEm.exit - %35 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %36 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %37 = load ptr, ptr %36, align 8, !tbaa !21 - %38 = add nuw i64 %32, 16 - %39 = load ptr, ptr %37, align 8, !tbaa !13 - %40 = getelementptr inbounds nuw i8, ptr %39, i64 16 - %41 = load ptr, ptr %40, align 8 - %42 = tail call noundef ptr %41(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %38, i64 noundef 16) - %43 = getelementptr inbounds nuw i8, ptr %42, i64 8 - store i64 %38, ptr %43, align 8, !tbaa !22 - %44 = load ptr, ptr %35, align 8, !tbaa !15 - store ptr %44, ptr %42, align 8, !tbaa !15 - store ptr %42, ptr %35, align 8, !tbaa !15 - %45 = getelementptr inbounds nuw i8, ptr %42, i64 16 - %46 = load i64, ptr %20, align 8, !tbaa !3 - %47 = shl nuw i64 %46, 1 - %.inv.i = icmp sgt i64 %46, -1 - %spec.select.i6 = select i1 %.inv.i, i64 %47, i64 -1 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %33 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %34 = load ptr, ptr %33, align 8, !tbaa !21 + %35 = add nuw i64 %29, 16 + %36 = load ptr, ptr %34, align 8, !tbaa !13 + %37 = getelementptr inbounds nuw i8, ptr %36, i64 16 + %38 = load ptr, ptr %37, align 8 + %39 = tail call noundef ptr %38(ptr noundef nonnull align 8 dereferenceable(8) %34, i64 noundef %35, i64 noundef 16) + %40 = getelementptr inbounds nuw i8, ptr %39, i64 8 + store i64 %35, ptr %40, align 8, !tbaa !22 + %41 = load ptr, ptr %32, align 8, !tbaa !15 + store ptr %41, ptr %39, align 8, !tbaa !15 + store ptr %39, ptr %32, align 8, !tbaa !15 + %42 = getelementptr inbounds nuw i8, ptr %39, i64 16 + %43 = load i64, ptr %20, align 8, !tbaa !3 + %44 = shl nuw i64 %43, 1 + %.inv.i = icmp sgt i64 %43, -1 + %spec.select.i6 = select i1 %.inv.i, i64 %44, i64 -1 store i64 %spec.select.i6, ptr %20, align 8, !tbaa !3 - br label %48 + br label %45 -48: ; preds = %_ZN5boost9container3pmr11block_slist8allocateEm.exit, %7 - %49 = phi i64 [ %46, %_ZN5boost9container3pmr11block_slist8allocateEm.exit ], [ %17, %7 ] - %50 = phi ptr [ %45, %_ZN5boost9container3pmr11block_slist8allocateEm.exit ], [ %11, %7 ] +45: ; preds = %_ZN5boost9container3pmr11block_slist8allocateEm.exit, %7 + %46 = phi i64 [ %43, %_ZN5boost9container3pmr11block_slist8allocateEm.exit ], [ %17, %7 ] + %47 = phi ptr [ %42, %_ZN5boost9container3pmr11block_slist8allocateEm.exit ], [ %11, %7 ] %.0 = phi i64 [ 0, %_ZN5boost9container3pmr11block_slist8allocateEm.exit ], [ %15, %7 ] - %51 = getelementptr inbounds nuw i8, ptr %50, i64 %.0 - %52 = getelementptr inbounds nuw i8, ptr %51, i64 %1 - store ptr %52, ptr %10, align 8, !tbaa !17 - %53 = add i64 %.0, %1 - %54 = sub i64 %49, %53 - store i64 %54, ptr %16, align 8, !tbaa !18 - ret ptr %51 + %48 = getelementptr inbounds nuw i8, ptr %47, i64 %.0 + %49 = getelementptr inbounds nuw i8, ptr %48, i64 %1 + store ptr %49, ptr %10, align 8, !tbaa !17 + %50 = add i64 %.0, %1 + %51 = sub i64 %46, %50 + store i64 %51, ptr %16, align 8, !tbaa !18 + ret ptr %48 } declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr diff --git a/bench/boost/optimized/system_test1.ll b/bench/boost/optimized/system_test1.ll index a8bb2bbc99e..c2e331ae9c5 100644 --- a/bench/boost/optimized/system_test1.ll +++ b/bench/boost/optimized/system_test1.ll @@ -151070,7 +151070,7 @@ _ZSt4copyIPKcPcET0_T_S4_S3_.exit: ; preds = %13, %16 %23 = ptrtoint ptr %.0 to i64 %24 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %20, i1 true) %25 = shl nuw nsw i64 %24, 1 - %26 = xor i64 %25, 126 + %26 = sub nuw nsw i64 126, %25 tail call void @_ZSt16__introsort_loopIPclN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S4_T0_T1_(ptr noundef nonnull %.0, ptr noundef nonnull %21, i64 noundef %26) %27 = icmp sgt i64 %20, 16 %.016.i.ptr.i.i.i = getelementptr inbounds nuw i8, ptr %.0, i64 1 @@ -153417,45 +153417,36 @@ _ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_stre store i64 -1, ptr %9, align 8, !tbaa !2994 %10 = getelementptr inbounds nuw i8, ptr %3, i64 88 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %10, i8 0, i64 24, i1 false) - invoke void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 128) - to label %_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_streambufISaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EEEED2Ev.exit unwind label %11 + %11 = invoke noalias noundef nonnull dereferenceable(128) ptr @_Znwm(i64 noundef 128) #64 + to label %_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_streambufISaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EEEED2Ev.exit unwind label %_ZNSt6vectorIcSaIcEED2Ev.exit.i.i.i.i -11: ; preds = %_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_streambufISaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERSC_.exit +_ZNSt6vectorIcSaIcEED2Ev.exit.i.i.i.i: ; preds = %_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_streambufISaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERSC_.exit %12 = landingpad { ptr, i32 } cleanup - %13 = load ptr, ptr %10, align 8, !tbaa !3000 - %.not.i.i.i.i.i.i.i = icmp eq ptr %13, null - br i1 %.not.i.i.i.i.i.i.i, label %_ZNSt6vectorIcSaIcEED2Ev.exit.i.i.i.i, label %14 - -14: ; preds = %11 - %15 = getelementptr inbounds nuw i8, ptr %3, i64 104 - %16 = load ptr, ptr %15, align 8, !tbaa !3001 - %17 = ptrtoint ptr %16 to i64 - %18 = ptrtoint ptr %13 to i64 - %19 = sub i64 %17, %18 - tail call void @_ZdlPvm(ptr noundef nonnull %13, i64 noundef %19) #63 - br label %_ZNSt6vectorIcSaIcEED2Ev.exit.i.i.i.i - -_ZNSt6vectorIcSaIcEED2Ev.exit.i.i.i.i: ; preds = %14, %11 store ptr getelementptr inbounds nuw inrange(-16, 112) (i8, ptr @_ZTVSt15basic_streambufIcSt11char_traitsIcEE, i64 16), ptr %6, align 8, !tbaa !25 tail call void @_ZNSt6localeD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #61 tail call void @_ZdlPvm(ptr noundef nonnull %3, i64 noundef 112) #63 resume { ptr, i32 } %12 _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_streambufISaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EEEED2Ev.exit: ; preds = %_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceIN5boost4asio15basic_streambufISaIcEEESaIvELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERSC_.exit - %20 = load ptr, ptr %10, align 8, !tbaa !3000 - store ptr %20, ptr %7, align 8, !tbaa !3002 - %21 = getelementptr inbounds nuw i8, ptr %3, i64 32 - store ptr %20, ptr %21, align 8, !tbaa !3003 - %22 = getelementptr inbounds nuw i8, ptr %3, i64 40 - store ptr %20, ptr %22, align 8, !tbaa !3004 - %23 = getelementptr inbounds nuw i8, ptr %20, i64 128 - %24 = getelementptr inbounds nuw i8, ptr %3, i64 56 - store ptr %20, ptr %24, align 8, !tbaa !220 - %25 = getelementptr inbounds nuw i8, ptr %3, i64 48 - store ptr %20, ptr %25, align 8, !tbaa !222 - %26 = getelementptr inbounds nuw i8, ptr %3, i64 64 - store ptr %23, ptr %26, align 8, !tbaa !3005 + %13 = getelementptr inbounds nuw i8, ptr %3, i64 104 + %14 = getelementptr inbounds nuw i8, ptr %3, i64 96 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(128) %11, i8 0, i64 128, i1 false) + store ptr %11, ptr %10, align 8, !tbaa !3000 + %15 = getelementptr inbounds nuw i8, ptr %11, i64 128 + store ptr %15, ptr %14, align 8, !tbaa !3001 + store ptr %15, ptr %13, align 8, !tbaa !3002 + store ptr %11, ptr %7, align 8, !tbaa !3003 + %16 = getelementptr inbounds nuw i8, ptr %3, i64 32 + store ptr %11, ptr %16, align 8, !tbaa !3004 + %17 = getelementptr inbounds nuw i8, ptr %3, i64 40 + store ptr %11, ptr %17, align 8, !tbaa !3005 + %18 = getelementptr inbounds nuw i8, ptr %3, i64 56 + store ptr %11, ptr %18, align 8, !tbaa !220 + %19 = getelementptr inbounds nuw i8, ptr %3, i64 48 + store ptr %11, ptr %19, align 8, !tbaa !222 + %20 = getelementptr inbounds nuw i8, ptr %3, i64 64 + store ptr %15, ptr %20, align 8, !tbaa !3006 store ptr %3, ptr %0, align 8, !tbaa !1527 store ptr %6, ptr %1, align 8, !tbaa !173 ret void @@ -153517,7 +153508,7 @@ _ZNKSt9type_infoeqERKS_.exit.thread8: ; preds = %9, %_ZNKSt9type_inf ; Function Attrs: mustprogress uwtable define linkonce_odr hidden void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %4 = load ptr, ptr %3, align 8, !tbaa !3006 + %4 = load ptr, ptr %3, align 8, !tbaa !3001 %5 = load ptr, ptr %0, align 8, !tbaa !3000 %6 = ptrtoint ptr %4 to i64 %7 = ptrtoint ptr %5 to i64 @@ -153528,12 +153519,12 @@ define linkonce_odr hidden void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnu 10: ; preds = %2 %11 = sub nuw i64 %1, %8 %12 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %13 = load ptr, ptr %12, align 8, !tbaa !3001 + %13 = load ptr, ptr %12, align 8, !tbaa !3002 %14 = ptrtoint ptr %13 to i64 %15 = sub i64 %14, %6 %16 = icmp sgt i64 %8, -1 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %8, 9223372036854775807 + %17 = sub nuw nsw i64 9223372036854775807, %8 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28.i = icmp ult i64 %15, %11 @@ -153553,11 +153544,11 @@ define linkonce_odr hidden void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnu _ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i: ; preds = %23, %19 %.0.i.i.i.i = phi ptr [ %20, %19 ], [ %24, %23 ] - store ptr %.0.i.i.i.i, ptr %3, align 8, !tbaa !3006 + store ptr %.0.i.i.i.i, ptr %3, align 8, !tbaa !3001 br label %_ZNSt6vectorIcSaIcEE17_M_default_appendEm.exit 25: ; preds = %10 - %26 = icmp ult i64 %17, %11 + %26 = icmp slt i64 %1, 0 br i1 %26, label %27, label %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i 27: ; preds = %25 @@ -153600,9 +153591,9 @@ _ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i: ; preds = %36, %_ZSt27__u _ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i: ; preds = %37, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i store ptr %30, ptr %0, align 8, !tbaa !3000 %39 = getelementptr inbounds nuw i8, ptr %30, i64 %1 - store ptr %39, ptr %3, align 8, !tbaa !3006 + store ptr %39, ptr %3, align 8, !tbaa !3001 %40 = getelementptr inbounds nuw i8, ptr %30, i64 %29 - store ptr %40, ptr %12, align 8, !tbaa !3001 + store ptr %40, ptr %12, align 8, !tbaa !3002 br label %_ZNSt6vectorIcSaIcEE17_M_default_appendEm.exit 41: ; preds = %2 @@ -153615,7 +153606,7 @@ _ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i: ; preds = %37, %_ZNSt6v br i1 %.not.i4, label %_ZNSt6vectorIcSaIcEE17_M_default_appendEm.exit, label %45 45: ; preds = %43 - store ptr %44, ptr %3, align 8, !tbaa !3006 + store ptr %44, ptr %3, align 8, !tbaa !3001 br label %_ZNSt6vectorIcSaIcEE17_M_default_appendEm.exit _ZNSt6vectorIcSaIcEE17_M_default_appendEm.exit: ; preds = %45, %43, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i, %41 @@ -153632,7 +153623,7 @@ define linkonce_odr hidden void @_ZN5boost4asio15basic_streambufISaIcEED2Ev(ptr 4: ; preds = %1 %5 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %6 = load ptr, ptr %5, align 8, !tbaa !3001 + %6 = load ptr, ptr %5, align 8, !tbaa !3002 %7 = ptrtoint ptr %6 to i64 %8 = ptrtoint ptr %3 to i64 %9 = sub i64 %7, %8 @@ -153656,7 +153647,7 @@ define linkonce_odr hidden void @_ZN5boost4asio15basic_streambufISaIcEED0Ev(ptr 4: ; preds = %1 %5 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %6 = load ptr, ptr %5, align 8, !tbaa !3001 + %6 = load ptr, ptr %5, align 8, !tbaa !3002 %7 = ptrtoint ptr %6 to i64 %8 = ptrtoint ptr %3 to i64 %9 = sub i64 %7, %8 @@ -153694,7 +153685,7 @@ declare noundef i64 @_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsgetnEPcl(ptr ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef i32 @_ZN5boost4asio15basic_streambufISaIcEE9underflowEv(ptr noundef nonnull align 8 dereferenceable(96) %0) unnamed_addr #3 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %3 = load ptr, ptr %2, align 8, !tbaa !3003 + %3 = load ptr, ptr %2, align 8, !tbaa !3004 %4 = getelementptr inbounds nuw i8, ptr %0, i64 40 %5 = load ptr, ptr %4, align 8, !tbaa !220 %6 = icmp ult ptr %3, %5 @@ -153704,9 +153695,9 @@ define linkonce_odr hidden noundef i32 @_ZN5boost4asio15basic_streambufISaIcEE9u %8 = getelementptr inbounds nuw i8, ptr %0, i64 72 %9 = load ptr, ptr %8, align 8, !tbaa !3000 %10 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %9, ptr %10, align 8, !tbaa !3002 + store ptr %9, ptr %10, align 8, !tbaa !3003 %11 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store ptr %5, ptr %11, align 8, !tbaa !3004 + store ptr %5, ptr %11, align 8, !tbaa !3005 %12 = load i8, ptr %3, align 1, !tbaa !24 %13 = zext i8 %12 to i32 br label %14 @@ -153733,13 +153724,13 @@ define linkonce_odr hidden noundef i32 @_ZN5boost4asio15basic_streambufISaIcEE8o %5 = getelementptr inbounds nuw i8, ptr %0, i64 40 %6 = load ptr, ptr %5, align 8, !tbaa !220 %7 = getelementptr inbounds nuw i8, ptr %0, i64 48 - %8 = load ptr, ptr %7, align 8, !tbaa !3005 + %8 = load ptr, ptr %7, align 8, !tbaa !3006 %9 = icmp eq ptr %6, %8 br i1 %9, label %.sink.split, label %20 .sink.split: ; preds = %4 %10 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %11 = load ptr, ptr %10, align 8, !tbaa !3003 + %11 = load ptr, ptr %10, align 8, !tbaa !3004 %12 = ptrtoint ptr %6 to i64 %13 = ptrtoint ptr %11 to i64 %14 = sub i64 %12, %13 @@ -153770,7 +153761,7 @@ define linkonce_odr hidden noundef i32 @_ZN5boost4asio15basic_streambufISaIcEE8o define linkonce_odr hidden void @_ZN5boost4asio15basic_streambufISaIcEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(96) %0, i64 noundef %1) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %3 = alloca %"class.std::length_error", align 8 %4 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %5 = load ptr, ptr %4, align 8, !tbaa !3003 + %5 = load ptr, ptr %4, align 8, !tbaa !3004 %6 = getelementptr inbounds nuw i8, ptr %0, i64 72 %7 = load ptr, ptr %6, align 8, !tbaa !3000 %8 = ptrtoint ptr %5 to i64 @@ -153781,7 +153772,7 @@ define linkonce_odr hidden void @_ZN5boost4asio15basic_streambufISaIcEE7reserveE %13 = ptrtoint ptr %12 to i64 %14 = sub i64 %13, %9 %15 = getelementptr inbounds nuw i8, ptr %0, i64 48 - %16 = load ptr, ptr %15, align 8, !tbaa !3005 + %16 = load ptr, ptr %15, align 8, !tbaa !3006 %17 = ptrtoint ptr %16 to i64 %18 = sub i64 %17, %9 %19 = sub i64 %18, %14 @@ -153841,15 +153832,15 @@ define linkonce_odr hidden void @_ZN5boost4asio15basic_streambufISaIcEE7reserveE %37 = load ptr, ptr %6, align 8, !tbaa !3000 %38 = getelementptr inbounds nuw i8, ptr %37, i64 %.0 %39 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %37, ptr %39, align 8, !tbaa !3002 - store ptr %37, ptr %4, align 8, !tbaa !3003 + store ptr %37, ptr %39, align 8, !tbaa !3003 + store ptr %37, ptr %4, align 8, !tbaa !3004 %40 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store ptr %38, ptr %40, align 8, !tbaa !3004 + store ptr %38, ptr %40, align 8, !tbaa !3005 %41 = getelementptr inbounds nuw i8, ptr %37, i64 %.029 store ptr %38, ptr %11, align 8, !tbaa !220 %42 = getelementptr inbounds nuw i8, ptr %0, i64 32 store ptr %38, ptr %42, align 8, !tbaa !222 - store ptr %41, ptr %15, align 8, !tbaa !3005 + store ptr %41, ptr %15, align 8, !tbaa !3006 br label %43 43: ; preds = %2, %36 @@ -172837,14 +172828,14 @@ _ZN5boost4asio6detail25base_from_completion_condINS1_14transfer_all_tEE20check_f store i32 1, ptr %9, align 8, !tbaa !3580 %28 = getelementptr inbounds nuw i8, ptr %8, i64 72 %29 = getelementptr inbounds nuw i8, ptr %8, i64 88 - %30 = load ptr, ptr %29, align 8, !tbaa !3001 + %30 = load ptr, ptr %29, align 8, !tbaa !3002 %31 = load ptr, ptr %28, align 8, !tbaa !3000 %32 = ptrtoint ptr %30 to i64 %33 = ptrtoint ptr %31 to i64 %34 = getelementptr inbounds nuw i8, ptr %8, i64 40 %35 = load ptr, ptr %34, align 8, !tbaa !220 %36 = getelementptr inbounds nuw i8, ptr %8, i64 16 - %37 = load ptr, ptr %36, align 8, !tbaa !3003 + %37 = load ptr, ptr %36, align 8, !tbaa !3004 %38 = ptrtoint ptr %35 to i64 %39 = ptrtoint ptr %37 to i64 %40 = sub i64 %38, %39 @@ -172915,14 +172906,14 @@ _ZN5boost4asio6detail25base_from_completion_condINS1_14transfer_all_tEE20check_f %16 = load ptr, ptr %15, align 8, !tbaa !3572 %17 = getelementptr inbounds nuw i8, ptr %16, i64 72 %18 = getelementptr inbounds nuw i8, ptr %16, i64 88 - %19 = load ptr, ptr %18, align 8, !tbaa !3001 + %19 = load ptr, ptr %18, align 8, !tbaa !3002 %20 = load ptr, ptr %17, align 8, !tbaa !3000 %21 = ptrtoint ptr %19 to i64 %22 = ptrtoint ptr %20 to i64 %23 = getelementptr inbounds nuw i8, ptr %16, i64 40 %24 = load ptr, ptr %23, align 8, !tbaa !220 %25 = getelementptr inbounds nuw i8, ptr %16, i64 16 - %26 = load ptr, ptr %25, align 8, !tbaa !3003 + %26 = load ptr, ptr %25, align 8, !tbaa !3004 %27 = ptrtoint ptr %24 to i64 %28 = ptrtoint ptr %26 to i64 %29 = sub i64 %27, %28 @@ -172962,7 +172953,7 @@ _ZN5boost4asio6detail25base_from_completion_condINS1_14transfer_all_tEE20check_f %51 = getelementptr inbounds nuw i8, ptr %0, i64 8 %52 = load ptr, ptr %51, align 8, !tbaa !3572 %53 = getelementptr inbounds nuw i8, ptr %52, i64 48 - %54 = load ptr, ptr %53, align 8, !tbaa !3005 + %54 = load ptr, ptr %53, align 8, !tbaa !3006 %55 = getelementptr inbounds nuw i8, ptr %52, i64 40 %56 = load ptr, ptr %55, align 8, !tbaa !220 %57 = ptrtoint ptr %54 to i64 @@ -172974,7 +172965,7 @@ _ZN5boost4asio6detail25base_from_completion_condINS1_14transfer_all_tEE20check_f %61 = getelementptr inbounds i8, ptr %56, i64 %60 store ptr %61, ptr %55, align 8, !tbaa !220 %62 = getelementptr inbounds nuw i8, ptr %52, i64 24 - store ptr %61, ptr %62, align 8, !tbaa !3004 + store ptr %61, ptr %62, align 8, !tbaa !3005 %63 = getelementptr inbounds nuw i8, ptr %1, i64 16 %64 = load i64, ptr %63, align 8, !tbaa !1555 %65 = and i64 %64, 1 @@ -172994,12 +172985,12 @@ _ZN5boost4asio6detail25base_from_completion_condINS1_14transfer_all_tEE20check_f %69 = phi i64 [ 65536, %47 ], [ %spec.select.i.i17, %66 ] %70 = getelementptr inbounds nuw i8, ptr %52, i64 72 %71 = getelementptr inbounds nuw i8, ptr %52, i64 88 - %72 = load ptr, ptr %71, align 8, !tbaa !3001 + %72 = load ptr, ptr %71, align 8, !tbaa !3002 %73 = load ptr, ptr %70, align 8, !tbaa !3000 %74 = ptrtoint ptr %72 to i64 %75 = ptrtoint ptr %73 to i64 %76 = getelementptr inbounds nuw i8, ptr %52, i64 16 - %77 = load ptr, ptr %76, align 8, !tbaa !3003 + %77 = load ptr, ptr %76, align 8, !tbaa !3004 %78 = ptrtoint ptr %61 to i64 %79 = ptrtoint ptr %77 to i64 %80 = sub i64 %78, %79 @@ -173284,7 +173275,7 @@ _ZNSiC1EPSt15basic_streambufIcSt11char_traitsIcEE.exit: ; preds = %_ZNK5boost6sy %94 = getelementptr inbounds nuw i8, ptr %93, i64 40 %95 = load ptr, ptr %94, align 8, !tbaa !220 %96 = getelementptr inbounds nuw i8, ptr %93, i64 16 - %97 = load ptr, ptr %96, align 8, !tbaa !3003 + %97 = load ptr, ptr %96, align 8, !tbaa !3004 %.not8 = icmp eq ptr %95, %97 br i1 %.not8, label %116, label %98 @@ -173301,7 +173292,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm.exit: ; preds = % %104 = getelementptr inbounds nuw i8, ptr %103, i64 40 %105 = load ptr, ptr %104, align 8, !tbaa !220 %106 = getelementptr inbounds nuw i8, ptr %103, i64 16 - %107 = load ptr, ptr %106, align 8, !tbaa !3003 + %107 = load ptr, ptr %106, align 8, !tbaa !3004 %108 = ptrtoint ptr %105 to i64 %109 = ptrtoint ptr %107 to i64 %110 = sub i64 %108, %109 @@ -180586,12 +180577,12 @@ attributes #70 = { nounwind allocsize(1) } !2998 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !2999, i64 0} !2999 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16} !3000 = !{!2999, !7, i64 0} -!3001 = !{!2999, !7, i64 16} -!3002 = !{!221, !7, i64 8} -!3003 = !{!221, !7, i64 16} -!3004 = !{!221, !7, i64 24} -!3005 = !{!221, !7, i64 48} -!3006 = !{!2999, !7, i64 8} +!3001 = !{!2999, !7, i64 8} +!3002 = !{!2999, !7, i64 16} +!3003 = !{!221, !7, i64 8} +!3004 = !{!221, !7, i64 16} +!3005 = !{!221, !7, i64 24} +!3006 = !{!221, !7, i64 48} !3007 = !{!3008, !7, i64 8} !3008 = !{!"_ZTSN5boost4asio10io_contextE", !2396, i64 0, !7, i64 8} !3009 = !{!2402, !16, i64 40} diff --git a/bench/cpp-httplib/optimized/httplib.cc.ll b/bench/cpp-httplib/optimized/httplib.cc.ll index d1387363b9a..5f6cc2818a5 100644 --- a/bench/cpp-httplib/optimized/httplib.cc.ll +++ b/bench/cpp-httplib/optimized/httplib.cc.ll @@ -8663,8 +8663,8 @@ invoke.cont: ; preds = %if.then10 while.body: ; preds = %invoke.cont, %invoke.cont17 %sub.ptr.sub.i33 = phi i64 [ %sub.ptr.sub.i, %invoke.cont17 ], [ %sub.ptr.sub.i29, %invoke.cont ] %sub.ptr.lhs.cast.i32 = phi i64 [ %sub.ptr.lhs.cast.i, %invoke.cont17 ], [ %sub.ptr.lhs.cast.i27, %invoke.cont ] - %5 = phi ptr [ %15, %invoke.cont17 ], [ %4, %invoke.cont ] - %6 = phi ptr [ %14, %invoke.cont17 ], [ %3, %invoke.cont ] + %5 = phi ptr [ %14, %invoke.cont17 ], [ %4, %invoke.cont ] + %6 = phi ptr [ %13, %invoke.cont17 ], [ %3, %invoke.cont ] %mul = shl i64 %sub.ptr.sub.i33, 1 %cmp.i = icmp sgt i64 %sub.ptr.sub.i33, 0 br i1 %cmp.i, label %if.then.i, label %if.else.i @@ -8673,7 +8673,7 @@ if.then.i: ; preds = %while.body %7 = load ptr, ptr %_M_end_of_storage.i.i.i, align 8 %sub.ptr.lhs.cast.i8.i = ptrtoint ptr %7 to i64 %sub.ptr.sub.i9.i = sub i64 %sub.ptr.lhs.cast.i8.i, %sub.ptr.lhs.cast.i32 - %sub.i.i = xor i64 %sub.ptr.sub.i33, 9223372036854775807 + %sub.i.i = sub nuw nsw i64 9223372036854775807, %sub.ptr.sub.i33 %cmp6.i.i = icmp ule i64 %sub.ptr.sub.i9.i, %sub.i.i call void @llvm.assume(i1 %cmp6.i.i) %cmp8.not.i.i = icmp ult i64 %sub.ptr.sub.i9.i, %sub.ptr.sub.i33 @@ -8698,7 +8698,7 @@ _ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %if. br label %invoke.cont17 if.else.i.i: ; preds = %if.then.i - %cmp.i.i.i = icmp samesign ult i64 %sub.i.i, %sub.ptr.sub.i33 + %cmp.i.i.i = icmp slt i64 %mul, 0 br i1 %cmp.i.i.i, label %if.then.i.i.i, label %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i if.then.i.i.i: ; preds = %if.else.i.i @@ -8709,8 +8709,7 @@ if.then.i.i.i: ; preds = %if.else.i.i unreachable _ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i: ; preds = %if.else.i.i - %8 = call i64 @llvm.umin.i64(i64 %mul, i64 9223372036854775807) - %call5.i.i.i.i.i15 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %8) #45 + %call5.i.i.i.i.i15 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul) #45 to label %call5.i.i.i.i.i.noexc unwind label %lpad16.loopexit call5.i.i.i.i.i.noexc: ; preds = %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i @@ -8743,10 +8742,9 @@ if.then.i32.i.i: ; preds = %_ZNSt6vectorIcSaIcE _ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i: ; preds = %if.then.i32.i.i, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i store ptr %call5.i.i.i.i.i15, ptr %glowable_buf, align 8 - %add.ptr36.i.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i15, i64 %mul + %add.ptr36.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i15, i64 %mul store ptr %add.ptr36.i.i, ptr %_M_finish.i.i.i, align 8 - %add.ptr39.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i15, i64 %8 - store ptr %add.ptr39.i.i, ptr %_M_end_of_storage.i.i.i, align 8 + store ptr %add.ptr36.i.i, ptr %_M_end_of_storage.i.i.i, align 8 br label %invoke.cont17 if.else.i: ; preds = %while.body @@ -8763,20 +8761,20 @@ invoke.cont.i.i: ; preds = %if.then5.i br label %invoke.cont17 invoke.cont17: ; preds = %invoke.cont.i.i, %if.then5.i, %if.else.i, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i - %9 = phi ptr [ %add.ptr.i, %invoke.cont.i.i ], [ %6, %if.then5.i ], [ %6, %if.else.i ], [ %add.ptr36.i.i, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %__first.addr.0.i.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] - %10 = phi ptr [ %5, %invoke.cont.i.i ], [ %5, %if.then5.i ], [ %5, %if.else.i ], [ %call5.i.i.i.i.i15, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %.pre, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] - %sub.ptr.lhs.cast.i18 = ptrtoint ptr %9 to i64 - %sub.ptr.rhs.cast.i19 = ptrtoint ptr %10 to i64 - %11 = xor i64 %sub.ptr.rhs.cast.i19, -1 - %sub20 = add i64 %sub.ptr.lhs.cast.i18, %11 - %12 = load ptr, ptr %args, align 8 - %13 = load ptr, ptr %args1, align 8 - %call21 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %10, i64 noundef %sub20, ptr noundef %fmt, ptr noundef %12, ptr noundef %13) #39 + %8 = phi ptr [ %add.ptr.i, %invoke.cont.i.i ], [ %6, %if.then5.i ], [ %6, %if.else.i ], [ %add.ptr36.i.i, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %__first.addr.0.i.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] + %9 = phi ptr [ %5, %invoke.cont.i.i ], [ %5, %if.then5.i ], [ %5, %if.else.i ], [ %call5.i.i.i.i.i15, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %.pre, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] + %sub.ptr.lhs.cast.i18 = ptrtoint ptr %8 to i64 + %sub.ptr.rhs.cast.i19 = ptrtoint ptr %9 to i64 + %10 = xor i64 %sub.ptr.rhs.cast.i19, -1 + %sub20 = add i64 %sub.ptr.lhs.cast.i18, %10 + %11 = load ptr, ptr %args, align 8 + %12 = load ptr, ptr %args1, align 8 + %call21 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %9, i64 noundef %sub20, ptr noundef %fmt, ptr noundef %11, ptr noundef %12) #39 %conv22 = sext i32 %call21 to i64 - %14 = load ptr, ptr %_M_finish.i.i.i, align 8 - %15 = load ptr, ptr %glowable_buf, align 8 - %sub.ptr.lhs.cast.i = ptrtoint ptr %14 to i64 - %sub.ptr.rhs.cast.i = ptrtoint ptr %15 to i64 + %13 = load ptr, ptr %_M_finish.i.i.i, align 8 + %14 = load ptr, ptr %glowable_buf, align 8 + %sub.ptr.lhs.cast.i = ptrtoint ptr %13 to i64 + %sub.ptr.rhs.cast.i = ptrtoint ptr %14 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub13 = add i64 %sub.ptr.sub.i, -1 %cmp14.not = icmp ugt i64 %sub13, %conv22 @@ -8799,20 +8797,20 @@ lpad16: ; preds = %lpad16.loopexit.spl while.end: ; preds = %invoke.cont17, %invoke.cont %n.0.lcssa = phi i64 [ %conv6, %invoke.cont ], [ %conv22, %invoke.cont17 ] - %.lcssa = phi ptr [ %4, %invoke.cont ], [ %15, %invoke.cont17 ] + %.lcssa = phi ptr [ %4, %invoke.cont ], [ %14, %invoke.cont17 ] %vtable = load ptr, ptr %this, align 8 %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 40 - %16 = load ptr, ptr %vfn, align 8 - %call25 = invoke noundef i64 %16(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %.lcssa, i64 noundef %n.0.lcssa) + %15 = load ptr, ptr %vfn, align 8 + %call25 = invoke noundef i64 %15(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %.lcssa, i64 noundef %n.0.lcssa) to label %invoke.cont24 unwind label %lpad16.loopexit.split-lp invoke.cont24: ; preds = %while.end - %17 = load ptr, ptr %glowable_buf, align 8 - %tobool.not.i.i.i = icmp eq ptr %17, null + %16 = load ptr, ptr %glowable_buf, align 8 + %tobool.not.i.i.i = icmp eq ptr %16, null br i1 %tobool.not.i.i.i, label %_ZNSt6vectorIcSaIcEED2Ev.exit, label %if.then.i.i.i22 if.then.i.i.i22: ; preds = %invoke.cont24 - call void @_ZdlPv(ptr noundef nonnull %17) #41 + call void @_ZdlPv(ptr noundef nonnull %16) #41 br label %_ZNSt6vectorIcSaIcEED2Ev.exit _ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %invoke.cont24, %if.then.i.i.i22 @@ -8822,8 +8820,8 @@ _ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %invoke.cont24, %if. if.else: ; preds = %if.end %vtable27 = load ptr, ptr %this, align 8 %vfn28 = getelementptr inbounds nuw i8, ptr %vtable27, i64 40 - %18 = load ptr, ptr %vfn28, align 8 - %call29 = call noundef i64 %18(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %buf, i64 noundef %conv6) + %17 = load ptr, ptr %vfn28, align 8 + %call29 = call noundef i64 %17(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %buf, i64 noundef %conv6) br label %return return: ; preds = %if.else, %_ZNSt6vectorIcSaIcEED2Ev.exit, %if.then @@ -25423,8 +25421,8 @@ invoke.cont: ; preds = %if.then10 while.body: ; preds = %invoke.cont, %invoke.cont17 %sub.ptr.sub.i33 = phi i64 [ %sub.ptr.sub.i, %invoke.cont17 ], [ %sub.ptr.sub.i29, %invoke.cont ] %sub.ptr.lhs.cast.i32 = phi i64 [ %sub.ptr.lhs.cast.i, %invoke.cont17 ], [ %sub.ptr.lhs.cast.i27, %invoke.cont ] - %5 = phi ptr [ %15, %invoke.cont17 ], [ %4, %invoke.cont ] - %6 = phi ptr [ %14, %invoke.cont17 ], [ %3, %invoke.cont ] + %5 = phi ptr [ %14, %invoke.cont17 ], [ %4, %invoke.cont ] + %6 = phi ptr [ %13, %invoke.cont17 ], [ %3, %invoke.cont ] %mul = shl i64 %sub.ptr.sub.i33, 1 %cmp.i = icmp sgt i64 %sub.ptr.sub.i33, 0 br i1 %cmp.i, label %if.then.i, label %if.else.i @@ -25433,7 +25431,7 @@ if.then.i: ; preds = %while.body %7 = load ptr, ptr %_M_end_of_storage.i.i.i, align 8 %sub.ptr.lhs.cast.i8.i = ptrtoint ptr %7 to i64 %sub.ptr.sub.i9.i = sub i64 %sub.ptr.lhs.cast.i8.i, %sub.ptr.lhs.cast.i32 - %sub.i.i = xor i64 %sub.ptr.sub.i33, 9223372036854775807 + %sub.i.i = sub nuw nsw i64 9223372036854775807, %sub.ptr.sub.i33 %cmp6.i.i = icmp ule i64 %sub.ptr.sub.i9.i, %sub.i.i call void @llvm.assume(i1 %cmp6.i.i) %cmp8.not.i.i = icmp ult i64 %sub.ptr.sub.i9.i, %sub.ptr.sub.i33 @@ -25458,7 +25456,7 @@ _ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %if. br label %invoke.cont17 if.else.i.i: ; preds = %if.then.i - %cmp.i.i.i = icmp samesign ult i64 %sub.i.i, %sub.ptr.sub.i33 + %cmp.i.i.i = icmp slt i64 %mul, 0 br i1 %cmp.i.i.i, label %if.then.i.i.i, label %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i if.then.i.i.i: ; preds = %if.else.i.i @@ -25469,8 +25467,7 @@ if.then.i.i.i: ; preds = %if.else.i.i unreachable _ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i: ; preds = %if.else.i.i - %8 = call i64 @llvm.umin.i64(i64 %mul, i64 9223372036854775807) - %call5.i.i.i.i.i15 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %8) #45 + %call5.i.i.i.i.i15 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul) #45 to label %call5.i.i.i.i.i.noexc unwind label %lpad16.loopexit call5.i.i.i.i.i.noexc: ; preds = %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i @@ -25503,10 +25500,9 @@ if.then.i32.i.i: ; preds = %_ZNSt6vectorIcSaIcE _ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i: ; preds = %if.then.i32.i.i, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i store ptr %call5.i.i.i.i.i15, ptr %glowable_buf, align 8 - %add.ptr36.i.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i15, i64 %mul + %add.ptr36.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i15, i64 %mul store ptr %add.ptr36.i.i, ptr %_M_finish.i.i.i, align 8 - %add.ptr39.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i15, i64 %8 - store ptr %add.ptr39.i.i, ptr %_M_end_of_storage.i.i.i, align 8 + store ptr %add.ptr36.i.i, ptr %_M_end_of_storage.i.i.i, align 8 br label %invoke.cont17 if.else.i: ; preds = %while.body @@ -25523,20 +25519,20 @@ invoke.cont.i.i: ; preds = %if.then5.i br label %invoke.cont17 invoke.cont17: ; preds = %invoke.cont.i.i, %if.then5.i, %if.else.i, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i - %9 = phi ptr [ %add.ptr.i, %invoke.cont.i.i ], [ %6, %if.then5.i ], [ %6, %if.else.i ], [ %add.ptr36.i.i, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %__first.addr.0.i.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] - %10 = phi ptr [ %5, %invoke.cont.i.i ], [ %5, %if.then5.i ], [ %5, %if.else.i ], [ %call5.i.i.i.i.i15, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %.pre, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] - %sub.ptr.lhs.cast.i18 = ptrtoint ptr %9 to i64 - %sub.ptr.rhs.cast.i19 = ptrtoint ptr %10 to i64 - %11 = xor i64 %sub.ptr.rhs.cast.i19, -1 - %sub20 = add i64 %sub.ptr.lhs.cast.i18, %11 - %12 = load i32, ptr %args, align 4 - %13 = load ptr, ptr %args1, align 8 - %call21 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %10, i64 noundef %sub20, ptr noundef %fmt, i32 noundef %12, ptr noundef %13) #39 + %8 = phi ptr [ %add.ptr.i, %invoke.cont.i.i ], [ %6, %if.then5.i ], [ %6, %if.else.i ], [ %add.ptr36.i.i, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %__first.addr.0.i.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] + %9 = phi ptr [ %5, %invoke.cont.i.i ], [ %5, %if.then5.i ], [ %5, %if.else.i ], [ %call5.i.i.i.i.i15, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit33.i.i ], [ %.pre, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i ] + %sub.ptr.lhs.cast.i18 = ptrtoint ptr %8 to i64 + %sub.ptr.rhs.cast.i19 = ptrtoint ptr %9 to i64 + %10 = xor i64 %sub.ptr.rhs.cast.i19, -1 + %sub20 = add i64 %sub.ptr.lhs.cast.i18, %10 + %11 = load i32, ptr %args, align 4 + %12 = load ptr, ptr %args1, align 8 + %call21 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull %9, i64 noundef %sub20, ptr noundef %fmt, i32 noundef %11, ptr noundef %12) #39 %conv22 = sext i32 %call21 to i64 - %14 = load ptr, ptr %_M_finish.i.i.i, align 8 - %15 = load ptr, ptr %glowable_buf, align 8 - %sub.ptr.lhs.cast.i = ptrtoint ptr %14 to i64 - %sub.ptr.rhs.cast.i = ptrtoint ptr %15 to i64 + %13 = load ptr, ptr %_M_finish.i.i.i, align 8 + %14 = load ptr, ptr %glowable_buf, align 8 + %sub.ptr.lhs.cast.i = ptrtoint ptr %13 to i64 + %sub.ptr.rhs.cast.i = ptrtoint ptr %14 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub13 = add i64 %sub.ptr.sub.i, -1 %cmp14.not = icmp ugt i64 %sub13, %conv22 @@ -25559,20 +25555,20 @@ lpad16: ; preds = %lpad16.loopexit.spl while.end: ; preds = %invoke.cont17, %invoke.cont %n.0.lcssa = phi i64 [ %conv6, %invoke.cont ], [ %conv22, %invoke.cont17 ] - %.lcssa = phi ptr [ %4, %invoke.cont ], [ %15, %invoke.cont17 ] + %.lcssa = phi ptr [ %4, %invoke.cont ], [ %14, %invoke.cont17 ] %vtable = load ptr, ptr %this, align 8 %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 40 - %16 = load ptr, ptr %vfn, align 8 - %call25 = invoke noundef i64 %16(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %.lcssa, i64 noundef %n.0.lcssa) + %15 = load ptr, ptr %vfn, align 8 + %call25 = invoke noundef i64 %15(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %.lcssa, i64 noundef %n.0.lcssa) to label %invoke.cont24 unwind label %lpad16.loopexit.split-lp invoke.cont24: ; preds = %while.end - %17 = load ptr, ptr %glowable_buf, align 8 - %tobool.not.i.i.i = icmp eq ptr %17, null + %16 = load ptr, ptr %glowable_buf, align 8 + %tobool.not.i.i.i = icmp eq ptr %16, null br i1 %tobool.not.i.i.i, label %_ZNSt6vectorIcSaIcEED2Ev.exit, label %if.then.i.i.i22 if.then.i.i.i22: ; preds = %invoke.cont24 - call void @_ZdlPv(ptr noundef nonnull %17) #41 + call void @_ZdlPv(ptr noundef nonnull %16) #41 br label %_ZNSt6vectorIcSaIcEED2Ev.exit _ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %invoke.cont24, %if.then.i.i.i22 @@ -25582,8 +25578,8 @@ _ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %invoke.cont24, %if. if.else: ; preds = %if.end %vtable27 = load ptr, ptr %this, align 8 %vfn28 = getelementptr inbounds nuw i8, ptr %vtable27, i64 40 - %18 = load ptr, ptr %vfn28, align 8 - %call29 = call noundef i64 %18(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %buf, i64 noundef %conv6) + %17 = load ptr, ptr %vfn28, align 8 + %call29 = call noundef i64 %17(ptr noundef nonnull align 8 dereferenceable(8) %this, ptr noundef nonnull %buf, i64 noundef %conv6) br label %return return: ; preds = %if.else, %_ZNSt6vectorIcSaIcEED2Ev.exit, %if.then @@ -69839,8 +69835,8 @@ if.then: ; preds = %entry %sub.ptr.rhs.cast.i = ptrtoint ptr %__first.coerce to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %0 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %sub.ptr.sub.i, i1 true) - %sub.i = shl nuw nsw i64 %0, 1 - %mul = xor i64 %sub.i, 126 + %1 = shl nuw nsw i64 %0, 1 + %mul = sub nuw nsw i64 126, %1 tail call void @_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_(ptr %__first.coerce, ptr %__last.coerce, i64 noundef %mul) %cmp.i1 = icmp sgt i64 %sub.ptr.sub.i, 16 %__i.sroa.0.010.i.ptr.i = getelementptr inbounds nuw i8, ptr %__first.coerce, i64 1 @@ -69850,9 +69846,9 @@ for.body.i.i: ; preds = %if.then, %for.inc.i %__i.sroa.0.013.i.idx.i = phi i64 [ %__i.sroa.0.013.i.add.i, %for.inc.i.i ], [ 1, %if.then ] %__first.coerce.pn12.i.i = phi ptr [ %__i.sroa.0.013.i.ptr.i, %for.inc.i.i ], [ %__first.coerce, %if.then ] %__i.sroa.0.013.i.ptr.i = getelementptr inbounds nuw i8, ptr %__first.coerce, i64 %__i.sroa.0.013.i.idx.i - %1 = load i8, ptr %__i.sroa.0.013.i.ptr.i, align 1 - %2 = load i8, ptr %__first.coerce, align 1 - %cmp.i2.i.i = icmp slt i8 %1, %2 + %2 = load i8, ptr %__i.sroa.0.013.i.ptr.i, align 1 + %3 = load i8, ptr %__first.coerce, align 1 + %cmp.i2.i.i = icmp slt i8 %2, %3 br i1 %cmp.i2.i.i, label %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i, label %if.else.i.i _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i: ; preds = %for.body.i.i @@ -69860,23 +69856,23 @@ _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T br label %for.inc.i.i if.else.i.i: ; preds = %for.body.i.i - %3 = load i8, ptr %__first.coerce.pn12.i.i, align 1 - %cmp.i8.i.i.i = icmp slt i8 %1, %3 + %4 = load i8, ptr %__first.coerce.pn12.i.i, align 1 + %cmp.i8.i.i.i = icmp slt i8 %2, %4 br i1 %cmp.i8.i.i.i, label %while.body.i.i.i, label %for.inc.i.i while.body.i.i.i: ; preds = %if.else.i.i, %while.body.i.i.i - %4 = phi i8 [ %5, %while.body.i.i.i ], [ %3, %if.else.i.i ] + %5 = phi i8 [ %6, %while.body.i.i.i ], [ %4, %if.else.i.i ] %__next.sroa.0.010.i.i.i = phi ptr [ %__next.sroa.0.0.i.i.i, %while.body.i.i.i ], [ %__first.coerce.pn12.i.i, %if.else.i.i ] %__last.sroa.0.09.i.i.i = phi ptr [ %__next.sroa.0.010.i.i.i, %while.body.i.i.i ], [ %__i.sroa.0.013.i.ptr.i, %if.else.i.i ] - store i8 %4, ptr %__last.sroa.0.09.i.i.i, align 1 + store i8 %5, ptr %__last.sroa.0.09.i.i.i, align 1 %__next.sroa.0.0.i.i.i = getelementptr inbounds i8, ptr %__next.sroa.0.010.i.i.i, i64 -1 - %5 = load i8, ptr %__next.sroa.0.0.i.i.i, align 1 - %cmp.i.i.i.i = icmp slt i8 %1, %5 + %6 = load i8, ptr %__next.sroa.0.0.i.i.i, align 1 + %cmp.i.i.i.i = icmp slt i8 %2, %6 br i1 %cmp.i.i.i.i, label %while.body.i.i.i, label %for.inc.i.i, !llvm.loop !489 for.inc.i.i: ; preds = %while.body.i.i.i, %if.else.i.i, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i %__first.coerce.sink.i.i = phi ptr [ %__first.coerce, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i ], [ %__i.sroa.0.013.i.ptr.i, %if.else.i.i ], [ %__next.sroa.0.010.i.i.i, %while.body.i.i.i ] - store i8 %1, ptr %__first.coerce.sink.i.i, align 1 + store i8 %2, ptr %__first.coerce.sink.i.i, align 1 %__i.sroa.0.013.i.add.i = add nuw nsw i64 %__i.sroa.0.013.i.idx.i, 1 %cmp.i1.not.i.i = icmp eq i64 %__i.sroa.0.013.i.add.i, 16 br i1 %cmp.i1.not.i.i, label %_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_.exit.i, label %for.body.i.i, !llvm.loop !490 @@ -69888,25 +69884,25 @@ _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5 for.body.i2.i: ; preds = %_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_.exit.i, %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i %__i.sroa.0.03.i.i = phi ptr [ %incdec.ptr.i.i.i, %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i ], [ %add.ptr.i.i, %_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_.exit.i ] - %6 = load i8, ptr %__i.sroa.0.03.i.i, align 1 + %7 = load i8, ptr %__i.sroa.0.03.i.i, align 1 %__next.sroa.0.07.i.i.i = getelementptr inbounds i8, ptr %__i.sroa.0.03.i.i, i64 -1 - %7 = load i8, ptr %__next.sroa.0.07.i.i.i, align 1 - %cmp.i8.i.i3.i = icmp slt i8 %6, %7 + %8 = load i8, ptr %__next.sroa.0.07.i.i.i, align 1 + %cmp.i8.i.i3.i = icmp slt i8 %7, %8 br i1 %cmp.i8.i.i3.i, label %while.body.i.i4.i, label %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i while.body.i.i4.i: ; preds = %for.body.i2.i, %while.body.i.i4.i - %8 = phi i8 [ %9, %while.body.i.i4.i ], [ %7, %for.body.i2.i ] + %9 = phi i8 [ %10, %while.body.i.i4.i ], [ %8, %for.body.i2.i ] %__next.sroa.0.010.i.i5.i = phi ptr [ %__next.sroa.0.0.i.i7.i, %while.body.i.i4.i ], [ %__next.sroa.0.07.i.i.i, %for.body.i2.i ] %__last.sroa.0.09.i.i6.i = phi ptr [ %__next.sroa.0.010.i.i5.i, %while.body.i.i4.i ], [ %__i.sroa.0.03.i.i, %for.body.i2.i ] - store i8 %8, ptr %__last.sroa.0.09.i.i6.i, align 1 + store i8 %9, ptr %__last.sroa.0.09.i.i6.i, align 1 %__next.sroa.0.0.i.i7.i = getelementptr inbounds i8, ptr %__next.sroa.0.010.i.i5.i, i64 -1 - %9 = load i8, ptr %__next.sroa.0.0.i.i7.i, align 1 - %cmp.i.i.i8.i = icmp slt i8 %6, %9 + %10 = load i8, ptr %__next.sroa.0.0.i.i7.i, align 1 + %cmp.i.i.i8.i = icmp slt i8 %7, %10 br i1 %cmp.i.i.i8.i, label %while.body.i.i4.i, label %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i, !llvm.loop !489 _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i: ; preds = %while.body.i.i4.i, %for.body.i2.i %__last.sroa.0.0.lcssa.i.i.i = phi ptr [ %__i.sroa.0.03.i.i, %for.body.i2.i ], [ %__next.sroa.0.010.i.i5.i, %while.body.i.i4.i ] - store i8 %6, ptr %__last.sroa.0.0.lcssa.i.i.i, align 1 + store i8 %7, ptr %__last.sroa.0.0.lcssa.i.i.i, align 1 %incdec.ptr.i.i.i = getelementptr inbounds nuw i8, ptr %__i.sroa.0.03.i.i, i64 1 %cmp.i.not.i.i = icmp eq ptr %incdec.ptr.i.i.i, %__last.coerce br i1 %cmp.i.not.i.i, label %if.end, label %for.body.i2.i, !llvm.loop !491 @@ -69918,9 +69914,9 @@ for.cond.preheader.i10.i: ; preds = %if.then for.body.i15.i: ; preds = %for.cond.preheader.i10.i, %for.inc.i21.i %__i.sroa.0.013.i16.i = phi ptr [ %__i.sroa.0.0.i23.i, %for.inc.i21.i ], [ %__i.sroa.0.010.i.ptr.i, %for.cond.preheader.i10.i ] %__first.coerce.pn12.i17.i = phi ptr [ %__i.sroa.0.013.i16.i, %for.inc.i21.i ], [ %__first.coerce, %for.cond.preheader.i10.i ] - %10 = load i8, ptr %__i.sroa.0.013.i16.i, align 1 - %11 = load i8, ptr %__first.coerce, align 1 - %cmp.i2.i18.i = icmp slt i8 %10, %11 + %11 = load i8, ptr %__i.sroa.0.013.i16.i, align 1 + %12 = load i8, ptr %__first.coerce, align 1 + %cmp.i2.i18.i = icmp slt i8 %11, %12 br i1 %cmp.i2.i18.i, label %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i, label %if.else.i19.i _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i: ; preds = %for.body.i15.i @@ -69930,23 +69926,23 @@ _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T br label %for.inc.i21.i if.else.i19.i: ; preds = %for.body.i15.i - %12 = load i8, ptr %__first.coerce.pn12.i17.i, align 1 - %cmp.i8.i.i20.i = icmp slt i8 %10, %12 + %13 = load i8, ptr %__first.coerce.pn12.i17.i, align 1 + %cmp.i8.i.i20.i = icmp slt i8 %11, %13 br i1 %cmp.i8.i.i20.i, label %while.body.i.i25.i, label %for.inc.i21.i while.body.i.i25.i: ; preds = %if.else.i19.i, %while.body.i.i25.i - %13 = phi i8 [ %14, %while.body.i.i25.i ], [ %12, %if.else.i19.i ] + %14 = phi i8 [ %15, %while.body.i.i25.i ], [ %13, %if.else.i19.i ] %__next.sroa.0.010.i.i26.i = phi ptr [ %__next.sroa.0.0.i.i28.i, %while.body.i.i25.i ], [ %__first.coerce.pn12.i17.i, %if.else.i19.i ] %__last.sroa.0.09.i.i27.i = phi ptr [ %__next.sroa.0.010.i.i26.i, %while.body.i.i25.i ], [ %__i.sroa.0.013.i16.i, %if.else.i19.i ] - store i8 %13, ptr %__last.sroa.0.09.i.i27.i, align 1 + store i8 %14, ptr %__last.sroa.0.09.i.i27.i, align 1 %__next.sroa.0.0.i.i28.i = getelementptr inbounds i8, ptr %__next.sroa.0.010.i.i26.i, i64 -1 - %14 = load i8, ptr %__next.sroa.0.0.i.i28.i, align 1 - %cmp.i.i.i29.i = icmp slt i8 %10, %14 + %15 = load i8, ptr %__next.sroa.0.0.i.i28.i, align 1 + %cmp.i.i.i29.i = icmp slt i8 %11, %15 br i1 %cmp.i.i.i29.i, label %while.body.i.i25.i, label %for.inc.i21.i, !llvm.loop !489 for.inc.i21.i: ; preds = %while.body.i.i25.i, %if.else.i19.i, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i %__first.coerce.sink.i22.i = phi ptr [ %__first.coerce, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i ], [ %__i.sroa.0.013.i16.i, %if.else.i19.i ], [ %__next.sroa.0.010.i.i26.i, %while.body.i.i25.i ] - store i8 %10, ptr %__first.coerce.sink.i22.i, align 1 + store i8 %11, ptr %__first.coerce.sink.i22.i, align 1 %__i.sroa.0.0.i23.i = getelementptr inbounds nuw i8, ptr %__i.sroa.0.013.i16.i, i64 1 %cmp.i1.not.i24.i = icmp eq ptr %__i.sroa.0.0.i23.i, %__last.coerce br i1 %cmp.i1.not.i24.i, label %if.end, label %for.body.i15.i, !llvm.loop !490 diff --git a/bench/cpython/optimized/unicodeobject.ll b/bench/cpython/optimized/unicodeobject.ll index 92c2a5beaaf..8649a2997bb 100644 --- a/bench/cpython/optimized/unicodeobject.ll +++ b/bench/cpython/optimized/unicodeobject.ll @@ -1781,7 +1781,7 @@ if.then16: ; preds = %if.end14 br label %return if.end17: ; preds = %if.end14 - %sub = xor i64 %struct_size.0, 9223372036854775807 + %sub = sub nuw nsw i64 9223372036854775807, %struct_size.0 %2 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %char_size.0, i1 true) %div36 = lshr i64 %sub, %2 %cmp19.not = icmp samesign ult i64 %size, %div36 @@ -41984,7 +41984,7 @@ entry: %0 = and i32 %bf.load, 64 %tobool.not = icmp eq i32 %0, 0 %. = select i1 %tobool.not, i64 56, i64 40 - %sub = xor i64 %., 9223372036854775807 + %sub = sub nuw nsw i64 9223372036854775807, %. %div = udiv i64 %sub, %conv %cmp.not = icmp slt i64 %length, %div br i1 %cmp.not, label %if.end5, label %if.then3 @@ -43661,7 +43661,7 @@ PyUnicode_READ.exit177.i.i: ; preds = %if.end6.i175.i.i, % if.end142.i.i: ; preds = %PyUnicode_READ.exit177.i.i %sub145.i.i = add nsw i32 %retval.0.i171.i.i, -48 %conv146.i.i = zext nneg i32 %sub145.i.i to i64 - %sub147.i.i = xor i64 %conv146.i.i, 9223372036854775806 + %sub147.i.i = sub nuw nsw i64 9223372036854775807, %conv146.i.i %div.i.i = udiv i64 %sub147.i.i, 10 %cmp148.i.i = icmp sgt i64 %add156.i190.i, %div.i.i br i1 %cmp148.i.i, label %return.sink.split.i.i, label %if.end151.i.i @@ -45430,7 +45430,7 @@ sw.epilog: ; preds = %if.else17, %if.else %dquote.1 = phi i64 [ %dquote.0816, %if.else ], [ %dquote.0816, %if.then12 ], [ %inc4, %sw.bb3 ], [ %dquote.0816, %sw.bb ], [ %dquote.0816, %PyUnicode_READ.exit ], [ %dquote.0816, %PyUnicode_READ.exit ], [ %dquote.0816, %PyUnicode_READ.exit ], [ %dquote.0816, %PyUnicode_READ.exit ], [ %dquote.0816, %sw.default ], [ %dquote.0816, %if.else14 ], [ %dquote.0816, %if.else17 ] %squote.1 = phi i64 [ %squote.0817, %if.else ], [ %squote.0817, %if.then12 ], [ %squote.0817, %sw.bb3 ], [ %inc, %sw.bb ], [ %squote.0817, %PyUnicode_READ.exit ], [ %squote.0817, %PyUnicode_READ.exit ], [ %squote.0817, %PyUnicode_READ.exit ], [ %squote.0817, %PyUnicode_READ.exit ], [ %squote.0817, %sw.default ], [ %squote.0817, %if.else14 ], [ %squote.0817, %if.else17 ] %incr.0 = phi i64 [ 1, %if.else ], [ 1, %if.then12 ], [ 1, %sw.bb3 ], [ 1, %sw.bb ], [ 2, %PyUnicode_READ.exit ], [ 2, %PyUnicode_READ.exit ], [ 2, %PyUnicode_READ.exit ], [ 2, %PyUnicode_READ.exit ], [ 4, %sw.default ], [ 4, %if.else14 ], [ %., %if.else17 ] - %sub = xor i64 %incr.0, 9223372036854775807 + %sub = sub nuw nsw i64 9223372036854775807, %incr.0 %cmp25 = icmp sgt i64 %osize.0818, %sub br i1 %cmp25, label %if.then26, label %if.end27 @@ -50197,7 +50197,7 @@ for.body.us67: ; preds = %for.body.lr.ph, %if %5 = load i16, ptr %arrayidx4.i.us, align 2 %cmp2.us72 = icmp ult i16 %5, 256 %incr.0.us75 = select i1 %cmp2.us72, i64 4, i64 6 - %sub.us76 = xor i64 %incr.0.us75, 9223372036854775807 + %sub.us76 = sub nuw nsw i64 9223372036854775807, %incr.0.us75 %cmp7.us77 = icmp sgt i64 %size.064.us69, %sub.us76 br i1 %cmp7.us77, label %if.then8, label %if.end9.us78 @@ -50216,7 +50216,7 @@ for.body: ; preds = %for.body.lr.ph, %if %cmp3 = icmp ult i32 %6, 65536 %. = select i1 %cmp3, i64 6, i64 10 %incr.0 = select i1 %cmp2, i64 4, i64 %. - %sub = xor i64 %incr.0, 9223372036854775807 + %sub = sub nuw nsw i64 9223372036854775807, %incr.0 %cmp7 = icmp sgt i64 %size.064, %sub br i1 %cmp7, label %if.then8, label %if.end9 @@ -50438,7 +50438,7 @@ for.body.us: ; preds = %for.body.lr.ph, %if %cmp3.us = icmp ult i8 %3, 100 %spec.select = select i1 %cmp3.us, i64 5, i64 6 %incr.0.us = select i1 %cmp2.us, i64 4, i64 %spec.select - %sub.us = xor i64 %incr.0.us, 9223372036854775807 + %sub.us = sub nuw nsw i64 9223372036854775807, %incr.0.us %cmp23.us = icmp sgt i64 %size.040.us, %sub.us br i1 %cmp23.us, label %if.then24, label %if.end25.us @@ -50471,7 +50471,7 @@ if.else8.us52: ; preds = %if.else5.us50 if.end22.us59: ; preds = %if.else8.us52, %if.else5.us50, %if.else.us48, %for.body.us42 %incr.0.us60 = phi i64 [ 4, %for.body.us42 ], [ 5, %if.else.us48 ], [ 6, %if.else5.us50 ], [ %spec.select93, %if.else8.us52 ] - %sub.us61 = xor i64 %incr.0.us60, 9223372036854775807 + %sub.us61 = sub nuw nsw i64 9223372036854775807, %incr.0.us60 %cmp23.us62 = icmp sgt i64 %size.040.us43, %sub.us61 br i1 %cmp23.us62, label %if.then24, label %if.end25.us63 @@ -50512,7 +50512,7 @@ if.else14: ; preds = %if.else11 if.end22: ; preds = %if.else14, %if.else11, %if.else8, %if.else5, %if.else, %for.body %incr.0 = phi i64 [ 4, %for.body ], [ 5, %if.else ], [ 6, %if.else5 ], [ 7, %if.else8 ], [ 8, %if.else11 ], [ %., %if.else14 ] - %sub = xor i64 %incr.0, 9223372036854775807 + %sub = sub nuw nsw i64 9223372036854775807, %incr.0 %cmp23 = icmp sgt i64 %size.040, %sub br i1 %cmp23, label %if.then24, label %if.end25 diff --git a/bench/cvc5/optimized/minisat.cpp.ll b/bench/cvc5/optimized/minisat.cpp.ll index c338bd4e2f9..ba5a45598a2 100644 --- a/bench/cvc5/optimized/minisat.cpp.ll +++ b/bench/cvc5/optimized/minisat.cpp.ll @@ -1354,7 +1354,7 @@ if.end.i.i.i: ; preds = %for.body.i %shr.i.i.i = lshr i32 %minisat_clause.sroa.9.0, 1 %4 = and i32 %shr.i.i.i, 1073741822 %add.i.i.i.i = add nuw nsw i32 %4, 2 - %sub8.i.i.i = xor i32 %minisat_clause.sroa.9.0, 2147483647 + %sub8.i.i.i = sub nuw nsw i32 2147483647, %minisat_clause.sroa.9.0 %cmp9.i.i.i = icmp samesign ugt i32 %add.i.i.i.i, %sub8.i.i.i br i1 %cmp9.i.i.i, label %if.then17.i.i.i, label %lor.lhs.false.i.i.i @@ -1646,8 +1646,9 @@ if.end.i.i: ; preds = %invoke.cont %shr.i.i = lshr i32 %9, 1 %10 = and i32 %shr.i.i, 1073741822 %add.i.i.i = add nuw nsw i32 %10, 2 - %sub8.i.i = xor i32 %9, 2147483647 - %cmp9.i.i = icmp samesign ugt i32 %add.i.i.i, %sub8.i.i + %11 = sub nuw nsw i64 2147483647, %indvars.iv + %12 = zext nneg i32 %add.i.i.i to i64 + %cmp9.i.i = icmp samesign ult i64 %11, %12 br i1 %cmp9.i.i, label %if.then17.i.i, label %lor.lhs.false.i.i lor.lhs.false.i.i: ; preds = %if.end.i.i @@ -1660,8 +1661,8 @@ lor.lhs.false.i.i: ; preds = %if.end.i.i land.lhs.true.i.i: ; preds = %lor.lhs.false.i.i %call15.i.i = tail call ptr @__errno_location() #32 - %11 = load i32, ptr %call15.i.i, align 4 - %cmp16.i.i = icmp eq i32 %11, 12 + %13 = load i32, ptr %call15.i.i, align 4 + %cmp16.i.i = icmp eq i32 %13, 12 tail call void @llvm.assume(i1 %cmp16.i.i) br label %if.then17.i.i @@ -1701,32 +1702,32 @@ lpad: ; preds = %_ZNK4cvc58internal7 br i1 %cmp.not.i.i, label %_ZN4cvc58internal7Minisat3vecINS1_3LitEED2Ev.exit, label %for.cond.preheader.i.i for.cond.preheader.i.i: ; preds = %lpad.thread, %lpad - %lpad.phi51 = phi { ptr, i32 } [ %lpad.loopexit28, %lpad.thread ], [ %lpad.loopexit.split-lp29, %lpad ] - %assumps.sroa.0.150 = phi ptr [ %assumps.sroa.0.3, %lpad.thread ], [ %assumps.sroa.0.1.ph, %lpad ] - tail call void @free(ptr noundef nonnull %assumps.sroa.0.150) #28 + %lpad.phi52 = phi { ptr, i32 } [ %lpad.loopexit28, %lpad.thread ], [ %lpad.loopexit.split-lp29, %lpad ] + %assumps.sroa.0.151 = phi ptr [ %assumps.sroa.0.3, %lpad.thread ], [ %assumps.sroa.0.1.ph, %lpad ] + tail call void @free(ptr noundef nonnull %assumps.sroa.0.151) #28 br label %_ZN4cvc58internal7Minisat3vecINS1_3LitEED2Ev.exit _ZN4cvc58internal7Minisat3vecINS1_3LitEED2Ev.exit: ; preds = %lpad, %for.cond.preheader.i.i - %lpad.phi52 = phi { ptr, i32 } [ %lpad.loopexit.split-lp29, %lpad ], [ %lpad.phi51, %for.cond.preheader.i.i ] - resume { ptr, i32 } %lpad.phi52 + %lpad.phi53 = phi { ptr, i32 } [ %lpad.loopexit.split-lp29, %lpad ], [ %lpad.phi52, %for.cond.preheader.i.i ] + resume { ptr, i32 } %lpad.phi53 for.end.loopexit: ; preds = %invoke.cont11 - %12 = trunc nuw i64 %indvars.iv.next to i32 + %14 = trunc nuw i64 %indvars.iv.next to i32 br label %for.end for.end: ; preds = %for.end.loopexit, %_ZNSt13unordered_setIN4cvc58internal4prop10SatLiteralENS2_22SatLiteralHashFunctionESt8equal_toIS3_ESaIS3_EE5clearEv.exit - %assumps.sroa.9.0.lcssa = phi i32 [ 0, %_ZNSt13unordered_setIN4cvc58internal4prop10SatLiteralENS2_22SatLiteralHashFunctionESt8equal_toIS3_ESaIS3_EE5clearEv.exit ], [ %12, %for.end.loopexit ] + %assumps.sroa.9.0.lcssa = phi i32 [ 0, %_ZNSt13unordered_setIN4cvc58internal4prop10SatLiteralENS2_22SatLiteralHashFunctionESt8equal_toIS3_ESaIS3_EE5clearEv.exit ], [ %14, %for.end.loopexit ] %assumps.sroa.0.0.lcssa = phi ptr [ null, %_ZNSt13unordered_setIN4cvc58internal4prop10SatLiteralENS2_22SatLiteralHashFunctionESt8equal_toIS3_ESaIS3_EE5clearEv.exit ], [ %assumps.sroa.0.3, %for.end.loopexit ] - %13 = load ptr, ptr %d_minisat, align 8 - %conflict_budget.i.i = getelementptr inbounds nuw i8, ptr %13, i64 832 + %15 = load ptr, ptr %d_minisat, align 8 + %conflict_budget.i.i = getelementptr inbounds nuw i8, ptr %15, i64 832 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %conflict_budget.i.i, i8 -1, i64 16, i1 false) - %assumptions.i = getelementptr inbounds nuw i8, ptr %13, i64 632 - %14 = load ptr, ptr %assumptions.i, align 8 - %cmp.not.i.i.i = icmp eq ptr %14, null + %assumptions.i = getelementptr inbounds nuw i8, ptr %15, i64 632 + %16 = load ptr, ptr %assumptions.i, align 8 + %cmp.not.i.i.i = icmp eq ptr %16, null br i1 %cmp.not.i.i.i, label %_ZN4cvc58internal7Minisat3vecINS1_3LitEE5clearEb.exit.i.i, label %for.cond.preheader.i.i.i for.cond.preheader.i.i.i: ; preds = %for.end - %sz.le.i.i.i = getelementptr inbounds nuw i8, ptr %13, i64 640 + %sz.le.i.i.i = getelementptr inbounds nuw i8, ptr %15, i64 640 store i32 0, ptr %sz.le.i.i.i, align 8 br label %_ZN4cvc58internal7Minisat3vecINS1_3LitEE5clearEb.exit.i.i @@ -1739,27 +1740,27 @@ _ZN4cvc58internal7Minisat3vecINS1_3LitEE5clearEb.exit.i.i: ; preds = %for.cond.p br i1 %cmp6.i.i.not, label %_ZNK4cvc58internal7Minisat3vecINS1_3LitEE6copyToERS4_.exit.i, label %for.body.i.i.preheader for.body.i.i.preheader: ; preds = %.noexc7 - %15 = zext nneg i32 %assumps.sroa.9.0.lcssa to i64 + %17 = zext nneg i32 %assumps.sroa.9.0.lcssa to i64 br label %for.body.i.i for.body.i.i: ; preds = %for.body.i.i.preheader, %for.body.i.i %indvars.iv.i.i = phi i64 [ %indvars.iv.next.i.i, %for.body.i.i ], [ 0, %for.body.i.i.preheader ] %arrayidx.i.i = getelementptr inbounds nuw %"struct.cvc5::internal::Minisat::Lit", ptr %assumps.sroa.0.0.lcssa, i64 %indvars.iv.i.i - %16 = load ptr, ptr %assumptions.i, align 8 - %arrayidx.i.i.i = getelementptr inbounds nuw %"struct.cvc5::internal::Minisat::Lit", ptr %16, i64 %indvars.iv.i.i - %17 = load i32, ptr %arrayidx.i.i, align 4 - store i32 %17, ptr %arrayidx.i.i.i, align 4 + %18 = load ptr, ptr %assumptions.i, align 8 + %arrayidx.i.i.i = getelementptr inbounds nuw %"struct.cvc5::internal::Minisat::Lit", ptr %18, i64 %indvars.iv.i.i + %19 = load i32, ptr %arrayidx.i.i, align 4 + store i32 %19, ptr %arrayidx.i.i.i, align 4 %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next.i.i, %15 + %exitcond.not = icmp eq i64 %indvars.iv.next.i.i, %17 br i1 %exitcond.not, label %_ZNK4cvc58internal7Minisat3vecINS1_3LitEE6copyToERS4_.exit.i, label %for.body.i.i, !llvm.loop !14 _ZNK4cvc58internal7Minisat3vecINS1_3LitEE6copyToERS4_.exit.i: ; preds = %for.body.i.i, %.noexc7 - %call.i8 = invoke i8 @_ZN4cvc58internal7Minisat10SimpSolver6solve_Ebb(ptr noundef nonnull align 8 dereferenceable(1108) %13, i1 noundef zeroext true, i1 noundef zeroext false) + %call.i8 = invoke i8 @_ZN4cvc58internal7Minisat10SimpSolver6solve_Ebb(ptr noundef nonnull align 8 dereferenceable(1108) %15, i1 noundef zeroext true, i1 noundef zeroext false) to label %invoke.cont20 unwind label %lpad invoke.cont20: ; preds = %_ZNK4cvc58internal7Minisat3vecINS1_3LitEE6copyToERS4_.exit.i - %18 = load ptr, ptr %d_minisat, align 8 - %asynch_interrupt.i = getelementptr inbounds nuw i8, ptr %18, i64 848 + %20 = load ptr, ptr %d_minisat, align 8 + %asynch_interrupt.i = getelementptr inbounds nuw i8, ptr %20, i64 848 store i8 0, ptr %asynch_interrupt.i, align 8 %cmp.not.i.i10 = icmp eq ptr %assumps.sroa.0.0.lcssa, null br i1 %cmp.not.i.i10, label %_ZN4cvc58internal7Minisat3vecINS1_3LitEED2Ev.exit14, label %for.cond.preheader.i.i11 @@ -1771,8 +1772,8 @@ for.cond.preheader.i.i11: ; preds = %invoke.cont20 _ZN4cvc58internal7Minisat3vecINS1_3LitEED2Ev.exit14: ; preds = %invoke.cont20, %for.cond.preheader.i.i11 %cmp.i.i9 = icmp eq i8 %call.i8, 0 %and53.i1.i = and i8 %call.i8, 2 - %19 = xor i8 %and53.i1.i, 2 - %narrow.i = select i1 %cmp.i.i9, i8 1, i8 %19 + %21 = xor i8 %and53.i1.i, 2 + %narrow.i = select i1 %cmp.i.i9, i8 1, i8 %21 %retval.0.i = zext nneg i8 %narrow.i to i32 ret i32 %retval.0.i } diff --git a/bench/cxxopts/optimized/example.cpp.ll b/bench/cxxopts/optimized/example.cpp.ll index abe3643a608..0bb31ab3c62 100644 --- a/bench/cxxopts/optimized/example.cpp.ll +++ b/bench/cxxopts/optimized/example.cpp.ll @@ -26278,8 +26278,8 @@ if.then: ; preds = %entry %sub.ptr.rhs.cast.i = ptrtoint ptr %__first.coerce to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %0 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %sub.ptr.sub.i, i1 true) - %sub.i = shl nuw nsw i64 %0, 1 - %mul = xor i64 %sub.i, 126 + %1 = shl nuw nsw i64 %0, 1 + %mul = sub nuw nsw i64 126, %1 tail call void @_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_(ptr %__first.coerce, ptr %__last.coerce, i64 noundef %mul) %cmp.i1 = icmp sgt i64 %sub.ptr.sub.i, 16 %__i.sroa.0.010.i.ptr.i = getelementptr inbounds nuw i8, ptr %__first.coerce, i64 1 @@ -26289,9 +26289,9 @@ for.body.i.i: ; preds = %if.then, %for.inc.i %__i.sroa.0.013.i.idx.i = phi i64 [ %__i.sroa.0.013.i.add.i, %for.inc.i.i ], [ 1, %if.then ] %__first.coerce.pn12.i.i = phi ptr [ %__i.sroa.0.013.i.ptr.i, %for.inc.i.i ], [ %__first.coerce, %if.then ] %__i.sroa.0.013.i.ptr.i = getelementptr inbounds nuw i8, ptr %__first.coerce, i64 %__i.sroa.0.013.i.idx.i - %1 = load i8, ptr %__i.sroa.0.013.i.ptr.i, align 1 - %2 = load i8, ptr %__first.coerce, align 1 - %cmp.i2.i.i = icmp slt i8 %1, %2 + %2 = load i8, ptr %__i.sroa.0.013.i.ptr.i, align 1 + %3 = load i8, ptr %__first.coerce, align 1 + %cmp.i2.i.i = icmp slt i8 %2, %3 br i1 %cmp.i2.i.i, label %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i, label %if.else.i.i _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i: ; preds = %for.body.i.i @@ -26299,23 +26299,23 @@ _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T br label %for.inc.i.i if.else.i.i: ; preds = %for.body.i.i - %3 = load i8, ptr %__first.coerce.pn12.i.i, align 1 - %cmp.i8.i.i.i = icmp slt i8 %1, %3 + %4 = load i8, ptr %__first.coerce.pn12.i.i, align 1 + %cmp.i8.i.i.i = icmp slt i8 %2, %4 br i1 %cmp.i8.i.i.i, label %while.body.i.i.i, label %for.inc.i.i while.body.i.i.i: ; preds = %if.else.i.i, %while.body.i.i.i - %4 = phi i8 [ %5, %while.body.i.i.i ], [ %3, %if.else.i.i ] + %5 = phi i8 [ %6, %while.body.i.i.i ], [ %4, %if.else.i.i ] %__next.sroa.0.010.i.i.i = phi ptr [ %__next.sroa.0.0.i.i.i, %while.body.i.i.i ], [ %__first.coerce.pn12.i.i, %if.else.i.i ] %__last.sroa.0.09.i.i.i = phi ptr [ %__next.sroa.0.010.i.i.i, %while.body.i.i.i ], [ %__i.sroa.0.013.i.ptr.i, %if.else.i.i ] - store i8 %4, ptr %__last.sroa.0.09.i.i.i, align 1 + store i8 %5, ptr %__last.sroa.0.09.i.i.i, align 1 %__next.sroa.0.0.i.i.i = getelementptr inbounds i8, ptr %__next.sroa.0.010.i.i.i, i64 -1 - %5 = load i8, ptr %__next.sroa.0.0.i.i.i, align 1 - %cmp.i.i.i.i = icmp slt i8 %1, %5 + %6 = load i8, ptr %__next.sroa.0.0.i.i.i, align 1 + %cmp.i.i.i.i = icmp slt i8 %2, %6 br i1 %cmp.i.i.i.i, label %while.body.i.i.i, label %for.inc.i.i, !llvm.loop !240 for.inc.i.i: ; preds = %while.body.i.i.i, %if.else.i.i, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i %__first.coerce.sink.i.i = phi ptr [ %__first.coerce, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i.i ], [ %__i.sroa.0.013.i.ptr.i, %if.else.i.i ], [ %__next.sroa.0.010.i.i.i, %while.body.i.i.i ] - store i8 %1, ptr %__first.coerce.sink.i.i, align 1 + store i8 %2, ptr %__first.coerce.sink.i.i, align 1 %__i.sroa.0.013.i.add.i = add nuw nsw i64 %__i.sroa.0.013.i.idx.i, 1 %cmp.i1.not.i.i = icmp eq i64 %__i.sroa.0.013.i.add.i, 16 br i1 %cmp.i1.not.i.i, label %_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_.exit.i, label %for.body.i.i, !llvm.loop !241 @@ -26327,25 +26327,25 @@ _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5 for.body.i2.i: ; preds = %_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_.exit.i, %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i %__i.sroa.0.03.i.i = phi ptr [ %incdec.ptr.i.i.i, %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i ], [ %add.ptr.i.i, %_ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops15_Iter_less_iterEEvT_S9_T0_.exit.i ] - %6 = load i8, ptr %__i.sroa.0.03.i.i, align 1 + %7 = load i8, ptr %__i.sroa.0.03.i.i, align 1 %__next.sroa.0.07.i.i.i = getelementptr inbounds i8, ptr %__i.sroa.0.03.i.i, i64 -1 - %7 = load i8, ptr %__next.sroa.0.07.i.i.i, align 1 - %cmp.i8.i.i3.i = icmp slt i8 %6, %7 + %8 = load i8, ptr %__next.sroa.0.07.i.i.i, align 1 + %cmp.i8.i.i3.i = icmp slt i8 %7, %8 br i1 %cmp.i8.i.i3.i, label %while.body.i.i4.i, label %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i while.body.i.i4.i: ; preds = %for.body.i2.i, %while.body.i.i4.i - %8 = phi i8 [ %9, %while.body.i.i4.i ], [ %7, %for.body.i2.i ] + %9 = phi i8 [ %10, %while.body.i.i4.i ], [ %8, %for.body.i2.i ] %__next.sroa.0.010.i.i5.i = phi ptr [ %__next.sroa.0.0.i.i7.i, %while.body.i.i4.i ], [ %__next.sroa.0.07.i.i.i, %for.body.i2.i ] %__last.sroa.0.09.i.i6.i = phi ptr [ %__next.sroa.0.010.i.i5.i, %while.body.i.i4.i ], [ %__i.sroa.0.03.i.i, %for.body.i2.i ] - store i8 %8, ptr %__last.sroa.0.09.i.i6.i, align 1 + store i8 %9, ptr %__last.sroa.0.09.i.i6.i, align 1 %__next.sroa.0.0.i.i7.i = getelementptr inbounds i8, ptr %__next.sroa.0.010.i.i5.i, i64 -1 - %9 = load i8, ptr %__next.sroa.0.0.i.i7.i, align 1 - %cmp.i.i.i8.i = icmp slt i8 %6, %9 + %10 = load i8, ptr %__next.sroa.0.0.i.i7.i, align 1 + %cmp.i.i.i8.i = icmp slt i8 %7, %10 br i1 %cmp.i.i.i8.i, label %while.body.i.i4.i, label %_ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i, !llvm.loop !240 _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEENS0_5__ops14_Val_less_iterEEvT_T0_.exit.i.i: ; preds = %while.body.i.i4.i, %for.body.i2.i %__last.sroa.0.0.lcssa.i.i.i = phi ptr [ %__i.sroa.0.03.i.i, %for.body.i2.i ], [ %__next.sroa.0.010.i.i5.i, %while.body.i.i4.i ] - store i8 %6, ptr %__last.sroa.0.0.lcssa.i.i.i, align 1 + store i8 %7, ptr %__last.sroa.0.0.lcssa.i.i.i, align 1 %incdec.ptr.i.i.i = getelementptr inbounds nuw i8, ptr %__i.sroa.0.03.i.i, i64 1 %cmp.i.not.i.i = icmp eq ptr %incdec.ptr.i.i.i, %__last.coerce br i1 %cmp.i.not.i.i, label %if.end, label %for.body.i2.i, !llvm.loop !242 @@ -26357,9 +26357,9 @@ for.cond.preheader.i10.i: ; preds = %if.then for.body.i15.i: ; preds = %for.cond.preheader.i10.i, %for.inc.i21.i %__i.sroa.0.013.i16.i = phi ptr [ %__i.sroa.0.0.i23.i, %for.inc.i21.i ], [ %__i.sroa.0.010.i.ptr.i, %for.cond.preheader.i10.i ] %__first.coerce.pn12.i17.i = phi ptr [ %__i.sroa.0.013.i16.i, %for.inc.i21.i ], [ %__first.coerce, %for.cond.preheader.i10.i ] - %10 = load i8, ptr %__i.sroa.0.013.i16.i, align 1 - %11 = load i8, ptr %__first.coerce, align 1 - %cmp.i2.i18.i = icmp slt i8 %10, %11 + %11 = load i8, ptr %__i.sroa.0.013.i16.i, align 1 + %12 = load i8, ptr %__first.coerce, align 1 + %cmp.i2.i18.i = icmp slt i8 %11, %12 br i1 %cmp.i2.i18.i, label %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i, label %if.else.i19.i _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i: ; preds = %for.body.i15.i @@ -26369,23 +26369,23 @@ _ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T br label %for.inc.i21.i if.else.i19.i: ; preds = %for.body.i15.i - %12 = load i8, ptr %__first.coerce.pn12.i17.i, align 1 - %cmp.i8.i.i20.i = icmp slt i8 %10, %12 + %13 = load i8, ptr %__first.coerce.pn12.i17.i, align 1 + %cmp.i8.i.i20.i = icmp slt i8 %11, %13 br i1 %cmp.i8.i.i20.i, label %while.body.i.i25.i, label %for.inc.i21.i while.body.i.i25.i: ; preds = %if.else.i19.i, %while.body.i.i25.i - %13 = phi i8 [ %14, %while.body.i.i25.i ], [ %12, %if.else.i19.i ] + %14 = phi i8 [ %15, %while.body.i.i25.i ], [ %13, %if.else.i19.i ] %__next.sroa.0.010.i.i26.i = phi ptr [ %__next.sroa.0.0.i.i28.i, %while.body.i.i25.i ], [ %__first.coerce.pn12.i17.i, %if.else.i19.i ] %__last.sroa.0.09.i.i27.i = phi ptr [ %__next.sroa.0.010.i.i26.i, %while.body.i.i25.i ], [ %__i.sroa.0.013.i16.i, %if.else.i19.i ] - store i8 %13, ptr %__last.sroa.0.09.i.i27.i, align 1 + store i8 %14, ptr %__last.sroa.0.09.i.i27.i, align 1 %__next.sroa.0.0.i.i28.i = getelementptr inbounds i8, ptr %__next.sroa.0.010.i.i26.i, i64 -1 - %14 = load i8, ptr %__next.sroa.0.0.i.i28.i, align 1 - %cmp.i.i.i29.i = icmp slt i8 %10, %14 + %15 = load i8, ptr %__next.sroa.0.0.i.i28.i, align 1 + %cmp.i.i.i29.i = icmp slt i8 %11, %15 br i1 %cmp.i.i.i29.i, label %while.body.i.i25.i, label %for.inc.i21.i, !llvm.loop !240 for.inc.i21.i: ; preds = %while.body.i.i25.i, %if.else.i19.i, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i %__first.coerce.sink.i22.i = phi ptr [ %__first.coerce, %_ZSt13move_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit.i30.i ], [ %__i.sroa.0.013.i16.i, %if.else.i19.i ], [ %__next.sroa.0.010.i.i26.i, %while.body.i.i25.i ] - store i8 %10, ptr %__first.coerce.sink.i22.i, align 1 + store i8 %11, ptr %__first.coerce.sink.i22.i, align 1 %__i.sroa.0.0.i23.i = getelementptr inbounds nuw i8, ptr %__i.sroa.0.013.i16.i, i64 1 %cmp.i1.not.i24.i = icmp eq ptr %__i.sroa.0.0.i23.i, %__last.coerce br i1 %cmp.i1.not.i24.i, label %if.end, label %for.body.i15.i, !llvm.loop !241 diff --git a/bench/eastl/optimized/BenchmarkTupleVector.cpp.ll b/bench/eastl/optimized/BenchmarkTupleVector.cpp.ll index f68e6c4a624..515796b6d98 100644 --- a/bench/eastl/optimized/BenchmarkTupleVector.cpp.ll +++ b/bench/eastl/optimized/BenchmarkTupleVector.cpp.ll @@ -1504,7 +1504,7 @@ if.then.i.i358: ; preds = %while.body.i %sub.i.i = sub nuw nsw i64 %add.i349, %sub.ptr.div.i32.i %sub.ptr.sub.i14.i.i = sub i64 %sub.ptr.lhs.cast.i7.i, %sub.ptr.lhs.cast.i29.i %sub.ptr.div.i15.i.i = ashr exact i64 %sub.ptr.sub.i14.i.i, 3 - %sub.i.i.i = xor i64 %sub.ptr.div.i32.i, 1152921504606846975 + %sub.i.i.i = sub nuw nsw i64 1152921504606846975, %sub.ptr.div.i32.i %cmp6.i.i.i = icmp ule i64 %sub.ptr.div.i15.i.i, %sub.i.i.i call void @llvm.assume(i1 %cmp6.i.i.i) %cmp8.not.i.i.i = icmp ult i64 %sub.ptr.div.i15.i.i, %sub.i.i @@ -1573,7 +1573,7 @@ _ZSt27__uninitialized_default_n_aIPN12_GLOBAL__N_111MovableTypeEmS1_ET_S3_T0_RSa br label %_ZNSt6vectorIN12_GLOBAL__N_111MovableTypeESaIS1_EE6resizeEm.exit.i if.else.i.i11.i: ; preds = %if.then.i.i358 - %cmp.i.i.i12.i = icmp ult i64 %sub.i.i.i, %sub.i.i + %cmp.i.i.i12.i = icmp ugt i64 %add.i349, 1152921504606846975 br i1 %cmp.i.i.i12.i, label %if.then.i.i.i14.i, label %_ZNKSt6vectorIN12_GLOBAL__N_111MovableTypeESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i if.then.i.i.i14.i: ; preds = %if.else.i.i11.i @@ -1692,7 +1692,7 @@ if.then.i52.i.i.i: ; preds = %_ZNSt6vectorIN12_GL _ZNSt12_Vector_baseIN12_GLOBAL__N_111MovableTypeESaIS1_EE13_M_deallocateEPS1_m.exit53.i.i.i: ; preds = %if.then.i52.i.i.i, %_ZNSt6vectorIN12_GLOBAL__N_111MovableTypeESaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit.i.i.i store ptr %call5.i.i.i.i.i.i364, ptr %stdVectorMovableType, align 8 - %add.ptr37.i.i.i = getelementptr inbounds %"struct.(anonymous namespace)::MovableType", ptr %add.ptr.i.i.i359, i64 %sub.i.i + %add.ptr37.i.i.i = getelementptr inbounds nuw %"struct.(anonymous namespace)::MovableType", ptr %add.ptr.i.i.i359, i64 %sub.i.i store ptr %add.ptr37.i.i.i, ptr %0, align 8 %add.ptr40.i.i.i = getelementptr inbounds nuw %"struct.(anonymous namespace)::MovableType", ptr %call5.i.i.i.i.i.i364, i64 %112 store ptr %add.ptr40.i.i.i, ptr %1, align 8 diff --git a/bench/freetype/optimized/autofit.c.ll b/bench/freetype/optimized/autofit.c.ll index 896fbe61d13..99ce3f49709 100644 --- a/bench/freetype/optimized/autofit.c.ll +++ b/bench/freetype/optimized/autofit.c.ll @@ -11890,7 +11890,7 @@ define internal fastcc i64 @af_loader_compute_darkening(ptr nocapture readonly % %7 = shl nuw nsw i64 %6, 16 %8 = tail call i64 @FT_DivFix(i64 noundef 65536000, i64 noundef %7) #20 %9 = icmp slt i64 %8, 655 - br i1 %9, label %127, label %10 + br i1 %9, label %125, label %10 10: ; preds = %1 %11 = getelementptr inbounds nuw i8, ptr %.8.val.792.val, i64 36 @@ -11930,140 +11930,138 @@ define internal fastcc i64 @af_loader_compute_darkening(ptr nocapture readonly % %.078 = phi i64 [ %38, %28 ], [ 4915200, %10 ] %40 = trunc nsw i64 %.078 to i32 %41 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %40, i1 true) - %42 = xor i32 %41, 31 - %43 = trunc nuw i64 %5 to i32 - %44 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %43, i1 true) - %45 = xor i32 %44, 31 - %46 = add nuw nsw i32 %42, %45 - %47 = icmp samesign ugt i32 %46, 45 - br i1 %47, label %48, label %51 - -48: ; preds = %39 - %49 = shl i32 %24, 16 - %50 = zext i32 %49 to i64 - br label %59 - -51: ; preds = %39 - %sext3 = shl nuw i64 %5, 32 - %52 = ashr exact i64 %sext3, 32 - %53 = mul nsw i64 %.078, %52 - %54 = ashr i64 %53, 63 - %55 = or disjoint i64 %53, 32768 - %56 = add nsw i64 %55, %54 - %57 = shl i64 %56, 16 - %58 = ashr i64 %57, 32 - br label %59 + %42 = trunc nuw i64 %5 to i32 + %43 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %42, i1 true) + %44 = add nuw nsw i32 %41, %43 + %45 = icmp samesign ult i32 %44, 17 + br i1 %45, label %46, label %49 -59: ; preds = %51, %48 - %.079 = phi i64 [ %50, %48 ], [ %58, %51 ] - %60 = shl i32 %12, 16 - %61 = zext i32 %60 to i64 - %62 = icmp slt i64 %.079, %61 - br i1 %62, label %63, label %67 - -63: ; preds = %59 - %64 = shl i32 %14, 16 - %65 = zext i32 %64 to i64 - %66 = tail call i64 @FT_DivFix(i64 noundef %65, i64 noundef %5) #20 - br label %125 +46: ; preds = %39 + %47 = shl i32 %24, 16 + %48 = zext i32 %47 to i64 + br label %57 -67: ; preds = %59 - %68 = shl i32 %16, 16 - %69 = zext i32 %68 to i64 - %70 = icmp samesign ult i64 %.079, %69 - br i1 %70, label %71, label %85 +49: ; preds = %39 + %sext3 = shl nuw i64 %5, 32 + %50 = ashr exact i64 %sext3, 32 + %51 = mul nsw i64 %.078, %50 + %52 = ashr i64 %51, 63 + %53 = or disjoint i64 %51, 32768 + %54 = add nsw i64 %53, %52 + %55 = shl i64 %54, 16 + %56 = ashr i64 %55, 32 + br label %57 -71: ; preds = %67 - %72 = tail call i64 @FT_DivFix(i64 noundef %61, i64 noundef %5) #20 +57: ; preds = %49, %46 + %.079 = phi i64 [ %48, %46 ], [ %56, %49 ] + %58 = shl i32 %12, 16 + %59 = zext i32 %58 to i64 + %60 = icmp slt i64 %.079, %59 + br i1 %60, label %61, label %65 + +61: ; preds = %57 + %62 = shl i32 %14, 16 + %63 = zext i32 %62 to i64 + %64 = tail call i64 @FT_DivFix(i64 noundef %63, i64 noundef %5) #20 + br label %123 + +65: ; preds = %57 + %66 = shl i32 %16, 16 + %67 = zext i32 %66 to i64 + %68 = icmp samesign ult i64 %.079, %67 + br i1 %68, label %69, label %83 + +69: ; preds = %65 + %70 = tail call i64 @FT_DivFix(i64 noundef %59, i64 noundef %5) #20 %.not = icmp eq i32 %16, %12 - br i1 %.not, label %89, label %73 - -73: ; preds = %71 - %74 = sub nsw i32 %16, %12 - %75 = sub nsw i64 %.078, %72 - %76 = sub nsw i32 %18, %14 - %sext91 = shl i64 %75, 32 - %77 = ashr exact i64 %sext91, 32 - %78 = sext i32 %76 to i64 - %79 = sext i32 %74 to i64 - %80 = tail call i64 @FT_MulDiv(i64 noundef %77, i64 noundef %78, i64 noundef %79) #20 - %81 = shl i32 %14, 16 - %82 = zext i32 %81 to i64 - %83 = tail call i64 @FT_DivFix(i64 noundef %82, i64 noundef %5) #20 - %84 = add nsw i64 %83, %80 - br label %125 - -85: ; preds = %67 - %86 = shl i32 %20, 16 - %87 = zext i32 %86 to i64 - %88 = icmp samesign ult i64 %.079, %87 - br i1 %88, label %89, label %103 + br i1 %.not, label %87, label %71 -89: ; preds = %85, %71 - %90 = tail call i64 @FT_DivFix(i64 noundef %69, i64 noundef %5) #20 +71: ; preds = %69 + %72 = sub nsw i32 %16, %12 + %73 = sub nsw i64 %.078, %70 + %74 = sub nsw i32 %18, %14 + %sext91 = shl i64 %73, 32 + %75 = ashr exact i64 %sext91, 32 + %76 = sext i32 %74 to i64 + %77 = sext i32 %72 to i64 + %78 = tail call i64 @FT_MulDiv(i64 noundef %75, i64 noundef %76, i64 noundef %77) #20 + %79 = shl i32 %14, 16 + %80 = zext i32 %79 to i64 + %81 = tail call i64 @FT_DivFix(i64 noundef %80, i64 noundef %5) #20 + %82 = add nsw i64 %81, %78 + br label %123 + +83: ; preds = %65 + %84 = shl i32 %20, 16 + %85 = zext i32 %84 to i64 + %86 = icmp samesign ult i64 %.079, %85 + br i1 %86, label %87, label %101 + +87: ; preds = %83, %69 + %88 = tail call i64 @FT_DivFix(i64 noundef %67, i64 noundef %5) #20 %.not88 = icmp eq i32 %20, %16 - br i1 %.not88, label %._crit_edge, label %91 + br i1 %.not88, label %._crit_edge, label %89 -._crit_edge: ; preds = %89 +._crit_edge: ; preds = %87 %.pre = shl i32 %20, 16 %.pre5 = zext i32 %.pre to i64 - br label %107 - -91: ; preds = %89 - %92 = sub nsw i32 %20, %16 - %93 = sub nsw i64 %.078, %90 - %94 = sub nsw i32 %22, %18 - %sext90 = shl i64 %93, 32 - %95 = ashr exact i64 %sext90, 32 - %96 = sext i32 %94 to i64 - %97 = sext i32 %92 to i64 - %98 = tail call i64 @FT_MulDiv(i64 noundef %95, i64 noundef %96, i64 noundef %97) #20 - %99 = shl i32 %18, 16 - %100 = zext i32 %99 to i64 - %101 = tail call i64 @FT_DivFix(i64 noundef %100, i64 noundef %5) #20 - %102 = add nsw i64 %101, %98 - br label %125 - -103: ; preds = %85 - %104 = shl i32 %24, 16 - %105 = zext i32 %104 to i64 - %106 = icmp samesign ult i64 %.079, %105 - br i1 %106, label %107, label %121 + br label %105 -107: ; preds = %._crit_edge, %103 - %.pre-phi6 = phi i64 [ %.pre5, %._crit_edge ], [ %87, %103 ] - %108 = tail call i64 @FT_DivFix(i64 noundef %.pre-phi6, i64 noundef %5) #20 +89: ; preds = %87 + %90 = sub nsw i32 %20, %16 + %91 = sub nsw i64 %.078, %88 + %92 = sub nsw i32 %22, %18 + %sext90 = shl i64 %91, 32 + %93 = ashr exact i64 %sext90, 32 + %94 = sext i32 %92 to i64 + %95 = sext i32 %90 to i64 + %96 = tail call i64 @FT_MulDiv(i64 noundef %93, i64 noundef %94, i64 noundef %95) #20 + %97 = shl i32 %18, 16 + %98 = zext i32 %97 to i64 + %99 = tail call i64 @FT_DivFix(i64 noundef %98, i64 noundef %5) #20 + %100 = add nsw i64 %99, %96 + br label %123 + +101: ; preds = %83 + %102 = shl i32 %24, 16 + %103 = zext i32 %102 to i64 + %104 = icmp samesign ult i64 %.079, %103 + br i1 %104, label %105, label %119 + +105: ; preds = %._crit_edge, %101 + %.pre-phi6 = phi i64 [ %.pre5, %._crit_edge ], [ %85, %101 ] + %106 = tail call i64 @FT_DivFix(i64 noundef %.pre-phi6, i64 noundef %5) #20 %.not89 = icmp eq i32 %24, %20 - br i1 %.not89, label %121, label %109 - -109: ; preds = %107 - %110 = sub nsw i32 %24, %20 - %111 = sub nsw i64 %.078, %108 - %112 = sub nsw i32 %26, %22 - %sext = shl i64 %111, 32 - %113 = ashr exact i64 %sext, 32 - %114 = sext i32 %112 to i64 - %115 = sext i32 %110 to i64 - %116 = tail call i64 @FT_MulDiv(i64 noundef %113, i64 noundef %114, i64 noundef %115) #20 - %117 = shl i32 %22, 16 - %118 = zext i32 %117 to i64 - %119 = tail call i64 @FT_DivFix(i64 noundef %118, i64 noundef %5) #20 - %120 = add nsw i64 %119, %116 - br label %125 + br i1 %.not89, label %119, label %107 + +107: ; preds = %105 + %108 = sub nsw i32 %24, %20 + %109 = sub nsw i64 %.078, %106 + %110 = sub nsw i32 %26, %22 + %sext = shl i64 %109, 32 + %111 = ashr exact i64 %sext, 32 + %112 = sext i32 %110 to i64 + %113 = sext i32 %108 to i64 + %114 = tail call i64 @FT_MulDiv(i64 noundef %111, i64 noundef %112, i64 noundef %113) #20 + %115 = shl i32 %22, 16 + %116 = zext i32 %115 to i64 + %117 = tail call i64 @FT_DivFix(i64 noundef %116, i64 noundef %5) #20 + %118 = add nsw i64 %117, %114 + br label %123 + +119: ; preds = %101, %105 + %120 = shl i32 %26, 16 + %121 = zext i32 %120 to i64 + %122 = tail call i64 @FT_DivFix(i64 noundef %121, i64 noundef %5) #20 + br label %123 -121: ; preds = %103, %107 - %122 = shl i32 %26, 16 - %123 = zext i32 %122 to i64 - %124 = tail call i64 @FT_DivFix(i64 noundef %123, i64 noundef %5) #20 +123: ; preds = %71, %107, %119, %89, %61 + %.080 = phi i64 [ %64, %61 ], [ %82, %71 ], [ %100, %89 ], [ %118, %107 ], [ %122, %119 ] + %124 = tail call i64 @FT_DivFix(i64 noundef %.080, i64 noundef %8) #20 br label %125 -125: ; preds = %73, %109, %121, %91, %63 - %.080 = phi i64 [ %66, %63 ], [ %84, %73 ], [ %102, %91 ], [ %120, %109 ], [ %124, %121 ] - %126 = tail call i64 @FT_DivFix(i64 noundef %.080, i64 noundef %8) #20 - br label %127 - -127: ; preds = %1, %125 - %.0 = phi i64 [ %126, %125 ], [ 0, %1 ] +125: ; preds = %1, %123 + %.0 = phi i64 [ %124, %123 ], [ 0, %1 ] ret i64 %.0 } diff --git a/bench/freetype/optimized/ftbbox.c.ll b/bench/freetype/optimized/ftbbox.c.ll index d423ad02bd5..d4a297a0dcb 100644 --- a/bench/freetype/optimized/ftbbox.c.ll +++ b/bench/freetype/optimized/ftbbox.c.ll @@ -410,35 +410,34 @@ define internal fastcc void @BBox_Cubic_Check(i64 noundef %0, i64 noundef %1, i6 %21 = or i64 %19, %20 %22 = trunc i64 %21 to i32 %23 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %22, i1 true) - %24 = xor i32 %23, 31 - %25 = sub nsw i32 27, %24 - %26 = icmp samesign ult i32 %24, 27 - br i1 %26, label %27, label %33 - -27: ; preds = %10 - %spec.store.select.i = tail call i32 @llvm.smin.i32(i32 %25, i32 2) - %28 = zext nneg i32 %spec.store.select.i to i64 - %29 = shl i64 %11, %28 - %30 = shl i64 %12, %28 - %31 = shl i64 %13, %28 - %32 = shl i64 %14, %28 + %24 = add nsw i32 %23, -4 + %25 = icmp ult i32 %22, 134217728 + br i1 %25, label %26, label %32 + +26: ; preds = %10 + %spec.store.select.i = tail call i32 @llvm.smin.i32(i32 %24, i32 2) + %27 = zext nneg i32 %spec.store.select.i to i64 + %28 = shl i64 %11, %27 + %29 = shl i64 %12, %27 + %30 = shl i64 %13, %27 + %31 = shl i64 %14, %27 br label %39 -33: ; preds = %10 - %.neg.i = sub nsw i32 4, %23 - %34 = zext nneg i32 %.neg.i to i64 +32: ; preds = %10 + %33 = sub nsw i32 4, %23 + %34 = zext nneg i32 %33 to i64 %35 = ashr i64 %11, %34 %36 = ashr i64 %12, %34 %37 = ashr i64 %13, %34 %38 = ashr i64 %14, %34 br label %39 -39: ; preds = %33, %27 - %.089.i = phi i64 [ %29, %27 ], [ %35, %33 ] - %.086.i = phi i64 [ %30, %27 ], [ %36, %33 ] - %.083.i = phi i64 [ %31, %27 ], [ %37, %33 ] - %.081.i = phi i64 [ %32, %27 ], [ %38, %33 ] - %.0.i = phi i32 [ %spec.store.select.i, %27 ], [ %25, %33 ] +39: ; preds = %32, %26 + %.089.i = phi i64 [ %28, %26 ], [ %35, %32 ] + %.086.i = phi i64 [ %29, %26 ], [ %36, %32 ] + %.083.i = phi i64 [ %30, %26 ], [ %37, %32 ] + %.081.i = phi i64 [ %31, %26 ], [ %38, %32 ] + %.0.i = phi i32 [ %spec.store.select.i, %26 ], [ %24, %32 ] br label %40 40: ; preds = %65, %39 @@ -526,52 +525,51 @@ cubic_peak.exit: ; preds = %40, %63, %65 %89 = or i64 %87, %88 %90 = trunc i64 %89 to i32 %91 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %90, i1 true) - %92 = xor i32 %91, 31 - %93 = sub nsw i32 27, %92 - %94 = icmp samesign ult i32 %92, 27 - br i1 %94, label %95, label %101 - -95: ; preds = %78 - %spec.store.select.i47 = tail call i32 @llvm.smin.i32(i32 %93, i32 2) - %96 = zext nneg i32 %spec.store.select.i47 to i64 - %97 = shl i64 %79, %96 - %98 = shl i64 %80, %96 - %99 = shl i64 %81, %96 - %100 = shl i64 %82, %96 + %92 = add nsw i32 %91, -4 + %93 = icmp ult i32 %90, 134217728 + br i1 %93, label %94, label %100 + +94: ; preds = %78 + %spec.store.select.i46 = tail call i32 @llvm.smin.i32(i32 %92, i32 2) + %95 = zext nneg i32 %spec.store.select.i46 to i64 + %96 = shl i64 %79, %95 + %97 = shl i64 %80, %95 + %98 = shl i64 %81, %95 + %99 = shl i64 %82, %95 br label %107 -101: ; preds = %78 - %.neg.i27 = sub nsw i32 4, %91 - %102 = zext nneg i32 %.neg.i27 to i64 +100: ; preds = %78 + %101 = sub nsw i32 4, %91 + %102 = zext nneg i32 %101 to i64 %103 = ashr i64 %79, %102 %104 = ashr i64 %80, %102 %105 = ashr i64 %81, %102 %106 = ashr i64 %82, %102 br label %107 -107: ; preds = %101, %95 - %.089.i28 = phi i64 [ %97, %95 ], [ %103, %101 ] - %.086.i29 = phi i64 [ %98, %95 ], [ %104, %101 ] - %.083.i30 = phi i64 [ %99, %95 ], [ %105, %101 ] - %.081.i31 = phi i64 [ %100, %95 ], [ %106, %101 ] - %.0.i32 = phi i32 [ %spec.store.select.i47, %95 ], [ %93, %101 ] +107: ; preds = %100, %94 + %.089.i27 = phi i64 [ %96, %94 ], [ %103, %100 ] + %.086.i28 = phi i64 [ %97, %94 ], [ %104, %100 ] + %.083.i29 = phi i64 [ %98, %94 ], [ %105, %100 ] + %.081.i30 = phi i64 [ %99, %94 ], [ %106, %100 ] + %.0.i31 = phi i32 [ %spec.store.select.i46, %94 ], [ %92, %100 ] br label %108 108: ; preds = %133, %107 - %.190.i33 = phi i64 [ %.089.i28, %107 ], [ %.291.i39, %133 ] - %.187.i34 = phi i64 [ %.086.i29, %107 ], [ %.288.i40, %133 ] - %.184.i35 = phi i64 [ %.083.i30, %107 ], [ %.285.i41, %133 ] - %.182.i36 = phi i64 [ %.081.i31, %107 ], [ %.2.i42, %133 ] - %109 = icmp sgt i64 %.187.i34, 0 - %110 = icmp sgt i64 %.184.i35, 0 + %.190.i32 = phi i64 [ %.089.i27, %107 ], [ %.291.i38, %133 ] + %.187.i33 = phi i64 [ %.086.i28, %107 ], [ %.288.i39, %133 ] + %.184.i34 = phi i64 [ %.083.i29, %107 ], [ %.285.i40, %133 ] + %.182.i35 = phi i64 [ %.081.i30, %107 ], [ %.2.i41, %133 ] + %109 = icmp sgt i64 %.187.i33, 0 + %110 = icmp sgt i64 %.184.i34, 0 %111 = select i1 %109, i1 true, i1 %110 - br i1 %111, label %112, label %cubic_peak.exit48 + br i1 %111, label %112, label %cubic_peak.exit47 112: ; preds = %108 - %113 = add nsw i64 %.187.i34, %.190.i33 - %114 = add nsw i64 %.182.i36, %.184.i35 + %113 = add nsw i64 %.187.i33, %.190.i32 + %114 = add nsw i64 %.182.i35, %.184.i34 %115 = icmp sgt i64 %113, %114 - %116 = add nsw i64 %.184.i35, %.187.i34 + %116 = add nsw i64 %.184.i34, %.187.i33 br i1 %115, label %117, label %124 117: ; preds = %112 @@ -593,35 +591,35 @@ cubic_peak.exit: ; preds = %40, %63, %65 br label %131 131: ; preds = %124, %117 - %.291.i39 = phi i64 [ %.190.i33, %117 ], [ %128, %124 ] - %.288.i40 = phi i64 [ %123, %117 ], [ %129, %124 ] - %.285.i41 = phi i64 [ %122, %117 ], [ %130, %124 ] - %.2.i42 = phi i64 [ %121, %117 ], [ %.182.i36, %124 ] - %132 = icmp ne i64 %.291.i39, %.288.i40 - %.not.i43 = icmp slt i64 %.291.i39, %.285.i41 - %or.cond.i44 = select i1 %132, i1 true, i1 %.not.i43 - br i1 %or.cond.i44, label %133, label %cubic_peak.exit48 + %.291.i38 = phi i64 [ %.190.i32, %117 ], [ %128, %124 ] + %.288.i39 = phi i64 [ %123, %117 ], [ %129, %124 ] + %.285.i40 = phi i64 [ %122, %117 ], [ %130, %124 ] + %.2.i41 = phi i64 [ %121, %117 ], [ %.182.i35, %124 ] + %132 = icmp ne i64 %.291.i38, %.288.i39 + %.not.i42 = icmp slt i64 %.291.i38, %.285.i40 + %or.cond.i43 = select i1 %132, i1 true, i1 %.not.i42 + br i1 %or.cond.i43, label %133, label %cubic_peak.exit47 133: ; preds = %131 - %134 = icmp ne i64 %.285.i41, %.2.i42 - %.not98.i45 = icmp sgt i64 %.288.i40, %.2.i42 - %or.cond99.i46 = or i1 %134, %.not98.i45 - br i1 %or.cond99.i46, label %108, label %cubic_peak.exit48, !llvm.loop !6 - -cubic_peak.exit48: ; preds = %108, %131, %133 - %.080.i37 = phi i64 [ 0, %108 ], [ %.291.i39, %131 ], [ %.285.i41, %133 ] - %135 = icmp sgt i32 %.0.i32, 0 - %136 = zext nneg i32 %.0.i32 to i64 - %137 = ashr i64 %.080.i37, %136 - %138 = sub nsw i32 0, %.0.i32 + %134 = icmp ne i64 %.285.i40, %.2.i41 + %.not98.i44 = icmp sgt i64 %.288.i39, %.2.i41 + %or.cond99.i45 = or i1 %134, %.not98.i44 + br i1 %or.cond99.i45, label %108, label %cubic_peak.exit47, !llvm.loop !6 + +cubic_peak.exit47: ; preds = %108, %131, %133 + %.080.i36 = phi i64 [ 0, %108 ], [ %.291.i38, %131 ], [ %.285.i40, %133 ] + %135 = icmp sgt i32 %.0.i31, 0 + %136 = zext nneg i32 %.0.i31 to i64 + %137 = ashr i64 %.080.i36, %136 + %138 = sub nsw i32 0, %.0.i31 %139 = zext nneg i32 %138 to i64 - %140 = shl i64 %.080.i37, %139 - %.1.i38 = select i1 %135, i64 %137, i64 %140 - %141 = sub nsw i64 %75, %.1.i38 + %140 = shl i64 %.080.i36, %139 + %.1.i37 = select i1 %135, i64 %137, i64 %140 + %141 = sub nsw i64 %75, %.1.i37 store i64 %141, ptr %4, align 8 br label %142 -142: ; preds = %74, %cubic_peak.exit48 +142: ; preds = %74, %cubic_peak.exit47 ret void } diff --git a/bench/g2o/optimized/structure_only.cpp.ll b/bench/g2o/optimized/structure_only.cpp.ll index 3bd54f237e7..3e689108431 100644 --- a/bench/g2o/optimized/structure_only.cpp.ll +++ b/bench/g2o/optimized/structure_only.cpp.ll @@ -1384,10 +1384,10 @@ define linkonce_odr noundef zeroext i1 @_ZN5Eigen8internal12ldlt_inplaceILi1EE9u %5 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %6 -6: ; preds = %4, %85 - %.0108389 = phi i1 [ false, %4 ], [ %.1, %85 ] - %.0110388 = phi i8 [ 1, %4 ], [ %.3, %85 ] - %.0112387 = phi i64 [ 0, %4 ], [ %.pre-phi, %85 ] +6: ; preds = %4, %84 + %.0108389 = phi i1 [ false, %4 ], [ %.1, %84 ] + %.0110388 = phi i8 [ 1, %4 ], [ %.3, %84 ] + %.0112387 = phi i64 [ 0, %4 ], [ %.pre-phi, %84 ] %7 = icmp eq i64 %.0112387, 0 br i1 %7, label %.lr.ph.i.i.i.i, label %_ZNK5Eigen9DenseBaseINS_12CwiseUnaryOpINS_8internal13scalar_abs_opIdEEKNS_5BlockINS_8DiagonalINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi0EEELin1ELi1ELb0EEEEEE8maxCoeffIlEEdPT_.exit.thread @@ -1432,13 +1432,13 @@ _ZN5Eigen9DenseBaseINS_5BlockINS1_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi1ELi2ELb0 %24 = getelementptr inbounds nuw i8, ptr %23, i64 %.idx.i.i.i.pre-phi %25 = getelementptr double, ptr %0, i64 %.0112387 %.not118.not = icmp eq i64 %.0112387, 0 - br i1 %.not118.not, label %26, label %56 + br i1 %.not118.not, label %26, label %55 26: ; preds = %.loopexit374 %.phi.trans.insert = getelementptr i8, ptr %25, i64 %.idx.i.i.i.pre-phi %.pre = load double, ptr %.phi.trans.insert, align 8 %27 = fcmp ueq double %.pre, 0.000000e+00 - br i1 %27, label %28, label %45 + br i1 %27, label %28, label %44 28: ; preds = %26 store i32 2, ptr %3, align 4 @@ -1449,7 +1449,7 @@ _ZN5Eigen9DenseBaseINS_5BlockINS1_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi1ELi2ELb0 %.not371 = phi i1 [ false, %28 ], [ true, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] %31 = phi i1 [ true, %28 ], [ false, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] %.0391 = phi i64 [ 0, %28 ], [ 1, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] - %.1111390 = phi i1 [ %29, %28 ], [ %44, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] + %.1111390 = phi i1 [ %29, %28 ], [ %43, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] %32 = trunc nuw nsw i64 %.0391 to i32 %33 = getelementptr inbounds nuw i32, ptr %1, i64 %.0391 store i32 %32, ptr %33, align 4 @@ -1458,132 +1458,130 @@ _ZN5Eigen9DenseBaseINS_5BlockINS1_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi1ELi2ELb0 34: ; preds = %30 %.idx.i.i.i.i136 = shl nuw nsw i64 %.0391, 4 %35 = getelementptr inbounds nuw i8, ptr %0, i64 %.idx.i.i.i.i136 - %36 = getelementptr inbounds nuw double, ptr %35, i64 %.0391 - %37 = getelementptr inbounds nuw i8, ptr %36, i64 8 + %36 = sub nuw nsw i64 1, %.0391 + %37 = getelementptr inbounds nuw double, ptr %35, i64 %.0391 + %38 = getelementptr inbounds nuw i8, ptr %37, i64 8 br i1 %.not371, label %.loopexit, label %.preheader.us.i -38: ; preds = %.preheader.us.i - %39 = add nuw nsw i64 %.01014.us.i, 1 - %40 = xor i64 %.0391, %39 - %exitcond.not.i = icmp eq i64 %40, 1 - br i1 %exitcond.not.i, label %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit, label %.preheader.us.i, !llvm.loop !18 - -.preheader.us.i: ; preds = %34, %38 - %.01014.us.i = phi i64 [ %39, %38 ], [ 0, %34 ] - %41 = getelementptr double, ptr %37, i64 %.01014.us.i - %42 = load double, ptr %41, align 8 - %43 = fcmp oeq double %42, 0.000000e+00 - br i1 %43, label %38, label %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit - -_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit: ; preds = %.preheader.us.i, %38, %30 - %44 = phi i1 [ false, %30 ], [ %43, %38 ], [ %43, %.preheader.us.i ] +.preheader.us.i: ; preds = %34, %.preheader.us.i + %.01014.us.i = phi i64 [ %42, %.preheader.us.i ], [ 0, %34 ] + %39 = getelementptr double, ptr %38, i64 %.01014.us.i + %40 = load double, ptr %39, align 8 + %41 = fcmp oeq double %40, 0.000000e+00 + %42 = add nuw nsw i64 %.01014.us.i, 1 + %exitcond.not.i = icmp ne i64 %42, %36 + %or.cond.not = select i1 %41, i1 %exitcond.not.i, i1 false + br i1 %or.cond.not, label %.preheader.us.i, label %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit, !llvm.loop !18 + +_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit: ; preds = %.preheader.us.i, %30 + %43 = phi i1 [ false, %30 ], [ %41, %.preheader.us.i ] br i1 %31, label %30, label %.loopexit, !llvm.loop !19 -45: ; preds = %26 - br i1 %7, label %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i138, label %66 +44: ; preds = %26 + br i1 %7, label %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i138, label %65 -_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i138: ; preds = %45 - %46 = ptrtoint ptr %24 to i64 - %47 = lshr exact i64 %46, 3 - %48 = and i64 %47, 1 - %.not400 = icmp eq i64 %48, 0 +_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i138: ; preds = %44 + %45 = ptrtoint ptr %24 to i64 + %46 = lshr exact i64 %45, 3 + %47 = and i64 %46, 1 + %.not400 = icmp eq i64 %47, 0 br i1 %.not400, label %._crit_edge.i.i.i.i.i.i140, label %.lr.ph.i.i.i.i.i.i.i146.preheader .lr.ph.i.i.i.i.i.i.i146.preheader: ; preds = %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i138 - %49 = load double, ptr %24, align 8 - %50 = fdiv double %49, %.pre - store double %50, ptr %24, align 8 + %48 = load double, ptr %24, align 8 + %49 = fdiv double %48, %.pre + store double %49, ptr %24, align 8 br label %._crit_edge.i.i.i.i.i.i140 ._crit_edge.i.i.i.i.i.i140: ; preds = %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i138, %.lr.ph.i.i.i.i.i.i.i146.preheader - %51 = icmp samesign ult i64 %48, %22 - br i1 %51, label %.lr.ph.i17.i.i.i.i.i.i141, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit + %50 = icmp samesign ult i64 %47, %22 + br i1 %50, label %.lr.ph.i17.i.i.i.i.i.i141, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit .lr.ph.i17.i.i.i.i.i.i141: ; preds = %._crit_edge.i.i.i.i.i.i140, %.lr.ph.i17.i.i.i.i.i.i141 - %.05.i18.i.i.i.i.i.i142 = phi i64 [ %55, %.lr.ph.i17.i.i.i.i.i.i141 ], [ 0, %._crit_edge.i.i.i.i.i.i140 ] - %52 = getelementptr inbounds nuw double, ptr %24, i64 %.05.i18.i.i.i.i.i.i142 - %53 = load double, ptr %52, align 8 - %54 = fdiv double %53, %.pre - store double %54, ptr %52, align 8 - %55 = add nuw nsw i64 %.05.i18.i.i.i.i.i.i142, 1 - %exitcond.not.i19.i.i.i.i.i.i143 = icmp eq i64 %55, %22 + %.05.i18.i.i.i.i.i.i142 = phi i64 [ %54, %.lr.ph.i17.i.i.i.i.i.i141 ], [ 0, %._crit_edge.i.i.i.i.i.i140 ] + %51 = getelementptr inbounds nuw double, ptr %24, i64 %.05.i18.i.i.i.i.i.i142 + %52 = load double, ptr %51, align 8 + %53 = fdiv double %52, %.pre + store double %53, ptr %51, align 8 + %54 = add nuw nsw i64 %.05.i18.i.i.i.i.i.i142, 1 + %exitcond.not.i19.i.i.i.i.i.i143 = icmp eq i64 %54, %22 br i1 %exitcond.not.i19.i.i.i.i.i.i143, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit, label %.lr.ph.i17.i.i.i.i.i.i141, !llvm.loop !20 -56: ; preds = %.loopexit374 - %57 = load double, ptr %0, align 16 - %58 = load double, ptr %25, align 8 - %59 = fmul double %57, %58 - store double %59, ptr %2, align 16 - %60 = load double, ptr %25, align 8 - %61 = fmul double %60, %59 - %62 = getelementptr i8, ptr %25, i64 %.idx.i.i.i.pre-phi - %63 = load double, ptr %62, align 8 - %64 = fsub double %63, %61 - store double %64, ptr %62, align 8 - %65 = fcmp one double %64, 0.000000e+00 +55: ; preds = %.loopexit374 + %56 = load double, ptr %0, align 16 + %57 = load double, ptr %25, align 8 + %58 = fmul double %56, %57 + store double %58, ptr %2, align 16 + %59 = load double, ptr %25, align 8 + %60 = fmul double %59, %58 + %61 = getelementptr i8, ptr %25, i64 %.idx.i.i.i.pre-phi + %62 = load double, ptr %61, align 8 + %63 = fsub double %62, %60 + store double %63, ptr %61, align 8 + %64 = fcmp one double %63, 0.000000e+00 br label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit -66: ; preds = %45 - %67 = trunc nuw i8 %.0110388 to i1 - br i1 %67, label %.preheader.us.i149, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit +65: ; preds = %44 + %66 = trunc nuw i8 %.0110388 to i1 + br i1 %66, label %.preheader.us.i149, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit -68: ; preds = %.preheader.us.i149 - %69 = add nuw nsw i64 %.01014.us.i150, 1 - %exitcond.not.i151 = icmp eq i64 %69, %22 +67: ; preds = %.preheader.us.i149 + %68 = add nuw nsw i64 %.01014.us.i150, 1 + %exitcond.not.i151 = icmp eq i64 %68, %22 br i1 %exitcond.not.i151, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit, label %.preheader.us.i149, !llvm.loop !21 -.preheader.us.i149: ; preds = %66, %68 - %.01014.us.i150 = phi i64 [ %69, %68 ], [ 0, %66 ] - %70 = getelementptr double, ptr %24, i64 %.01014.us.i150 - %71 = load double, ptr %70, align 8 - %72 = fcmp oeq double %71, 0.000000e+00 - br i1 %72, label %68, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit - -_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit: ; preds = %.preheader.us.i149, %68, %.lr.ph.i17.i.i.i.i.i.i141, %56, %._crit_edge.i.i.i.i.i.i140, %66 - %73 = phi double [ %64, %56 ], [ %.pre, %66 ], [ %.pre, %._crit_edge.i.i.i.i.i.i140 ], [ %.pre, %.lr.ph.i17.i.i.i.i.i.i141 ], [ %.pre, %68 ], [ %.pre, %.preheader.us.i149 ] - %74 = phi i1 [ %65, %56 ], [ true, %66 ], [ true, %._crit_edge.i.i.i.i.i.i140 ], [ true, %.lr.ph.i17.i.i.i.i.i.i141 ], [ true, %68 ], [ true, %.preheader.us.i149 ] - %.2 = phi i8 [ %.0110388, %56 ], [ 0, %66 ], [ %.0110388, %._crit_edge.i.i.i.i.i.i140 ], [ %.0110388, %.lr.ph.i17.i.i.i.i.i.i141 ], [ 0, %.preheader.us.i149 ], [ 1, %68 ] - %75 = select i1 %74, i1 %.0108389, i1 false - %.3 = select i1 %75, i8 0, i8 %.2 - %not. = xor i1 %74, true +.preheader.us.i149: ; preds = %65, %67 + %.01014.us.i150 = phi i64 [ %68, %67 ], [ 0, %65 ] + %69 = getelementptr double, ptr %24, i64 %.01014.us.i150 + %70 = load double, ptr %69, align 8 + %71 = fcmp oeq double %70, 0.000000e+00 + br i1 %71, label %67, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit + +_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit: ; preds = %.preheader.us.i149, %67, %.lr.ph.i17.i.i.i.i.i.i141, %55, %._crit_edge.i.i.i.i.i.i140, %65 + %72 = phi double [ %63, %55 ], [ %.pre, %65 ], [ %.pre, %._crit_edge.i.i.i.i.i.i140 ], [ %.pre, %.lr.ph.i17.i.i.i.i.i.i141 ], [ %.pre, %67 ], [ %.pre, %.preheader.us.i149 ] + %73 = phi i1 [ %64, %55 ], [ true, %65 ], [ true, %._crit_edge.i.i.i.i.i.i140 ], [ true, %.lr.ph.i17.i.i.i.i.i.i141 ], [ true, %67 ], [ true, %.preheader.us.i149 ] + %.2 = phi i8 [ %.0110388, %55 ], [ 0, %65 ], [ %.0110388, %._crit_edge.i.i.i.i.i.i140 ], [ %.0110388, %.lr.ph.i17.i.i.i.i.i.i141 ], [ 0, %.preheader.us.i149 ], [ 1, %67 ] + %74 = select i1 %73, i1 %.0108389, i1 false + %.3 = select i1 %74, i8 0, i8 %.2 + %not. = xor i1 %73, true %.1 = select i1 %not., i1 true, i1 %.0108389 - %76 = load i32, ptr %3, align 4 - switch i32 %76, label %85 [ - i32 0, label %77 - i32 1, label %79 - i32 2, label %81 + %75 = load i32, ptr %3, align 4 + switch i32 %75, label %84 [ + i32 0, label %76 + i32 1, label %78 + i32 2, label %80 ] -77: ; preds = %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit - %78 = fcmp olt double %73, 0.000000e+00 - br i1 %78, label %.sink.split, label %85 +76: ; preds = %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit + %77 = fcmp olt double %72, 0.000000e+00 + br i1 %77, label %.sink.split, label %84 -79: ; preds = %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit - %80 = fcmp ogt double %73, 0.000000e+00 - br i1 %80, label %.sink.split, label %85 +78: ; preds = %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit + %79 = fcmp ogt double %72, 0.000000e+00 + br i1 %79, label %.sink.split, label %84 -81: ; preds = %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit - %82 = fcmp ogt double %73, 0.000000e+00 - br i1 %82, label %.sink.split, label %83 +80: ; preds = %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit + %81 = fcmp ogt double %72, 0.000000e+00 + br i1 %81, label %.sink.split, label %82 -83: ; preds = %81 - %84 = fcmp olt double %73, 0.000000e+00 - br i1 %84, label %.sink.split, label %85 +82: ; preds = %80 + %83 = fcmp olt double %72, 0.000000e+00 + br i1 %83, label %.sink.split, label %84 -.sink.split: ; preds = %83, %81, %79, %77 - %.sink = phi i32 [ 3, %77 ], [ 3, %79 ], [ 0, %81 ], [ 1, %83 ] +.sink.split: ; preds = %82, %80, %78, %76 + %.sink = phi i32 [ 3, %76 ], [ 3, %78 ], [ 0, %80 ], [ 1, %82 ] store i32 %.sink, ptr %3, align 4 - br label %85 + br label %84 -85: ; preds = %.sink.split, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit, %77, %83, %79 - br i1 %7, label %6, label %86, !llvm.loop !22 +84: ; preds = %.sink.split, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit, %76, %82, %78 + br i1 %7, label %6, label %85, !llvm.loop !22 -86: ; preds = %85 - %87 = trunc nuw i8 %.3 to i1 +85: ; preds = %84 + %86 = trunc nuw i8 %.3 to i1 br label %.loopexit -.loopexit: ; preds = %34, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit, %86 - %.0107 = phi i1 [ %87, %86 ], [ true, %34 ], [ %44, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] +.loopexit: ; preds = %34, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit, %85 + %.0107 = phi i1 [ %86, %85 ], [ true, %34 ], [ %43, %_ZNK5Eigen9DenseBaseINS_13CwiseBinaryOpINS_8internal13scalar_cmp_opIddLNS2_14ComparisonNameE0EEEKNS_12ArrayWrapperINS_5BlockINS7_INS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi2ELi1ELb1EEELin1ELi1ELb0EEEEEKNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEENS_5ArrayIdLin1ELi1ELi0ELi2ELi1EEEEEEEE3allEv.exit ] ret i1 %.0107 } diff --git a/bench/g2o/optimized/vertex_line2d.cpp.ll b/bench/g2o/optimized/vertex_line2d.cpp.ll index ddb3fe867c3..04c13a83e7f 100644 --- a/bench/g2o/optimized/vertex_line2d.cpp.ll +++ b/bench/g2o/optimized/vertex_line2d.cpp.ll @@ -372,7 +372,7 @@ define linkonce_odr noundef double @_ZN3g2o10BaseVertexILi2ENS_6Line2DEE11solveD %.044.i.i.i.sroa.gep7 = getelementptr inbounds nuw i8, ptr %4, i64 8 %22 = fcmp olt double %20, 0x3CB0000000000000 %or.cond = or i1 %21, %22 - br i1 %or.cond, label %93, label %23 + br i1 %or.cond, label %95, label %23 23: ; preds = %2 %.sroa.5.16.vec.insert = insertelement <2 x double> poison, double %14, i64 0 @@ -437,7 +437,7 @@ _ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEE %.not47.i.i.i.i.i.i = phi i1 [ false, %45 ], [ true, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge ] %.02948.i.i.i.i.i.i.sroa.phi = phi ptr [ %4, %45 ], [ %.044.i.i.i.sroa.gep7, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge ] %.02948.i.i.i.i.i.i = phi i64 [ 0, %45 ], [ 1, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge ] - %47 = xor i64 %.02948.i.i.i.i.i.i, 1 + %47 = sub nuw nsw i64 1, %.02948.i.i.i.i.i.i %48 = getelementptr inbounds nuw i8, ptr %.02948.i.i.i.i.i.i.sroa.phi, i64 8 %.idx.i.i.i.i.i.i.i.i.i = shl nuw nsw i64 %.02948.i.i.i.i.i.i, 4 %49 = getelementptr inbounds nuw i8, ptr %48, i64 %.idx.i.i.i.i.i.i.i.i.i @@ -454,12 +454,12 @@ _ZNK5Eigen10MatrixBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi1ELin1ELb0E 55: ; preds = %_ZNK5Eigen10MatrixBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi1ELin1ELb0EEEE11squaredNormEv.exit.i.i.i.i.i.i, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i %.046.i.i.i.i.i.i = phi double [ %54, %_ZNK5Eigen10MatrixBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELi1ELin1ELb0EEEE11squaredNormEv.exit.i.i.i.i.i.i ], [ %51, %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i ] %56 = fcmp ole double %.046.i.i.i.i.i.i, 0.000000e+00 - br i1 %56, label %67, label %57 + br i1 %56, label %69, label %57 57: ; preds = %55 %58 = call double @sqrt(double noundef %.046.i.i.i.i.i.i) #19 store double %58, ptr %50, align 8, !alias.scope !4 - br i1 %.not47.i.i.i.i.i.i, label %67, label %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i.i + br i1 %.not47.i.i.i.i.i.i, label %69, label %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i.i _ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %57 %59 = ptrtoint ptr %49 to i64 @@ -476,51 +476,55 @@ _ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i. ._crit_edge.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i.i.preheader.i.i.i.i.i.i, %_ZN5Eigen8internal13first_alignedILi16EdlEET1_PKT0_S2_.exit.i.i.i.i.i.i.i.i.i.i.i.i %64 = icmp samesign ult i64 %61, %47 - br i1 %64, label %.lr.ph.i17.i.i.i.i.i.i.i.preheader.i.i.i.i.i, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge + br i1 %64, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge -.lr.ph.i17.i.i.i.i.i.i.i.preheader.i.i.i.i.i: ; preds = %._crit_edge.i.i.i.i.i.i.i.i.i.i.i.i - %65 = load double, ptr %49, align 8, !alias.scope !4 - %66 = fdiv double %65, %58 - store double %66, ptr %49, align 8, !alias.scope !4 - br label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge - -_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge: ; preds = %.lr.ph.i17.i.i.i.i.i.i.i.preheader.i.i.i.i.i, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i.i +_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge: ; preds = %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i.i, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i.i br label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i -67: ; preds = %55, %57 - %68 = zext i1 %56 to i32 - %69 = getelementptr inbounds nuw i8, ptr %4, i64 44 - store i32 %68, ptr %69, align 4, !alias.scope !4 - %70 = getelementptr inbounds nuw i8, ptr %0, i64 144 - %71 = load <2 x double>, ptr %70, align 16 - %72 = load double, ptr %4, align 16 - %73 = extractelement <2 x double> %71, i64 0 - %74 = fdiv double %73, %72 - %75 = load double, ptr %.044.i.i.i.sroa.gep7, align 8 - %76 = fmul double %74, %75 - %77 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %78 = extractelement <2 x double> %71, i64 1 - %79 = fsub double %78, %76 - %80 = getelementptr inbounds nuw i8, ptr %4, i64 24 - %81 = load double, ptr %80, align 8 - %82 = fdiv double %79, %81 - %83 = fdiv double %82, %81 - store double %83, ptr %77, align 8 - %84 = fmul double %75, %83 - %85 = fsub double %74, %84 - %86 = fdiv double %85, %72 - store double %86, ptr %3, align 16 - %87 = load ptr, ptr %0, align 16 - %88 = getelementptr inbounds nuw i8, ptr %87, i64 224 - %89 = load ptr, ptr %88, align 8 - call void %89(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull %3) - %90 = load ptr, ptr %0, align 16 - %91 = getelementptr inbounds nuw i8, ptr %90, i64 216 - %92 = load ptr, ptr %91, align 8 - call void %92(ptr noundef nonnull align 8 dereferenceable(128) %0) - br label %93 - -93: ; preds = %2, %67 +.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %._crit_edge.i.i.i.i.i.i.i.i.i.i.i.i, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i.i + %.05.i18.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ %68, %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i.i ], [ 0, %._crit_edge.i.i.i.i.i.i.i.i.i.i.i.i ] + %65 = getelementptr inbounds nuw double, ptr %49, i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i.i + %66 = load double, ptr %65, align 8, !alias.scope !4 + %67 = fdiv double %66, %58 + store double %67, ptr %65, align 8, !alias.scope !4 + %68 = add nuw nsw i64 %.05.i18.i.i.i.i.i.i.i.i.i.i.i.i, 1 + %exitcond.not.i19.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %68, %47 + br i1 %exitcond.not.i19.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEELin1ELi1ELb0EEEEdVERKd.exit.i.i.i.i.i.i.backedge, label %.lr.ph.i17.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !9 + +69: ; preds = %55, %57 + %70 = zext i1 %56 to i32 + %71 = getelementptr inbounds nuw i8, ptr %4, i64 44 + store i32 %70, ptr %71, align 4, !alias.scope !4 + %72 = getelementptr inbounds nuw i8, ptr %0, i64 144 + %73 = load <2 x double>, ptr %72, align 16 + %74 = load double, ptr %4, align 16 + %75 = extractelement <2 x double> %73, i64 0 + %76 = fdiv double %75, %74 + %77 = load double, ptr %.044.i.i.i.sroa.gep7, align 8 + %78 = fmul double %76, %77 + %79 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %80 = extractelement <2 x double> %73, i64 1 + %81 = fsub double %80, %78 + %82 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %83 = load double, ptr %82, align 8 + %84 = fdiv double %81, %83 + %85 = fdiv double %84, %83 + store double %85, ptr %79, align 8 + %86 = fmul double %77, %85 + %87 = fsub double %76, %86 + %88 = fdiv double %87, %74 + store double %88, ptr %3, align 16 + %89 = load ptr, ptr %0, align 16 + %90 = getelementptr inbounds nuw i8, ptr %89, i64 224 + %91 = load ptr, ptr %90, align 8 + call void %91(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull %3) + %92 = load ptr, ptr %0, align 16 + %93 = getelementptr inbounds nuw i8, ptr %92, i64 216 + %94 = load ptr, ptr %93, align 8 + call void %94(ptr noundef nonnull align 8 dereferenceable(128) %0) + br label %95 + +95: ; preds = %2, %69 ret double %20 } @@ -706,11 +710,11 @@ _ZNKSt6vectorIN3g2o6Line2DESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i: ; preds = %11 .lr.ph.i.i.i.i.i.i: ; preds = %_ZNKSt6vectorIN3g2o6Line2DESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i, %.lr.ph.i.i.i.i.i.i %.012.i.i.i.i.i.i = phi ptr [ %27, %.lr.ph.i.i.i.i.i.i ], [ %24, %_ZNKSt6vectorIN3g2o6Line2DESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i ] %.0911.i.i.i.i.i.i = phi ptr [ %26, %.lr.ph.i.i.i.i.i.i ], [ %12, %_ZNKSt6vectorIN3g2o6Line2DESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i ] - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %.012.i.i.i.i.i.i, ptr noundef nonnull align 16 dereferenceable(16) %.0911.i.i.i.i.i.i, i64 16, i1 false), !alias.scope !9 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %.012.i.i.i.i.i.i, ptr noundef nonnull align 16 dereferenceable(16) %.0911.i.i.i.i.i.i, i64 16, i1 false), !alias.scope !10 %26 = getelementptr inbounds nuw i8, ptr %.0911.i.i.i.i.i.i, i64 16 %27 = getelementptr inbounds nuw i8, ptr %.012.i.i.i.i.i.i, i64 16 %.not.i.i.i.i.i.i = icmp eq ptr %26, %5 - br i1 %.not.i.i.i.i.i.i, label %_ZNSt6vectorIN3g2o6Line2DESaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit32.i.i.i, label %.lr.ph.i.i.i.i.i.i, !llvm.loop !13 + br i1 %.not.i.i.i.i.i.i, label %_ZNSt6vectorIN3g2o6Line2DESaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit32.i.i.i, label %.lr.ph.i.i.i.i.i.i, !llvm.loop !14 _ZNSt6vectorIN3g2o6Line2DESaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit32.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i, %_ZNKSt6vectorIN3g2o6Line2DESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i %.0.lcssa.i.i.i.i.i.i = phi ptr [ %24, %_ZNKSt6vectorIN3g2o6Line2DESaIS1_EE12_M_check_lenEmPKc.exit.i.i.i ], [ %27, %.lr.ph.i.i.i.i.i.i ] @@ -974,7 +978,7 @@ define linkonce_odr void @_ZNSt6vectorIdSaIdEE17_M_default_appendEm(ptr noundef %15 = ashr exact i64 %14, 3 %16 = icmp ult i64 %10, 1152921504606846976 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %10, 1152921504606846975 + %17 = sub nuw nsw i64 1152921504606846975, %10 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28 = icmp ult i64 %15, %1 @@ -1135,8 +1139,9 @@ attributes #22 = { noreturn nounwind } !6 = distinct !{!6, !"_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi2ELi0ELi2ELi2EEEE3lltEv"} !7 = distinct !{!7, !8} !8 = !{!"llvm.loop.mustprogress"} -!9 = !{!10, !12} -!10 = distinct !{!10, !11, !"_ZSt19__relocate_object_aIN3g2o6Line2DES1_SaIS1_EEvPT_PT0_RT1_: argument 0"} -!11 = distinct !{!11, !"_ZSt19__relocate_object_aIN3g2o6Line2DES1_SaIS1_EEvPT_PT0_RT1_"} -!12 = distinct !{!12, !11, !"_ZSt19__relocate_object_aIN3g2o6Line2DES1_SaIS1_EEvPT_PT0_RT1_: argument 1"} -!13 = distinct !{!13, !8} +!9 = distinct !{!9, !8} +!10 = !{!11, !13} +!11 = distinct !{!11, !12, !"_ZSt19__relocate_object_aIN3g2o6Line2DES1_SaIS1_EEvPT_PT0_RT1_: argument 0"} +!12 = distinct !{!12, !"_ZSt19__relocate_object_aIN3g2o6Line2DES1_SaIS1_EEvPT_PT0_RT1_"} +!13 = distinct !{!13, !12, !"_ZSt19__relocate_object_aIN3g2o6Line2DES1_SaIS1_EEvPT_PT0_RT1_: argument 1"} +!14 = distinct !{!14, !8} diff --git a/bench/git/optimized/ewah_bitmap.ll b/bench/git/optimized/ewah_bitmap.ll index e67c4e5b8e2..c6aa00baafe 100644 --- a/bench/git/optimized/ewah_bitmap.ll +++ b/bench/git/optimized/ewah_bitmap.ll @@ -119,7 +119,7 @@ if.end15: ; preds = %if.else, %buffer_pu %.val34 = load i64, ptr %12, align 8 %shr.i42 = lshr i64 %.val34, 1 %and.i43 = and i64 %shr.i42, 4294967295 - %sub = xor i64 %and.i43, 4294967295 + %sub = sub nuw nsw i64 4294967295, %and.i43 %cond.i = tail call noundef i64 @llvm.umin.i64(i64 %number, i64 range(i64 -2147483648, 4294967296) %sub) %add = add nuw nsw i64 %cond.i, %and.i43 %or.i = or i64 %.val34, 8589934590 @@ -332,7 +332,7 @@ while.body: ; preds = %buffer_push_rlw.exi %buffer.addr.0 = phi ptr [ %buffer, %entry ], [ %add.ptr18, %buffer_push_rlw.exit ] %.val = load i64, ptr %0, align 8 %shr.i = lshr i64 %.val, 33 - %sub = xor i64 %shr.i, 2147483647 + %sub = sub nuw nsw i64 2147483647, %shr.i %cond.i = tail call noundef i64 @llvm.umin.i64(i64 %number.addr.0, i64 range(i64 -2147483648, 4294967296) %sub) %add = add nuw nsw i64 %cond.i, %shr.i %or.i = or i64 %.val, -8589934592 diff --git a/bench/glslang/optimized/ParseHelper.cpp.ll b/bench/glslang/optimized/ParseHelper.cpp.ll index 0573585f41c..5641ba9c78f 100644 --- a/bench/glslang/optimized/ParseHelper.cpp.ll +++ b/bench/glslang/optimized/ParseHelper.cpp.ll @@ -32568,42 +32568,58 @@ _ZNK7glslang11TArraySizes10getNumDimsEv.exit56: ; preds = %159 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit 199: ; preds = %175 - %200 = icmp eq ptr %191, %192 - br i1 %200, label %201, label %210 + %200 = add nsw i64 %196, -1 + %201 = icmp eq ptr %191, %192 + br i1 %201, label %202, label %218 -201: ; preds = %199 - %202 = getelementptr inbounds nuw i8, ptr %188, i64 24 - %203 = load ptr, ptr %202, align 8 - %204 = ptrtoint ptr %203 to i64 - %205 = sub i64 %204, %193 - %206 = ashr exact i64 %205, 4 - %207 = xor i64 %196, 576460752303423487 - %208 = icmp ule i64 %206, %207 - tail call void @llvm.assume(i1 %208) - %.not27.i.i.not.i.i = icmp eq i64 %205, -16 - br i1 %.not27.i.i.not.i.i, label %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, label %209 - -_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i: ; preds = %201 +202: ; preds = %199 + %203 = getelementptr inbounds nuw i8, ptr %188, i64 24 + %204 = load ptr, ptr %203, align 8 + %205 = ptrtoint ptr %204 to i64 + %206 = sub i64 %205, %193 + %207 = ashr exact i64 %206, 4 + %208 = sub nuw nsw i64 576460752303423487, %196 + %209 = icmp ule i64 %207, %208 + tail call void @llvm.assume(i1 %209) + %.not27.i.i.not.i.i = icmp eq i64 %206, -16 + br i1 %.not27.i.i.not.i.i, label %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, label %210 + +_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i: ; preds = %202 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18446744073709551600) %191, i8 0, i64 -16, i1 false) %scevgep.i.i.i.i.i = getelementptr i8, ptr %191, i64 -16 store ptr %scevgep.i.i.i.i.i, ptr %190, align 8 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit -209: ; preds = %201 +210: ; preds = %202 + %211 = icmp ugt i64 %200, 576460752303423487 + br i1 %211, label %212, label %_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i + +212: ; preds = %210 tail call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.1253) #23 unreachable -210: ; preds = %199 - %211 = getelementptr i8, ptr %192, i64 %195 - %212 = getelementptr i8, ptr %211, i64 -16 - %.not.i4.i.i.i = icmp eq ptr %191, %212 - br i1 %.not.i4.i.i.i, label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit, label %213 +_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i: ; preds = %210 + %213 = load ptr, ptr %188, align 8 + %214 = tail call noundef ptr @_ZN7glslang14TPoolAllocator8allocateEm(ptr noundef nonnull align 8 dereferenceable(96) %213, i64 noundef 9223372036854775792) #22 + %215 = getelementptr inbounds i8, ptr %214, i64 %195 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18446744073709551600) %215, i8 0, i64 -16, i1 false) + store ptr %214, ptr %189, align 8 + %216 = getelementptr inbounds nuw i8, ptr %215, i64 -16 + store ptr %216, ptr %190, align 8 + %217 = getelementptr inbounds nuw i8, ptr %214, i64 9223372036854775792 + store ptr %217, ptr %203, align 8 + br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit + +218: ; preds = %199 + %219 = getelementptr inbounds %"struct.glslang::TArraySize", ptr %192, i64 %200 + %.not.i4.i.i.i = icmp eq ptr %191, %219 + br i1 %.not.i4.i.i.i, label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit, label %220 -213: ; preds = %210 - store ptr %212, ptr %190, align 8 +220: ; preds = %218 + store ptr %219, ptr %190, align 8 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit -_ZN7glslang11TArraySizes14removeLastSizeEv.exit: ; preds = %159, %128, %213, %210, %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, %198, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit56, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit54, %126, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit.thread +_ZN7glslang11TArraySizes14removeLastSizeEv.exit: ; preds = %159, %128, %220, %218, %_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, %198, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit56, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit54, %126, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit.thread ret void } diff --git a/bench/glslang/optimized/SpirvIntrinsics.cpp.ll b/bench/glslang/optimized/SpirvIntrinsics.cpp.ll index 0c476340173..de80b7b5375 100644 --- a/bench/glslang/optimized/SpirvIntrinsics.cpp.ll +++ b/bench/glslang/optimized/SpirvIntrinsics.cpp.ll @@ -29,11 +29,11 @@ target triple = "x86_64-pc-linux-gnu" %"struct.std::__detail::__variant::_Variant_storage.base" = type <{ %"union.std::__detail::__variant::_Variadic_union", i8 }> %"union.std::__detail::__variant::_Variadic_union" = type { %"struct.std::__detail::__variant::_Uninitialized" } %"struct.std::__detail::__variant::_Uninitialized" = type { ptr } +%"struct.glslang::TArraySize" = type { i32, ptr } %"struct.glslang::TTypeLoc" = type { ptr, %"struct.glslang::TSourceLoc" } %"struct.glslang::TSourceLoc" = type { ptr, i32, i32, i32 } %"class.std::allocator.81" = type { i8 } %struct.__va_list_tag = type { i32, i32, ptr, ptr } -%"struct.glslang::TArraySize" = type { i32, ptr } $_ZNK7glslang16TConstUnionArrayeqERKS0_ = comdat any @@ -4627,42 +4627,58 @@ _ZNK7glslang11TArraySizes10getNumDimsEv.exit56: ; preds = %159 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit 199: ; preds = %175 - %200 = icmp eq ptr %191, %192 - br i1 %200, label %201, label %210 - -201: ; preds = %199 - %202 = getelementptr inbounds nuw i8, ptr %188, i64 24 - %203 = load ptr, ptr %202, align 8 - %204 = ptrtoint ptr %203 to i64 - %205 = sub i64 %204, %193 - %206 = ashr exact i64 %205, 4 - %207 = xor i64 %196, 576460752303423487 - %208 = icmp ule i64 %206, %207 - tail call void @llvm.assume(i1 %208) - %.not27.i.i.not.i.i = icmp eq i64 %205, -16 - br i1 %.not27.i.i.not.i.i, label %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, label %209 - -_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i: ; preds = %201 + %200 = add nsw i64 %196, -1 + %201 = icmp eq ptr %191, %192 + br i1 %201, label %202, label %218 + +202: ; preds = %199 + %203 = getelementptr inbounds nuw i8, ptr %188, i64 24 + %204 = load ptr, ptr %203, align 8 + %205 = ptrtoint ptr %204 to i64 + %206 = sub i64 %205, %193 + %207 = ashr exact i64 %206, 4 + %208 = sub nuw nsw i64 576460752303423487, %196 + %209 = icmp ule i64 %207, %208 + tail call void @llvm.assume(i1 %209) + %.not27.i.i.not.i.i = icmp eq i64 %206, -16 + br i1 %.not27.i.i.not.i.i, label %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, label %210 + +_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i: ; preds = %202 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18446744073709551600) %191, i8 0, i64 -16, i1 false) %scevgep.i.i.i.i.i = getelementptr i8, ptr %191, i64 -16 store ptr %scevgep.i.i.i.i.i, ptr %190, align 8 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit -209: ; preds = %201 +210: ; preds = %202 + %211 = icmp ugt i64 %200, 576460752303423487 + br i1 %211, label %212, label %_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i + +212: ; preds = %210 tail call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.51) #16 unreachable -210: ; preds = %199 - %211 = getelementptr i8, ptr %192, i64 %195 - %212 = getelementptr i8, ptr %211, i64 -16 - %.not.i4.i.i.i = icmp eq ptr %191, %212 - br i1 %.not.i4.i.i.i, label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit, label %213 +_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i: ; preds = %210 + %213 = load ptr, ptr %188, align 8 + %214 = tail call noundef ptr @_ZN7glslang14TPoolAllocator8allocateEm(ptr noundef nonnull align 8 dereferenceable(96) %213, i64 noundef 9223372036854775792) #14 + %215 = getelementptr inbounds i8, ptr %214, i64 %195 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18446744073709551600) %215, i8 0, i64 -16, i1 false) + store ptr %214, ptr %189, align 8 + %216 = getelementptr inbounds nuw i8, ptr %215, i64 -16 + store ptr %216, ptr %190, align 8 + %217 = getelementptr inbounds nuw i8, ptr %214, i64 9223372036854775792 + store ptr %217, ptr %203, align 8 + br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit + +218: ; preds = %199 + %219 = getelementptr inbounds %"struct.glslang::TArraySize", ptr %192, i64 %200 + %.not.i4.i.i.i = icmp eq ptr %191, %219 + br i1 %.not.i4.i.i.i, label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit, label %220 -213: ; preds = %210 - store ptr %212, ptr %190, align 8 +220: ; preds = %218 + store ptr %219, ptr %190, align 8 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit -_ZN7glslang11TArraySizes14removeLastSizeEv.exit: ; preds = %159, %128, %213, %210, %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, %198, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit56, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit54, %126, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit.thread +_ZN7glslang11TArraySizes14removeLastSizeEv.exit: ; preds = %159, %128, %220, %218, %_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, %198, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit56, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit54, %126, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit.thread ret void } diff --git a/bench/glslang/optimized/glslang_tab.cpp.ll b/bench/glslang/optimized/glslang_tab.cpp.ll index 5cad1467c44..b61aea7e4f1 100644 --- a/bench/glslang/optimized/glslang_tab.cpp.ll +++ b/bench/glslang/optimized/glslang_tab.cpp.ll @@ -43055,42 +43055,58 @@ _ZNK7glslang11TArraySizes10getNumDimsEv.exit56: ; preds = %159 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit 199: ; preds = %175 - %200 = icmp eq ptr %191, %192 - br i1 %200, label %201, label %210 - -201: ; preds = %199 - %202 = getelementptr inbounds nuw i8, ptr %188, i64 24 - %203 = load ptr, ptr %202, align 8 - %204 = ptrtoint ptr %203 to i64 - %205 = sub i64 %204, %193 - %206 = ashr exact i64 %205, 4 - %207 = xor i64 %196, 576460752303423487 - %208 = icmp ule i64 %206, %207 - tail call void @llvm.assume(i1 %208) - %.not27.i.i.not.i.i = icmp eq i64 %205, -16 - br i1 %.not27.i.i.not.i.i, label %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, label %209 - -_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i: ; preds = %201 + %200 = add nsw i64 %196, -1 + %201 = icmp eq ptr %191, %192 + br i1 %201, label %202, label %218 + +202: ; preds = %199 + %203 = getelementptr inbounds nuw i8, ptr %188, i64 24 + %204 = load ptr, ptr %203, align 8 + %205 = ptrtoint ptr %204 to i64 + %206 = sub i64 %205, %193 + %207 = ashr exact i64 %206, 4 + %208 = sub nuw nsw i64 576460752303423487, %196 + %209 = icmp ule i64 %207, %208 + tail call void @llvm.assume(i1 %209) + %.not27.i.i.not.i.i = icmp eq i64 %206, -16 + br i1 %.not27.i.i.not.i.i, label %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, label %210 + +_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i: ; preds = %202 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18446744073709551600) %191, i8 0, i64 -16, i1 false) %scevgep.i.i.i.i.i = getelementptr i8, ptr %191, i64 -16 store ptr %scevgep.i.i.i.i.i, ptr %190, align 8 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit -209: ; preds = %201 +210: ; preds = %202 + %211 = icmp ugt i64 %200, 576460752303423487 + br i1 %211, label %212, label %_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i + +212: ; preds = %210 tail call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.1138) #26 unreachable -210: ; preds = %199 - %211 = getelementptr i8, ptr %192, i64 %195 - %212 = getelementptr i8, ptr %211, i64 -16 - %.not.i4.i.i.i = icmp eq ptr %191, %212 - br i1 %.not.i4.i.i.i, label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit, label %213 +_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i: ; preds = %210 + %213 = load ptr, ptr %188, align 8 + %214 = tail call noundef ptr @_ZN7glslang14TPoolAllocator8allocateEm(ptr noundef nonnull align 8 dereferenceable(96) %213, i64 noundef 9223372036854775792) #25 + %215 = getelementptr inbounds i8, ptr %214, i64 %195 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18446744073709551600) %215, i8 0, i64 -16, i1 false) + store ptr %214, ptr %189, align 8 + %216 = getelementptr inbounds nuw i8, ptr %215, i64 -16 + store ptr %216, ptr %190, align 8 + %217 = getelementptr inbounds nuw i8, ptr %214, i64 9223372036854775792 + store ptr %217, ptr %203, align 8 + br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit + +218: ; preds = %199 + %219 = getelementptr inbounds %"struct.glslang::TArraySize", ptr %192, i64 %200 + %.not.i4.i.i.i = icmp eq ptr %191, %219 + br i1 %.not.i4.i.i.i, label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit, label %220 -213: ; preds = %210 - store ptr %212, ptr %190, align 8 +220: ; preds = %218 + store ptr %219, ptr %190, align 8 br label %_ZN7glslang11TArraySizes14removeLastSizeEv.exit -_ZN7glslang11TArraySizes14removeLastSizeEv.exit: ; preds = %159, %128, %213, %210, %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, %198, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit56, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit54, %126, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit.thread +_ZN7glslang11TArraySizes14removeLastSizeEv.exit: ; preds = %159, %128, %220, %218, %_ZNKSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE12_M_check_lenEmPKc.exit.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPN7glslang10TArraySizeEmNS0_14pool_allocatorIS1_EEET_S5_T0_RT1_.exit.i.i.i.i, %198, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit56, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit54, %126, %_ZNK7glslang11TArraySizes10getNumDimsEv.exit.thread ret void } diff --git a/bench/graphviz/optimized/csettings.cpp.ll b/bench/graphviz/optimized/csettings.cpp.ll index 77c23ccc48c..0379bd74711 100644 --- a/bench/graphviz/optimized/csettings.cpp.ll +++ b/bench/graphviz/optimized/csettings.cpp.ll @@ -14444,7 +14444,7 @@ define internal fastcc void @_ZL6readlnRKNSt7__cxx1112basic_stringIcSt11char_tra cleanup call void @_ZNSaIcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #23 call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #23 - br label %91 + br label %89 10: ; preds = %2 store ptr %8, ptr %4, align 8 @@ -14459,21 +14459,21 @@ define internal fastcc void @_ZL6readlnRKNSt7__cxx1112basic_stringIcSt11char_tra %.pre = load ptr, ptr %11, align 8 br label %14 -14: ; preds = %61, %10 - %15 = phi ptr [ %62, %61 ], [ %.pre, %10 ] - %16 = phi ptr [ %63, %61 ], [ %.pr, %10 ] +14: ; preds = %59, %10 + %15 = phi ptr [ %60, %59 ], [ %.pre, %10 ] + %16 = phi ptr [ %61, %59 ], [ %.pr, %10 ] %17 = ptrtoint ptr %15 to i64 %18 = ptrtoint ptr %16 to i64 %19 = sub i64 %17, %18 %20 = shl i64 %19, 1 %21 = icmp sgt i64 %19, 0 - br i1 %21, label %22, label %48 + br i1 %21, label %22, label %46 22: ; preds = %14 %23 = load ptr, ptr %13, align 8 %24 = ptrtoint ptr %23 to i64 %25 = sub i64 %24, %17 - %26 = xor i64 %19, 9223372036854775807 + %26 = sub nuw nsw i64 9223372036854775807, %19 %27 = icmp ule i64 %25, %26 call void @llvm.assume(i1 %27) %.not28.i.i = icmp ult i64 %25, %19 @@ -14497,7 +14497,7 @@ _ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %32, br label %_ZNSt6vectorIcSaIcEE6resizeEm.exit 34: ; preds = %22 - %35 = icmp samesign ult i64 %26, %19 + %35 = icmp slt i64 %20, 0 br i1 %35, label %36, label %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i 36: ; preds = %34 @@ -14508,185 +14508,183 @@ _ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %32, unreachable _ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i: ; preds = %34 - %37 = call i64 @llvm.umin.i64(i64 %20, i64 9223372036854775807) - %38 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %37) #26 + %37 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %20) #26 to label %.noexc10 unwind label %.loopexit .noexc10: ; preds = %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i - %39 = getelementptr inbounds nuw i8, ptr %38, i64 %19 - store i8 0, ptr %39, align 1 - %40 = add nsw i64 %19, -1 - %41 = icmp eq i64 %40, 0 - br i1 %41, label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i, label %42 - -42: ; preds = %.noexc10 - %43 = getelementptr inbounds nuw i8, ptr %39, i64 1 - call void @llvm.memset.p0.i64(ptr nonnull align 1 %43, i8 0, i64 %40, i1 false) + %38 = getelementptr inbounds nuw i8, ptr %37, i64 %19 + store i8 0, ptr %38, align 1 + %39 = add nsw i64 %19, -1 + %40 = icmp eq i64 %39, 0 + br i1 %40, label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i, label %41 + +41: ; preds = %.noexc10 + %42 = getelementptr inbounds nuw i8, ptr %38, i64 1 + call void @llvm.memset.p0.i64(ptr nonnull align 1 %42, i8 0, i64 %39, i1 false) br label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i -_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i: ; preds = %42, %.noexc10 +_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i: ; preds = %41, %.noexc10 %.not35.i.i = icmp eq ptr %15, %16 - br i1 %.not35.i.i, label %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i, label %44 + br i1 %.not35.i.i, label %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i, label %43 -44: ; preds = %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i - call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %38, ptr align 1 %16, i64 %19, i1 false) +43: ; preds = %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i + call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %37, ptr align 1 %16, i64 %19, i1 false) br label %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i -_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i: ; preds = %44, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i +_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i: ; preds = %43, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit31.i.i %.not.i33.i.i = icmp eq ptr %16, null - br i1 %.not.i33.i.i, label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i, label %45 + br i1 %.not.i33.i.i, label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i, label %44 -45: ; preds = %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i +44: ; preds = %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i call void @_ZdlPv(ptr noundef nonnull %16) #27 br label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i -_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i: ; preds = %45, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i - store ptr %38, ptr %4, align 8 - %46 = getelementptr inbounds i8, ptr %38, i64 %20 - store ptr %46, ptr %11, align 8 - %47 = getelementptr inbounds nuw i8, ptr %38, i64 %37 - store ptr %47, ptr %13, align 8 +_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i: ; preds = %44, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i + store ptr %37, ptr %4, align 8 + %45 = getelementptr inbounds nuw i8, ptr %37, i64 %20 + store ptr %45, ptr %11, align 8 + store ptr %45, ptr %13, align 8 br label %_ZNSt6vectorIcSaIcEE6resizeEm.exit -48: ; preds = %14 - %49 = icmp slt i64 %19, 0 - br i1 %49, label %50, label %_ZNSt6vectorIcSaIcEE6resizeEm.exit +46: ; preds = %14 + %47 = icmp slt i64 %19, 0 + br i1 %47, label %48, label %_ZNSt6vectorIcSaIcEE6resizeEm.exit -50: ; preds = %48 - %51 = getelementptr inbounds i8, ptr %16, i64 %20 - %.not.i4.i = icmp eq ptr %15, %51 - br i1 %.not.i4.i, label %_ZNSt6vectorIcSaIcEE6resizeEm.exit, label %52 +48: ; preds = %46 + %49 = getelementptr inbounds i8, ptr %16, i64 %20 + %.not.i4.i = icmp eq ptr %15, %49 + br i1 %.not.i4.i, label %_ZNSt6vectorIcSaIcEE6resizeEm.exit, label %50 -52: ; preds = %50 - store ptr %51, ptr %11, align 8 +50: ; preds = %48 + store ptr %49, ptr %11, align 8 br label %_ZNSt6vectorIcSaIcEE6resizeEm.exit -_ZNSt6vectorIcSaIcEE6resizeEm.exit: ; preds = %52, %50, %48, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i - %53 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #23 - %54 = load ptr, ptr %4, align 8 - %55 = load ptr, ptr %11, align 8 - %56 = ptrtoint ptr %55 to i64 - %57 = ptrtoint ptr %54 to i64 - %58 = sub i64 %56, %57 - %59 = call i64 @readlink(ptr noundef %53, ptr noundef %54, i64 noundef %58) #23 - %60 = icmp slt i64 %59, 0 - br i1 %60, label %82, label %61 +_ZNSt6vectorIcSaIcEE6resizeEm.exit: ; preds = %50, %48, %46, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit34.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i + %51 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #23 + %52 = load ptr, ptr %4, align 8 + %53 = load ptr, ptr %11, align 8 + %54 = ptrtoint ptr %53 to i64 + %55 = ptrtoint ptr %52 to i64 + %56 = sub i64 %54, %55 + %57 = call i64 @readlink(ptr noundef %51, ptr noundef %52, i64 noundef %56) #23 + %58 = icmp slt i64 %57, 0 + br i1 %58, label %80, label %59 .loopexit: ; preds = %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i.i %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %90 + br label %88 .loopexit.split-lp: ; preds = %36 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup - br label %90 - -61: ; preds = %_ZNSt6vectorIcSaIcEE6resizeEm.exit - %62 = load ptr, ptr %11, align 8 - %63 = load ptr, ptr %4, align 8 - %64 = ptrtoint ptr %62 to i64 - %65 = ptrtoint ptr %63 to i64 - %66 = sub i64 %64, %65 - %67 = icmp ult i64 %59, %66 - br i1 %67, label %68, label %14, !llvm.loop !45 - -68: ; preds = %61 - %69 = getelementptr inbounds nuw i8, ptr %63, i64 %59 - store i8 0, ptr %69, align 1 - %70 = load ptr, ptr %4, align 8 + br label %88 + +59: ; preds = %_ZNSt6vectorIcSaIcEE6resizeEm.exit + %60 = load ptr, ptr %11, align 8 + %61 = load ptr, ptr %4, align 8 + %62 = ptrtoint ptr %60 to i64 + %63 = ptrtoint ptr %61 to i64 + %64 = sub i64 %62, %63 + %65 = icmp ult i64 %57, %64 + br i1 %65, label %66, label %14, !llvm.loop !45 + +66: ; preds = %59 + %67 = getelementptr inbounds nuw i8, ptr %61, i64 %57 + store i8 0, ptr %67, align 1 + %68 = load ptr, ptr %4, align 8 call void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #23 - %71 = invoke noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_local_dataEv(ptr noundef nonnull align 8 dereferenceable(32) %0) - to label %.noexc11 unwind label %80 + %69 = invoke noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_local_dataEv(ptr noundef nonnull align 8 dereferenceable(32) %0) + to label %.noexc11 unwind label %78 -.noexc11: ; preds = %68 - invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %71, ptr noundef nonnull align 1 dereferenceable(1) %6) - to label %.noexc12 unwind label %80 +.noexc11: ; preds = %66 + invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %69, ptr noundef nonnull align 1 dereferenceable(1) %6) + to label %.noexc12 unwind label %78 .noexc12: ; preds = %.noexc11 - %72 = icmp eq ptr %70, null - br i1 %72, label %73, label %77 + %70 = icmp eq ptr %68, null + br i1 %70, label %71, label %75 -73: ; preds = %.noexc12 +71: ; preds = %.noexc12 invoke void @_ZSt19__throw_logic_errorPKc(ptr noundef nonnull @.str.133) #29 - to label %74 unwind label %75 + to label %72 unwind label %73 -74: ; preds = %73 +72: ; preds = %71 unreachable -75: ; preds = %77, %73 - %76 = landingpad { ptr, i32 } +73: ; preds = %75, %71 + %74 = landingpad { ptr, i32 } cleanup call void @_ZNSaIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #23 br label %.body13 -77: ; preds = %.noexc12 - %78 = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %70) #23 - %79 = getelementptr inbounds i8, ptr %70, i64 %78 - invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %70, ptr noundef nonnull %79) - to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit unwind label %75 +75: ; preds = %.noexc12 + %76 = call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %68) #23 + %77 = getelementptr inbounds i8, ptr %68, i64 %76 + invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %68, ptr noundef nonnull %77) + to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit unwind label %73 -80: ; preds = %.noexc11, %68 - %81 = landingpad { ptr, i32 } +78: ; preds = %.noexc11, %66 + %79 = landingpad { ptr, i32 } cleanup br label %.body13 -.body13: ; preds = %75, %80 - %eh.lpad-body14 = phi { ptr, i32 } [ %81, %80 ], [ %76, %75 ] +.body13: ; preds = %73, %78 + %eh.lpad-body14 = phi { ptr, i32 } [ %79, %78 ], [ %74, %73 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #23 - br label %90 + br label %88 -82: ; preds = %_ZNSt6vectorIcSaIcEE6resizeEm.exit +80: ; preds = %_ZNSt6vectorIcSaIcEE6resizeEm.exit call void @_ZNSaIcEC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #23 - %83 = invoke noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_local_dataEv(ptr noundef nonnull align 8 dereferenceable(32) %0) - to label %.noexc15 unwind label %86 + %81 = invoke noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_local_dataEv(ptr noundef nonnull align 8 dereferenceable(32) %0) + to label %.noexc15 unwind label %84 -.noexc15: ; preds = %82 - invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %83, ptr noundef nonnull align 1 dereferenceable(1) %7) - to label %.noexc16 unwind label %86 +.noexc15: ; preds = %80 + invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %81, ptr noundef nonnull align 1 dereferenceable(1) %7) + to label %.noexc16 unwind label %84 .noexc16: ; preds = %.noexc15 invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.28) - to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit unwind label %84 + to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit unwind label %82 -84: ; preds = %.noexc16 - %85 = landingpad { ptr, i32 } +82: ; preds = %.noexc16 + %83 = landingpad { ptr, i32 } cleanup call void @_ZNSaIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #23 br label %.body17 -86: ; preds = %.noexc15, %82 - %87 = landingpad { ptr, i32 } +84: ; preds = %.noexc15, %80 + %85 = landingpad { ptr, i32 } cleanup br label %.body17 -.body17: ; preds = %84, %86 - %eh.lpad-body18 = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ] +.body17: ; preds = %82, %84 + %eh.lpad-body18 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #23 - br label %90 + br label %88 -_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit: ; preds = %.noexc16, %77 - %.sink = phi ptr [ %6, %77 ], [ %7, %.noexc16 ] +_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit: ; preds = %.noexc16, %75 + %.sink = phi ptr [ %6, %75 ], [ %7, %.noexc16 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %.sink) #23 - %88 = load ptr, ptr %4, align 8 - %.not.i.i.i = icmp eq ptr %88, null - br i1 %.not.i.i.i, label %_ZNSt6vectorIcSaIcEED2Ev.exit, label %89 + %86 = load ptr, ptr %4, align 8 + %.not.i.i.i = icmp eq ptr %86, null + br i1 %.not.i.i.i, label %_ZNSt6vectorIcSaIcEED2Ev.exit, label %87 -89: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit - call void @_ZdlPv(ptr noundef nonnull %88) #27 +87: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit + call void @_ZdlPv(ptr noundef nonnull %86) #27 br label %_ZNSt6vectorIcSaIcEED2Ev.exit -_ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit, %89 +_ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit, %87 call void @_ZNSaIcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #23 ret void -90: ; preds = %.loopexit, %.loopexit.split-lp, %.body17, %.body13 +88: ; preds = %.loopexit, %.loopexit.split-lp, %.body17, %.body13 %.pn = phi { ptr, i32 } [ %eh.lpad-body18, %.body17 ], [ %eh.lpad-body14, %.body13 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #23 - br label %91 + br label %89 -91: ; preds = %90, %.body - %.pn.pn = phi { ptr, i32 } [ %.pn, %90 ], [ %9, %.body ] +89: ; preds = %88, %.body + %.pn.pn = phi { ptr, i32 } [ %.pn, %88 ], [ %9, %.body ] resume { ptr, i32 } %.pn.pn } @@ -14869,9 +14867,6 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #21 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #20 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #20 - ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #22 diff --git a/bench/graphviz/optimized/ortho.c.ll b/bench/graphviz/optimized/ortho.c.ll index 13f0e1417f8..4010d46caf7 100644 --- a/bench/graphviz/optimized/ortho.c.ll +++ b/bench/graphviz/optimized/ortho.c.ll @@ -2587,27 +2587,27 @@ add_edges_in_G.exit.thread: ; preds = %.loopexit.i, %8, %. ; Function Attrs: nounwind uwtable define internal fastcc range(i32 -1, 1) i32 @add_p_edges(ptr noundef %0, ptr nocapture noundef readonly %1) unnamed_addr #0 { %3 = tail call ptr @dtflatten(ptr noundef %0) #17 - %.not95 = icmp eq ptr %3, null - br i1 %.not95, label %addPEdges.exit, label %.lr.ph98 + %.not94 = icmp eq ptr %3, null + br i1 %.not94, label %addPEdges.exit, label %.lr.ph97 -.lr.ph98: ; preds = %2, %._crit_edge - %.0996 = phi ptr [ %335, %._crit_edge ], [ %3, %2 ] - %4 = getelementptr inbounds nuw i8, ptr %.0996, i64 24 +.lr.ph97: ; preds = %2, %._crit_edge + %.0995 = phi ptr [ %335, %._crit_edge ], [ %3, %2 ] + %4 = getelementptr inbounds nuw i8, ptr %.0995, i64 24 %5 = load ptr, ptr %4, align 8 %6 = tail call ptr @dtflatten(ptr noundef %5) #17 - %.not1193 = icmp eq ptr %6, null - br i1 %.not1193, label %._crit_edge, label %.lr.ph + %.not1192 = icmp eq ptr %6, null + br i1 %.not1192, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %.lr.ph98, %.loopexit86 - %.094 = phi ptr [ %334, %.loopexit86 ], [ %6, %.lr.ph98 ] - %7 = getelementptr inbounds nuw i8, ptr %.094, i64 48 +.lr.ph: ; preds = %.lr.ph97, %.loopexit85 + %.093 = phi ptr [ %334, %.loopexit85 ], [ %6, %.lr.ph97 ] + %7 = getelementptr inbounds nuw i8, ptr %.093, i64 48 %8 = load ptr, ptr %7, align 8 - %9 = getelementptr inbounds nuw i8, ptr %.094, i64 40 + %9 = getelementptr inbounds nuw i8, ptr %.093, i64 40 %10 = load ptr, ptr %9, align 8 - %11 = getelementptr inbounds nuw i8, ptr %.094, i64 32 + %11 = getelementptr inbounds nuw i8, ptr %.093, i64 32 %12 = load i32, ptr %11, align 8 %13 = icmp sgt i32 %12, 1 - br i1 %13, label %.preheader.i, label %.loopexit86 + br i1 %13, label %.preheader.i, label %.loopexit85 .loopexit.loopexit.i: ; preds = %is_parallel.exit.thread.i %.pre.i = sext i32 %331 to i64 @@ -2619,7 +2619,7 @@ define internal fastcc range(i32 -1, 1) i32 @add_p_edges(ptr noundef %0, ptr noc %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %15 = icmp slt i64 %indvars.iv.next.i, %.pre-phi.i %indvars.iv.next160.i = add nuw nsw i64 %indvars.iv159.i, 1 - br i1 %15, label %.preheader.i, label %.loopexit86 + br i1 %15, label %.preheader.i, label %.loopexit85 .preheader.i: ; preds = %.lr.ph, %.loopexit.i %16 = phi i32 [ %14, %.loopexit.i ], [ %12, %.lr.ph ] @@ -2693,7 +2693,7 @@ is_parallel.exit.i: ; preds = %41 60: ; preds = %52 %61 = icmp ne ptr %57, null - br label %.loopexit84 + br label %.loopexit83 .lr.ph.i21: ; preds = %58 %62 = getelementptr inbounds nuw i8, ptr %54, i64 8 @@ -2706,71 +2706,71 @@ is_parallel.exit.i: ; preds = %41 br label %.lr.ph.i21.thread .lr.ph.i21.thread: ; preds = %.lr.ph.i21, %58 - %.0129.shrunk.i.ph109 = phi i1 [ true, %58 ], [ %cond.fr, %.lr.ph.i21 ] + %.0129.shrunk.i.ph108 = phi i1 [ true, %58 ], [ %cond.fr, %.lr.ph.i21 ] %67 = phi i64 [ 56, %58 ], [ %spec.select, %.lr.ph.i21 ] br label %68 68: ; preds = %92, %.lr.ph.i21.thread - %.0.i54.i24 = phi ptr [ %54, %.lr.ph.i21.thread ], [ %.0.i.i48, %92 ] - %.02453.i25 = phi i32 [ 0, %.lr.ph.i21.thread ], [ %93, %92 ] - %.02652.i26 = phi ptr [ %29, %.lr.ph.i21.thread ], [ %.0.i37.i28, %92 ] - %.0.in.i36.i27 = getelementptr inbounds nuw i8, ptr %.02652.i26, i64 %67 - %.0.i37.i28 = load ptr, ptr %.0.in.i36.i27, align 8 - %.not32.i29 = icmp eq ptr %.0.i37.i28, null - br i1 %.not32.i29, label %.loopexit84, label %69 + %.0.i54.i23 = phi ptr [ %54, %.lr.ph.i21.thread ], [ %.0.i.i47, %92 ] + %.02453.i24 = phi i32 [ 0, %.lr.ph.i21.thread ], [ %93, %92 ] + %.02652.i25 = phi ptr [ %29, %.lr.ph.i21.thread ], [ %.0.i37.i27, %92 ] + %.0.in.i36.i26 = getelementptr inbounds nuw i8, ptr %.02652.i25, i64 %67 + %.0.i37.i27 = load ptr, ptr %.0.in.i36.i26, align 8 + %.not32.i28 = icmp eq ptr %.0.i37.i27, null + br i1 %.not32.i28, label %.loopexit83, label %69 69: ; preds = %68 - %70 = getelementptr inbounds nuw i8, ptr %.0.i54.i24, i64 16 + %70 = getelementptr inbounds nuw i8, ptr %.0.i54.i23, i64 16 %71 = load double, ptr %70, align 8 - %72 = getelementptr inbounds nuw i8, ptr %.0.i37.i28, i64 16 + %72 = getelementptr inbounds nuw i8, ptr %.0.i37.i27, i64 16 %73 = load double, ptr %72, align 8 %74 = fcmp oeq double %71, %73 - br i1 %74, label %75, label %.critedge.i30 + br i1 %74, label %75, label %.critedge.i29 75: ; preds = %69 - %76 = getelementptr inbounds nuw i8, ptr %.0.i54.i24, i64 24 + %76 = getelementptr inbounds nuw i8, ptr %.0.i54.i23, i64 24 %77 = load double, ptr %76, align 8 - %78 = getelementptr inbounds nuw i8, ptr %.0.i37.i28, i64 24 + %78 = getelementptr inbounds nuw i8, ptr %.0.i37.i27, i64 24 %79 = load double, ptr %78, align 8 %80 = fcmp oeq double %77, %79 - br i1 %80, label %81, label %.critedge.i30 + br i1 %80, label %81, label %.critedge.i29 81: ; preds = %75 - %82 = getelementptr inbounds nuw i8, ptr %.0.i54.i24, i64 32 + %82 = getelementptr inbounds nuw i8, ptr %.0.i54.i23, i64 32 %83 = load i32, ptr %82, align 8 - %84 = getelementptr inbounds nuw i8, ptr %.0.i37.i28, i64 32 + %84 = getelementptr inbounds nuw i8, ptr %.0.i37.i27, i64 32 %85 = load i32, ptr %84, align 8 %86 = icmp eq i32 %83, %85 - br i1 %86, label %is_parallel.exit.i46, label %.critedge.i30 + br i1 %86, label %is_parallel.exit.i45, label %.critedge.i29 -is_parallel.exit.i46: ; preds = %81 - %87 = getelementptr inbounds nuw i8, ptr %.0.i54.i24, i64 36 +is_parallel.exit.i45: ; preds = %81 + %87 = getelementptr inbounds nuw i8, ptr %.0.i54.i23, i64 36 %88 = load i32, ptr %87, align 4 - %89 = getelementptr inbounds nuw i8, ptr %.0.i37.i28, i64 36 + %89 = getelementptr inbounds nuw i8, ptr %.0.i37.i27, i64 36 %90 = load i32, ptr %89, align 4 %91 = icmp eq i32 %88, %90 - br i1 %91, label %92, label %.critedge.i30 + br i1 %91, label %92, label %.critedge.i29 -92: ; preds = %is_parallel.exit.i46 - %93 = add nuw nsw i32 %.02453.i25, 1 - %.0.in.i.i47 = getelementptr inbounds nuw i8, ptr %.0.i54.i24, i64 48 - %.0.i.i48 = load ptr, ptr %.0.in.i.i47, align 8 - %.not.i49 = icmp eq ptr %.0.i.i48, null - br i1 %.not.i49, label %.loopexit84, label %68 +92: ; preds = %is_parallel.exit.i45 + %93 = add nuw nsw i32 %.02453.i24, 1 + %.0.in.i.i46 = getelementptr inbounds nuw i8, ptr %.0.i54.i23, i64 48 + %.0.i.i47 = load ptr, ptr %.0.in.i.i46, align 8 + %.not.i48 = icmp eq ptr %.0.i.i47, null + br i1 %.not.i48, label %.loopexit83, label %68 -.critedge.i30: ; preds = %is_parallel.exit.i46, %81, %75, %69 - %94 = load i8, ptr %.0.i54.i24, align 8 +.critedge.i29: ; preds = %is_parallel.exit.i45, %81, %75, %69 + %94 = load i8, ptr %.0.i54.i23, align 8 %95 = trunc i8 %94 to i1 - %96 = load i8, ptr %.0.i37.i28, align 8 + %96 = load i8, ptr %.0.i37.i27, align 8 %97 = xor i8 %96, %94 %98 = and i8 %97, 1 - %.not.i38.i31 = icmp eq i8 %98, 0 - br i1 %.not.i38.i31, label %99, label %addPEdges.exit.sink.split + %.not.i38.i30 = icmp eq i8 %98, 0 + br i1 %.not.i38.i30, label %99, label %addPEdges.exit.sink.split -99: ; preds = %.critedge.i30 - %100 = getelementptr inbounds nuw i8, ptr %.0.i54.i24, i64 8 +99: ; preds = %.critedge.i29 + %100 = getelementptr inbounds nuw i8, ptr %.0.i54.i23, i64 8 %101 = load double, ptr %100, align 8 - %102 = getelementptr inbounds nuw i8, ptr %.0.i37.i28, i64 8 + %102 = getelementptr inbounds nuw i8, ptr %.0.i37.i27, i64 8 %103 = load double, ptr %102, align 8 %104 = fcmp une double %101, %103 br i1 %104, label %addPEdges.exit.sink.split, label %105 @@ -2779,45 +2779,45 @@ is_parallel.exit.i46: ; preds = %81 br i1 %95, label %106, label %108 106: ; preds = %105 - %107 = tail call fastcc i32 @segCmp(ptr noundef nonnull readonly %.0.i54.i24, ptr noundef nonnull readonly %.0.i37.i28, i32 noundef 4, i32 noundef 2) + %107 = tail call fastcc i32 @segCmp(ptr noundef nonnull readonly %.0.i54.i23, ptr noundef nonnull readonly %.0.i37.i27, i32 noundef 4, i32 noundef 2) br label %110 108: ; preds = %105 - %109 = tail call fastcc i32 @segCmp(ptr noundef nonnull readonly %.0.i54.i24, ptr noundef nonnull readonly %.0.i37.i28, i32 noundef 3, i32 noundef 1) + %109 = tail call fastcc i32 @segCmp(ptr noundef nonnull readonly %.0.i54.i23, ptr noundef nonnull readonly %.0.i37.i27, i32 noundef 3, i32 noundef 1) br label %110 110: ; preds = %108, %106 - %.0.i39.ph.i34 = phi i32 [ %109, %108 ], [ %107, %106 ] - %111 = add nuw nsw i32 %.02453.i25, 1 + %.0.i39.ph.i33 = phi i32 [ %109, %108 ], [ %107, %106 ] + %111 = add nuw nsw i32 %.02453.i24, 1 br label %112 112: ; preds = %139, %110 - %.029.i.i35 = phi ptr [ %.0.i54.i24, %110 ], [ %.0.i.i.i39, %139 ] - %.02128.i.i36 = phi i32 [ 1, %110 ], [ %140, %139 ] - %.02227.i.i37 = phi i32 [ %.0.i39.ph.i34, %110 ], [ %spec.select25.i.i41, %139 ] - %.0.in.i.i.i38 = getelementptr inbounds nuw i8, ptr %.029.i.i35, i64 56 - %.0.i.i.i39 = load ptr, ptr %.0.in.i.i.i38, align 8 - %113 = load i8, ptr %.029.i.i35, align 8 + %.029.i.i34 = phi ptr [ %.0.i54.i23, %110 ], [ %.0.i.i.i38, %139 ] + %.02128.i.i35 = phi i32 [ 1, %110 ], [ %140, %139 ] + %.02227.i.i36 = phi i32 [ %.0.i39.ph.i33, %110 ], [ %spec.select25.i.i40, %139 ] + %.0.in.i.i.i37 = getelementptr inbounds nuw i8, ptr %.029.i.i34, i64 56 + %.0.i.i.i38 = load ptr, ptr %.0.in.i.i.i37, align 8 + %113 = load i8, ptr %.029.i.i34, align 8 %114 = trunc i8 %113 to i1 - %115 = getelementptr inbounds nuw i8, ptr %.0.i.i.i39, i64 8 + %115 = getelementptr inbounds nuw i8, ptr %.0.i.i.i38, i64 8 %116 = load double, ptr %115, align 8 - %117 = getelementptr inbounds nuw i8, ptr %.029.i.i35, i64 16 + %117 = getelementptr inbounds nuw i8, ptr %.029.i.i34, i64 16 %118 = load double, ptr %117, align 8 %119 = fcmp oeq double %116, %118 - %120 = sub nsw i32 0, %.02227.i.i37 + %120 = sub nsw i32 0, %.02227.i.i36 br i1 %114, label %130, label %121 121: ; preds = %112 br i1 %119, label %122, label %126 122: ; preds = %121 - %123 = getelementptr inbounds nuw i8, ptr %.029.i.i35, i64 32 + %123 = getelementptr inbounds nuw i8, ptr %.029.i.i34, i64 32 %124 = load i32, ptr %123, align 8 %125 = icmp eq i32 %124, 1 br label %139 126: ; preds = %121 - %127 = getelementptr inbounds nuw i8, ptr %.029.i.i35, i64 36 + %127 = getelementptr inbounds nuw i8, ptr %.029.i.i34, i64 36 %128 = load i32, ptr %127, align 4 %129 = icmp eq i32 %128, 3 br label %139 @@ -2826,37 +2826,38 @@ is_parallel.exit.i46: ; preds = %81 br i1 %119, label %131, label %135 131: ; preds = %130 - %132 = getelementptr inbounds nuw i8, ptr %.029.i.i35, i64 32 + %132 = getelementptr inbounds nuw i8, ptr %.029.i.i34, i64 32 %133 = load i32, ptr %132, align 8 %134 = icmp eq i32 %133, 4 br label %139 135: ; preds = %130 - %136 = getelementptr inbounds nuw i8, ptr %.029.i.i35, i64 36 + %136 = getelementptr inbounds nuw i8, ptr %.029.i.i34, i64 36 %137 = load i32, ptr %136, align 4 %138 = icmp eq i32 %137, 2 br label %139 139: ; preds = %135, %131, %126, %122 - %.sink.i.i40 = phi i1 [ %138, %135 ], [ %134, %131 ], [ %129, %126 ], [ %125, %122 ] - %spec.select25.i.i41 = select i1 %.sink.i.i40, i32 %120, i32 %.02227.i.i37 - %140 = add nuw i32 %.02128.i.i36, 1 - %exitcond.not.i.i42 = icmp eq i32 %.02128.i.i36, %111 - br i1 %exitcond.not.i.i42, label %.loopexit84, label %112 - -.loopexit84: ; preds = %92, %68, %139, %60 - %.0129.shrunk.i55.ph = phi i1 [ %61, %60 ], [ %.0129.shrunk.i.ph109, %139 ], [ %.0129.shrunk.i.ph109, %68 ], [ %.0129.shrunk.i.ph109, %92 ] - %.sroa.6.8.ph = phi i32 [ 0, %60 ], [ %spec.select25.i.i41, %139 ], [ 0, %68 ], [ 0, %92 ] - %.sroa.0.8.ph = phi i32 [ 0, %60 ], [ %.02453.i25, %139 ], [ %93, %92 ], [ %.02453.i25, %68 ] - %.0129.i58.ph = zext i1 %.0129.shrunk.i55.ph to i32 - %141 = xor i32 %.0129.i58.ph, 1 + %.sink.i.i39 = phi i1 [ %138, %135 ], [ %134, %131 ], [ %129, %126 ], [ %125, %122 ] + %spec.select25.i.i40 = select i1 %.sink.i.i39, i32 %120, i32 %.02227.i.i36 + %140 = add nuw i32 %.02128.i.i35, 1 + %exitcond.not.i.i41 = icmp eq i32 %.02128.i.i35, %111 + br i1 %exitcond.not.i.i41, label %.loopexit83, label %112 + +.loopexit83: ; preds = %92, %68, %139, %60 + %.0129.shrunk.i54.ph = phi i1 [ %61, %60 ], [ %.0129.shrunk.i.ph108, %139 ], [ %.0129.shrunk.i.ph108, %68 ], [ %.0129.shrunk.i.ph108, %92 ] + %.sroa.6.8.ph = phi i32 [ 0, %60 ], [ %spec.select25.i.i40, %139 ], [ 0, %68 ], [ 0, %92 ] + %.sroa.0.8.ph = phi i32 [ 0, %60 ], [ %.02453.i24, %139 ], [ %93, %92 ], [ %.02453.i24, %68 ] + %.0129.i57.ph = zext i1 %.0129.shrunk.i54.ph to i32 + %not..0129.shrunk.i = xor i1 %.0129.shrunk.i54.ph, true + %141 = zext i1 %not..0129.shrunk.i to i32 %.0.in.i49.i = getelementptr inbounds nuw i8, ptr %27, i64 56 %.0.i50.i = load ptr, ptr %.0.in.i49.i, align 8 %.not51.i = icmp eq ptr %.0.i50.i, null br i1 %.not51.i, label %.loopexit, label %.lr.ph.i13 -.lr.ph.i13: ; preds = %.loopexit84 - %.0.in.v.i35.i = select i1 %.0129.shrunk.i55.ph, i64 48, i64 56 +.lr.ph.i13: ; preds = %.loopexit83 + %.0.in.v.i35.i = select i1 %.0129.shrunk.i54.ph, i64 48, i64 56 br label %142 142: ; preds = %166, %.lr.ph.i13 @@ -2993,9 +2994,9 @@ is_parallel.exit.i16: ; preds = %155 %exitcond.not.i.i = icmp eq i32 %.02128.i.i, %185 br i1 %exitcond.not.i.i, label %.loopexit, label %186 -.loopexit: ; preds = %166, %142, %213, %.loopexit84 - %.sroa.6.7.ph = phi i32 [ 0, %.loopexit84 ], [ %spec.select25.i.i, %213 ], [ 0, %142 ], [ 0, %166 ] - %.sroa.0.7.ph = phi i32 [ 0, %.loopexit84 ], [ %.02453.i, %213 ], [ %167, %166 ], [ %.02453.i, %142 ] +.loopexit: ; preds = %166, %142, %213, %.loopexit83 + %.sroa.6.7.ph = phi i32 [ 0, %.loopexit83 ], [ %spec.select25.i.i, %213 ], [ 0, %142 ], [ 0, %166 ] + %.sroa.0.7.ph = phi i32 [ 0, %.loopexit83 ], [ %.02453.i, %213 ], [ %167, %166 ], [ %.02453.i, %142 ] switch i32 %.sroa.6.8.ph, label %default.unreachable [ i32 -1, label %215 i32 0, label %268 @@ -3003,7 +3004,7 @@ is_parallel.exit.i16: ; preds = %155 ] 215: ; preds = %.loopexit - tail call fastcc void @set_parallel_edges(ptr noundef %29, ptr noundef %27, i32 noundef %.0129.i58.ph, i32 noundef 0, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) + tail call fastcc void @set_parallel_edges(ptr noundef %29, ptr noundef %27, i32 noundef %.0129.i57.ph, i32 noundef 0, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) %216 = load ptr, ptr %28, align 8 %217 = load ptr, ptr %19, align 8 tail call fastcc void @set_parallel_edges(ptr noundef %216, ptr noundef %217, i32 noundef %141, i32 noundef 1, i32 noundef %.sroa.0.7.ph, ptr noundef readonly %1) @@ -3021,7 +3022,7 @@ is_parallel.exit.i16: ; preds = %155 br i1 %226, label %.lr.ph.i.i, label %removeEdge.exit.i .lr.ph.i.i: ; preds = %219 - %.0.in.v.i.i.i = select i1 %.0129.shrunk.i55.ph, i64 48, i64 56 + %.0.in.v.i.i.i = select i1 %.0129.shrunk.i54.ph, i64 48, i64 56 br label %227 227: ; preds = %244, %.lr.ph.i.i @@ -3095,28 +3096,28 @@ removeEdge.exit.i: ; preds = %244, %is_parallel.e ] 269: ; preds = %268 - tail call fastcc void @set_parallel_edges(ptr noundef %29, ptr noundef %27, i32 noundef %.0129.i58.ph, i32 noundef 0, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) + tail call fastcc void @set_parallel_edges(ptr noundef %29, ptr noundef %27, i32 noundef %.0129.i57.ph, i32 noundef 0, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) %270 = load ptr, ptr %28, align 8 %271 = load ptr, ptr %19, align 8 tail call fastcc void @set_parallel_edges(ptr noundef %270, ptr noundef %271, i32 noundef %141, i32 noundef 1, i32 noundef %.sroa.0.7.ph, ptr noundef readonly %1) br label %is_parallel.exit.thread.i 272: ; preds = %268 - tail call fastcc void @set_parallel_edges(ptr noundef %27, ptr noundef %29, i32 noundef 0, i32 noundef %.0129.i58.ph, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) + tail call fastcc void @set_parallel_edges(ptr noundef %27, ptr noundef %29, i32 noundef 0, i32 noundef %.0129.i57.ph, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) %273 = load ptr, ptr %19, align 8 %274 = load ptr, ptr %28, align 8 tail call fastcc void @set_parallel_edges(ptr noundef %273, ptr noundef %274, i32 noundef 1, i32 noundef %141, i32 noundef %.sroa.0.7.ph, ptr noundef readonly %1) br label %is_parallel.exit.thread.i 275: ; preds = %268 - tail call fastcc void @set_parallel_edges(ptr noundef %27, ptr noundef %29, i32 noundef 0, i32 noundef %.0129.i58.ph, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) + tail call fastcc void @set_parallel_edges(ptr noundef %27, ptr noundef %29, i32 noundef 0, i32 noundef %.0129.i57.ph, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) %276 = load ptr, ptr %19, align 8 %277 = load ptr, ptr %28, align 8 tail call fastcc void @set_parallel_edges(ptr noundef %276, ptr noundef %277, i32 noundef 1, i32 noundef %141, i32 noundef %.sroa.0.7.ph, ptr noundef readonly %1) br label %is_parallel.exit.thread.i 278: ; preds = %.loopexit - tail call fastcc void @set_parallel_edges(ptr noundef %27, ptr noundef %29, i32 noundef 0, i32 noundef %.0129.i58.ph, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) + tail call fastcc void @set_parallel_edges(ptr noundef %27, ptr noundef %29, i32 noundef 0, i32 noundef %.0129.i57.ph, i32 noundef %.sroa.0.8.ph, ptr noundef readonly %1) %279 = load ptr, ptr %19, align 8 %280 = load ptr, ptr %28, align 8 tail call fastcc void @set_parallel_edges(ptr noundef %279, ptr noundef %280, i32 noundef 1, i32 noundef %141, i32 noundef %.sroa.0.7.ph, ptr noundef readonly %1) @@ -3134,7 +3135,7 @@ removeEdge.exit.i: ; preds = %244, %is_parallel.e br i1 %289, label %.lr.ph.i140.i, label %removeEdge.exit150.i .lr.ph.i140.i: ; preds = %282 - %.0.in.v.i.i142.i = select i1 %.0129.shrunk.i55.ph, i64 48, i64 56 + %.0.in.v.i.i142.i = select i1 %.0129.shrunk.i54.ph, i64 48, i64 56 br label %290 290: ; preds = %307, %.lr.ph.i140.i @@ -3210,17 +3211,17 @@ is_parallel.exit.thread.i: ; preds = %removeEdge.exit150. %333 = icmp sgt i32 %331, %332 br i1 %333, label %21, label %.loopexit.loopexit.i -.loopexit86: ; preds = %.loopexit.i, %.lr.ph - %334 = load ptr, ptr %.094, align 8 +.loopexit85: ; preds = %.loopexit.i, %.lr.ph + %334 = load ptr, ptr %.093, align 8 %.not11 = icmp eq ptr %334, null br i1 %.not11, label %._crit_edge, label %.lr.ph -._crit_edge: ; preds = %.loopexit86, %.lr.ph98 - %335 = load ptr, ptr %.0996, align 8 +._crit_edge: ; preds = %.loopexit85, %.lr.ph97 + %335 = load ptr, ptr %.0995, align 8 %.not = icmp eq ptr %335, null - br i1 %.not, label %addPEdges.exit, label %.lr.ph98 + br i1 %.not, label %addPEdges.exit, label %.lr.ph97 -addPEdges.exit.sink.split: ; preds = %173, %.critedge.i, %99, %.critedge.i30 +addPEdges.exit.sink.split: ; preds = %173, %.critedge.i, %99, %.critedge.i29 %336 = tail call i32 (i32, ptr, ...) @agerr(i32 noundef 1, ptr noundef nonnull @.str.4) #17 br label %addPEdges.exit diff --git a/bench/gromacs/optimized/topio.cpp.ll b/bench/gromacs/optimized/topio.cpp.ll index 210c756dff5..7e6ef5ae778 100644 --- a/bench/gromacs/optimized/topio.cpp.ll +++ b/bench/gromacs/optimized/topio.cpp.ll @@ -4585,10 +4585,10 @@ define void @_Z15generate_qmexclP10gmx_mtop_tP10t_inputrecRKN3gmx8MDLoggerE(ptr %12 = getelementptr inbounds nuw i8, ptr %0, i64 144 %13 = load ptr, ptr %12, align 8 %14 = load ptr, ptr %11, align 8 - %.not245 = icmp eq ptr %13, %14 - br i1 %.not245, label %._crit_edge244, label %.lr.ph243 + %.not246 = icmp eq ptr %13, %14 + br i1 %.not246, label %._crit_edge245, label %.lr.ph244 -.lr.ph243: ; preds = %3 +.lr.ph244: ; preds = %3 %15 = getelementptr inbounds nuw i8, ptr %0, i64 664 %16 = load ptr, ptr %15, align 8 %17 = getelementptr inbounds nuw i8, ptr %0, i64 112 @@ -4612,16 +4612,16 @@ define void @_Z15generate_qmexclP10gmx_mtop_tP10t_inputrecRKN3gmx8MDLoggerE(ptr %35 = getelementptr inbounds nuw i8, ptr %7, i64 16 br label %36 -36: ; preds = %.lr.ph243, %._crit_edge237 - %37 = phi ptr [ %14, %.lr.ph243 ], [ %732, %._crit_edge237 ] - %38 = phi ptr [ %13, %.lr.ph243 ], [ %733, %._crit_edge237 ] - %.082241 = phi ptr [ %16, %.lr.ph243 ], [ %.1.lcssa, %._crit_edge237 ] - %.085240 = phi i64 [ 0, %.lr.ph243 ], [ %734, %._crit_edge237 ] - %39 = getelementptr inbounds %struct.gmx_molblock_t, ptr %37, i64 %.085240 +36: ; preds = %.lr.ph244, %._crit_edge238 + %37 = phi ptr [ %14, %.lr.ph244 ], [ %732, %._crit_edge238 ] + %38 = phi ptr [ %13, %.lr.ph244 ], [ %733, %._crit_edge238 ] + %.082242 = phi ptr [ %16, %.lr.ph244 ], [ %.1.lcssa, %._crit_edge238 ] + %.085241 = phi i64 [ 0, %.lr.ph244 ], [ %734, %._crit_edge238 ] + %39 = getelementptr inbounds %struct.gmx_molblock_t, ptr %37, i64 %.085241 %40 = getelementptr inbounds nuw i8, ptr %39, i64 4 %41 = load i32, ptr %40, align 4 %42 = icmp sgt i32 %41, 0 - br i1 %42, label %.preheader.lr.ph, label %._crit_edge237 + br i1 %42, label %.preheader.lr.ph, label %._crit_edge238 .preheader.lr.ph: ; preds = %36 %43 = load ptr, ptr %17, align 8 @@ -4636,24 +4636,24 @@ define void @_Z15generate_qmexclP10gmx_mtop_tP10t_inputrecRKN3gmx8MDLoggerE(ptr .preheader: ; preds = %.preheader.lr.ph, %.critedge %50 = phi i32 [ %41, %.preheader.lr.ph ], [ %730, %.critedge ] - %.1235 = phi ptr [ %.082241, %.preheader.lr.ph ], [ %.2, %.critedge ] - %.083232 = phi i32 [ 0, %.preheader.lr.ph ], [ %728, %.critedge ] - %.186231 = phi i64 [ %.085240, %.preheader.lr.ph ], [ %.287, %.critedge ] - %.090230 = phi ptr [ %39, %.preheader.lr.ph ], [ %.191, %.critedge ] + %.1236 = phi ptr [ %.082242, %.preheader.lr.ph ], [ %.2, %.critedge ] + %.083233 = phi i32 [ 0, %.preheader.lr.ph ], [ %728, %.critedge ] + %.186232 = phi i64 [ %.085241, %.preheader.lr.ph ], [ %.287, %.critedge ] + %.090231 = phi ptr [ %39, %.preheader.lr.ph ], [ %.191, %.critedge ] br i1 %48, label %.lr.ph, label %.critedge .lr.ph: ; preds = %.preheader - %.not98 = icmp eq ptr %.1235, null + %.not98 = icmp eq ptr %.1236, null %51 = load i32, ptr %18, align 8 br label %52 52: ; preds = %.lr.ph, %57 %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %57 ] - %.088218 = phi i1 [ false, %.lr.ph ], [ %spec.select, %57 ] + %.088219 = phi i1 [ false, %.lr.ph ], [ %spec.select, %57 ] br i1 %.not98, label %57, label %53 53: ; preds = %52 - %54 = getelementptr inbounds nuw i8, ptr %.1235, i64 %indvars.iv + %54 = getelementptr inbounds nuw i8, ptr %.1236, i64 %indvars.iv %55 = load i8, ptr %54, align 1 %56 = zext i8 %55 to i32 br label %57 @@ -4661,7 +4661,7 @@ define void @_Z15generate_qmexclP10gmx_mtop_tP10t_inputrecRKN3gmx8MDLoggerE(ptr 57: ; preds = %52, %53 %58 = phi i32 [ %56, %53 ], [ 0, %52 ] %59 = icmp slt i32 %58, %51 - %spec.select = select i1 %59, i1 true, i1 %.088218 + %spec.select = select i1 %59, i1 true, i1 %.088219 %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, label %52, !llvm.loop !64 @@ -4674,12 +4674,12 @@ define void @_Z15generate_qmexclP10gmx_mtop_tP10t_inputrecRKN3gmx8MDLoggerE(ptr br i1 %61, label %62, label %_ZNSt6vectorI13gmx_moltype_tSaIS0_EED2Ev.exit 62: ; preds = %60 - %.not = icmp eq i32 %.083232, 0 + %.not = icmp eq i32 %.083233, 0 br i1 %.not, label %92, label %63 63: ; preds = %62 %64 = load ptr, ptr %11, align 8 - %65 = getelementptr inbounds %struct.gmx_molblock_t, ptr %64, i64 %.186231 + %65 = getelementptr inbounds %struct.gmx_molblock_t, ptr %64, i64 %.186232 %66 = getelementptr inbounds nuw i8, ptr %65, i64 56 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) %67 = load ptr, ptr %12, align 8 @@ -4740,21 +4740,21 @@ common.resume: ; preds = %.loopexit.split-lp, _ZNSt6vectorI14gmx_molblock_tSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EERS5_.exit: ; preds = %71, %_ZNSt6vectorIN3gmx11BasicVectorIfEESaIS2_EED2Ev.exit.i.i.i.i.i, %79, %82 %83 = load ptr, ptr %11, align 8 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) - %84 = getelementptr inbounds %struct.gmx_molblock_t, ptr %83, i64 %.186231, i32 1 - store i32 %.083232, ptr %84, align 4 - %85 = add i64 %.186231, 1 + %84 = getelementptr inbounds %struct.gmx_molblock_t, ptr %83, i64 %.186232, i32 1 + store i32 %.083233, ptr %84, align 4 + %85 = add i64 %.186232, 1 %86 = load ptr, ptr %11, align 8 %87 = getelementptr inbounds %struct.gmx_molblock_t, ptr %86, i64 %85, i32 1 %88 = load i32, ptr %87, align 4 - %89 = sub nsw i32 %88, %.083232 + %89 = sub nsw i32 %88, %.083233 store i32 %89, ptr %87, align 4 %90 = load ptr, ptr %11, align 8 %91 = getelementptr inbounds %struct.gmx_molblock_t, ptr %90, i64 %85 br label %92 92: ; preds = %_ZNSt6vectorI14gmx_molblock_tSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EERS5_.exit, %62 - %.393 = phi ptr [ %91, %_ZNSt6vectorI14gmx_molblock_tSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EERS5_.exit ], [ %.090230, %62 ] - %.4 = phi i64 [ %85, %_ZNSt6vectorI14gmx_molblock_tSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EERS5_.exit ], [ %.186231, %62 ] + %.393 = phi ptr [ %91, %_ZNSt6vectorI14gmx_molblock_tSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EERS5_.exit ], [ %.090231, %62 ] + %.4 = phi i64 [ %85, %_ZNSt6vectorI14gmx_molblock_tSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EERS5_.exit ], [ %.186232, %62 ] %93 = getelementptr inbounds nuw i8, ptr %.393, i64 4 %94 = load i32, ptr %93, align 4 %95 = icmp sgt i32 %94, 1 @@ -4851,7 +4851,7 @@ _ZNSt6vectorI13gmx_moltype_tSaIS0_EE17_S_check_init_lenEmRKS1_.exit.i: ; preds = .loopexit158.thread: ; preds = %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE17_S_check_init_lenEmRKS1_.exit.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %10, i8 0, i64 24, i1 false) - br label %._crit_edge223.thread + br label %._crit_edge224.thread _ZNSt12_Vector_baseI13gmx_moltype_tSaIS0_EEC2EmRKS1_.exit.i: ; preds = %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE17_S_check_init_lenEmRKS1_.exit.i %132 = call noalias noundef nonnull ptr @_Znwm(i64 noundef %129) #30 @@ -4919,22 +4919,22 @@ _ZSt8_DestroyIP13gmx_moltype_tEvT_S2_.exit.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i. .loopexit158: ; preds = %_ZSt10_ConstructI13gmx_moltype_tJEEvPT_DpOT0_.exit.i.i.i.i.i %.pre = load ptr, ptr %26, align 8 - %.pre271 = load ptr, ptr %17, align 8 + %.pre273 = load ptr, ptr %17, align 8 store ptr %135, ptr %27, align 8 - %.not246 = icmp eq ptr %.pre, %.pre271 - br i1 %.not246, label %._crit_edge223.thread, label %.lr.ph222 + %.not247 = icmp eq ptr %.pre, %.pre273 + br i1 %.not247, label %._crit_edge224.thread, label %.lr.ph223 -.lr.ph222: ; preds = %.loopexit158, %153 - %149 = phi ptr [ %156, %153 ], [ %.pre271, %.loopexit158 ] - %.079220 = phi i64 [ %154, %153 ], [ 0, %.loopexit158 ] - %150 = getelementptr inbounds %struct.gmx_moltype_t, ptr %149, i64 %.079220 +.lr.ph223: ; preds = %.loopexit158, %153 + %149 = phi ptr [ %156, %153 ], [ %.pre273, %.loopexit158 ] + %.079221 = phi i64 [ %154, %153 ], [ 0, %.loopexit158 ] + %150 = getelementptr inbounds %struct.gmx_moltype_t, ptr %149, i64 %.079221 %151 = load ptr, ptr %10, align 8 - %152 = getelementptr inbounds %struct.gmx_moltype_t, ptr %151, i64 %.079220 + %152 = getelementptr inbounds %struct.gmx_moltype_t, ptr %151, i64 %.079221 invoke void @_Z12copy_moltypePK13gmx_moltype_tPS_(ptr noundef nonnull %150, ptr noundef nonnull %152) to label %153 unwind label %.loopexit.split-lp.loopexit -153: ; preds = %.lr.ph222 - %154 = add nuw i64 %.079220, 1 +153: ; preds = %.lr.ph223 + %154 = add nuw i64 %.079221, 1 %155 = load ptr, ptr %26, align 8 %156 = load ptr, ptr %17, align 8 %157 = ptrtoint ptr %155 to i64 @@ -4942,19 +4942,19 @@ _ZSt8_DestroyIP13gmx_moltype_tEvT_S2_.exit.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i. %159 = sub i64 %157, %158 %160 = sdiv exact i64 %159, 2384 %161 = icmp ult i64 %154, %160 - br i1 %161, label %.lr.ph222, label %._crit_edge223, !llvm.loop !67 + br i1 %161, label %.lr.ph223, label %._crit_edge224, !llvm.loop !67 -.loopexit: ; preds = %.lr.ph228 +.loopexit: ; preds = %.lr.ph229 %lpad.loopexit152 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp -.loopexit.split-lp.loopexit: ; preds = %.lr.ph222 +.loopexit.split-lp.loopexit: ; preds = %.lr.ph223 %lpad.loopexit155 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp -.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %._crit_edge229, %._crit_edge223.thread, %.noexc108, %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit.i.i +.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %._crit_edge230, %._crit_edge224.thread, %.noexc108, %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit.i.i %lpad.loopexit159 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp @@ -4969,15 +4969,15 @@ _ZSt8_DestroyIP13gmx_moltype_tEvT_S2_.exit.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i. call void @_ZNSt6vectorI13gmx_moltype_tSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #27 br label %common.resume -._crit_edge223: ; preds = %153 +._crit_edge224: ; preds = %153 %162 = icmp eq i64 %159, -2384 - br i1 %162, label %163, label %._crit_edge223.thread + br i1 %162, label %163, label %._crit_edge224.thread -._crit_edge223.thread: ; preds = %.loopexit158.thread, %.loopexit158, %._crit_edge223 +._crit_edge224.thread: ; preds = %.loopexit158.thread, %.loopexit158, %._crit_edge224 invoke void @_ZNSt6vectorI13gmx_moltype_tSaIS0_EE17_M_default_appendEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 1) to label %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit -163: ; preds = %._crit_edge223 +163: ; preds = %._crit_edge224 %.not.i.i = icmp eq ptr %155, %156 br i1 %.not.i.i, label %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit, label %.lr.ph.i.i.i.i.i105 @@ -4992,23 +4992,23 @@ _ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i.i: ; preds = %.lr.ph.i.i store ptr %156, ptr %26, align 8 br label %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit -_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit: ; preds = %._crit_edge223.thread, %163, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i.i +_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit: ; preds = %._crit_edge224.thread, %163, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i.i %165 = load ptr, ptr %27, align 8 %166 = load ptr, ptr %10, align 8 - %.not247 = icmp eq ptr %165, %166 - br i1 %.not247, label %._crit_edge229, label %.lr.ph228 + %.not248 = icmp eq ptr %165, %166 + br i1 %.not248, label %._crit_edge230, label %.lr.ph229 -.lr.ph228: ; preds = %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit, %171 +.lr.ph229: ; preds = %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit, %171 %167 = phi ptr [ %174, %171 ], [ %166, %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit ] - %.0227 = phi i64 [ %172, %171 ], [ 0, %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit ] - %168 = getelementptr inbounds %struct.gmx_moltype_t, ptr %167, i64 %.0227 + %.0228 = phi i64 [ %172, %171 ], [ 0, %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit ] + %168 = getelementptr inbounds %struct.gmx_moltype_t, ptr %167, i64 %.0228 %169 = load ptr, ptr %17, align 8 - %170 = getelementptr inbounds %struct.gmx_moltype_t, ptr %169, i64 %.0227 + %170 = getelementptr inbounds %struct.gmx_moltype_t, ptr %169, i64 %.0228 invoke void @_Z12copy_moltypePK13gmx_moltype_tPS_(ptr noundef nonnull %168, ptr noundef nonnull %170) to label %171 unwind label %.loopexit -171: ; preds = %.lr.ph228 - %172 = add nuw i64 %.0227, 1 +171: ; preds = %.lr.ph229 + %172 = add nuw i64 %.0228, 1 %173 = load ptr, ptr %27, align 8 %174 = load ptr, ptr %10, align 8 %175 = ptrtoint ptr %173 to i64 @@ -5016,9 +5016,9 @@ _ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit: ; preds = %._crit_edge223.th %177 = sub i64 %175, %176 %178 = sdiv exact i64 %177, 2384 %179 = icmp ult i64 %172, %178 - br i1 %179, label %.lr.ph228, label %._crit_edge229, !llvm.loop !68 + br i1 %179, label %.lr.ph229, label %._crit_edge230, !llvm.loop !68 -._crit_edge229: ; preds = %171, %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit +._crit_edge230: ; preds = %171, %_ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit %180 = load i32, ptr %.494, align 8 %181 = sext i32 %180 to i64 %182 = load ptr, ptr %17, align 8 @@ -5028,7 +5028,7 @@ _ZNSt6vectorI13gmx_moltype_tSaIS0_EE6resizeEm.exit: ; preds = %._crit_edge223.th invoke void @_Z12copy_moltypePK13gmx_moltype_tPS_(ptr noundef nonnull %183, ptr noundef nonnull %185) to label %186 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit -186: ; preds = %._crit_edge229 +186: ; preds = %._crit_edge230 %187 = load i32, ptr %.494, align 8 %188 = sext i32 %187 to i64 %189 = load ptr, ptr %17, align 8 @@ -5182,8 +5182,8 @@ _ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i: ; preds = %.lr.ph.i.i.i br label %_ZNSt6vectorI13gmx_moltype_tSaIS0_EED2Ev.exit _ZNSt6vectorI13gmx_moltype_tSaIS0_EED2Ev.exit: ; preds = %248, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i, %60 - %.292 = phi ptr [ %.090230, %60 ], [ %.494, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i ], [ %.494, %248 ] - %.3 = phi i64 [ %.186231, %60 ], [ %.4, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i ], [ %.4, %248 ] + %.292 = phi ptr [ %.090231, %60 ], [ %.494, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i ], [ %.494, %248 ] + %.3 = phi i64 [ %.186232, %60 ], [ %.4, %_ZSt8_DestroyIP13gmx_moltype_tS0_EvT_S2_RSaIT0_E.exit.i ], [ %.4, %248 ] %249 = load i32, ptr %.292, align 8 %250 = sext i32 %249 to i64 %251 = load ptr, ptr %17, align 8 @@ -5302,7 +5302,7 @@ _ZNSt6vectorI13gmx_moltype_tSaIS0_EED2Ev.exit: ; preds = %248, %_ZSt8_Destroy 292: ; preds = %288, %.lr.ph.split.i %.2225.i = phi ptr [ %.1224252.i, %.lr.ph.split.i ], [ %291, %288 ] %.2.i = phi i32 [ %.1255.i, %.lr.ph.split.i ], [ %289, %288 ] - %293 = getelementptr inbounds nuw i8, ptr %.1235, i64 %indvars.iv.i + %293 = getelementptr inbounds nuw i8, ptr %.1236, i64 %indvars.iv.i %294 = load i8, ptr %293, align 1 %295 = zext i8 %294 to i32 %296 = icmp eq i32 %.0168264.i, %295 @@ -5544,7 +5544,7 @@ _ZL11IS_CHEMBONDi.exit.i: ; preds = %412 %432 = ashr exact i64 %431, 2 %433 = icmp ult i64 %425, 2305843009213693952 call void @llvm.assume(i1 %433) - %434 = xor i64 %425, 2305843009213693951 + %434 = sub nuw nsw i64 2305843009213693951, %425 %435 = icmp ule i64 %432, %434 call void @llvm.assume(i1 %435) %.not28.i130 = icmp ult i64 %432, %428 @@ -5570,7 +5570,7 @@ _ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i132: ; preds = %_Z br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit.i 442: ; preds = %427 - %443 = icmp ult i64 %434, %428 + %443 = icmp slt i32 %.3294.i, -3 br i1 %443, label %444, label %_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i134 444: ; preds = %442 @@ -5755,6 +5755,7 @@ _ZNSt10filesystem7__cxx114pathD2Ev.exit: ; preds = %488, %492 %519 = phi ptr [ %495, %.thread226.._crit_edge287_crit_edge.i ], [ %508, %.lr.ph286.i ] %.lcssa247.i = phi i64 [ %496, %.thread226.._crit_edge287_crit_edge.i ], [ %510, %.lr.ph286.i ] %.lcssa246.i = phi i64 [ %498, %.thread226.._crit_edge287_crit_edge.i ], [ %512, %.lr.ph286.i ] + %.lcssa245.i = phi i32 [ %501, %.thread226.._crit_edge287_crit_edge.i ], [ %515, %.lr.ph286.i ] %520 = ashr exact i64 %.lcssa246.i, 2 %521 = icmp ult i64 %520, %.pre-phi392.i br i1 %521, label %522, label %554 @@ -5767,7 +5768,7 @@ _ZNSt10filesystem7__cxx114pathD2Ev.exit: ; preds = %488, %492 %527 = ashr exact i64 %526, 2 %528 = icmp ult i64 %520, 2305843009213693952 call void @llvm.assume(i1 %528) - %529 = xor i64 %520, 2305843009213693951 + %529 = sub nuw nsw i64 2305843009213693951, %520 %530 = icmp ule i64 %527, %529 call void @llvm.assume(i1 %530) %.not28.i.i = icmp ult i64 %527, %523 @@ -5793,7 +5794,7 @@ _ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %_ZS br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit202.i 537: ; preds = %522 - %538 = icmp ult i64 %529, %523 + %538 = icmp slt i32 %.lcssa245.i, 0 br i1 %538, label %539, label %_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i.i 539: ; preds = %537 @@ -5836,7 +5837,7 @@ _ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit.i.i: ; preds = %550, %_ZSt27 _ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i.i: ; preds = %551, %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit.i.i store ptr %543, ptr %377, align 8 - %552 = getelementptr inbounds i32, ptr %544, i64 %523 + %552 = getelementptr inbounds nuw i32, ptr %544, i64 %523 store ptr %552, ptr %378, align 8 %553 = getelementptr inbounds nuw i32, ptr %543, i64 %541 store ptr %553, ptr %390, align 8 @@ -5927,8 +5928,8 @@ _ZNSt6vectorIiSaIiEE6resizeEm.exit202.i: ; preds = %.thread232.i, %558, 584: ; preds = %._crit_edge303.us.i, %.lr.ph307.split.us.i %.1178.us.i = phi i32 [ %587, %._crit_edge303.us.i ], [ %.0177304.us.i, %.lr.ph307.split.us.i ] %indvars.iv.next374.i = add nuw nsw i64 %indvars.iv373.i, 1 - %exitcond270.not = icmp eq i64 %indvars.iv.next374.i, %578 - br i1 %exitcond270.not, label %._crit_edge308.i, label %.lr.ph307.split.us.i, !llvm.loop !77 + %exitcond272.not = icmp eq i64 %indvars.iv.next374.i, %578 + br i1 %exitcond272.not, label %._crit_edge308.i, label %.lr.ph307.split.us.i, !llvm.loop !77 .preheader237.us.i: ; preds = %.preheader237.us.i, %.preheader237.us.preheader.i %indvars.iv368.i = phi i64 [ 0, %.preheader237.us.preheader.i ], [ %indvars.iv.next369.i, %.preheader237.us.i ] @@ -5955,8 +5956,8 @@ _ZNSt6vectorIiSaIiEE6resizeEm.exit202.i: ; preds = %.thread232.i, %558, %592 = select i1 %591, i32 %.0165.lcssa.i, i32 0 %spec.select324.i = add nsw i32 %592, %.0177304.i %indvars.iv.next366.i = add nuw nsw i64 %indvars.iv365.i, 1 - %exitcond269.not = icmp eq i64 %indvars.iv.next366.i, %577 - br i1 %exitcond269.not, label %._crit_edge308.i, label %.lr.ph307.split.i, !llvm.loop !77 + %exitcond271.not = icmp eq i64 %indvars.iv.next366.i, %577 + br i1 %exitcond271.not, label %._crit_edge308.i, label %.lr.ph307.split.i, !llvm.loop !77 ._crit_edge308.i: ; preds = %.lr.ph307.split.i, %584, %.._crit_edge308_crit_edge.i %.pre-phi.i = phi i64 [ %.pre388.i, %.._crit_edge308_crit_edge.i ], [ %578, %584 ], [ %577, %.lr.ph307.split.i ] @@ -6128,7 +6129,7 @@ _ZNSt12_Vector_baseIN3gmx14ExclusionBlockESaIS1_EEC2EmRKS2_.exit.thread.i.i: ; p %680 = ashr exact i64 %679, 2 %681 = icmp ult i64 %676, 2305843009213693952 call void @llvm.assume(i1 %681) - %682 = xor i64 %676, 2305843009213693951 + %682 = sub nuw nsw i64 2305843009213693951, %676 %683 = icmp ule i64 %680, %682 call void @llvm.assume(i1 %683) %.not28.i = icmp ult i64 %680, %672 @@ -6277,36 +6278,36 @@ _ZL23generate_qmexcl_moltypeP13gmx_moltype_tPKhP10t_inputrecRKN3gmx8MDLoggerE.ex br label %.critedge .critedge: ; preds = %.preheader, %_ZL23generate_qmexcl_moltypeP13gmx_moltype_tPKhP10t_inputrecRKN3gmx8MDLoggerE.exit, %._crit_edge - %.191 = phi ptr [ %.292, %_ZL23generate_qmexcl_moltypeP13gmx_moltype_tPKhP10t_inputrecRKN3gmx8MDLoggerE.exit ], [ %.090230, %._crit_edge ], [ %.090230, %.preheader ] - %.287 = phi i64 [ %.3, %_ZL23generate_qmexcl_moltypeP13gmx_moltype_tPKhP10t_inputrecRKN3gmx8MDLoggerE.exit ], [ %.186231, %._crit_edge ], [ %.186231, %.preheader ] - %.not96 = icmp eq ptr %.1235, null - %727 = getelementptr inbounds i8, ptr %.1235, i64 %49 + %.191 = phi ptr [ %.292, %_ZL23generate_qmexcl_moltypeP13gmx_moltype_tPKhP10t_inputrecRKN3gmx8MDLoggerE.exit ], [ %.090231, %._crit_edge ], [ %.090231, %.preheader ] + %.287 = phi i64 [ %.3, %_ZL23generate_qmexcl_moltypeP13gmx_moltype_tPKhP10t_inputrecRKN3gmx8MDLoggerE.exit ], [ %.186232, %._crit_edge ], [ %.186232, %.preheader ] + %.not96 = icmp eq ptr %.1236, null + %727 = getelementptr inbounds i8, ptr %.1236, i64 %49 %.2 = select i1 %.not96, ptr null, ptr %727 - %728 = add nuw nsw i32 %.083232, 1 + %728 = add nuw nsw i32 %.083233, 1 %729 = getelementptr inbounds nuw i8, ptr %.191, i64 4 %730 = load i32, ptr %729, align 4 %731 = icmp slt i32 %728, %730 - br i1 %731, label %.preheader, label %._crit_edge237.loopexit, !llvm.loop !81 - -._crit_edge237.loopexit: ; preds = %.critedge - %.pre275 = load ptr, ptr %12, align 8 - %.pre276 = load ptr, ptr %11, align 8 - br label %._crit_edge237 - -._crit_edge237: ; preds = %._crit_edge237.loopexit, %36 - %732 = phi ptr [ %37, %36 ], [ %.pre276, %._crit_edge237.loopexit ] - %733 = phi ptr [ %38, %36 ], [ %.pre275, %._crit_edge237.loopexit ] - %.186.lcssa = phi i64 [ %.085240, %36 ], [ %.287, %._crit_edge237.loopexit ] - %.1.lcssa = phi ptr [ %.082241, %36 ], [ %.2, %._crit_edge237.loopexit ] + br i1 %731, label %.preheader, label %._crit_edge238.loopexit, !llvm.loop !81 + +._crit_edge238.loopexit: ; preds = %.critedge + %.pre277 = load ptr, ptr %12, align 8 + %.pre278 = load ptr, ptr %11, align 8 + br label %._crit_edge238 + +._crit_edge238: ; preds = %._crit_edge238.loopexit, %36 + %732 = phi ptr [ %37, %36 ], [ %.pre278, %._crit_edge238.loopexit ] + %733 = phi ptr [ %38, %36 ], [ %.pre277, %._crit_edge238.loopexit ] + %.186.lcssa = phi i64 [ %.085241, %36 ], [ %.287, %._crit_edge238.loopexit ] + %.1.lcssa = phi ptr [ %.082242, %36 ], [ %.2, %._crit_edge238.loopexit ] %734 = add i64 %.186.lcssa, 1 %735 = ptrtoint ptr %733 to i64 %736 = ptrtoint ptr %732 to i64 %737 = sub i64 %735, %736 %738 = sdiv exact i64 %737, 56 %739 = icmp ult i64 %734, %738 - br i1 %739, label %36, label %._crit_edge244, !llvm.loop !82 + br i1 %739, label %36, label %._crit_edge245, !llvm.loop !82 -._crit_edge244: ; preds = %._crit_edge237, %3 +._crit_edge245: ; preds = %._crit_edge238, %3 ret void } diff --git a/bench/grpc/optimized/aes_gcm.cc.ll b/bench/grpc/optimized/aes_gcm.cc.ll index ea32c95ea82..90a7e96cf32 100644 --- a/bench/grpc/optimized/aes_gcm.cc.ll +++ b/bench/grpc/optimized/aes_gcm.cc.ll @@ -193,117 +193,116 @@ entry: %nonce_mask_ = getelementptr inbounds nuw i8, ptr %this, i64 88 %kdf_counter_ = getelementptr inbounds nuw i8, ptr %this, i64 112 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %key_, i8 0, i64 120, i1 false) - br i1 %is_rekey, label %if.then, label %if.end + br i1 %is_rekey, label %if.else.i.i, label %if.end -if.then: ; preds = %entry - invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %aead_key_, i64 noundef 16) - to label %invoke.cont unwind label %lpad - -invoke.cont: ; preds = %if.then - invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %kdf_buffer_, i64 noundef 64) - to label %invoke.cont7 unwind label %lpad - -invoke.cont7: ; preds = %invoke.cont - invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %nonce_mask_, i64 noundef 12) - to label %invoke.cont9 unwind label %lpad +if.else.i.i: ; preds = %entry + %call5.i.i.i.i.i1 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #16 + to label %if.else.i.i29 unwind label %lpad -invoke.cont9: ; preds = %invoke.cont7 - %0 = load ptr, ptr %nonce_mask_, align 8 +if.else.i.i29: ; preds = %if.else.i.i + %_M_end_of_storage.i.i = getelementptr inbounds nuw i8, ptr %this, i64 56 + %_M_finish.i.i = getelementptr inbounds nuw i8, ptr %this, i64 48 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %call5.i.i.i.i.i1, i8 0, i64 16, i1 false) + store ptr %call5.i.i.i.i.i1, ptr %aead_key_, align 8 + %add.ptr36.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i1, i64 16 + store ptr %add.ptr36.i.i, ptr %_M_finish.i.i, align 8 + store ptr %add.ptr36.i.i, ptr %_M_end_of_storage.i.i, align 8 + %call5.i.i.i.i.i47 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #16 + to label %if.else.i.i76 unwind label %lpad + +if.else.i.i76: ; preds = %if.else.i.i29 + %_M_end_of_storage.i.i15 = getelementptr inbounds nuw i8, ptr %this, i64 80 + %_M_finish.i.i2 = getelementptr inbounds nuw i8, ptr %this, i64 72 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %call5.i.i.i.i.i47, i8 0, i64 64, i1 false) + store ptr %call5.i.i.i.i.i47, ptr %kdf_buffer_, align 8 + %add.ptr36.i.i44 = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i47, i64 64 + store ptr %add.ptr36.i.i44, ptr %_M_finish.i.i2, align 8 + store ptr %add.ptr36.i.i44, ptr %_M_end_of_storage.i.i15, align 8 + %call5.i.i.i.i.i94 = invoke noalias noundef nonnull dereferenceable(12) ptr @_Znwm(i64 noundef 12) #16 + to label %if.then.i105 unwind label %lpad + +if.then.i105: ; preds = %if.else.i.i76 + %_M_end_of_storage.i.i62 = getelementptr inbounds nuw i8, ptr %this, i64 104 + %_M_finish.i.i49 = getelementptr inbounds nuw i8, ptr %this, i64 96 + store ptr %call5.i.i.i.i.i94, ptr %nonce_mask_, align 8 + %add.ptr36.i.i91 = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i94, i64 12 + store ptr %add.ptr36.i.i91, ptr %_M_finish.i.i49, align 8 + store ptr %add.ptr36.i.i91, ptr %_M_end_of_storage.i.i62, align 8 %add.ptr = getelementptr inbounds nuw i8, ptr %key.coerce0, i64 32 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(12) %0, ptr noundef nonnull align 1 dereferenceable(12) %add.ptr, i64 12, i1 false) + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(12) %call5.i.i.i.i.i94, ptr noundef nonnull align 1 dereferenceable(12) %add.ptr, i64 12, i1 false) store i8 0, ptr %ref.tmp, align 1 - %_M_finish.i.i = getelementptr inbounds nuw i8, ptr %this, i64 120 - %1 = load ptr, ptr %_M_finish.i.i, align 8 - %2 = load ptr, ptr %kdf_counter_, align 8 - %sub.ptr.lhs.cast.i.i = ptrtoint ptr %1 to i64 - %sub.ptr.rhs.cast.i.i = ptrtoint ptr %2 to i64 - %sub.ptr.sub.i.i = sub i64 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i - %cmp.i = icmp ult i64 %sub.ptr.sub.i.i, 6 - br i1 %cmp.i, label %if.then.i, label %if.else.i - -if.then.i: ; preds = %invoke.cont9 - %sub.i = sub nuw nsw i64 6, %sub.ptr.sub.i.i - invoke void @_ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EEmRKh(ptr noundef nonnull align 8 dereferenceable(24) %kdf_counter_, ptr %1, i64 noundef %sub.i, ptr noundef nonnull align 1 dereferenceable(1) %ref.tmp) - to label %if.end unwind label %lpad + invoke void @_ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EEmRKh(ptr noundef nonnull align 8 dereferenceable(24) %kdf_counter_, ptr null, i64 noundef 6, ptr noundef nonnull align 1 dereferenceable(1) %ref.tmp) + to label %if.then.i105.if.end_crit_edge unwind label %lpad -if.else.i: ; preds = %invoke.cont9 - %cmp6.i.not = icmp eq i64 %sub.ptr.sub.i.i, 6 - br i1 %cmp6.i.not, label %if.end, label %if.then7.i - -if.then7.i: ; preds = %if.else.i - %add.ptr.i = getelementptr inbounds nuw i8, ptr %2, i64 6 - %tobool.not.i.i = icmp eq ptr %1, %add.ptr.i - br i1 %tobool.not.i.i, label %if.end, label %invoke.cont.i.i - -invoke.cont.i.i: ; preds = %if.then7.i - store ptr %add.ptr.i, ptr %_M_finish.i.i, align 8 +if.then.i105.if.end_crit_edge: ; preds = %if.then.i105 + %.pre = load i8, ptr %is_rekey_, align 8 + %0 = trunc i8 %.pre to i1 + %1 = select i1 %0, i64 32, i64 %key.coerce1 br label %if.end -lpad: ; preds = %if.then.i, %if.end, %invoke.cont7, %invoke.cont, %if.then - %3 = landingpad { ptr, i32 } +lpad: ; preds = %if.then.i105, %if.else.i.i76, %if.else.i.i29, %if.else.i.i, %if.end + %2 = landingpad { ptr, i32 } cleanup - %4 = load ptr, ptr %kdf_counter_, align 8 - %tobool.not.i.i.i = icmp eq ptr %4, null + %3 = load ptr, ptr %kdf_counter_, align 8 + %tobool.not.i.i.i = icmp eq ptr %3, null br i1 %tobool.not.i.i.i, label %_ZNSt6vectorIhSaIhEED2Ev.exit, label %if.then.i.i.i if.then.i.i.i: ; preds = %lpad - call void @_ZdlPv(ptr noundef nonnull %4) #17 + call void @_ZdlPv(ptr noundef nonnull %3) #17 br label %_ZNSt6vectorIhSaIhEED2Ev.exit _ZNSt6vectorIhSaIhEED2Ev.exit: ; preds = %lpad, %if.then.i.i.i - %5 = load ptr, ptr %nonce_mask_, align 8 - %tobool.not.i.i.i1 = icmp eq ptr %5, null - br i1 %tobool.not.i.i.i1, label %_ZNSt6vectorIhSaIhEED2Ev.exit3, label %if.then.i.i.i2 + %4 = load ptr, ptr %nonce_mask_, align 8 + %tobool.not.i.i.i107 = icmp eq ptr %4, null + br i1 %tobool.not.i.i.i107, label %_ZNSt6vectorIhSaIhEED2Ev.exit109, label %if.then.i.i.i108 -if.then.i.i.i2: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit +if.then.i.i.i108: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit + call void @_ZdlPv(ptr noundef nonnull %4) #17 + br label %_ZNSt6vectorIhSaIhEED2Ev.exit109 + +_ZNSt6vectorIhSaIhEED2Ev.exit109: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit, %if.then.i.i.i108 + %5 = load ptr, ptr %kdf_buffer_, align 8 + %tobool.not.i.i.i110 = icmp eq ptr %5, null + br i1 %tobool.not.i.i.i110, label %_ZNSt6vectorIhSaIhEED2Ev.exit112, label %if.then.i.i.i111 + +if.then.i.i.i111: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit109 call void @_ZdlPv(ptr noundef nonnull %5) #17 - br label %_ZNSt6vectorIhSaIhEED2Ev.exit3 + br label %_ZNSt6vectorIhSaIhEED2Ev.exit112 -_ZNSt6vectorIhSaIhEED2Ev.exit3: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit, %if.then.i.i.i2 - %6 = load ptr, ptr %kdf_buffer_, align 8 - %tobool.not.i.i.i4 = icmp eq ptr %6, null - br i1 %tobool.not.i.i.i4, label %_ZNSt6vectorIhSaIhEED2Ev.exit6, label %if.then.i.i.i5 +_ZNSt6vectorIhSaIhEED2Ev.exit112: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit109, %if.then.i.i.i111 + %6 = load ptr, ptr %aead_key_, align 8 + %tobool.not.i.i.i113 = icmp eq ptr %6, null + br i1 %tobool.not.i.i.i113, label %_ZNSt6vectorIhSaIhEED2Ev.exit115, label %if.then.i.i.i114 -if.then.i.i.i5: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit3 +if.then.i.i.i114: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit112 call void @_ZdlPv(ptr noundef nonnull %6) #17 - br label %_ZNSt6vectorIhSaIhEED2Ev.exit6 + br label %_ZNSt6vectorIhSaIhEED2Ev.exit115 -_ZNSt6vectorIhSaIhEED2Ev.exit6: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit3, %if.then.i.i.i5 - %7 = load ptr, ptr %aead_key_, align 8 - %tobool.not.i.i.i7 = icmp eq ptr %7, null - br i1 %tobool.not.i.i.i7, label %_ZNSt6vectorIhSaIhEED2Ev.exit9, label %if.then.i.i.i8 +_ZNSt6vectorIhSaIhEED2Ev.exit115: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit112, %if.then.i.i.i114 + %7 = load ptr, ptr %key_, align 8 + %tobool.not.i.i.i116 = icmp eq ptr %7, null + br i1 %tobool.not.i.i.i116, label %_ZNSt6vectorIhSaIhEED2Ev.exit118, label %if.then.i.i.i117 -if.then.i.i.i8: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit6 +if.then.i.i.i117: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit115 call void @_ZdlPv(ptr noundef nonnull %7) #17 - br label %_ZNSt6vectorIhSaIhEED2Ev.exit9 + br label %_ZNSt6vectorIhSaIhEED2Ev.exit118 -_ZNSt6vectorIhSaIhEED2Ev.exit9: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit6, %if.then.i.i.i8 - %8 = load ptr, ptr %key_, align 8 - %tobool.not.i.i.i10 = icmp eq ptr %8, null - br i1 %tobool.not.i.i.i10, label %_ZNSt6vectorIhSaIhEED2Ev.exit12, label %if.then.i.i.i11 - -if.then.i.i.i11: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit9 - call void @_ZdlPv(ptr noundef nonnull %8) #17 - br label %_ZNSt6vectorIhSaIhEED2Ev.exit12 +_ZNSt6vectorIhSaIhEED2Ev.exit118: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit115, %if.then.i.i.i117 + resume { ptr, i32 } %2 -_ZNSt6vectorIhSaIhEED2Ev.exit12: ; preds = %_ZNSt6vectorIhSaIhEED2Ev.exit9, %if.then.i.i.i11 - resume { ptr, i32 } %3 - -if.end: ; preds = %invoke.cont.i.i, %if.then7.i, %if.else.i, %if.then.i, %entry - %9 = load i8, ptr %is_rekey_, align 8 - %tobool16 = trunc i8 %9 to i1 - %spec.select = select i1 %tobool16, i64 32, i64 %key.coerce1 - invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %key_, i64 noundef %spec.select) +if.end: ; preds = %if.then.i105.if.end_crit_edge, %entry + %tobool16 = phi i64 [ %1, %if.then.i105.if.end_crit_edge ], [ %key.coerce1, %entry ] + invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %key_, i64 noundef %tobool16) to label %invoke.cont18 unwind label %lpad invoke.cont18: ; preds = %if.end - %10 = load ptr, ptr %key_, align 8 + %8 = load ptr, ptr %key_, align 8 %_M_finish.i = getelementptr inbounds nuw i8, ptr %this, i64 24 - %11 = load ptr, ptr %_M_finish.i, align 8 - %sub.ptr.lhs.cast.i = ptrtoint ptr %11 to i64 - %sub.ptr.rhs.cast.i = ptrtoint ptr %10 to i64 + %9 = load ptr, ptr %_M_finish.i, align 8 + %sub.ptr.lhs.cast.i = ptrtoint ptr %9 to i64 + %sub.ptr.rhs.cast.i = ptrtoint ptr %8 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %10, ptr align 1 %key.coerce0, i64 %sub.ptr.sub.i, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %8, ptr align 1 %key.coerce0, i64 %sub.ptr.sub.i, i1 false) ret void } @@ -327,7 +326,7 @@ if.then: ; preds = %entry %sub.ptr.sub.i9 = sub i64 %sub.ptr.lhs.cast.i8, %sub.ptr.lhs.cast.i %cmp4.i = icmp sgt i64 %sub.ptr.sub.i, -1 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.sub.i, 9223372036854775807 + %sub.i = sub nuw nsw i64 9223372036854775807, %sub.ptr.sub.i %cmp6.i = icmp ule i64 %sub.ptr.sub.i9, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.sub.i9, %sub @@ -351,7 +350,7 @@ _ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i: ; preds = %if.th br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp slt i64 %__new_size, 0 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIhSaIhEE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -392,7 +391,7 @@ if.then.i32.i: ; preds = %_ZNSt6vectorIhSaIhE _ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit33.i: ; preds = %if.then.i32.i, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr36.i = getelementptr inbounds i8, ptr %call5.i.i.i.i, i64 %__new_size + %add.ptr36.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i, i64 %__new_size store ptr %add.ptr36.i, ptr %_M_finish.i, align 8 %add.ptr39.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i, i64 %3 store ptr %add.ptr39.i, ptr %_M_end_of_storage.i, align 8 diff --git a/bench/grpc/optimized/retry_service_config.cc.ll b/bench/grpc/optimized/retry_service_config.cc.ll index cbb1f6158a1..734caf2f182 100644 --- a/bench/grpc/optimized/retry_service_config.cc.ll +++ b/bench/grpc/optimized/retry_service_config.cc.ll @@ -798,7 +798,7 @@ if.then.i.i87: ; preds = %if.then53 unreachable invoke.cont57: ; preds = %if.then53 - %sub.i = sub nuw i64 %18, %add + %sub.i = sub i64 %18, %add %add.ptr.i86 = getelementptr inbounds i8, ptr %19, i64 %add %after_decimal.sroa.0.0 = call i64 @llvm.umin.i64(i64 %sub.i, i64 3) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %val.i.i) @@ -811,20 +811,16 @@ invoke.cont67: ; preds = %invoke.cont57 br i1 %call.i.i104105, label %for.cond.preheader, label %if.then90.invoke for.cond.preheader: ; preds = %invoke.cont67 + %sub = sub nuw nsw i64 3, %after_decimal.sroa.0.0 %cmp74142.not = icmp ugt i64 %sub.i, 2 - br i1 %cmp74142.not, label %for.end, label %for.body.preheader + br i1 %cmp74142.not, label %for.end, label %for.body -for.body.preheader: ; preds = %for.cond.preheader - %sub = xor i64 %after_decimal.sroa.0.0, 3 - %umax = call i64 @llvm.umax.i64(i64 %sub, i64 1) - br label %for.body - -for.body: ; preds = %for.body.preheader, %for.body - %i.0144 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ] - %decimal_multiplier.0143 = phi i32 [ %mul75, %for.body ], [ 1, %for.body.preheader ] +for.body: ; preds = %for.cond.preheader, %for.body + %i.0144 = phi i64 [ %inc, %for.body ], [ 0, %for.cond.preheader ] + %decimal_multiplier.0143 = phi i32 [ %mul75, %for.body ], [ 1, %for.cond.preheader ] %mul75 = mul i32 %decimal_multiplier.0143, 10 %inc = add nuw nsw i64 %i.0144, 1 - %exitcond.not = icmp eq i64 %inc, %umax + %exitcond.not = icmp eq i64 %inc, %sub br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !7 for.end: ; preds = %for.body, %for.cond.preheader @@ -2947,12 +2943,12 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #17 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #16 - ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #18 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umax.i64(i64, i64) #16 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #19 diff --git a/bench/harfbuzz/optimized/harfbuzz.cc.ll b/bench/harfbuzz/optimized/harfbuzz.cc.ll index 37b9373be75..1b0beff4f7f 100644 --- a/bench/harfbuzz/optimized/harfbuzz.cc.ll +++ b/bench/harfbuzz/optimized/harfbuzz.cc.ll @@ -13870,7 +13870,7 @@ while.end138.i: ; preds = %while.body136.i, %l %145 = load ptr, ptr %arrayidx140.i, align 8 tail call void @hb_buffer_append(ptr noundef nonnull %call.i, ptr noundef %145, i32 noundef %137, i32 noundef %fragment_end.0.i.lcssa) store i32 %fragment_end.0.i.lcssa, ptr %arrayidx107.i, align 4 - %sub145.i = xor i32 %fragment_idx84.0.i292, 1 + %sub145.i = sub nuw nsw i32 1, %fragment_idx84.0.i292 %146 = load i32, ptr %fragment_start.i, align 8 %cmp101.i = icmp ult i32 %146, %134 %147 = load i32, ptr %arrayidx102.i, align 4 @@ -101935,7 +101935,7 @@ if.end: ; preds = %if.end9.i.i.i %6 = trunc nuw nsw i32 %5 to i16 %entrySelector.i.i = getelementptr inbounds nuw i8, ptr %this, i64 4 %7 = shl nuw nsw i16 %6, 8 - %8 = xor i16 %7, 7936 + %8 = sub nuw nsw i16 7936, %7 %ref.tmp.sroa.0.0.insert.insert.i4.i.i = select i1 %tobool.not.i.i.i, i16 0, i16 %8 store i16 %ref.tmp.sroa.0.0.insert.insert.i4.i.i, ptr %entrySelector.i.i, align 1 %rev.i.i = lshr exact i16 %ref.tmp.sroa.0.0.insert.insert.i4.i.i, 8 @@ -264802,8 +264802,8 @@ if.then.i14.i: ; preds = %for.body.i.i %mul.i.i = shl i32 %11, 6 %12 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %10, i1 true) %13 = trunc nuw nsw i64 %12 to i32 - %14 = or disjoint i32 %mul.i.i, %13 - %add.i.i = xor i32 %14, 63 + %reass.sub.i.i = or disjoint i32 %mul.i.i, 63 + %add.i.i = sub nuw nsw i32 %reass.sub.i.i, %13 br label %_ZNK13hb_bit_page_t7get_maxEv.exit.i _ZNK13hb_bit_page_t7get_maxEv.exit.i: ; preds = %for.cond.i.i, %if.then.i14.i @@ -264820,14 +264820,14 @@ _ZNK12hb_bit_set_t7get_maxEv.exit: ; preds = %for.cond.backedge.i if.end: ; preds = %entry %shr.i = lshr i32 %0, 9 %arrayZ.i.i11 = getelementptr inbounds nuw i8, ptr %this, i64 24 - %15 = load ptr, ptr %arrayZ.i.i11, align 8 + %14 = load ptr, ptr %arrayZ.i.i11, align 8 %length.i.i12 = getelementptr inbounds nuw i8, ptr %this, i64 20 - %16 = load i32, ptr %length.i.i12, align 4 - %cmp.not1.i.i.i.i = icmp sgt i32 %16, 0 + %15 = load i32, ptr %length.i.i12, align 4 + %cmp.not1.i.i.i.i = icmp sgt i32 %15, 0 br i1 %cmp.not1.i.i.i.i, label %while.body.preheader.i.i.i.i, label %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit while.body.preheader.i.i.i.i: ; preds = %if.end - %sub.i.i.i.i = add nsw i32 %16, -1 + %sub.i.i.i.i = add nsw i32 %15, -1 br label %while.body.i.i.i.i while.body.i.i.i.i: ; preds = %if.end8.i.i.i.i, %while.body.preheader.i.i.i.i @@ -264837,9 +264837,9 @@ while.body.i.i.i.i: ; preds = %if.end8.i.i.i.i, %w %div9.i.i.i.i = lshr i32 %add.i.i.i.i, 1 %conv1.i.i.i.i = zext nneg i32 %div9.i.i.i.i to i64 %mul.i.i.i.i = shl nuw nsw i64 %conv1.i.i.i.i, 3 - %add.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %15, i64 %mul.i.i.i.i - %17 = load i32, ptr %add.ptr.i.i.i.i, align 4 - %cmp2.i.i.i.i = icmp slt i32 %shr.i, %17 + %add.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %14, i64 %mul.i.i.i.i + %16 = load i32, ptr %add.ptr.i.i.i.i, align 4 + %cmp2.i.i.i.i = icmp slt i32 %shr.i, %16 br i1 %cmp2.i.i.i.i, label %if.then.i.i.i.i, label %if.else.i.i.i.i if.then.i.i.i.i: ; preds = %while.body.i.i.i.i @@ -264847,7 +264847,7 @@ if.then.i.i.i.i: ; preds = %while.body.i.i.i.i br label %if.end8.i.i.i.i if.else.i.i.i.i: ; preds = %while.body.i.i.i.i - %cmp4.not.i.i.i.i = icmp eq i32 %shr.i, %17 + %cmp4.not.i.i.i.i = icmp eq i32 %shr.i, %16 br i1 %cmp4.not.i.i.i.i, label %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit, label %if.then5.i.i.i.i if.then5.i.i.i.i: ; preds = %if.else.i.i.i.i @@ -264862,31 +264862,31 @@ if.end8.i.i.i.i: ; preds = %if.then5.i.i.i.i, % _ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit: ; preds = %if.end8.i.i.i.i, %if.else.i.i.i.i, %if.end %storemerge.i.i.ph.sink.i.i = phi i32 [ 0, %if.end ], [ %min.1.i.i.i.i, %if.end8.i.i.i.i ], [ %div9.i.i.i.i, %if.else.i.i.i.i ] - %cmp6 = icmp ult i32 %storemerge.i.i.ph.sink.i.i, %16 + %cmp6 = icmp ult i32 %storemerge.i.i.ph.sink.i.i, %15 %idxprom = zext nneg i32 %storemerge.i.i.ph.sink.i.i to i64 br i1 %cmp6, label %land.lhs.true, label %if.end26 land.lhs.true: ; preds = %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit - %arrayidx = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %15, i64 %idxprom - %18 = load i32, ptr %arrayidx, align 4 - %cmp10 = icmp eq i32 %18, %shr.i + %arrayidx = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %14, i64 %idxprom + %17 = load i32, ptr %arrayidx, align 4 + %cmp10 = icmp eq i32 %17, %shr.i br i1 %cmp10, label %if.then11, label %if.end26 if.then11: ; preds = %land.lhs.true - %19 = and i32 %0, 511 - %cmp.i15 = icmp eq i32 %19, 0 + %18 = and i32 %0, 511 + %cmp.i15 = icmp eq i32 %18, 0 br i1 %cmp.i15, label %_ZNK13hb_bit_page_t8previousEPj.exit.thread, label %if.end.i if.end.i: ; preds = %if.then11 %index16 = getelementptr inbounds nuw i8, ptr %arrayidx, i64 4 - %20 = load i32, ptr %index16, align 4 + %19 = load i32, ptr %index16, align 4 %length.i13 = getelementptr inbounds nuw i8, ptr %this, i64 36 - %21 = load i32, ptr %length.i13, align 4 - %cmp.not.i = icmp ult i32 %20, %21 + %20 = load i32, ptr %length.i13, align 4 + %cmp.not.i = icmp ult i32 %19, %20 %arrayZ.i = getelementptr inbounds nuw i8, ptr %this, i64 40 - %22 = load ptr, ptr %arrayZ.i, align 8 - %idxprom.i = zext i32 %20 to i64 - %arrayidx.i = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %22, i64 %idxprom.i + %21 = load ptr, ptr %arrayZ.i, align 8 + %idxprom.i = zext i32 %19 to i64 + %arrayidx.i = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %21, i64 %idxprom.i %retval.0.i14 = select i1 %cmp.not.i, ptr %arrayidx.i, ptr @_hb_NullPool %sub.i = add i32 %0, 511 %and.i = lshr i32 %sub.i, 6 @@ -264901,13 +264901,13 @@ if.end.i: ; preds = %if.then11 %v.i = getelementptr inbounds nuw i8, ptr %retval.0.i14, i64 8 %idxprom.i.i = zext nneg i32 %div11.i to i64 %arrayidx.i.i17 = getelementptr inbounds nuw [8 x i64], ptr %v.i, i64 0, i64 %idxprom.i.i - %23 = load i64, ptr %arrayidx.i.i17, align 8 - %and5.i = and i64 %23, %cond.i + %22 = load i64, ptr %arrayidx.i.i17, align 8 + %and5.i = and i64 %22, %cond.i %tobool.not16.i = icmp eq i64 %and5.i, 0 br i1 %tobool.not16.i, label %if.end9.i, label %if.then19 if.then6.loopexit.i: ; preds = %if.end12.i - %24 = trunc nsw i64 %indvars.iv.next.i21 to i32 + %23 = trunc nsw i64 %indvars.iv.next.i21 to i32 br label %if.then19 if.end9.i: ; preds = %if.end.i, %if.end12.i @@ -264929,40 +264929,40 @@ _ZNK13hb_bit_page_t8previousEPj.exit.thread: ; preds = %if.end9.i, %if.then if.then19: ; preds = %if.then6.loopexit.i, %if.end.i %.lcssa.i = phi i64 [ %and5.i, %if.end.i ], [ %.pr.i, %if.then6.loopexit.i ] - %i.0.lcssa.i = phi i32 [ %div11.i, %if.end.i ], [ %24, %if.then6.loopexit.i ] + %i.0.lcssa.i = phi i32 [ %div11.i, %if.end.i ], [ %23, %if.then6.loopexit.i ] %mul.i18 = shl nuw nsw i32 %i.0.lcssa.i, 6 - %25 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.lcssa.i, i1 true) - %26 = trunc nuw nsw i64 %25 to i32 - %27 = or disjoint i32 %mul.i18, %26 - %add8.i = xor i32 %27, 63 + %24 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.lcssa.i, i1 true) + %25 = trunc nuw nsw i64 %24 to i32 + %reass.sub19.i = sub nsw i32 %mul.i18, %25 + %add8.i = add i32 %reass.sub19.i, 63 store i32 %add8.i, ptr %codepoint, align 4 - %28 = load ptr, ptr %arrayZ.i.i11, align 8 - %arrayidx23 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom - %29 = load i32, ptr %arrayidx23, align 4 - %mul = shl i32 %29, 9 + %26 = load ptr, ptr %arrayZ.i.i11, align 8 + %arrayidx23 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %26, i64 %idxprom + %27 = load i32, ptr %arrayidx23, align 4 + %mul = shl i32 %27, 9 %add = add i32 %mul, %add8.i store i32 %add, ptr %codepoint, align 4 br label %return if.end26: ; preds = %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit, %_ZNK13hb_bit_page_t8previousEPj.exit.thread, %land.lhs.true - %30 = phi ptr [ %.pre, %_ZNK13hb_bit_page_t8previousEPj.exit.thread ], [ %15, %land.lhs.true ], [ %15, %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit ] + %28 = phi ptr [ %.pre, %_ZNK13hb_bit_page_t8previousEPj.exit.thread ], [ %14, %land.lhs.true ], [ %14, %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit ] %arrayZ29 = getelementptr inbounds nuw i8, ptr %this, i64 40 - %31 = load ptr, ptr %arrayZ29, align 8 + %29 = load ptr, ptr %arrayZ29, align 8 br label %for.cond for.cond: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit, %if.end26 %indvars.iv = phi i64 [ %indvars.iv.next, %_ZNK13hb_bit_page_t7get_maxEv.exit ], [ %idxprom, %if.end26 ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 - %32 = and i64 %indvars.iv.next, 2147483648 - %cmp27 = icmp eq i64 %32, 0 + %30 = and i64 %indvars.iv.next, 2147483648 + %cmp27 = icmp eq i64 %30, 0 br i1 %cmp27, label %for.body, label %for.end for.body: ; preds = %for.cond %idxprom32 = and i64 %indvars.iv.next, 2147483647 - %index34 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %30, i64 %idxprom32, i32 1 - %33 = load i32, ptr %index34, align 4 - %idxprom35 = zext i32 %33 to i64 - %v.i22 = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %31, i64 %idxprom35, i32 1 + %index34 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom32, i32 1 + %31 = load i32, ptr %index34, align 4 + %idxprom35 = zext i32 %31 to i64 + %v.i22 = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %29, i64 %idxprom35, i32 1 br label %for.cond.i for.cond.i: ; preds = %for.body.i25, %for.body @@ -264973,28 +264973,25 @@ for.cond.i: ; preds = %for.body.i25, %for. for.body.i25: ; preds = %for.cond.i %indvars.iv.next.i26 = add nsw i64 %indvars.iv.i23, -1 %arrayidx.i.i27 = getelementptr inbounds nuw [8 x i64], ptr %v.i22, i64 0, i64 %indvars.iv.next.i26 - %34 = load i64, ptr %arrayidx.i.i27, align 8 - %tobool.not.i28 = icmp eq i64 %34, 0 + %32 = load i64, ptr %arrayidx.i.i27, align 8 + %tobool.not.i28 = icmp eq i64 %32, 0 br i1 %tobool.not.i28, label %for.cond.i, label %_ZNK13hb_bit_page_t7get_maxEv.exit, !llvm.loop !2667 _ZNK13hb_bit_page_t7get_maxEv.exit: ; preds = %for.body.i25 - %35 = trunc nsw i64 %indvars.iv.next.i26 to i32 - %mul.i30 = shl i32 %35, 6 - %36 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %34, i1 true) - %37 = trunc nuw nsw i64 %36 to i32 - %38 = or disjoint i32 %mul.i30, %37 - %cmp38.not = icmp eq i32 %38, -64 - br i1 %cmp38.not, label %for.cond, label %if.then39.loopexit43, !llvm.loop !2669 - -if.then39.loopexit43: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit - %add.i31.le = xor i32 %38, 63 - br label %if.then39 - -if.then39: ; preds = %for.cond.i, %if.then39.loopexit43 - %retval.0.i3241 = phi i32 [ %add.i31.le, %if.then39.loopexit43 ], [ 0, %for.cond.i ] - %arrayidx43 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %30, i64 %idxprom32 - %39 = load i32, ptr %arrayidx43, align 4 - %mul45 = shl i32 %39, 9 + %33 = trunc nsw i64 %indvars.iv.next.i26 to i32 + %mul.i30 = shl i32 %33, 6 + %34 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %32, i1 true) + %35 = trunc nuw nsw i64 %34 to i32 + %reass.sub.i = or disjoint i32 %mul.i30, 63 + %add.i31 = sub nuw nsw i32 %reass.sub.i, %35 + %cmp38.not = icmp eq i32 %add.i31, -1 + br i1 %cmp38.not, label %for.cond, label %if.then39, !llvm.loop !2669 + +if.then39: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit, %for.cond.i + %retval.0.i3241 = phi i32 [ 0, %for.cond.i ], [ %add.i31, %_ZNK13hb_bit_page_t7get_maxEv.exit ] + %arrayidx43 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom32 + %36 = load i32, ptr %arrayidx43, align 4 + %mul45 = shl i32 %36, 9 %add46 = add i32 %mul45, %retval.0.i3241 store i32 %add46, ptr %codepoint, align 4 br label %return diff --git a/bench/harfbuzz/optimized/hb-subset-plan.cc.ll b/bench/harfbuzz/optimized/hb-subset-plan.cc.ll index 82134125477..6ec6c623894 100644 --- a/bench/harfbuzz/optimized/hb-subset-plan.cc.ll +++ b/bench/harfbuzz/optimized/hb-subset-plan.cc.ll @@ -54325,8 +54325,8 @@ if.then.i14.i: ; preds = %for.body.i.i %mul.i.i = shl i32 %11, 6 %12 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %10, i1 true) %13 = trunc nuw nsw i64 %12 to i32 - %14 = or disjoint i32 %mul.i.i, %13 - %add.i.i = xor i32 %14, 63 + %reass.sub.i.i = or disjoint i32 %mul.i.i, 63 + %add.i.i = sub nuw nsw i32 %reass.sub.i.i, %13 br label %_ZNK13hb_bit_page_t7get_maxEv.exit.i _ZNK13hb_bit_page_t7get_maxEv.exit.i: ; preds = %for.cond.i.i, %if.then.i14.i @@ -54343,14 +54343,14 @@ _ZNK12hb_bit_set_t7get_maxEv.exit: ; preds = %for.cond.backedge.i if.end: ; preds = %entry %shr.i = lshr i32 %0, 9 %arrayZ.i.i11 = getelementptr inbounds nuw i8, ptr %this, i64 24 - %15 = load ptr, ptr %arrayZ.i.i11, align 8 + %14 = load ptr, ptr %arrayZ.i.i11, align 8 %length.i.i12 = getelementptr inbounds nuw i8, ptr %this, i64 20 - %16 = load i32, ptr %length.i.i12, align 4 - %cmp.not1.i.i.i.i = icmp sgt i32 %16, 0 + %15 = load i32, ptr %length.i.i12, align 4 + %cmp.not1.i.i.i.i = icmp sgt i32 %15, 0 br i1 %cmp.not1.i.i.i.i, label %while.body.preheader.i.i.i.i, label %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit while.body.preheader.i.i.i.i: ; preds = %if.end - %sub.i.i.i.i = add nsw i32 %16, -1 + %sub.i.i.i.i = add nsw i32 %15, -1 br label %while.body.i.i.i.i while.body.i.i.i.i: ; preds = %if.end8.i.i.i.i, %while.body.preheader.i.i.i.i @@ -54360,9 +54360,9 @@ while.body.i.i.i.i: ; preds = %if.end8.i.i.i.i, %w %div9.i.i.i.i = lshr i32 %add.i.i.i.i, 1 %conv1.i.i.i.i = zext nneg i32 %div9.i.i.i.i to i64 %mul.i.i.i.i = shl nuw nsw i64 %conv1.i.i.i.i, 3 - %add.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %15, i64 %mul.i.i.i.i - %17 = load i32, ptr %add.ptr.i.i.i.i, align 4 - %cmp2.i.i.i.i = icmp slt i32 %shr.i, %17 + %add.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %14, i64 %mul.i.i.i.i + %16 = load i32, ptr %add.ptr.i.i.i.i, align 4 + %cmp2.i.i.i.i = icmp slt i32 %shr.i, %16 br i1 %cmp2.i.i.i.i, label %if.then.i.i.i.i, label %if.else.i.i.i.i if.then.i.i.i.i: ; preds = %while.body.i.i.i.i @@ -54370,7 +54370,7 @@ if.then.i.i.i.i: ; preds = %while.body.i.i.i.i br label %if.end8.i.i.i.i if.else.i.i.i.i: ; preds = %while.body.i.i.i.i - %cmp4.not.i.i.i.i = icmp eq i32 %shr.i, %17 + %cmp4.not.i.i.i.i = icmp eq i32 %shr.i, %16 br i1 %cmp4.not.i.i.i.i, label %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit, label %if.then5.i.i.i.i if.then5.i.i.i.i: ; preds = %if.else.i.i.i.i @@ -54385,31 +54385,31 @@ if.end8.i.i.i.i: ; preds = %if.then5.i.i.i.i, % _ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit: ; preds = %if.end8.i.i.i.i, %if.else.i.i.i.i, %if.end %storemerge.i.i.ph.sink.i.i = phi i32 [ 0, %if.end ], [ %min.1.i.i.i.i, %if.end8.i.i.i.i ], [ %div9.i.i.i.i, %if.else.i.i.i.i ] - %cmp6 = icmp ult i32 %storemerge.i.i.ph.sink.i.i, %16 + %cmp6 = icmp ult i32 %storemerge.i.i.ph.sink.i.i, %15 %idxprom = zext nneg i32 %storemerge.i.i.ph.sink.i.i to i64 br i1 %cmp6, label %land.lhs.true, label %if.end26 land.lhs.true: ; preds = %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit - %arrayidx = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %15, i64 %idxprom - %18 = load i32, ptr %arrayidx, align 4 - %cmp10 = icmp eq i32 %18, %shr.i + %arrayidx = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %14, i64 %idxprom + %17 = load i32, ptr %arrayidx, align 4 + %cmp10 = icmp eq i32 %17, %shr.i br i1 %cmp10, label %if.then11, label %if.end26 if.then11: ; preds = %land.lhs.true - %19 = and i32 %0, 511 - %cmp.i15 = icmp eq i32 %19, 0 + %18 = and i32 %0, 511 + %cmp.i15 = icmp eq i32 %18, 0 br i1 %cmp.i15, label %_ZNK13hb_bit_page_t8previousEPj.exit.thread, label %if.end.i if.end.i: ; preds = %if.then11 %index16 = getelementptr inbounds nuw i8, ptr %arrayidx, i64 4 - %20 = load i32, ptr %index16, align 4 + %19 = load i32, ptr %index16, align 4 %length.i13 = getelementptr inbounds nuw i8, ptr %this, i64 36 - %21 = load i32, ptr %length.i13, align 4 - %cmp.not.i = icmp ult i32 %20, %21 + %20 = load i32, ptr %length.i13, align 4 + %cmp.not.i = icmp ult i32 %19, %20 %arrayZ.i = getelementptr inbounds nuw i8, ptr %this, i64 40 - %22 = load ptr, ptr %arrayZ.i, align 8 - %idxprom.i = zext i32 %20 to i64 - %arrayidx.i = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %22, i64 %idxprom.i + %21 = load ptr, ptr %arrayZ.i, align 8 + %idxprom.i = zext i32 %19 to i64 + %arrayidx.i = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %21, i64 %idxprom.i %retval.0.i14 = select i1 %cmp.not.i, ptr %arrayidx.i, ptr @_hb_NullPool %sub.i = add i32 %0, 511 %and.i = lshr i32 %sub.i, 6 @@ -54424,13 +54424,13 @@ if.end.i: ; preds = %if.then11 %v.i = getelementptr inbounds nuw i8, ptr %retval.0.i14, i64 8 %idxprom.i.i = zext nneg i32 %div11.i to i64 %arrayidx.i.i17 = getelementptr inbounds nuw [8 x i64], ptr %v.i, i64 0, i64 %idxprom.i.i - %23 = load i64, ptr %arrayidx.i.i17, align 8 - %and5.i = and i64 %23, %cond.i + %22 = load i64, ptr %arrayidx.i.i17, align 8 + %and5.i = and i64 %22, %cond.i %tobool.not16.i = icmp eq i64 %and5.i, 0 br i1 %tobool.not16.i, label %if.end9.i, label %if.then19 if.then6.loopexit.i: ; preds = %if.end12.i - %24 = trunc nsw i64 %indvars.iv.next.i21 to i32 + %23 = trunc nsw i64 %indvars.iv.next.i21 to i32 br label %if.then19 if.end9.i: ; preds = %if.end.i, %if.end12.i @@ -54452,40 +54452,40 @@ _ZNK13hb_bit_page_t8previousEPj.exit.thread: ; preds = %if.end9.i, %if.then if.then19: ; preds = %if.then6.loopexit.i, %if.end.i %.lcssa.i = phi i64 [ %and5.i, %if.end.i ], [ %.pr.i, %if.then6.loopexit.i ] - %i.0.lcssa.i = phi i32 [ %div11.i, %if.end.i ], [ %24, %if.then6.loopexit.i ] + %i.0.lcssa.i = phi i32 [ %div11.i, %if.end.i ], [ %23, %if.then6.loopexit.i ] %mul.i18 = shl nuw nsw i32 %i.0.lcssa.i, 6 - %25 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.lcssa.i, i1 true) - %26 = trunc nuw nsw i64 %25 to i32 - %27 = or disjoint i32 %mul.i18, %26 - %add8.i = xor i32 %27, 63 + %24 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.lcssa.i, i1 true) + %25 = trunc nuw nsw i64 %24 to i32 + %reass.sub19.i = sub nsw i32 %mul.i18, %25 + %add8.i = add i32 %reass.sub19.i, 63 store i32 %add8.i, ptr %codepoint, align 4 - %28 = load ptr, ptr %arrayZ.i.i11, align 8 - %arrayidx23 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom - %29 = load i32, ptr %arrayidx23, align 4 - %mul = shl i32 %29, 9 + %26 = load ptr, ptr %arrayZ.i.i11, align 8 + %arrayidx23 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %26, i64 %idxprom + %27 = load i32, ptr %arrayidx23, align 4 + %mul = shl i32 %27, 9 %add = add i32 %mul, %add8.i store i32 %add, ptr %codepoint, align 4 br label %return if.end26: ; preds = %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit, %_ZNK13hb_bit_page_t8previousEPj.exit.thread, %land.lhs.true - %30 = phi ptr [ %.pre, %_ZNK13hb_bit_page_t8previousEPj.exit.thread ], [ %15, %land.lhs.true ], [ %15, %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit ] + %28 = phi ptr [ %.pre, %_ZNK13hb_bit_page_t8previousEPj.exit.thread ], [ %14, %land.lhs.true ], [ %14, %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit ] %arrayZ29 = getelementptr inbounds nuw i8, ptr %this, i64 40 - %31 = load ptr, ptr %arrayZ29, align 8 + %29 = load ptr, ptr %arrayZ29, align 8 br label %for.cond for.cond: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit, %if.end26 %indvars.iv = phi i64 [ %indvars.iv.next, %_ZNK13hb_bit_page_t7get_maxEv.exit ], [ %idxprom, %if.end26 ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 - %32 = and i64 %indvars.iv.next, 2147483648 - %cmp27 = icmp eq i64 %32, 0 + %30 = and i64 %indvars.iv.next, 2147483648 + %cmp27 = icmp eq i64 %30, 0 br i1 %cmp27, label %for.body, label %for.end for.body: ; preds = %for.cond %idxprom32 = and i64 %indvars.iv.next, 2147483647 - %index34 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %30, i64 %idxprom32, i32 1 - %33 = load i32, ptr %index34, align 4 - %idxprom35 = zext i32 %33 to i64 - %v.i22 = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %31, i64 %idxprom35, i32 1 + %index34 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom32, i32 1 + %31 = load i32, ptr %index34, align 4 + %idxprom35 = zext i32 %31 to i64 + %v.i22 = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %29, i64 %idxprom35, i32 1 br label %for.cond.i for.cond.i: ; preds = %for.body.i25, %for.body @@ -54496,28 +54496,25 @@ for.cond.i: ; preds = %for.body.i25, %for. for.body.i25: ; preds = %for.cond.i %indvars.iv.next.i26 = add nsw i64 %indvars.iv.i23, -1 %arrayidx.i.i27 = getelementptr inbounds nuw [8 x i64], ptr %v.i22, i64 0, i64 %indvars.iv.next.i26 - %34 = load i64, ptr %arrayidx.i.i27, align 8 - %tobool.not.i28 = icmp eq i64 %34, 0 + %32 = load i64, ptr %arrayidx.i.i27, align 8 + %tobool.not.i28 = icmp eq i64 %32, 0 br i1 %tobool.not.i28, label %for.cond.i, label %_ZNK13hb_bit_page_t7get_maxEv.exit, !llvm.loop !418 _ZNK13hb_bit_page_t7get_maxEv.exit: ; preds = %for.body.i25 - %35 = trunc nsw i64 %indvars.iv.next.i26 to i32 - %mul.i30 = shl i32 %35, 6 - %36 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %34, i1 true) - %37 = trunc nuw nsw i64 %36 to i32 - %38 = or disjoint i32 %mul.i30, %37 - %cmp38.not = icmp eq i32 %38, -64 - br i1 %cmp38.not, label %for.cond, label %if.then39.loopexit43, !llvm.loop !420 - -if.then39.loopexit43: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit - %add.i31.le = xor i32 %38, 63 - br label %if.then39 - -if.then39: ; preds = %for.cond.i, %if.then39.loopexit43 - %retval.0.i3241 = phi i32 [ %add.i31.le, %if.then39.loopexit43 ], [ 0, %for.cond.i ] - %arrayidx43 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %30, i64 %idxprom32 - %39 = load i32, ptr %arrayidx43, align 4 - %mul45 = shl i32 %39, 9 + %33 = trunc nsw i64 %indvars.iv.next.i26 to i32 + %mul.i30 = shl i32 %33, 6 + %34 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %32, i1 true) + %35 = trunc nuw nsw i64 %34 to i32 + %reass.sub.i = or disjoint i32 %mul.i30, 63 + %add.i31 = sub nuw nsw i32 %reass.sub.i, %35 + %cmp38.not = icmp eq i32 %add.i31, -1 + br i1 %cmp38.not, label %for.cond, label %if.then39, !llvm.loop !420 + +if.then39: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit, %for.cond.i + %retval.0.i3241 = phi i32 [ 0, %for.cond.i ], [ %add.i31, %_ZNK13hb_bit_page_t7get_maxEv.exit ] + %arrayidx43 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom32 + %36 = load i32, ptr %arrayidx43, align 4 + %mul45 = shl i32 %36, 9 %add46 = add i32 %mul45, %retval.0.i3241 store i32 %add46, ptr %codepoint, align 4 br label %return diff --git a/bench/harfbuzz/optimized/hb-subset.cc.ll b/bench/harfbuzz/optimized/hb-subset.cc.ll index 5bad0d72e94..279cc38f302 100644 --- a/bench/harfbuzz/optimized/hb-subset.cc.ll +++ b/bench/harfbuzz/optimized/hb-subset.cc.ll @@ -84443,8 +84443,8 @@ if.then.i14.i: ; preds = %for.body.i.i %mul.i.i = shl i32 %11, 6 %12 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %10, i1 true) %13 = trunc nuw nsw i64 %12 to i32 - %14 = or disjoint i32 %mul.i.i, %13 - %add.i.i = xor i32 %14, 63 + %reass.sub.i.i = or disjoint i32 %mul.i.i, 63 + %add.i.i = sub nuw nsw i32 %reass.sub.i.i, %13 br label %_ZNK13hb_bit_page_t7get_maxEv.exit.i _ZNK13hb_bit_page_t7get_maxEv.exit.i: ; preds = %for.cond.i.i, %if.then.i14.i @@ -84461,14 +84461,14 @@ _ZNK12hb_bit_set_t7get_maxEv.exit: ; preds = %for.cond.backedge.i if.end: ; preds = %entry %shr.i = lshr i32 %0, 9 %arrayZ.i.i11 = getelementptr inbounds nuw i8, ptr %this, i64 24 - %15 = load ptr, ptr %arrayZ.i.i11, align 8 + %14 = load ptr, ptr %arrayZ.i.i11, align 8 %length.i.i12 = getelementptr inbounds nuw i8, ptr %this, i64 20 - %16 = load i32, ptr %length.i.i12, align 4 - %cmp.not1.i.i.i.i = icmp sgt i32 %16, 0 + %15 = load i32, ptr %length.i.i12, align 4 + %cmp.not1.i.i.i.i = icmp sgt i32 %15, 0 br i1 %cmp.not1.i.i.i.i, label %while.body.preheader.i.i.i.i, label %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit while.body.preheader.i.i.i.i: ; preds = %if.end - %sub.i.i.i.i = add nsw i32 %16, -1 + %sub.i.i.i.i = add nsw i32 %15, -1 br label %while.body.i.i.i.i while.body.i.i.i.i: ; preds = %if.end8.i.i.i.i, %while.body.preheader.i.i.i.i @@ -84478,9 +84478,9 @@ while.body.i.i.i.i: ; preds = %if.end8.i.i.i.i, %w %div9.i.i.i.i = lshr i32 %add.i.i.i.i, 1 %conv1.i.i.i.i = zext nneg i32 %div9.i.i.i.i to i64 %mul.i.i.i.i = shl nuw nsw i64 %conv1.i.i.i.i, 3 - %add.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %15, i64 %mul.i.i.i.i - %17 = load i32, ptr %add.ptr.i.i.i.i, align 4 - %cmp2.i.i.i.i = icmp slt i32 %shr.i, %17 + %add.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %14, i64 %mul.i.i.i.i + %16 = load i32, ptr %add.ptr.i.i.i.i, align 4 + %cmp2.i.i.i.i = icmp slt i32 %shr.i, %16 br i1 %cmp2.i.i.i.i, label %if.then.i.i.i.i, label %if.else.i.i.i.i if.then.i.i.i.i: ; preds = %while.body.i.i.i.i @@ -84488,7 +84488,7 @@ if.then.i.i.i.i: ; preds = %while.body.i.i.i.i br label %if.end8.i.i.i.i if.else.i.i.i.i: ; preds = %while.body.i.i.i.i - %cmp4.not.i.i.i.i = icmp eq i32 %shr.i, %17 + %cmp4.not.i.i.i.i = icmp eq i32 %shr.i, %16 br i1 %cmp4.not.i.i.i.i, label %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit, label %if.then5.i.i.i.i if.then5.i.i.i.i: ; preds = %if.else.i.i.i.i @@ -84503,31 +84503,31 @@ if.end8.i.i.i.i: ; preds = %if.then5.i.i.i.i, % _ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit: ; preds = %if.end8.i.i.i.i, %if.else.i.i.i.i, %if.end %storemerge.i.i.ph.sink.i.i = phi i32 [ 0, %if.end ], [ %min.1.i.i.i.i, %if.end8.i.i.i.i ], [ %div9.i.i.i.i, %if.else.i.i.i.i ] - %cmp6 = icmp ult i32 %storemerge.i.i.ph.sink.i.i, %16 + %cmp6 = icmp ult i32 %storemerge.i.i.ph.sink.i.i, %15 %idxprom = zext nneg i32 %storemerge.i.i.ph.sink.i.i to i64 br i1 %cmp6, label %land.lhs.true, label %if.end26 land.lhs.true: ; preds = %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit - %arrayidx = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %15, i64 %idxprom - %18 = load i32, ptr %arrayidx, align 4 - %cmp10 = icmp eq i32 %18, %shr.i + %arrayidx = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %14, i64 %idxprom + %17 = load i32, ptr %arrayidx, align 4 + %cmp10 = icmp eq i32 %17, %shr.i br i1 %cmp10, label %if.then11, label %if.end26 if.then11: ; preds = %land.lhs.true - %19 = and i32 %0, 511 - %cmp.i15 = icmp eq i32 %19, 0 + %18 = and i32 %0, 511 + %cmp.i15 = icmp eq i32 %18, 0 br i1 %cmp.i15, label %_ZNK13hb_bit_page_t8previousEPj.exit.thread, label %if.end.i if.end.i: ; preds = %if.then11 %index16 = getelementptr inbounds nuw i8, ptr %arrayidx, i64 4 - %20 = load i32, ptr %index16, align 4 + %19 = load i32, ptr %index16, align 4 %length.i13 = getelementptr inbounds nuw i8, ptr %this, i64 36 - %21 = load i32, ptr %length.i13, align 4 - %cmp.not.i = icmp ult i32 %20, %21 + %20 = load i32, ptr %length.i13, align 4 + %cmp.not.i = icmp ult i32 %19, %20 %arrayZ.i = getelementptr inbounds nuw i8, ptr %this, i64 40 - %22 = load ptr, ptr %arrayZ.i, align 8 - %idxprom.i = zext i32 %20 to i64 - %arrayidx.i = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %22, i64 %idxprom.i + %21 = load ptr, ptr %arrayZ.i, align 8 + %idxprom.i = zext i32 %19 to i64 + %arrayidx.i = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %21, i64 %idxprom.i %retval.0.i14 = select i1 %cmp.not.i, ptr %arrayidx.i, ptr @_hb_NullPool %sub.i = add i32 %0, 511 %and.i = lshr i32 %sub.i, 6 @@ -84542,13 +84542,13 @@ if.end.i: ; preds = %if.then11 %v.i = getelementptr inbounds nuw i8, ptr %retval.0.i14, i64 8 %idxprom.i.i = zext nneg i32 %div11.i to i64 %arrayidx.i.i17 = getelementptr inbounds nuw [8 x i64], ptr %v.i, i64 0, i64 %idxprom.i.i - %23 = load i64, ptr %arrayidx.i.i17, align 8 - %and5.i = and i64 %23, %cond.i + %22 = load i64, ptr %arrayidx.i.i17, align 8 + %and5.i = and i64 %22, %cond.i %tobool.not16.i = icmp eq i64 %and5.i, 0 br i1 %tobool.not16.i, label %if.end9.i, label %if.then19 if.then6.loopexit.i: ; preds = %if.end12.i - %24 = trunc nsw i64 %indvars.iv.next.i21 to i32 + %23 = trunc nsw i64 %indvars.iv.next.i21 to i32 br label %if.then19 if.end9.i: ; preds = %if.end.i, %if.end12.i @@ -84570,40 +84570,40 @@ _ZNK13hb_bit_page_t8previousEPj.exit.thread: ; preds = %if.end9.i, %if.then if.then19: ; preds = %if.then6.loopexit.i, %if.end.i %.lcssa.i = phi i64 [ %and5.i, %if.end.i ], [ %.pr.i, %if.then6.loopexit.i ] - %i.0.lcssa.i = phi i32 [ %div11.i, %if.end.i ], [ %24, %if.then6.loopexit.i ] + %i.0.lcssa.i = phi i32 [ %div11.i, %if.end.i ], [ %23, %if.then6.loopexit.i ] %mul.i18 = shl nuw nsw i32 %i.0.lcssa.i, 6 - %25 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.lcssa.i, i1 true) - %26 = trunc nuw nsw i64 %25 to i32 - %27 = or disjoint i32 %mul.i18, %26 - %add8.i = xor i32 %27, 63 + %24 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.lcssa.i, i1 true) + %25 = trunc nuw nsw i64 %24 to i32 + %reass.sub19.i = sub nsw i32 %mul.i18, %25 + %add8.i = add i32 %reass.sub19.i, 63 store i32 %add8.i, ptr %codepoint, align 4 - %28 = load ptr, ptr %arrayZ.i.i11, align 8 - %arrayidx23 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom - %29 = load i32, ptr %arrayidx23, align 4 - %mul = shl i32 %29, 9 + %26 = load ptr, ptr %arrayZ.i.i11, align 8 + %arrayidx23 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %26, i64 %idxprom + %27 = load i32, ptr %arrayidx23, align 4 + %mul = shl i32 %27, 9 %add = add i32 %mul, %add8.i store i32 %add, ptr %codepoint, align 4 br label %return if.end26: ; preds = %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit, %_ZNK13hb_bit_page_t8previousEPj.exit.thread, %land.lhs.true - %30 = phi ptr [ %.pre, %_ZNK13hb_bit_page_t8previousEPj.exit.thread ], [ %15, %land.lhs.true ], [ %15, %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit ] + %28 = phi ptr [ %.pre, %_ZNK13hb_bit_page_t8previousEPj.exit.thread ], [ %14, %land.lhs.true ], [ %14, %_ZNK11hb_vector_tIN12hb_bit_set_t10page_map_tELb1EE5bfindIS1_Lb1ETnPN12hb_enable_ifIXT0_EvE4typeELPv0EEEbRKT_Pj14hb_not_found_tj.exit ] %arrayZ29 = getelementptr inbounds nuw i8, ptr %this, i64 40 - %31 = load ptr, ptr %arrayZ29, align 8 + %29 = load ptr, ptr %arrayZ29, align 8 br label %for.cond for.cond: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit, %if.end26 %indvars.iv = phi i64 [ %indvars.iv.next, %_ZNK13hb_bit_page_t7get_maxEv.exit ], [ %idxprom, %if.end26 ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 - %32 = and i64 %indvars.iv.next, 2147483648 - %cmp27 = icmp eq i64 %32, 0 + %30 = and i64 %indvars.iv.next, 2147483648 + %cmp27 = icmp eq i64 %30, 0 br i1 %cmp27, label %for.body, label %for.end for.body: ; preds = %for.cond %idxprom32 = and i64 %indvars.iv.next, 2147483647 - %index34 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %30, i64 %idxprom32, i32 1 - %33 = load i32, ptr %index34, align 4 - %idxprom35 = zext i32 %33 to i64 - %v.i22 = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %31, i64 %idxprom35, i32 1 + %index34 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom32, i32 1 + %31 = load i32, ptr %index34, align 4 + %idxprom35 = zext i32 %31 to i64 + %v.i22 = getelementptr inbounds nuw %struct.hb_bit_page_t, ptr %29, i64 %idxprom35, i32 1 br label %for.cond.i for.cond.i: ; preds = %for.body.i25, %for.body @@ -84614,28 +84614,25 @@ for.cond.i: ; preds = %for.body.i25, %for. for.body.i25: ; preds = %for.cond.i %indvars.iv.next.i26 = add nsw i64 %indvars.iv.i23, -1 %arrayidx.i.i27 = getelementptr inbounds nuw [8 x i64], ptr %v.i22, i64 0, i64 %indvars.iv.next.i26 - %34 = load i64, ptr %arrayidx.i.i27, align 8 - %tobool.not.i28 = icmp eq i64 %34, 0 + %32 = load i64, ptr %arrayidx.i.i27, align 8 + %tobool.not.i28 = icmp eq i64 %32, 0 br i1 %tobool.not.i28, label %for.cond.i, label %_ZNK13hb_bit_page_t7get_maxEv.exit, !llvm.loop !1400 _ZNK13hb_bit_page_t7get_maxEv.exit: ; preds = %for.body.i25 - %35 = trunc nsw i64 %indvars.iv.next.i26 to i32 - %mul.i30 = shl i32 %35, 6 - %36 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %34, i1 true) - %37 = trunc nuw nsw i64 %36 to i32 - %38 = or disjoint i32 %mul.i30, %37 - %cmp38.not = icmp eq i32 %38, -64 - br i1 %cmp38.not, label %for.cond, label %if.then39.loopexit43, !llvm.loop !1402 - -if.then39.loopexit43: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit - %add.i31.le = xor i32 %38, 63 - br label %if.then39 - -if.then39: ; preds = %for.cond.i, %if.then39.loopexit43 - %retval.0.i3241 = phi i32 [ %add.i31.le, %if.then39.loopexit43 ], [ 0, %for.cond.i ] - %arrayidx43 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %30, i64 %idxprom32 - %39 = load i32, ptr %arrayidx43, align 4 - %mul45 = shl i32 %39, 9 + %33 = trunc nsw i64 %indvars.iv.next.i26 to i32 + %mul.i30 = shl i32 %33, 6 + %34 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %32, i1 true) + %35 = trunc nuw nsw i64 %34 to i32 + %reass.sub.i = or disjoint i32 %mul.i30, 63 + %add.i31 = sub nuw nsw i32 %reass.sub.i, %35 + %cmp38.not = icmp eq i32 %add.i31, -1 + br i1 %cmp38.not, label %for.cond, label %if.then39, !llvm.loop !1402 + +if.then39: ; preds = %_ZNK13hb_bit_page_t7get_maxEv.exit, %for.cond.i + %retval.0.i3241 = phi i32 [ 0, %for.cond.i ], [ %add.i31, %_ZNK13hb_bit_page_t7get_maxEv.exit ] + %arrayidx43 = getelementptr inbounds nuw %"struct.hb_bit_set_t::page_map_t", ptr %28, i64 %idxprom32 + %36 = load i32, ptr %arrayidx43, align 4 + %mul45 = shl i32 %36, 9 %add46 = add i32 %mul45, %retval.0.i3241 store i32 %add46, ptr %codepoint, align 4 br label %return @@ -100809,7 +100806,7 @@ if.end39.i.i.i.i: ; preds = %_ZNK22hb_serialize_ %87 = trunc nuw nsw i32 %86 to i16 %entrySelector.i.i.i.i = getelementptr inbounds nuw i8, ptr %retval.0.i1465.i.i, i64 10 %88 = shl nuw nsw i16 %87, 8 - %89 = xor i16 %88, 7936 + %89 = sub nuw nsw i16 7936, %88 %ref.tmp.sroa.0.0.insert.insert.i77.i.i.i.i = select i1 %tobool.not.i75.i.i.i.i, i16 0, i16 %89 store i16 %ref.tmp.sroa.0.0.insert.insert.i77.i.i.i.i, ptr %entrySelector.i.i.i.i, align 1 %rev.i.i.i.i = lshr exact i16 %ref.tmp.sroa.0.0.insert.insert.i77.i.i.i.i, 8 diff --git a/bench/hdf5/optimized/H5Tconv_integer.c.ll b/bench/hdf5/optimized/H5Tconv_integer.c.ll index 6fb810425bf..dfb143cb5ad 100644 --- a/bench/hdf5/optimized/H5Tconv_integer.c.ll +++ b/bench/hdf5/optimized/H5Tconv_integer.c.ll @@ -22763,7 +22763,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short__Float16(ptr noundef readonly %0, p br i1 %.not564.us.us, label %124, label %122 122: ; preds = %120 - %123 = xor i32 %.0460667.us.us, 15 + %123 = sub nuw nsw i32 15, %.0460667.us.us br label %.loopexit592.us.us 124: ; preds = %120 @@ -23005,7 +23005,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short__Float16(ptr noundef readonly %0, p br i1 %.not545.us.us, label %223, label %221 221: ; preds = %219 - %222 = xor i32 %.0429658.us.us, 15 + %222 = sub nuw nsw i32 15, %.0429658.us.us br label %.loopexit595.us.us 223: ; preds = %219 @@ -23237,7 +23237,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short__Float16(ptr noundef readonly %0, p br i1 %.not526.us.us, label %317, label %315 315: ; preds = %313 - %316 = xor i32 %.0422650.us.us, 15 + %316 = sub nuw nsw i32 15, %.0422650.us.us br label %.loopexit598.us.us 317: ; preds = %313 @@ -23467,7 +23467,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short__Float16(ptr noundef readonly %0, p br i1 %.not507.us, label %415, label %413 413: ; preds = %411 - %414 = xor i32 %.0415642.us, 15 + %414 = sub nuw nsw i32 15, %.0415642.us br label %.loopexit601.us 415: ; preds = %411 @@ -23953,7 +23953,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_float(ptr noundef readonly %0, ptr br i1 %.not564.us.us, label %147, label %145 145: ; preds = %143 - %146 = xor i32 %.0460668.us.us, 15 + %146 = sub nuw nsw i32 15, %.0460668.us.us br label %.loopexit593.us.us 147: ; preds = %143 @@ -24250,7 +24250,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_float(ptr noundef readonly %0, ptr br i1 %.not545.us.us, label %270, label %268 268: ; preds = %266 - %269 = xor i32 %.0429659.us.us, 15 + %269 = sub nuw nsw i32 15, %.0429659.us.us br label %.loopexit596.us.us 270: ; preds = %266 @@ -24532,7 +24532,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_float(ptr noundef readonly %0, ptr br i1 %.not526.us.us, label %388, label %386 386: ; preds = %384 - %387 = xor i32 %.0422651.us.us, 15 + %387 = sub nuw nsw i32 15, %.0422651.us.us br label %.loopexit599.us.us 388: ; preds = %384 @@ -24802,7 +24802,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_float(ptr noundef readonly %0, ptr br i1 %.not507.us, label %509, label %507 507: ; preds = %505 - %508 = xor i32 %.0415643.us, 15 + %508 = sub nuw nsw i32 15, %.0415643.us br label %.loopexit602.us 509: ; preds = %505 @@ -25293,7 +25293,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_double(ptr noundef readonly %0, ptr br i1 %.not564.us.us, label %147, label %145 145: ; preds = %143 - %146 = xor i32 %.0460668.us.us, 15 + %146 = sub nuw nsw i32 15, %.0460668.us.us br label %.loopexit593.us.us 147: ; preds = %143 @@ -25590,7 +25590,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_double(ptr noundef readonly %0, ptr br i1 %.not545.us.us, label %270, label %268 268: ; preds = %266 - %269 = xor i32 %.0429659.us.us, 15 + %269 = sub nuw nsw i32 15, %.0429659.us.us br label %.loopexit596.us.us 270: ; preds = %266 @@ -25872,7 +25872,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_double(ptr noundef readonly %0, ptr br i1 %.not526.us.us, label %388, label %386 386: ; preds = %384 - %387 = xor i32 %.0422651.us.us, 15 + %387 = sub nuw nsw i32 15, %.0422651.us.us br label %.loopexit599.us.us 388: ; preds = %384 @@ -26142,7 +26142,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_double(ptr noundef readonly %0, ptr br i1 %.not507.us, label %509, label %507 507: ; preds = %505 - %508 = xor i32 %.0415643.us, 15 + %508 = sub nuw nsw i32 15, %.0415643.us br label %.loopexit602.us 509: ; preds = %505 @@ -26635,7 +26635,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_ldouble(ptr noundef readonly %0, pt br i1 %.not564.us.us, label %147, label %145 145: ; preds = %143 - %146 = xor i32 %.0460667.us.us, 15 + %146 = sub nuw nsw i32 15, %.0460667.us.us br label %.loopexit593.us.us 147: ; preds = %143 @@ -26919,7 +26919,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_ldouble(ptr noundef readonly %0, pt br i1 %.not545.us.us, label %265, label %263 263: ; preds = %261 - %264 = xor i32 %.0429659.us.us, 15 + %264 = sub nuw nsw i32 15, %.0429659.us.us br label %.loopexit596.us.us 265: ; preds = %261 @@ -27198,7 +27198,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_ldouble(ptr noundef readonly %0, pt br i1 %.not526.us.us, label %383, label %381 381: ; preds = %379 - %382 = xor i32 %.0422651.us.us, 15 + %382 = sub nuw nsw i32 15, %.0422651.us.us br label %.loopexit599.us.us 383: ; preds = %379 @@ -27460,7 +27460,7 @@ define range(i32 -1, 1) i32 @H5T__conv_short_ldouble(ptr noundef readonly %0, pt br i1 %.not507.us, label %499, label %497 497: ; preds = %495 - %498 = xor i32 %.0415643.us, 15 + %498 = sub nuw nsw i32 15, %.0415643.us br label %.loopexit602.us 499: ; preds = %495 @@ -32583,7 +32583,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_float(ptr noundef readonly %0, ptr br i1 %.not564.us.us, label %147, label %145 145: ; preds = %143 - %146 = xor i32 %.0460668.us.us, 15 + %146 = sub nuw nsw i32 15, %.0460668.us.us br label %.loopexit593.us.us 147: ; preds = %143 @@ -32880,7 +32880,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_float(ptr noundef readonly %0, ptr br i1 %.not545.us.us, label %270, label %268 268: ; preds = %266 - %269 = xor i32 %.0429659.us.us, 15 + %269 = sub nuw nsw i32 15, %.0429659.us.us br label %.loopexit596.us.us 270: ; preds = %266 @@ -33162,7 +33162,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_float(ptr noundef readonly %0, ptr br i1 %.not526.us.us, label %388, label %386 386: ; preds = %384 - %387 = xor i32 %.0422651.us.us, 15 + %387 = sub nuw nsw i32 15, %.0422651.us.us br label %.loopexit599.us.us 388: ; preds = %384 @@ -33432,7 +33432,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_float(ptr noundef readonly %0, ptr br i1 %.not507.us, label %509, label %507 507: ; preds = %505 - %508 = xor i32 %.0415643.us, 15 + %508 = sub nuw nsw i32 15, %.0415643.us br label %.loopexit602.us 509: ; preds = %505 @@ -33923,7 +33923,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_double(ptr noundef readonly %0, pt br i1 %.not564.us.us, label %147, label %145 145: ; preds = %143 - %146 = xor i32 %.0460668.us.us, 15 + %146 = sub nuw nsw i32 15, %.0460668.us.us br label %.loopexit593.us.us 147: ; preds = %143 @@ -34220,7 +34220,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_double(ptr noundef readonly %0, pt br i1 %.not545.us.us, label %270, label %268 268: ; preds = %266 - %269 = xor i32 %.0429659.us.us, 15 + %269 = sub nuw nsw i32 15, %.0429659.us.us br label %.loopexit596.us.us 270: ; preds = %266 @@ -34502,7 +34502,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_double(ptr noundef readonly %0, pt br i1 %.not526.us.us, label %388, label %386 386: ; preds = %384 - %387 = xor i32 %.0422651.us.us, 15 + %387 = sub nuw nsw i32 15, %.0422651.us.us br label %.loopexit599.us.us 388: ; preds = %384 @@ -34772,7 +34772,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_double(ptr noundef readonly %0, pt br i1 %.not507.us, label %509, label %507 507: ; preds = %505 - %508 = xor i32 %.0415643.us, 15 + %508 = sub nuw nsw i32 15, %.0415643.us br label %.loopexit602.us 509: ; preds = %505 @@ -35265,7 +35265,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_ldouble(ptr noundef readonly %0, p br i1 %.not564.us.us, label %147, label %145 145: ; preds = %143 - %146 = xor i32 %.0460667.us.us, 15 + %146 = sub nuw nsw i32 15, %.0460667.us.us br label %.loopexit593.us.us 147: ; preds = %143 @@ -35549,7 +35549,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_ldouble(ptr noundef readonly %0, p br i1 %.not545.us.us, label %265, label %263 263: ; preds = %261 - %264 = xor i32 %.0429659.us.us, 15 + %264 = sub nuw nsw i32 15, %.0429659.us.us br label %.loopexit596.us.us 265: ; preds = %261 @@ -35828,7 +35828,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_ldouble(ptr noundef readonly %0, p br i1 %.not526.us.us, label %383, label %381 381: ; preds = %379 - %382 = xor i32 %.0422651.us.us, 15 + %382 = sub nuw nsw i32 15, %.0422651.us.us br label %.loopexit599.us.us 383: ; preds = %379 @@ -36090,7 +36090,7 @@ define range(i32 -1, 1) i32 @H5T__conv_ushort_ldouble(ptr noundef readonly %0, p br i1 %.not507.us, label %499, label %497 497: ; preds = %495 - %498 = xor i32 %.0415643.us, 15 + %498 = sub nuw nsw i32 15, %.0415643.us br label %.loopexit602.us 499: ; preds = %495 diff --git a/bench/hermes/optimized/BigIntSupport.cpp.ll b/bench/hermes/optimized/BigIntSupport.cpp.ll index 462b99c480e..c5af941a6e2 100644 --- a/bench/hermes/optimized/BigIntSupport.cpp.ll +++ b/bench/hermes/optimized/BigIntSupport.cpp.ll @@ -2356,9 +2356,8 @@ if.then8.i: ; preds = %_ZN6hermes6bigint12 _ZN4llvh5APInt15clearUnusedBitsEv.exit.i.i.i: ; preds = %if.then8.i %xor.i.i.i = xor i64 %11, -1 - %sub.i.i.i.i = add nuw nsw i32 %7, 63 - %rem.i.i.i.i = and i32 %sub.i.i.i.i, 63 - %sub2.i.i.i.i = xor i32 %rem.i.i.i.i, 63 + %sub.not.i.i.i.i = sub nsw i32 0, %7 + %sub2.i.i.i.i = and i32 %sub.not.i.i.i.i, 63 %sh_prom.i.i.i.i = zext nneg i32 %sub2.i.i.i.i to i64 %shr.i.i.i.i = lshr i64 -1, %sh_prom.i.i.i.i %and.i.i.i.i = and i64 %shr.i.i.i.i, %xor.i.i.i @@ -2545,9 +2544,8 @@ if.then8.i: ; preds = %_ZN6hermes6bigint12 _ZN4llvh5APInt15clearUnusedBitsEv.exit.i.i.i: ; preds = %if.then8.i %xor.i.i.i = xor i64 %11, -1 - %sub.i.i.i.i = add nuw nsw i32 %7, 63 - %rem.i.i.i.i = and i32 %sub.i.i.i.i, 63 - %sub2.i.i.i.i = xor i32 %rem.i.i.i.i, 63 + %sub.not.i.i.i.i = sub nsw i32 0, %7 + %sub2.i.i.i.i = and i32 %sub.not.i.i.i.i, 63 %sh_prom.i.i.i.i = zext nneg i32 %sub2.i.i.i.i to i64 %shr.i.i.i.i = lshr i64 -1, %sh_prom.i.i.i.i %and.i.i.i.i = and i64 %shr.i.i.i.i, %xor.i.i.i @@ -2734,9 +2732,8 @@ if.then8.i: ; preds = %_ZN6hermes6bigint12 _ZN4llvh5APInt15clearUnusedBitsEv.exit.i.i.i: ; preds = %if.then8.i %xor.i.i.i = xor i64 %11, -1 - %sub.i.i.i.i = add nuw nsw i32 %7, 63 - %rem.i.i.i.i = and i32 %sub.i.i.i.i, 63 - %sub2.i.i.i.i = xor i32 %rem.i.i.i.i, 63 + %sub.not.i.i.i.i = sub nsw i32 0, %7 + %sub2.i.i.i.i = and i32 %sub.not.i.i.i.i, 63 %sh_prom.i.i.i.i = zext nneg i32 %sub2.i.i.i.i to i64 %shr.i.i.i.i = lshr i64 -1, %sh_prom.i.i.i.i %and.i.i.i.i = and i64 %shr.i.i.i.i, %xor.i.i.i @@ -2864,8 +2861,8 @@ while.body.i.i.i.i: ; preds = %land.rhs.i.i.i.i, % br i1 %cmp.i6.i.i.i.i, label %_ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread.thread, label %land.rhs.i.i.i.i, !llvm.loop !4 _ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread: ; preds = %land.rhs.i.i.i.i - %cmp14.i.i.i.i42 = icmp slt i8 %.fr, 0 - %spec.select = select i1 %cmp14.i.i.i.i42, i64 %src.sroa.10.034.i6.i.i.i, i64 %sub.i.i.i.i.i + %cmp14.i.i.i.i41 = icmp slt i8 %.fr, 0 + %spec.select = select i1 %cmp14.i.i.i.i41, i64 %src.sroa.10.034.i6.i.i.i, i64 %sub.i.i.i.i.i %1 = trunc i64 %spec.select to i32 %2 = add i32 %1, 7 %3 = lshr i32 %2, 3 @@ -2873,8 +2870,8 @@ _ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.threa br i1 %cmp.not.i.i.i, label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread.i.i, label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.i.i _ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread.thread: ; preds = %while.body.i.i.i.i - %cmp.not.i.i.i47 = icmp eq i32 %src.coerce1, 0 - br i1 %cmp.not.i.i.i47, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread + %cmp.not.i.i.i46 = icmp eq i32 %src.coerce1, 0 + br i1 %cmp.not.i.i.i46, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread _ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.i.i: ; preds = %_ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread %sub.i.i.i = add i32 %src.coerce1, -1 @@ -2903,12 +2900,12 @@ _ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16.i.i: ; preds = %_ %8 = xor i64 %7, %.fr.i.i %9 = icmp sgt i64 %8, -1 %cmp8.i.i = icmp eq i32 %src.coerce1, %3 - %or.cond41 = select i1 %9, i1 %cmp8.i.i, i1 false - br i1 %or.cond41, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread + %or.cond40 = select i1 %9, i1 %cmp8.i.i, i1 false + br i1 %or.cond40, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit, label %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread _ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread: ; preds = %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16.i.i, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit._ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16_crit_edge.i.i, %_ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread.thread call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %rhs.addr.i) - %mul16872 = shl i32 %src.coerce1, 6 + %mul16771 = shl i32 %src.coerce1, 6 br label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit _ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread: ; preds = %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread.i.i @@ -2916,7 +2913,7 @@ _ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread: ; preds = %_ZN br label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread _ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit: ; preds = %_ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread.thread, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16.i.i, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread.i.i, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit._ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16_crit_edge.i.i - %cmp.not.i.i.i50 = phi i1 [ false, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16.i.i ], [ true, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread.i.i ], [ false, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit._ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16_crit_edge.i.i ], [ true, %_ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread.thread ] + %cmp.not.i.i.i49 = phi i1 [ false, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16.i.i ], [ true, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread.i.i ], [ false, %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit._ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit16_crit_edge.i.i ], [ true, %_ZN6hermes6bigint12_GLOBAL__N_131makeImmutableRefFromSignedDigitERl.exit.i.thread.thread ] %call12.i.i = call noundef i32 @_ZN4llvh5APInt9tcCompareEPKmS2_j(ptr noundef %src.coerce0, ptr noundef nonnull %rhs.addr.i, i32 noundef %src.coerce1) #18 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %rhs.addr.i) %cmp = icmp eq i32 %call12.i.i, 0 @@ -2932,22 +2929,22 @@ if.then: ; preds = %_ZN6hermes6bigint7c if.end: ; preds = %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit %mul1 = shl i32 %src.coerce1, 6 - br i1 %cmp.not.i.i.i50, label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread, label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit + br i1 %cmp.not.i.i.i49, label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread, label %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit _ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit.thread: ; preds = %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread, %if.end - %mul170 = phi i32 [ 0, %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread ], [ %mul1, %if.end ] - call void @_ZN4llvh5APIntC1EjNS_8ArrayRefImEE(ptr noundef nonnull align 8 dereferenceable(12) %tmp, i32 noundef %mul170, ptr %src.coerce0, i64 0) #18 + %mul169 = phi i32 [ 0, %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread ], [ %mul1, %if.end ] + call void @_ZN4llvh5APIntC1EjNS_8ArrayRefImEE(ptr noundef nonnull align 8 dereferenceable(12) %tmp, i32 noundef %mul169, ptr %src.coerce0, i64 0) #18 br label %if.end8 _ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit: ; preds = %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread, %if.end - %mul169 = phi i32 [ %mul1, %if.end ], [ %mul16872, %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread ] + %mul168 = phi i32 [ %mul1, %if.end ], [ %mul16771, %_ZN6hermes6bigint7compareENS0_18ImmutableBigIntRefEl.exit.thread.thread ] %sub.i = add i32 %src.coerce1, -1 %idxprom.i = zext i32 %sub.i to i64 %arrayidx.i = getelementptr inbounds nuw i64, ptr %src.coerce0, i64 %idxprom.i %10 = load i64, ptr %arrayidx.i, align 8 %cmp2.i = icmp slt i64 %10, 0 %conv = zext i32 %src.coerce1 to i64 - call void @_ZN4llvh5APIntC1EjNS_8ArrayRefImEE(ptr noundef nonnull align 8 dereferenceable(12) %tmp, i32 noundef %mul169, ptr %src.coerce0, i64 %conv) #18 + call void @_ZN4llvh5APIntC1EjNS_8ArrayRefImEE(ptr noundef nonnull align 8 dereferenceable(12) %tmp, i32 noundef %mul168, ptr %src.coerce0, i64 %conv) #18 br i1 %cmp2.i, label %if.then7, label %if.end8 if.then7: ; preds = %_ZN6hermes6bigint10isNegativeENS0_18ImmutableBigIntRefE.exit @@ -2959,9 +2956,8 @@ if.then7: ; preds = %_ZN6hermes6bigint10 _ZN4llvh5APInt15clearUnusedBitsEv.exit.i.i: ; preds = %if.then7 %12 = load i64, ptr %tmp, align 8 %xor.i.i = xor i64 %12, -1 - %sub.i.i.i10 = add nuw nsw i32 %11, 63 - %rem.i.i.i = and i32 %sub.i.i.i10, 63 - %sub2.i.i.i = xor i32 %rem.i.i.i, 63 + %sub.not.i.i.i = sub nsw i32 0, %11 + %sub2.i.i.i = and i32 %sub.not.i.i.i, 63 %sh_prom.i.i.i = zext nneg i32 %sub2.i.i.i to i64 %shr.i.i.i = lshr i64 -1, %sh_prom.i.i.i %and.i.i.i = and i64 %shr.i.i.i, %xor.i.i @@ -2983,8 +2979,8 @@ if.end8: ; preds = %_ZN6hermes6bigint10 br i1 %cmp.i, label %_ZN6hermes6bigint23maxCharsPerDigitInRadixEh.exit, label %cond.false.i cond.false.i: ; preds = %if.end8 - %cmp2.i11 = icmp ult i8 %radix, 8 - br i1 %cmp2.i11, label %_ZN6hermes6bigint23maxCharsPerDigitInRadixEh.exit, label %cond.false4.i + %cmp2.i10 = icmp ult i8 %radix, 8 + br i1 %cmp2.i10, label %_ZN6hermes6bigint23maxCharsPerDigitInRadixEh.exit, label %cond.false4.i cond.false4.i: ; preds = %cond.false.i %cmp6.i = icmp ult i8 %radix, 16 @@ -3035,14 +3031,14 @@ _ZN4llvh5APIntD2Ev.exit: ; preds = %delete.notnull.i, % %19 = load i32, ptr %BitWidth.i, align 8 store i32 %19, ptr %BitWidth.i.i, align 8 store i32 0, ptr %BitWidth.i, align 8 - %cmp.i.i.i19 = icmp ult i32 %19, 65 - br i1 %cmp.i.i.i19, label %land.rhs.i.i, label %_ZNK4llvh5APInt13getActiveBitsEv.exit.i.i + %cmp.i.i.i18 = icmp ult i32 %19, 65 + br i1 %cmp.i.i.i18, label %land.rhs.i.i, label %_ZNK4llvh5APInt13getActiveBitsEv.exit.i.i _ZNK4llvh5APInt13getActiveBitsEv.exit.i.i: ; preds = %_ZN4llvh5APIntD2Ev.exit %call5.i.i.i.i = call noundef i32 @_ZNK4llvh5APInt25countLeadingZerosSlowCaseEv(ptr noundef nonnull align 8 dereferenceable(12) %tmp) #22 - %sub.i.i.i20 = sub i32 %19, %call5.i.i.i.i - %cmp.i.i21 = icmp ult i32 %sub.i.i.i20, 65 - br i1 %cmp.i.i21, label %land.rhs.i.ithread-pre-split, label %do.body.backedge + %sub.i.i.i19 = sub i32 %19, %call5.i.i.i.i + %cmp.i.i20 = icmp ult i32 %sub.i.i.i19, 65 + br i1 %cmp.i.i20, label %land.rhs.i.ithread-pre-split, label %do.body.backedge land.rhs.i.ithread-pre-split: ; preds = %_ZNK4llvh5APInt13getActiveBitsEv.exit.i.i %20 = inttoptr i64 %18 to ptr @@ -3067,10 +3063,10 @@ if.then24: ; preds = %do.end if.end25: ; preds = %if.then24, %do.end %call27 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %agg.result) #18 %call29 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %agg.result) #18 - %cmp.i.i.i22 = icmp ne ptr %call27, %call29 + %cmp.i.i.i21 = icmp ne ptr %call27, %call29 %__last.sroa.0.09.i.i = getelementptr inbounds i8, ptr %call29, i64 -1 %cmp.i110.i.i = icmp ult ptr %call27, %__last.sroa.0.09.i.i - %or.cond.i.i = select i1 %cmp.i.i.i22, i1 %cmp.i110.i.i, i1 false + %or.cond.i.i = select i1 %cmp.i.i.i21, i1 %cmp.i110.i.i, i1 false br i1 %or.cond.i.i, label %while.body.i.i, label %_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_.exit while.body.i.i: ; preds = %if.end25, %while.body.i.i @@ -3087,19 +3083,19 @@ while.body.i.i: ; preds = %if.end25, %while.bo _ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_.exit: ; preds = %while.body.i.i, %if.end25 %23 = load i32, ptr %BitWidth.i.i, align 8 - %cmp.i.i.i24 = icmp ugt i32 %23, 64 - br i1 %cmp.i.i.i24, label %if.then.i25, label %return + %cmp.i.i.i23 = icmp ugt i32 %23, 64 + br i1 %cmp.i.i.i23, label %if.then.i24, label %return -if.then.i25: ; preds = %_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_.exit +if.then.i24: ; preds = %_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_.exit %24 = load ptr, ptr %tmp, align 8 - %isnull.i26 = icmp eq ptr %24, null - br i1 %isnull.i26, label %return, label %delete.notnull.i27 + %isnull.i25 = icmp eq ptr %24, null + br i1 %isnull.i25, label %return, label %delete.notnull.i26 -delete.notnull.i27: ; preds = %if.then.i25 +delete.notnull.i26: ; preds = %if.then.i24 call void @_ZdaPv(ptr noundef nonnull %24) #19 br label %return -return: ; preds = %delete.notnull.i27, %if.then.i25, %_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_.exit, %if.then +return: ; preds = %delete.notnull.i26, %if.then.i24, %_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_.exit, %if.then ret void } @@ -3692,7 +3688,7 @@ land.end.thread: ; preds = %if.then36 br i1 %cmp41.not51, label %if.end53, label %if.then42.thread if.then42.thread: ; preds = %land.end.thread - %sub.i2953 = xor i32 %conv, 63 + %sub.i2953 = sub nuw nsw i32 63, %conv %sh_prom.i.i.i54 = zext nneg i32 %sub.i2953 to i64 %shr.i.i.i55 = lshr i64 -1, %sh_prom.i.i.i54 %arrayidx50.phi.trans.insert = getelementptr inbounds nuw i64, ptr %dst.coerce0, i64 %div19 @@ -3700,7 +3696,7 @@ if.then42.thread: ; preds = %land.end.thread br label %if.else if.then42: ; preds = %land.end - %sub.i29 = xor i32 %conv, 63 + %sub.i29 = sub nuw nsw i32 63, %conv %sh_prom.i.i.i = zext nneg i32 %sub.i29 to i64 %shr.i.i.i = lshr i64 -1, %sh_prom.i.i.i br i1 %cmp39, label %if.then46, label %if.else diff --git a/bench/hyperscan/optimized/ng_builder.cpp.ll b/bench/hyperscan/optimized/ng_builder.cpp.ll index 99d131a5f8f..377de4d43e1 100644 --- a/bench/hyperscan/optimized/ng_builder.cpp.ll +++ b/bench/hyperscan/optimized/ng_builder.cpp.ll @@ -148,75 +148,47 @@ _ZNSt12_Vector_baseIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8N %vertIdx.i.i = getelementptr inbounds nuw i8, ptr %call.i, i64 112 store i32 4, ptr %vertIdx.i.i, align 8, !noalias !5 %call5.i.i.i.i3.i.i = invoke noalias noundef nonnull dereferenceable(1024) ptr @_Znwm(i64 noundef 1024) #26 - to label %invoke.cont5.i.i unwind label %lpad4.i.i, !noalias !5 + to label %_ZNSt10unique_ptrIN3ue212_GLOBAL__N_114NFABuilderImplESt14default_deleteIS2_EED2Ev.exit unwind label %_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i, !noalias !5 -invoke.cont5.i.i: ; preds = %_ZNSt12_Vector_baseIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_M_allocateEm.exit.i.i.i - %_M_finish.i.i.i.i = getelementptr inbounds nuw i8, ptr %call.i, i64 96 - %_M_end_of_storage.i.i.i.i = getelementptr inbounds nuw i8, ptr %call.i, i64 104 - store ptr %call5.i.i.i.i3.i.i, ptr %id2vertex.i.i, align 8, !noalias !5 - store ptr %call5.i.i.i.i3.i.i, ptr %_M_finish.i.i.i.i, align 8, !noalias !5 - %add.ptr21.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i3.i.i, i64 1024 - store ptr %add.ptr21.i.i.i, ptr %_M_end_of_storage.i.i.i.i, align 8, !noalias !5 - invoke void @_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %id2vertex.i.i, i64 noundef 4) - to label %_ZNSt10unique_ptrIN3ue212_GLOBAL__N_114NFABuilderImplESt14default_deleteIS2_EED2Ev.exit unwind label %lpad4.i.i, !noalias !5 - -lpad4.i.i: ; preds = %invoke.cont5.i.i, %_ZNSt12_Vector_baseIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_M_allocateEm.exit.i.i.i +_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i: ; preds = %_ZNSt12_Vector_baseIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_M_allocateEm.exit.i.i.i %1 = landingpad { ptr, i32 } cleanup - %2 = load ptr, ptr %id2vertex.i.i, align 8, !noalias !5 - %tobool.not.i.i.i.i.i = icmp eq ptr %2, null - br i1 %tobool.not.i.i.i.i.i, label %_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EED2Ev.exit.i.i, label %if.then.i.i.i.i.i - -if.then.i.i.i.i.i: ; preds = %lpad4.i.i - tail call void @_ZdlPv(ptr noundef nonnull %2) #27, !noalias !5 - br label %_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EED2Ev.exit.i.i - -_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EED2Ev.exit.i.i: ; preds = %if.then.i.i.i.i.i, %lpad4.i.i - %3 = load ptr, ptr %graph.i.i, align 8, !noalias !5 - %cmp.not.i.i.i = icmp eq ptr %3, null - br i1 %cmp.not.i.i.i, label %_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i, label %_ZNKSt14default_deleteIN3ue28NGHolderEEclEPS1_.exit.i.i.i - -_ZNKSt14default_deleteIN3ue28NGHolderEEclEPS1_.exit.i.i.i: ; preds = %_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EED2Ev.exit.i.i - %vtable.i.i.i.i = load ptr, ptr %3, align 8, !noalias !5 + %vtable.i.i.i.i = load ptr, ptr %call.i2.i1.i, align 8, !noalias !5 %vfn.i.i.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i.i.i, i64 8 - %4 = load ptr, ptr %vfn.i.i.i.i, align 8, !noalias !5 - tail call void %4(ptr noundef nonnull align 8 dereferenceable(136) %3) #25, !noalias !5 - br label %_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i - -_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i: ; preds = %_ZNKSt14default_deleteIN3ue28NGHolderEEclEPS1_.exit.i.i.i, %_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EED2Ev.exit.i.i + %2 = load ptr, ptr %vfn.i.i.i.i, align 8, !noalias !5 + tail call void %2(ptr noundef nonnull align 8 dereferenceable(136) %call.i2.i1.i) #25, !noalias !5 store ptr null, ptr %graph.i.i, align 8, !noalias !5 br label %lpad.body.i lpad.i: ; preds = %entry - %5 = landingpad { ptr, i32 } + %3 = landingpad { ptr, i32 } cleanup br label %lpad.body.i lpad.body.i: ; preds = %lpad.i, %_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i, %lpad.i.i.i - %eh.lpad-body.i = phi { ptr, i32 } [ %5, %lpad.i ], [ %1, %_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i ], [ %0, %lpad.i.i.i ] + %eh.lpad-body.i = phi { ptr, i32 } [ %3, %lpad.i ], [ %1, %_ZNSt10unique_ptrIN3ue28NGHolderESt14default_deleteIS1_EED2Ev.exit.i.i ], [ %0, %lpad.i.i.i ] tail call void @_ZdlPv(ptr noundef nonnull %call.i) #27, !noalias !5 resume { ptr, i32 } %eh.lpad-body.i -_ZNSt10unique_ptrIN3ue212_GLOBAL__N_114NFABuilderImplESt14default_deleteIS2_EED2Ev.exit: ; preds = %invoke.cont5.i.i - %6 = load ptr, ptr %graph.i.i, align 8, !noalias !5 - %start.i.i = getelementptr inbounds nuw i8, ptr %6, i64 72 - %7 = load ptr, ptr %id2vertex.i.i, align 8, !noalias !5 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %start.i.i, i64 16, i1 false), !noalias !5 - %8 = load ptr, ptr %graph.i.i, align 8, !noalias !5 - %startDs.i.i = getelementptr inbounds nuw i8, ptr %8, i64 88 - %9 = load ptr, ptr %id2vertex.i.i, align 8, !noalias !5 - %add.ptr.i5.i.i = getelementptr inbounds nuw i8, ptr %9, i64 16 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %add.ptr.i5.i.i, ptr noundef nonnull align 8 dereferenceable(16) %startDs.i.i, i64 16, i1 false), !noalias !5 - %10 = load ptr, ptr %graph.i.i, align 8, !noalias !5 - %accept.i.i = getelementptr inbounds nuw i8, ptr %10, i64 104 - %11 = load ptr, ptr %id2vertex.i.i, align 8, !noalias !5 - %add.ptr.i6.i.i = getelementptr inbounds nuw i8, ptr %11, i64 32 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %add.ptr.i6.i.i, ptr noundef nonnull align 8 dereferenceable(16) %accept.i.i, i64 16, i1 false), !noalias !5 - %12 = load ptr, ptr %graph.i.i, align 8, !noalias !5 - %acceptEod.i.i = getelementptr inbounds nuw i8, ptr %12, i64 120 - %13 = load ptr, ptr %id2vertex.i.i, align 8, !noalias !5 - %add.ptr.i7.i.i = getelementptr inbounds nuw i8, ptr %13, i64 48 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %add.ptr.i7.i.i, ptr noundef nonnull align 8 dereferenceable(16) %acceptEod.i.i, i64 16, i1 false), !noalias !5 +_ZNSt10unique_ptrIN3ue212_GLOBAL__N_114NFABuilderImplESt14default_deleteIS2_EED2Ev.exit: ; preds = %_ZNSt12_Vector_baseIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_M_allocateEm.exit.i.i.i + %_M_end_of_storage.i.i.i.i = getelementptr inbounds nuw i8, ptr %call.i, i64 104 + store ptr %call5.i.i.i.i3.i.i, ptr %id2vertex.i.i, align 8, !noalias !5 + %add.ptr21.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i3.i.i, i64 1024 + store ptr %add.ptr21.i.i.i, ptr %_M_end_of_storage.i.i.i.i, align 8, !noalias !5 + %_M_finish.i.i4.i.i = getelementptr inbounds nuw i8, ptr %call.i, i64 96 + %scevgep.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i3.i.i, i64 64 + store ptr %scevgep.i.i.i.i.i.i.i, ptr %_M_finish.i.i4.i.i, align 8, !noalias !5 + %start.i.i = getelementptr inbounds nuw i8, ptr %call.i2.i1.i, i64 72 + %4 = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i3.i.i, i64 16 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call5.i.i.i.i3.i.i, ptr noundef nonnull align 8 dereferenceable(16) %start.i.i, i64 16, i1 false), !noalias !5 + %startDs.i.i = getelementptr inbounds nuw i8, ptr %call.i2.i1.i, i64 88 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %startDs.i.i, i64 16, i1 false), !noalias !5 + %accept.i.i = getelementptr inbounds nuw i8, ptr %call.i2.i1.i, i64 104 + %add.ptr.i15.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i3.i.i, i64 32 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %add.ptr.i15.i.i, ptr noundef nonnull align 8 dereferenceable(16) %accept.i.i, i64 16, i1 false), !noalias !5 + %acceptEod.i.i = getelementptr inbounds nuw i8, ptr %call.i2.i1.i, i64 120 + %add.ptr.i16.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i3.i.i, i64 48 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %add.ptr.i16.i.i, ptr noundef nonnull align 8 dereferenceable(16) %acceptEod.i.i, i64 16, i1 false), !noalias !5 store ptr %call.i, ptr %agg.result, align 8 ret void } @@ -270,7 +242,7 @@ if.then: ; preds = %entry %sub.ptr.div.i11 = ashr exact i64 %sub.ptr.sub.i10, 4 %cmp4.i = icmp ult i64 %sub.ptr.div.i, 576460752303423488 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.div.i, 576460752303423487 + %sub.i = sub nuw nsw i64 576460752303423487, %sub.ptr.div.i %cmp6.i = icmp ule i64 %sub.ptr.div.i11, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.div.i11, %sub @@ -284,7 +256,7 @@ _ZSt27__uninitialized_default_n_aIPN3ue212graph_detail17vertex_descriptorINS0_9u br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp ugt i64 %__new_size, 576460752303423487 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -322,7 +294,7 @@ if.then.i28.i: ; preds = %_ZNSt6vectorIN3ue21 _ZNSt12_Vector_baseIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i: ; preds = %if.then.i28.i, %_ZNSt6vectorIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_S_relocateEPS8_SB_SB_RS9_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr37.i = getelementptr inbounds %"class.ue2::graph_detail::vertex_descriptor", ptr %add.ptr.i, i64 %sub + %add.ptr37.i = getelementptr inbounds nuw %"class.ue2::graph_detail::vertex_descriptor", ptr %add.ptr.i, i64 %sub store ptr %add.ptr37.i, ptr %_M_finish.i, align 8 %add.ptr40.i = getelementptr inbounds nuw %"class.ue2::graph_detail::vertex_descriptor", ptr %call5.i.i.i.i, i64 %4 store ptr %add.ptr40.i, ptr %_M_end_of_storage.i, align 8 diff --git a/bench/hyperscan/optimized/ng_netflow.cpp.ll b/bench/hyperscan/optimized/ng_netflow.cpp.ll index 482bef781c6..cfbb91ea860 100644 --- a/bench/hyperscan/optimized/ng_netflow.cpp.ll +++ b/bench/hyperscan/optimized/ng_netflow.cpp.ll @@ -153,7 +153,6 @@ $_ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag = comdat any @_ZSt19piecewise_construct = linkonce_odr dso_local constant %"struct.std::piecewise_construct_t" zeroinitializer, comdat, align 1 @.str.4 = private unnamed_addr constant [38 x i8] c"too many graph edges/vertices created\00", align 1 @_ZTISt14overflow_error = external constant ptr -@.str.6 = private unnamed_addr constant [26 x i8] c"vector::_M_default_append\00", align 1 @.str.7 = private unnamed_addr constant [49 x i8] c"cannot create std::vector larger than max_size()\00", align 1 @.str.8 = private unnamed_addr constant [48 x i8] c"cannot create std::deque larger than max_size()\00", align 1 @__libc_single_threaded = external local_unnamed_addr global i8, align 1 @@ -549,8 +548,8 @@ _ZN5boost9iterators6detail20iterator_facade_baseIN3ue29ue2_graphINS3_8NGHolderEN %cmp.i.i.i.i.i.i.i.i.i = icmp eq ptr %__begin1.sroa.0.1.i.i, %m_header.i.i.i.i.i.i.i.i.i br i1 %cmp.i.i.i.i.i.i.i.i.i, label %for.end.i.i, label %invoke.cont23.i.i -lpad.loopexit.i.i: ; preds = %_ZNKSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE12_M_check_lenEmPKc.exit.i.i.i, %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i, %if.then.i121.i.i, %invoke.cont60.i.i - %capacityMap.sroa.0.1.i = phi ptr [ %capacityMap.sroa.0.6.i, %_ZNKSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE12_M_check_lenEmPKc.exit.i.i.i ], [ %capacityMap.sroa.0.3.i, %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i ], [ %capacityMap.sroa.0.3.i, %if.then.i121.i.i ], [ %capacityMap.sroa.0.3.i, %invoke.cont60.i.i ] +lpad.loopexit.i.i: ; preds = %if.else.i.i157.i, %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i, %if.then.i121.i.i, %invoke.cont60.i.i + %capacityMap.sroa.0.1.i = phi ptr [ %capacityMap.sroa.0.6.i, %if.else.i.i157.i ], [ %capacityMap.sroa.0.3.i, %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i ], [ %capacityMap.sroa.0.3.i, %if.then.i121.i.i ], [ %capacityMap.sroa.0.3.i, %invoke.cont60.i.i ] %lpad.loopexit159.i.i = landingpad { ptr, i32 } cleanup br label %lpad.i.i23 @@ -741,51 +740,51 @@ if.then.i133.i.i: ; preds = %invoke.cont73.i.i %sub.ptr.lhs.cast.i.i = ptrtoint ptr %capacityMap.sroa.27.1.i to i64 %sub.ptr.sub.i.i = sub i64 %sub.ptr.lhs.cast.i.i, %sub.ptr.lhs.cast.i.i24.i %sub.ptr.div.i.i = ashr exact i64 %sub.ptr.sub.i.i, 3 - %sub.i180.i = xor i64 %sub.ptr.div.i.i.i, 1152921504606846975 - %cmp6.i.i = icmp ule i64 %sub.ptr.div.i.i, %sub.i180.i + %sub.i179.i = sub nuw nsw i64 1152921504606846975, %sub.ptr.div.i.i.i + %cmp6.i.i = icmp ule i64 %sub.ptr.div.i.i, %sub.i179.i call void @llvm.assume(i1 %cmp6.i.i) %cmp8.not.i.i = icmp ult i64 %sub.ptr.div.i.i, %sub.i.i.i - br i1 %cmp8.not.i.i, label %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i, label %if.then.i.i.i.i181.i + br i1 %cmp8.not.i.i, label %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i, label %if.then.i.i.i.i180.i -if.then.i.i.i.i181.i: ; preds = %if.then.i133.i.i +if.then.i.i.i.i180.i: ; preds = %if.then.i133.i.i store i64 0, ptr %capacityMap.sroa.14.1.i, align 8 %incdec.ptr.i.i.i.i.i = getelementptr i8, ptr %capacityMap.sroa.14.1.i, i64 8 - %cmp.i.i.i.i.i.i182.i = icmp eq i64 %sub.i.i.i, 1 - br i1 %cmp.i.i.i.i.i.i182.i, label %if.end.i.i, label %if.end.i.i.i.i.i.i183.i + %cmp.i.i.i.i.i.i181.i = icmp eq i64 %sub.i.i.i, 1 + br i1 %cmp.i.i.i.i.i.i181.i, label %if.end.i.i, label %if.end.i.i.i.i.i.i182.i -if.end.i.i.i.i.i.i183.i: ; preds = %if.then.i.i.i.i181.i +if.end.i.i.i.i.i.i182.i: ; preds = %if.then.i.i.i.i180.i %45 = shl nuw nsw i64 %sub.i.i.i, 3 %46 = add nsw i64 %45, -8 call void @llvm.memset.p0.i64(ptr align 8 %incdec.ptr.i.i.i.i.i, i8 0, i64 %46, i1 false) - %add.ptr.i.i.i.i.i.i184.i = getelementptr i64, ptr %capacityMap.sroa.14.1.i, i64 %sub.i.i.i + %add.ptr.i.i.i.i.i.i183.i = getelementptr i64, ptr %capacityMap.sroa.14.1.i, i64 %sub.i.i.i br label %if.end.i.i _ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i: ; preds = %if.then.i133.i.i - %.sroa.speculated.i.i187.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i, i64 %sub.i.i.i) - %add.i.i188.i = add nuw nsw i64 %.sroa.speculated.i.i187.i, %sub.ptr.div.i.i.i - %mul.i.i.i.i.i = shl nuw nsw i64 %add.i.i188.i, 3 - %call5.i.i.i.i193.i = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i) #21 + %.sroa.speculated.i.i186.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i, i64 %sub.i.i.i) + %add.i.i187.i = add nuw nsw i64 %.sroa.speculated.i.i186.i, %sub.ptr.div.i.i.i + %mul.i.i.i.i.i = shl nuw nsw i64 %add.i.i187.i, 3 + %call5.i.i.i.i192.i = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i) #21 to label %call5.i.i.i.i.noexc.i unwind label %lpad.loopexit.i.i call5.i.i.i.i.noexc.i: ; preds = %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i.i - %add.ptr.i189.i = getelementptr inbounds i8, ptr %call5.i.i.i.i193.i, i64 %sub.ptr.sub.i.i26.i - store i64 0, ptr %add.ptr.i189.i, align 8 + %add.ptr.i188.i = getelementptr inbounds i8, ptr %call5.i.i.i.i192.i, i64 %sub.ptr.sub.i.i26.i + store i64 0, ptr %add.ptr.i188.i, align 8 %cmp.i.i.i.i.i24.i.i = icmp eq i64 %sub.i.i.i, 1 br i1 %cmp.i.i.i.i.i24.i.i, label %try.cont.i.i, label %if.end.i.i.i.i.i25.i.i if.end.i.i.i.i.i25.i.i: ; preds = %call5.i.i.i.i.noexc.i - %incdec.ptr.i.i.i23.i.i = getelementptr i8, ptr %add.ptr.i189.i, i64 8 + %incdec.ptr.i.i.i23.i.i = getelementptr i8, ptr %add.ptr.i188.i, i64 8 %47 = shl nuw nsw i64 %sub.i.i.i, 3 %48 = add nsw i64 %47, -8 call void @llvm.memset.p0.i64(ptr align 8 %incdec.ptr.i.i.i23.i.i, i8 0, i64 %48, i1 false) br label %try.cont.i.i try.cont.i.i: ; preds = %if.end.i.i.i.i.i25.i.i, %call5.i.i.i.i.noexc.i - %cmp.i.i.i.i190.i = icmp sgt i64 %sub.ptr.sub.i.i26.i, 0 - br i1 %cmp.i.i.i.i190.i, label %if.then.i.i.i30.i.i, label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i.i + %cmp.i.i.i.i189.i = icmp sgt i64 %sub.ptr.sub.i.i26.i, 0 + br i1 %cmp.i.i.i.i189.i, label %if.then.i.i.i30.i.i, label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i.i if.then.i.i.i30.i.i: ; preds = %try.cont.i.i - call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i193.i, ptr align 8 %capacityMap.sroa.0.3.i, i64 %sub.ptr.sub.i.i26.i, i1 false) + call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i192.i, ptr align 8 %capacityMap.sroa.0.3.i, i64 %sub.ptr.sub.i.i26.i, i1 false) br label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i.i _ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i.i: ; preds = %if.then.i.i.i30.i.i, %try.cont.i.i @@ -797,14 +796,14 @@ if.then.i32.i.i: ; preds = %_ZNSt6vectorIySaIyE br label %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i _ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i: ; preds = %if.then.i32.i.i, %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i.i - %add.ptr37.i.i = getelementptr inbounds nuw i64, ptr %add.ptr.i189.i, i64 %sub.i.i.i - %add.ptr40.i.i = getelementptr inbounds nuw i64, ptr %call5.i.i.i.i193.i, i64 %add.i.i188.i + %add.ptr37.i.i = getelementptr inbounds nuw i64, ptr %add.ptr.i188.i, i64 %sub.i.i.i + %add.ptr40.i.i = getelementptr inbounds nuw i64, ptr %call5.i.i.i.i192.i, i64 %add.i.i187.i br label %if.end.i.i -if.end.i.i: ; preds = %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i, %if.end.i.i.i.i.i.i183.i, %if.then.i.i.i.i181.i, %invoke.cont73.i.i - %capacityMap.sroa.0.5.i = phi ptr [ %capacityMap.sroa.0.3.i, %invoke.cont73.i.i ], [ %call5.i.i.i.i193.i, %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i ], [ %capacityMap.sroa.0.3.i, %if.end.i.i.i.i.i.i183.i ], [ %capacityMap.sroa.0.3.i, %if.then.i.i.i.i181.i ] - %capacityMap.sroa.14.3.i = phi ptr [ %capacityMap.sroa.14.1.i, %invoke.cont73.i.i ], [ %add.ptr37.i.i, %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i ], [ %add.ptr.i.i.i.i.i.i184.i, %if.end.i.i.i.i.i.i183.i ], [ %incdec.ptr.i.i.i.i.i, %if.then.i.i.i.i181.i ] - %capacityMap.sroa.27.3.i = phi ptr [ %capacityMap.sroa.27.1.i, %invoke.cont73.i.i ], [ %add.ptr40.i.i, %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i ], [ %capacityMap.sroa.27.1.i, %if.end.i.i.i.i.i.i183.i ], [ %capacityMap.sroa.27.1.i, %if.then.i.i.i.i181.i ] +if.end.i.i: ; preds = %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i, %if.end.i.i.i.i.i.i182.i, %if.then.i.i.i.i180.i, %invoke.cont73.i.i + %capacityMap.sroa.0.5.i = phi ptr [ %capacityMap.sroa.0.3.i, %invoke.cont73.i.i ], [ %call5.i.i.i.i192.i, %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i ], [ %capacityMap.sroa.0.3.i, %if.end.i.i.i.i.i.i182.i ], [ %capacityMap.sroa.0.3.i, %if.then.i.i.i.i180.i ] + %capacityMap.sroa.14.3.i = phi ptr [ %capacityMap.sroa.14.1.i, %invoke.cont73.i.i ], [ %add.ptr37.i.i, %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i ], [ %add.ptr.i.i.i.i.i.i183.i, %if.end.i.i.i.i.i.i182.i ], [ %incdec.ptr.i.i.i.i.i, %if.then.i.i.i.i180.i ] + %capacityMap.sroa.27.3.i = phi ptr [ %capacityMap.sroa.27.1.i, %invoke.cont73.i.i ], [ %add.ptr40.i.i, %_ZNSt12_Vector_baseIySaIyEE13_M_deallocateEPym.exit33.i.i ], [ %capacityMap.sroa.27.1.i, %if.end.i.i.i.i.i.i182.i ], [ %capacityMap.sroa.27.1.i, %if.then.i.i.i.i180.i ] %conv87.i.i = and i64 %44, 4294967295 %add.ptr.i134.i.i = getelementptr inbounds nuw i64, ptr %capacityMap.sroa.0.5.i, i64 %conv87.i.i store i64 0, ptr %add.ptr.i134.i.i, align 8 @@ -843,11 +842,11 @@ if.then.i.i: ; preds = %if.end89.i.i %sub.ptr.lhs.cast.i9.i.i = ptrtoint ptr %reverseEdges.sroa.18.1.i to i64 %sub.ptr.sub.i10.i.i = sub i64 %sub.ptr.lhs.cast.i9.i.i, %sub.ptr.lhs.cast.i.i137.i.i %sub.ptr.div.i11.i.i = ashr exact i64 %sub.ptr.sub.i10.i.i, 4 - %sub.i.i155.i = xor i64 %sub.ptr.div.i.i140.i.i, 576460752303423487 + %sub.i.i155.i = sub nuw nsw i64 576460752303423487, %sub.ptr.div.i.i140.i.i %cmp6.i.i.i = icmp ule i64 %sub.ptr.div.i11.i.i, %sub.i.i155.i call void @llvm.assume(i1 %cmp6.i.i.i) %cmp8.not.i.i.i = icmp ult i64 %sub.ptr.div.i11.i.i, %sub.i.i22 - br i1 %cmp8.not.i.i.i, label %_ZNKSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE12_M_check_lenEmPKc.exit.i.i.i, label %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i + br i1 %cmp8.not.i.i.i, label %if.else.i.i157.i, label %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i _ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i: ; preds = %if.then.i.i %51 = shl nuw nsw i64 %sub.i.i22, 4 @@ -855,30 +854,30 @@ _ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2 %scevgep.i.i.i.i.i156.i = getelementptr i8, ptr %reverseEdges.sroa.11.1.i, i64 %51 br label %for.inc95.i.i -_ZNKSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE12_M_check_lenEmPKc.exit.i.i.i: ; preds = %if.then.i.i +if.else.i.i157.i: ; preds = %if.then.i.i %.sroa.speculated.i.i.i.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i140.i.i, i64 %sub.i.i22) %add.i.i.i.i = add nuw nsw i64 %.sroa.speculated.i.i.i.i, %sub.ptr.div.i.i140.i.i %mul.i.i.i.i.i159.i = shl nuw nsw i64 %add.i.i.i.i, 4 - %call5.i.i.i.i.i172.i = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i159.i) #21 - to label %call5.i.i.i.i.i.noexc171.i unwind label %lpad.loopexit.i.i + %call5.i.i.i.i.i171.i = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i159.i) #21 + to label %call5.i.i.i.i.i.noexc170.i unwind label %lpad.loopexit.i.i -call5.i.i.i.i.i.noexc171.i: ; preds = %_ZNKSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE12_M_check_lenEmPKc.exit.i.i.i - %add.ptr.i.i160.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i172.i, i64 %sub.ptr.sub.i.i139.i.i +call5.i.i.i.i.i.noexc170.i: ; preds = %if.else.i.i157.i + %add.ptr.i.i160.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i171.i, i64 %sub.ptr.sub.i.i139.i.i %52 = shl nuw nsw i64 %sub.i.i22, 4 call void @llvm.memset.p0.i64(ptr nonnull align 8 %add.ptr.i.i160.i, i8 0, i64 %52, i1 false) %cmp.not5.i.i.i.i.i161.i = icmp eq ptr %reverseEdges.sroa.0.2.i, %reverseEdges.sroa.11.1.i br i1 %cmp.not5.i.i.i.i.i161.i, label %_ZNSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_S_relocateEPS8_SB_SB_RS9_.exit.i.i168.i, label %for.body.i.i.i.i.i162.i -for.body.i.i.i.i.i162.i: ; preds = %call5.i.i.i.i.i.noexc171.i, %for.body.i.i.i.i.i162.i - %__cur.07.i.i.i.i.i163.i = phi ptr [ %incdec.ptr1.i.i.i.i.i166.i, %for.body.i.i.i.i.i162.i ], [ %call5.i.i.i.i.i172.i, %call5.i.i.i.i.i.noexc171.i ] - %__first.addr.06.i.i.i.i.i164.i = phi ptr [ %incdec.ptr.i.i.i.i.i165.i, %for.body.i.i.i.i.i162.i ], [ %reverseEdges.sroa.0.2.i, %call5.i.i.i.i.i.noexc171.i ] +for.body.i.i.i.i.i162.i: ; preds = %call5.i.i.i.i.i.noexc170.i, %for.body.i.i.i.i.i162.i + %__cur.07.i.i.i.i.i163.i = phi ptr [ %incdec.ptr1.i.i.i.i.i166.i, %for.body.i.i.i.i.i162.i ], [ %call5.i.i.i.i.i171.i, %call5.i.i.i.i.i.noexc170.i ] + %__first.addr.06.i.i.i.i.i164.i = phi ptr [ %incdec.ptr.i.i.i.i.i165.i, %for.body.i.i.i.i.i162.i ], [ %reverseEdges.sroa.0.2.i, %call5.i.i.i.i.i.noexc170.i ] call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %__cur.07.i.i.i.i.i163.i, ptr noundef nonnull align 8 dereferenceable(16) %__first.addr.06.i.i.i.i.i164.i, i64 16, i1 false), !alias.scope !37 %incdec.ptr.i.i.i.i.i165.i = getelementptr inbounds nuw i8, ptr %__first.addr.06.i.i.i.i.i164.i, i64 16 %incdec.ptr1.i.i.i.i.i166.i = getelementptr inbounds nuw i8, ptr %__cur.07.i.i.i.i.i163.i, i64 16 %cmp.not.i.i.i.i.i167.i = icmp eq ptr %incdec.ptr.i.i.i.i.i165.i, %reverseEdges.sroa.11.1.i br i1 %cmp.not.i.i.i.i.i167.i, label %_ZNSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_S_relocateEPS8_SB_SB_RS9_.exit.i.i168.i, label %for.body.i.i.i.i.i162.i, !llvm.loop !41 -_ZNSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_S_relocateEPS8_SB_SB_RS9_.exit.i.i168.i: ; preds = %for.body.i.i.i.i.i162.i, %call5.i.i.i.i.i.noexc171.i +_ZNSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_S_relocateEPS8_SB_SB_RS9_.exit.i.i168.i: ; preds = %for.body.i.i.i.i.i162.i, %call5.i.i.i.i.i.noexc170.i %tobool.not.i27.i.i.i = icmp eq ptr %reverseEdges.sroa.0.2.i, null br i1 %tobool.not.i27.i.i.i, label %_ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i, label %if.then.i28.i.i.i @@ -888,11 +887,11 @@ if.then.i28.i.i.i: ; preds = %_ZNSt6vectorIN3ue21 _ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i: ; preds = %if.then.i28.i.i.i, %_ZNSt6vectorIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE11_S_relocateEPS8_SB_SB_RS9_.exit.i.i168.i %add.ptr37.i.i.i = getelementptr inbounds nuw %"class.ue2::graph_detail::edge_descriptor", ptr %add.ptr.i.i160.i, i64 %sub.i.i22 - %add.ptr40.i.i.i = getelementptr inbounds nuw %"class.ue2::graph_detail::edge_descriptor", ptr %call5.i.i.i.i.i172.i, i64 %add.i.i.i.i + %add.ptr40.i.i.i = getelementptr inbounds nuw %"class.ue2::graph_detail::edge_descriptor", ptr %call5.i.i.i.i.i171.i, i64 %add.i.i.i.i br label %for.inc95.i.i for.inc95.i.i: ; preds = %_ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i, %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i, %if.end89.i.i - %reverseEdges.sroa.0.4.i = phi ptr [ %reverseEdges.sroa.0.2.i, %if.end89.i.i ], [ %call5.i.i.i.i.i172.i, %_ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i ], [ %reverseEdges.sroa.0.2.i, %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i ] + %reverseEdges.sroa.0.4.i = phi ptr [ %reverseEdges.sroa.0.2.i, %if.end89.i.i ], [ %call5.i.i.i.i.i171.i, %_ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i ], [ %reverseEdges.sroa.0.2.i, %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i ] %reverseEdges.sroa.11.3.i = phi ptr [ %reverseEdges.sroa.11.1.i, %if.end89.i.i ], [ %add.ptr37.i.i.i, %_ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i ], [ %scevgep.i.i.i.i.i156.i, %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i ] %reverseEdges.sroa.18.3.i = phi ptr [ %reverseEdges.sroa.18.1.i, %if.end89.i.i ], [ %add.ptr40.i.i.i, %_ZNSt12_Vector_baseIN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESaIS8_EE13_M_deallocateEPS8_m.exit29.i.i.i ], [ %reverseEdges.sroa.18.1.i, %_ZSt27__uninitialized_default_n_aIPN3ue212graph_detail15edge_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEEmS8_ET_SA_T0_RSaIT1_E.exit.i.i.i ] %conv9.i.i.i = and i64 %49, 4294967295 @@ -1218,77 +1217,66 @@ if.end.i.i.i.i: ; preds = %_ZN3ue29ue2_graphIN if.then.i.i104.i: ; preds = %"_ZN3ue214remove_edge_ifINS_8NGHolderEZNS_L20removeEdgesFromIndexERS1_RSt6vectorIySaIyEEjE3$_0EENSt9enable_ifIXsr12is_ue2_graphIT_EE5valueEvE4typeET0_RS9_.exit.i.i" %sub.i.i105.i = sub nuw nsw i64 %.pre.i106.i, %sub.ptr.div.i.i.i100.i - %sub.ptr.lhs.cast.i202.i = ptrtoint ptr %capacityMap.sroa.27.5.i to i64 - %sub.ptr.sub.i203.i = sub i64 %sub.ptr.lhs.cast.i202.i, %sub.ptr.lhs.cast.i.i.i97.i - %sub.ptr.div.i204.i = ashr exact i64 %sub.ptr.sub.i203.i, 3 - %sub.i206.i = xor i64 %sub.ptr.div.i.i.i100.i, 1152921504606846975 - %cmp6.i207.i = icmp ule i64 %sub.ptr.div.i204.i, %sub.i206.i - call void @llvm.assume(i1 %cmp6.i207.i) - %cmp8.not.i208.i = icmp ult i64 %sub.ptr.div.i204.i, %sub.i.i105.i - br i1 %cmp8.not.i208.i, label %if.else.i216.i, label %if.then.i.i.i.i209.i - -if.then.i.i.i.i209.i: ; preds = %if.then.i.i104.i + %sub.ptr.lhs.cast.i201.i = ptrtoint ptr %capacityMap.sroa.27.5.i to i64 + %sub.ptr.sub.i202.i = sub i64 %sub.ptr.lhs.cast.i201.i, %sub.ptr.lhs.cast.i.i.i97.i + %sub.ptr.div.i203.i = ashr exact i64 %sub.ptr.sub.i202.i, 3 + %sub.i205.i = sub nuw nsw i64 1152921504606846975, %sub.ptr.div.i.i.i100.i + %cmp6.i206.i = icmp ule i64 %sub.ptr.div.i203.i, %sub.i205.i + call void @llvm.assume(i1 %cmp6.i206.i) + %cmp8.not.i207.i = icmp ult i64 %sub.ptr.div.i203.i, %sub.i.i105.i + br i1 %cmp8.not.i207.i, label %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i217.i, label %if.then.i.i.i.i208.i + +if.then.i.i.i.i208.i: ; preds = %if.then.i.i104.i store i64 0, ptr %capacityMap.sroa.14.5.i, align 8 - %cmp.i.i.i.i.i.i211.i = icmp eq i64 %sub.i.i105.i, 1 - br i1 %cmp.i.i.i.i.i.i211.i, label %_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i, label %if.end.i.i.i.i.i.i212.i + %cmp.i.i.i.i.i.i210.i = icmp eq i64 %sub.i.i105.i, 1 + br i1 %cmp.i.i.i.i.i.i210.i, label %_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i, label %if.end.i.i.i.i.i.i211.i -if.end.i.i.i.i.i.i212.i: ; preds = %if.then.i.i.i.i209.i - %incdec.ptr.i.i.i.i210.i = getelementptr i8, ptr %capacityMap.sroa.14.5.i, i64 8 +if.end.i.i.i.i.i.i211.i: ; preds = %if.then.i.i.i.i208.i + %incdec.ptr.i.i.i.i209.i = getelementptr i8, ptr %capacityMap.sroa.14.5.i, i64 8 %98 = shl nuw nsw i64 %sub.i.i105.i, 3 %99 = add nsw i64 %98, -8 - call void @llvm.memset.p0.i64(ptr align 8 %incdec.ptr.i.i.i.i210.i, i8 0, i64 %99, i1 false) + call void @llvm.memset.p0.i64(ptr align 8 %incdec.ptr.i.i.i.i209.i, i8 0, i64 %99, i1 false) br label %_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i -if.else.i216.i: ; preds = %if.then.i.i104.i - %cmp.i.i217.i = icmp samesign ult i64 %sub.i206.i, %sub.i.i105.i - br i1 %cmp.i.i217.i, label %if.then.i.i235.i, label %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i218.i - -if.then.i.i235.i: ; preds = %if.else.i216.i - invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.6) #23 - to label %.noexc236.i unwind label %lpad20.i - -.noexc236.i: ; preds = %if.then.i.i235.i - unreachable - -_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i218.i: ; preds = %if.else.i216.i - %.sroa.speculated.i.i219.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i100.i, i64 %sub.i.i105.i) - %add.i.i220.i = add nuw nsw i64 %.sroa.speculated.i.i219.i, %sub.ptr.div.i.i.i100.i - %100 = call i64 @llvm.umin.i64(i64 %add.i.i220.i, i64 1152921504606846975) - %mul.i.i.i.i221.i = shl nuw nsw i64 %100, 3 - %call5.i.i.i.i238.i = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i221.i) #21 - to label %call5.i.i.i.i.noexc237.i unwind label %lpad20.i - -call5.i.i.i.i.noexc237.i: ; preds = %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i218.i - %add.ptr.i222.i = getelementptr inbounds i8, ptr %call5.i.i.i.i238.i, i64 %sub.ptr.sub.i.i.i99.i - store i64 0, ptr %add.ptr.i222.i, align 8 - %cmp.i.i.i.i.i24.i223.i = icmp eq i64 %sub.i.i105.i, 1 - br i1 %cmp.i.i.i.i.i24.i223.i, label %try.cont.i226.i, label %if.end.i.i.i.i.i25.i224.i - -if.end.i.i.i.i.i25.i224.i: ; preds = %call5.i.i.i.i.noexc237.i - %incdec.ptr.i.i.i23.i225.i = getelementptr i8, ptr %add.ptr.i222.i, i64 8 +_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i217.i: ; preds = %if.then.i.i104.i + %.sroa.speculated.i.i218.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i100.i, i64 %sub.i.i105.i) + %add.i.i219.i = add nuw nsw i64 %.sroa.speculated.i.i218.i, %sub.ptr.div.i.i.i100.i + %100 = call i64 @llvm.umin.i64(i64 %add.i.i219.i, i64 1152921504606846975) + %mul.i.i.i.i220.i = shl nuw nsw i64 %100, 3 + %call5.i.i.i.i237.i = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i220.i) #21 + to label %call5.i.i.i.i.noexc236.i unwind label %lpad20.i + +call5.i.i.i.i.noexc236.i: ; preds = %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i217.i + %add.ptr.i221.i = getelementptr inbounds i8, ptr %call5.i.i.i.i237.i, i64 %sub.ptr.sub.i.i.i99.i + store i64 0, ptr %add.ptr.i221.i, align 8 + %cmp.i.i.i.i.i24.i222.i = icmp eq i64 %sub.i.i105.i, 1 + br i1 %cmp.i.i.i.i.i24.i222.i, label %try.cont.i225.i, label %if.end.i.i.i.i.i25.i223.i + +if.end.i.i.i.i.i25.i223.i: ; preds = %call5.i.i.i.i.noexc236.i + %incdec.ptr.i.i.i23.i224.i = getelementptr i8, ptr %add.ptr.i221.i, i64 8 %101 = shl nuw nsw i64 %sub.i.i105.i, 3 %102 = add nsw i64 %101, -8 - call void @llvm.memset.p0.i64(ptr align 8 %incdec.ptr.i.i.i23.i225.i, i8 0, i64 %102, i1 false) - br label %try.cont.i226.i + call void @llvm.memset.p0.i64(ptr align 8 %incdec.ptr.i.i.i23.i224.i, i8 0, i64 %102, i1 false) + br label %try.cont.i225.i -try.cont.i226.i: ; preds = %if.end.i.i.i.i.i25.i224.i, %call5.i.i.i.i.noexc237.i - %cmp.i.i.i.i227.i = icmp sgt i64 %sub.ptr.sub.i.i.i99.i, 0 - br i1 %cmp.i.i.i.i227.i, label %if.then.i.i.i30.i234.i, label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i228.i +try.cont.i225.i: ; preds = %if.end.i.i.i.i.i25.i223.i, %call5.i.i.i.i.noexc236.i + %cmp.i.i.i.i226.i = icmp sgt i64 %sub.ptr.sub.i.i.i99.i, 0 + br i1 %cmp.i.i.i.i226.i, label %if.then.i.i.i30.i233.i, label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i227.i -if.then.i.i.i30.i234.i: ; preds = %try.cont.i226.i - call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i238.i, ptr align 8 %capacityMap.sroa.0.7.i, i64 %sub.ptr.sub.i.i.i99.i, i1 false) - br label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i228.i +if.then.i.i.i30.i233.i: ; preds = %try.cont.i225.i + call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i237.i, ptr align 8 %capacityMap.sroa.0.7.i, i64 %sub.ptr.sub.i.i.i99.i, i1 false) + br label %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i227.i -_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i228.i: ; preds = %if.then.i.i.i30.i234.i, %try.cont.i226.i - %tobool.not.i31.i229.i = icmp eq ptr %capacityMap.sroa.0.7.i, null - br i1 %tobool.not.i31.i229.i, label %_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i, label %if.then.i32.i230.i +_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i227.i: ; preds = %if.then.i.i.i30.i233.i, %try.cont.i225.i + %tobool.not.i31.i228.i = icmp eq ptr %capacityMap.sroa.0.7.i, null + br i1 %tobool.not.i31.i228.i, label %_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i, label %if.then.i32.i229.i -if.then.i32.i230.i: ; preds = %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i228.i +if.then.i32.i229.i: ; preds = %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i227.i call void @_ZdlPv(ptr noundef nonnull %capacityMap.sroa.0.7.i) #22 br label %_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i -_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i: ; preds = %if.then.i32.i230.i, %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i228.i, %if.end.i.i.i.i.i.i212.i, %if.then.i.i.i.i209.i, %"_ZN3ue214remove_edge_ifINS_8NGHolderEZNS_L20removeEdgesFromIndexERS1_RSt6vectorIySaIyEEjE3$_0EENSt9enable_ifIXsr12is_ue2_graphIT_EE5valueEvE4typeET0_RS9_.exit.i.i" - %capacityMap.sroa.0.9.i = phi ptr [ %capacityMap.sroa.0.7.i, %if.end.i.i.i.i.i.i212.i ], [ %capacityMap.sroa.0.7.i, %if.then.i.i.i.i209.i ], [ %call5.i.i.i.i238.i, %if.then.i32.i230.i ], [ %call5.i.i.i.i238.i, %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i228.i ], [ %capacityMap.sroa.0.7.i, %"_ZN3ue214remove_edge_ifINS_8NGHolderEZNS_L20removeEdgesFromIndexERS1_RSt6vectorIySaIyEEjE3$_0EENSt9enable_ifIXsr12is_ue2_graphIT_EE5valueEvE4typeET0_RS9_.exit.i.i" ] +_ZNSt6vectorIySaIyEE6resizeEm.exit.i.i: ; preds = %if.then.i32.i229.i, %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i227.i, %if.end.i.i.i.i.i.i211.i, %if.then.i.i.i.i208.i, %"_ZN3ue214remove_edge_ifINS_8NGHolderEZNS_L20removeEdgesFromIndexERS1_RSt6vectorIySaIyEEjE3$_0EENSt9enable_ifIXsr12is_ue2_graphIT_EE5valueEvE4typeET0_RS9_.exit.i.i" + %capacityMap.sroa.0.9.i = phi ptr [ %capacityMap.sroa.0.7.i, %if.end.i.i.i.i.i.i211.i ], [ %capacityMap.sroa.0.7.i, %if.then.i.i.i.i208.i ], [ %call5.i.i.i.i237.i, %if.then.i32.i229.i ], [ %call5.i.i.i.i237.i, %_ZNSt6vectorIySaIyEE11_S_relocateEPyS2_S2_RS0_.exit.i227.i ], [ %capacityMap.sroa.0.7.i, %"_ZN3ue214remove_edge_ifINS_8NGHolderEZNS_L20removeEdgesFromIndexERS1_RSt6vectorIySaIyEEjE3$_0EENSt9enable_ifIXsr12is_ue2_graphIT_EE5valueEvE4typeET0_RS9_.exit.i.i" ] %next_edge_index.i.i.i.i = getelementptr inbounds nuw i8, ptr %h, i64 40 store i64 0, ptr %next_edge_index.i.i.i.i, align 8 %103 = load ptr, ptr %m_header.i.i.i.i.i.i.i.i.i, align 8, !noalias !68 @@ -1412,7 +1400,7 @@ ehcleanup79.thread.i: ; preds = %if.then.i.i.i.i.i51 cleanup br label %if.then.i.i.i133.i -lpad20.i: ; preds = %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i218.i, %if.then.i.i235.i +lpad20.i: ; preds = %_ZNKSt6vectorIySaIyEE12_M_check_lenEmPKc.exit.i217.i %115 = landingpad { ptr, i32 } cleanup br label %ehcleanup.i diff --git a/bench/image-rs/optimized/fyek6fuqg0ocunt.ll b/bench/image-rs/optimized/fyek6fuqg0ocunt.ll index 4ed8bde2542..bba9e068fc3 100644 --- a/bench/image-rs/optimized/fyek6fuqg0ocunt.ll +++ b/bench/image-rs/optimized/fyek6fuqg0ocunt.ll @@ -2886,41 +2886,41 @@ define void @_ZN5image6codecs4jpeg7decoder11cmyk_to_rgb17hf2ac327e65bba46aE(ptr ret void 9: ; preds = %.lr.ph, %9 - %.sroa.16.043 = phi i64 [ 0, %.lr.ph ], [ %10, %9 ] - %10 = add nuw nsw i64 %.sroa.16.043, 1 - %11 = shl i64 %.sroa.16.043, 2 + %.sroa.16.046 = phi i64 [ 0, %.lr.ph ], [ %10, %9 ] + %10 = add nuw nsw i64 %.sroa.16.046, 1 + %11 = shl i64 %.sroa.16.046, 2 %12 = getelementptr inbounds i8, ptr %1, i64 %11 - %13 = mul nuw i64 %.sroa.16.043, 3 + %13 = mul nuw i64 %.sroa.16.046, 3 %14 = getelementptr inbounds i8, ptr %7, i64 %13 %15 = load i8, ptr %12, align 1, !noundef !4 - %16 = xor i8 %15, -1 - %17 = zext i8 %16 to i16 - %18 = getelementptr inbounds nuw i8, ptr %12, i64 1 - %19 = load i8, ptr %18, align 1, !noundef !4 - %20 = xor i8 %19, -1 - %21 = zext i8 %20 to i16 - %22 = getelementptr inbounds nuw i8, ptr %12, i64 2 - %23 = load i8, ptr %22, align 1, !noundef !4 - %24 = xor i8 %23, -1 - %25 = zext i8 %24 to i16 - %26 = getelementptr inbounds nuw i8, ptr %12, i64 3 - %27 = load i8, ptr %26, align 1, !noundef !4 - %28 = xor i8 %27, -1 - %29 = zext i8 %28 to i16 - %30 = mul nuw i16 %29, %21 + %narrow = xor i8 %15, -1 + %16 = zext i8 %narrow to i16 + %17 = getelementptr inbounds nuw i8, ptr %12, i64 1 + %18 = load i8, ptr %17, align 1, !noundef !4 + %narrow5 = xor i8 %18, -1 + %19 = zext i8 %narrow5 to i16 + %20 = getelementptr inbounds nuw i8, ptr %12, i64 2 + %21 = load i8, ptr %20, align 1, !noundef !4 + %narrow6 = xor i8 %21, -1 + %22 = zext i8 %narrow6 to i16 + %23 = getelementptr inbounds nuw i8, ptr %12, i64 3 + %24 = load i8, ptr %23, align 1, !noundef !4 + %narrow8 = xor i8 %24, -1 + %25 = zext i8 %narrow8 to i16 + %26 = mul nuw i16 %25, %19 + %27 = udiv i16 %26, 255 + %28 = mul nuw i16 %25, %22 + %29 = udiv i16 %28, 255 + %30 = mul nuw i16 %25, %16 %31 = udiv i16 %30, 255 - %32 = mul nuw i16 %29, %25 - %33 = udiv i16 %32, 255 - %34 = mul nuw i16 %29, %17 - %35 = udiv i16 %34, 255 - %36 = trunc nuw i16 %35 to i8 - store i8 %36, ptr %14, align 1 - %37 = getelementptr inbounds nuw i8, ptr %14, i64 1 - %38 = trunc nuw i16 %31 to i8 - store i8 %38, ptr %37, align 1 - %39 = getelementptr inbounds nuw i8, ptr %14, i64 2 - %40 = trunc nuw i16 %33 to i8 - store i8 %40, ptr %39, align 1 + %32 = trunc nuw i16 %31 to i8 + store i8 %32, ptr %14, align 1 + %33 = getelementptr inbounds nuw i8, ptr %14, i64 1 + %34 = trunc nuw i16 %27 to i8 + store i8 %34, ptr %33, align 1 + %35 = getelementptr inbounds nuw i8, ptr %14, i64 2 + %36 = trunc nuw i16 %29 to i8 + store i8 %36, ptr %35, align 1 %exitcond.not = icmp eq i64 %10, %4 br i1 %exitcond.not, label %._crit_edge, label %9 } diff --git a/bench/just-rs/optimized/1uppz7l1e89fp8n7.ll b/bench/just-rs/optimized/1uppz7l1e89fp8n7.ll index 410430ce454..5a06834b0a8 100644 --- a/bench/just-rs/optimized/1uppz7l1e89fp8n7.ll +++ b/bench/just-rs/optimized/1uppz7l1e89fp8n7.ll @@ -3794,8 +3794,8 @@ define internal fastcc void @_ZN6digest11FixedOutput14finalize_fixed17h6acff55bd call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #39, !noalias !914 unreachable -common.resume: ; preds = %27, %49, %19 - %common.resume.op = phi { ptr, i32 } [ %20, %19 ], [ %28, %27 ], [ %50, %49 ] +common.resume: ; preds = %27, %48, %19 + %common.resume.op = phi { ptr, i32 } [ %20, %19 ], [ %28, %27 ], [ %49, %48 ] resume { ptr, i32 } %common.resume.op "_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h08aed7605298457dE.exit": ; preds = %2 @@ -3866,38 +3866,37 @@ common.resume: ; preds = %27, %49, %19 ._crit_edge.i.i.i: ; preds = %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h08aed7605298457dE.exit.i.i" %scevgep.i.i.i = getelementptr i8, ptr %41, i64 1 - %43 = xor i64 %33, 63 + %43 = sub nuw nsw i64 63, %33 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i.i.i, i8 0, i64 %43, i1 false), !alias.scope !938, !noalias !949 - %44 = xor i64 %33, 56 - %45 = icmp samesign ult i64 %44, 8 - br i1 %45, label %._crit_edge.thread.i.i.i, label %54 + %44 = icmp samesign ugt i8 %32, 55 + br i1 %44, label %._crit_edge.thread.i.i.i, label %53 ._crit_edge.thread.i.i.i: ; preds = %._crit_edge.i.i.i, %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h08aed7605298457dE.exit.i.i" call void @_ZN4sha26sha25611compress25617h59f6893dd7c729b0E(ptr noalias noundef nonnull align 8 dereferenceable(112) %15, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %23, i64 noundef 1), !noalias !950 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7), !noalias !951 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %3), !noalias !952 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6), !noalias !953 - %46 = getelementptr inbounds nuw i8, ptr %6, i64 64 - store i64 0, ptr %46, align 8, !noalias !953 + %45 = getelementptr inbounds nuw i8, ptr %6, i64 64 + store i64 0, ptr %45, align 8, !noalias !953 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5), !noalias !953 - store ptr %46, ptr %5, align 8, !noalias !953 + store ptr %45, ptr %5, align 8, !noalias !953 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4), !noalias !953 store ptr %3, ptr %4, align 8, !noalias !953 - %47 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %5, ptr %47, align 8, !noalias !953 - %48 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 0, ptr %48, align 8, !noalias !953 - invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17ha6be6cf297afcff7E.llvm.16801050463324468979"(ptr noundef nonnull %6, ptr noundef nonnull %46, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %4) - to label %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h253d2c7806877dc9E.exit.i.i.i" unwind label %49, !noalias !956 - -49: ; preds = %._crit_edge.thread.i.i.i - %50 = landingpad { ptr, i32 } + %46 = getelementptr inbounds nuw i8, ptr %4, i64 8 + store ptr %5, ptr %46, align 8, !noalias !953 + %47 = getelementptr inbounds nuw i8, ptr %4, i64 16 + store i64 0, ptr %47, align 8, !noalias !953 + invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17ha6be6cf297afcff7E.llvm.16801050463324468979"(ptr noundef nonnull %6, ptr noundef nonnull %45, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %4) + to label %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h253d2c7806877dc9E.exit.i.i.i" unwind label %48, !noalias !956 + +48: ; preds = %._crit_edge.thread.i.i.i + %49 = landingpad { ptr, i32 } cleanup invoke void @"_ZN82_$LT$generic_array..ArrayBuilder$LT$T$C$N$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hbec8dafaaa04f6efE.llvm.1798434116971987782"(ptr noalias noundef nonnull align 8 dereferenceable(72) %6) - to label %common.resume unwind label %51, !noalias !956 + to label %common.resume unwind label %50, !noalias !956 -51: ; preds = %49 - %52 = landingpad { ptr, i32 } +50: ; preds = %48 + %51 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #39, !noalias !956 unreachable @@ -3908,31 +3907,31 @@ common.resume: ; preds = %27, %49, %19 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %7, ptr noundef nonnull align 8 dereferenceable(64) %6, i64 56, i1 false), !noalias !957 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6), !noalias !953 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %3), !noalias !952 - %53 = getelementptr inbounds nuw i8, ptr %7, i64 56 - store i64 %40, ptr %53, align 1, !alias.scope !958, !noalias !962 + %52 = getelementptr inbounds nuw i8, ptr %7, i64 56 + store i64 %40, ptr %52, align 1, !alias.scope !958, !noalias !962 call void @_ZN4sha26sha25611compress25617h59f6893dd7c729b0E(ptr noalias noundef nonnull align 8 dereferenceable(112) %15, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %7, i64 noundef 1), !noalias !950 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7), !noalias !951 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader" -54: ; preds = %._crit_edge.i.i.i - %55 = getelementptr inbounds nuw i8, ptr %15, i64 96 - store i64 %40, ptr %55, align 8, !alias.scope !964, !noalias !968 +53: ; preds = %._crit_edge.i.i.i + %54 = getelementptr inbounds nuw i8, ptr %15, i64 96 + store i64 %40, ptr %54, align 8, !alias.scope !964, !noalias !968 call void @_ZN4sha26sha25611compress25617h59f6893dd7c729b0E(ptr noalias noundef nonnull align 8 dereferenceable(112) %15, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %23, i64 noundef 1), !noalias !950 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader" -"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader": ; preds = %54, %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h253d2c7806877dc9E.exit.i.i.i" +"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader": ; preds = %53, %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h253d2c7806877dc9E.exit.i.i.i" br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader", %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i" - %.sroa.12.038.i.i.i = phi i64 [ %56, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i" ], [ 0, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader" ] - %56 = add nuw nsw i64 %.sroa.12.038.i.i.i, 1 - %57 = shl nuw nsw i64 %.sroa.12.038.i.i.i, 2 - %58 = getelementptr inbounds nuw i8, ptr %11, i64 %57 - %59 = getelementptr inbounds nuw i32, ptr %15, i64 %.sroa.12.038.i.i.i - %60 = load i32, ptr %59, align 4, !alias.scope !940, !noalias !941, !noundef !4 - %61 = call i32 @llvm.bswap.i32(i32 %60) - store i32 %61, ptr %58, align 1, !alias.scope !970, !noalias !974 - %exitcond.not.i.i.i = icmp eq i64 %56, 8 + %.sroa.12.038.i.i.i = phi i64 [ %55, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i" ], [ 0, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i.preheader" ] + %55 = add nuw nsw i64 %.sroa.12.038.i.i.i, 1 + %56 = shl nuw nsw i64 %.sroa.12.038.i.i.i, 2 + %57 = getelementptr inbounds nuw i8, ptr %11, i64 %56 + %58 = getelementptr inbounds nuw i32, ptr %15, i64 %.sroa.12.038.i.i.i + %59 = load i32, ptr %58, align 4, !alias.scope !940, !noalias !941, !noundef !4 + %60 = call i32 @llvm.bswap.i32(i32 %59) + store i32 %60, ptr %57, align 1, !alias.scope !970, !noalias !974 + %exitcond.not.i.i.i = icmp eq i64 %55, 8 br i1 %exitcond.not.i.i.i, label %"_ZN87_$LT$digest..core_api..wrapper..CoreWrapper$LT$T$GT$$u20$as$u20$digest..FixedOutput$GT$13finalize_into17h95993d1d4a97beedE.exit", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i" "_ZN87_$LT$digest..core_api..wrapper..CoreWrapper$LT$T$GT$$u20$as$u20$digest..FixedOutput$GT$13finalize_into17h95993d1d4a97beedE.exit": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h1c602a7b6d57ccd6E.exit.i.i.i" diff --git a/bench/libdeflate/optimized/deflate_decompress.c.ll b/bench/libdeflate/optimized/deflate_decompress.c.ll index 1e8161158fb..dc4186ad2a6 100644 --- a/bench/libdeflate/optimized/deflate_decompress.c.ll +++ b/bench/libdeflate/optimized/deflate_decompress.c.ll @@ -2736,8 +2736,7 @@ if.end130: ; preds = %do.body %incdec.ptr = getelementptr inbounds nuw i8, ptr %sorted_syms.addr.1, i64 2 %xor = xor i32 %codeword.1, %sub115 %21 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %xor, i1 true) - %sub.i248 = xor i32 %21, 31 - %shl133 = shl nuw i32 1, %sub.i248 + %shl133 = lshr exact i32 -2147483648, %21 %sub134 = add i32 %shl133, -1 %and = and i32 %sub134, %codeword.1 %or = or i32 %and, %shl133 @@ -2866,8 +2865,7 @@ if.end213: ; preds = %do.end207 %incdec.ptr193 = getelementptr inbounds nuw i8, ptr %sorted_syms.addr.2, i64 2 %xor216 = xor i32 %codeword.2, %sub209 %27 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %xor216, i1 true) - %sub.i = xor i32 %27, 31 - %shl218 = shl nuw i32 1, %sub.i + %shl218 = lshr exact i32 -2147483648, %27 %sub219 = add i32 %shl218, -1 %and220 = and i32 %sub219, %codeword.2 %or221 = or i32 %and220, %shl218 diff --git a/bench/libjpeg-turbo/optimized/jdcolor.c.ll b/bench/libjpeg-turbo/optimized/jdcolor.c.ll index 55d6d65e9f0..ab5f427b447 100644 --- a/bench/libjpeg-turbo/optimized/jdcolor.c.ll +++ b/bench/libjpeg-turbo/optimized/jdcolor.c.ll @@ -3670,7 +3670,7 @@ define internal void @ycck_cmyk_convert(ptr nocapture noundef readonly %0, ptr n .lr.ph.us: ; preds = %.lr.ph.us.preheader, %..loopexit_crit_edge.us %.in = phi i32 [ %24, %..loopexit_crit_edge.us ], [ %4, %.lr.ph.us.preheader ] %.061.us = phi i32 [ %38, %..loopexit_crit_edge.us ], [ %2, %.lr.ph.us.preheader ] - %.04760.us = phi ptr [ %79, %..loopexit_crit_edge.us ], [ %3, %.lr.ph.us.preheader ] + %.04760.us = phi ptr [ %82, %..loopexit_crit_edge.us ], [ %3, %.lr.ph.us.preheader ] %24 = add nsw i32 %.in, -1 %25 = load ptr, ptr %1, align 8 %26 = zext i32 %.061.us to i64 @@ -3691,58 +3691,60 @@ define internal void @ycck_cmyk_convert(ptr nocapture noundef readonly %0, ptr n 40: ; preds = %.lr.ph.us, %40 %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %40 ] - %.04959.us = phi ptr [ %39, %.lr.ph.us ], [ %78, %40 ] + %.04959.us = phi ptr [ %39, %.lr.ph.us ], [ %81, %40 ] %41 = getelementptr inbounds nuw i8, ptr %28, i64 %indvars.iv %42 = load i8, ptr %41, align 1 - %43 = getelementptr inbounds nuw i8, ptr %31, i64 %indvars.iv - %44 = load i8, ptr %43, align 1 - %45 = getelementptr inbounds nuw i8, ptr %34, i64 %indvars.iv - %46 = load i8, ptr %45, align 1 - %47 = zext i8 %46 to i64 - %48 = getelementptr inbounds nuw i32, ptr %13, i64 %47 - %49 = load i32, ptr %48, align 4 - %50 = xor i8 %42, -1 - %.neg53.us = zext i8 %50 to i32 - %51 = sub i32 %.neg53.us, %49 - %52 = sext i32 %51 to i64 - %53 = getelementptr inbounds i8, ptr %11, i64 %52 - %54 = load i8, ptr %53, align 1 - store i8 %54, ptr %.04959.us, align 1 - %55 = zext i8 %44 to i64 - %56 = getelementptr inbounds nuw i64, ptr %19, i64 %55 - %57 = load i64, ptr %56, align 8 - %58 = getelementptr inbounds nuw i64, ptr %17, i64 %47 - %59 = load i64, ptr %58, align 8 - %60 = add nsw i64 %59, %57 - %61 = lshr i64 %60, 16 - %62 = trunc i64 %61 to i32 - %63 = sub i32 %.neg53.us, %62 - %64 = sext i32 %63 to i64 - %65 = getelementptr inbounds i8, ptr %11, i64 %64 - %66 = load i8, ptr %65, align 1 - %67 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 1 - store i8 %66, ptr %67, align 1 - %68 = getelementptr inbounds nuw i32, ptr %15, i64 %55 - %69 = load i32, ptr %68, align 4 - %70 = sub i32 %.neg53.us, %69 - %71 = sext i32 %70 to i64 - %72 = getelementptr inbounds i8, ptr %11, i64 %71 - %73 = load i8, ptr %72, align 1 - %74 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 2 - store i8 %73, ptr %74, align 1 - %75 = getelementptr inbounds nuw i8, ptr %37, i64 %indvars.iv + %43 = zext i8 %42 to i32 + %44 = getelementptr inbounds nuw i8, ptr %31, i64 %indvars.iv + %45 = load i8, ptr %44, align 1 + %46 = getelementptr inbounds nuw i8, ptr %34, i64 %indvars.iv + %47 = load i8, ptr %46, align 1 + %48 = zext i8 %47 to i64 + %49 = getelementptr inbounds nuw i32, ptr %13, i64 %48 + %50 = load i32, ptr %49, align 4 + %51 = add i32 %50, %43 + %52 = sub i32 255, %51 + %53 = sext i32 %52 to i64 + %54 = getelementptr inbounds i8, ptr %11, i64 %53 + %55 = load i8, ptr %54, align 1 + store i8 %55, ptr %.04959.us, align 1 + %56 = zext i8 %45 to i64 + %57 = getelementptr inbounds nuw i64, ptr %19, i64 %56 + %58 = load i64, ptr %57, align 8 + %59 = getelementptr inbounds nuw i64, ptr %17, i64 %48 + %60 = load i64, ptr %59, align 8 + %61 = add nsw i64 %60, %58 + %62 = lshr i64 %61, 16 + %63 = trunc i64 %62 to i32 + %64 = add i32 %43, %63 + %65 = sub i32 255, %64 + %66 = sext i32 %65 to i64 + %67 = getelementptr inbounds i8, ptr %11, i64 %66 + %68 = load i8, ptr %67, align 1 + %69 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 1 + store i8 %68, ptr %69, align 1 + %70 = getelementptr inbounds nuw i32, ptr %15, i64 %56 + %71 = load i32, ptr %70, align 4 + %72 = add i32 %71, %43 + %73 = sub i32 255, %72 + %74 = sext i32 %73 to i64 + %75 = getelementptr inbounds i8, ptr %11, i64 %74 %76 = load i8, ptr %75, align 1 - %77 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 3 + %77 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 2 store i8 %76, ptr %77, align 1 - %78 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 4 + %78 = getelementptr inbounds nuw i8, ptr %37, i64 %indvars.iv + %79 = load i8, ptr %78, align 1 + %80 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 3 + store i8 %79, ptr %80, align 1 + %81 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 4 %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 %..loopexit_crit_edge.us, label %40, !llvm.loop !71 ..loopexit_crit_edge.us: ; preds = %40 - %79 = getelementptr inbounds nuw i8, ptr %.04760.us, i64 8 - %80 = icmp sgt i32 %.in, 1 - br i1 %80, label %.lr.ph.us, label %._crit_edge, !llvm.loop !72 + %82 = getelementptr inbounds nuw i8, ptr %.04760.us, i64 8 + %83 = icmp sgt i32 %.in, 1 + br i1 %83, label %.lr.ph.us, label %._crit_edge, !llvm.loop !72 ._crit_edge: ; preds = %..loopexit_crit_edge.us, %.lr.ph62, %5 ret void diff --git a/bench/libpng/optimized/pngread.c.ll b/bench/libpng/optimized/pngread.c.ll index 52f08409807..9b02305d752 100644 --- a/bench/libpng/optimized/pngread.c.ll +++ b/bench/libpng/optimized/pngread.c.ll @@ -3532,7 +3532,7 @@ decode_gamma.exit521.thread: ; preds = %.preheader585, %dec %653 = tail call fastcc i32 @decode_gamma(ptr noundef nonnull %0, i32 noundef range(i32 0, 256) %652, i32 noundef 3) %654 = tail call fastcc i32 @decode_gamma(ptr noundef nonnull %0, i32 noundef range(i32 0, 65536) %.0400, i32 noundef range(i32 1, 3) %12) %655 = mul nuw i32 %653, %649 - %656 = xor i32 %649, 255 + %656 = sub nuw nsw i32 255, %649 %657 = mul nuw i32 %654, %656 %658 = add i32 %657, %655 br i1 %.not.not, label %665, label %659 @@ -3572,7 +3572,7 @@ png_colormap_compose.exit514: ; preds = %659, %665 %685 = tail call fastcc i32 @decode_gamma(ptr noundef nonnull %0, i32 noundef range(i32 0, 256) %682, i32 noundef 3) %686 = tail call fastcc i32 @decode_gamma(ptr noundef nonnull %0, i32 noundef range(i32 0, 65536) %.0402, i32 noundef range(i32 1, 3) %12) %687 = mul nuw i32 %685, %684 - %688 = xor i32 %684, 255 + %688 = sub nuw nsw i32 255, %684 %689 = mul nuw i32 %686, %688 %690 = add i32 %689, %687 br i1 %.not.not, label %697, label %691 @@ -3612,7 +3612,7 @@ png_colormap_compose.exit516: ; preds = %691, %697 %717 = tail call fastcc i32 @decode_gamma(ptr noundef nonnull %0, i32 noundef range(i32 0, 256) %714, i32 noundef 3) %718 = tail call fastcc i32 @decode_gamma(ptr noundef nonnull %0, i32 noundef range(i32 0, 65536) %.0404, i32 noundef range(i32 1, 3) %12) %719 = mul nuw i32 %717, %716 - %720 = xor i32 %716, 255 + %720 = sub nuw nsw i32 255, %716 %721 = mul nuw i32 %718, %720 %722 = add i32 %721, %719 br i1 %.not.not, label %732, label %723 @@ -5495,7 +5495,7 @@ define internal noundef i32 @png_image_read_composite(ptr nocapture noundef read br label %27 27: ; preds = %9, %.loopexit83 - %.07392 = phi i32 [ 0, %9 ], [ %111, %.loopexit83 ] + %.07392 = phi i32 [ 0, %9 ], [ %110, %.loopexit83 ] %28 = load i8, ptr %5, align 4 %29 = icmp eq i8 %28, 1 br i1 %29, label %30, label %60 @@ -5549,7 +5549,7 @@ define internal noundef i32 @png_image_read_composite(ptr nocapture noundef read br label %64 64: ; preds = %.lr.ph91, %._crit_edge - %.189 = phi i32 [ %.076, %.lr.ph91 ], [ %109, %._crit_edge ] + %.189 = phi i32 [ %.076, %.lr.ph91 ], [ %108, %._crit_edge ] %65 = load ptr, ptr %20, align 8 tail call void @png_read_row(ptr noundef %4, ptr noundef %65, ptr noundef null) %66 = load ptr, ptr %21, align 8 @@ -5564,8 +5564,8 @@ define internal noundef i32 @png_image_read_composite(ptr nocapture noundef read br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %.loopexit - %.07487 = phi ptr [ %107, %.loopexit ], [ %71, %.lr.ph.preheader ] - %.07585 = phi ptr [ %106, %.loopexit ], [ %65, %.lr.ph.preheader ] + %.07487 = phi ptr [ %106, %.loopexit ], [ %71, %.lr.ph.preheader ] + %.07585 = phi ptr [ %105, %.loopexit ], [ %65, %.lr.ph.preheader ] %72 = getelementptr inbounds nuw i8, ptr %.07585, i64 %24 %73 = load i8, ptr %72, align 1 %.not = icmp eq i8 %73, 0 @@ -5573,71 +5573,71 @@ define internal noundef i32 @png_image_read_composite(ptr nocapture noundef read .preheader: ; preds = %.lr.ph %.not82 = icmp eq i8 %73, -1 - %74 = xor i8 %73, -1 - %75 = zext i8 %74 to i32 + %narrow = xor i8 %73, -1 + %74 = zext i8 %narrow to i32 br i1 %.not82, label %.preheader.split.us, label %.preheader.split .preheader.split.us: ; preds = %.preheader, %.preheader.split.us %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.preheader.split.us ], [ 0, %.preheader ] - %76 = getelementptr inbounds nuw i8, ptr %.07585, i64 %indvars.iv96 - %77 = load i8, ptr %76, align 1 - %78 = getelementptr inbounds nuw i8, ptr %.07487, i64 %indvars.iv96 - store i8 %77, ptr %78, align 1 + %75 = getelementptr inbounds nuw i8, ptr %.07585, i64 %indvars.iv96 + %76 = load i8, ptr %75, align 1 + %77 = getelementptr inbounds nuw i8, ptr %.07487, i64 %indvars.iv96 + store i8 %76, ptr %77, align 1 %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1 %exitcond100.not = icmp eq i64 %indvars.iv.next97, %wide.trip.count99 br i1 %exitcond100.not, label %.loopexit, label %.preheader.split.us, !llvm.loop !72 .preheader.split: ; preds = %.preheader, %.preheader.split %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader.split ], [ 0, %.preheader ] - %79 = getelementptr inbounds nuw i8, ptr %.07585, i64 %indvars.iv - %80 = load i8, ptr %79, align 1 - %81 = zext i8 %80 to i32 - %82 = mul nuw nsw i32 %81, 65535 - %83 = getelementptr inbounds nuw i8, ptr %.07487, i64 %indvars.iv - %84 = load i8, ptr %83, align 1 - %85 = zext i8 %84 to i64 - %86 = getelementptr inbounds nuw [256 x i16], ptr @png_sRGB_table, i64 0, i64 %85 - %87 = load i16, ptr %86, align 2 - %88 = zext i16 %87 to i32 - %89 = mul nuw nsw i32 %88, %75 - %90 = add nuw nsw i32 %89, %82 - %91 = lshr i32 %90, 15 - %92 = zext nneg i32 %91 to i64 - %93 = getelementptr inbounds nuw [512 x i16], ptr @png_sRGB_base, i64 0, i64 %92 - %94 = load i16, ptr %93, align 2 - %95 = zext i16 %94 to i32 - %96 = and i32 %90, 32767 - %97 = getelementptr inbounds nuw [512 x i8], ptr @png_sRGB_delta, i64 0, i64 %92 - %98 = load i8, ptr %97, align 1 - %99 = zext i8 %98 to i32 - %100 = mul nuw nsw i32 %96, %99 - %101 = lshr i32 %100, 12 - %102 = add nuw nsw i32 %101, %95 - %103 = lshr i32 %102, 8 - %104 = trunc i32 %103 to i8 - store i8 %104, ptr %83, align 1 + %78 = getelementptr inbounds nuw i8, ptr %.07585, i64 %indvars.iv + %79 = load i8, ptr %78, align 1 + %80 = zext i8 %79 to i32 + %81 = mul nuw nsw i32 %80, 65535 + %82 = getelementptr inbounds nuw i8, ptr %.07487, i64 %indvars.iv + %83 = load i8, ptr %82, align 1 + %84 = zext i8 %83 to i64 + %85 = getelementptr inbounds nuw [256 x i16], ptr @png_sRGB_table, i64 0, i64 %84 + %86 = load i16, ptr %85, align 2 + %87 = zext i16 %86 to i32 + %88 = mul nuw nsw i32 %87, %74 + %89 = add nuw nsw i32 %88, %81 + %90 = lshr i32 %89, 15 + %91 = zext nneg i32 %90 to i64 + %92 = getelementptr inbounds nuw [512 x i16], ptr @png_sRGB_base, i64 0, i64 %91 + %93 = load i16, ptr %92, align 2 + %94 = zext i16 %93 to i32 + %95 = and i32 %89, 32767 + %96 = getelementptr inbounds nuw [512 x i8], ptr @png_sRGB_delta, i64 0, i64 %91 + %97 = load i8, ptr %96, align 1 + %98 = zext i8 %97 to i32 + %99 = mul nuw nsw i32 %95, %98 + %100 = lshr i32 %99, 12 + %101 = add nuw nsw i32 %100, %94 + %102 = lshr i32 %101, 8 + %103 = trunc i32 %102 to i8 + store i8 %103, ptr %82, align 1 %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 %.loopexit, label %.preheader.split, !llvm.loop !72 .loopexit: ; preds = %.preheader.split, %.preheader.split.us, %.lr.ph - %105 = getelementptr inbounds nuw i8, ptr %.07585, i64 %25 - %106 = getelementptr inbounds nuw i8, ptr %105, i64 2 - %107 = getelementptr inbounds nuw i8, ptr %.07487, i64 %62 - %108 = icmp ult ptr %107, %70 - br i1 %108, label %.lr.ph, label %._crit_edge, !llvm.loop !73 + %104 = getelementptr inbounds nuw i8, ptr %.07585, i64 %25 + %105 = getelementptr inbounds nuw i8, ptr %104, i64 2 + %106 = getelementptr inbounds nuw i8, ptr %.07487, i64 %62 + %107 = icmp ult ptr %106, %70 + br i1 %107, label %.lr.ph, label %._crit_edge, !llvm.loop !73 ._crit_edge: ; preds = %.loopexit, %64 - %109 = add i32 %.189, %.077 - %110 = icmp ult i32 %109, %11 - br i1 %110, label %64, label %.loopexit83, !llvm.loop !74 + %108 = add i32 %.189, %.077 + %109 = icmp ult i32 %108, %11 + br i1 %109, label %64, label %.loopexit83, !llvm.loop !74 .loopexit83: ; preds = %._crit_edge, %60, %30 - %111 = add nuw nsw i32 %.07392, 1 - %exitcond101.not = icmp eq i32 %111, %.072 - br i1 %exitcond101.not, label %112, label %27, !llvm.loop !75 + %110 = add nuw nsw i32 %.07392, 1 + %exitcond101.not = icmp eq i32 %110, %.072 + br i1 %exitcond101.not, label %111, label %27, !llvm.loop !75 -112: ; preds = %.loopexit83 +111: ; preds = %.loopexit83 ret i32 1 } @@ -5825,7 +5825,7 @@ define internal noundef i32 @png_image_read_background(ptr nocapture noundef rea %101 = getelementptr inbounds nuw [256 x i16], ptr @png_sRGB_table, i64 0, i64 %100 %102 = load i16, ptr %101, align 2 %103 = zext i16 %102 to i32 - %104 = xor i32 %90, 255 + %104 = sub nuw nsw i32 255, %90 %105 = mul nuw nsw i32 %104, %103 %106 = add nuw nsw i32 %105, %98 %107 = lshr i32 %106, 15 @@ -5908,7 +5908,7 @@ define internal noundef i32 @png_image_read_background(ptr nocapture noundef rea %152 = load i16, ptr %151, align 2 %153 = zext i16 %152 to i32 %154 = mul nuw nsw i32 %153, %146 - %155 = xor i32 %146, 255 + %155 = sub nuw nsw i32 255, %146 %156 = mul nuw nsw i32 %155, %135 %157 = add nuw nsw i32 %154, %156 %158 = lshr i32 %157, 15 diff --git a/bench/libwebp/optimized/token_enc.c.ll b/bench/libwebp/optimized/token_enc.c.ll index 945f504a87c..edfc7b73bb7 100644 --- a/bench/libwebp/optimized/token_enc.c.ll +++ b/bench/libwebp/optimized/token_enc.c.ll @@ -1616,24 +1616,24 @@ declare i32 @VP8PutBit(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define hidden i64 @VP8EstimateTokenSize(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 { %3 = load ptr, ptr %0, align 8 - %.not30 = icmp eq ptr %3, null - br i1 %.not30, label %._crit_edge, label %.lr.ph33 + %.not31 = icmp eq ptr %3, null + br i1 %.not31, label %._crit_edge, label %.lr.ph34 -.lr.ph33: ; preds = %2 +.lr.ph34: ; preds = %2 %4 = getelementptr inbounds nuw i8, ptr %0, i64 24 %5 = getelementptr inbounds nuw i8, ptr %0, i64 28 %6 = load i32, ptr %5, align 4 %7 = sext i32 %6 to i64 br label %8 -.loopexit: ; preds = %32, %13 - %.1.lcssa = phi i64 [ %.032, %13 ], [ %.2, %32 ] +.loopexit: ; preds = %31, %13 + %.1.lcssa = phi i64 [ %.033, %13 ], [ %.2, %31 ] br i1 %10, label %._crit_edge, label %8, !llvm.loop !10 -8: ; preds = %.lr.ph33, %.loopexit - %.032 = phi i64 [ 0, %.lr.ph33 ], [ %.1.lcssa, %.loopexit ] - %.02131 = phi ptr [ %3, %.lr.ph33 ], [ %9, %.loopexit ] - %9 = load ptr, ptr %.02131, align 8 +8: ; preds = %.lr.ph34, %.loopexit + %.033 = phi i64 [ 0, %.lr.ph34 ], [ %.1.lcssa, %.loopexit ] + %.02132 = phi ptr [ %3, %.lr.ph34 ], [ %9, %.loopexit ] + %9 = load ptr, ptr %.02132, align 8 %10 = icmp eq ptr %9, null br i1 %10, label %11, label %13 @@ -1643,7 +1643,7 @@ define hidden i64 @VP8EstimateTokenSize(ptr nocapture noundef readonly %0, ptr n 13: ; preds = %8, %11 %14 = phi i32 [ %12, %11 ], [ 0, %8 ] - %15 = getelementptr inbounds nuw i8, ptr %.02131, i64 8 + %15 = getelementptr inbounds nuw i8, ptr %.02132, i64 8 %16 = icmp sgt i32 %6, %14 br i1 %16, label %.lr.ph.preheader, label %.loopexit @@ -1651,9 +1651,9 @@ define hidden i64 @VP8EstimateTokenSize(ptr nocapture noundef readonly %0, ptr n %17 = sext i32 %14 to i64 br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %32 - %indvars.iv = phi i64 [ %7, %.lr.ph.preheader ], [ %indvars.iv.next, %32 ] - %.129 = phi i64 [ %.032, %.lr.ph.preheader ], [ %.2, %32 ] +.lr.ph: ; preds = %.lr.ph.preheader, %31 + %indvars.iv = phi i64 [ %7, %.lr.ph.preheader ], [ %indvars.iv.next, %31 ] + %.130 = phi i64 [ %.033, %.lr.ph.preheader ], [ %.2, %31 ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 %18 = getelementptr inbounds i16, ptr %15, i64 %indvars.iv.next %19 = load i16, ptr %18, align 2 @@ -1668,7 +1668,7 @@ define hidden i64 @VP8EstimateTokenSize(ptr nocapture noundef readonly %0, ptr n %24 = xor i32 %sext, %20 %25 = and i32 %24, 255 %.pn.i = zext nneg i32 %25 to i64 - br label %32 + br label %31 26: ; preds = %.lr.ph %27 = and i32 %20, 16383 @@ -1676,19 +1676,19 @@ define hidden i64 @VP8EstimateTokenSize(ptr nocapture noundef readonly %0, ptr n %29 = getelementptr inbounds nuw i8, ptr %1, i64 %28 %30 = load i8, ptr %29, align 1 %.lobit = ashr i16 %19, 15 - %31 = trunc nsw i16 %.lobit to i8 - %.pn.in.i25 = xor i8 %30, %31 - %.pn.i26 = zext i8 %.pn.in.i25 to i64 - br label %32 + %narrow.i25 = trunc nsw i16 %.lobit to i8 + %.pn.in.i26 = xor i8 %30, %narrow.i25 + %.pn.i27 = zext i8 %.pn.in.i26 to i64 + br label %31 -32: ; preds = %26, %22 - %.pn.i.pn = phi i64 [ %.pn.i, %22 ], [ %.pn.i26, %26 ] +31: ; preds = %26, %22 + %.pn.i.pn = phi i64 [ %.pn.i, %22 ], [ %.pn.i27, %26 ] %.pn.in.in.in = getelementptr inbounds nuw [256 x i16], ptr @VP8EntropyCost, i64 0, i64 %.pn.i.pn %.pn.in.in = load i16, ptr %.pn.in.in.in, align 2 %.pn = zext i16 %.pn.in.in to i64 - %.2 = add i64 %.129, %.pn - %33 = icmp sgt i64 %indvars.iv.next, %17 - br i1 %33, label %.lr.ph, label %.loopexit, !llvm.loop !11 + %.2 = add i64 %.130, %.pn + %32 = icmp sgt i64 %indvars.iv.next, %17 + br i1 %32, label %.lr.ph, label %.loopexit, !llvm.loop !11 ._crit_edge: ; preds = %.loopexit, %2 %.0.lcssa = phi i64 [ 0, %2 ], [ %.1.lcssa, %.loopexit ] diff --git a/bench/linux/optimized/alps.ll b/bench/linux/optimized/alps.ll index 8e79439c70f..c45d4f4f5e4 100644 --- a/bench/linux/optimized/alps.ll +++ b/bench/linux/optimized/alps.ll @@ -5239,140 +5239,141 @@ define internal noundef range(i32 -1, 2) i32 @alps_decode_packet_v7(ptr nocaptur br i1 %.not, label %.thread3, label %79 79: ; preds = %21 - %80 = icmp eq i16 %78, 2032 - %81 = icmp eq i16 %67, 4080 - %82 = select i1 %80, i1 %81, i1 false - %spec.store.select = select i1 %82, i16 0, i16 %67 + %80 = or disjoint i16 %78, 15 + %81 = icmp eq i16 %78, 2032 + %82 = icmp eq i16 %67, 4080 + %83 = select i1 %81, i1 %82, i1 false + %spec.store.select = select i1 %83, i16 0, i16 %67 store i16 %spec.store.select, ptr %57, align 2 - %spec.select6 = select i1 %82, i16 0, i16 %67 - %83 = xor i16 %51, 2047 - store i16 %83, ptr %52, align 2 - %84 = xor i16 %78, 2032 - store i16 %84, ptr %73, align 2 - br label %98 + %spec.select6 = select i1 %83, i16 0, i16 %67 + %84 = xor i16 %51, 2047 + store i16 %84, ptr %52, align 2 + %85 = sub nuw nsw i16 2047, %80 + store i16 %85, ptr %73, align 2 + br label %100 .thread3: ; preds = %21 - %85 = and i16 %67, 4032 - store i16 %85, ptr %57, align 2 - %86 = and i16 %78, 2000 - store i16 %86, ptr %73, align 2 - %87 = load i8, ptr %5, align 1 - %88 = shl i8 %87, 4 - %89 = and i8 %88, 32 - %90 = zext nneg i8 %89 to i16 - %91 = xor i16 %51, 2047 - store i16 %91, ptr %52, align 2 - %.masked = and i16 %78, 1984 - %92 = or disjoint i16 %.masked, %90 - %93 = xor i16 %92, 2016 - store i16 %93, ptr %73, align 2 - %94 = load i8, ptr %68, align 1 - %95 = and i8 %94, 3 - %96 = add nuw nsw i8 %95, 3 - %97 = zext nneg i8 %96 to i32 + %86 = and i16 %67, 4032 + store i16 %86, ptr %57, align 2 + %87 = and i16 %78, 2000 + store i16 %87, ptr %73, align 2 + %88 = load i8, ptr %5, align 1 + %89 = shl i8 %88, 4 + %90 = and i8 %89, 32 + %91 = zext nneg i8 %90 to i16 + %92 = or disjoint i16 %87, %91 + %93 = or i16 %92, 31 + %94 = xor i16 %51, 2047 + store i16 %94, ptr %52, align 2 + %95 = sub nuw nsw i16 2047, %93 + store i16 %95, ptr %73, align 2 + %96 = load i8, ptr %68, align 1 + %97 = and i8 %96, 3 + %98 = add nuw nsw i8 %97, 3 + %99 = zext nneg i8 %98 to i32 br label %.loopexit -98: ; preds = %79, %110 - %99 = phi i64 [ %112, %110 ], [ 0, %79 ] - %100 = phi i32 [ %111, %110 ], [ 0, %79 ] - %101 = getelementptr %struct.input_mt_pos, ptr %23, i64 %99 - %102 = load i16, ptr %101, align 2 - %103 = icmp eq i16 %102, 0 - br i1 %103, label %104, label %108 - -104: ; preds = %98 - %105 = getelementptr inbounds nuw i8, ptr %101, i64 2 - %106 = load i16, ptr %105, align 2 - %107 = icmp eq i16 %106, 0 - br i1 %107, label %110, label %108 - -108: ; preds = %104, %98 - %109 = add i32 %100, 1 - br label %110 +100: ; preds = %79, %112 + %101 = phi i64 [ %114, %112 ], [ 0, %79 ] + %102 = phi i32 [ %113, %112 ], [ 0, %79 ] + %103 = getelementptr %struct.input_mt_pos, ptr %23, i64 %101 + %104 = load i16, ptr %103, align 2 + %105 = icmp eq i16 %104, 0 + br i1 %105, label %106, label %110 + +106: ; preds = %100 + %107 = getelementptr inbounds nuw i8, ptr %103, i64 2 + %108 = load i16, ptr %107, align 2 + %109 = icmp eq i16 %108, 0 + br i1 %109, label %112, label %110 + +110: ; preds = %106, %100 + %111 = add i32 %102, 1 + br label %112 -110: ; preds = %108, %104 - %111 = phi i32 [ %109, %108 ], [ %100, %104 ] - %112 = add nuw nsw i64 %99, 1 - %113 = icmp eq i64 %112, 4 - br i1 %113, label %.loopexit, label %98, !llvm.loop !24 - -.loopexit: ; preds = %110, %.thread3 - %114 = phi i16 [ %85, %.thread3 ], [ %spec.select6, %110 ] - %115 = phi i16 [ %93, %.thread3 ], [ %84, %110 ] - %116 = phi i16 [ %91, %.thread3 ], [ %83, %110 ] - %117 = phi i32 [ %97, %.thread3 ], [ %111, %110 ] - %118 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i32 %117, ptr %118, align 4 - %119 = load i8, ptr %1, align 1 - %120 = getelementptr inbounds nuw i8, ptr %0, i64 36 - %121 = load i8, ptr %120, align 4 - %122 = lshr i8 %119, 5 - %123 = and i8 %122, 4 - %124 = and i8 %121, -5 - %125 = or disjoint i8 %124, %123 - store i8 %125, ptr %120, align 4 - %126 = getelementptr inbounds nuw i8, ptr %4, i64 200 - %127 = load i32, ptr %126, align 8 - %128 = and i32 %127, 512 - %129 = icmp eq i32 %128, 0 - %130 = load i8, ptr %1, align 1 - br i1 %129, label %143, label %131 - -131: ; preds = %.loopexit - %132 = and i8 %130, 32 - %133 = icmp eq i8 %132, 0 - br i1 %133, label %136, label %134 - -134: ; preds = %131 - %135 = add i32 %117, 1 - store i32 %135, ptr %118, align 4 +112: ; preds = %110, %106 + %113 = phi i32 [ %111, %110 ], [ %102, %106 ] + %114 = add nuw nsw i64 %101, 1 + %115 = icmp eq i64 %114, 4 + br i1 %115, label %.loopexit, label %100, !llvm.loop !24 + +.loopexit: ; preds = %112, %.thread3 + %116 = phi i16 [ %86, %.thread3 ], [ %spec.select6, %112 ] + %117 = phi i16 [ %95, %.thread3 ], [ %85, %112 ] + %118 = phi i16 [ %94, %.thread3 ], [ %84, %112 ] + %119 = phi i32 [ %99, %.thread3 ], [ %113, %112 ] + %120 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i32 %119, ptr %120, align 4 + %121 = load i8, ptr %1, align 1 + %122 = getelementptr inbounds nuw i8, ptr %0, i64 36 + %123 = load i8, ptr %122, align 4 + %124 = lshr i8 %121, 5 + %125 = and i8 %124, 4 + %126 = and i8 %123, -5 + %127 = or disjoint i8 %126, %125 + store i8 %127, ptr %122, align 4 + %128 = getelementptr inbounds nuw i8, ptr %4, i64 200 + %129 = load i32, ptr %128, align 8 + %130 = and i32 %129, 512 + %131 = icmp eq i32 %130, 0 + %132 = load i8, ptr %1, align 1 + br i1 %131, label %145, label %133 + +133: ; preds = %.loopexit + %134 = and i8 %132, 32 + %135 = icmp eq i8 %134, 0 + br i1 %135, label %138, label %136 + +136: ; preds = %133 + %137 = add i32 %119, 1 + store i32 %137, ptr %120, align 4 %.pre = load i8, ptr %1, align 1 - br label %136 - -136: ; preds = %134, %131 - %137 = phi i32 [ %135, %134 ], [ %117, %131 ] - %138 = phi i8 [ %.pre, %134 ], [ %130, %131 ] - %139 = and i8 %138, 16 - %140 = icmp eq i8 %139, 0 - br i1 %140, label %152, label %141 - -141: ; preds = %136 - %142 = add i32 %137, 1 - store i32 %142, ptr %118, align 4 - br label %152 - -143: ; preds = %.loopexit - %144 = lshr i8 %130, 2 - %145 = and i8 %144, 8 - %146 = and i8 %125, -9 - %147 = or disjoint i8 %145, %146 - store i8 %147, ptr %120, align 4 - %148 = load i8, ptr %1, align 1 - %149 = and i8 %148, 16 - %150 = and i8 %147, -17 - %151 = or disjoint i8 %149, %150 - store i8 %151, ptr %120, align 4 - br label %152 - -152: ; preds = %143, %141, %136 - %153 = phi i32 [ %117, %143 ], [ %142, %141 ], [ %137, %136 ] - %154 = icmp eq i32 %153, 1 - %155 = icmp eq i16 %43, 0 - %156 = select i1 %154, i1 %155, i1 false - %157 = icmp eq i16 %116, 0 - %or.cond = select i1 %156, i1 %157, i1 false - br i1 %or.cond, label %158, label %.thread1 - -158: ; preds = %152 - store i16 %114, ptr %23, align 4 - store i16 %115, ptr %52, align 2 + br label %138 + +138: ; preds = %136, %133 + %139 = phi i32 [ %137, %136 ], [ %119, %133 ] + %140 = phi i8 [ %.pre, %136 ], [ %132, %133 ] + %141 = and i8 %140, 16 + %142 = icmp eq i8 %141, 0 + br i1 %142, label %154, label %143 + +143: ; preds = %138 + %144 = add i32 %139, 1 + store i32 %144, ptr %120, align 4 + br label %154 + +145: ; preds = %.loopexit + %146 = lshr i8 %132, 2 + %147 = and i8 %146, 8 + %148 = and i8 %127, -9 + %149 = or disjoint i8 %147, %148 + store i8 %149, ptr %122, align 4 + %150 = load i8, ptr %1, align 1 + %151 = and i8 %150, 16 + %152 = and i8 %149, -17 + %153 = or disjoint i8 %151, %152 + store i8 %153, ptr %122, align 4 + br label %154 + +154: ; preds = %145, %143, %138 + %155 = phi i32 [ %119, %145 ], [ %144, %143 ], [ %139, %138 ] + %156 = icmp eq i32 %155, 1 + %157 = icmp eq i16 %43, 0 + %158 = select i1 %156, i1 %157, i1 false + %159 = icmp eq i16 %118, 0 + %or.cond = select i1 %158, i1 %159, i1 false + br i1 %or.cond, label %160, label %.thread1 + +160: ; preds = %154 + store i16 %116, ptr %23, align 4 + store i16 %117, ptr %52, align 2 store i16 0, ptr %57, align 4 store i16 0, ptr %73, align 2 br label %.thread1 -.thread1: ; preds = %16, %9, %158, %152 - %159 = phi i32 [ 0, %158 ], [ 0, %152 ], [ 1, %9 ], [ %spec.select, %16 ] - ret i32 %159 +.thread1: ; preds = %16, %9, %160, %154 + %161 = phi i32 [ 0, %160 ], [ 0, %154 ], [ 1, %9 ], [ %spec.select, %16 ] + ret i32 %161 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid diff --git a/bench/llvm/optimized/ExpandVectorPredication.cpp.ll b/bench/llvm/optimized/ExpandVectorPredication.cpp.ll index 6005246466f..1f4def026ad 100644 --- a/bench/llvm/optimized/ExpandVectorPredication.cpp.ll +++ b/bench/llvm/optimized/ExpandVectorPredication.cpp.ll @@ -849,14 +849,15 @@ _ZL13isAllTrueMaskPN4llvm5ValueE.exit.thread.i37.i.i: ; preds = %_ZL13isAllTrueM br i1 %315, label %_ZN4llvm5APInt10getAllOnesEj.exit.thread.i.i.i.i.i, label %_ZN4llvm5APInt10getAllOnesEj.exit.i.i.i.i.i _ZN4llvm5APInt10getAllOnesEj.exit.thread.i.i.i.i.i: ; preds = %312 - %316 = add nuw nsw i32 %295, 63 - %317 = and i32 %316, 63 - %318 = xor i32 %317, 63 - %319 = zext nneg i32 %318 to i64 - %320 = lshr i64 -1, %319 - %321 = icmp eq i32 %295, 0 - %spec.store.select.i.i.i.i.i.i.i.i = select i1 %321, i64 0, i64 %320 - %322 = zext nneg i32 %317 to i64 + %.not.i.i.i.i.i.i.i.i = sub nsw i32 0, %295 + %316 = and i32 %.not.i.i.i.i.i.i.i.i, 63 + %317 = zext nneg i32 %316 to i64 + %318 = lshr i64 -1, %317 + %319 = icmp eq i32 %295, 0 + %spec.store.select.i.i.i.i.i.i.i.i = select i1 %319, i64 0, i64 %318 + %320 = add nuw nsw i32 %295, 63 + %321 = and i32 %320, 63 + %322 = zext nneg i32 %321 to i64 %323 = shl nuw i64 1, %322 %324 = xor i64 %323, -1 br label %331 diff --git a/bench/llvm/optimized/RISCVSubtarget.cpp.ll b/bench/llvm/optimized/RISCVSubtarget.cpp.ll index 3ef3567b2ea..32a2548b415 100644 --- a/bench/llvm/optimized/RISCVSubtarget.cpp.ll +++ b/bench/llvm/optimized/RISCVSubtarget.cpp.ll @@ -5224,9 +5224,8 @@ define dso_local noundef range(i32 1, 9) i32 @_ZNK4llvm14RISCVSubtarget31getMaxL %.sroa.speculate.load.false.sroa.speculated = tail call i32 @llvm.umax.i32(i32 %2, i32 1) %.sroa.speculated = tail call i32 @llvm.umin.i32(i32 %.sroa.speculate.load.false.sroa.speculated, i32 8) %3 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %.sroa.speculated, i1 true) - %4 = xor i32 %3, 31 - %5 = shl nuw nsw i32 1, %4 - ret i32 %5 + %4 = lshr exact i32 -2147483648, %3 + ret i32 %4 } ; Function Attrs: mustprogress nounwind uwtable diff --git a/bench/llvm/optimized/RISCVTargetParser.cpp.ll b/bench/llvm/optimized/RISCVTargetParser.cpp.ll index d487a4d1336..8436b0c79e1 100644 --- a/bench/llvm/optimized/RISCVTargetParser.cpp.ll +++ b/bench/llvm/optimized/RISCVTargetParser.cpp.ll @@ -1105,7 +1105,7 @@ define dso_local noundef range(i32 0, -7) i32 @_ZN4llvm10RISCVVType15getSEWLMULR } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable -define dso_local range(i16 0, 272) i16 @_ZN4llvm10RISCVVType16getSameRatioLMULEjNS_7RISCVII5VLMULEj(i32 noundef %0, i8 noundef zeroext %1, i32 noundef %2) local_unnamed_addr #5 { +define dso_local range(i16 0, 512) i16 @_ZN4llvm10RISCVVType16getSameRatioLMULEjNS_7RISCVII5VLMULEj(i32 noundef %0, i8 noundef zeroext %1, i32 noundef %2) local_unnamed_addr #5 { %4 = zext i8 %1 to i32 %switch.i.i = icmp ugt i8 %1, 3 %5 = sub nsw i32 8, %4 @@ -1143,16 +1143,17 @@ define dso_local range(i16 0, 272) i16 @_ZN4llvm10RISCVVType16getSameRatioLMULEj 26: ; preds = %19 %27 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 range(i32 1, 536870912) %20, i1 true) - %28 = xor i32 %27, 31 - %29 = sub nuw nsw i32 8, %28 + %28 = sub nuw nsw i32 31, %27 + %29 = add nuw nsw i32 %27, 233 %30 = select i1 %14, i32 %28, i32 %29 %31 = trunc nuw nsw i32 %30 to i16 + %32 = and i16 %31, 255 br label %_ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread _ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread: ; preds = %19, %26 - %.sroa.0.0 = phi i16 [ %31, %26 ], [ 0, %19 ] + %.sroa.0.0 = phi i16 [ %32, %26 ], [ 0, %19 ] %.sroa.2.0 = phi i16 [ 256, %26 ], [ 0, %19 ] - %.sroa.0.0.insert.insert = or i16 %.sroa.2.0, %.sroa.0.0 + %.sroa.0.0.insert.insert = or disjoint i16 %.sroa.2.0, %.sroa.0.0 ret i16 %.sroa.0.0.insert.insert } diff --git a/bench/llvm/optimized/RewriteObjCFoundationAPI.cpp.ll b/bench/llvm/optimized/RewriteObjCFoundationAPI.cpp.ll index cce632bee23..878ef348a18 100644 --- a/bench/llvm/optimized/RewriteObjCFoundationAPI.cpp.ll +++ b/bench/llvm/optimized/RewriteObjCFoundationAPI.cpp.ll @@ -2766,15 +2766,14 @@ define linkonce_odr hidden void @_ZNK5clang12APIntStorage8getValueEv(ptr dead_on %13 = load i64, ptr %1, align 8, !noalias !11 %14 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %4, ptr %14, align 8, !alias.scope !11 - %15 = add nuw nsw i32 %4, 63 - %16 = and i32 %15, 63 - %17 = xor i32 %16, 63 - %18 = zext nneg i32 %17 to i64 - %19 = lshr i64 -1, %18 - %20 = icmp eq i32 %4, 0 - %spec.store.select.i.i.i = select i1 %20, i64 0, i64 %19 - %21 = and i64 %13, %spec.store.select.i.i.i - store i64 %21, ptr %0, align 8, !alias.scope !11 + %.not.i.i.i = sub nsw i32 0, %4 + %15 = and i32 %.not.i.i.i, 63 + %16 = zext nneg i32 %15 to i64 + %17 = lshr i64 -1, %16 + %18 = icmp eq i32 %4, 0 + %spec.store.select.i.i.i = select i1 %18, i64 0, i64 %17 + %19 = and i64 %13, %spec.store.select.i.i.i + store i64 %19, ptr %0, align 8, !alias.scope !11 br label %_ZNK5clang16APNumericStorage11getIntValueEv.exit _ZNK5clang16APNumericStorage11getIntValueEv.exit: ; preds = %6, %12 diff --git a/bench/llvm/optimized/ScaledNumber.cpp.ll b/bench/llvm/optimized/ScaledNumber.cpp.ll index 7e7d2d90744..8bd0dc54e5b 100644 --- a/bench/llvm/optimized/ScaledNumber.cpp.ll +++ b/bench/llvm/optimized/ScaledNumber.cpp.ll @@ -85,23 +85,22 @@ define dso_local { i64, i16 } @_ZN4llvm13ScaledNumbers10multiply64Emm(i64 nounde %33 = or i64 %32, %30 %.0 = select i1 %.not29, i64 %25, i64 %33 %34 = trunc nuw nsw i32 %29 to i16 - %35 = xor i64 %27, 63 - %36 = shl nuw i64 1, %35 - %37 = and i64 %36, %19 - %.not48 = icmp eq i64 %37, 0 - br i1 %.not48, label %_ZN4llvm13ScaledNumbers10getRoundedImEESt4pairIT_sES3_sb.exit, label %38 - -38: ; preds = %26 - %39 = add i64 %.0, 1 - %.not.i = icmp eq i64 %39, 0 - %spec.select.i = select i1 %.not.i, i64 -9223372036854775808, i64 %39 - %40 = zext i1 %.not.i to i16 - %spec.select13.i = add nuw nsw i16 %40, %34 + %35 = lshr exact i64 -9223372036854775808, %27 + %36 = and i64 %35, %19 + %.not48 = icmp eq i64 %36, 0 + br i1 %.not48, label %_ZN4llvm13ScaledNumbers10getRoundedImEESt4pairIT_sES3_sb.exit, label %37 + +37: ; preds = %26 + %38 = add i64 %.0, 1 + %.not.i = icmp eq i64 %38, 0 + %spec.select.i = select i1 %.not.i, i64 -9223372036854775808, i64 %38 + %39 = zext i1 %.not.i to i16 + %spec.select13.i = add nuw nsw i16 %39, %34 br label %_ZN4llvm13ScaledNumbers10getRoundedImEESt4pairIT_sES3_sb.exit -_ZN4llvm13ScaledNumbers10getRoundedImEESt4pairIT_sES3_sb.exit: ; preds = %38, %26, %2 - %.sroa.037.0 = phi i64 [ %19, %2 ], [ %.0, %26 ], [ %spec.select.i, %38 ] - %.sroa.338.0 = phi i16 [ 0, %2 ], [ %34, %26 ], [ %spec.select13.i, %38 ] +_ZN4llvm13ScaledNumbers10getRoundedImEESt4pairIT_sES3_sb.exit: ; preds = %37, %26, %2 + %.sroa.037.0 = phi i64 [ %19, %2 ], [ %.0, %26 ], [ %spec.select.i, %37 ] + %.sroa.338.0 = phi i16 [ 0, %2 ], [ %34, %26 ], [ %spec.select13.i, %37 ] %.fca.0.insert = insertvalue { i64, i16 } poison, i64 %.sroa.037.0, 0 %.fca.1.insert = insertvalue { i64, i16 } %.fca.0.insert, i16 %.sroa.338.0, 1 ret { i64, i16 } %.fca.1.insert diff --git a/bench/llvm/optimized/ThreadSanitizer.cpp.ll b/bench/llvm/optimized/ThreadSanitizer.cpp.ll index 6651940c747..389a6ec1717 100644 --- a/bench/llvm/optimized/ThreadSanitizer.cpp.ll +++ b/bench/llvm/optimized/ThreadSanitizer.cpp.ll @@ -949,11 +949,12 @@ _ZL14isVtableAccessPN4llvm11InstructionE.exit71.i.i: ; preds = %_ZNK4llvm11Instr 320: ; preds = %.thread104.i.i, %315, %.thread.i.i, %290 %321 = phi i1 [ %300, %290 ], [ %300, %315 ], [ %312, %.thread104.i.i ], [ %312, %.thread.i.i ] - %storemerge102.in.in.in.i.i = phi i16 [ %293, %290 ], [ %293, %315 ], [ %305, %.thread104.i.i ], [ %305, %.thread.i.i ] + %.pn.in.in.in.in.i.i = phi i16 [ %293, %290 ], [ %293, %315 ], [ %305, %.thread104.i.i ], [ %305, %.thread.i.i ] %322 = phi i1 [ false, %290 ], [ %317, %315 ], [ %319, %.thread104.i.i ], [ false, %.thread.i.i ] - %storemerge102.in.in.i.i = trunc i16 %storemerge102.in.in.in.i.i to i8 - %storemerge102.in.i.i = lshr i8 %storemerge102.in.in.i.i, 1 - %storemerge102.i.i = and i8 %storemerge102.in.i.i, 63 + %.pn.in.in.in.i.i = trunc i16 %.pn.in.in.in.in.i.i to i8 + %.pn.in.in.i.i = lshr i8 %.pn.in.in.in.i.i, 1 + %.pn.in.i.i = and i8 %.pn.in.in.i.i, 63 + %.pn.i.i = xor i8 %.pn.in.i.i, 63 %323 = call { i64, i8 } @_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE(ptr noundef nonnull align 8 dereferenceable(512) %104, ptr noundef nonnull %.0.i.i112.i) %.fca.0.extract.i.i.i = extractvalue { i64, i8 } %323, 0 %.fca.1.extract.i.i.i = extractvalue { i64, i8 } %323, 1 @@ -963,10 +964,11 @@ _ZL14isVtableAccessPN4llvm11InstructionE.exit71.i.i: ; preds = %_ZNK4llvm11Instr store i64 %325, ptr %52, align 8 store i8 %326, ptr %.sroa.23.0..sroa_idx.i.i, align 8 %327 = call noundef i64 @_ZNK4llvm8TypeSizecvmEv(ptr noundef nonnull align 8 dereferenceable(9) %52) #17 - %328 = icmp samesign ugt i8 %storemerge102.i.i, 2 + %328 = icmp samesign ult i8 %.pn.i.i, 61 br i1 %328, label %336, label %329 329: ; preds = %320 + %storemerge102.i.i = sub nuw nsw i8 63, %.pn.i.i %330 = zext nneg i8 %storemerge102.i.i to i64 %331 = shl nuw nsw i64 1, %330 %.lhs.trunc.i.i = trunc nuw i64 %331 to i32 diff --git a/bench/llvm/optimized/Type.cpp.ll b/bench/llvm/optimized/Type.cpp.ll index 7426f74e0a0..fbcba6ed0ce 100644 --- a/bench/llvm/optimized/Type.cpp.ll +++ b/bench/llvm/optimized/Type.cpp.ll @@ -1747,24 +1747,23 @@ define dso_local void @_ZNK4llvm11IntegerType7getMaskEv(ptr dead_on_unwind noali %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %5, ptr %6, align 8, !alias.scope !19 %7 = icmp ult i32 %4, 16640 - br i1 %7, label %8, label %15 + br i1 %7, label %8, label %13 8: ; preds = %2 - %9 = add nuw nsw i32 %5, 63 - %10 = and i32 %9, 63 - %11 = xor i32 %10, 63 - %12 = zext nneg i32 %11 to i64 - %13 = lshr i64 -1, %12 - %14 = icmp samesign ult i32 %4, 256 - %spec.store.select.i.i.i = select i1 %14, i64 0, i64 %13 + %.not.i.i.i = sub nsw i32 0, %5 + %9 = and i32 %.not.i.i.i, 63 + %10 = zext nneg i32 %9 to i64 + %11 = lshr i64 -1, %10 + %12 = icmp samesign ult i32 %4, 256 + %spec.store.select.i.i.i = select i1 %12, i64 0, i64 %11 store i64 %spec.store.select.i.i.i, ptr %0, align 8, !alias.scope !19 br label %_ZN4llvm5APInt10getAllOnesEj.exit -15: ; preds = %2 +13: ; preds = %2 tail call void @_ZN4llvm5APInt12initSlowCaseEmb(ptr noundef nonnull align 8 dereferenceable(12) %0, i64 noundef -1, i1 noundef zeroext true) #21 br label %_ZN4llvm5APInt10getAllOnesEj.exit -_ZN4llvm5APInt10getAllOnesEj.exit: ; preds = %8, %15 +_ZN4llvm5APInt10getAllOnesEj.exit: ; preds = %8, %13 ret void } diff --git a/bench/lodepng/optimized/lodepng.cpp.ll b/bench/lodepng/optimized/lodepng.cpp.ll index 7ab6c1b29dd..a9b8804ada0 100644 --- a/bench/lodepng/optimized/lodepng.cpp.ll +++ b/bench/lodepng/optimized/lodepng.cpp.ll @@ -18942,7 +18942,7 @@ if.then: ; preds = %entry %sub.ptr.sub.i9 = sub i64 %sub.ptr.lhs.cast.i8, %sub.ptr.lhs.cast.i %cmp4.i = icmp sgt i64 %sub.ptr.sub.i, -1 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.sub.i, 9223372036854775807 + %sub.i = sub nuw nsw i64 9223372036854775807, %sub.ptr.sub.i %cmp6.i = icmp ule i64 %sub.ptr.sub.i9, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.sub.i9, %sub @@ -18966,7 +18966,7 @@ _ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i: ; preds = %if.th br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp slt i64 %__new_size, 0 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIhSaIhEE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -19007,7 +19007,7 @@ if.then.i32.i: ; preds = %_ZNSt6vectorIhSaIhE _ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit33.i: ; preds = %if.then.i32.i, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr36.i = getelementptr inbounds i8, ptr %call5.i.i.i.i, i64 %__new_size + %add.ptr36.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i, i64 %__new_size store ptr %add.ptr36.i, ptr %_M_finish.i, align 8 %add.ptr39.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i, i64 %3 store ptr %add.ptr39.i, ptr %_M_end_of_storage.i, align 8 @@ -23406,7 +23406,7 @@ for.body71: ; preds = %for.cond68.preheade %arrayidx75 = getelementptr inbounds nuw i8, ptr %7, i64 %conv6954 %10 = load i8, ptr %arrayidx75, align 1 %conv76 = zext i8 %10 to i32 - %sub80 = xor i32 %conv76, 255 + %sub80 = sub nuw nsw i32 255, %conv76 %cmp77189 = icmp slt i8 %10, 0 %cond = select i1 %cmp77189, i32 %sub80, i32 %conv76 %conv81 = zext nneg i32 %cond to i64 diff --git a/bench/luajit/optimized/lj_ccallback.ll b/bench/luajit/optimized/lj_ccallback.ll index 0ad37e9e0c3..c5cba3a6e89 100644 --- a/bench/luajit/optimized/lj_ccallback.ll +++ b/bench/luajit/optimized/lj_ccallback.ll @@ -712,8 +712,7 @@ if.then.i.i.i: ; preds = %for.body.i.i.i if.else.i.i.i: ; preds = %for.body.i.i.i %and.tr.i.i.i = trunc nuw nsw i32 %and.i.i.i to i8 %24 = shl nuw nsw i8 %and.tr.i.i.i, 2 - %25 = xor i8 %24, 124 - %conv21.i.i.i = add nsw i8 %25, -2 + %conv21.i.i.i = sub nuw nsw i8 122, %24 %incdec.ptr22.i.i.i = getelementptr inbounds nuw i8, ptr %p.026.i.i.i, i64 4 br label %for.inc.i.i.i @@ -722,8 +721,8 @@ for.inc.i.i.i: ; preds = %if.else.i.i.i, %if. %conv21.sink.i.i.i = phi i8 [ -76, %if.then.i.i.i ], [ %conv21.i.i.i, %if.else.i.i.i ] %p.1.i.i.i = phi ptr [ %add.ptr15.i.i.i, %if.then.i.i.i ], [ %incdec.ptr22.i.i.i, %if.else.i.i.i ] store i8 %.sink.i.i.i, ptr %incdec.ptr1.i.i.i, align 1 - %26 = getelementptr inbounds nuw i8, ptr %p.026.i.i.i, i64 3 - store i8 %conv21.sink.i.i.i, ptr %26, align 1 + %25 = getelementptr inbounds nuw i8, ptr %p.026.i.i.i, i64 3 + store i8 %conv21.sink.i.i.i, ptr %25, align 1 %inc.i.i.i = add nuw nsw i32 %slot.027.i.i.i, 1 %exitcond.not.i.i.i = icmp eq i32 %inc.i.i.i, 896 br i1 %exitcond.not.i.i.i, label %callback_mcode_new.exit.i, label %for.body.i.i.i, !llvm.loop !11 @@ -736,26 +735,26 @@ callback_mcode_new.exit.i: ; preds = %for.inc.i.i.i if.end17.i: ; preds = %callback_mcode_new.exit.i, %if.end13.i %L18.i = getelementptr inbounds nuw i8, ptr %cts, i64 16 - %27 = load ptr, ptr %L18.i, align 8 - %call.i = tail call ptr @lj_mem_grow(ptr noundef %27, ptr noundef %14, ptr noundef nonnull %sizeid.i, i32 noundef 896, i32 noundef 2) #7 + %26 = load ptr, ptr %L18.i, align 8 + %call.i = tail call ptr @lj_mem_grow(ptr noundef %26, ptr noundef %14, ptr noundef nonnull %sizeid.i, i32 noundef 896, i32 noundef 2) #7 store ptr %call.i, ptr %cbid1.i, align 8 %idx.ext.i = zext nneg i32 %top.0.lcssa.i to i64 %add.ptr.i = getelementptr inbounds nuw i16, ptr %call.i, i64 %idx.ext.i - %28 = load i32, ptr %sizeid.i, align 8 - %sub.i = sub i32 %28, %top.0.lcssa.i + %27 = load i32, ptr %sizeid.i, align 8 + %sub.i = sub i32 %27, %top.0.lcssa.i %conv25.i = zext i32 %sub.i to i64 %mul.i = shl nuw nsw i64 %conv25.i, 1 tail call void @llvm.memset.p0.i64(ptr align 2 %add.ptr.i, i8 0, i64 %mul.i, i1 false) br label %callback_slot_new.exit found.loopexit.i: ; preds = %for.body.i - %29 = trunc nuw i64 %indvars.iv.i to i32 + %28 = trunc nuw i64 %indvars.iv.i to i32 %.pre.i = and i64 %indvars.iv.i, 4294967295 br label %callback_slot_new.exit callback_slot_new.exit: ; preds = %if.end17.i, %found.loopexit.i %idxprom27.pre-phi.i = phi i64 [ %.pre.i, %found.loopexit.i ], [ %idx.ext.i, %if.end17.i ] - %top.026.i = phi i32 [ %29, %found.loopexit.i ], [ %top.0.lcssa.i, %if.end17.i ] + %top.026.i = phi i32 [ %28, %found.loopexit.i ], [ %top.0.lcssa.i, %if.end17.i ] %cbid.0.i = phi ptr [ %14, %found.loopexit.i ], [ %call.i, %if.end17.i ] %conv26.i = trunc i32 %3 to i16 %arrayidx28.i = getelementptr inbounds nuw i16, ptr %cbid.0.i, i64 %idxprom27.pre-phi.i @@ -763,55 +762,55 @@ callback_slot_new.exit: ; preds = %if.end17.i, %found. %add.i = add i32 %top.026.i, 1 store i32 %add.i, ptr %topid.i, align 4 %miscmap = getelementptr inbounds nuw i8, ptr %cts, i64 40 - %30 = load ptr, ptr %miscmap, align 8 + %29 = load ptr, ptr %miscmap, align 8 %L = getelementptr inbounds nuw i8, ptr %cts, i64 16 - %asize = getelementptr inbounds nuw i8, ptr %30, i64 48 - %31 = load i32, ptr %asize, align 8 - %cmp = icmp ult i32 %top.026.i, %31 + %asize = getelementptr inbounds nuw i8, ptr %29, i64 48 + %30 = load i32, ptr %asize, align 8 + %cmp = icmp ult i32 %top.026.i, %30 br i1 %cmp, label %cond.true, label %cond.false cond.true: ; preds = %callback_slot_new.exit - %array = getelementptr inbounds nuw i8, ptr %30, i64 16 - %32 = load i64, ptr %array, align 8 - %33 = inttoptr i64 %32 to ptr + %array = getelementptr inbounds nuw i8, ptr %29, i64 16 + %31 = load i64, ptr %array, align 8 + %32 = inttoptr i64 %31 to ptr %idxprom = sext i32 %top.026.i to i64 - %arrayidx = getelementptr inbounds %union.TValue, ptr %33, i64 %idxprom + %arrayidx = getelementptr inbounds %union.TValue, ptr %32, i64 %idxprom br label %cond.end cond.false: ; preds = %callback_slot_new.exit - %34 = load ptr, ptr %L, align 8 - %call3 = tail call ptr @lj_tab_setinth(ptr noundef %34, ptr noundef nonnull %30, i32 noundef %top.026.i) #7 + %33 = load ptr, ptr %L, align 8 + %call3 = tail call ptr @lj_tab_setinth(ptr noundef %33, ptr noundef nonnull %29, i32 noundef %top.026.i) #7 br label %cond.end cond.end: ; preds = %cond.false, %cond.true %cond = phi ptr [ %arrayidx, %cond.true ], [ %call3, %cond.false ] - %35 = ptrtoint ptr %fn to i64 - %or.i = or i64 %35, -1266637395197952 + %34 = ptrtoint ptr %fn to i64 + %or.i = or i64 %34, -1266637395197952 store i64 %or.i, ptr %cond, align 8 - %marked = getelementptr inbounds nuw i8, ptr %30, i64 8 - %36 = load i8, ptr %marked, align 8 - %37 = and i8 %36, 4 - %tobool4.not = icmp eq i8 %37, 0 + %marked = getelementptr inbounds nuw i8, ptr %29, i64 8 + %35 = load i8, ptr %marked, align 8 + %36 = and i8 %35, 4 + %tobool4.not = icmp eq i8 %36, 0 br i1 %tobool4.not, label %if.end, label %if.then8 if.then8: ; preds = %cond.end - %38 = load ptr, ptr %L, align 8 - %glref = getelementptr inbounds nuw i8, ptr %38, i64 16 - %39 = load i64, ptr %glref, align 8 - %40 = inttoptr i64 %39 to ptr - %and.i = and i8 %36, -5 + %37 = load ptr, ptr %L, align 8 + %glref = getelementptr inbounds nuw i8, ptr %37, i64 16 + %38 = load i64, ptr %glref, align 8 + %39 = inttoptr i64 %38 to ptr + %and.i = and i8 %35, -5 store i8 %and.i, ptr %marked, align 8 - %grayagain.i = getelementptr inbounds nuw i8, ptr %40, i64 64 - %41 = load i64, ptr %grayagain.i, align 8 - %gclist.i = getelementptr inbounds nuw i8, ptr %30, i64 24 - store i64 %41, ptr %gclist.i, align 8 - %42 = ptrtoint ptr %30 to i64 - store i64 %42, ptr %grayagain.i, align 8 + %grayagain.i = getelementptr inbounds nuw i8, ptr %39, i64 64 + %40 = load i64, ptr %grayagain.i, align 8 + %gclist.i = getelementptr inbounds nuw i8, ptr %29, i64 24 + store i64 %40, ptr %gclist.i, align 8 + %41 = ptrtoint ptr %29 to i64 + store i64 %41, ptr %grayagain.i, align 8 br label %if.end if.end: ; preds = %if.then8, %cond.end - %43 = getelementptr i8, ptr %cts, i64 184 - %cts.val = load ptr, ptr %43, align 8 + %42 = getelementptr i8, ptr %cts, i64 184 + %cts.val = load ptr, ptr %42, align 8 %div2.i = lshr i32 %top.026.i, 5 %mul.i22 = mul nuw i32 %div2.i, 17 %mul1.i = shl i32 %top.026.i, 2 diff --git a/bench/luajit/optimized/lj_snap.ll b/bench/luajit/optimized/lj_snap.ll index a592bf13a79..65bbfa80eed 100644 --- a/bench/luajit/optimized/lj_snap.ll +++ b/bench/luajit/optimized/lj_snap.ll @@ -2672,37 +2672,37 @@ sw.bb: ; preds = %entry %1 = load i8, ptr %t, align 4 %2 = and i8 %1, 31 %and = zext nneg i8 %2 to i32 - %3 = mul nuw nsw i32 %and, 16777217 - %add = xor i32 %3, 32767 + %reass.sub = mul nuw nsw i32 %and, 16777215 + %add = add nuw nsw i32 %reass.sub, 32767 br label %return sw.bb6: ; preds = %entry - %4 = load i32, ptr %ir, align 8 - %call = tail call i32 @lj_ir_kint(ptr noundef %J, i32 noundef %4) #10 + %3 = load i32, ptr %ir, align 8 + %call = tail call i32 @lj_ir_kint(ptr noundef %J, i32 noundef %3) #10 br label %return sw.bb7: ; preds = %entry %arrayidx = getelementptr inbounds nuw i8, ptr %ir, i64 8 - %5 = load i64, ptr %arrayidx, align 8 - %6 = inttoptr i64 %5 to ptr + %4 = load i64, ptr %arrayidx, align 8 + %5 = inttoptr i64 %4 to ptr %t8 = getelementptr inbounds nuw i8, ptr %ir, i64 4 - %7 = load i8, ptr %t8, align 4 - %conv10 = zext i8 %7 to i32 - %call11 = tail call i32 @lj_ir_kgc(ptr noundef %J, ptr noundef %6, i32 noundef %conv10) #10 + %6 = load i8, ptr %t8, align 4 + %conv10 = zext i8 %6 to i32 + %call11 = tail call i32 @lj_ir_kgc(ptr noundef %J, ptr noundef %5, i32 noundef %conv10) #10 br label %return sw.bb12: ; preds = %entry, %entry %conv14 = zext nneg i8 %0 to i32 %arrayidx15 = getelementptr inbounds nuw i8, ptr %ir, i64 8 - %8 = load i64, ptr %arrayidx15, align 8 - %call16 = tail call i32 @lj_ir_k64(ptr noundef %J, i32 noundef %conv14, i64 noundef %8) #10 + %7 = load i64, ptr %arrayidx15, align 8 + %call16 = tail call i32 @lj_ir_k64(ptr noundef %J, i32 noundef %conv14, i64 noundef %7) #10 br label %return sw.bb17: ; preds = %entry %arrayidx18 = getelementptr inbounds nuw i8, ptr %ir, i64 8 - %9 = load i64, ptr %arrayidx18, align 8 - %10 = inttoptr i64 %9 to ptr - %call19 = tail call i32 @lj_ir_kptr_(ptr noundef %J, i32 noundef 25, ptr noundef %10) #10 + %8 = load i64, ptr %arrayidx18, align 8 + %9 = inttoptr i64 %8 to ptr + %call19 = tail call i32 @lj_ir_kptr_(ptr noundef %J, i32 noundef 25, ptr noundef %9) #10 br label %return return: ; preds = %entry, %sw.bb17, %sw.bb12, %sw.bb7, %sw.bb6, %sw.bb diff --git a/bench/meilisearch-rs/optimized/58fku9bygcs6t7yq.ll b/bench/meilisearch-rs/optimized/58fku9bygcs6t7yq.ll index 099f6233234..fa7871424eb 100644 --- a/bench/meilisearch-rs/optimized/58fku9bygcs6t7yq.ll +++ b/bench/meilisearch-rs/optimized/58fku9bygcs6t7yq.ll @@ -223,8 +223,8 @@ define hidden void @"_ZN129_$LT$digest..core_api..ct_variable..CtVariableCoreWra call void @_ZN4core9panicking16panic_in_cleanup17hd62aa59d1fda1c9fE() #32, !noalias !4 unreachable -common.resume: ; preds = %39, %16 - %common.resume.op = phi { ptr, i32 } [ %17, %16 ], [ %40, %39 ] +common.resume: ; preds = %38, %16 + %common.resume.op = phi { ptr, i32 } [ %17, %16 ], [ %39, %38 ] resume { ptr, i32 } %common.resume.op "_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h701298547253b4a9E.exit": ; preds = %3 @@ -255,15 +255,14 @@ common.resume: ; preds = %39, %16 "_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9905fe69a7aacca1E.exit.thread.i": ; preds = %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h701298547253b4a9E.exit" %scevgep.i = getelementptr i8, ptr %30, i64 1 - %32 = xor i64 %22, 63 + %32 = sub nuw nsw i64 63, %22 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i, i8 0, i64 %32, i1 false), !alias.scope !10, !noalias !24 - %33 = xor i64 %22, 56 - %34 = icmp samesign ult i64 %33, 8 - br i1 %34, label %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9905fe69a7aacca1E.exit.thread.thread.i", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit.i" + %33 = icmp samesign ugt i8 %21, 55 + br i1 %33, label %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9905fe69a7aacca1E.exit.thread.thread.i", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit.i": ; preds = %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9905fe69a7aacca1E.exit.thread.i" - %35 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %29, ptr %35, align 1, !alias.scope !25, !noalias !29 + %34 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %29, ptr %34, align 1, !alias.scope !25, !noalias !29 call void @_ZN4sha26sha25611compress25617hf161fad7d25975d1E(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1), !noalias !12 br label %_ZN4core4iter6traits8iterator8Iterator3zip17hd8c38152741f4af7E.exit.i @@ -272,27 +271,27 @@ common.resume: ; preds = %39, %16 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !31 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4), !noalias !32 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !33 - %36 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %36, align 8, !noalias !33 + %35 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %35, align 8, !noalias !33 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !33 - store ptr %36, ptr %6, align 8, !noalias !33 + store ptr %35, ptr %6, align 8, !noalias !33 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !33 store ptr %4, ptr %5, align 8, !noalias !33 - %37 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %37, align 8, !noalias !33 - %38 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %38, align 8, !noalias !33 - invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h99752a439f8480a1E.llvm.3664009631495176724"(ptr noundef nonnull %7, ptr noundef nonnull %36, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5) - to label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit8.i" unwind label %39, !noalias !36 - -39: ; preds = %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9905fe69a7aacca1E.exit.thread.thread.i" - %40 = landingpad { ptr, i32 } + %36 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %36, align 8, !noalias !33 + %37 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %37, align 8, !noalias !33 + invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h99752a439f8480a1E.llvm.3664009631495176724"(ptr noundef nonnull %7, ptr noundef nonnull %35, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5) + to label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit8.i" unwind label %38, !noalias !36 + +38: ; preds = %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h9905fe69a7aacca1E.exit.thread.thread.i" + %39 = landingpad { ptr, i32 } cleanup invoke void @"_ZN82_$LT$generic_array..ArrayBuilder$LT$T$C$N$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h98a837e43790e369E.llvm.16429374078602074278"(ptr noalias noundef nonnull align 8 dereferenceable(72) %7) - to label %common.resume unwind label %41, !noalias !36 + to label %common.resume unwind label %40, !noalias !36 -41: ; preds = %39 - %42 = landingpad { ptr, i32 } +40: ; preds = %38 + %41 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hd62aa59d1fda1c9fE() #32, !noalias !36 unreachable @@ -303,8 +302,8 @@ common.resume: ; preds = %39, %16 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !37 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !33 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4), !noalias !32 - %43 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %29, ptr %43, align 1, !alias.scope !38, !noalias !42 + %42 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %29, ptr %42, align 1, !alias.scope !38, !noalias !42 call void @_ZN4sha26sha25611compress25617hf161fad7d25975d1E(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1), !noalias !12 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !31 br label %_ZN4core4iter6traits8iterator8Iterator3zip17hd8c38152741f4af7E.exit.i @@ -314,15 +313,15 @@ _ZN4core4iter6traits8iterator8Iterator3zip17hd8c38152741f4af7E.exit.i: ; preds = br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i", %_ZN4core4iter6traits8iterator8Iterator3zip17hd8c38152741f4af7E.exit.i - %.sroa.12.040.i = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17hd8c38152741f4af7E.exit.i ], [ %44, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i" ] - %44 = add nuw nsw i64 %.sroa.12.040.i, 1 - %45 = shl nuw nsw i64 %.sroa.12.040.i, 2 - %46 = getelementptr inbounds nuw i8, ptr %12, i64 %45 - %47 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.040.i - %48 = load i32, ptr %47, align 4, !alias.scope !7, !noalias !16, !noundef !15 - %49 = call i32 @llvm.bswap.i32(i32 %48) - store i32 %49, ptr %46, align 1, !alias.scope !44, !noalias !48 - %exitcond.not.i = icmp eq i64 %44, 8 + %.sroa.12.040.i = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17hd8c38152741f4af7E.exit.i ], [ %43, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i" ] + %43 = add nuw nsw i64 %.sroa.12.040.i, 1 + %44 = shl nuw nsw i64 %.sroa.12.040.i, 2 + %45 = getelementptr inbounds nuw i8, ptr %12, i64 %44 + %46 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.040.i + %47 = load i32, ptr %46, align 4, !alias.scope !7, !noalias !16, !noundef !15 + %48 = call i32 @llvm.bswap.i32(i32 %47) + store i32 %48, ptr %45, align 1, !alias.scope !44, !noalias !48 + %exitcond.not.i = icmp eq i64 %43, 8 br i1 %exitcond.not.i, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17ha33db307e64c0f6aE.exit12.i" diff --git a/bench/mimalloc/optimized/segment-map.c.ll b/bench/mimalloc/optimized/segment-map.c.ll index f1a00ab9b3c..e3fff29d68f 100644 --- a/bench/mimalloc/optimized/segment-map.c.ll +++ b/bench/mimalloc/optimized/segment-map.c.ll @@ -127,28 +127,28 @@ if.end32.i.i: ; preds = %do.end.i.i, %if.end %.lcssa.sink.i.i = phi i64 [ %and11.i.i, %if.end9.i.i ], [ %4, %do.end.i.i ] %loindex.0.i.i = phi i64 [ %retval.0.i.i.i, %if.end9.i.i ], [ %dec.i.i, %do.end.i.i ] %6 = tail call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 range(i64 1, 0) %.lcssa.sink.i.i, i1 true) - %lobitidx.0.i.i = xor i64 %6, 63 - %sub33.neg.i.i = sub i64 %loindex.0.i.i, %retval.0.i.i.i - %add.neg.i.i = sub nsw i64 %lobitidx.0.i.i, %rem.sink.i.i.i - %7 = shl i64 %sub33.neg.i.i, 31 - %8 = shl nsw i64 %add.neg.i.i, 25 - %9 = getelementptr i8, ptr %1, i64 %7 - %add.ptr.i.i = getelementptr i8, ptr %9, i64 %8 + %sub33.i.neg.i = sub i64 %loindex.0.i.i, %retval.0.i.i.i + %add.i.i = add nuw nsw i64 %6, %rem.sink.i.i.i + %.neg.i = shl i64 %sub33.i.neg.i, 31 + %7 = shl nuw nsw i64 %add.i.i, 25 + %reass.sub.i = sub i64 %.neg.i, %7 + %8 = getelementptr i8, ptr %1, i64 %reass.sub.i + %add.ptr.i.i = getelementptr i8, ptr %8, i64 2113929216 %cmp36.i.i = icmp eq i64 %and.i.i.i, 0 br i1 %cmp36.i.i, label %lor.rhs.i, label %if.end39.i.i if.end39.i.i: ; preds = %if.end32.i.i - %10 = ptrtoint ptr %add.ptr.i.i to i64 - %11 = load i64, ptr getelementptr inbounds nuw (i8, ptr @_mi_heap_main, i64 2864), align 8 - %xor.i.i.i = xor i64 %11, %10 - %cookie.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i, i64 216 - %12 = load i64, ptr %cookie.i.i, align 8 - %cmp41.not.i.i = icmp eq i64 %xor.i.i.i, %12 + %9 = ptrtoint ptr %add.ptr.i.i to i64 + %10 = load i64, ptr getelementptr inbounds nuw (i8, ptr @_mi_heap_main, i64 2864), align 8 + %xor.i.i.i = xor i64 %10, %9 + %cookie.i.i = getelementptr i8, ptr %8, i64 2113929432 + %11 = load i64, ptr %cookie.i.i, align 8 + %cmp41.not.i.i = icmp eq i64 %xor.i.i.i, %11 br i1 %cmp41.not.i.i, label %if.end53.i.i, label %lor.rhs.i if.end53.i.i: ; preds = %if.end39.i.i - %13 = getelementptr i8, ptr %add.ptr.i.i, i64 224 - %add.ptr.val.i.i = load i64, ptr %13, align 32 + %12 = getelementptr i8, ptr %8, i64 2113929440 + %add.ptr.val.i.i = load i64, ptr %12, align 32 %mul.i.i.i = shl i64 %add.ptr.val.i.i, 16 %add.ptr55.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i, i64 %mul.i.i.i %cmp56.not.i.i = icmp ugt ptr %add.ptr55.i.i, %p @@ -163,8 +163,8 @@ lor.rhs.i: ; preds = %_mi_segment_of.exit br label %mi_is_valid_pointer.exit mi_is_valid_pointer.exit: ; preds = %if.end53.i.i, %_mi_segment_of.exit.i, %lor.rhs.i - %14 = phi i1 [ true, %_mi_segment_of.exit.i ], [ %call1.i, %lor.rhs.i ], [ true, %if.end53.i.i ] - ret i1 %14 + %13 = phi i1 [ true, %_mi_segment_of.exit.i ], [ %call1.i, %lor.rhs.i ], [ true, %if.end53.i.i ] + ret i1 %13 } declare zeroext i1 @_mi_arena_contains(ptr noundef) local_unnamed_addr #2 diff --git a/bench/miniaudio/optimized/unity.c.ll b/bench/miniaudio/optimized/unity.c.ll index 845c73916e8..d6b80fb183d 100644 --- a/bench/miniaudio/optimized/unity.c.ll +++ b/bench/miniaudio/optimized/unity.c.ll @@ -103892,7 +103892,7 @@ if.end.i191.i: ; preds = %ma_dr_mp3_bs_get_bi %p.0.i214.i = getelementptr inbounds nuw i8, ptr %add.ptr.i194.i, i64 1 %118 = load i8, ptr %p.0.i214.i, align 1 %conv10.i218.i = zext i8 %118 to i32 - %sub11.i205.i = xor i32 %and.i195.i, 7 + %sub11.i205.i = sub nuw nsw i32 7, %and.i195.i %shr12.i206.i = lshr i32 %conv10.i218.i, %sub11.i205.i %or13.i207.i = or i32 %shr12.i206.i, %shl8.i216.i %conv38.i = trunc nuw i32 %or13.i207.i to i16 @@ -103999,7 +103999,7 @@ if.end.i293.i: ; preds = %ma_dr_mp3_bs_get_bi %conv.i299.i = zext i8 %128 to i32 %shr4.i300.i = lshr i32 255, %and.i297.i %and5.i301.i = and i32 %shr4.i300.i, %conv.i299.i - %sub11.i307.i = xor i32 %and.i297.i, 7 + %sub11.i307.i = sub nuw nsw i32 7, %and.i297.i %shr12.i308.i = lshr i32 %and5.i301.i, %sub11.i307.i %tobool56.not.i = icmp eq i32 %shr12.i308.i, 0 br i1 %tobool56.not.i, label %if.else114.i, label %if.then57.i @@ -104061,7 +104061,7 @@ ma_dr_mp3_bs_get_bits.exit390.i: ; preds = %if.end63.i %conv.i367.i = zext i8 %131 to i32 %shr4.i368.i = lshr i32 255, %and.i365.i %and5.i369.i = and i32 %shr4.i368.i, %conv.i367.i - %sub11.i375.i = xor i32 %and.i365.i, 7 + %sub11.i375.i = sub nuw nsw i32 7, %and.i365.i %shr12.i376.i = lshr i32 %and5.i369.i, %sub11.i375.i %132 = trunc nuw i32 %shr12.i376.i to i8 %mixed_block_flag.i = getelementptr inbounds nuw i8, ptr %gr.addr.0.i, i64 16 @@ -104427,7 +104427,7 @@ if.end.i633.i: ; preds = %cond.true.i173 %conv.i639.i = zext i8 %155 to i32 %shr4.i640.i = lshr i32 255, %and.i637.i %and5.i641.i = and i32 %shr4.i640.i, %conv.i639.i - %sub11.i647.i = xor i32 %and.i637.i, 7 + %sub11.i647.i = sub nuw nsw i32 7, %and.i637.i %shr12.i648.i = lshr i32 %and5.i641.i, %sub11.i647.i br label %cond.end.i @@ -104456,7 +104456,7 @@ if.end.i667.i: ; preds = %cond.end.i %conv.i673.i = zext i8 %157 to i32 %shr4.i674.i = lshr i32 255, %and.i671.i %and5.i675.i = and i32 %shr4.i674.i, %conv.i673.i - %sub11.i681.i = xor i32 %and.i671.i, 7 + %sub11.i681.i = sub nuw nsw i32 7, %and.i671.i %shr12.i682.i = lshr i32 %and5.i675.i, %sub11.i681.i %158 = trunc nuw i32 %shr12.i682.i to i8 br label %ma_dr_mp3_bs_get_bits.exit696.i @@ -104478,7 +104478,7 @@ if.end.i701.i: ; preds = %ma_dr_mp3_bs_get_bi %conv.i707.i = zext i8 %159 to i32 %shr4.i708.i = lshr i32 255, %and.i705.i %and5.i709.i = and i32 %shr4.i708.i, %conv.i707.i - %sub11.i715.i = xor i32 %and.i705.i, 7 + %sub11.i715.i = sub nuw nsw i32 7, %and.i705.i %shr12.i716.i = lshr i32 %and5.i709.i, %sub11.i715.i %160 = trunc nuw i32 %shr12.i716.i to i8 br label %ma_dr_mp3_bs_get_bits.exit730.i diff --git a/bench/mold/optimized/compress.cc.ll b/bench/mold/optimized/compress.cc.ll index 69b46c71045..72c4d4fd055 100644 --- a/bench/mold/optimized/compress.cc.ll +++ b/bench/mold/optimized/compress.cc.ll @@ -2143,11 +2143,11 @@ if.then.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4moldL13zlib_com %sub.ptr.sub.i9.i.i.i.i.i.i.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i8.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i %cmp4.i.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i, -1 call void @llvm.assume(i1 %cmp4.i.i.i.i.i.i.i.i.i.i.i.i) - %sub.i.i.i.i.i.i.i.i.i.i.i.i = xor i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i, 9223372036854775807 + %sub.i.i.i.i.i.i.i.i.i.i.i.i = sub nuw nsw i64 9223372036854775807, %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i %cmp6.i.i.i.i.i.i.i.i.i.i.i.i = icmp ule i64 %sub.ptr.sub.i9.i.i.i.i.i.i.i.i.i.i.i, %sub.i.i.i.i.i.i.i.i.i.i.i.i call void @llvm.assume(i1 %cmp6.i.i.i.i.i.i.i.i.i.i.i.i) %cmp8.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %sub.ptr.sub.i9.i.i.i.i.i.i.i.i.i.i.i, %conv26.i.i.i.i.i.i.neg.i.i.i.i.i - br i1 %cmp8.not.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i20.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i + br i1 %cmp8.not.i.i.i.i.i.i.i.i.i.i.i.i, label %if.else.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i store i8 0, ptr %14, align 1 @@ -2157,18 +2157,51 @@ if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i8 0, i64 %sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i -if.then.i.i.i20.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i +if.else.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i + %cmp.i.i.i18.i.i.i.i.i.i.i.i.i.i = icmp slt i64 %sub.i.i.i.i.i.i.i.i.i.i.i, 0 + br i1 %cmp.i.i.i18.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i20.i.i.i.i.i.i.i.i.i.i, label %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit26.i.i.i.i.i.i.i.i.i.i.i.i + +if.then.i.i.i20.i.i.i.i.i.i.i.i.i.i: ; preds = %if.else.i.i.i.i.i.i.i.i.i.i.i.i call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.7) #19 unreachable +_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit26.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.else.i.i.i.i.i.i.i.i.i.i.i.i + %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = call noalias noundef nonnull dereferenceable(9223372036854775807) ptr @_Znwm(i64 noundef 9223372036854775807) #20 + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i + store i8 0, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i, align 1 + %sub.i.i.i21.i.i.i.i.i.i.i.i.i.i.i.i = xor i64 %conv26.i.i.i.i.i.i.i.i.i.i.i, -1 + %incdec.ptr.i.i.i20.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i, i64 1 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %incdec.ptr.i.i.i20.i.i.i.i.i.i.i.i.i.i.i.i, i8 0, i64 %sub.i.i.i21.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) + %cmp.i.i.i.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %14, %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i + br i1 %cmp.i.i.i.not.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i27.i.i.i.i.i.i.i.i.i.i.i.i + +if.then.i.i.i27.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit26.i.i.i.i.i.i.i.i.i.i.i.i + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 1 %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) + br label %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i + +_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i27.i.i.i.i.i.i.i.i.i.i.i.i, %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit26.i.i.i.i.i.i.i.i.i.i.i.i + %tobool.not.i.i.i19.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i, null + br i1 %tobool.not.i.i.i19.i.i.i.i.i.i.i.i.i.i, label %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i28.i.i.i.i.i.i.i.i.i.i.i.i + +if.then.i28.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i + call void @_ZdlPv(ptr noundef nonnull %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i) #18 + br label %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i + +_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i28.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i + %add.ptr33.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %sub.i.i.i.i.i.i.i.i.i.i.i + %add.ptr36.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 9223372036854775807 + br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i + if.else.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4moldL13zlib_compressESt17basic_string_viewIcSt11char_traitsIcEE.exit.i.i.i.i.i.i.i.i.i.i %cmp4.i.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %sub.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i %add.ptr.i15.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i, i64 %sub.i.i.i.i.i.i.i.i.i.i.i %spec.select.i.i.i.i.i.i.i.i.i.i = select i1 %cmp4.i.i.i.i.i.i.i.i.i.i.i, ptr %add.ptr.i15.i.i.i.i.i.i.i.i.i.i, ptr %14 br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i -_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i: ; preds = %if.else.i.i.i.i.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %ref.tmp.sroa.7.0.i.i.i.i.i.i.i.i.i.i = phi ptr [ %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i ], [ %spec.select.i.i.i.i.i.i.i.i.i.i, %if.else.i.i.i.i.i.i.i.i.i.i.i ] +_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i: ; preds = %if.else.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i + %ref.tmp.sroa.0.1.i.i.i.i.i.i.i.i.i.i = phi ptr [ %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i ], [ %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i ], [ %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i, %if.else.i.i.i.i.i.i.i.i.i.i.i ] + %ref.tmp.sroa.7.0.i.i.i.i.i.i.i.i.i.i = phi ptr [ %add.ptr33.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i ], [ %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i ], [ %spec.select.i.i.i.i.i.i.i.i.i.i, %if.else.i.i.i.i.i.i.i.i.i.i.i ] + %ref.tmp.sroa.13.1.i.i.i.i.i.i.i.i.i.i = phi ptr [ %add.ptr36.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i ], [ %ref.tmp.sroa.13.0.i.i.i.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i ], [ %ref.tmp.sroa.13.0.i.i.i.i.i.i.i.i.i.i, %if.else.i.i.i.i.i.i.i.i.i.i.i ] %call27.i.i.i.i.i.i.i.i.i.i.i = call i32 @deflateEnd(ptr noundef nonnull %strm.i.i.i.i.i.i.i.i.i.i.i) #17 call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %strm.i.i.i.i.i.i.i.i.i.i.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %nbits.i.i.i.i.i.i.i.i.i.i.i) @@ -2178,9 +2211,9 @@ _ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i: ; preds = %if.else.i.i.i %19 = load ptr, ptr %add.ptr.i8.i.i.i.i.i.i.i.i.i.i, align 8 %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i8.i.i.i.i.i.i.i.i.i.i, i64 8 %_M_end_of_storage.i.i.i.i9.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i8.i.i.i.i.i.i.i.i.i.i, i64 16 - store ptr %ref.tmp.sroa.0.0.i.i.i.i.i.i.i.i.i.i, ptr %add.ptr.i8.i.i.i.i.i.i.i.i.i.i, align 8 + store ptr %ref.tmp.sroa.0.1.i.i.i.i.i.i.i.i.i.i, ptr %add.ptr.i8.i.i.i.i.i.i.i.i.i.i, align 8 store ptr %ref.tmp.sroa.7.0.i.i.i.i.i.i.i.i.i.i, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - store ptr %ref.tmp.sroa.13.0.i.i.i.i.i.i.i.i.i.i, ptr %_M_end_of_storage.i.i.i.i9.i.i.i.i.i.i.i.i.i.i, align 8 + store ptr %ref.tmp.sroa.13.1.i.i.i.i.i.i.i.i.i.i, ptr %_M_end_of_storage.i.i.i.i9.i.i.i.i.i.i.i.i.i.i, align 8 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %19, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d06invokeIRKZN4mold14ZlibCompressorC1EPhlE3$_0JRlEEENSt13invoke_resultIT_JDpT0_EE4typeEOSB_DpOSC_.exit.i.i.i.i.i", label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -3416,7 +3449,7 @@ if.then.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4moldL13zstd_com %sub.ptr.sub.i9.i.i.i.i.i.i.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i8.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i %cmp4.i.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i, -1 tail call void @llvm.assume(i1 %cmp4.i.i.i.i.i.i.i.i.i.i.i.i) - %sub.i.i.i.i.i.i.i.i.i.i.i.i = xor i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i, 9223372036854775807 + %sub.i.i.i.i.i.i.i.i.i.i.i.i = sub nuw nsw i64 9223372036854775807, %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i %cmp6.i.i.i.i.i.i.i.i.i.i.i.i = icmp ule i64 %sub.ptr.sub.i9.i.i.i.i.i.i.i.i.i.i.i, %sub.i.i.i.i.i.i.i.i.i.i.i.i tail call void @llvm.assume(i1 %cmp6.i.i.i.i.i.i.i.i.i.i.i.i) %cmp8.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %sub.ptr.sub.i9.i.i.i.i.i.i.i.i.i.i.i, %sub.i11.i.i.i.i.i.i.i.i.i.i @@ -3435,7 +3468,7 @@ if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i12 br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i if.else.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i - %cmp.i.i.i13.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %sub.i.i.i.i.i.i.i.i.i.i.i.i, %sub.i11.i.i.i.i.i.i.i.i.i.i + %cmp.i.i.i13.i.i.i.i.i.i.i.i.i.i = icmp slt i64 %call16.i.i.i.i.i.i.i.i.i.i.i, 0 br i1 %cmp.i.i.i13.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i15.i.i.i.i.i.i.i.i.i.i, label %_ZNKSt6vectorIhSaIhEE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i.i15.i.i.i.i.i.i.i.i.i.i: ; preds = %if.else.i.i.i.i.i.i.i.i.i.i.i.i @@ -3475,7 +3508,7 @@ if.then.i28.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIhSaIhE br label %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i28.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - %add.ptr33.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %call16.i.i.i.i.i.i.i.i.i.i.i + %add.ptr33.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %call16.i.i.i.i.i.i.i.i.i.i.i %add.ptr36.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %4 br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit.i.i.i.i.i.i.i.i.i.i diff --git a/bench/mold/optimized/thunks.cc.ARM64.cc.ll b/bench/mold/optimized/thunks.cc.ARM64.cc.ll index 32b096c7068..3c3624078dd 100644 --- a/bench/mold/optimized/thunks.cc.ARM64.cc.ll +++ b/bench/mold/optimized/thunks.cc.ARM64.cc.ll @@ -1649,21 +1649,28 @@ for.body.i.i.i.i.i: ; preds = %"_ZN3tbb6detail2d23 _ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i %extra47.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 40 - tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra47.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef 0) + %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 48 + %10 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %11 = load ptr, ptr %extra47.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %tobool.not.i.i1.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %10, %11 + br i1 %tobool.not.i.i1.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_5ARM64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i + +if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i + store ptr %11, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 br label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_5ARM64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i" _ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i - %10 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 - %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %10, i64 16 + %12 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 + %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %12, i64 16 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %9 to i64 - %11 = load ptr, ptr %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfShdr", ptr %11, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i - %call4.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call { ptr, i64 } @_ZN4mold3elf9InputFileINS0_5ARM64EE8get_dataINS0_6ElfRelIS2_EEEESt4spanIT_Lm18446744073709551615EERNS0_7ContextIS2_EERKNS0_7ElfShdrIS2_EE(ptr noundef nonnull align 8 dereferenceable(280) %10, ptr noundef nonnull align 8 dereferenceable(4568) %2, ptr noundef nonnull align 1 dereferenceable(64) %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i) - %12 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 - %13 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 + %13 = load ptr, ptr %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfShdr", ptr %13, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i + %call4.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call { ptr, i64 } @_ZN4mold3elf9InputFileINS0_5ARM64EE8get_dataINS0_6ElfRelIS2_EEEESt4spanIT_Lm18446744073709551615EERNS0_7ContextIS2_EERKNS0_7ElfShdrIS2_EE(ptr noundef nonnull align 8 dereferenceable(280) %12, ptr noundef nonnull align 8 dereferenceable(4568) %2, ptr noundef nonnull align 1 dereferenceable(64) %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i) + %14 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 + %15 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 %extra.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 40 - tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %13) - %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %13, 0 + tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %15) + %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %15, 0 br i1 %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_5ARM64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i @@ -1679,7 +1686,7 @@ for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12Inpu for.body.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i %i.043.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ 0, %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i ], [ %inc.i.i.i.i.i.i.i.i.i.i.i.i, %for.inc.i.i.i.i.i.i.i.i.i.i.i.i ] - %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfRel", ptr %12, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfRel", ptr %14, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 8 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 br label %for.body.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1687,8 +1694,8 @@ for.body.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.inc.i.i.i.i.i.i for.body.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.i.i.i.i.i.i.i.i.i.i.i.i %__begin0.0.idx3.i.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ 0, %for.body.i.i.i.i.i.i.i.i.i.i.i.i ], [ %__begin0.0.add.i.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.i.i.i.i.i.i.i.i.i.i.i.i.i ] %__begin0.0.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr @_ZN4mold3elf5ARM649R_FUNCALLE, i64 %__begin0.0.idx3.i.i.i.i.i.i.i.i.i.i.i.i.i - %14 = load i32, ptr %__begin0.0.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %14 + %16 = load i32, ptr %__begin0.0.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %16 %__begin0.0.add.i.i.i.i.i.i.i.i.i.i.i.i.i = add nuw nsw i64 %__begin0.0.idx3.i.i.i.i.i.i.i.i.i.i.i.i.i, 4 %cmp.not.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %__begin0.0.add.i.i.i.i.i.i.i.i.i.i.i.i.i, 8 %or.cond.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 true, i1 %cmp.not.not.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1698,104 +1705,104 @@ _ZN4mold3elf16is_func_call_relINS0_5ARM64EEEbRKNS0_6ElfRelIT_EE.exit.i.i.i.i.i.i br i1 %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.end.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4mold3elf16is_func_call_relINS0_5ARM64EEEbRKNS0_6ElfRelIT_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i - %15 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 - %symbols.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %15, i64 48 + %17 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 + %symbols.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 48 %r_sym.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 12 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %r_sym.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %conv.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i to i64 - %16 = load ptr, ptr %symbols.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw ptr, ptr %16, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i - %17 = load ptr, ptr %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %18 = load ptr, ptr %17, align 8 - %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %18, null + %18 = load ptr, ptr %symbols.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw ptr, ptr %18, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i + %19 = load ptr, ptr %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %20 = load ptr, ptr %19, align 8 + %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %20, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end10.i.i.i.i.i.i.i.i.i.i.i.i if.end10.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end.i.i.i.i.i.i.i.i.i.i.i.i - %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 8 - %19 = load i64, ptr %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %19, 3 + %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 8 + %21 = load i64, ptr %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %21, 3 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ne i64 %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %19, -4 - %20 = inttoptr i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i to ptr + %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %21, -4 + %22 = inttoptr i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i to ptr %tobool.not11.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i = or i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %tobool.not11.i.i.i.i.i.i.i.i.i.i.i.i.i br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i, label %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end10.i.i.i.i.i.i.i.i.i.i.i.i - %21 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %20, i64 8 - %22 = load ptr, ptr %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %21, %22 + %23 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 8 + %24 = load ptr, ptr %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %23, %24 br i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i - %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 40 - %23 = load i32, ptr %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %23, -1 + %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 40 + %25 = load i32, ptr %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %25, -1 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNK4mold3elf6SymbolINS0_5ARM64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNK4mold3elf6SymbolINS0_5ARM64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i - %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %23 to i64 - %24 = load ptr, ptr %symbol_aux.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %24, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 4 - %25 = load i32, ptr %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %25, -1 + %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %25 to i64 + %26 = load ptr, ptr %symbol_aux.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %26, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 4 + %27 = load i32, ptr %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %27, -1 br i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNK4mold3elf6SymbolINS0_5ARM64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i _ZNK4mold3elf6SymbolINS0_5ARM64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf6SymbolINS0_5ARM64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %24, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 5 - %26 = load i32, ptr %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %26, -1 + %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %26, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 5 + %28 = load i32, ptr %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %28, -1 br i1 %.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf6SymbolINS0_5ARM64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i - %offset.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %20, i64 72 - %27 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %27, -1 + %offset.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 72 + %29 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %29, -1 br i1 %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN4mold3elfL12is_reachableINS0_5ARM64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i _ZN4mold3elfL12is_reachableINS0_5ARM64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i - %call8.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noundef i64 @_ZNK4mold3elf6SymbolINS0_5ARM64EE8get_addrERNS0_7ContextIS2_EEl(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 8 dereferenceable(4568) %2, i64 noundef 2) + %call8.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noundef i64 @_ZNK4mold3elf6SymbolINS0_5ARM64EE8get_addrERNS0_7ContextIS2_EEl(ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(4568) %2, i64 noundef 2) %r_addend.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 16 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %r_addend.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 - %28 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %28, i64 40 + %30 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %30, i64 40 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 - %29 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %31 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 %x.0.copyload.i.i28.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %.neg1 = add i64 %call8.i.i.i.i.i.i.i.i.i.i.i.i.i, 134217728 %.neg2 = add i64 %.neg1, %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %30 = add i64 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %29 - %31 = add i64 %30, %x.0.copyload.i.i28.i.i.i.i.i.i.i.i.i.i.i.i - %32 = sub i64 %.neg2, %31 - %33 = icmp ult i64 %32, 268435456 - br i1 %33, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i + %32 = add i64 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %31 + %33 = add i64 %32, %x.0.copyload.i.i28.i.i.i.i.i.i.i.i.i.i.i.i + %34 = sub i64 %.neg2, %33 + %35 = icmp ult i64 %34, 268435456 + br i1 %35, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end13.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4mold3elfL12is_reachableINS0_5ARM64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf6SymbolINS0_5ARM64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf6SymbolINS0_5ARM64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.end10.i.i.i.i.i.i.i.i.i.i.i.i - %extra14.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 52 - %34 = load i16, ptr %extra14.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i16 %34, -1 - %35 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %35, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i + %extra14.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 52 + %36 = load i16, ptr %extra14.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i16 %36, -1 + %37 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %37, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i br i1 %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end25.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then18.i.i.i.i.i.i.i.i.i.i.i.i if.then18.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end13.i.i.i.i.i.i.i.i.i.i.i.i - store i16 %34, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 54 - %36 = load i16, ptr %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %37 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %37, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 - store i16 %36, ptr %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + store i16 %36, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 54 + %38 = load i16, ptr %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + %39 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %39, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 + store i16 %38, ptr %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 br label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.end25.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end13.i.i.i.i.i.i.i.i.i.i.i.i store i16 %conv26.i.i.i.i.i.i.i.i.i.i.i.i, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %38 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %38, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 + %40 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %40, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 store i16 -1, ptr %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %flags.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 46 - %39 = atomicrmw xchg ptr %flags.i.i.i.i.i.i.i.i.i.i.i.i, i8 -1 monotonic, align 1 - %cmp33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %39, 0 + %flags.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 46 + %41 = atomicrmw xchg ptr %flags.i.i.i.i.i.i.i.i.i.i.i.i, i8 -1 monotonic, align 1 + %cmp33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %41, 0 br i1 %cmp33.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then34.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.then34.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end25.i.i.i.i.i.i.i.i.i.i.i.i @@ -1808,22 +1815,22 @@ if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then34.i.i.i.i.i unreachable _ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then34.i.i.i.i.i.i.i.i.i.i.i.i - %40 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %41 = load ptr, ptr %_M_end_of_storage.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %40, %41 + %42 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %43 = load ptr, ptr %_M_end_of_storage.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %42, %43 br i1 %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i, label %if.else.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i34.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i34.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - store ptr %17, ptr %40, align 8 - %42 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %42, i64 8 + store ptr %19, ptr %42, align 8 + %44 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %44, i64 8 store ptr %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE9push_backEOS5_.exit.i.i.i.i.i.i.i.i.i.i.i.i if.else.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - %43 = load ptr, ptr %symbols35.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %40 to i64 - %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %43 to i64 + %45 = load ptr, ptr %symbols35.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %42 to i64 + %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %45 to i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 9223372036854775800 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1837,28 +1844,28 @@ _ZNKSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE12_M_check_lenEmPKc.exit.i %.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1) %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = add nsw i64 %.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %44 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975) - %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975, i64 %44 + %46 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975) + %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975, i64 %46 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ne i64 %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 tail call void @llvm.assume(i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i) %mul.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = shl nuw nsw i64 %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 3 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i) #26 %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - store ptr %17, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + store ptr %19, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 8 %43, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 8 %45, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 8 - %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %43, null + %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %45, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - tail call void @_ZdlPv(ptr noundef nonnull %43) #25 + tail call void @_ZdlPv(ptr noundef nonnull %45) #25 br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1874,10 +1881,10 @@ _ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE9push_backEOS5_.exit.i.i.i. for.inc.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIPN4mold3elf6SymbolINS1_5ARM64EEESaIS5_EE9push_backEOS5_.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end25.i.i.i.i.i.i.i.i.i.i.i.i, %if.then18.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN4mold3elfL12is_reachableINS0_5ARM64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN4mold3elf16is_func_call_relINS0_5ARM64EEEbRKNS0_6ElfRelIT_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i %inc.i.i.i.i.i.i.i.i.i.i.i.i = add nuw i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i.i.i.i.i.i.i.i, %13 + %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i.i.i.i.i.i.i.i, %15 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_5ARM64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %for.body.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !23 -"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_5ARM64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i": ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i +"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_5ARM64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i": ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_5ARM64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i %inc.i.i.i.i.i = add i64 %count.05.i.i.i.i.i, 1 %cmp.not.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i, %r.0.val br i1 %cmp.not.i.i.i.i.i, label %"_ZN3tbb6detail2d06invokeIRKNS0_2d225parallel_for_body_wrapperIN9__gnu_cxx17__normal_iteratorIPPN4mold3elf12InputSectionINS8_5ARM64EEESt4spanISC_Lm18446744073709551615EEEEZNS8_13OutputSectionISA_E29create_range_extension_thunksERNS8_7ContextISA_EEE3$_1SC_EEJRNS0_2d113blocked_rangeImEEEEENSt13invoke_resultIT_JDpT0_EE4typeEOSV_DpOSW_.exit", label %for.body.i.i.i.i.i, !llvm.loop !24 @@ -1908,7 +1915,7 @@ if.then: ; preds = %entry %sub.ptr.div.i11 = ashr exact i64 %sub.ptr.sub.i10, 2 %cmp4.i = icmp ult i64 %sub.ptr.div.i, 2305843009213693952 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.div.i, 2305843009213693951 + %sub.i = sub nuw nsw i64 2305843009213693951, %sub.ptr.div.i %cmp6.i = icmp ule i64 %sub.ptr.div.i11, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.div.i11, %sub @@ -1922,7 +1929,7 @@ _ZSt27__uninitialized_default_n_aIPN4mold3elf8ThunkRefEmS2_ET_S4_T0_RSaIT1_E.exi br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp ugt i64 %__new_size, 2305843009213693951 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIN4mold3elf8ThunkRefESaIS2_EE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -1963,7 +1970,7 @@ if.then.i24.i: ; preds = %_ZNSt6vectorIN4mold _ZNSt12_Vector_baseIN4mold3elf8ThunkRefESaIS2_EE13_M_deallocateEPS2_m.exit.i: ; preds = %if.then.i24.i, %_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr34.i = getelementptr inbounds %"struct.mold::elf::ThunkRef", ptr %add.ptr.i, i64 %sub + %add.ptr34.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %add.ptr.i, i64 %sub store ptr %add.ptr34.i, ptr %_M_finish.i, align 8 %add.ptr37.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %call5.i.i.i.i, i64 %4 store ptr %add.ptr37.i, ptr %_M_end_of_storage.i, align 8 diff --git a/bench/mold/optimized/thunks.cc.LOONGARCH32.cc.ll b/bench/mold/optimized/thunks.cc.LOONGARCH32.cc.ll index 89ee422e743..2b404ce3f48 100644 --- a/bench/mold/optimized/thunks.cc.LOONGARCH32.cc.ll +++ b/bench/mold/optimized/thunks.cc.LOONGARCH32.cc.ll @@ -1645,21 +1645,28 @@ for.body.i.i.i.i.i: ; preds = %"_ZN3tbb6detail2d23 _ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i %extra47.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 40 - tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra47.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef 0) + %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 48 + %10 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %11 = load ptr, ptr %extra47.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %tobool.not.i.i1.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %10, %11 + br i1 %tobool.not.i.i1.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH32EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i + +if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i + store ptr %11, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 br label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH32EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i" _ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i - %10 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 - %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %10, i64 16 + %12 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 + %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %12, i64 16 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %9 to i64 - %11 = load ptr, ptr %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfShdr", ptr %11, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i - %call4.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call { ptr, i64 } @_ZN4mold3elf9InputFileINS0_11LOONGARCH32EE8get_dataINS0_6ElfRelIS2_EEEESt4spanIT_Lm18446744073709551615EERNS0_7ContextIS2_EERKNS0_7ElfShdrIS2_EE(ptr noundef nonnull align 8 dereferenceable(280) %10, ptr noundef nonnull align 8 dereferenceable(4568) %2, ptr noundef nonnull align 1 dereferenceable(40) %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i) - %12 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 - %13 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 + %13 = load ptr, ptr %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfShdr", ptr %13, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i + %call4.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call { ptr, i64 } @_ZN4mold3elf9InputFileINS0_11LOONGARCH32EE8get_dataINS0_6ElfRelIS2_EEEESt4spanIT_Lm18446744073709551615EERNS0_7ContextIS2_EERKNS0_7ElfShdrIS2_EE(ptr noundef nonnull align 8 dereferenceable(280) %12, ptr noundef nonnull align 8 dereferenceable(4568) %2, ptr noundef nonnull align 1 dereferenceable(40) %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i) + %14 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 + %15 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 %extra.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 40 - tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %13) - %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %13, 0 + tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %15) + %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %15, 0 br i1 %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH32EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i @@ -1675,120 +1682,120 @@ for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12Inpu for.body.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i %i.043.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ 0, %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i ], [ %inc.i.i.i.i.i.i.i.i.i.i.i.i, %for.inc.i.i.i.i.i.i.i.i.i.i.i.i ] - %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfRel", ptr %12, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfRel", ptr %14, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 4 - %14 = load i8, ptr %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 - %.fr.i.i.i.i.i.i.i.i.i.i.i.i.i = freeze i8 %14 + %16 = load i8, ptr %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 + %.fr.i.i.i.i.i.i.i.i.i.i.i.i.i = freeze i8 %16 %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %.fr.i.i.i.i.i.i.i.i.i.i.i.i.i, 66 br i1 %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.end.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i.i.i.i.i.i.i.i - %15 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 - %symbols.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %15, i64 48 + %17 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 + %symbols.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 48 %r_sym.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 5 - %16 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 6 - %17 = load i16, ptr %16, align 1 - %18 = zext i16 %17 to i64 - %19 = shl nuw nsw i64 %18, 8 - %20 = load i8, ptr %r_sym.i.i.i.i.i.i.i.i.i.i.i.i, align 1 - %conv8.i.i.i.i.i.i.i.i.i.i.i.i.i = zext i8 %20 to i64 - %or9.i.i.i.i.i.i.i.i.i.i.i.i.i = or disjoint i64 %19, %conv8.i.i.i.i.i.i.i.i.i.i.i.i.i - %21 = load ptr, ptr %symbols.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw ptr, ptr %21, i64 %or9.i.i.i.i.i.i.i.i.i.i.i.i.i - %22 = load ptr, ptr %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %23 = load ptr, ptr %22, align 8 - %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %23, null + %18 = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 6 + %19 = load i16, ptr %18, align 1 + %20 = zext i16 %19 to i64 + %21 = shl nuw nsw i64 %20, 8 + %22 = load i8, ptr %r_sym.i.i.i.i.i.i.i.i.i.i.i.i, align 1 + %conv8.i.i.i.i.i.i.i.i.i.i.i.i.i = zext i8 %22 to i64 + %or9.i.i.i.i.i.i.i.i.i.i.i.i.i = or disjoint i64 %21, %conv8.i.i.i.i.i.i.i.i.i.i.i.i.i + %23 = load ptr, ptr %symbols.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw ptr, ptr %23, i64 %or9.i.i.i.i.i.i.i.i.i.i.i.i.i + %24 = load ptr, ptr %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %25 = load ptr, ptr %24, align 8 + %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %25, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end10.i.i.i.i.i.i.i.i.i.i.i.i if.end10.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end.i.i.i.i.i.i.i.i.i.i.i.i - %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 8 - %24 = load i64, ptr %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %24, 3 + %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %24, i64 8 + %26 = load i64, ptr %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %26, 3 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ne i64 %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %24, -4 - %25 = inttoptr i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i to ptr + %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %26, -4 + %27 = inttoptr i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i to ptr %tobool.not12.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i = or i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %tobool.not12.i.i.i.i.i.i.i.i.i.i.i.i.i br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i, label %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end10.i.i.i.i.i.i.i.i.i.i.i.i - %26 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %25, i64 8 - %27 = load ptr, ptr %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %26, %27 + %28 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %27, i64 8 + %29 = load ptr, ptr %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %28, %29 br i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i - %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 40 - %28 = load i32, ptr %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %28, -1 + %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %24, i64 40 + %30 = load i32, ptr %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %30, -1 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i - %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %28 to i64 - %29 = load ptr, ptr %symbol_aux.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %29, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 4 - %30 = load i32, ptr %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %30, -1 + %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %30 to i64 + %31 = load ptr, ptr %symbol_aux.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %31, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 4 + %32 = load i32, ptr %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %32, -1 br i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i _ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %29, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 5 - %31 = load i32, ptr %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %31, -1 + %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %31, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 5 + %33 = load i32, ptr %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %33, -1 br i1 %.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i - %offset.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %25, i64 72 - %32 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %32, -1 + %offset.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %27, i64 72 + %34 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %34, -1 br i1 %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN4mold3elfL12is_reachableINS0_11LOONGARCH32EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i _ZN4mold3elfL12is_reachableINS0_11LOONGARCH32EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i - %call8.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noundef i64 @_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE8get_addrERNS0_7ContextIS2_EEl(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(4568) %2, i64 noundef 2) + %call8.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noundef i64 @_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE8get_addrERNS0_7ContextIS2_EEl(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(4568) %2, i64 noundef 2) %r_addend.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 8 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %r_addend.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %conv.i.i10.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i to i64 - %33 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %33, i64 36 + %35 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %35, i64 36 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i to i64 - %34 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %36 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %conv.i28.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i to i64 %.neg1 = add i64 %call8.i.i.i.i.i.i.i.i.i.i.i.i.i, 134217728 %.neg2 = add i64 %.neg1, %conv.i.i10.i.i.i.i.i.i.i.i.i.i.i.i.i - %35 = add i64 %34, %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %36 = add i64 %35, %conv.i28.i.i.i.i.i.i.i.i.i.i.i.i - %37 = sub i64 %.neg2, %36 - %38 = icmp ult i64 %37, 268435456 - br i1 %38, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i + %37 = add i64 %36, %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i + %38 = add i64 %37, %conv.i28.i.i.i.i.i.i.i.i.i.i.i.i + %39 = sub i64 %.neg2, %38 + %40 = icmp ult i64 %39, 268435456 + br i1 %40, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end13.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4mold3elfL12is_reachableINS0_11LOONGARCH32EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf6SymbolINS0_11LOONGARCH32EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.end10.i.i.i.i.i.i.i.i.i.i.i.i - %extra14.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 52 - %39 = load i16, ptr %extra14.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i16 %39, -1 - %40 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %40, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i + %extra14.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %24, i64 52 + %41 = load i16, ptr %extra14.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i16 %41, -1 + %42 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %42, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i br i1 %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end25.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then18.i.i.i.i.i.i.i.i.i.i.i.i if.then18.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end13.i.i.i.i.i.i.i.i.i.i.i.i - store i16 %39, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 54 - %41 = load i16, ptr %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %42 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %42, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 - store i16 %41, ptr %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + store i16 %41, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %24, i64 54 + %43 = load i16, ptr %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + %44 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %44, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 + store i16 %43, ptr %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 br label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.end25.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end13.i.i.i.i.i.i.i.i.i.i.i.i store i16 %conv26.i.i.i.i.i.i.i.i.i.i.i.i, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %43 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %43, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 + %45 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %45, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 store i16 -1, ptr %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %flags.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %22, i64 46 - %44 = atomicrmw xchg ptr %flags.i.i.i.i.i.i.i.i.i.i.i.i, i8 -1 monotonic, align 1 - %cmp33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %44, 0 + %flags.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %24, i64 46 + %46 = atomicrmw xchg ptr %flags.i.i.i.i.i.i.i.i.i.i.i.i, i8 -1 monotonic, align 1 + %cmp33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %46, 0 br i1 %cmp33.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then34.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.then34.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end25.i.i.i.i.i.i.i.i.i.i.i.i @@ -1801,22 +1808,22 @@ if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then34.i.i.i.i.i unreachable _ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then34.i.i.i.i.i.i.i.i.i.i.i.i - %45 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %46 = load ptr, ptr %_M_end_of_storage.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %45, %46 + %47 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %48 = load ptr, ptr %_M_end_of_storage.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %47, %48 br i1 %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i, label %if.else.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i34.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i34.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - store ptr %22, ptr %45, align 8 - %47 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %47, i64 8 + store ptr %24, ptr %47, align 8 + %49 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %49, i64 8 store ptr %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE9push_backEOS5_.exit.i.i.i.i.i.i.i.i.i.i.i.i if.else.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - %48 = load ptr, ptr %symbols35.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %45 to i64 - %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %48 to i64 + %50 = load ptr, ptr %symbols35.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %47 to i64 + %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %50 to i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 9223372036854775800 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1830,28 +1837,28 @@ _ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE12_M_check_lenEmPKc %.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1) %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = add nsw i64 %.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %49 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975) - %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975, i64 %49 + %51 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975) + %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975, i64 %51 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ne i64 %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 tail call void @llvm.assume(i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i) %mul.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = shl nuw nsw i64 %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 3 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i) #26 %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - store ptr %22, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + store ptr %24, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 8 %48, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 8 %50, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 8 - %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %48, null + %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %50, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - tail call void @_ZdlPv(ptr noundef nonnull %48) #25 + tail call void @_ZdlPv(ptr noundef nonnull %50) #25 br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1867,10 +1874,10 @@ _ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE9push_backEOS5_.exit for.inc.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH32EEESaIS5_EE9push_backEOS5_.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end25.i.i.i.i.i.i.i.i.i.i.i.i, %if.then18.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN4mold3elfL12is_reachableINS0_11LOONGARCH32EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.i.i.i.i.i.i.i.i.i.i.i.i %inc.i.i.i.i.i.i.i.i.i.i.i.i = add nuw i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i.i.i.i.i.i.i.i, %13 + %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i.i.i.i.i.i.i.i, %15 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH32EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %for.body.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !23 -"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH32EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i": ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i +"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH32EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i": ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH32EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i %inc.i.i.i.i.i = add i64 %count.05.i.i.i.i.i, 1 %cmp.not.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i, %r.0.val br i1 %cmp.not.i.i.i.i.i, label %"_ZN3tbb6detail2d06invokeIRKNS0_2d225parallel_for_body_wrapperIN9__gnu_cxx17__normal_iteratorIPPN4mold3elf12InputSectionINS8_11LOONGARCH32EEESt4spanISC_Lm18446744073709551615EEEEZNS8_13OutputSectionISA_E29create_range_extension_thunksERNS8_7ContextISA_EEE3$_1SC_EEJRNS0_2d113blocked_rangeImEEEEENSt13invoke_resultIT_JDpT0_EE4typeEOSV_DpOSW_.exit", label %for.body.i.i.i.i.i, !llvm.loop !24 @@ -1901,7 +1908,7 @@ if.then: ; preds = %entry %sub.ptr.div.i11 = ashr exact i64 %sub.ptr.sub.i10, 2 %cmp4.i = icmp ult i64 %sub.ptr.div.i, 2305843009213693952 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.div.i, 2305843009213693951 + %sub.i = sub nuw nsw i64 2305843009213693951, %sub.ptr.div.i %cmp6.i = icmp ule i64 %sub.ptr.div.i11, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.div.i11, %sub @@ -1915,7 +1922,7 @@ _ZSt27__uninitialized_default_n_aIPN4mold3elf8ThunkRefEmS2_ET_S4_T0_RSaIT1_E.exi br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp ugt i64 %__new_size, 2305843009213693951 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIN4mold3elf8ThunkRefESaIS2_EE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -1956,7 +1963,7 @@ if.then.i24.i: ; preds = %_ZNSt6vectorIN4mold _ZNSt12_Vector_baseIN4mold3elf8ThunkRefESaIS2_EE13_M_deallocateEPS2_m.exit.i: ; preds = %if.then.i24.i, %_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr34.i = getelementptr inbounds %"struct.mold::elf::ThunkRef", ptr %add.ptr.i, i64 %sub + %add.ptr34.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %add.ptr.i, i64 %sub store ptr %add.ptr34.i, ptr %_M_finish.i, align 8 %add.ptr37.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %call5.i.i.i.i, i64 %4 store ptr %add.ptr37.i, ptr %_M_end_of_storage.i, align 8 diff --git a/bench/mold/optimized/thunks.cc.LOONGARCH64.cc.ll b/bench/mold/optimized/thunks.cc.LOONGARCH64.cc.ll index 10a7d9a1b61..bb7d12a2f10 100644 --- a/bench/mold/optimized/thunks.cc.LOONGARCH64.cc.ll +++ b/bench/mold/optimized/thunks.cc.LOONGARCH64.cc.ll @@ -1646,21 +1646,28 @@ for.body.i.i.i.i.i: ; preds = %"_ZN3tbb6detail2d23 _ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i %extra47.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 40 - tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra47.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef 0) + %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 48 + %10 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %11 = load ptr, ptr %extra47.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %tobool.not.i.i1.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %10, %11 + br i1 %tobool.not.i.i1.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i + +if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i + store ptr %11, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 br label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i" _ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i - %10 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 - %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %10, i64 16 + %12 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 + %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %12, i64 16 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %9 to i64 - %11 = load ptr, ptr %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfShdr", ptr %11, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i - %call4.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call { ptr, i64 } @_ZN4mold3elf9InputFileINS0_11LOONGARCH64EE8get_dataINS0_6ElfRelIS2_EEEESt4spanIT_Lm18446744073709551615EERNS0_7ContextIS2_EERKNS0_7ElfShdrIS2_EE(ptr noundef nonnull align 8 dereferenceable(280) %10, ptr noundef nonnull align 8 dereferenceable(4568) %2, ptr noundef nonnull align 1 dereferenceable(64) %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i) - %12 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 - %13 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 + %13 = load ptr, ptr %elf_sections.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfShdr", ptr %13, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i + %call4.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call { ptr, i64 } @_ZN4mold3elf9InputFileINS0_11LOONGARCH64EE8get_dataINS0_6ElfRelIS2_EEEESt4spanIT_Lm18446744073709551615EERNS0_7ContextIS2_EERKNS0_7ElfShdrIS2_EE(ptr noundef nonnull align 8 dereferenceable(280) %12, ptr noundef nonnull align 8 dereferenceable(4568) %2, ptr noundef nonnull align 1 dereferenceable(64) %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i) + %14 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 + %15 = extractvalue { ptr, i64 } %call4.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 %extra.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %call4.val.i.i.i.i.i, i64 40 - tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %13) - %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %13, 0 + tail call void @_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %extra.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %15) + %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %15, 0 br i1 %cmp42.not.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i @@ -1676,7 +1683,7 @@ for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf12Inpu for.body.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i %i.043.i.i.i.i.i.i.i.i.i.i.i.i = phi i64 [ 0, %for.body.lr.ph.i.i.i.i.i.i.i.i.i.i.i.i ], [ %inc.i.i.i.i.i.i.i.i.i.i.i.i, %for.inc.i.i.i.i.i.i.i.i.i.i.i.i ] - %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfRel", ptr %12, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i + %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ElfRel", ptr %14, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 8 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %r_type1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %x.0.copyload.i.fr.i.i.i.i.i.i.i.i.i.i.i.i.i = freeze i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1684,104 +1691,104 @@ for.body.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.inc.i.i.i.i.i.i br i1 %cmp2.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.end.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i.i.i.i.i.i.i.i - %14 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 - %symbols.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %14, i64 48 + %16 = load ptr, ptr %call4.val.i.i.i.i.i, align 8 + %symbols.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %16, i64 48 %r_sym.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 12 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i = load i32, ptr %r_sym.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %conv.i.i.i.i.i.i.i.i.i.i.i.i = zext i32 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i to i64 - %15 = load ptr, ptr %symbols.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw ptr, ptr %15, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i - %16 = load ptr, ptr %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %17 = load ptr, ptr %16, align 8 - %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %17, null + %17 = load ptr, ptr %symbols.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw ptr, ptr %17, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i + %18 = load ptr, ptr %add.ptr.i26.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %19 = load ptr, ptr %18, align 8 + %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %19, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end10.i.i.i.i.i.i.i.i.i.i.i.i if.end10.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end.i.i.i.i.i.i.i.i.i.i.i.i - %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %16, i64 8 - %18 = load i64, ptr %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %18, 3 + %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %18, i64 8 + %20 = load i64, ptr %origin.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %20, 3 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ne i64 %and.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %18, -4 - %19 = inttoptr i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i to ptr + %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i = and i64 %20, -4 + %21 = inttoptr i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i to ptr %tobool.not11.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %and3.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i = or i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %tobool.not11.i.i.i.i.i.i.i.i.i.i.i.i.i br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i, label %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end10.i.i.i.i.i.i.i.i.i.i.i.i - %20 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 8 - %21 = load ptr, ptr %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %20, %21 + %22 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %21, i64 8 + %23 = load ptr, ptr %output_section1.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %22, %23 br i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i - %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %16, i64 40 - %22 = load i32, ptr %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %22, -1 + %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %18, i64 40 + %24 = load i32, ptr %aux_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %24, -1 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i - %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %22 to i64 - %23 = load ptr, ptr %symbol_aux.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %23, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 4 - %24 = load i32, ptr %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %24, -1 + %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sext i32 %24 to i64 + %25 = load ptr, ptr %symbol_aux.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %25, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 4 + %26 = load i32, ptr %plt_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %26, -1 br i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i _ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %23, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 5 - %25 = load i32, ptr %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %25, -1 + %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds %"struct.mold::elf::SymbolAux", ptr %25, i64 %conv.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i32 5 + %27 = load i32, ptr %pltgot_idx.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %.not.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i32 %27, -1 br i1 %.not.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.end.i27.i.i.i.i.i.i.i.i.i.i.i.i - %offset.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %19, i64 72 - %26 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %26, -1 + %offset.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %21, i64 72 + %28 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %28, -1 br i1 %cmp5.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZN4mold3elfL12is_reachableINS0_11LOONGARCH64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i _ZN4mold3elfL12is_reachableINS0_11LOONGARCH64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i - %call8.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noundef i64 @_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE8get_addrERNS0_7ContextIS2_EEl(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 8 dereferenceable(4568) %2, i64 noundef 2) + %call8.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noundef i64 @_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE8get_addrERNS0_7ContextIS2_EEl(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(4568) %2, i64 noundef 2) %r_addend.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 16 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %r_addend.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 - %27 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %27, i64 40 + %29 = load ptr, ptr %output_section.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %29, i64 40 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %sh_addr.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 - %28 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %30 = load i64, ptr %offset.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 %x.0.copyload.i.i28.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i, align 1 %.neg1 = add i64 %call8.i.i.i.i.i.i.i.i.i.i.i.i.i, 134217728 %.neg2 = add i64 %.neg1, %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %29 = add i64 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %28 - %30 = add i64 %29, %x.0.copyload.i.i28.i.i.i.i.i.i.i.i.i.i.i.i - %31 = sub i64 %.neg2, %30 - %32 = icmp ult i64 %31, 268435456 - br i1 %32, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i + %31 = add i64 %x.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %30 + %32 = add i64 %31, %x.0.copyload.i.i28.i.i.i.i.i.i.i.i.i.i.i.i + %33 = sub i64 %.neg2, %32 + %34 = icmp ult i64 %33, 268435456 + br i1 %34, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end13.i.i.i.i.i.i.i.i.i.i.i.i if.end13.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZN4mold3elfL12is_reachableINS0_11LOONGARCH64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end4.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE7has_pltERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf6SymbolINS0_11LOONGARCH64EE11get_plt_idxERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %lor.lhs.false.i.i.i.i.i.i.i.i.i.i.i.i.i, %if.end10.i.i.i.i.i.i.i.i.i.i.i.i - %extra14.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %16, i64 52 - %33 = load i16, ptr %extra14.i.i.i.i.i.i.i.i.i.i.i.i, align 4 - %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i16 %33, -1 - %34 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %34, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i + %extra14.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %18, i64 52 + %35 = load i16, ptr %extra14.i.i.i.i.i.i.i.i.i.i.i.i, align 4 + %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i16 %35, -1 + %36 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %36, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i br i1 %cmp17.not.i.i.i.i.i.i.i.i.i.i.i.i, label %if.end25.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then18.i.i.i.i.i.i.i.i.i.i.i.i if.then18.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end13.i.i.i.i.i.i.i.i.i.i.i.i - store i16 %33, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %16, i64 54 - %35 = load i16, ptr %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %36 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %36, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 - store i16 %35, ptr %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + store i16 %35, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %18, i64 54 + %37 = load i16, ptr %thunk_sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 + %38 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %38, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 + store i16 %37, ptr %sym_idx.i.i.i.i.i.i.i.i.i.i.i.i, align 2 br label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.end25.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end13.i.i.i.i.i.i.i.i.i.i.i.i store i16 %conv26.i.i.i.i.i.i.i.i.i.i.i.i, ptr %add.ptr.i31.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %37 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %37, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 + %39 = load ptr, ptr %extra.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %39, i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, i32 1 store i16 -1, ptr %sym_idx30.i.i.i.i.i.i.i.i.i.i.i.i, align 2 - %flags.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %16, i64 46 - %38 = atomicrmw xchg ptr %flags.i.i.i.i.i.i.i.i.i.i.i.i, i8 -1 monotonic, align 1 - %cmp33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %38, 0 + %flags.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %18, i64 46 + %40 = atomicrmw xchg ptr %flags.i.i.i.i.i.i.i.i.i.i.i.i, i8 -1 monotonic, align 1 + %cmp33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %40, 0 br i1 %cmp33.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then34.i.i.i.i.i.i.i.i.i.i.i.i, label %for.inc.i.i.i.i.i.i.i.i.i.i.i.i if.then34.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.end25.i.i.i.i.i.i.i.i.i.i.i.i @@ -1794,22 +1801,22 @@ if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then34.i.i.i.i.i unreachable _ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then34.i.i.i.i.i.i.i.i.i.i.i.i - %39 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %40 = load ptr, ptr %_M_end_of_storage.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %39, %40 + %41 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %42 = load ptr, ptr %_M_end_of_storage.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %41, %42 br i1 %cmp.not.i.i33.i.i.i.i.i.i.i.i.i.i.i.i, label %if.else.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i34.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i34.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - store ptr %16, ptr %39, align 8 - %41 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %41, i64 8 + store ptr %18, ptr %41, align 8 + %43 = load ptr, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %43, i64 8 store ptr %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr %_M_finish.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE9push_backEOS5_.exit.i.i.i.i.i.i.i.i.i.i.i.i if.else.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_.exit.i.i.i.i.i.i.i.i.i.i.i.i - %42 = load ptr, ptr %symbols35.i.i.i.i.i.i.i.i.i.i.i.i, align 8 - %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %39 to i64 - %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %42 to i64 + %44 = load ptr, ptr %symbols35.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %41 to i64 + %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = ptrtoint ptr %44 to i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.rhs.cast.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 9223372036854775800 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1823,28 +1830,28 @@ _ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE12_M_check_lenEmPKc %.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1) %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = add nsw i64 %.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ult i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %sub.ptr.div.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - %43 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975) - %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975, i64 %43 + %45 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975) + %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = select i1 %cmp7.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 1152921504606846975, i64 %45 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp ne i64 %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 tail call void @llvm.assume(i1 %cmp.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i) %mul.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = shl nuw nsw i64 %cond.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 3 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i) #26 %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds i8, ptr %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - store ptr %16, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 + store ptr %18, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, align 8 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, 0 br i1 %cmp.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 8 %42, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %call5.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr align 8 %44, i64 %sub.ptr.sub.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i1 false) br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNKSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE12_M_check_lenEmPKc.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i %incdec.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 8 - %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %42, null + %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %44, null br i1 %tobool.not.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i, label %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i - tail call void @_ZdlPv(ptr noundef nonnull %42) #25 + tail call void @_ZdlPv(ptr noundef nonnull %44) #25 br label %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i _ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.exit.i.i.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit17.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i @@ -1860,10 +1867,10 @@ _ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE9push_backEOS5_.exit for.inc.i.i.i.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt6vectorIPN4mold3elf6SymbolINS1_11LOONGARCH64EEESaIS5_EE9push_backEOS5_.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end25.i.i.i.i.i.i.i.i.i.i.i.i, %if.then18.i.i.i.i.i.i.i.i.i.i.i.i, %_ZN4mold3elfL12is_reachableINS0_11LOONGARCH64EEEbRNS0_7ContextIT_EERNS0_12InputSectionIS4_EERNS0_6SymbolIS4_EERKNS0_6ElfRelIS4_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.end.i.i.i.i.i.i.i.i.i.i.i.i, %for.body.i.i.i.i.i.i.i.i.i.i.i.i %inc.i.i.i.i.i.i.i.i.i.i.i.i = add nuw i64 %i.043.i.i.i.i.i.i.i.i.i.i.i.i, 1 - %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i.i.i.i.i.i.i.i, %13 + %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i.i.i.i.i.i.i.i, %15 br i1 %exitcond.not.i.i.i.i.i.i.i.i.i.i.i.i, label %"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i", label %for.body.i.i.i.i.i.i.i.i.i.i.i.i, !llvm.loop !23 -"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i": ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i +"_ZN3tbb6detail2d235parallel_for_each_operator_selectorIZN4mold3elf13OutputSectionINS4_11LOONGARCH64EE29create_range_extension_thunksERNS4_7ContextIS6_EEE3$_1E4callIRPNS4_12InputSectionIS6_EENS1_11feeder_implISB_SG_EEEEDTcmclsr3tbb6detailE6invokefp_clsr3stdE7forwardIT_Efp0_EEcvv_EERKSB_OSK_PT0_.exit.i.i.i.i.i": ; preds = %for.inc.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.i.i.i.i.i.i.i.i.i.i.i.i, %if.then.i18.i.i.i.i.i.i.i.i.i.i.i.i, %_ZNK4mold3elf12InputSectionINS0_11LOONGARCH64EE8get_relsERNS0_7ContextIS2_EE.exit.thread.i.i.i.i.i.i.i.i.i.i.i.i %inc.i.i.i.i.i = add i64 %count.05.i.i.i.i.i, 1 %cmp.not.i.i.i.i.i = icmp eq i64 %inc.i.i.i.i.i, %r.0.val br i1 %cmp.not.i.i.i.i.i, label %"_ZN3tbb6detail2d06invokeIRKNS0_2d225parallel_for_body_wrapperIN9__gnu_cxx17__normal_iteratorIPPN4mold3elf12InputSectionINS8_11LOONGARCH64EEESt4spanISC_Lm18446744073709551615EEEEZNS8_13OutputSectionISA_E29create_range_extension_thunksERNS8_7ContextISA_EEE3$_1SC_EEJRNS0_2d113blocked_rangeImEEEEENSt13invoke_resultIT_JDpT0_EE4typeEOSV_DpOSW_.exit", label %for.body.i.i.i.i.i, !llvm.loop !24 @@ -1894,7 +1901,7 @@ if.then: ; preds = %entry %sub.ptr.div.i11 = ashr exact i64 %sub.ptr.sub.i10, 2 %cmp4.i = icmp ult i64 %sub.ptr.div.i, 2305843009213693952 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.div.i, 2305843009213693951 + %sub.i = sub nuw nsw i64 2305843009213693951, %sub.ptr.div.i %cmp6.i = icmp ule i64 %sub.ptr.div.i11, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.div.i11, %sub @@ -1908,7 +1915,7 @@ _ZSt27__uninitialized_default_n_aIPN4mold3elf8ThunkRefEmS2_ET_S4_T0_RSaIT1_E.exi br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp ugt i64 %__new_size, 2305843009213693951 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIN4mold3elf8ThunkRefESaIS2_EE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -1949,7 +1956,7 @@ if.then.i24.i: ; preds = %_ZNSt6vectorIN4mold _ZNSt12_Vector_baseIN4mold3elf8ThunkRefESaIS2_EE13_M_deallocateEPS2_m.exit.i: ; preds = %if.then.i24.i, %_ZNSt6vectorIN4mold3elf8ThunkRefESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr34.i = getelementptr inbounds %"struct.mold::elf::ThunkRef", ptr %add.ptr.i, i64 %sub + %add.ptr34.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %add.ptr.i, i64 %sub store ptr %add.ptr34.i, ptr %_M_finish.i, align 8 %add.ptr37.i = getelementptr inbounds nuw %"struct.mold::elf::ThunkRef", ptr %call5.i.i.i.i, i64 %4 store ptr %add.ptr37.i, ptr %_M_end_of_storage.i, align 8 diff --git a/bench/node/optimized/libnode.node_http_parser.ll b/bench/node/optimized/libnode.node_http_parser.ll index 63f1600da2a..320ccb2f249 100644 --- a/bench/node/optimized/libnode.node_http_parser.ll +++ b/bench/node/optimized/libnode.node_http_parser.ll @@ -69,8 +69,6 @@ $_ZN4node14StreamListener18OnStreamWantsWriteEm = comdat any $_ZN4node14StreamListener15OnStreamDestroyEv = comdat any -$_ZNSt6vectorIcSaIcEE6resizeEm = comdat any - $_ZN4node23ArrayBufferViewContentsIcLm64EE9ReadValueEN2v85LocalINS2_5ValueEEE = comdat any $_ZTVN4node18MemoryRetainerNodeE = comdat any @@ -192,7 +190,6 @@ $_ZZN4node14StreamResource18PushStreamListenerEPNS_14StreamListenerEE4args_0 = c @.str.92 = private unnamed_addr constant [25 x i8] c"../../src/util-inl.h:383\00", align 1 @.str.93 = private unnamed_addr constant [29 x i8] c"!(n > 0) || (ret != nullptr)\00", align 1 @.str.94 = private unnamed_addr constant [35 x i8] c"T *node::Malloc(size_t) [T = char]\00", align 1 -@.str.98 = private unnamed_addr constant [26 x i8] c"vector::_M_default_append\00", align 1 @_ZZN4node14StreamListener31PassReadErrorToPreviousListenerElE4args = linkonce_odr dso_local constant %"struct.node::AssertionInfo" { ptr @.str.99, ptr @.str.100, ptr @.str.101 }, comdat, align 8 @.str.99 = private unnamed_addr constant [31 x i8] c"../../src/stream_base-inl.h:56\00", align 1 @.str.100 = private unnamed_addr constant [32 x i8] c"(previous_listener_) != nullptr\00", align 1 @@ -5281,18 +5278,47 @@ if.end: ; preds = %entry %_M_finish.i.i = getelementptr inbounds nuw i8, ptr %binding_data_.val4, i64 40 %2 = load ptr, ptr %_M_finish.i.i, align 8 %cmp.i.i = icmp eq ptr %1, %2 - br i1 %cmp.i.i, label %if.then10, label %if.end14 + br i1 %cmp.i.i, label %if.then.i, label %if.end14 + +if.then.i: ; preds = %if.end + %sub.ptr.lhs.cast.i.i = ptrtoint ptr %1 to i64 + %_M_end_of_storage.i.i = getelementptr inbounds nuw i8, ptr %binding_data_.val4, i64 48 + %3 = load ptr, ptr %_M_end_of_storage.i.i, align 8 + %sub.ptr.lhs.cast.i8.i = ptrtoint ptr %3 to i64 + %sub.ptr.sub.i9.i = sub i64 %sub.ptr.lhs.cast.i8.i, %sub.ptr.lhs.cast.i.i + %cmp6.i.i = icmp sgt i64 %sub.ptr.sub.i9.i, -1 + tail call void @llvm.assume(i1 %cmp6.i.i) + %cmp8.not.i.i = icmp samesign ult i64 %sub.ptr.sub.i9.i, 65536 + br i1 %cmp8.not.i.i, label %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i, label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i + +_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %if.then.i + %add.ptr.i.i.i.i.i.i.i = getelementptr i8, ptr %2, i64 65536 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(65536) %2, i8 0, i64 65536, i1 false) + store ptr %add.ptr.i.i.i.i.i.i.i, ptr %_M_finish.i.i, align 8 + br label %if.end14 + +_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i: ; preds = %if.then.i + %call5.i.i.i.i.i = tail call noalias noundef nonnull dereferenceable(65536) ptr @_Znwm(i64 noundef 65536) #21 + %tobool.not.i.i.i = icmp eq ptr %1, null + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(65536) %call5.i.i.i.i.i, i8 0, i64 65536, i1 false) + br i1 %tobool.not.i.i.i, label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i.i, label %if.then.i28.i.i + +if.then.i28.i.i: ; preds = %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i + tail call void @_ZdlPv(ptr noundef nonnull %1) #23 + br label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i.i -if.then10: ; preds = %if.end - tail call void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %parser_buffer, i64 noundef 65536) - %binding_data_.val6.pre = load ptr, ptr %binding_data_, align 8 - %parser_buffer17.phi.trans.insert = getelementptr inbounds nuw i8, ptr %binding_data_.val6.pre, i64 32 - %.pre = load ptr, ptr %parser_buffer17.phi.trans.insert, align 8 +_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i.i: ; preds = %if.then.i28.i.i, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i.i + store ptr %call5.i.i.i.i.i, ptr %parser_buffer, align 8 + %add.ptr33.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i.i, i64 65536 + store ptr %add.ptr33.i.i, ptr %_M_finish.i.i, align 8 + store ptr %add.ptr33.i.i, ptr %_M_end_of_storage.i.i, align 8 br label %if.end14 -if.end14: ; preds = %if.then10, %if.end - %3 = phi ptr [ %.pre, %if.then10 ], [ %1, %if.end ] - %call19 = tail call { ptr, i64 } @uv_buf_init(ptr noundef %3, i32 noundef 65536) #20 +if.end14: ; preds = %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i.i, %if.end + %binding_data_.val6 = load ptr, ptr %binding_data_, align 8 + %parser_buffer17 = getelementptr inbounds nuw i8, ptr %binding_data_.val6, i64 32 + %4 = load ptr, ptr %parser_buffer17, align 8 + %call19 = tail call { ptr, i64 } @uv_buf_init(ptr noundef %4, i32 noundef 65536) #20 br label %return return: ; preds = %if.end14, %_ZN4node6MallocEm.exit @@ -5497,114 +5523,6 @@ declare void @_ZN4node10BaseObject17decrease_refcountEv(ptr noundef nonnull alig declare { ptr, i64 } @uv_buf_init(ptr noundef, i32 noundef) local_unnamed_addr #0 -; Function Attrs: mustprogress nounwind uwtable -define linkonce_odr dso_local void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %this, i64 noundef %__new_size) local_unnamed_addr #3 comdat align 2 { -entry: - %_M_finish.i = getelementptr inbounds nuw i8, ptr %this, i64 8 - %0 = load ptr, ptr %_M_finish.i, align 8 - %1 = load ptr, ptr %this, align 8 - %sub.ptr.lhs.cast.i = ptrtoint ptr %0 to i64 - %sub.ptr.rhs.cast.i = ptrtoint ptr %1 to i64 - %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i - %cmp = icmp ugt i64 %__new_size, %sub.ptr.sub.i - br i1 %cmp, label %if.then, label %if.else - -if.then: ; preds = %entry - %sub = sub nuw i64 %__new_size, %sub.ptr.sub.i - %_M_end_of_storage.i = getelementptr inbounds nuw i8, ptr %this, i64 16 - %2 = load ptr, ptr %_M_end_of_storage.i, align 8 - %sub.ptr.lhs.cast.i8 = ptrtoint ptr %2 to i64 - %sub.ptr.sub.i9 = sub i64 %sub.ptr.lhs.cast.i8, %sub.ptr.lhs.cast.i - %cmp4.i = icmp sgt i64 %sub.ptr.sub.i, -1 - tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.sub.i, 9223372036854775807 - %cmp6.i = icmp ule i64 %sub.ptr.sub.i9, %sub.i - tail call void @llvm.assume(i1 %cmp6.i) - %cmp8.not.i = icmp ult i64 %sub.ptr.sub.i9, %sub - br i1 %cmp8.not.i, label %if.else.i, label %if.then.i.i.i.i - -if.then.i.i.i.i: ; preds = %if.then - store i8 0, ptr %0, align 1 - %incdec.ptr.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 1 - %sub.i.i.i.i = add i64 %sub, -1 - %cmp.i.i.i.i.i.i = icmp eq i64 %sub.i.i.i.i, 0 - br i1 %cmp.i.i.i.i.i.i, label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i, label %if.then.i.i.i.i.i.i.i.i - -if.then.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i - %add.ptr.i.i.i.i.i.i = getelementptr i8, ptr %0, i64 %sub - tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %incdec.ptr.i.i.i.i, i8 0, i64 %sub.i.i.i.i, i1 false) - br label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i - -_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i: ; preds = %if.then.i.i.i.i.i.i.i.i, %if.then.i.i.i.i - %__first.addr.0.i.i.i.i = phi ptr [ %incdec.ptr.i.i.i.i, %if.then.i.i.i.i ], [ %add.ptr.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i ] - store ptr %__first.addr.0.i.i.i.i, ptr %_M_finish.i, align 8 - br label %if.end6 - -if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub - br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i - -if.then.i.i: ; preds = %if.else.i - tail call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.98) #22 - unreachable - -_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i: ; preds = %if.else.i - %.sroa.speculated.i.i = tail call i64 @llvm.umax.i64(i64 %sub.ptr.sub.i, i64 %sub) - %add.i.i = add nuw i64 %.sroa.speculated.i.i, %sub.ptr.sub.i - %3 = tail call i64 @llvm.umin.i64(i64 %add.i.i, i64 9223372036854775807) - %call5.i.i.i.i = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %3) #21 - %add.ptr.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i, i64 %sub.ptr.sub.i - store i8 0, ptr %add.ptr.i, align 1 - %sub.i.i.i21.i = add nsw i64 %sub, -1 - %cmp.i.i.i.i.i22.i = icmp eq i64 %sub.i.i.i21.i, 0 - br i1 %cmp.i.i.i.i.i22.i, label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit26.i, label %if.then.i.i.i.i.i.i.i23.i - -if.then.i.i.i.i.i.i.i23.i: ; preds = %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i - %incdec.ptr.i.i.i20.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 1 - tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %incdec.ptr.i.i.i20.i, i8 0, i64 %sub.i.i.i21.i, i1 false) - br label %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit26.i - -_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit26.i: ; preds = %if.then.i.i.i.i.i.i.i23.i, %_ZNKSt6vectorIcSaIcEE12_M_check_lenEmPKc.exit.i - %cmp.i.i.i.not.i = icmp eq ptr %0, %1 - br i1 %cmp.i.i.i.not.i, label %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i, label %if.then.i.i.i27.i - -if.then.i.i.i27.i: ; preds = %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit26.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %call5.i.i.i.i, ptr align 1 %1, i64 %sub.ptr.sub.i, i1 false) - br label %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i - -_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i: ; preds = %if.then.i.i.i27.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit26.i - %tobool.not.i.i = icmp eq ptr %1, null - br i1 %tobool.not.i.i, label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i, label %if.then.i28.i - -if.then.i28.i: ; preds = %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i - tail call void @_ZdlPv(ptr noundef nonnull %1) #23 - br label %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i - -_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i: ; preds = %if.then.i28.i, %_ZNSt6vectorIcSaIcEE11_S_relocateEPcS2_S2_RS0_.exit.i - store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr33.i = getelementptr inbounds i8, ptr %call5.i.i.i.i, i64 %__new_size - store ptr %add.ptr33.i, ptr %_M_finish.i, align 8 - %add.ptr36.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i, i64 %3 - store ptr %add.ptr36.i, ptr %_M_end_of_storage.i, align 8 - br label %if.end6 - -if.else: ; preds = %entry - %cmp4 = icmp ult i64 %__new_size, %sub.ptr.sub.i - br i1 %cmp4, label %if.then5, label %if.end6 - -if.then5: ; preds = %if.else - %add.ptr = getelementptr inbounds i8, ptr %1, i64 %__new_size - %tobool.not.i = icmp eq ptr %0, %add.ptr - br i1 %tobool.not.i, label %if.end6, label %if.then.i15 - -if.then.i15: ; preds = %if.then5 - store ptr %add.ptr, ptr %_M_finish.i, align 8 - br label %if.end6 - -if.end6: ; preds = %if.then.i15, %if.then5, %_ZNSt12_Vector_baseIcSaIcEE13_M_deallocateEPcm.exit.i, %_ZSt27__uninitialized_default_n_aIPcmcET_S1_T0_RSaIT1_E.exit.i, %if.else - ret void -} - ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #12 diff --git a/bench/ockam-rs/optimized/xqqthbl2d203wsg.ll b/bench/ockam-rs/optimized/xqqthbl2d203wsg.ll index aba5fa66f34..902fd3facaf 100644 --- a/bench/ockam-rs/optimized/xqqthbl2d203wsg.ll +++ b/bench/ockam-rs/optimized/xqqthbl2d203wsg.ll @@ -5872,8 +5872,8 @@ define void @_ZN15ockam_vault_aws14aws_kms_client6digest17h27e0d021786ce860E(ptr call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #21, !noalias !843 unreachable -common.resume.i: ; preds = %69, %46, %38, %25 - %common.resume.op.i = phi { ptr, i32 } [ %26, %25 ], [ %39, %38 ], [ %47, %46 ], [ %70, %69 ] +common.resume.i: ; preds = %68, %46, %38, %25 + %common.resume.op.i = phi { ptr, i32 } [ %26, %25 ], [ %39, %38 ], [ %47, %46 ], [ %69, %68 ] resume { ptr, i32 } %common.resume.op.i "_ZN90_$LT$digest..core_api..wrapper..CoreWrapper$LT$T$GT$$u20$as$u20$core..default..Default$GT$7default17h8160017a11deed8eE.exit.i": ; preds = %3 @@ -6009,15 +6009,14 @@ common.resume.i: ; preds = %69, %46, %38, %25 "_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h1572bd2a18041a5aE.exit.thread.i.i.i.i.i": ; preds = %"_ZN110_$LT$generic_array..GenericArray$LT$T$C$N$GT$$u20$as$u20$generic_array..sequence..GenericSequence$LT$T$GT$$GT$8generate17h828982bb0d2cf128E.exit.i.i.i.i" %scevgep.i.i.i.i.i = getelementptr i8, ptr %60, i64 1 - %62 = xor i64 %52, 63 + %62 = sub nuw nsw i64 63, %52 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i.i.i.i.i, i8 0, i64 %62, i1 false), !alias.scope !938, !noalias !949 - %63 = xor i64 %52, 56 - %64 = icmp samesign ult i64 %63, 8 - br i1 %64, label %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h1572bd2a18041a5aE.exit.thread.thread.i.i.i.i.i", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit.i.i.i.i.i" + %63 = icmp samesign ugt i8 %51, 55 + br i1 %63, label %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h1572bd2a18041a5aE.exit.thread.thread.i.i.i.i.i", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit.i.i.i.i.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit.i.i.i.i.i": ; preds = %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h1572bd2a18041a5aE.exit.thread.i.i.i.i.i" - %65 = getelementptr inbounds nuw i8, ptr %16, i64 96 - store i64 %59, ptr %65, align 8, !alias.scope !950, !noalias !954 + %64 = getelementptr inbounds nuw i8, ptr %16, i64 96 + store i64 %59, ptr %64, align 8, !alias.scope !950, !noalias !954 call void @_ZN4sha26sha25611compress25617hbd384aa2f8354284E(ptr noalias noundef nonnull align 8 dereferenceable(112) %16, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %42, i64 noundef 1), !noalias !956 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i.preheader" @@ -6026,27 +6025,27 @@ common.resume.i: ; preds = %69, %46, %38, %25 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !957 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4), !noalias !958 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !959 - %66 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %66, align 8, !noalias !959 + %65 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %65, align 8, !noalias !959 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !959 - store ptr %66, ptr %6, align 8, !noalias !959 + store ptr %65, ptr %6, align 8, !noalias !959 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !962 store ptr %4, ptr %5, align 8, !noalias !962 - %67 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %67, align 8, !noalias !962 - %68 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %68, align 8, !noalias !962 - invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h0744b37f4135dbe1E.llvm.16029863518473859452"(ptr noundef nonnull %7, ptr noundef nonnull %66, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5) - to label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit10.i.i.i.i.i" unwind label %69, !noalias !971 + %66 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %66, align 8, !noalias !962 + %67 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %67, align 8, !noalias !962 + invoke void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h0744b37f4135dbe1E.llvm.16029863518473859452"(ptr noundef nonnull %7, ptr noundef nonnull %65, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5) + to label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit10.i.i.i.i.i" unwind label %68, !noalias !971 -69: ; preds = %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h1572bd2a18041a5aE.exit.thread.thread.i.i.i.i.i" - %70 = landingpad { ptr, i32 } +68: ; preds = %"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h1572bd2a18041a5aE.exit.thread.thread.i.i.i.i.i" + %69 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr403drop_in_place$LT$generic_array..ArrayBuilder$LT$u8$C$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UInt$LT$typenum..uint..UTerm$C$typenum..bit..B1$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$C$typenum..bit..B0$GT$$GT$$GT$17h9f9af81de06551c1E"(ptr noalias noundef nonnull align 8 dereferenceable(72) %7) #20 - to label %common.resume.i unwind label %71, !noalias !971 + to label %common.resume.i unwind label %70, !noalias !971 -71: ; preds = %69 - %72 = landingpad { ptr, i32 } +70: ; preds = %68 + %71 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #21, !noalias !971 unreachable @@ -6057,8 +6056,8 @@ common.resume.i: ; preds = %69, %46, %38, %25 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !972 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !959 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4), !noalias !958 - %73 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %59, ptr %73, align 1, !alias.scope !973, !noalias !977 + %72 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %59, ptr %72, align 1, !alias.scope !973, !noalias !977 call void @_ZN4sha26sha25611compress25617hbd384aa2f8354284E(ptr noalias noundef nonnull align 8 dereferenceable(112) %16, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1), !noalias !956 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !957 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i.preheader" @@ -6067,15 +6066,15 @@ common.resume.i: ; preds = %69, %46, %38, %25 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i.preheader", %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i" - %.sroa.12.041.i.i.i.i.i = phi i64 [ %74, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i" ], [ 0, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i.preheader" ] - %74 = add nuw nsw i64 %.sroa.12.041.i.i.i.i.i, 1 - %75 = shl nuw nsw i64 %.sroa.12.041.i.i.i.i.i, 2 - %76 = getelementptr inbounds nuw i8, ptr %12, i64 %75 - %77 = getelementptr inbounds nuw i32, ptr %16, i64 %.sroa.12.041.i.i.i.i.i - %78 = load i32, ptr %77, align 4, !alias.scope !940, !noalias !941, !noundef !5 - %79 = call i32 @llvm.bswap.i32(i32 %78) - store i32 %79, ptr %76, align 1, !alias.scope !979, !noalias !983 - %exitcond.not.i.i.i.i.i = icmp eq i64 %74, 8 + %.sroa.12.041.i.i.i.i.i = phi i64 [ %73, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i" ], [ 0, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i.preheader" ] + %73 = add nuw nsw i64 %.sroa.12.041.i.i.i.i.i, 1 + %74 = shl nuw nsw i64 %.sroa.12.041.i.i.i.i.i, 2 + %75 = getelementptr inbounds nuw i8, ptr %12, i64 %74 + %76 = getelementptr inbounds nuw i32, ptr %16, i64 %.sroa.12.041.i.i.i.i.i + %77 = load i32, ptr %76, align 4, !alias.scope !940, !noalias !941, !noundef !5 + %78 = call i32 @llvm.bswap.i32(i32 %77) + store i32 %78, ptr %75, align 1, !alias.scope !979, !noalias !983 + %exitcond.not.i.i.i.i.i = icmp eq i64 %73, 8 br i1 %exitcond.not.i.i.i.i.i, label %"_ZN44_$LT$D$u20$as$u20$digest..digest..Digest$GT$6digest17hbca72e4ac0775b87E.exit", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i" "_ZN44_$LT$D$u20$as$u20$digest..digest..Digest$GT$6digest17hbca72e4ac0775b87E.exit": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h412c5207925ca8a6E.exit14.i.i.i.i.i" @@ -6086,15 +6085,15 @@ common.resume.i: ; preds = %69, %46, %38, %25 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %.sroa.0.i.i) call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %20) call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %21), !noalias !833 - %80 = call { ptr, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17hcbea1dc1988aedceE"(i64 noundef 32, i1 noundef zeroext false), !noalias !992 - %81 = extractvalue { ptr, i64 } %80, 0 - %82 = extractvalue { ptr, i64 } %80, 1 - %83 = icmp ne ptr %81, null - call void @llvm.assume(i1 %83) - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %81, ptr noundef nonnull align 8 dereferenceable(32) %.sroa.0, i64 32, i1 false) - store ptr %81, ptr %0, align 8 + %79 = call { ptr, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17hcbea1dc1988aedceE"(i64 noundef 32, i1 noundef zeroext false), !noalias !992 + %80 = extractvalue { ptr, i64 } %79, 0 + %81 = extractvalue { ptr, i64 } %79, 1 + %82 = icmp ne ptr %80, null + call void @llvm.assume(i1 %82) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %80, ptr noundef nonnull align 8 dereferenceable(32) %.sroa.0, i64 32, i1 false) + store ptr %80, ptr %0, align 8 %.sroa.2.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %82, ptr %.sroa.2.0..sroa_idx, align 8 + store i64 %81, ptr %.sroa.2.0..sroa_idx, align 8 %.sroa.3.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 32, ptr %.sroa.3.0..sroa_idx, align 8 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %.sroa.0) diff --git a/bench/opencv/optimized/qrcode_encoder.cpp.ll b/bench/opencv/optimized/qrcode_encoder.cpp.ll index a1e11f38bd9..db33a1aa015 100644 --- a/bench/opencv/optimized/qrcode_encoder.cpp.ll +++ b/bench/opencv/optimized/qrcode_encoder.cpp.ll @@ -1462,7 +1462,7 @@ _ZNSt6vectorIS_IhSaIhEESaIS1_EED2Ev.exit23: ; preds = %_ZSt8_DestroyIPSt6v } ; Function Attrs: mustprogress uwtable -define hidden void @_ZN2cv17QRCodeEncoderImpl14formatGenerateEiRSt6vectorIhSaIhEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(384) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 { +define hidden void @_ZN2cv17QRCodeEncoderImpl14formatGenerateEiRSt6vectorIhSaIhEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(384) %0, i32 noundef %1, ptr nocapture noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 { %4 = alloca %"class.std::__cxx11::basic_string", align 8 %5 = alloca %"class.std::allocator", align 1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 28 @@ -1507,27 +1507,117 @@ switch.lookup: ; preds = %3 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) %18 = or i32 %switch.load, %1 - tail call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 15) - %19 = sext i32 %18 to i64 - %20 = getelementptr inbounds [32 x i16], ptr @_ZN2cvL13formatInfoLUTE, i64 0, i64 %19 - %21 = load i16, ptr %20, align 2 - %22 = zext i16 %21 to i32 - br label %23 - -23: ; preds = %switch.lookup, %23 - %indvars.iv = phi i64 [ 0, %switch.lookup ], [ %indvars.iv.next, %23 ] - %24 = trunc nuw nsw i64 %indvars.iv to i32 - %25 = lshr i32 %22, %24 - %26 = trunc i32 %25 to i8 - %27 = and i8 %26, 1 - %28 = load ptr, ptr %2, align 8 - %29 = getelementptr inbounds nuw i8, ptr %28, i64 %indvars.iv - store i8 %27, ptr %29, align 1 + %19 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %20 = load ptr, ptr %19, align 8 + %21 = load ptr, ptr %2, align 8 + %22 = ptrtoint ptr %20 to i64 + %23 = ptrtoint ptr %21 to i64 + %24 = sub i64 %22, %23 + %25 = icmp ult i64 %24, 15 + br i1 %25, label %26, label %52 + +26: ; preds = %switch.lookup + %27 = sub nuw nsw i64 15, %24 + %28 = getelementptr inbounds nuw i8, ptr %2, i64 16 + %29 = load ptr, ptr %28, align 8 + %30 = ptrtoint ptr %29 to i64 + %31 = sub i64 %30, %22 + %32 = sub nuw nsw i64 9223372036854775807, %24 + %33 = icmp ule i64 %31, %32 + tail call void @llvm.assume(i1 %33) + %.not28.i.i = icmp ult i64 %31, %27 + br i1 %.not28.i.i, label %40, label %34 + +34: ; preds = %26 + store i8 0, ptr %20, align 1 + %35 = getelementptr inbounds nuw i8, ptr %20, i64 1 + %36 = icmp eq i64 %24, 14 + br i1 %36, label %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i.i, label %37 + +37: ; preds = %34 + %38 = sub nuw nsw i64 14, %24 + %39 = getelementptr i8, ptr %20, i64 %27 + tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %35, i8 0, i64 %38, i1 false) + br label %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i.i + +_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i.i: ; preds = %37, %34 + %.0.i.i.i.i.i = phi ptr [ %35, %34 ], [ %39, %37 ] + store ptr %.0.i.i.i.i.i, ptr %19, align 8 + br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit + +40: ; preds = %26 + %.sroa.speculated.i.i.i = tail call i64 @llvm.umax.i64(i64 %24, i64 %27) + %41 = add nuw nsw i64 %.sroa.speculated.i.i.i, %24 + %42 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %41) #28 + %43 = getelementptr inbounds nuw i8, ptr %42, i64 %24 + store i8 0, ptr %43, align 1 + %44 = icmp eq i64 %24, 14 + br i1 %44, label %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit31.i.i, label %45 + +45: ; preds = %40 + %46 = sub nuw nsw i64 14, %24 + %47 = getelementptr inbounds nuw i8, ptr %43, i64 1 + tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %47, i8 0, i64 %46, i1 false) + br label %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit31.i.i + +_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit31.i.i: ; preds = %45, %40 + %.not35.i.i = icmp eq ptr %20, %21 + br i1 %.not35.i.i, label %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i, label %48 + +48: ; preds = %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit31.i.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %42, ptr align 1 %21, i64 %24, i1 false) + br label %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i + +_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i: ; preds = %48, %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit31.i.i + %.not.i33.i.i = icmp eq ptr %21, null + br i1 %.not.i33.i.i, label %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit34.i.i, label %49 + +49: ; preds = %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i + tail call void @_ZdlPv(ptr noundef nonnull %21) #29 + br label %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit34.i.i + +_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit34.i.i: ; preds = %49, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i.i + store ptr %42, ptr %2, align 8 + %50 = getelementptr inbounds nuw i8, ptr %42, i64 15 + store ptr %50, ptr %19, align 8 + %51 = getelementptr inbounds nuw i8, ptr %42, i64 %41 + store ptr %51, ptr %28, align 8 + br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit + +52: ; preds = %switch.lookup + %.not = icmp eq i64 %24, 15 + br i1 %.not, label %_ZNSt6vectorIhSaIhEE6resizeEm.exit, label %53 + +53: ; preds = %52 + %54 = getelementptr inbounds nuw i8, ptr %21, i64 15 + %.not.i4.i = icmp eq ptr %20, %54 + br i1 %.not.i4.i, label %_ZNSt6vectorIhSaIhEE6resizeEm.exit, label %55 + +55: ; preds = %53 + store ptr %54, ptr %19, align 8 + br label %_ZNSt6vectorIhSaIhEE6resizeEm.exit + +_ZNSt6vectorIhSaIhEE6resizeEm.exit: ; preds = %_ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i.i, %_ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit34.i.i, %52, %53, %55 + %56 = sext i32 %18 to i64 + %57 = getelementptr inbounds [32 x i16], ptr @_ZN2cvL13formatInfoLUTE, i64 0, i64 %56 + %58 = load i16, ptr %57, align 2 + %59 = zext i16 %58 to i32 + br label %60 + +60: ; preds = %_ZNSt6vectorIhSaIhEE6resizeEm.exit, %60 + %indvars.iv = phi i64 [ 0, %_ZNSt6vectorIhSaIhEE6resizeEm.exit ], [ %indvars.iv.next, %60 ] + %61 = trunc nuw nsw i64 %indvars.iv to i32 + %62 = lshr i32 %59, %61 + %63 = trunc i32 %62 to i8 + %64 = and i8 %63, 1 + %65 = load ptr, ptr %2, align 8 + %66 = getelementptr inbounds nuw i8, ptr %65, i64 %indvars.iv + store i8 %64, ptr %66, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 15 - br i1 %exitcond.not, label %30, label %23, !llvm.loop !9 + br i1 %exitcond.not, label %67, label %60, !llvm.loop !9 -30: ; preds = %23 +67: ; preds = %60 ret void } @@ -1550,7 +1640,7 @@ define linkonce_odr hidden void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnu %15 = sub i64 %14, %6 %16 = icmp sgt i64 %8, -1 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %8, 9223372036854775807 + %17 = sub nuw nsw i64 9223372036854775807, %8 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28.i = icmp ult i64 %15, %11 @@ -1574,7 +1664,7 @@ _ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i: ; preds = %23, % br label %_ZNSt6vectorIhSaIhEE17_M_default_appendEm.exit 25: ; preds = %10 - %26 = icmp ult i64 %17, %11 + %26 = icmp slt i64 %1, 0 br i1 %26, label %27, label %_ZNKSt6vectorIhSaIhEE12_M_check_lenEmPKc.exit.i 27: ; preds = %25 @@ -1615,7 +1705,7 @@ _ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i: ; preds = %36, %_ZSt27__u _ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit34.i: ; preds = %37, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i store ptr %30, ptr %0, align 8 - %38 = getelementptr inbounds i8, ptr %30, i64 %1 + %38 = getelementptr inbounds nuw i8, ptr %30, i64 %1 store ptr %38, ptr %3, align 8 %39 = getelementptr inbounds nuw i8, ptr %30, i64 %29 store ptr %39, ptr %12, align 8 @@ -4491,7 +4581,6 @@ _ZNSt16allocator_traitsISaIhEE8allocateERS0_m.exit.i.i.i.i: ; preds = %67 70: ; preds = %_ZNSt16allocator_traitsISaIhEE8allocateERS0_m.exit.i.i.i.i store ptr %69, ptr %7, align 8 - store ptr %69, ptr %24, align 8 %71 = getelementptr inbounds nuw i8, ptr %69, i64 %65 store ptr %71, ptr %25, align 8 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %69, ptr align 1 %62, i64 %65, i1 false) diff --git a/bench/openjdk/optimized/g1Arguments.ll b/bench/openjdk/optimized/g1Arguments.ll index e151237f478..49f7bdd421c 100644 --- a/bench/openjdk/optimized/g1Arguments.ll +++ b/bench/openjdk/optimized/g1Arguments.ll @@ -449,7 +449,7 @@ define hidden void @_ZN11G1Arguments33initialize_card_set_configurationEv() loca 15: ; preds = %7, %0 %16 = call noundef zeroext i1 @_ZN7JVMFlag10is_defaultE12JVMFlagsEnum(i32 noundef 968) #13 - br i1 %16, label %17, label %35 + br i1 %16, label %17, label %34 17: ; preds = %15 %18 = load i64, ptr @_ZN12G1HeapRegion14CardsPerRegionE, align 8 @@ -465,40 +465,39 @@ define hidden void @_ZN11G1Arguments33initialize_card_set_configurationEv() loca %28 = call noundef i64 @llvm.umin.i64(i64 %27, i64 %22) %29 = call noundef i64 @llvm.umax.i64(i64 %28, i64 1) %30 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %29, i1 true) - %31 = xor i64 %30, 63 - %32 = shl nuw nsw i64 1, %31 - %33 = trunc nuw i64 %32 to i32 + %31 = lshr exact i64 -9223372036854775808, %30 + %32 = trunc nuw i64 %31 to i32 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) - store i32 %33, ptr %2, align 4 - %34 = call noundef i32 @_ZN13JVMFlagAccess13set_or_assertE12JVMFlagsEnumiPv13JVMFlagOrigin(i32 noundef 968, i32 noundef 2, ptr noundef nonnull %2, i32 noundef 5) #13 + store i32 %32, ptr %2, align 4 + %33 = call noundef i32 @_ZN13JVMFlagAccess13set_or_assertE12JVMFlagsEnumiPv13JVMFlagOrigin(i32 noundef 968, i32 noundef 2, ptr noundef nonnull %2, i32 noundef 5) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) - br label %35 + br label %34 -35: ; preds = %17, %15 - %36 = call noundef zeroext i1 @_ZN7JVMFlag10is_defaultE12JVMFlagsEnum(i32 noundef 967) #13 - %37 = load i32, ptr @G1RemSetHowlMaxNumBuckets, align 4 - %38 = load i32, ptr @G1RemSetHowlNumBuckets, align 4 - br i1 %36, label %39, label %42 +34: ; preds = %17, %15 + %35 = call noundef zeroext i1 @_ZN7JVMFlag10is_defaultE12JVMFlagsEnum(i32 noundef 967) #13 + %36 = load i32, ptr @G1RemSetHowlMaxNumBuckets, align 4 + %37 = load i32, ptr @G1RemSetHowlNumBuckets, align 4 + br i1 %35, label %38, label %41 -39: ; preds = %35 - %40 = call noundef i32 @llvm.umax.i32(i32 %37, i32 %38) +38: ; preds = %34 + %39 = call noundef i32 @llvm.umax.i32(i32 %36, i32 %37) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) - store i32 %40, ptr %1, align 4 - %41 = call noundef i32 @_ZN13JVMFlagAccess13set_or_assertE12JVMFlagsEnumiPv13JVMFlagOrigin(i32 noundef 967, i32 noundef 2, ptr noundef nonnull %1, i32 noundef 5) #13 + store i32 %39, ptr %1, align 4 + %40 = call noundef i32 @_ZN13JVMFlagAccess13set_or_assertE12JVMFlagsEnumiPv13JVMFlagOrigin(i32 noundef 967, i32 noundef 2, ptr noundef nonnull %1, i32 noundef 5) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) - br label %46 + br label %45 -42: ; preds = %35 - %43 = icmp ult i32 %37, %38 - br i1 %43, label %44, label %46 +41: ; preds = %34 + %42 = icmp ult i32 %36, %37 + br i1 %42, label %43, label %45 -44: ; preds = %42 - call void (ptr, ptr, ...) @_ZN12FormatBufferILm256EEC2EPKcz(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef nonnull @.str.11, i32 noundef %37, i32 noundef %38) - %45 = load ptr, ptr %4, align 8 - call void @_Z29vm_exit_during_initializationPKcS0_(ptr noundef %45, ptr noundef null) #13 - br label %46 +43: ; preds = %41 + call void (ptr, ptr, ...) @_ZN12FormatBufferILm256EEC2EPKcz(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef nonnull @.str.11, i32 noundef %36, i32 noundef %37) + %44 = load ptr, ptr %4, align 8 + call void @_Z29vm_exit_during_initializationPKcS0_(ptr noundef %44, ptr noundef null) #13 + br label %45 -46: ; preds = %42, %44, %39 +45: ; preds = %41, %43, %38 ret void } diff --git a/bench/openjdk/optimized/g1CardSet.ll b/bench/openjdk/optimized/g1CardSet.ll index 14c991d8f0c..3321c51f15b 100644 --- a/bench/openjdk/optimized/g1CardSet.ll +++ b/bench/openjdk/optimized/g1CardSet.ll @@ -613,10 +613,9 @@ define hidden void @_ZN22G1CardSetConfigurationC2Ejdjdjj(ptr nocapture noundef n %17 = tail call noundef i64 @llvm.umin.i64(i64 %16, i64 %11) %18 = tail call noundef i64 @llvm.umax.i64(i64 %17, i64 1) %19 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %18, i1 true) - %20 = xor i64 %19, 63 - %21 = shl nuw nsw i64 1, %20 - %22 = trunc nuw nsw i64 %21 to i32 - tail call void @_ZN22G1CardSetConfigurationC2Ejjdjdjj(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %8, i32 noundef %1, double noundef %2, i32 noundef %22, double noundef %4, i32 noundef %5, i32 noundef %6) + %20 = lshr exact i64 -9223372036854775808, %19 + %21 = trunc nuw nsw i64 %20 to i32 + tail call void @_ZN22G1CardSetConfigurationC2Ejjdjdjj(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %8, i32 noundef %1, double noundef %2, i32 noundef %21, double noundef %4, i32 noundef %5, i32 noundef %6) ret void } diff --git a/bench/openjdk/optimized/jdcolor.ll b/bench/openjdk/optimized/jdcolor.ll index 07780cca506..fdfdb0bca7e 100644 --- a/bench/openjdk/optimized/jdcolor.ll +++ b/bench/openjdk/optimized/jdcolor.ll @@ -573,7 +573,7 @@ define internal void @ycck_cmyk_convert(ptr nocapture noundef readonly %0, ptr n .lr.ph.us: ; preds = %.lr.ph.us.preheader, %..loopexit_crit_edge.us %.in = phi i32 [ %24, %..loopexit_crit_edge.us ], [ %4, %.lr.ph.us.preheader ] %.061.us = phi i32 [ %38, %..loopexit_crit_edge.us ], [ %2, %.lr.ph.us.preheader ] - %.04760.us = phi ptr [ %78, %..loopexit_crit_edge.us ], [ %3, %.lr.ph.us.preheader ] + %.04760.us = phi ptr [ %81, %..loopexit_crit_edge.us ], [ %3, %.lr.ph.us.preheader ] %24 = add nsw i32 %.in, -1 %25 = load ptr, ptr %1, align 8 %26 = zext i32 %.061.us to i64 @@ -594,57 +594,59 @@ define internal void @ycck_cmyk_convert(ptr nocapture noundef readonly %0, ptr n 40: ; preds = %.lr.ph.us, %40 %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %40 ] - %.04959.us = phi ptr [ %39, %.lr.ph.us ], [ %77, %40 ] + %.04959.us = phi ptr [ %39, %.lr.ph.us ], [ %80, %40 ] %41 = getelementptr inbounds nuw i8, ptr %28, i64 %indvars.iv %42 = load i8, ptr %41, align 1 - %43 = getelementptr inbounds nuw i8, ptr %31, i64 %indvars.iv - %44 = load i8, ptr %43, align 1 - %45 = getelementptr inbounds nuw i8, ptr %34, i64 %indvars.iv - %46 = load i8, ptr %45, align 1 - %47 = zext i8 %46 to i64 - %48 = getelementptr inbounds nuw i32, ptr %13, i64 %47 - %49 = load i32, ptr %48, align 4 - %50 = xor i8 %42, -1 - %.neg53.us = zext i8 %50 to i32 - %51 = sub i32 %.neg53.us, %49 - %52 = sext i32 %51 to i64 - %53 = getelementptr inbounds i8, ptr %11, i64 %52 - %54 = load i8, ptr %53, align 1 - store i8 %54, ptr %.04959.us, align 1 - %55 = zext i8 %44 to i64 - %56 = getelementptr inbounds nuw i32, ptr %19, i64 %55 - %57 = load i32, ptr %56, align 4 - %58 = getelementptr inbounds nuw i32, ptr %17, i64 %47 - %59 = load i32, ptr %58, align 4 - %60 = add nsw i32 %59, %57 - %61 = ashr i32 %60, 16 - %62 = sub nsw i32 %.neg53.us, %61 - %63 = sext i32 %62 to i64 - %64 = getelementptr inbounds i8, ptr %11, i64 %63 - %65 = load i8, ptr %64, align 1 - %66 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 1 - store i8 %65, ptr %66, align 1 - %67 = getelementptr inbounds nuw i32, ptr %15, i64 %55 - %68 = load i32, ptr %67, align 4 - %69 = sub i32 %.neg53.us, %68 - %70 = sext i32 %69 to i64 - %71 = getelementptr inbounds i8, ptr %11, i64 %70 - %72 = load i8, ptr %71, align 1 - %73 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 2 - store i8 %72, ptr %73, align 1 - %74 = getelementptr inbounds nuw i8, ptr %37, i64 %indvars.iv + %43 = zext i8 %42 to i32 + %44 = getelementptr inbounds nuw i8, ptr %31, i64 %indvars.iv + %45 = load i8, ptr %44, align 1 + %46 = getelementptr inbounds nuw i8, ptr %34, i64 %indvars.iv + %47 = load i8, ptr %46, align 1 + %48 = zext i8 %47 to i64 + %49 = getelementptr inbounds nuw i32, ptr %13, i64 %48 + %50 = load i32, ptr %49, align 4 + %51 = add i32 %50, %43 + %52 = sub i32 255, %51 + %53 = sext i32 %52 to i64 + %54 = getelementptr inbounds i8, ptr %11, i64 %53 + %55 = load i8, ptr %54, align 1 + store i8 %55, ptr %.04959.us, align 1 + %56 = zext i8 %45 to i64 + %57 = getelementptr inbounds nuw i32, ptr %19, i64 %56 + %58 = load i32, ptr %57, align 4 + %59 = getelementptr inbounds nuw i32, ptr %17, i64 %48 + %60 = load i32, ptr %59, align 4 + %61 = add nsw i32 %60, %58 + %62 = ashr i32 %61, 16 + %63 = add nsw i32 %62, %43 + %64 = sub nsw i32 255, %63 + %65 = sext i32 %64 to i64 + %66 = getelementptr inbounds i8, ptr %11, i64 %65 + %67 = load i8, ptr %66, align 1 + %68 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 1 + store i8 %67, ptr %68, align 1 + %69 = getelementptr inbounds nuw i32, ptr %15, i64 %56 + %70 = load i32, ptr %69, align 4 + %71 = add i32 %70, %43 + %72 = sub i32 255, %71 + %73 = sext i32 %72 to i64 + %74 = getelementptr inbounds i8, ptr %11, i64 %73 %75 = load i8, ptr %74, align 1 - %76 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 3 + %76 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 2 store i8 %75, ptr %76, align 1 - %77 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 4 + %77 = getelementptr inbounds nuw i8, ptr %37, i64 %indvars.iv + %78 = load i8, ptr %77, align 1 + %79 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 3 + store i8 %78, ptr %79, align 1 + %80 = getelementptr inbounds nuw i8, ptr %.04959.us, i64 4 %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 %..loopexit_crit_edge.us, label %40, !llvm.loop !16 ..loopexit_crit_edge.us: ; preds = %40 - %78 = getelementptr inbounds nuw i8, ptr %.04760.us, i64 8 - %79 = icmp sgt i32 %.in, 1 - br i1 %79, label %.lr.ph.us, label %._crit_edge, !llvm.loop !17 + %81 = getelementptr inbounds nuw i8, ptr %.04760.us, i64 8 + %82 = icmp sgt i32 %.in, 1 + br i1 %82, label %.lr.ph.us, label %._crit_edge, !llvm.loop !17 ._crit_edge: ; preds = %..loopexit_crit_edge.us, %.lr.ph62, %5 ret void diff --git a/bench/openjdk/optimized/memnode.ll b/bench/openjdk/optimized/memnode.ll index 976234ff427..5b441fddd47 100644 --- a/bench/openjdk/optimized/memnode.ll +++ b/bench/openjdk/optimized/memnode.ll @@ -11535,16 +11535,15 @@ _ZN9Node_List4pushEP4Node.exit16: ; preds = %44, %47 .critedge: ; preds = %_ZN9Node_List4pushEP4Node.exit16, %_ZNK25MergePrimitiveArrayStores23find_adjacent_def_storeEPK9StoreNode.exit, %_ZN9Node_List4pushEP4Node.exit %53 = phi i32 [ %21, %_ZN9Node_List4pushEP4Node.exit ], [ %43, %_ZNK25MergePrimitiveArrayStores23find_adjacent_def_storeEPK9StoreNode.exit ], [ %.pre.pre, %_ZN9Node_List4pushEP4Node.exit16 ] %54 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %53, i1 true) - %55 = xor i32 %54, 31 - %56 = shl nuw i32 1, %55 - %57 = icmp ugt i32 %53, %56 - br i1 %57, label %.lr.ph21.preheader, label %58 + %55 = lshr exact i32 -2147483648, %54 + %56 = icmp ugt i32 %53, %55 + br i1 %56, label %.lr.ph21.preheader, label %57 .lr.ph21.preheader: ; preds = %.critedge - store i32 %56, ptr %11, align 8 - br label %58 + store i32 %55, ptr %11, align 8 + br label %57 -58: ; preds = %.lr.ph21.preheader, %.critedge +57: ; preds = %.lr.ph21.preheader, %.critedge ret void } diff --git a/bench/openjdk/optimized/os.ll b/bench/openjdk/optimized/os.ll index f477bad4db6..a76dd9d9371 100644 --- a/bench/openjdk/optimized/os.ll +++ b/bench/openjdk/optimized/os.ll @@ -3472,51 +3472,48 @@ define hidden noundef i64 @_ZN2os20page_size_for_regionEmmb(i64 noundef %0, i64 9: ; preds = %6 %10 = icmp eq i64 %8, 0 %11 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %8, i1 true) - %12 = xor i64 %11, 63 - %13 = shl nuw nsw i64 1, %12 + %12 = lshr exact i64 -9223372036854775808, %11 br i1 %10, label %.loopexit, label %.lr.ph .lr.ph: ; preds = %9, %6 - %.0.i.ph = phi i64 [ -9223372036854775808, %6 ], [ %13, %9 ] + %.0.i.ph = phi i64 [ -9223372036854775808, %6 ], [ %12, %9 ] br i1 %2, label %.lr.ph.split.us, label %.lr.ph.split .lr.ph.split.us: ; preds = %.lr.ph, %select.unfold.us - %.017.us = phi i64 [ %20, %select.unfold.us ], [ %.0.i.ph, %.lr.ph ] + %.017.us = phi i64 [ %18, %select.unfold.us ], [ %.0.i.ph, %.lr.ph ] %.not12.us = icmp ule i64 %.017.us, %7 %.pre = add i64 %.017.us, -1 - %14 = and i64 %.pre, %0 - %15 = icmp eq i64 %14, 0 - %or.cond = and i1 %.not12.us, %15 + %13 = and i64 %.pre, %0 + %14 = icmp eq i64 %13, 0 + %or.cond = and i1 %.not12.us, %14 br i1 %or.cond, label %.loopexit14, label %select.unfold.us select.unfold.us: ; preds = %.lr.ph.split.us - %16 = and i64 %.pre, %8 - %17 = icmp eq i64 %16, 0 - %18 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %16, i1 true) - %19 = xor i64 %18, 63 - %20 = shl nuw i64 1, %19 - br i1 %17, label %.loopexit, label %.lr.ph.split.us + %15 = and i64 %.pre, %8 + %16 = icmp eq i64 %15, 0 + %17 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %15, i1 true) + %18 = lshr exact i64 -9223372036854775808, %17 + br i1 %16, label %.loopexit, label %.lr.ph.split.us .lr.ph.split: ; preds = %.lr.ph, %select.unfold - %.017 = phi i64 [ %26, %select.unfold ], [ %.0.i.ph, %.lr.ph ] + %.017 = phi i64 [ %23, %select.unfold ], [ %.0.i.ph, %.lr.ph ] %.not12 = icmp ugt i64 %.017, %7 br i1 %.not12, label %select.unfold, label %.loopexit14 select.unfold: ; preds = %.lr.ph.split - %21 = add i64 %.017, -1 - %22 = and i64 %21, %8 - %23 = icmp eq i64 %22, 0 - %24 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %22, i1 true) - %25 = xor i64 %24, 63 - %26 = shl nuw i64 1, %25 - br i1 %23, label %.loopexit, label %.lr.ph.split + %19 = add i64 %.017, -1 + %20 = and i64 %19, %8 + %21 = icmp eq i64 %20, 0 + %22 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %20, i1 true) + %23 = lshr exact i64 -9223372036854775808, %22 + br i1 %21, label %.loopexit, label %.lr.ph.split .loopexit: ; preds = %select.unfold, %select.unfold.us, %9, %3 - %27 = load i64, ptr @_ZN6OSInfo13_vm_page_sizeE, align 8 + %24 = load i64, ptr @_ZN6OSInfo13_vm_page_sizeE, align 8 br label %.loopexit14 .loopexit14: ; preds = %.lr.ph.split, %.lr.ph.split.us, %.loopexit - %.011 = phi i64 [ %27, %.loopexit ], [ %.017.us, %.lr.ph.split.us ], [ %.017, %.lr.ph.split ] + %.011 = phi i64 [ %24, %.loopexit ], [ %.017.us, %.lr.ph.split.us ], [ %.017, %.lr.ph.split ] ret i64 %.011 } @@ -3524,17 +3521,16 @@ select.unfold: ; preds = %.lr.ph.split define hidden noundef range(i64 0, -9223372036854775807) i64 @_ZNK2os9PageSizes7largestEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %0) local_unnamed_addr #19 align 2 { %2 = load i64, ptr %0, align 8 %.not = icmp sgt i64 %2, -1 - br i1 %.not, label %3, label %8 + br i1 %.not, label %3, label %7 3: ; preds = %1 %4 = icmp eq i64 %2, 0 %5 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %2, i1 true) - %6 = xor i64 %5, 63 - %7 = shl nuw nsw i64 1, %6 - %.0.i = select i1 %4, i64 0, i64 %7 - br label %8 + %6 = lshr exact i64 -9223372036854775808, %5 + %.0.i = select i1 %4, i64 0, i64 %6 + br label %7 -8: ; preds = %1, %3 +7: ; preds = %1, %3 %.0 = phi i64 [ %.0.i, %3 ], [ -9223372036854775808, %1 ] ret i64 %.0 } @@ -3546,9 +3542,8 @@ define hidden noundef range(i64 0, -9223372036854775807) i64 @_ZNK2os9PageSizes1 %5 = and i64 %3, %4 %6 = icmp eq i64 %5, 0 %7 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %5, i1 true) - %8 = xor i64 %7, 63 - %9 = shl nuw i64 1, %8 - %.0 = select i1 %6, i64 0, i64 %9 + %8 = lshr exact i64 -9223372036854775808, %7 + %.0 = select i1 %6, i64 0, i64 %8 ret i64 %.0 } @@ -3567,37 +3562,35 @@ define hidden noundef i64 @_ZN2os28page_size_for_region_alignedEmm(i64 noundef % 8: ; preds = %5 %9 = icmp eq i64 %7, 0 %10 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %7, i1 true) - %11 = xor i64 %10, 63 - %12 = shl nuw nsw i64 1, %11 + %11 = lshr exact i64 -9223372036854775808, %10 br i1 %9, label %.loopexit.i, label %.lr.ph.split.us.i.preheader .lr.ph.split.us.i.preheader: ; preds = %8, %5 - %.017.us.i.ph = phi i64 [ %12, %8 ], [ -9223372036854775808, %5 ] + %.017.us.i.ph = phi i64 [ %11, %8 ], [ -9223372036854775808, %5 ] br label %.lr.ph.split.us.i .lr.ph.split.us.i: ; preds = %.lr.ph.split.us.i.preheader, %select.unfold.us.i - %.017.us.i = phi i64 [ %19, %select.unfold.us.i ], [ %.017.us.i.ph, %.lr.ph.split.us.i.preheader ] + %.017.us.i = phi i64 [ %17, %select.unfold.us.i ], [ %.017.us.i.ph, %.lr.ph.split.us.i.preheader ] %.not12.us.i = icmp ule i64 %.017.us.i, %6 %.pre.i = add i64 %.017.us.i, -1 - %13 = and i64 %.pre.i, %0 - %14 = icmp eq i64 %13, 0 - %or.cond.i = and i1 %.not12.us.i, %14 + %12 = and i64 %.pre.i, %0 + %13 = icmp eq i64 %12, 0 + %or.cond.i = and i1 %.not12.us.i, %13 br i1 %or.cond.i, label %_ZN2os20page_size_for_regionEmmb.exit, label %select.unfold.us.i select.unfold.us.i: ; preds = %.lr.ph.split.us.i - %15 = and i64 %.pre.i, %7 - %16 = icmp eq i64 %15, 0 - %17 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %15, i1 true) - %18 = xor i64 %17, 63 - %19 = shl nuw nsw i64 1, %18 - br i1 %16, label %.loopexit.i, label %.lr.ph.split.us.i + %14 = and i64 %.pre.i, %7 + %15 = icmp eq i64 %14, 0 + %16 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %14, i1 true) + %17 = lshr exact i64 -9223372036854775808, %16 + br i1 %15, label %.loopexit.i, label %.lr.ph.split.us.i .loopexit.i: ; preds = %select.unfold.us.i, %8, %2 - %20 = load i64, ptr @_ZN6OSInfo13_vm_page_sizeE, align 8 + %18 = load i64, ptr @_ZN6OSInfo13_vm_page_sizeE, align 8 br label %_ZN2os20page_size_for_regionEmmb.exit _ZN2os20page_size_for_regionEmmb.exit: ; preds = %.lr.ph.split.us.i, %.loopexit.i - %.011.i = phi i64 [ %20, %.loopexit.i ], [ %.017.us.i, %.lr.ph.split.us.i ] + %.011.i = phi i64 [ %18, %.loopexit.i ], [ %.017.us.i, %.lr.ph.split.us.i ] ret i64 %.011.i } @@ -3616,34 +3609,32 @@ define hidden noundef i64 @_ZN2os30page_size_for_region_unalignedEmm(i64 noundef 8: ; preds = %5 %9 = icmp eq i64 %7, 0 %10 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %7, i1 true) - %11 = xor i64 %10, 63 - %12 = shl nuw nsw i64 1, %11 + %11 = lshr exact i64 -9223372036854775808, %10 br i1 %9, label %.loopexit.i, label %.lr.ph.split.i.preheader .lr.ph.split.i.preheader: ; preds = %8, %5 - %.017.i.ph = phi i64 [ %12, %8 ], [ -9223372036854775808, %5 ] + %.017.i.ph = phi i64 [ %11, %8 ], [ -9223372036854775808, %5 ] br label %.lr.ph.split.i .lr.ph.split.i: ; preds = %.lr.ph.split.i.preheader, %select.unfold.i - %.017.i = phi i64 [ %18, %select.unfold.i ], [ %.017.i.ph, %.lr.ph.split.i.preheader ] + %.017.i = phi i64 [ %16, %select.unfold.i ], [ %.017.i.ph, %.lr.ph.split.i.preheader ] %.not12.i = icmp ugt i64 %.017.i, %6 br i1 %.not12.i, label %select.unfold.i, label %_ZN2os20page_size_for_regionEmmb.exit select.unfold.i: ; preds = %.lr.ph.split.i - %13 = add i64 %.017.i, -1 - %14 = and i64 %13, %7 - %15 = icmp eq i64 %14, 0 - %16 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %14, i1 true) - %17 = xor i64 %16, 63 - %18 = shl nuw nsw i64 1, %17 - br i1 %15, label %.loopexit.i, label %.lr.ph.split.i + %12 = add i64 %.017.i, -1 + %13 = and i64 %12, %7 + %14 = icmp eq i64 %13, 0 + %15 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %13, i1 true) + %16 = lshr exact i64 -9223372036854775808, %15 + br i1 %14, label %.loopexit.i, label %.lr.ph.split.i .loopexit.i: ; preds = %select.unfold.i, %8, %2 - %19 = load i64, ptr @_ZN6OSInfo13_vm_page_sizeE, align 8 + %17 = load i64, ptr @_ZN6OSInfo13_vm_page_sizeE, align 8 br label %_ZN2os20page_size_for_regionEmmb.exit _ZN2os20page_size_for_regionEmmb.exit: ; preds = %.lr.ph.split.i, %.loopexit.i - %.011.i = phi i64 [ %19, %.loopexit.i ], [ %.017.i, %.lr.ph.split.i ] + %.011.i = phi i64 [ %17, %.loopexit.i ], [ %.017.i, %.lr.ph.split.i ] ret i64 %.011.i } diff --git a/bench/openjdk/optimized/xHeuristics.ll b/bench/openjdk/optimized/xHeuristics.ll index 57eb94c3556..1e5a12458c0 100644 --- a/bench/openjdk/optimized/xHeuristics.ll +++ b/bench/openjdk/optimized/xHeuristics.ll @@ -22,27 +22,26 @@ define hidden void @_ZN11XHeuristics20set_medium_page_sizeEv() local_unnamed_add %2 = uitofp i64 %1 to double %3 = fmul double %2, 3.125000e-02 %4 = fptoui double %3 to i64 - %5 = tail call noundef i64 @llvm.umax.i64(i64 %4, i64 2097152) - %6 = tail call noundef i64 @llvm.umin.i64(i64 %5, i64 33554432) - %7 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %6, i1 true) - %8 = xor i64 %7, 63 - %9 = icmp samesign ugt i64 %8, 21 - br i1 %9, label %10, label %16 - -10: ; preds = %0 - %11 = shl nuw nsw i64 1, %8 - store i64 %11, ptr @XPageSizeMedium, align 8 - %12 = trunc nuw nsw i64 %8 to i32 - store i64 %8, ptr @XPageSizeMediumShift, align 8 - %13 = lshr i64 %11, 3 - store i64 %13, ptr @XObjectSizeLimitMedium, align 8 - %14 = add nsw i32 %12, -13 - store i32 %14, ptr @XObjectAlignmentMediumShift, align 4 - %15 = shl nuw nsw i32 1, %14 - store i32 %15, ptr @XObjectAlignmentMedium, align 4 - br label %16 - -16: ; preds = %10, %0 + %5 = icmp ugt i64 %4, 4194303 + br i1 %5, label %6, label %15 + +6: ; preds = %0 + %7 = tail call noundef i64 @llvm.umin.i64(i64 %4, i64 33554432) + %8 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %7, i1 true) + %9 = lshr exact i64 -9223372036854775808, %8 + store i64 %9, ptr @XPageSizeMedium, align 8 + %10 = trunc nuw nsw i64 %8 to i32 + %11 = sub nuw nsw i64 63, %8 + store i64 %11, ptr @XPageSizeMediumShift, align 8 + %12 = lshr i64 1152921504606846976, %8 + store i64 %12, ptr @XObjectSizeLimitMedium, align 8 + %13 = sub nuw nsw i32 50, %10 + store i32 %13, ptr @XObjectAlignmentMediumShift, align 4 + %14 = shl nuw nsw i32 1, %13 + store i32 %14, ptr @XObjectAlignmentMedium, align 4 + br label %15 + +15: ; preds = %6, %0 ret void } @@ -131,9 +130,6 @@ declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #3 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #3 - attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } diff --git a/bench/openjdk/optimized/xMark.ll b/bench/openjdk/optimized/xMark.ll index eddd98e0ffa..f2063970bc3 100644 --- a/bench/openjdk/optimized/xMark.ll +++ b/bench/openjdk/optimized/xMark.ll @@ -565,11 +565,10 @@ declare noundef zeroext i1 @_ZNK19XMarkStackAllocator14is_initializedEv(ptr noun ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define hidden noundef range(i64 1, 17) i64 @_ZNK5XMark18calculate_nstripesEj(ptr nocapture noundef nonnull readnone align 64 dereferenceable(2492) %0, i32 noundef %1) local_unnamed_addr #2 align 2 { %3 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %1, i1 true) - %4 = xor i32 %3, 31 - %5 = shl nuw i32 1, %4 - %6 = tail call i32 @llvm.umin.i32(i32 %5, i32 16) - %7 = zext nneg i32 %6 to i64 - ret i64 %7 + %4 = lshr exact i32 -2147483648, %3 + %5 = tail call i32 @llvm.umin.i32(i32 %4, i32 16) + %6 = zext nneg i32 %5 to i64 + ret i64 %6 } ; Function Attrs: mustprogress nounwind uwtable @@ -611,43 +610,42 @@ _ZNK5XMark23verify_all_stacks_emptyEv.exit: ; preds = %5 %17 = getelementptr inbounds nuw i8, ptr %0, i64 2488 store i32 %16, ptr %17, align 8 %18 = call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %16, i1 true) - %19 = xor i32 %18, 31 - %20 = shl nuw i32 1, %19 - %21 = call i32 @llvm.umin.i32(i32 %20, i32 16) - %22 = zext nneg i32 %21 to i64 - %23 = getelementptr inbounds nuw i8, ptr %0, i64 192 - call void @_ZN14XMarkStripeSet12set_nstripesEm(ptr noundef nonnull align 64 dereferenceable(2112) %23, i64 noundef %22) #17 - call void @_ZN9XStatMark17set_at_mark_startEm(i64 noundef %22) #17 - %24 = load volatile ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16LogTagSetMappingILN6LogTag4typeE49ELS1_80ELS1_0ELS1_0ELS1_0ELS1_0EE7_tagsetE, i64 56), align 8 - %.not = icmp eq ptr %24, null - br i1 %.not, label %.loopexit, label %25 - -25: ; preds = %11 + %19 = lshr exact i32 -2147483648, %18 + %20 = call i32 @llvm.umin.i32(i32 %19, i32 16) + %21 = zext nneg i32 %20 to i64 + %22 = getelementptr inbounds nuw i8, ptr %0, i64 192 + call void @_ZN14XMarkStripeSet12set_nstripesEm(ptr noundef nonnull align 64 dereferenceable(2112) %22, i64 noundef %21) #17 + call void @_ZN9XStatMark17set_at_mark_startEm(i64 noundef %21) #17 + %23 = load volatile ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN16LogTagSetMappingILN6LogTag4typeE49ELS1_80ELS1_0ELS1_0ELS1_0ELS1_0EE7_tagsetE, i64 56), align 8 + %.not = icmp eq ptr %23, null + br i1 %.not, label %.loopexit, label %24 + +24: ; preds = %11 call void (ptr, ...) @_ZN13LogTargetImplILN8LogLevel4typeE2ELN6LogTag4typeE49ELS3_80ELS3_0ELS3_0ELS3_0ELS3_0EE5printEPKcz(ptr noundef nonnull @.str.11) - %26 = load i32, ptr %17, align 8 - %.not11 = icmp eq i32 %26, 0 + %25 = load i32, ptr %17, align 8 + %.not11 = icmp eq i32 %25, 0 br i1 %.not11, label %.loopexit, label %.lr.ph -.lr.ph: ; preds = %25 - %27 = getelementptr inbounds nuw i8, ptr %0, i64 256 - %28 = ptrtoint ptr %27 to i64 - br label %29 +.lr.ph: ; preds = %24 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 256 + %27 = ptrtoint ptr %26 to i64 + br label %28 -29: ; preds = %.lr.ph, %29 - %30 = phi i32 [ %26, %.lr.ph ], [ %37, %29 ] - %.010 = phi i32 [ 0, %.lr.ph ], [ %36, %29 ] - %31 = call noundef ptr @_ZN14XMarkStripeSet17stripe_for_workerEjj(ptr noundef nonnull align 64 dereferenceable(2112) %23, i32 noundef %30, i32 noundef %.010) #17 - %32 = ptrtoint ptr %31 to i64 - %33 = sub i64 %32, %28 - %34 = lshr i64 %33, 7 - %35 = load i32, ptr %17, align 8 - call void (ptr, ...) @_ZN13LogTargetImplILN8LogLevel4typeE2ELN6LogTag4typeE49ELS3_80ELS3_0ELS3_0ELS3_0ELS3_0EE5printEPKcz(ptr noundef nonnull @.str.12, i32 noundef %.010, i32 noundef %35, i64 noundef %34, i64 noundef %22) - %36 = add nuw i32 %.010, 1 - %37 = load i32, ptr %17, align 8 - %38 = icmp ult i32 %36, %37 - br i1 %38, label %29, label %.loopexit, !llvm.loop !6 - -.loopexit: ; preds = %29, %25, %11 +28: ; preds = %.lr.ph, %28 + %29 = phi i32 [ %25, %.lr.ph ], [ %36, %28 ] + %.010 = phi i32 [ 0, %.lr.ph ], [ %35, %28 ] + %30 = call noundef ptr @_ZN14XMarkStripeSet17stripe_for_workerEjj(ptr noundef nonnull align 64 dereferenceable(2112) %22, i32 noundef %29, i32 noundef %.010) #17 + %31 = ptrtoint ptr %30 to i64 + %32 = sub i64 %31, %27 + %33 = lshr i64 %32, 7 + %34 = load i32, ptr %17, align 8 + call void (ptr, ...) @_ZN13LogTargetImplILN8LogLevel4typeE2ELN6LogTag4typeE49ELS3_80ELS3_0ELS3_0ELS3_0ELS3_0EE5printEPKcz(ptr noundef nonnull @.str.12, i32 noundef %.010, i32 noundef %34, i64 noundef %33, i64 noundef %21) + %35 = add nuw i32 %.010, 1 + %36 = load i32, ptr %17, align 8 + %37 = icmp ult i32 %35, %36 + br i1 %37, label %28, label %.loopexit, !llvm.loop !6 + +.loopexit: ; preds = %28, %24, %11 ret void } diff --git a/bench/openmpi/optimized/coll_basic_barrier.ll b/bench/openmpi/optimized/coll_basic_barrier.ll index 34dcc99125e..ad2df9f5668 100644 --- a/bench/openmpi/optimized/coll_basic_barrier.ll +++ b/bench/openmpi/optimized/coll_basic_barrier.ll @@ -27,84 +27,84 @@ define i32 @mca_coll_basic_barrier_intra_log(ptr noundef %0, ptr nocapture nound %9 = and i32 %.val60, %8 %10 = icmp eq i32 %9, 0 %11 = tail call range(i32 1, 33) i32 @llvm.ctlz.i32(i32 %9, i1 true) - %12 = xor i32 %11, 31 - %.0.i = select i1 %10, i32 -1, i32 %12 - %13 = add nsw i32 %7, -1 - %14 = icmp sgt i32 %13, %.0.i - br i1 %14, label %.lr.ph.preheader, label %._crit_edge + %narrow.i = sub nuw nsw i32 31, %11 + %.0.i = select i1 %10, i32 -1, i32 %narrow.i + %12 = add nsw i32 %7, -1 + %13 = icmp sgt i32 %12, %.0.i + br i1 %13, label %.lr.ph.preheader, label %._crit_edge .lr.ph.preheader: ; preds = %2 - %15 = shl nuw i32 1, %13 + %14 = shl nuw i32 1, %12 br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %21 - %.04563 = phi i32 [ %22, %21 ], [ %13, %.lr.ph.preheader ] - %.04662 = phi i32 [ %23, %21 ], [ %15, %.lr.ph.preheader ] - %16 = or i32 %.04662, %.val60 - %17 = icmp slt i32 %16, %.val.val - br i1 %17, label %18, label %21 - -18: ; preds = %.lr.ph - %19 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 72), align 8 - %20 = tail call i32 %19(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %16, i32 noundef -16, ptr noundef %0, ptr noundef null) #2 - %.not59 = icmp eq i32 %20, 0 - br i1 %.not59, label %21, label %.loopexit - -21: ; preds = %.lr.ph, %18 - %22 = add nsw i32 %.04563, -1 - %23 = ashr i32 %.04662, 1 - %24 = icmp sgt i32 %22, %.0.i - br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !4 - -._crit_edge: ; preds = %21, %2 - %25 = icmp sgt i32 %.val60, 0 - br i1 %25, label %26, label %35 - -26: ; preds = %._crit_edge - %27 = shl nuw nsw i32 1, %.0.i - %28 = xor i32 %27, -1 - %29 = and i32 %.val60, %28 - %30 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 96), align 8 - %31 = tail call i32 %30(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %29, i32 noundef -16, i32 noundef 4, ptr noundef %0) #2 - %.not = icmp eq i32 %31, 0 - br i1 %.not, label %32, label %.loopexit - -32: ; preds = %26 - %33 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 72), align 8 - %34 = tail call i32 %33(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %29, i32 noundef -16, ptr noundef %0, ptr noundef null) #2 - %.not56 = icmp eq i32 %34, 0 - br i1 %.not56, label %35, label %.loopexit - -35: ; preds = %32, %._crit_edge - %36 = add nsw i32 %.0.i, 1 - %.not57.not64 = icmp slt i32 %36, %7 +.lr.ph: ; preds = %.lr.ph.preheader, %20 + %.04563 = phi i32 [ %21, %20 ], [ %12, %.lr.ph.preheader ] + %.04662 = phi i32 [ %22, %20 ], [ %14, %.lr.ph.preheader ] + %15 = or i32 %.04662, %.val60 + %16 = icmp slt i32 %15, %.val.val + br i1 %16, label %17, label %20 + +17: ; preds = %.lr.ph + %18 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 72), align 8 + %19 = tail call i32 %18(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %15, i32 noundef -16, ptr noundef %0, ptr noundef null) #2 + %.not59 = icmp eq i32 %19, 0 + br i1 %.not59, label %20, label %.loopexit + +20: ; preds = %.lr.ph, %17 + %21 = add nsw i32 %.04563, -1 + %22 = ashr i32 %.04662, 1 + %23 = icmp sgt i32 %21, %.0.i + br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !4 + +._crit_edge: ; preds = %20, %2 + %24 = icmp sgt i32 %.val60, 0 + br i1 %24, label %25, label %34 + +25: ; preds = %._crit_edge + %26 = shl nuw nsw i32 1, %.0.i + %27 = xor i32 %26, -1 + %28 = and i32 %.val60, %27 + %29 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 96), align 8 + %30 = tail call i32 %29(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %28, i32 noundef -16, i32 noundef 4, ptr noundef %0) #2 + %.not = icmp eq i32 %30, 0 + br i1 %.not, label %31, label %.loopexit + +31: ; preds = %25 + %32 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 72), align 8 + %33 = tail call i32 %32(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %28, i32 noundef -16, ptr noundef %0, ptr noundef null) #2 + %.not56 = icmp eq i32 %33, 0 + br i1 %.not56, label %34, label %.loopexit + +34: ; preds = %31, %._crit_edge + %35 = add nsw i32 %.0.i, 1 + %.not57.not64 = icmp slt i32 %35, %7 br i1 %.not57.not64, label %.lr.ph68.preheader, label %.loopexit -.lr.ph68.preheader: ; preds = %35 - %37 = shl nuw i32 1, %36 +.lr.ph68.preheader: ; preds = %34 + %36 = shl nuw i32 1, %35 br label %.lr.ph68 -.lr.ph68: ; preds = %.lr.ph68.preheader, %43 - %.166 = phi i32 [ %44, %43 ], [ %36, %.lr.ph68.preheader ] - %.14765 = phi i32 [ %45, %43 ], [ %37, %.lr.ph68.preheader ] - %38 = or i32 %.14765, %.val60 - %39 = icmp slt i32 %38, %.val.val - br i1 %39, label %40, label %43 - -40: ; preds = %.lr.ph68 - %41 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 96), align 8 - %42 = tail call i32 %41(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %38, i32 noundef -16, i32 noundef 4, ptr noundef %0) #2 - %.not58 = icmp eq i32 %42, 0 - br i1 %.not58, label %43, label %.loopexit - -43: ; preds = %.lr.ph68, %40 - %44 = add i32 %.166, 1 - %45 = shl i32 %.14765, 1 - %exitcond.not = icmp eq i32 %44, %7 +.lr.ph68: ; preds = %.lr.ph68.preheader, %42 + %.166 = phi i32 [ %43, %42 ], [ %35, %.lr.ph68.preheader ] + %.14765 = phi i32 [ %44, %42 ], [ %36, %.lr.ph68.preheader ] + %37 = or i32 %.14765, %.val60 + %38 = icmp slt i32 %37, %.val.val + br i1 %38, label %39, label %42 + +39: ; preds = %.lr.ph68 + %40 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @mca_pml, i64 96), align 8 + %41 = tail call i32 %40(ptr noundef null, i64 noundef 0, ptr noundef nonnull @ompi_mpi_byte, i32 noundef %37, i32 noundef -16, i32 noundef 4, ptr noundef %0) #2 + %.not58 = icmp eq i32 %41, 0 + br i1 %.not58, label %42, label %.loopexit + +42: ; preds = %.lr.ph68, %39 + %43 = add i32 %.166, 1 + %44 = shl i32 %.14765, 1 + %exitcond.not = icmp eq i32 %43, %7 br i1 %exitcond.not, label %.loopexit, label %.lr.ph68, !llvm.loop !6 -.loopexit: ; preds = %18, %40, %43, %35, %32, %26 - %.0 = phi i32 [ %31, %26 ], [ %34, %32 ], [ 0, %35 ], [ %42, %40 ], [ 0, %43 ], [ %20, %18 ] +.loopexit: ; preds = %17, %39, %42, %34, %31, %25 + %.0 = phi i32 [ %30, %25 ], [ %33, %31 ], [ 0, %34 ], [ %41, %39 ], [ 0, %42 ], [ %19, %17 ] ret i32 %.0 } diff --git a/bench/openspiel/optimized/bargaining.cc.ll b/bench/openspiel/optimized/bargaining.cc.ll index b68ff25f355..2f1107401bf 100644 --- a/bench/openspiel/optimized/bargaining.cc.ll +++ b/bench/openspiel/optimized/bargaining.cc.ll @@ -1933,96 +1933,98 @@ define void @_ZNK10open_spiel10bargaining15BargainingState7ReturnsEv(ptr dead_on %11 = ptrtoint ptr %9 to i64 %12 = sub i64 %10, %11 %13 = sdiv exact i64 %12, 24 - %14 = and i64 %13, 1 - %15 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #27 - store ptr %15, ptr %0, align 8 - %16 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %17 = getelementptr inbounds nuw i8, ptr %15, i64 16 - %18 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store ptr %17, ptr %18, align 8 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, i8 0, i64 16, i1 false) - %19 = xor i64 %14, 1 - store ptr %17, ptr %16, align 8 - %20 = getelementptr inbounds nuw i8, ptr %1, i64 80 - %21 = load ptr, ptr %20, align 8 - %22 = getelementptr inbounds nuw %"class.std::vector.9", ptr %21, i64 %19 - %23 = getelementptr inbounds i8, ptr %8, i64 -24 - %24 = getelementptr inbounds nuw double, ptr %15, i64 %19 - %25 = getelementptr inbounds nuw %"class.std::vector.9", ptr %21, i64 %14 - %26 = getelementptr inbounds nuw i8, ptr %1, i64 104 - %27 = load ptr, ptr %26, align 8 - %28 = getelementptr inbounds nuw double, ptr %15, i64 %14 - %.pre = load ptr, ptr %23, align 8 - %.pre35 = load double, ptr %24, align 8 - %.pre36 = load double, ptr %28, align 8 - br label %29 + %14 = trunc i64 %13 to i32 + %15 = and i32 %14, 1 + %16 = xor i32 %15, 1 + %17 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #27 + store ptr %17, ptr %0, align 8 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %19 = getelementptr inbounds nuw i8, ptr %17, i64 16 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store ptr %19, ptr %20, align 8 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false) + %21 = sub nuw nsw i32 1, %16 + store ptr %19, ptr %18, align 8 + %22 = getelementptr inbounds nuw i8, ptr %1, i64 80 + %23 = zext nneg i32 %16 to i64 + %24 = load ptr, ptr %22, align 8 + %25 = getelementptr inbounds nuw %"class.std::vector.9", ptr %24, i64 %23 + %26 = getelementptr inbounds i8, ptr %8, i64 -24 + %27 = getelementptr inbounds nuw double, ptr %17, i64 %23 + %28 = zext nneg i32 %21 to i64 + %29 = getelementptr inbounds nuw %"class.std::vector.9", ptr %24, i64 %28 + %30 = getelementptr inbounds nuw i8, ptr %1, i64 104 + %31 = load ptr, ptr %30, align 8 + %32 = getelementptr inbounds nuw double, ptr %17, i64 %28 + %.pre = load ptr, ptr %26, align 8 + br label %33 -29: ; preds = %.noexc, %29 - %30 = phi double [ %.pre36, %.noexc ], [ %49, %29 ] - %31 = phi double [ %.pre35, %.noexc ], [ %39, %29 ] - %indvars.iv = phi i64 [ 0, %.noexc ], [ %indvars.iv.next, %29 ] - %32 = load ptr, ptr %22, align 8 - %33 = getelementptr inbounds nuw i32, ptr %32, i64 %indvars.iv - %34 = load i32, ptr %33, align 4 - %35 = getelementptr inbounds nuw i32, ptr %.pre, i64 %indvars.iv +33: ; preds = %.noexc, %33 + %indvars.iv = phi i64 [ 0, %.noexc ], [ %indvars.iv.next, %33 ] + %34 = load ptr, ptr %25, align 8 + %35 = getelementptr inbounds nuw i32, ptr %34, i64 %indvars.iv %36 = load i32, ptr %35, align 4 - %37 = mul nsw i32 %36, %34 - %38 = sitofp i32 %37 to double - %39 = fadd double %31, %38 - store double %39, ptr %24, align 8 - %40 = load ptr, ptr %25, align 8 - %41 = getelementptr inbounds nuw i32, ptr %40, i64 %indvars.iv - %42 = load i32, ptr %41, align 4 - %43 = getelementptr inbounds nuw i32, ptr %27, i64 %indvars.iv - %44 = load i32, ptr %43, align 4 - %45 = load i32, ptr %35, align 4 - %46 = sub nsw i32 %44, %45 - %47 = mul nsw i32 %46, %42 - %48 = sitofp i32 %47 to double - %49 = fadd double %30, %48 - store double %49, ptr %28, align 8 + %37 = getelementptr inbounds nuw i32, ptr %.pre, i64 %indvars.iv + %38 = load i32, ptr %37, align 4 + %39 = mul nsw i32 %38, %36 + %40 = sitofp i32 %39 to double + %41 = load double, ptr %27, align 8 + %42 = fadd double %41, %40 + store double %42, ptr %27, align 8 + %43 = load ptr, ptr %29, align 8 + %44 = getelementptr inbounds nuw i32, ptr %43, i64 %indvars.iv + %45 = load i32, ptr %44, align 4 + %46 = getelementptr inbounds nuw i32, ptr %31, i64 %indvars.iv + %47 = load i32, ptr %46, align 4 + %48 = load i32, ptr %37, align 4 + %49 = sub nsw i32 %47, %48 + %50 = mul nsw i32 %49, %45 + %51 = sitofp i32 %50 to double + %52 = load double, ptr %32, align 8 + %53 = fadd double %52, %51 + store double %53, ptr %32, align 8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 - br i1 %exitcond.not, label %50, label %29, !llvm.loop !86 + br i1 %exitcond.not, label %54, label %33, !llvm.loop !86 -50: ; preds = %29 - %51 = getelementptr inbounds nuw i8, ptr %1, i64 160 - %52 = load double, ptr %51, align 8 - %53 = fcmp olt double %52, 1.000000e+00 - br i1 %53, label %.preheader, label %.loopexit +54: ; preds = %33 + %55 = getelementptr inbounds nuw i8, ptr %1, i64 160 + %56 = load double, ptr %55, align 8 + %57 = fcmp olt double %56, 1.000000e+00 + br i1 %57, label %.preheader, label %.loopexit -.preheader: ; preds = %50 - %54 = getelementptr inbounds nuw i8, ptr %1, i64 28 - %55 = load i32, ptr %54, align 4 - %56 = icmp sgt i32 %55, 0 - br i1 %56, label %.lr.ph, label %.loopexit +.preheader: ; preds = %54 + %58 = getelementptr inbounds nuw i8, ptr %1, i64 28 + %59 = load i32, ptr %58, align 4 + %60 = icmp sgt i32 %59, 0 + br i1 %60, label %.lr.ph, label %.loopexit .lr.ph: ; preds = %.preheader - %wide.trip.count = zext nneg i32 %55 to i64 - br label %57 + %wide.trip.count = zext nneg i32 %59 to i64 + br label %61 -57: ; preds = %.lr.ph, %57 - %indvars.iv31 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next32, %57 ] - %58 = getelementptr inbounds nuw double, ptr %15, i64 %indvars.iv31 - %59 = load double, ptr %58, align 8 - %60 = fmul double %52, %59 - store double %60, ptr %58, align 8 +61: ; preds = %.lr.ph, %61 + %indvars.iv31 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next32, %61 ] + %62 = getelementptr inbounds nuw double, ptr %17, i64 %indvars.iv31 + %63 = load double, ptr %62, align 8 + %64 = fmul double %56, %63 + store double %64, ptr %62, align 8 %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1 %exitcond34.not = icmp eq i64 %indvars.iv.next32, %wide.trip.count - br i1 %exitcond34.not, label %.loopexit, label %57, !llvm.loop !87 + br i1 %exitcond34.not, label %.loopexit, label %61, !llvm.loop !87 .noexc25: ; preds = %2 - %61 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #27 - store ptr %61, ptr %0, align 8 - %62 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %63 = getelementptr inbounds nuw i8, ptr %61, i64 16 - %64 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store ptr %63, ptr %64, align 8 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %61, i8 0, i64 16, i1 false) - store ptr %63, ptr %62, align 8 + %65 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #27 + store ptr %65, ptr %0, align 8 + %66 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %67 = getelementptr inbounds nuw i8, ptr %65, i64 16 + %68 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store ptr %67, ptr %68, align 8 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %65, i8 0, i64 16, i1 false) + store ptr %67, ptr %66, align 8 br label %.loopexit -.loopexit: ; preds = %57, %.preheader, %50, %.noexc25 +.loopexit: ; preds = %61, %.preheader, %54, %.noexc25 ret void } diff --git a/bench/openssl/optimized/bad_dtls_test-bin-bad_dtls_test.ll b/bench/openssl/optimized/bad_dtls_test-bin-bad_dtls_test.ll index bdd0cfbbb6d..f107ce2ff96 100644 --- a/bench/openssl/optimized/bad_dtls_test-bin-bad_dtls_test.ll +++ b/bench/openssl/optimized/bad_dtls_test-bin-bad_dtls_test.ll @@ -779,10 +779,9 @@ entry: store i8 %conv12, ptr getelementptr inbounds nuw (i8, ptr @send_record.seq, i64 4), align 1 %conv14 = trunc i64 %seqnr to i8 store i8 %conv14, ptr getelementptr inbounds nuw (i8, ptr @send_record.seq, i64 5), align 1 - %add = add nuw nsw i64 %len, 20 - %0 = trunc nuw nsw i64 %add to i8 - %1 = and i8 %0, 15 - %conv15 = xor i8 %1, 15 + %0 = trunc nuw nsw i64 %len to i8 + %1 = sub nsw i8 11, %0 + %conv15 = and i8 %1, 15 %add17 = add nuw nsw i64 %len, 21 %conv18 = zext nneg i8 %conv15 to i64 %add19 = add nuw nsw i64 %add17, %conv18 @@ -810,9 +809,8 @@ if.end27: ; preds = %lor.lhs.false call void @OSSL_PARAM_construct_end(ptr nonnull sret(%struct.ossl_param_st) align 8 %tmp29) #6 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %arrayidx28, ptr noundef nonnull align 8 dereferenceable(40) %tmp29, i64 40, i1 false) store i8 0, ptr %lenbytes, align 1 - %conv33 = trunc nuw nsw i64 %len to i8 %arrayidx34 = getelementptr inbounds nuw i8, ptr %lenbytes, i64 1 - store i8 %conv33, ptr %arrayidx34, align 1 + store i8 %0, ptr %arrayidx34, align 1 %call35 = call i32 @EVP_MAC_init(ptr noundef %call23, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @key_block, i64 20), i64 noundef 20, ptr noundef nonnull %params) #6 %tobool36.not = icmp eq i32 %call35, 0 br i1 %tobool36.not, label %end, label %lor.lhs.false37 @@ -854,12 +852,13 @@ lor.lhs.false56: ; preds = %lor.lhs.false53 br i1 %tobool58.not, label %end, label %do.body.preheader do.body.preheader: ; preds = %lor.lhs.false56 - %scevgep = getelementptr i8, ptr %call, i64 %add - %2 = sub nsw i64 11, %len - %3 = and i64 %2, 15 - %4 = add nuw nsw i64 %3, 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 %conv15, i64 %4, i1 false) - %5 = add nuw nsw i64 %len, %3 + %2 = getelementptr i8, ptr %call, i64 %len + %scevgep = getelementptr i8, ptr %2, i64 20 + %3 = sub nsw i64 11, %len + %4 = and i64 %3, 15 + %5 = add nuw nsw i64 %4, 1 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 %conv15, i64 %5, i1 false) + %6 = add nuw nsw i64 %len, %4 %call66 = call i32 @RAND_bytes(ptr noundef nonnull %iv, i32 noundef 16) #6 %call67 = call i32 @test_int_gt(ptr noundef nonnull @.str.1, i32 noundef 334, ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.18, i32 noundef %call66, i32 noundef 0) #6 %tobool68.not = icmp eq i32 %call67, 0 @@ -881,8 +880,8 @@ lor.lhs.false73: ; preds = %lor.lhs.false69 br i1 %tobool80.not, label %end, label %lor.lhs.false81 lor.lhs.false81: ; preds = %lor.lhs.false73 - %6 = trunc nuw nsw i64 %5 to i32 - %conv82 = add nuw nsw i32 %6, 21 + %7 = trunc nuw nsw i64 %6 to i32 + %conv82 = add nuw nsw i32 %7, 21 %call83 = call i32 @EVP_Cipher(ptr noundef %call70, ptr noundef nonnull %call, ptr noundef nonnull %call, i32 noundef %conv82) #6 %call84 = call i32 @test_int_ge(ptr noundef nonnull @.str.1, i32 noundef 338, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.18, i32 noundef %call83, i32 noundef 0) #6 %tobool85.not = icmp eq i32 %call84, 0 @@ -894,8 +893,8 @@ if.end87: ; preds = %lor.lhs.false81 %call90 = call i32 @BIO_write(ptr noundef %rbio, ptr noundef nonnull @send_record.epoch, i32 noundef 2) #6 %call91 = call i32 @BIO_write(ptr noundef %rbio, ptr noundef nonnull @send_record.seq, i32 noundef 6) #6 store i8 0, ptr %lenbytes, align 1 - %7 = trunc nuw nsw i64 %5 to i8 - %conv97 = add nuw nsw i8 %7, 37 + %8 = trunc nuw nsw i64 %6 to i8 + %conv97 = add nuw nsw i8 %8, 37 store i8 %conv97, ptr %arrayidx34, align 1 %call100 = call i32 @BIO_write(ptr noundef %rbio, ptr noundef nonnull %lenbytes, i32 noundef 2) #6 %call102 = call i32 @BIO_write(ptr noundef %rbio, ptr noundef nonnull %iv, i32 noundef 16) #6 diff --git a/bench/openssl/optimized/libcrypto-lib-e_aes_cbc_hmac_sha1.ll b/bench/openssl/optimized/libcrypto-lib-e_aes_cbc_hmac_sha1.ll index 79b60d12fd7..25ce63b896b 100644 --- a/bench/openssl/optimized/libcrypto-lib-e_aes_cbc_hmac_sha1.ll +++ b/bench/openssl/optimized/libcrypto-lib-e_aes_cbc_hmac_sha1.ll @@ -1759,33 +1759,30 @@ for.body396.i: ; preds = %for.body396.i, %for %add.ptr451.i = getelementptr inbounds nuw i8, ptr %add.ptr421.i, i64 16 store i32 %97, ptr %add.ptr451.i, align 4 %add.ptr452.i = getelementptr i8, ptr %add.ptr421.i, i64 20 - %add453.i = add i32 %cond404.i, 4 - %rem454.i = and i32 %add453.i, 15 - %98 = trunc nuw nsw i32 %rem454.i to i8 - %conv460.i = xor i8 %98, 15 - %99 = sub i32 11, %cond404.i - %100 = and i32 %99, 15 - %101 = zext nneg i32 %100 to i64 - %102 = add nuw nsw i64 %101, 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr452.i, i8 %conv460.i, i64 %102, i1 false) + %add453.not.i = sub i32 11, %cond404.i + %sub455.i = and i32 %add453.not.i, 15 + %conv460.i = trunc nuw nsw i32 %sub455.i to i8 + %98 = zext nneg i32 %sub455.i to i64 + %99 = add nuw nsw i64 %98, 1 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr452.i, i8 %conv460.i, i64 %99, i1 false) %scevgep.i = getelementptr i8, ptr %out.addr.0263.i, i64 21 - %103 = getelementptr i8, ptr %scevgep.i, i64 %idx.ext420.i - %scevgep293.i = getelementptr i8, ptr %103, i64 %101 - %104 = sub i32 %cond404.i, %rem454.i - %reass.sub = sub i32 %104, %processed.0.i - %sub466.i = add i32 %reass.sub, 36 + %100 = getelementptr i8, ptr %scevgep.i, i64 %idx.ext420.i + %scevgep293.i = getelementptr i8, ptr %100, i64 %98 + %add464.i = add i32 %sub455.i, %cond404.i + %reass.sub = sub i32 %add464.i, %processed.0.i + %sub466.i = add i32 %reass.sub, 21 %div467243.i = lshr i32 %sub466.i, 4 %blocks470.i = getelementptr inbounds nuw i8, ptr %arrayidx406.i, i64 16 store i32 %div467243.i, ptr %blocks470.i, align 8 - %add471.i = add i32 %104, 52 - %105 = load i8, ptr %arrayidx475.i, align 4 - store i8 %105, ptr %out.addr.0263.i, align 1 - %106 = load i8, ptr %arrayidx480.i, align 1 + %add471.i = add i32 %add464.i, 37 + %101 = load i8, ptr %arrayidx475.i, align 4 + store i8 %101, ptr %out.addr.0263.i, align 1 + %102 = load i8, ptr %arrayidx480.i, align 1 %arrayidx481.i = getelementptr inbounds nuw i8, ptr %out.addr.0263.i, i64 1 - store i8 %106, ptr %arrayidx481.i, align 1 - %107 = load i8, ptr %arrayidx485.i, align 2 + store i8 %102, ptr %arrayidx481.i, align 1 + %103 = load i8, ptr %arrayidx485.i, align 2 %arrayidx486.i = getelementptr inbounds nuw i8, ptr %out.addr.0263.i, i64 2 - store i8 %107, ptr %arrayidx486.i, align 1 + store i8 %103, ptr %arrayidx486.i, align 1 %shr487.i = lshr i32 %add471.i, 8 %conv488.i = trunc i32 %shr487.i to i8 %arrayidx489.i = getelementptr inbounds nuw i8, ptr %out.addr.0263.i, i64 3 @@ -1793,8 +1790,8 @@ for.body396.i: ; preds = %for.body396.i, %for %conv490.i = trunc i32 %add471.i to i8 %arrayidx491.i = getelementptr inbounds nuw i8, ptr %out.addr.0263.i, i64 4 store i8 %conv490.i, ptr %arrayidx491.i, align 1 - %add492.i = add i32 %ret.0261.i, 57 - %add494.i = add i32 %add492.i, %104 + %add492.i = add i32 %ret.0261.i, 42 + %add494.i = add i32 %add492.i, %add464.i %indvars.iv.next295.i = add nuw nsw i64 %indvars.iv294.i, 1 %exitcond298.not.i = icmp eq i64 %indvars.iv.next295.i, %wide.trip.count286.i br i1 %exitcond298.not.i, label %for.end499.i, label %for.body396.i, !llvm.loop !36 diff --git a/bench/openssl/optimized/libdefault-lib-cipher_aes_cbc_hmac_sha1_hw.ll b/bench/openssl/optimized/libdefault-lib-cipher_aes_cbc_hmac_sha1_hw.ll index 000c33b0599..05d8ec8eb2a 100644 --- a/bench/openssl/optimized/libdefault-lib-cipher_aes_cbc_hmac_sha1_hw.ll +++ b/bench/openssl/optimized/libdefault-lib-cipher_aes_cbc_hmac_sha1_hw.ll @@ -1808,33 +1808,30 @@ for.body398.i: ; preds = %for.body398.i, %for %add.ptr453.i = getelementptr inbounds nuw i8, ptr %add.ptr423.i, i64 16 store i32 %64, ptr %add.ptr453.i, align 4 %add.ptr454.i = getelementptr i8, ptr %add.ptr423.i, i64 20 - %add455.i = add i32 %cond406.i, 4 - %rem456.i = and i32 %add455.i, 15 - %65 = trunc nuw nsw i32 %rem456.i to i8 - %conv462.i = xor i8 %65, 15 - %66 = sub i32 11, %cond406.i - %67 = and i32 %66, 15 - %68 = zext nneg i32 %67 to i64 - %69 = add nuw nsw i64 %68, 1 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr454.i, i8 %conv462.i, i64 %69, i1 false) + %add455.not.i = sub i32 11, %cond406.i + %sub457.i = and i32 %add455.not.i, 15 + %conv462.i = trunc nuw nsw i32 %sub457.i to i8 + %65 = zext nneg i32 %sub457.i to i64 + %66 = add nuw nsw i64 %65, 1 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr454.i, i8 %conv462.i, i64 %66, i1 false) %scevgep.i = getelementptr i8, ptr %out.addr.0266.i, i64 21 - %70 = getelementptr i8, ptr %scevgep.i, i64 %idx.ext422.i - %scevgep296.i = getelementptr i8, ptr %70, i64 %68 - %71 = sub i32 %cond406.i, %rem456.i - %reass.sub = sub i32 %71, %processed.0.i - %sub468.i = add i32 %reass.sub, 36 + %67 = getelementptr i8, ptr %scevgep.i, i64 %idx.ext422.i + %scevgep296.i = getelementptr i8, ptr %67, i64 %65 + %add466.i = add i32 %sub457.i, %cond406.i + %reass.sub = sub i32 %add466.i, %processed.0.i + %sub468.i = add i32 %reass.sub, 21 %div469246.i = lshr i32 %sub468.i, 4 %blocks472.i = getelementptr inbounds nuw i8, ptr %arrayidx408.i, i64 16 store i32 %div469246.i, ptr %blocks472.i, align 8 - %add473.i = add i32 %71, 52 - %72 = load i8, ptr %arrayidx477.i, align 4 - store i8 %72, ptr %out.addr.0266.i, align 1 - %73 = load i8, ptr %arrayidx482.i, align 1 + %add473.i = add i32 %add466.i, 37 + %68 = load i8, ptr %arrayidx477.i, align 4 + store i8 %68, ptr %out.addr.0266.i, align 1 + %69 = load i8, ptr %arrayidx482.i, align 1 %arrayidx483.i = getelementptr inbounds nuw i8, ptr %out.addr.0266.i, i64 1 - store i8 %73, ptr %arrayidx483.i, align 1 - %74 = load i8, ptr %arrayidx487.i, align 2 + store i8 %69, ptr %arrayidx483.i, align 1 + %70 = load i8, ptr %arrayidx487.i, align 2 %arrayidx488.i = getelementptr inbounds nuw i8, ptr %out.addr.0266.i, i64 2 - store i8 %74, ptr %arrayidx488.i, align 1 + store i8 %70, ptr %arrayidx488.i, align 1 %shr489.i = lshr i32 %add473.i, 8 %conv490.i = trunc i32 %shr489.i to i8 %arrayidx491.i = getelementptr inbounds nuw i8, ptr %out.addr.0266.i, i64 3 @@ -1842,7 +1839,7 @@ for.body398.i: ; preds = %for.body398.i, %for %conv492.i = trunc i32 %add473.i to i8 %arrayidx493.i = getelementptr inbounds nuw i8, ptr %out.addr.0266.i, i64 4 store i8 %conv492.i, ptr %arrayidx493.i, align 1 - %add494.i = add i32 %71, 57 + %add494.i = add i32 %add466.i, 42 %conv495.i = zext i32 %add494.i to i64 %add496.i = add i64 %ret.0264.i, %conv495.i %indvars.iv.next298.i = add nuw nsw i64 %indvars.iv297.i, 1 @@ -1857,11 +1854,11 @@ for.end501.i: ; preds = %for.body398.i, %for call void @OPENSSL_cleanse(ptr noundef nonnull %add.ptr5.i, i64 noundef 160) #9 %multiblock_encrypt_len.i = getelementptr inbounds nuw i8, ptr %ctx, i64 488 store i64 %ret.0.lcssa.i, ptr %multiblock_encrypt_len.i, align 8 - %75 = trunc i64 %ret.0.lcssa.i to i32 + %71 = trunc i64 %ret.0.lcssa.i to i32 br label %tls1_multi_block_encrypt.exit tls1_multi_block_encrypt.exit: ; preds = %entry, %for.end501.i - %retval.0.i = phi i32 [ %75, %for.end501.i ], [ 0, %entry ] + %retval.0.i = phi i32 [ %71, %for.end501.i ], [ 0, %entry ] call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %hash_d.i) call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %edges.i) call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %ciph_d.i) diff --git a/bench/openssl/optimized/libssl-lib-tls1_meth.ll b/bench/openssl/optimized/libssl-lib-tls1_meth.ll index 69a505fda49..f96ba43f618 100644 --- a/bench/openssl/optimized/libssl-lib-tls1_meth.ll +++ b/bench/openssl/optimized/libssl-lib-tls1_meth.ll @@ -76,7 +76,8 @@ if.then: ; preds = %land.end %3 = load ptr, ptr %bufs, align 8 %4 = ptrtoint ptr %3 to i64 %5 = and i64 %4, 7 - %sub9 = xor i64 %5, 3 + %rem = xor i64 %5, 4 + %sub9 = sub nuw nsw i64 7, %rem %offset = getelementptr inbounds nuw i8, ptr %bufs, i64 24 store i64 %sub9, ptr %offset, align 8 %len = getelementptr inbounds nuw i8, ptr %bufs, i64 16 diff --git a/bench/openssl/optimized/libssl-lib-tls_common.ll b/bench/openssl/optimized/libssl-lib-tls_common.ll index c68ce8a3e9c..76edf290dc2 100644 --- a/bench/openssl/optimized/libssl-lib-tls_common.ll +++ b/bench/openssl/optimized/libssl-lib-tls_common.ll @@ -455,7 +455,8 @@ if.end: ; preds = %entry %1 = load ptr, ptr %rbuf, align 8 %2 = ptrtoint ptr %1 to i64 %3 = and i64 %2, 7 - %sub2 = xor i64 %3, 3 + %rem = xor i64 %3, 4 + %sub2 = sub nuw nsw i64 7, %rem %tobool = icmp ne i32 %extend, 0 br i1 %tobool, label %if.end.if.end9_crit_edge, label %if.then3 @@ -2548,7 +2549,8 @@ for.body: ; preds = %entry, %for.cond %1 = load ptr, ptr %arrayidx1, align 8 %2 = ptrtoint ptr %1 to i64 %3 = and i64 %2, 7 - %sub5 = xor i64 %3, 3 + %rem = xor i64 %3, 4 + %sub5 = sub nuw nsw i64 7, %rem %offset = getelementptr inbounds nuw i8, ptr %arrayidx1, i64 24 store i64 %sub5, ptr %offset, align 8 %len = getelementptr inbounds nuw i8, ptr %arrayidx1, i64 16 diff --git a/bench/openusd/optimized/pred_common.c.ll b/bench/openusd/optimized/pred_common.c.ll index c899decd8f1..1f61bbbecc7 100644 --- a/bench/openusd/optimized/pred_common.c.ll +++ b/bench/openusd/optimized/pred_common.c.ll @@ -433,7 +433,7 @@ define hidden range(i32 0, 5) i32 @av1_get_reference_mode_context(ptr nocapture %10 = load i8, ptr %9, align 1 %11 = trunc i8 %10 to i1 %or.cond = select i1 %8, i1 %11, i1 false - br i1 %or.cond, label %12, label %43 + br i1 %or.cond, label %12, label %41 12: ; preds = %1 %13 = getelementptr i8, ptr %3, i64 17 @@ -442,7 +442,7 @@ define hidden range(i32 0, 5) i32 @av1_get_reference_mode_context(ptr nocapture %15 = getelementptr i8, ptr %5, i64 17 %.val44 = load i8, ptr %15, align 1 %16 = icmp slt i8 %.val44, 1 - br i1 %14, label %17, label %33 + br i1 %14, label %17, label %32 17: ; preds = %12 %18 = getelementptr inbounds nuw i8, ptr %3, i64 16 @@ -458,10 +458,10 @@ define hidden range(i32 0, 5) i32 @av1_get_reference_mode_context(ptr nocapture %narrow54 = icmp ult i8 %24, 3 %25 = xor i1 %narrow53, %narrow54 %26 = zext i1 %25 to i32 - br label %53 + br label %51 27: ; preds = %17 - br i1 %narrow53, label %53, label %is_inter_block.exit + br i1 %narrow53, label %51, label %is_inter_block.exit is_inter_block.exit: ; preds = %27 %28 = getelementptr i8, ptr %3, i64 175 @@ -470,52 +470,50 @@ is_inter_block.exit: ; preds = %27 %.not.i = icmp ne i16 %29, 0 %30 = icmp sgt i8 %19, 0 %narrow52 = or i1 %30, %.not.i - %31 = zext i1 %narrow52 to i32 - %32 = xor i32 %31, 3 - br label %53 - -33: ; preds = %12 - br i1 %16, label %34, label %53 - -34: ; preds = %33 - %35 = getelementptr inbounds nuw i8, ptr %5, i64 16 - %36 = load i8, ptr %35, align 8 - %37 = add i8 %36, -5 - %or.cond43 = icmp ult i8 %37, 3 - br i1 %or.cond43, label %53, label %is_inter_block.exit50 - -is_inter_block.exit50: ; preds = %34 - %38 = getelementptr i8, ptr %5, i64 175 - %.val.i48 = load i16, ptr %38, align 1 - %39 = and i16 %.val.i48, 128 - %.not.i49 = icmp ne i16 %39, 0 - %40 = icmp sgt i8 %36, 0 - %narrow51 = or i1 %40, %.not.i49 - %41 = zext i1 %narrow51 to i32 - %42 = xor i32 %41, 3 - br label %53 - -43: ; preds = %1 + %31 = select i1 %narrow52, i32 2, i32 3 + br label %51 + +32: ; preds = %12 + br i1 %16, label %33, label %51 + +33: ; preds = %32 + %34 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %35 = load i8, ptr %34, align 8 + %36 = add i8 %35, -5 + %or.cond43 = icmp ult i8 %36, 3 + br i1 %or.cond43, label %51, label %is_inter_block.exit50 + +is_inter_block.exit50: ; preds = %33 + %37 = getelementptr i8, ptr %5, i64 175 + %.val.i48 = load i16, ptr %37, align 1 + %38 = and i16 %.val.i48, 128 + %.not.i49 = icmp ne i16 %38, 0 + %39 = icmp sgt i8 %35, 0 + %narrow51 = or i1 %39, %.not.i49 + %40 = select i1 %narrow51, i32 2, i32 3 + br label %51 + +41: ; preds = %1 %or.cond3 = select i1 %8, i1 true, i1 %11 - br i1 %or.cond3, label %44, label %53 - -44: ; preds = %43 - %45 = select i1 %8, ptr %3, ptr %5 - %46 = getelementptr i8, ptr %45, i64 17 - %.val47 = load i8, ptr %46, align 1 - %47 = icmp slt i8 %.val47, 1 - br i1 %47, label %48, label %53 - -48: ; preds = %44 - %49 = getelementptr inbounds nuw i8, ptr %45, i64 16 - %50 = load i8, ptr %49, align 8 - %51 = add i8 %50, -5 - %narrow = icmp ult i8 %51, 3 - %52 = zext i1 %narrow to i32 - br label %53 - -53: ; preds = %43, %44, %33, %is_inter_block.exit50, %34, %is_inter_block.exit, %27, %48, %21 - %.0 = phi i32 [ %26, %21 ], [ %52, %48 ], [ %32, %is_inter_block.exit ], [ 3, %27 ], [ %42, %is_inter_block.exit50 ], [ 3, %34 ], [ 4, %33 ], [ 3, %44 ], [ 1, %43 ] + br i1 %or.cond3, label %42, label %51 + +42: ; preds = %41 + %43 = select i1 %8, ptr %3, ptr %5 + %44 = getelementptr i8, ptr %43, i64 17 + %.val47 = load i8, ptr %44, align 1 + %45 = icmp slt i8 %.val47, 1 + br i1 %45, label %46, label %51 + +46: ; preds = %42 + %47 = getelementptr inbounds nuw i8, ptr %43, i64 16 + %48 = load i8, ptr %47, align 8 + %49 = add i8 %48, -5 + %narrow = icmp ult i8 %49, 3 + %50 = zext i1 %narrow to i32 + br label %51 + +51: ; preds = %41, %42, %32, %is_inter_block.exit50, %33, %is_inter_block.exit, %27, %46, %21 + %.0 = phi i32 [ %26, %21 ], [ %50, %46 ], [ %31, %is_inter_block.exit ], [ 3, %27 ], [ %40, %is_inter_block.exit50 ], [ 3, %33 ], [ 4, %32 ], [ 3, %42 ], [ 1, %41 ] ret i32 %.0 } diff --git a/bench/openusd/optimized/stackTrace.cpp.ll b/bench/openusd/optimized/stackTrace.cpp.ll index 8286405bb11..e1c306a6a34 100644 --- a/bench/openusd/optimized/stackTrace.cpp.ll +++ b/bench/openusd/optimized/stackTrace.cpp.ll @@ -2136,7 +2136,7 @@ _ZNSt6vectorImSaImEE6resizeEm.exit.i.i: ; preds = %_ZNKSt6vectorImSaIm 21: ; preds = %.noexc6 %22 = add i64 %19, -4096 %23 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %24 = icmp ugt i64 %22, 1152921504606842879 + %24 = icmp ugt i64 %19, 1152921504606846975 br i1 %24, label %25, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i 25: ; preds = %21 @@ -3098,7 +3098,7 @@ define void @_ZN32pxrInternal_v0_24__pxrReserved__17ArchGetStackTraceB5cxx11Em(p .invoke: ; preds = %27, %6 invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.54) #32 - to label %.cont unwind label %60 + to label %.cont unwind label %59 .cont: ; preds = %.invoke unreachable @@ -3106,7 +3106,7 @@ define void @_ZN32pxrInternal_v0_24__pxrReserved__17ArchGetStackTraceB5cxx11Em(p _ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i13: ; preds = %6 %9 = shl nuw nsw i64 %1, 3 %10 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %9) #38 - to label %.noexc21 unwind label %60 + to label %.noexc21 unwind label %59 .noexc21: ; preds = %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i13 store i64 0, ptr %10, align 8 @@ -3136,7 +3136,7 @@ _ZNSt6vectorImSaImEE6resizeEm.exit.i.i: ; preds = %2, %.noexc call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false) store ptr %16, ptr %18, align 8 %19 = invoke i32 @_Unwind_Backtrace(ptr noundef nonnull @_ZN32pxrInternal_v0_24__pxrReserved__L13Arch_unwindcbEP15_Unwind_ContextPv, ptr noundef nonnull %3) - to label %.noexc2 unwind label %60 + to label %.noexc2 unwind label %59 .noexc2: ; preds = %_ZNSt6vectorImSaImEE6resizeEm.exit.i.i %20 = getelementptr inbounds nuw i8, ptr %3, i64 16 @@ -3147,114 +3147,113 @@ _ZNSt6vectorImSaImEE6resizeEm.exit.i.i: ; preds = %2, %.noexc %24 = sub i64 %22, %23 %25 = ashr exact i64 %24, 3 %26 = icmp ugt i64 %21, %25 - br i1 %26, label %27, label %47 + br i1 %26, label %27, label %46 27: ; preds = %.noexc2 %28 = sub nuw i64 %21, %25 %29 = getelementptr inbounds nuw i8, ptr %4, i64 16 %30 = icmp ult i64 %25, 1152921504606846976 call void @llvm.assume(i1 %30) - %31 = xor i64 %25, 1152921504606846975 - %32 = icmp ult i64 %31, %28 - br i1 %32, label %.invoke, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i + %31 = icmp ugt i64 %21, 1152921504606846975 + br i1 %31, label %.invoke, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i _ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i: ; preds = %27 %.sroa.speculated.i.i = call i64 @llvm.umax.i64(i64 %25, i64 %28) - %33 = add nuw nsw i64 %.sroa.speculated.i.i, %25 - %34 = call i64 @llvm.umin.i64(i64 %33, i64 1152921504606846975) - %35 = shl nuw nsw i64 %34, 3 - %36 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %35) #38 - to label %.noexc7 unwind label %60 + %32 = add nuw nsw i64 %.sroa.speculated.i.i, %25 + %33 = call i64 @llvm.umin.i64(i64 %32, i64 1152921504606846975) + %34 = shl nuw nsw i64 %33, 3 + %35 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %34) #38 + to label %.noexc7 unwind label %59 .noexc7: ; preds = %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i - %37 = getelementptr inbounds i8, ptr %36, i64 %24 - store i64 0, ptr %37, align 8 - %38 = icmp eq i64 %28, 1 - br i1 %38, label %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i, label %_ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i + %36 = getelementptr inbounds i8, ptr %35, i64 %24 + store i64 0, ptr %36, align 8 + %37 = icmp eq i64 %28, 1 + br i1 %37, label %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i, label %_ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i _ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i: ; preds = %.noexc7 - %39 = getelementptr i8, ptr %37, i64 8 - %40 = shl nuw nsw i64 %28, 3 - %41 = add nsw i64 %40, -8 - call void @llvm.memset.p0.i64(ptr align 8 %39, i8 0, i64 %41, i1 false) + %38 = getelementptr i8, ptr %36, i64 8 + %39 = shl nuw nsw i64 %28, 3 + %40 = add nsw i64 %39, -8 + call void @llvm.memset.p0.i64(ptr align 8 %38, i8 0, i64 %40, i1 false) br label %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i _ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i: ; preds = %_ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i, %.noexc7 - %42 = icmp sgt i64 %24, 0 - br i1 %42, label %43, label %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i + %41 = icmp sgt i64 %24, 0 + br i1 %41, label %42, label %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i -43: ; preds = %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %36, ptr align 8 %16, i64 %24, i1 false) +42: ; preds = %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %35, ptr align 8 %16, i64 %24, i1 false) br label %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i -_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i: ; preds = %43, %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i +_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i: ; preds = %42, %_ZSt27__uninitialized_default_n_aIPmmmET_S1_T0_RSaIT1_E.exit32.i %.not.i34.i = icmp eq ptr %16, null - br i1 %.not.i34.i, label %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i, label %44 + br i1 %.not.i34.i, label %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i, label %43 -44: ; preds = %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i +43: ; preds = %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i call void @_ZdlPvm(ptr noundef nonnull %16, i64 noundef %24) #39 br label %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i -_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i: ; preds = %44, %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i - store ptr %36, ptr %4, align 8 - %45 = getelementptr inbounds i64, ptr %37, i64 %28 - store ptr %45, ptr %5, align 8 - %46 = getelementptr inbounds nuw i64, ptr %36, i64 %34 - store ptr %46, ptr %29, align 8 +_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i: ; preds = %43, %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i + store ptr %35, ptr %4, align 8 + %44 = getelementptr inbounds nuw i64, ptr %36, i64 %28 + store ptr %44, ptr %5, align 8 + %45 = getelementptr inbounds nuw i64, ptr %35, i64 %33 + store ptr %45, ptr %29, align 8 br label %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit -47: ; preds = %.noexc2 - %48 = icmp ult i64 %21, %25 - br i1 %48, label %49, label %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit +46: ; preds = %.noexc2 + %47 = icmp ult i64 %21, %25 + br i1 %47, label %48, label %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit -49: ; preds = %47 - %50 = getelementptr inbounds i64, ptr %16, i64 %21 - %.not.i.i5.i.i = icmp eq ptr %15, %50 - br i1 %.not.i.i5.i.i, label %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit, label %51 +48: ; preds = %46 + %49 = getelementptr inbounds i64, ptr %16, i64 %21 + %.not.i.i5.i.i = icmp eq ptr %15, %49 + br i1 %.not.i.i5.i.i, label %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit, label %50 -51: ; preds = %49 - store ptr %50, ptr %5, align 8 +50: ; preds = %48 + store ptr %49, ptr %5, align 8 br label %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit -_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit: ; preds = %51, %49, %47, %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i +_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit: ; preds = %50, %48, %46, %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i invoke fastcc void @_ZN32pxrInternal_v0_24__pxrReserved__L18Arch_GetStackTraceB5cxx11ERKSt6vectorImSaImEEb(ptr dead_on_unwind noalias writable align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %4, i1 noundef zeroext false) - to label %52 unwind label %60 - -52: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit - %53 = load ptr, ptr %4, align 8 - %.not.i.i.i = icmp eq ptr %53, null - br i1 %.not.i.i.i, label %_ZNSt6vectorImSaImEED2Ev.exit, label %54 - -54: ; preds = %52 - %55 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %56 = load ptr, ptr %55, align 8 - %57 = ptrtoint ptr %56 to i64 - %58 = ptrtoint ptr %53 to i64 - %59 = sub i64 %57, %58 - call void @_ZdlPvm(ptr noundef nonnull %53, i64 noundef %59) #39 + to label %51 unwind label %59 + +51: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit + %52 = load ptr, ptr %4, align 8 + %.not.i.i.i = icmp eq ptr %52, null + br i1 %.not.i.i.i, label %_ZNSt6vectorImSaImEED2Ev.exit, label %53 + +53: ; preds = %51 + %54 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %55 = load ptr, ptr %54, align 8 + %56 = ptrtoint ptr %55 to i64 + %57 = ptrtoint ptr %52 to i64 + %58 = sub i64 %56, %57 + call void @_ZdlPvm(ptr noundef nonnull %52, i64 noundef %58) #39 br label %_ZNSt6vectorImSaImEED2Ev.exit -_ZNSt6vectorImSaImEED2Ev.exit: ; preds = %52, %54 +_ZNSt6vectorImSaImEED2Ev.exit: ; preds = %51, %53 ret void -60: ; preds = %.invoke, %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i13, %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i, %_ZNSt6vectorImSaImEE6resizeEm.exit.i.i, %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit - %61 = landingpad { ptr, i32 } +59: ; preds = %.invoke, %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i13, %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i, %_ZNSt6vectorImSaImEE6resizeEm.exit.i.i, %_ZN32pxrInternal_v0_24__pxrReserved__18ArchGetStackFramesEmPSt6vectorImSaImEE.exit + %60 = landingpad { ptr, i32 } cleanup - %62 = load ptr, ptr %4, align 8 - %.not.i.i.i4 = icmp eq ptr %62, null - br i1 %.not.i.i.i4, label %_ZNSt6vectorImSaImEED2Ev.exit5, label %63 - -63: ; preds = %60 - %64 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %65 = load ptr, ptr %64, align 8 - %66 = ptrtoint ptr %65 to i64 - %67 = ptrtoint ptr %62 to i64 - %68 = sub i64 %66, %67 - call void @_ZdlPvm(ptr noundef nonnull %62, i64 noundef %68) #39 + %61 = load ptr, ptr %4, align 8 + %.not.i.i.i4 = icmp eq ptr %61, null + br i1 %.not.i.i.i4, label %_ZNSt6vectorImSaImEED2Ev.exit5, label %62 + +62: ; preds = %59 + %63 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %64 = load ptr, ptr %63, align 8 + %65 = ptrtoint ptr %64 to i64 + %66 = ptrtoint ptr %61 to i64 + %67 = sub i64 %65, %66 + call void @_ZdlPvm(ptr noundef nonnull %61, i64 noundef %67) #39 br label %_ZNSt6vectorImSaImEED2Ev.exit5 -_ZNSt6vectorImSaImEED2Ev.exit5: ; preds = %60, %63 - resume { ptr, i32 } %61 +_ZNSt6vectorImSaImEED2Ev.exit5: ; preds = %59, %62 + resume { ptr, i32 } %60 } ; Function Attrs: mustprogress uwtable @@ -6320,7 +6319,7 @@ define linkonce_odr void @_ZNSt6vectorImSaImEE17_M_default_appendEm(ptr noundef %15 = ashr exact i64 %14, 3 %16 = icmp ult i64 %10, 1152921504606846976 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %10, 1152921504606846975 + %17 = sub nuw nsw i64 1152921504606846975, %10 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28 = icmp ult i64 %15, %1 diff --git a/bench/postgres/optimized/hashpage.ll b/bench/postgres/optimized/hashpage.ll index 984b1f5c549..8d46b0761c9 100644 --- a/bench/postgres/optimized/hashpage.ll +++ b/bench/postgres/optimized/hashpage.ll @@ -865,71 +865,70 @@ BufferGetPage.exit: ; preds = %18, %24 store i16 %47, ptr %48, align 2 %49 = zext i16 %47 to i32 %50 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %49, i1 true) - %51 = xor i32 %50, 31 - %52 = shl nuw nsw i32 1, %51 - %53 = trunc nuw i32 %52 to i16 - %54 = getelementptr i8, ptr %.0.i.i, i64 44 - store i16 %53, ptr %54, align 4 - %55 = trunc nuw nsw i32 %51 to i16 - %56 = add nuw nsw i16 %55, 3 - %57 = getelementptr i8, ptr %.0.i.i, i64 46 - store i16 %56, ptr %57, align 2 - %58 = getelementptr i8, ptr %.0.i.i, i64 72 - store i32 %2, ptr %58, align 8 - %59 = add i32 %.0, -1 - %60 = getelementptr i8, ptr %.0.i.i, i64 48 - store i32 %59, ptr %60, align 8 - %61 = add i32 %.0, 1 - %62 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %61) - %63 = icmp samesign ult i32 %62, 2 - %64 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %61, i1 true) - %65 = xor i32 %64, 31 - %66 = shl nuw i32 2, %65 - %67 = add i32 %66, -1 - %68 = select i1 %63, i32 %.0, i32 %67 - %69 = getelementptr i8, ptr %.0.i.i, i64 52 - store i32 %68, ptr %69, align 4 - %70 = lshr i32 %68, 1 - %71 = getelementptr i8, ptr %.0.i.i, i64 56 - store i32 %70, ptr %71, align 8 - %72 = getelementptr i8, ptr %.0.i.i, i64 76 - %73 = ptrtoint ptr %72 to i64 - %74 = and i64 %73, 7 - %75 = icmp eq i64 %74, 0 - br i1 %75, label %76, label %85 - -76: ; preds = %31 - %77 = getelementptr i8, ptr %.0.i.i, i64 468 - %78 = icmp ult ptr %72, %77 - br i1 %78, label %.lr.ph.preheader, label %.loopexit - -.lr.ph.preheader: ; preds = %76 - %79 = add i64 %.0.i.i84, 468 - %80 = add i64 %.0.i.i84, 84 - %umax = tail call i64 @llvm.umax.i64(i64 %79, i64 %80) - %81 = add i64 %umax, -77 - %82 = sub i64 %81, %.0.i.i84 - %83 = and i64 %82, -8 - %84 = add i64 %83, 8 - tail call void @llvm.memset.p0.i64(ptr align 8 %72, i8 0, i64 %84, i1 false) + %51 = lshr exact i32 -2147483648, %50 + %52 = trunc nuw i32 %51 to i16 + %53 = getelementptr i8, ptr %.0.i.i, i64 44 + store i16 %52, ptr %53, align 4 + %54 = trunc nuw nsw i32 %50 to i16 + %55 = sub nuw nsw i16 34, %54 + %56 = getelementptr i8, ptr %.0.i.i, i64 46 + store i16 %55, ptr %56, align 2 + %57 = getelementptr i8, ptr %.0.i.i, i64 72 + store i32 %2, ptr %57, align 8 + %58 = add i32 %.0, -1 + %59 = getelementptr i8, ptr %.0.i.i, i64 48 + store i32 %58, ptr %59, align 8 + %60 = add i32 %.0, 1 + %61 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %60) + %62 = icmp samesign ult i32 %61, 2 + %63 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %60, i1 true) + %64 = sub nuw nsw i32 31, %63 + %65 = shl nuw i32 2, %64 + %66 = add i32 %65, -1 + %67 = select i1 %62, i32 %.0, i32 %66 + %68 = getelementptr i8, ptr %.0.i.i, i64 52 + store i32 %67, ptr %68, align 4 + %69 = lshr i32 %67, 1 + %70 = getelementptr i8, ptr %.0.i.i, i64 56 + store i32 %69, ptr %70, align 8 + %71 = getelementptr i8, ptr %.0.i.i, i64 76 + %72 = ptrtoint ptr %71 to i64 + %73 = and i64 %72, 7 + %74 = icmp eq i64 %73, 0 + br i1 %74, label %75, label %84 + +75: ; preds = %31 + %76 = getelementptr i8, ptr %.0.i.i, i64 468 + %77 = icmp ult ptr %71, %76 + br i1 %77, label %.lr.ph.preheader, label %.loopexit + +.lr.ph.preheader: ; preds = %75 + %78 = add i64 %.0.i.i84, 468 + %79 = add i64 %.0.i.i84, 84 + %umax = tail call i64 @llvm.umax.i64(i64 %78, i64 %79) + %80 = add i64 %umax, -77 + %81 = sub i64 %80, %.0.i.i84 + %82 = and i64 %81, -8 + %83 = add i64 %82, 8 + tail call void @llvm.memset.p0.i64(ptr align 8 %71, i8 0, i64 %83, i1 false) br label %.loopexit -85: ; preds = %31 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(392) %72, i8 0, i64 392, i1 false) +84: ; preds = %31 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(392) %71, i8 0, i64 392, i1 false) br label %.loopexit -.loopexit: ; preds = %.lr.ph.preheader, %76, %85 - %86 = getelementptr i8, ptr %.0.i.i, i64 468 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(4096) %86, i8 0, i64 4096, i1 false) - %87 = zext i32 %16 to i64 - %88 = getelementptr [98 x i32], ptr %72, i64 0, i64 %87 - store i32 1, ptr %88, align 4 - %89 = getelementptr i8, ptr %.0.i.i, i64 60 - store i32 %16, ptr %89, align 4 - %90 = getelementptr i8, ptr %.0.i.i, i64 64 - store i32 0, ptr %90, align 8 - %91 = getelementptr inbounds nuw i8, ptr %.0.i.i, i64 12 - store i16 4568, ptr %91, align 4 +.loopexit: ; preds = %.lr.ph.preheader, %75, %84 + %85 = getelementptr i8, ptr %.0.i.i, i64 468 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(4096) %85, i8 0, i64 4096, i1 false) + %86 = zext i32 %16 to i64 + %87 = getelementptr [98 x i32], ptr %71, i64 0, i64 %86 + store i32 1, ptr %87, align 4 + %88 = getelementptr i8, ptr %.0.i.i, i64 60 + store i32 %16, ptr %88, align 4 + %89 = getelementptr i8, ptr %.0.i.i, i64 64 + store i32 0, ptr %89, align 8 + %90 = getelementptr inbounds nuw i8, ptr %.0.i.i, i64 12 + store i16 4568, ptr %90, align 4 ret void } diff --git a/bench/postgres/optimized/hyperloglog.ll b/bench/postgres/optimized/hyperloglog.ll index 7f01a881702..eb912910fe2 100644 --- a/bench/postgres/optimized/hyperloglog.ll +++ b/bench/postgres/optimized/hyperloglog.ll @@ -164,33 +164,26 @@ define dso_local void @addHyperLogLog(ptr nocapture noundef readonly %0, i32 nou %7 = shl i32 %1, %6 %8 = trunc i64 %5 to i8 %9 = icmp eq i32 %7, 0 - br i1 %9, label %10, label %12 + br i1 %9, label %rho.exit, label %10 10: ; preds = %2 - %11 = add i8 %8, 1 + %11 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 range(i32 1, 0) %7, i1 true) + %12 = trunc nuw nsw i32 %11 to i8 + %spec.select.v.i = tail call i8 @llvm.umin.i8(i8 %8, i8 %12) br label %rho.exit -12: ; preds = %2 - %13 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 range(i32 1, 0) %7, i1 true) - %14 = trunc nuw nsw i32 %13 to i8 - %15 = xor i8 %14, 31 - %16 = sub nuw nsw i8 32, %15 - %17 = icmp ugt i8 %16, %8 - %18 = add i8 %8, 1 - %spec.select.i = select i1 %17, i8 %18, i8 %16 - br label %rho.exit - -rho.exit: ; preds = %10, %12 - %.0.i = phi i8 [ %11, %10 ], [ %spec.select.i, %12 ] - %19 = trunc nsw i64 %5 to i32 - %20 = lshr i32 %1, %19 - %21 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %22 = load ptr, ptr %21, align 8 - %23 = zext i32 %20 to i64 - %24 = getelementptr i8, ptr %22, i64 %23 - %25 = load i8, ptr %24, align 1 - %. = tail call i8 @llvm.umax.i8(i8 %.0.i, i8 %25) - store i8 %., ptr %24, align 1 +rho.exit: ; preds = %2, %10 + %.0.in.i = phi i8 [ %spec.select.v.i, %10 ], [ %8, %2 ] + %13 = trunc nsw i64 %5 to i32 + %14 = lshr i32 %1, %13 + %.0.i = add i8 %.0.in.i, 1 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %16 = load ptr, ptr %15, align 8 + %17 = zext i32 %14 to i64 + %18 = getelementptr i8, ptr %16, i64 %17 + %19 = load i8, ptr %18, align 1 + %. = tail call i8 @llvm.umax.i8(i8 %.0.i, i8 %19) + store i8 %., ptr %18, align 1 ret void } @@ -307,6 +300,9 @@ declare double @ldexp(double, i32) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.sqrt.f64(double) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.umin.i8(i8, i8) #9 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umax.i8(i8, i8) #9 diff --git a/bench/postgres/optimized/nodeHash.ll b/bench/postgres/optimized/nodeHash.ll index 6eb0d3f56d9..33fc45bb69a 100644 --- a/bench/postgres/optimized/nodeHash.ll +++ b/bench/postgres/optimized/nodeHash.ll @@ -1219,7 +1219,7 @@ list_length.exit.split: ; preds = %list_length.exit, % %218 = call range(i32 1, 33) i32 @llvm.ctpop.i32(i32 %217) %219 = icmp samesign ult i32 %218, 2 %220 = call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %217, i1 true) - %221 = xor i32 %220, 31 + %221 = sub nuw nsw i32 31, %220 %222 = shl nuw i32 2, %221 %.0.i.i = select i1 %219, i32 %217, i32 %222 %223 = shl i32 %.0.i.i, 2 @@ -1364,9 +1364,9 @@ define dso_local void @ExecChooseHashTableSize(double noundef %0, i32 noundef %1 %17 = add nsw i64 %16, 84 br label %tailrecurse -tailrecurse: ; preds = %67, %9 - %.tr = phi double [ %0, %9 ], [ %.0, %67 ] - %.tr92 = phi i1 [ %3, %9 ], [ false, %67 ] +tailrecurse: ; preds = %66, %9 + %.tr = phi double [ %0, %9 ], [ %.0, %66 ] + %.tr92 = phi i1 [ %3, %9 ], [ false, %66 ] %18 = fcmp ugt double %.tr, 0.000000e+00 %.0 = select i1 %18, double %.tr, double 1.000000e+03 %19 = fmul double %.0, %13 @@ -1416,77 +1416,76 @@ tailrecurse: ; preds = %67, %9 %45 = lshr i64 %.1, 3 %46 = tail call i64 @llvm.umin.i64(i64 %45, i64 134217727) %47 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 0, 2305843009213693952) %46, i1 true) - %48 = xor i64 %47, 63 - %49 = shl nuw nsw i64 1, %48 - %50 = tail call double @llvm.ceil.f64(double %.0) - %51 = uitofp nneg i64 %49 to double - %52 = fcmp olt double %50, %51 - %53 = select i1 %52, double %50, double %51 - %54 = fptosi double %53 to i32 - %55 = tail call i32 @llvm.smax.i32(i32 %54, i32 1024) - %56 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 %55) - %57 = icmp samesign ult i32 %56, 2 - %58 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %55, i1 true) - %59 = xor i32 %58, 31 - %60 = shl nuw i32 2, %59 - %.0.i = select i1 %57, i32 %55, i32 %60 - %61 = sext i32 %.0.i to i64 - %62 = shl nsw i64 %61, 3 - %63 = uitofp i64 %62 to double - %64 = fadd double %19, %63 - %65 = uitofp i64 %.1 to double - %66 = fcmp ogt double %64, %65 - br i1 %66, label %67, label %.loopexit - -67: ; preds = %44 - br i1 %.tr92, label %tailrecurse, label %68 - -68: ; preds = %67 - %69 = add nsw i64 %16, 8 - %.not86 = icmp ugt i64 %.1, %69 - br i1 %.not86, label %70, label %77 - -70: ; preds = %68 - %71 = udiv i64 %.1, %69 - %72 = tail call range(i64 0, 65) i64 @llvm.ctpop.i64(i64 %71) - %73 = icmp samesign ult i64 %72, 2 - %74 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %71, i1 true) - %75 = sub nuw nsw i64 64, %74 - %76 = shl nuw i64 1, %75 - %.0.i87 = select i1 %73, i64 %71, i64 %76 - br label %77 + %48 = lshr exact i64 -9223372036854775808, %47 + %49 = tail call double @llvm.ceil.f64(double %.0) + %50 = uitofp nneg i64 %48 to double + %51 = fcmp olt double %49, %50 + %52 = select i1 %51, double %49, double %50 + %53 = fptosi double %52 to i32 + %54 = tail call i32 @llvm.smax.i32(i32 %53, i32 1024) + %55 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 %54) + %56 = icmp samesign ult i32 %55, 2 + %57 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %54, i1 true) + %58 = sub nuw nsw i32 31, %57 + %59 = shl nuw i32 2, %58 + %.0.i = select i1 %56, i32 %54, i32 %59 + %60 = sext i32 %.0.i to i64 + %61 = shl nsw i64 %60, 3 + %62 = uitofp i64 %61 to double + %63 = fadd double %19, %62 + %64 = uitofp i64 %.1 to double + %65 = fcmp ogt double %63, %64 + br i1 %65, label %66, label %.loopexit + +66: ; preds = %44 + br i1 %.tr92, label %tailrecurse, label %67 -77: ; preds = %68, %70 - %.080 = phi i64 [ %.0.i87, %70 ], [ 1, %68 ] - %78 = tail call i64 @llvm.umin.i64(i64 %.080, i64 %49) - %79 = trunc nuw nsw i64 %78 to i32 - %80 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %79) - %81 = icmp samesign ult i32 %80, 2 - %82 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %79, i1 true) - %83 = xor i32 %82, 31 - %84 = shl nuw nsw i32 2, %83 - %.0.i88 = select i1 %81, i32 %79, i32 %84 - %85 = zext nneg i32 %.0.i88 to i64 - %86 = shl nuw nsw i64 %85, 3 - %87 = sub i64 %.1, %86 - %88 = uitofp i64 %87 to double - %89 = fdiv double %19, %88 - %90 = tail call double @llvm.ceil.f64(double %89) - %91 = fcmp olt double %90, %51 - %92 = select i1 %91, double %90, double %51 - %93 = fptosi double %92 to i32 - %94 = tail call i32 @llvm.smax.i32(i32 %93, i32 2) - %95 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 %94) - %96 = icmp samesign ult i32 %95, 2 - %97 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %94, i1 true) - %98 = xor i32 %97, 31 - %99 = shl nuw i32 2, %98 - %.0.i89 = select i1 %96, i32 %94, i32 %99 +67: ; preds = %66 + %68 = add nsw i64 %16, 8 + %.not86 = icmp ugt i64 %.1, %68 + br i1 %.not86, label %69, label %76 + +69: ; preds = %67 + %70 = udiv i64 %.1, %68 + %71 = tail call range(i64 0, 65) i64 @llvm.ctpop.i64(i64 %70) + %72 = icmp samesign ult i64 %71, 2 + %73 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %70, i1 true) + %74 = sub nuw nsw i64 64, %73 + %75 = shl nuw i64 1, %74 + %.0.i87 = select i1 %72, i64 %70, i64 %75 + br label %76 + +76: ; preds = %67, %69 + %.080 = phi i64 [ %.0.i87, %69 ], [ 1, %67 ] + %77 = tail call i64 @llvm.umin.i64(i64 %.080, i64 %48) + %78 = trunc nuw nsw i64 %77 to i32 + %79 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %78) + %80 = icmp samesign ult i32 %79, 2 + %81 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %78, i1 true) + %82 = sub nuw nsw i32 31, %81 + %83 = shl nuw nsw i32 2, %82 + %.0.i88 = select i1 %80, i32 %78, i32 %83 + %84 = zext nneg i32 %.0.i88 to i64 + %85 = shl nuw nsw i64 %84, 3 + %86 = sub i64 %.1, %85 + %87 = uitofp i64 %86 to double + %88 = fdiv double %19, %87 + %89 = tail call double @llvm.ceil.f64(double %88) + %90 = fcmp olt double %89, %50 + %91 = select i1 %90, double %89, double %50 + %92 = fptosi double %91 to i32 + %93 = tail call i32 @llvm.smax.i32(i32 %92, i32 2) + %94 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 %93) + %95 = icmp samesign ult i32 %94, 2 + %96 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %93, i1 true) + %97 = sub nuw nsw i32 31, %96 + %98 = shl nuw i32 2, %97 + %.0.i89 = select i1 %95, i32 %93, i32 %98 br label %.loopexit -.loopexit: ; preds = %44, %77 - %.082 = phi i32 [ %.0.i88, %77 ], [ %.0.i, %44 ] - %.081 = phi i32 [ %.0.i89, %77 ], [ 1, %44 ] +.loopexit: ; preds = %44, %76 + %.082 = phi i32 [ %.0.i88, %76 ], [ %.0.i, %44 ] + %.081 = phi i32 [ %.0.i89, %76 ], [ 1, %44 ] store i32 %.082, ptr %6, align 4 store i32 %.081, ptr %7, align 4 ret void @@ -4081,7 +4080,7 @@ ExecParallelHashCloseBatchAccessors.exit: ; preds = %.lr.ph.i, %11 %53 = tail call range(i32 0, 32) i32 @llvm.ctpop.i32(i32 %52) %54 = icmp samesign ult i32 %53, 2 %55 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %52, i1 true) - %56 = xor i32 %55, 31 + %56 = sub nuw nsw i32 31, %55 %57 = shl nuw i32 2, %56 %.0.i = select i1 %54, i32 %52, i32 %57 br label %60 @@ -4112,7 +4111,7 @@ ExecParallelHashCloseBatchAccessors.exit: ; preds = %.lr.ph.i, %11 %75 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 %74) %76 = icmp samesign ult i32 %75, 2 %77 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %74, i1 true) - %78 = xor i32 %77, 31 + %78 = sub nuw nsw i32 31, %77 %79 = shl nuw i32 2, %78 %.0.i96 = select i1 %76, i32 %74, i32 %79 %80 = getelementptr inbounds nuw i8, ptr %0, i64 240 diff --git a/bench/proj/optimized/grids.cpp.ll b/bench/proj/optimized/grids.cpp.ll index be6ab0a48f8..c82f6fea755 100644 --- a/bench/proj/optimized/grids.cpp.ll +++ b/bench/proj/optimized/grids.cpp.ll @@ -3991,7 +3991,7 @@ define linkonce_odr void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull alig %15 = sub i64 %14, %6 %16 = icmp sgt i64 %8, -1 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %8, 9223372036854775807 + %17 = sub nuw nsw i64 9223372036854775807, %8 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28.i = icmp ult i64 %15, %11 @@ -4015,7 +4015,7 @@ _ZSt27__uninitialized_default_n_aIPhmhET_S1_T0_RSaIT1_E.exit.i: ; preds = %23, % br label %_ZNSt6vectorIhSaIhEE17_M_default_appendEm.exit 25: ; preds = %10 - %26 = icmp ult i64 %17, %11 + %26 = icmp slt i64 %1, 0 br i1 %26, label %27, label %_ZNKSt6vectorIhSaIhEE12_M_check_lenEmPKc.exit.i 27: ; preds = %25 @@ -4056,7 +4056,7 @@ _ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i: ; preds = %36, %_ZSt27__u _ZNSt12_Vector_baseIhSaIhEE13_M_deallocateEPhm.exit34.i: ; preds = %37, %_ZNSt6vectorIhSaIhEE11_S_relocateEPhS2_S2_RS0_.exit.i store ptr %30, ptr %0, align 8 - %38 = getelementptr inbounds i8, ptr %30, i64 %1 + %38 = getelementptr inbounds nuw i8, ptr %30, i64 %1 store ptr %38, ptr %3, align 8 %39 = getelementptr inbounds nuw i8, ptr %30, i64 %29 store ptr %39, ptr %12, align 8 @@ -22047,7 +22047,7 @@ define linkonce_odr void @_ZNSt6vectorIfSaIfEE17_M_default_appendEm(ptr noundef %15 = ashr exact i64 %14, 2 %16 = icmp ult i64 %10, 2305843009213693952 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %10, 2305843009213693951 + %17 = sub nuw nsw i64 2305843009213693951, %10 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28 = icmp ult i64 %15, %1 @@ -23068,7 +23068,7 @@ define linkonce_odr void @_ZNSt6vectorIdSaIdEE17_M_default_appendEm(ptr noundef %15 = ashr exact i64 %14, 3 %16 = icmp ult i64 %10, 1152921504606846976 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %10, 1152921504606846975 + %17 = sub nuw nsw i64 1152921504606846975, %10 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28 = icmp ult i64 %15, %1 diff --git a/bench/qemu/optimized/hw_vfio_spapr.c.ll b/bench/qemu/optimized/hw_vfio_spapr.c.ll index ced70b3f219..d69f151cbf2 100644 --- a/bench/qemu/optimized/hw_vfio_spapr.c.ll +++ b/bench/qemu/optimized/hw_vfio_spapr.c.ll @@ -187,8 +187,7 @@ for.end: ; preds = %for.cond, %if.end7 cond.end.i: ; preds = %for.end %11 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, 0) %and.i, i1 true) - %sub4.i = xor i64 %11, 63 - %shl.i = shl nuw i64 1, %sub4.i + %shl.i = lshr exact i64 -9223372036854775808, %11 %12 = load i128, ptr %section, align 16 %cmp.i.i = icmp ult i128 %12, 18446744073709551616 br i1 %cmp.i.i, label %int128_get64.exit.i, label %if.else.i.i @@ -207,19 +206,21 @@ int128_get64.exit.i: ; preds = %cond.end.i %coerce.sroa.0.0.extract.trunc.i = trunc nuw i128 %12 to i64 %window_size.i = getelementptr inbounds nuw i8, ptr %create.i, i64 16 store i64 %coerce.sroa.0.0.extract.trunc.i, ptr %window_size.i, align 8 - %cast.i20.i = trunc nuw nsw i64 %sub4.i to i32 + %14 = trunc nuw nsw i64 %11 to i32 + %cast.i20.i = sub nuw nsw i32 63, %14 %page_shift.i = getelementptr inbounds nuw i8, ptr %create.i, i64 8 store i32 %cast.i20.i, ptr %page_shift.i, align 8 - %shr.i = lshr i64 %coerce.sroa.0.0.extract.trunc.i, %sub4.i + %sh_prom14.i = zext nneg i32 %cast.i20.i to i64 + %shr.i = lshr i64 %coerce.sroa.0.0.extract.trunc.i, %sh_prom14.i %conv15.i = shl i64 %shr.i, 3 %mul.i = and i64 %conv15.i, 34359738360 - %14 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 range(i64 -2147483648, -9223372036854775807) %mul.i, i1 false) + %15 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 range(i64 -2147483648, -9223372036854775807) %mul.i, i1 false) %call.i22.i = tail call i32 @getpagesize() #15 - %15 = zext i32 %call.i22.i to i64 - %16 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %15, i1 false) - %cast.i23.i = trunc nuw nsw i64 %16 to i8 + %16 = zext i32 %call.i22.i to i64 + %17 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %16, i1 false) + %cast.i23.i = trunc nuw nsw i64 %17 to i8 %add.i = add nuw nsw i8 %cast.i23.i, 8 - %div.lhs.trunc.i = trunc nuw nsw i64 %14 to i8 + %div.lhs.trunc.i = trunc nuw nsw i64 %15 to i8 %div31.i = udiv i8 %div.lhs.trunc.i, %add.i %div.zext.i = zext nneg i8 %div31.i to i32 %levels.i = getelementptr inbounds nuw i8, ptr %create.i, i64 24 @@ -228,8 +229,8 @@ int128_get64.exit.i: ; preds = %cond.end.i %inc.i = zext i1 %tobool19.not.i to i32 %spec.select19.i = add nuw nsw i32 %inc.i, %div.zext.i store i32 %spec.select19.i, ptr %levels.i, align 8 - %17 = trunc nuw nsw i64 %sub4.i to i8 - %div27.lhs.trunc.i = sub nuw nsw i8 64, %17 + %18 = trunc nuw nsw i64 %11 to i8 + %div27.lhs.trunc.i = add nuw nsw i8 %18, 1 %div2733.i = udiv i8 %div27.lhs.trunc.i, %cast.i23.i %div27.zext.i = zext nneg i8 %div2733.i to i32 %cmp29.not35.i = icmp samesign ugt i32 %spec.select19.i, %div27.zext.i @@ -240,14 +241,14 @@ for.body.lr.ph.i: ; preds = %int128_get64.exit.i br label %for.body.i37 for.body.i37: ; preds = %for.inc.i38, %for.body.lr.ph.i - %18 = load i32, ptr %fd.i, align 8 - %call31.i = call i32 (i32, i64, ...) @ioctl(i32 noundef %18, i64 noundef 15223, ptr noundef nonnull %create.i) #14 + %19 = load i32, ptr %fd.i, align 8 + %call31.i = call i32 (i32, i64, ...) @ioctl(i32 noundef %19, i64 noundef 15223, ptr noundef nonnull %create.i) #14 %tobool32.not.i = icmp eq i32 %call31.i, 0 br i1 %tobool32.not.i, label %if.end41.i.loopexit, label %for.inc.i38 for.inc.i38: ; preds = %for.body.i37 - %19 = load i32, ptr %levels.i, align 8 - %inc36.i = add i32 %19, 1 + %20 = load i32, ptr %levels.i, align 8 + %inc36.i = add i32 %20, 1 store i32 %inc36.i, ptr %levels.i, align 8 %cmp29.not.i = icmp ugt i32 %inc36.i, %div27.zext.i br i1 %cmp29.not.i, label %vfio_spapr_create_window.exit, label %for.body.i37, !llvm.loop !8 @@ -258,56 +259,56 @@ if.end41.i.loopexit: ; preds = %for.body.i37 br label %if.end41.i if.end41.i: ; preds = %if.end41.i.loopexit, %int128_get64.exit.i - %20 = phi i64 [ %.pre, %if.end41.i.loopexit ], [ 0, %int128_get64.exit.i ] + %21 = phi i64 [ %.pre, %if.end41.i.loopexit ], [ 0, %int128_get64.exit.i ] %offset_within_address_space.i = getelementptr inbounds nuw i8, ptr %section, i64 40 - %21 = load i64, ptr %offset_within_address_space.i, align 8 - %cmp42.not.i = icmp eq i64 %20, %21 + %22 = load i64, ptr %offset_within_address_space.i, align 8 + %cmp42.not.i = icmp eq i64 %21, %22 br i1 %cmp42.not.i, label %if.end49.i, label %if.then44.i if.then44.i: ; preds = %if.end41.i %start_addr.i = getelementptr inbounds nuw i8, ptr %create.i, i64 32 - %22 = getelementptr i8, ptr %container, i64 8 - %container.val.i = load i32, ptr %22, align 8 - %23 = call fastcc i32 @vfio_spapr_remove_window(i32 %container.val.i, i64 noundef %20) - %24 = load i64, ptr %offset_within_address_space.i, align 8 - %25 = load i64, ptr %start_addr.i, align 8 - call void (ptr, ...) @error_report(ptr noundef nonnull @.str.13, i64 noundef %24, i64 noundef %25) #14 + %23 = getelementptr i8, ptr %container, i64 8 + %container.val.i = load i32, ptr %23, align 8 + %24 = call fastcc i32 @vfio_spapr_remove_window(i32 %container.val.i, i64 noundef %21) + %25 = load i64, ptr %offset_within_address_space.i, align 8 + %26 = load i64, ptr %start_addr.i, align 8 + call void (ptr, ...) @error_report(ptr noundef nonnull @.str.13, i64 noundef %25, i64 noundef %26) #14 br label %vfio_spapr_create_window.exit.thread if.end49.i: ; preds = %if.end41.i - %26 = load i32, ptr %page_shift.i, align 8 - %27 = load i32, ptr %levels.i, align 8 - %28 = load i64, ptr %window_size.i, align 8 + %27 = load i32, ptr %page_shift.i, align 8 + %28 = load i32, ptr %levels.i, align 8 + %29 = load i64, ptr %window_size.i, align 8 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %_now.i.i.i) - %29 = load i32, ptr @trace_events_enabled_count, align 4 - %tobool.i.i.i = icmp ne i32 %29, 0 - %30 = load i16, ptr @_TRACE_VFIO_SPAPR_CREATE_WINDOW_DSTATE, align 2 - %tobool4.i.i.i = icmp ne i16 %30, 0 + %30 = load i32, ptr @trace_events_enabled_count, align 4 + %tobool.i.i.i = icmp ne i32 %30, 0 + %31 = load i16, ptr @_TRACE_VFIO_SPAPR_CREATE_WINDOW_DSTATE, align 2 + %tobool4.i.i.i = icmp ne i16 %31, 0 %or.cond.i.i.i = select i1 %tobool.i.i.i, i1 %tobool4.i.i.i, i1 false br i1 %or.cond.i.i.i, label %land.lhs.true5.i.i.i, label %vfio_spapr_create_window.exit.thread56 land.lhs.true5.i.i.i: ; preds = %if.end49.i - %31 = load i32, ptr @qemu_loglevel, align 4 - %and.i.i.i.i = and i32 %31, 32768 + %32 = load i32, ptr @qemu_loglevel, align 4 + %and.i.i.i.i = and i32 %32, 32768 %cmp.i.not.i.i.i = icmp eq i32 %and.i.i.i.i, 0 br i1 %cmp.i.not.i.i.i, label %vfio_spapr_create_window.exit.thread56, label %if.then.i.i.i if.then.i.i.i: ; preds = %land.lhs.true5.i.i.i - %32 = load i8, ptr @message_with_timestamp, align 1 - %tobool7.i.i.i = trunc i8 %32 to i1 + %33 = load i8, ptr @message_with_timestamp, align 1 + %tobool7.i.i.i = trunc i8 %33 to i1 br i1 %tobool7.i.i.i, label %if.then8.i.i.i, label %if.else.i.i.i if.then8.i.i.i: ; preds = %if.then.i.i.i %call9.i.i.i = call i32 @gettimeofday(ptr noundef nonnull %_now.i.i.i, ptr noundef null) #14 %call10.i.i.i = call i32 @qemu_get_thread_id() #14 - %33 = load i64, ptr %_now.i.i.i, align 8 + %34 = load i64, ptr %_now.i.i.i, align 8 %tv_usec.i.i.i = getelementptr inbounds nuw i8, ptr %_now.i.i.i, i64 8 - %34 = load i64, ptr %tv_usec.i.i.i, align 8 - call void (ptr, ...) @qemu_log(ptr noundef nonnull @.str.16, i32 noundef %call10.i.i.i, i64 noundef %33, i64 noundef %34, i32 noundef %26, i32 noundef %27, i64 noundef %28, i64 noundef %20) #14 + %35 = load i64, ptr %tv_usec.i.i.i, align 8 + call void (ptr, ...) @qemu_log(ptr noundef nonnull @.str.16, i32 noundef %call10.i.i.i, i64 noundef %34, i64 noundef %35, i32 noundef %27, i32 noundef %28, i64 noundef %29, i64 noundef %21) #14 br label %vfio_spapr_create_window.exit.thread56 if.else.i.i.i: ; preds = %if.then.i.i.i - call void (ptr, ...) @qemu_log(ptr noundef nonnull @.str.17, i32 noundef %26, i32 noundef %27, i64 noundef %28, i64 noundef %20) #14 + call void (ptr, ...) @qemu_log(ptr noundef nonnull @.str.17, i32 noundef %27, i32 noundef %28, i64 noundef %29, i64 noundef %21) #14 br label %vfio_spapr_create_window.exit.thread56 vfio_spapr_create_window.exit.thread56: ; preds = %if.end49.i, %land.lhs.true5.i.i.i, %if.then8.i.i.i, %if.else.i.i.i @@ -322,10 +323,10 @@ vfio_spapr_create_window.exit.thread: ; preds = %if.then44.i, %if.th vfio_spapr_create_window.exit: ; preds = %for.inc.i38 call void (ptr, ...) @error_report(ptr noundef nonnull @.str.12, i32 noundef %call31.i) #14 %call39.i = tail call ptr @__errno_location() #15 - %35 = load i32, ptr %call39.i, align 4 - %sub40.i = sub i32 0, %35 + %36 = load i32, ptr %call39.i, align 4 + %sub40.i = sub i32 0, %36 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %create.i) - %tobool30.not = icmp eq i32 %35, 0 + %tobool30.not = icmp eq i32 %36, 0 br i1 %tobool30.not, label %if.end33, label %if.then31 if.then31: ; preds = %vfio_spapr_create_window.exit.thread, %vfio_spapr_create_window.exit @@ -337,9 +338,9 @@ if.then31: ; preds = %vfio_spapr_create_w if.end33: ; preds = %vfio_spapr_create_window.exit.thread56, %vfio_spapr_create_window.exit %pgsize.060 = phi i64 [ %shl.i, %vfio_spapr_create_window.exit.thread56 ], [ 0, %vfio_spapr_create_window.exit ] %offset_within_address_space34 = getelementptr inbounds nuw i8, ptr %section, i64 40 - %36 = load i64, ptr %offset_within_address_space34, align 8 - %37 = load i128, ptr %section, align 16 - %cmp.i39 = icmp ult i128 %37, 18446744073709551616 + %37 = load i64, ptr %offset_within_address_space34, align 8 + %38 = load i128, ptr %section, align 16 + %cmp.i39 = icmp ult i128 %38, 18446744073709551616 br i1 %cmp.i39, label %int128_get64.exit41, label %if.else.i40 if.else.i40: ; preds = %if.end33 @@ -347,8 +348,8 @@ if.else.i40: ; preds = %if.end33 unreachable int128_get64.exit41: ; preds = %if.end33 - %coerce37.sroa.0.0.extract.trunc = trunc nuw i128 %37 to i64 - %add39 = add i64 %36, -1 + %coerce37.sroa.0.0.extract.trunc = trunc nuw i128 %38 to i64 + %add39 = add i64 %37, -1 %sub40 = add i64 %add39, %coerce37.sroa.0.0.extract.trunc %hostwin.019.i = load ptr, ptr %hostwin_list, align 8 %tobool.not20.i = icmp eq ptr %hostwin.019.i, null @@ -362,11 +363,11 @@ for.cond.i: ; preds = %for.body.i43 for.body.i43: ; preds = %int128_get64.exit41, %for.cond.i %hostwin.021.i = phi ptr [ %hostwin.0.i46, %for.cond.i ], [ %hostwin.019.i, %int128_get64.exit41 ] - %38 = load i64, ptr %hostwin.021.i, align 8 + %39 = load i64, ptr %hostwin.021.i, align 8 %max_iova2.i = getelementptr inbounds nuw i8, ptr %hostwin.021.i, i64 8 - %39 = load i64, ptr %max_iova2.i, align 8 - %cmp.i.i44 = icmp ult i64 %sub40, %38 - %cmp2.i.i = icmp ult i64 %39, %36 + %40 = load i64, ptr %max_iova2.i, align 8 + %cmp.i.i44 = icmp ult i64 %sub40, %39 + %cmp2.i.i = icmp ult i64 %40, %37 %.not.i.not.i = or i1 %cmp.i.i44, %cmp2.i.i br i1 %.not.i.not.i, label %for.cond.i, label %if.then.i @@ -376,19 +377,19 @@ if.then.i: ; preds = %for.body.i43 for.end.i: ; preds = %for.cond.i, %int128_get64.exit41 %call7.i48 = call noalias dereferenceable_or_null(40) ptr @g_malloc0(i64 noundef 40) #16 - store i64 %36, ptr %call7.i48, align 8 + store i64 %37, ptr %call7.i48, align 8 %max_iova9.i = getelementptr inbounds nuw i8, ptr %call7.i48, i64 8 store i64 %sub40, ptr %max_iova9.i, align 8 %iova_pgsizes10.i = getelementptr inbounds nuw i8, ptr %call7.i48, i64 16 store i64 %pgsize.060, ptr %iova_pgsizes10.i, align 8 - %40 = load ptr, ptr %hostwin_list, align 8 + %41 = load ptr, ptr %hostwin_list, align 8 %hostwin_next13.i = getelementptr inbounds nuw i8, ptr %call7.i48, i64 24 - store ptr %40, ptr %hostwin_next13.i, align 8 - %cmp.not.i49 = icmp eq ptr %40, null + store ptr %41, ptr %hostwin_next13.i, align 8 + %cmp.not.i49 = icmp eq ptr %41, null br i1 %cmp.not.i49, label %vfio_host_win_add.exit, label %if.then15.i if.then15.i: ; preds = %for.end.i - %le_prev.i = getelementptr inbounds nuw i8, ptr %40, i64 32 + %le_prev.i = getelementptr inbounds nuw i8, ptr %41, i64 32 store ptr %hostwin_next13.i, ptr %le_prev.i, align 8 br label %vfio_host_win_add.exit diff --git a/bench/raylib/optimized/rcore.c.ll b/bench/raylib/optimized/rcore.c.ll index ab19df0c2be..3aa85b441c0 100644 --- a/bench/raylib/optimized/rcore.c.ll +++ b/bench/raylib/optimized/rcore.c.ll @@ -35474,7 +35474,7 @@ sdefl_fnd.exit152: ; preds = %124, %127, %92 %154 = sext i32 %153 to i64 %155 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %154, i1 true) %156 = trunc nuw nsw i64 %155 to i32 - %157 = xor i32 %156, 63 + %157 = sub nuw nsw i32 63, %156 %158 = shl nuw i32 2, %157 %159 = ashr i32 %158, 2 %160 = select i1 %.not.i.i.i, i32 0, i32 %159 @@ -35487,7 +35487,7 @@ sdefl_fnd.exit152: ; preds = %124, %127, %92 163: ; preds = %142 %164 = trunc nuw nsw i64 %162 to i32 - %165 = xor i32 %164, 63 + %165 = sub nuw nsw i32 63, %164 %166 = shl nuw nsw i32 %165, 1 %167 = add nuw nsw i32 %166, 2 %168 = zext nneg i32 %165 to i64 @@ -36448,7 +36448,7 @@ sdefl_put.exit204.i: ; preds = %sdefl_put.exit204.l %657 = xor i32 %612, -1 %.not.i.i.i.i = icmp eq i32 %612, -1 %658 = call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %657, i1 true) - %659 = xor i32 %658, 31 + %659 = sub nuw nsw i32 31, %658 %660 = shl nuw i32 2, %659 %661 = ashr i32 %660, 2 %662 = select i1 %.not.i.i.i.i, i32 0, i32 %661 @@ -36456,7 +36456,7 @@ sdefl_put.exit204.i: ; preds = %sdefl_put.exit204.l %663 = sext i32 %662 to i64 %664 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %663, i1 true) %665 = trunc nuw nsw i64 %664 to i32 - %666 = xor i32 %665, 63 + %666 = sub nuw nsw i32 63, %665 %.0.i12.i.i.i = select i1 %.not.i11.i.i.i, i32 0, i32 %666 %.not.i.i.i162 = icmp eq i32 %.0.i12.i.i.i, 0 br i1 %.not.i.i.i162, label %sdefl_match_codes.exit.i.i, label %667 @@ -46684,15 +46684,15 @@ define internal fastcc void @sinfl_build(ptr nocapture noundef nonnull %0, ptr n %56 = zext nneg i32 %2 to i64 br label %.preheader47.i -.loopexit46.i: ; preds = %90 +.loopexit46.i: ; preds = %89 %57 = trunc nsw i64 %indvars.iv127 to i32 %58 = trunc nsw i64 %indvars.iv.next128 to i32 %.not41.i.not = icmp sgt i32 %2, %57 br i1 %.not41.i.not, label %.preheader47.i, label %.loopexit .preheader47.i: ; preds = %.loopexit46.i, %.preheader47.lr.ph.i - %.sroa.15.1 = phi i32 [ %.sroa.15.068, %.preheader47.lr.ph.i ], [ %92, %.loopexit46.i ] - %.sroa.24.0 = phi i32 [ 0, %.preheader47.lr.ph.i ], [ %82, %.loopexit46.i ] + %.sroa.15.1 = phi i32 [ %.sroa.15.068, %.preheader47.lr.ph.i ], [ %91, %.loopexit46.i ] + %.sroa.24.0 = phi i32 [ 0, %.preheader47.lr.ph.i ], [ %81, %.loopexit46.i ] %.sroa.0.1 = phi i32 [ %54, %.preheader47.lr.ph.i ], [ %58, %.loopexit46.i ] %.sroa.3147.0 = phi ptr [ %42, %.preheader47.lr.ph.i ], [ %75, %.loopexit46.i ] %.053.i = phi i32 [ %55, %.preheader47.lr.ph.i ], [ %.3.i, %.loopexit46.i ] @@ -46700,8 +46700,8 @@ define internal fastcc void @sinfl_build(ptr nocapture noundef nonnull %0, ptr n br label %60 60: ; preds = %74, %.preheader47.i - %.sroa.15.2 = phi i32 [ %.sroa.15.1, %.preheader47.i ], [ %83, %74 ] - %.sroa.24.1 = phi i32 [ %.sroa.24.0, %.preheader47.i ], [ %82, %74 ] + %.sroa.15.2 = phi i32 [ %.sroa.15.1, %.preheader47.i ], [ %82, %74 ] + %.sroa.24.1 = phi i32 [ %.sroa.24.0, %.preheader47.i ], [ %81, %74 ] %.sroa.3147.1 = phi ptr [ %.sroa.3147.0, %.preheader47.i ], [ %75, %74 ] %61 = load i16, ptr %.sroa.3147.1, align 2 %62 = sext i16 %61 to i32 @@ -46733,171 +46733,169 @@ define internal fastcc void @sinfl_build(ptr nocapture noundef nonnull %0, ptr n %75 = getelementptr inbounds nuw i8, ptr %.sroa.3147.1, i64 2 %76 = xor i32 %.sroa.24.1, %59 %77 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %76, i1 true) - %78 = xor i32 %77, 31 - %79 = shl nuw i32 1, %78 - %80 = add i32 %79, -1 - %81 = and i32 %80, %.sroa.24.1 - %82 = or i32 %81, %79 - %83 = add nsw i32 %.sroa.15.2, -1 - %.not42.i = icmp eq i32 %83, 0 + %78 = lshr exact i32 -2147483648, %77 + %79 = add i32 %78, -1 + %80 = and i32 %79, %.sroa.24.1 + %81 = or i32 %80, %78 + %82 = add nsw i32 %.sroa.15.2, -1 + %.not42.i = icmp eq i32 %82, 0 br i1 %.not42.i, label %.preheader45.i.preheader, label %60 .preheader45.i.preheader: ; preds = %74 - %84 = sext i32 %.sroa.0.1 to i64 + %83 = sext i32 %.sroa.0.1 to i64 br label %.preheader45.i -.preheader45.i: ; preds = %.preheader45.i.preheader, %90 - %indvars.iv127 = phi i64 [ %84, %.preheader45.i.preheader ], [ %indvars.iv.next128, %90 ] - %.2.i = phi i32 [ %.053.i, %.preheader45.i.preheader ], [ %.3.i, %90 ] +.preheader45.i: ; preds = %.preheader45.i.preheader, %89 + %indvars.iv127 = phi i64 [ %83, %.preheader45.i.preheader ], [ %indvars.iv.next128, %89 ] + %.2.i = phi i32 [ %.053.i, %.preheader45.i.preheader ], [ %.3.i, %89 ] %indvars.iv.next128 = add nsw i64 %indvars.iv127, 1 %.not43.not.i = icmp slt i64 %indvars.iv127, %56 - br i1 %.not43.not.i, label %85, label %90 - -85: ; preds = %.preheader45.i - %86 = sext i32 %.2.i to i64 - %87 = getelementptr inbounds i32, ptr %0, i64 %86 - %88 = shl nsw i64 %86, 2 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %87, ptr nonnull align 4 %0, i64 %88, i1 false) - %89 = shl i32 %.2.i, 1 - br label %90 - -90: ; preds = %85, %.preheader45.i - %.3.i = phi i32 [ %89, %85 ], [ %.2.i, %.preheader45.i ] - %91 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next128 - %92 = load i32, ptr %91, align 4 - %.not44.i = icmp eq i32 %92, 0 + br i1 %.not43.not.i, label %84, label %89 + +84: ; preds = %.preheader45.i + %85 = sext i32 %.2.i to i64 + %86 = getelementptr inbounds i32, ptr %0, i64 %85 + %87 = shl nsw i64 %85, 2 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %86, ptr nonnull align 4 %0, i64 %87, i1 false) + %88 = shl i32 %.2.i, 1 + br label %89 + +89: ; preds = %84, %.preheader45.i + %.3.i = phi i32 [ %88, %84 ], [ %.2.i, %.preheader45.i ] + %90 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next128 + %91 = load i32, ptr %90, align 4 + %.not44.i = icmp eq i32 %91, 0 br i1 %.not44.i, label %.preheader45.i, label %.loopexit46.i .loopexit: ; preds = %.loopexit46.i, %._crit_edge.i - %.sroa.15.3.ph = phi i32 [ %52, %._crit_edge.i ], [ %92, %.loopexit46.i ] - %.sroa.24.2.ph = phi i32 [ 0, %._crit_edge.i ], [ %82, %.loopexit46.i ] + %.sroa.15.3.ph = phi i32 [ %52, %._crit_edge.i ], [ %91, %.loopexit46.i ] + %.sroa.24.2.ph = phi i32 [ 0, %._crit_edge.i ], [ %81, %.loopexit46.i ] %.sroa.0.3.ph = phi i32 [ %53, %._crit_edge.i ], [ %58, %.loopexit46.i ] %.sroa.3147.2.ph = phi ptr [ %42, %._crit_edge.i ], [ %75, %.loopexit46.i ] - %93 = shl nuw nsw i32 1, %2 - %94 = add nsw i32 %93, -1 + %92 = shl nuw nsw i32 1, %2 + %93 = add nsw i32 %92, -1 %invariant.op.i = add nuw nsw i32 %2, 1 - %95 = sub nsw i32 0, %2 - %96 = zext i32 %95 to i64 + %94 = sub nsw i32 0, %2 + %95 = zext i32 %94 to i64 br label %.loopexit.i.outer -.loopexit.i.loopexit: ; preds = %146 - %97 = trunc nsw i64 %indvars.iv.next76.i to i32 +.loopexit.i.loopexit: ; preds = %144 + %96 = trunc nsw i64 %indvars.iv.next76.i to i32 br label %.loopexit.i.outer .loopexit.i.outer: ; preds = %.loopexit.i.loopexit, %.loopexit - %.sroa.15.4.ph = phi i32 [ %148, %.loopexit.i.loopexit ], [ %.sroa.15.3.ph, %.loopexit ] - %.sroa.24.3.ph = phi i32 [ %143, %.loopexit.i.loopexit ], [ %.sroa.24.2.ph, %.loopexit ] - %.sroa.3147.3.ph = phi ptr [ %136, %.loopexit.i.loopexit ], [ %.sroa.3147.2.ph, %.loopexit ] - %.pre79.i.ph = phi i32 [ %97, %.loopexit.i.loopexit ], [ %.sroa.0.3.ph, %.loopexit ] - %.056.i.ph = phi i32 [ %.157.i, %.loopexit.i.loopexit ], [ %93, %.loopexit ] + %.sroa.15.4.ph = phi i32 [ %146, %.loopexit.i.loopexit ], [ %.sroa.15.3.ph, %.loopexit ] + %.sroa.24.3.ph = phi i32 [ %141, %.loopexit.i.loopexit ], [ %.sroa.24.2.ph, %.loopexit ] + %.sroa.3147.3.ph = phi ptr [ %135, %.loopexit.i.loopexit ], [ %.sroa.3147.2.ph, %.loopexit ] + %.pre79.i.ph = phi i32 [ %96, %.loopexit.i.loopexit ], [ %.sroa.0.3.ph, %.loopexit ] + %.056.i.ph = phi i32 [ %.157.i, %.loopexit.i.loopexit ], [ %92, %.loopexit ] %.054.i.ph = phi i32 [ %.155.i, %.loopexit.i.loopexit ], [ -1, %.loopexit ] %.053.i35.ph = phi i32 [ %.1.i, %.loopexit.i.loopexit ], [ 0, %.loopexit ] %.pre137 = sub nsw i32 %.pre79.i.ph, %2 %.pre138 = shl nuw i32 1, %.pre137 - %98 = zext i32 %.pre79.i.ph to i64 - %99 = add nuw nsw i64 %98, %96 - %100 = and i32 %.pre137, 15 - %101 = sext i32 %.pre138 to i64 + %97 = zext i32 %.pre79.i.ph to i64 + %98 = add nuw nsw i64 %97, %95 + %99 = and i32 %.pre137, 15 + %100 = sext i32 %.pre138 to i64 %notmask.i = shl nsw i32 -1, %.pre79.i.ph - %102 = xor i32 %notmask.i, -1 + %101 = xor i32 %notmask.i, -1 br label %.loopexit.i -.loopexit.i: ; preds = %.loopexit.i.outer, %135 - %.sroa.15.4 = phi i32 [ %144, %135 ], [ %.sroa.15.4.ph, %.loopexit.i.outer ] - %.sroa.24.3 = phi i32 [ %143, %135 ], [ %.sroa.24.3.ph, %.loopexit.i.outer ] - %.sroa.3147.3 = phi ptr [ %136, %135 ], [ %.sroa.3147.3.ph, %.loopexit.i.outer ] - %.056.i = phi i32 [ %.157.i, %135 ], [ %.056.i.ph, %.loopexit.i.outer ] - %.054.i = phi i32 [ %.155.i, %135 ], [ %.054.i.ph, %.loopexit.i.outer ] - %.053.i35 = phi i32 [ %.1.i, %135 ], [ %.053.i35.ph, %.loopexit.i.outer ] - %103 = and i32 %.sroa.24.3, %94 - %.not.i36 = icmp eq i32 %103, %.054.i - br i1 %.not.i36, label %._crit_edge136, label %104 - -104: ; preds = %.loopexit.i - %105 = icmp slt i32 %.sroa.15.4, %.pre138 - br i1 %105, label %.lr.ph.i38, label %._crit_edge.i37 - -.lr.ph.i38: ; preds = %104, %.lr.ph.i38 - %indvars.iv.i39 = phi i64 [ %indvars.iv.next.i40, %.lr.ph.i38 ], [ %99, %104 ] - %.064.i = phi i32 [ %111, %.lr.ph.i38 ], [ %.sroa.15.4, %104 ] +.loopexit.i: ; preds = %.loopexit.i.outer, %134 + %.sroa.15.4 = phi i32 [ %142, %134 ], [ %.sroa.15.4.ph, %.loopexit.i.outer ] + %.sroa.24.3 = phi i32 [ %141, %134 ], [ %.sroa.24.3.ph, %.loopexit.i.outer ] + %.sroa.3147.3 = phi ptr [ %135, %134 ], [ %.sroa.3147.3.ph, %.loopexit.i.outer ] + %.056.i = phi i32 [ %.157.i, %134 ], [ %.056.i.ph, %.loopexit.i.outer ] + %.054.i = phi i32 [ %.155.i, %134 ], [ %.054.i.ph, %.loopexit.i.outer ] + %.053.i35 = phi i32 [ %.1.i, %134 ], [ %.053.i35.ph, %.loopexit.i.outer ] + %102 = and i32 %.sroa.24.3, %93 + %.not.i36 = icmp eq i32 %102, %.054.i + br i1 %.not.i36, label %._crit_edge136, label %103 + +103: ; preds = %.loopexit.i + %104 = icmp slt i32 %.sroa.15.4, %.pre138 + br i1 %104, label %.lr.ph.i38, label %._crit_edge.i37 + +.lr.ph.i38: ; preds = %103, %.lr.ph.i38 + %indvars.iv.i39 = phi i64 [ %indvars.iv.next.i40, %.lr.ph.i38 ], [ %98, %103 ] + %.064.i = phi i32 [ %110, %.lr.ph.i38 ], [ %.sroa.15.4, %103 ] %indvars.iv.next.i40 = add i64 %indvars.iv.i39, 1 - %106 = shl i32 %.064.i, 1 - %107 = trunc i64 %indvars.iv.i39 to i32 - %.reass.i = add i32 %invariant.op.i, %107 - %108 = sext i32 %.reass.i to i64 - %109 = getelementptr inbounds i32, ptr %7, i64 %108 - %110 = load i32, ptr %109, align 4 - %111 = add nsw i32 %110, %106 - %112 = trunc i64 %indvars.iv.next.i40 to i32 - %113 = shl nuw i32 1, %112 - %114 = icmp slt i32 %111, %113 - br i1 %114, label %.lr.ph.i38, label %._crit_edge.i37 - -._crit_edge.i37: ; preds = %.lr.ph.i38, %104 - %.052.lcssa.i = phi i32 [ %.pre137, %104 ], [ %112, %.lr.ph.i38 ] - %.lcssa.i = phi i32 [ %.pre138, %104 ], [ %113, %.lr.ph.i38 ] - %115 = add nsw i32 %.lcssa.i, %.056.i - %116 = shl i32 %.056.i, 16 - %117 = and i32 %.052.lcssa.i, 15 - %118 = or disjoint i32 %117, %116 - %119 = or disjoint i32 %118, 16 - %120 = zext nneg i32 %103 to i64 - %121 = getelementptr inbounds nuw i32, ptr %0, i64 %120 - store i32 %119, ptr %121, align 4 + %105 = shl i32 %.064.i, 1 + %106 = trunc i64 %indvars.iv.i39 to i32 + %.reass.i = add i32 %invariant.op.i, %106 + %107 = sext i32 %.reass.i to i64 + %108 = getelementptr inbounds i32, ptr %7, i64 %107 + %109 = load i32, ptr %108, align 4 + %110 = add nsw i32 %109, %105 + %111 = trunc i64 %indvars.iv.next.i40 to i32 + %112 = shl nuw i32 1, %111 + %113 = icmp slt i32 %110, %112 + br i1 %113, label %.lr.ph.i38, label %._crit_edge.i37 + +._crit_edge.i37: ; preds = %.lr.ph.i38, %103 + %.052.lcssa.i = phi i32 [ %.pre137, %103 ], [ %111, %.lr.ph.i38 ] + %.lcssa.i = phi i32 [ %.pre138, %103 ], [ %112, %.lr.ph.i38 ] + %114 = add nsw i32 %.lcssa.i, %.056.i + %115 = shl i32 %.056.i, 16 + %116 = and i32 %.052.lcssa.i, 15 + %117 = or disjoint i32 %116, %115 + %118 = or disjoint i32 %117, 16 + %119 = zext nneg i32 %102 to i64 + %120 = getelementptr inbounds nuw i32, ptr %0, i64 %119 + store i32 %118, ptr %120, align 4 br label %._crit_edge136 ._crit_edge136: ; preds = %.loopexit.i, %._crit_edge.i37 - %.157.i = phi i32 [ %115, %._crit_edge.i37 ], [ %.056.i, %.loopexit.i ] - %.155.i = phi i32 [ %103, %._crit_edge.i37 ], [ %.054.i, %.loopexit.i ] + %.157.i = phi i32 [ %114, %._crit_edge.i37 ], [ %.056.i, %.loopexit.i ] + %.155.i = phi i32 [ %102, %._crit_edge.i37 ], [ %.054.i, %.loopexit.i ] %.1.i = phi i32 [ %.056.i, %._crit_edge.i37 ], [ %.053.i35, %.loopexit.i ] - %122 = load i16, ptr %.sroa.3147.3, align 2 - %123 = sext i16 %122 to i32 - %124 = shl nsw i32 %123, 16 - %125 = or disjoint i32 %124, %100 - %126 = ashr i32 %.sroa.24.3, %2 - %127 = add i32 %.1.i, %126 - %128 = sext i32 %127 to i64 - %129 = sext i32 %.157.i to i64 - br label %130 - -130: ; preds = %130, %._crit_edge136 - %indvars.iv72.i = phi i64 [ %indvars.iv.next73.i, %130 ], [ %128, %._crit_edge136 ] - %131 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv72.i - store i32 %125, ptr %131, align 4 - %indvars.iv.next73.i = add nsw i64 %indvars.iv72.i, %101 - %132 = icmp slt i64 %indvars.iv.next73.i, %129 - br i1 %132, label %130, label %133 - -133: ; preds = %130 - %134 = icmp eq i32 %.sroa.24.3, %102 - br i1 %134, label %sinfl_build_tbl.exit, label %135 - -135: ; preds = %133 - %136 = getelementptr inbounds nuw i8, ptr %.sroa.3147.3, i64 2 - %137 = xor i32 %.sroa.24.3, %102 - %138 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %137, i1 true) - %139 = xor i32 %138, 31 - %140 = shl nuw i32 1, %139 - %141 = add nsw i32 %140, -1 - %142 = and i32 %141, %.sroa.24.3 - %143 = or i32 %142, %140 - %144 = add nsw i32 %.sroa.15.4, -1 - %.not6266.i = icmp eq i32 %144, 0 + %121 = load i16, ptr %.sroa.3147.3, align 2 + %122 = sext i16 %121 to i32 + %123 = shl nsw i32 %122, 16 + %124 = or disjoint i32 %123, %99 + %125 = ashr i32 %.sroa.24.3, %2 + %126 = add i32 %.1.i, %125 + %127 = sext i32 %126 to i64 + %128 = sext i32 %.157.i to i64 + br label %129 + +129: ; preds = %129, %._crit_edge136 + %indvars.iv72.i = phi i64 [ %indvars.iv.next73.i, %129 ], [ %127, %._crit_edge136 ] + %130 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv72.i + store i32 %124, ptr %130, align 4 + %indvars.iv.next73.i = add nsw i64 %indvars.iv72.i, %100 + %131 = icmp slt i64 %indvars.iv.next73.i, %128 + br i1 %131, label %129, label %132 + +132: ; preds = %129 + %133 = icmp eq i32 %.sroa.24.3, %101 + br i1 %133, label %sinfl_build_tbl.exit, label %134 + +134: ; preds = %132 + %135 = getelementptr inbounds nuw i8, ptr %.sroa.3147.3, i64 2 + %136 = xor i32 %.sroa.24.3, %101 + %137 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %136, i1 true) + %138 = lshr exact i32 -2147483648, %137 + %139 = add nsw i32 %138, -1 + %140 = and i32 %139, %.sroa.24.3 + %141 = or i32 %140, %138 + %142 = add nsw i32 %.sroa.15.4, -1 + %.not6266.i = icmp eq i32 %142, 0 br i1 %.not6266.i, label %.lr.ph68.i, label %.loopexit.i -.lr.ph68.i: ; preds = %135 - %145 = sext i32 %.pre79.i.ph to i64 - br label %146 +.lr.ph68.i: ; preds = %134 + %143 = sext i32 %.pre79.i.ph to i64 + br label %144 -146: ; preds = %146, %.lr.ph68.i - %indvars.iv75.i = phi i64 [ %145, %.lr.ph68.i ], [ %indvars.iv.next76.i, %146 ] +144: ; preds = %144, %.lr.ph68.i + %indvars.iv75.i = phi i64 [ %143, %.lr.ph68.i ], [ %indvars.iv.next76.i, %144 ] %indvars.iv.next76.i = add nsw i64 %indvars.iv75.i, 1 - %147 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next76.i - %148 = load i32, ptr %147, align 4 - %.not62.i = icmp eq i32 %148, 0 - br i1 %.not62.i, label %146, label %.loopexit.i.loopexit + %145 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next76.i + %146 = load i32, ptr %145, align 4 + %.not62.i = icmp eq i32 %146, 0 + br i1 %.not62.i, label %144, label %.loopexit.i.loopexit -sinfl_build_tbl.exit: ; preds = %.lr.ph55.i, %133, %.preheader, %.preheader.i +sinfl_build_tbl.exit: ; preds = %.lr.ph55.i, %132, %.preheader, %.preheader.i ret void } diff --git a/bench/tokio-rs/optimized/26wlg4yx86ilo6a1.ll b/bench/tokio-rs/optimized/26wlg4yx86ilo6a1.ll index 651ce7aae88..10abb40be87 100644 --- a/bench/tokio-rs/optimized/26wlg4yx86ilo6a1.ll +++ b/bench/tokio-rs/optimized/26wlg4yx86ilo6a1.ll @@ -12456,7 +12456,7 @@ _ZN5tokio7runtime4time5entry11TimerHandle9sync_when17h0571d1d2a675f99eE.exit: ; %spec.store.select.i.i = tail call i64 @llvm.umin.i64(i64 %14, i64 68719476734) %15 = tail call range(i64 28, 59) i64 @llvm.ctlz.i64(i64 %spec.store.select.i.i, i1 true) %16 = trunc nuw nsw i64 %15 to i8 - %.lhs.trunc.i.i = xor i8 %16, 62 + %.lhs.trunc.i.i = sub nuw nsw i8 63, %16 %17 = udiv i8 %.lhs.trunc.i.i, 6 %.zext.i.i = zext nneg i8 %17 to i64 tail call void @llvm.experimental.noalias.scope.decl(metadata !2328) @@ -12554,7 +12554,7 @@ define hidden void @_ZN5tokio7runtime4time5wheel5Wheel6remove17h49ff6cdd64480a3e %spec.store.select.i.i = tail call i64 @llvm.umin.i64(i64 %10, i64 68719476734) %11 = tail call range(i64 28, 59) i64 @llvm.ctlz.i64(i64 %spec.store.select.i.i, i1 true) %12 = trunc nuw nsw i64 %11 to i8 - %.lhs.trunc.i.i = xor i8 %12, 62 + %.lhs.trunc.i.i = sub nuw nsw i8 63, %12 %13 = udiv i8 %.lhs.trunc.i.i, 6 %.zext.i.i = zext nneg i8 %13 to i64 tail call void @llvm.experimental.noalias.scope.decl(metadata !2349) @@ -13025,7 +13025,7 @@ _ZN5tokio7runtime4time5wheel5Wheel12take_entries17ha5a01c22d961034bE.llvm.760049 %spec.store.select.i = call i64 @llvm.umin.i64(i64 %63, i64 68719476734) %64 = call range(i64 28, 59) i64 @llvm.ctlz.i64(i64 %spec.store.select.i, i1 true) %65 = trunc nuw nsw i64 %64 to i8 - %.lhs.trunc.i = xor i8 %65, 62 + %.lhs.trunc.i = sub nuw nsw i8 63, %65 %66 = udiv i8 %.lhs.trunc.i, 6 %.zext.i = zext nneg i8 %66 to i64 call void @llvm.experimental.noalias.scope.decl(metadata !2425) @@ -13190,7 +13190,7 @@ _ZN5tokio7runtime4time5wheel5level5Level9take_slot17h53d97e9b1f364fc5E.exit: ; p } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable -define hidden noundef range(i64 0, 11) i64 @_ZN5tokio7runtime4time5wheel5Wheel9level_for17hd258798a270d4423E.llvm.7600499188078001995(ptr noalias nocapture noundef readonly align 8 dereferenceable(48) %0, i64 noundef %1) unnamed_addr #9 { +define hidden noundef range(i64 0, 6) i64 @_ZN5tokio7runtime4time5wheel5Wheel9level_for17hd258798a270d4423E.llvm.7600499188078001995(ptr noalias nocapture noundef readonly align 8 dereferenceable(48) %0, i64 noundef %1) unnamed_addr #9 { %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 %4 = load i64, ptr %3, align 8, !noundef !5 %5 = xor i64 %4, %1 @@ -13198,20 +13198,20 @@ define hidden noundef range(i64 0, 11) i64 @_ZN5tokio7runtime4time5wheel5Wheel9l %spec.store.select.i = tail call i64 @llvm.umin.i64(i64 %6, i64 68719476734) %7 = tail call range(i64 28, 59) i64 @llvm.ctlz.i64(i64 %spec.store.select.i, i1 true) %8 = trunc nuw nsw i64 %7 to i8 - %.lhs.trunc.i = xor i8 %8, 62 + %.lhs.trunc.i = sub nuw nsw i8 63, %8 %9 = udiv i8 %.lhs.trunc.i, 6 %.zext.i = zext nneg i8 %9 to i64 ret i64 %.zext.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable -define hidden noundef range(i64 0, 11) i64 @_ZN5tokio7runtime4time5wheel9level_for17h0456cfaf9af5afd1E.llvm.7600499188078001995(i64 noundef %0, i64 noundef %1) unnamed_addr #10 { +define hidden noundef range(i64 0, 6) i64 @_ZN5tokio7runtime4time5wheel9level_for17h0456cfaf9af5afd1E.llvm.7600499188078001995(i64 noundef %0, i64 noundef %1) unnamed_addr #10 { %3 = xor i64 %1, %0 %4 = or i64 %3, 63 %spec.store.select = tail call i64 @llvm.umin.i64(i64 %4, i64 68719476734) %5 = tail call range(i64 28, 59) i64 @llvm.ctlz.i64(i64 %spec.store.select, i1 true) %6 = trunc nuw nsw i64 %5 to i8 - %.lhs.trunc = xor i8 %6, 62 + %.lhs.trunc = sub nuw nsw i8 63, %6 %7 = udiv i8 %.lhs.trunc, 6 %.zext = zext nneg i8 %7 to i64 ret i64 %.zext diff --git a/bench/tomlplusplus/optimized/toml.cpp.ll b/bench/tomlplusplus/optimized/toml.cpp.ll index 91e195dcd71..69827869ff2 100644 --- a/bench/tomlplusplus/optimized/toml.cpp.ll +++ b/bench/tomlplusplus/optimized/toml.cpp.ll @@ -8536,7 +8536,7 @@ if.then: ; preds = %entry %sub.ptr.div.i11 = ashr exact i64 %sub.ptr.sub.i10, 3 %cmp4.i = icmp ult i64 %sub.ptr.div.i, 1152921504606846976 tail call void @llvm.assume(i1 %cmp4.i) - %sub.i = xor i64 %sub.ptr.div.i, 1152921504606846975 + %sub.i = sub nuw nsw i64 1152921504606846975, %sub.ptr.div.i %cmp6.i = icmp ule i64 %sub.ptr.div.i11, %sub.i tail call void @llvm.assume(i1 %cmp6.i) %cmp8.not.i = icmp ult i64 %sub.ptr.div.i11, %sub @@ -8550,7 +8550,7 @@ _ZSt27__uninitialized_default_n_aIPSt10unique_ptrIN4toml2v34nodeESt14default_del br label %if.end6 if.else.i: ; preds = %if.then - %cmp.i.i = icmp ult i64 %sub.i, %sub + %cmp.i.i = icmp ugt i64 %__new_size, 1152921504606846975 br i1 %cmp.i.i, label %if.then.i.i, label %_ZNKSt6vectorISt10unique_ptrIN4toml2v34nodeESt14default_deleteIS3_EESaIS6_EE12_M_check_lenEmPKc.exit.i if.then.i.i: ; preds = %if.else.i @@ -8592,7 +8592,7 @@ if.then.i28.i: ; preds = %_ZNSt6vectorISt10un _ZNSt12_Vector_baseISt10unique_ptrIN4toml2v34nodeESt14default_deleteIS3_EESaIS6_EE13_M_deallocateEPS6_m.exit29.i: ; preds = %if.then.i28.i, %_ZNSt6vectorISt10unique_ptrIN4toml2v34nodeESt14default_deleteIS3_EESaIS6_EE11_S_relocateEPS6_S9_S9_RS7_.exit.i store ptr %call5.i.i.i.i, ptr %this, align 8 - %add.ptr37.i = getelementptr inbounds %"class.std::unique_ptr", ptr %add.ptr.i, i64 %sub + %add.ptr37.i = getelementptr inbounds nuw %"class.std::unique_ptr", ptr %add.ptr.i, i64 %sub store ptr %add.ptr37.i, ptr %_M_finish.i, align 8 %add.ptr40.i = getelementptr inbounds nuw %"class.std::unique_ptr", ptr %call5.i.i.i.i, i64 %4 store ptr %add.ptr40.i, ptr %_M_end_of_storage.i, align 8 @@ -27903,7 +27903,7 @@ while.cond.preheader.i: ; preds = %sw.bb10 br i1 %tobool.not11.i, label %return.sink.split, label %while.body.preheader.i62 while.body.preheader.i62: ; preds = %while.cond.preheader.i - %__pos.010.i = xor i64 %20, 63 + %__pos.010.i = sub nuw nsw i64 63, %20 br label %while.body.i63 while.body.i63: ; preds = %while.body.i63, %while.body.preheader.i62 @@ -39742,7 +39742,7 @@ while.cond.preheader.i: ; preds = %sw.bb11 br i1 %tobool.not11.i, label %return.sink.split, label %while.body.preheader.i55 while.body.preheader.i55: ; preds = %while.cond.preheader.i - %__pos.010.i = xor i32 %20, 31 + %__pos.010.i = sub nuw nsw i32 31, %20 %21 = zext nneg i32 %__pos.010.i to i64 br label %while.body.i56 @@ -40089,7 +40089,7 @@ while.cond.preheader.i: ; preds = %sw.bb11 br i1 %tobool.not11.i, label %return.sink.split, label %while.body.preheader.i71 while.body.preheader.i71: ; preds = %while.cond.preheader.i - %__pos.010.i = xor i32 %21, 31 + %__pos.010.i = sub nuw nsw i32 31, %21 %22 = zext nneg i32 %__pos.010.i to i64 br label %while.body.i72 @@ -40462,7 +40462,7 @@ while.cond.preheader.i: ; preds = %sw.bb10 br i1 %tobool.not11.i, label %return.sink.split, label %while.body.preheader.i71 while.body.preheader.i71: ; preds = %while.cond.preheader.i - %__pos.010.i = xor i32 %20, 31 + %__pos.010.i = sub nuw nsw i32 31, %20 %21 = zext nneg i32 %__pos.010.i to i64 br label %while.body.i72 @@ -40827,7 +40827,7 @@ while.cond.preheader.i: ; preds = %sw.bb10 br i1 %tobool.not11.i, label %return.sink.split, label %while.body.preheader.i62 while.body.preheader.i62: ; preds = %while.cond.preheader.i - %__pos.010.i = xor i64 %20, 63 + %__pos.010.i = sub nuw nsw i64 63, %20 br label %while.body.i63 while.body.i63: ; preds = %while.body.i63, %while.body.preheader.i62 diff --git a/bench/turborepo-rs/optimized/3wg34qzs64td8o5fq33fcg5rk.ll b/bench/turborepo-rs/optimized/3wg34qzs64td8o5fq33fcg5rk.ll index 76980af6ccd..dad8efdee9d 100644 --- a/bench/turborepo-rs/optimized/3wg34qzs64td8o5fq33fcg5rk.ll +++ b/bench/turborepo-rs/optimized/3wg34qzs64td8o5fq33fcg5rk.ll @@ -1079,15 +1079,15 @@ _RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE4pushCs8mTrBI1stz4_15turborepo_vt10 _RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit.i91: ; preds = %291, %286 %.sink = phi i16 [ %297, %291 ], [ %290, %286 ] %.sroa.07.1.i.i92.sroa.phi = phi ptr [ %21, %291 ], [ %.sroa.07.1.i.i92.sroa.gep242, %286 ] - %.sroa.07.1.i.i92 = phi i64 [ 3, %291 ], [ 2, %286 ] + %.sroa.07.1.i.i92.neg = phi i64 [ 3, %291 ], [ 2, %286 ] store i16 %.sink, ptr %.sroa.07.1.i.i92.sroa.gep242, align 1, !alias.scope !148, !noalias !145 %299 = load i64, ptr %1, align 8, !alias.scope !152, !noundef !4 %300 = sub i64 %299, %284 - %301 = icmp ugt i64 %.sroa.07.1.i.i92, %300 + %301 = icmp ugt i64 %.sroa.07.1.i.i92.neg, %300 br i1 %301, label %302, label %_RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4_.exit99 302: ; preds = %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit.i91 - call void @_RINvNvMs0_NtCs68wO5nsWeTG_5alloc7raw_vecINtB8_6RawVecppE7reserve21do_reserve_and_handlehNtNtBa_5alloc6GlobalECscjWV1zBNszQ_8bitflags(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %284, i64 noundef %.sroa.07.1.i.i92) + call void @_RINvNvMs0_NtCs68wO5nsWeTG_5alloc7raw_vecINtB8_6RawVecppE7reserve21do_reserve_and_handlehNtNtBa_5alloc6GlobalECscjWV1zBNszQ_8bitflags(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %284, i64 noundef %.sroa.07.1.i.i92.neg) %.pre.i.i94 = load i64, ptr %62, align 8, !alias.scope !152 br label %_RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4_.exit99 @@ -1095,9 +1095,9 @@ _RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4_.exit99: ; preds = %303 = phi i64 [ %.pre.i.i94, %302 ], [ %284, %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit.i91 ] %304 = load ptr, ptr %69, align 8, !alias.scope !152, !nonnull !4, !noundef !4 %305 = getelementptr inbounds i8, ptr %304, i64 %303 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %305, ptr noundef nonnull align 1 dereferenceable(1) %.sroa.07.1.i.i92.sroa.phi, i64 %.sroa.07.1.i.i92, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %305, ptr noundef nonnull align 1 dereferenceable(1) %.sroa.07.1.i.i92.sroa.phi, i64 %.sroa.07.1.i.i92.neg, i1 false) %306 = load i64, ptr %62, align 8, !alias.scope !152, !noundef !4 - %307 = add i64 %306, %.sroa.07.1.i.i92 + %307 = add i64 %306, %.sroa.07.1.i.i92.neg store i64 %307, ptr %62, align 8, !alias.scope !152 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21), !noalias !145 br label %74 @@ -1343,15 +1343,15 @@ _RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE4pushCs8mTrBI1stz4_15turborepo_vt10 _RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit.i119: ; preds = %414, %409 %.sink252 = phi i16 [ %420, %414 ], [ %413, %409 ] %.sroa.07.1.i.i120.sroa.phi = phi ptr [ %18, %414 ], [ %.sroa.07.1.i.i120.sroa.gep246, %409 ] - %.sroa.07.1.i.i120 = phi i64 [ 3, %414 ], [ 2, %409 ] + %.sroa.07.1.i.i120.neg = phi i64 [ 3, %414 ], [ 2, %409 ] store i16 %.sink252, ptr %.sroa.07.1.i.i120.sroa.gep246, align 1, !alias.scope !191, !noalias !188 %422 = load i64, ptr %1, align 8, !alias.scope !195, !noundef !4 %423 = sub i64 %422, %407 - %424 = icmp ugt i64 %.sroa.07.1.i.i120, %423 + %424 = icmp ugt i64 %.sroa.07.1.i.i120.neg, %423 br i1 %424, label %425, label %_RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4_.exit127 425: ; preds = %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit.i119 - call void @_RINvNvMs0_NtCs68wO5nsWeTG_5alloc7raw_vecINtB8_6RawVecppE7reserve21do_reserve_and_handlehNtNtBa_5alloc6GlobalECscjWV1zBNszQ_8bitflags(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %407, i64 noundef %.sroa.07.1.i.i120) + call void @_RINvNvMs0_NtCs68wO5nsWeTG_5alloc7raw_vecINtB8_6RawVecppE7reserve21do_reserve_and_handlehNtNtBa_5alloc6GlobalECscjWV1zBNszQ_8bitflags(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %407, i64 noundef %.sroa.07.1.i.i120.neg) %.pre.i.i122 = load i64, ptr %376, align 8, !alias.scope !195 br label %_RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4_.exit127 @@ -1359,9 +1359,9 @@ _RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4_.exit127: ; preds = %426 = phi i64 [ %.pre.i.i122, %425 ], [ %407, %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit.i119 ] %427 = load ptr, ptr %381, align 8, !alias.scope !195, !nonnull !4, !noundef !4 %428 = getelementptr inbounds i8, ptr %427, i64 %426 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %428, ptr noundef nonnull align 1 dereferenceable(1) %.sroa.07.1.i.i120.sroa.phi, i64 %.sroa.07.1.i.i120, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %428, ptr noundef nonnull align 1 dereferenceable(1) %.sroa.07.1.i.i120.sroa.phi, i64 %.sroa.07.1.i.i120.neg, i1 false) %429 = load i64, ptr %376, align 8, !alias.scope !195, !noundef !4 - %430 = add i64 %429, %.sroa.07.1.i.i120 + %430 = add i64 %429, %.sroa.07.1.i.i120.neg store i64 %430, ptr %376, align 8, !alias.scope !195 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18), !noalias !188 br label %323 diff --git a/bench/turborepo-rs/optimized/93lva917qa673k3vktayo9ds8.ll b/bench/turborepo-rs/optimized/93lva917qa673k3vktayo9ds8.ll index a986dc1d3b4..c51dbca5d97 100644 --- a/bench/turborepo-rs/optimized/93lva917qa673k3vktayo9ds8.ll +++ b/bench/turborepo-rs/optimized/93lva917qa673k3vktayo9ds8.ll @@ -832,7 +832,7 @@ define hidden void @_RNCNvMCsff1zCjKRl2o_13turborepo_envNtB4_22EnvironmentVariab call void @_ZN5alloc3fmt6format12format_inner17hb2a83c75d2bd59efE(ptr noalias nocapture noundef nonnull sret([24 x i8]) align 8 dereferenceable(24) %0, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %27), !noalias !128 call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %27), !noalias !119 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) - br label %94 + br label %93 38: ; preds = %4 call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %32) @@ -951,66 +951,65 @@ _RINvXNtCs5qLmTC8D4jC_6digest6digestINtNtNtB5_8core_api7wrapper11CoreWrapperINtN ._crit_edge.i.i.i.i: ; preds = %_RINvXNtCs5qLmTC8D4jC_6digest6digestINtNtNtB5_8core_api7wrapper11CoreWrapperINtNtBC_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2F_IB2F_IB2F_IB2F_IB2F_NtB2H_5UTermNtNtB2J_3bit2B1ENtB3S_2B0EB46_EB46_EB46_EB46_ENtB1X_9OidSha256EENtB3_6Digest6updateRShECsff1zCjKRl2o_13turborepo_env.exit %scevgep.i.i.i.i = getelementptr i8, ptr %67, i64 1 - %69 = xor i64 %59, 63 + %69 = sub nuw nsw i64 63, %59 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i.i.i.i, i8 0, i64 %69, i1 false), !alias.scope !187, !noalias !200 - %70 = xor i64 %59, 56 - %71 = icmp samesign ult i64 %70, 8 - br i1 %71, label %._crit_edge.thread.i.i.i.i, label %76 + %70 = icmp samesign ugt i8 %58, 55 + br i1 %70, label %._crit_edge.thread.i.i.i.i, label %75 ._crit_edge.thread.i.i.i.i: ; preds = %._crit_edge.i.i.i.i, %_RINvXNtCs5qLmTC8D4jC_6digest6digestINtNtNtB5_8core_api7wrapper11CoreWrapperINtNtBC_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2F_IB2F_IB2F_IB2F_IB2F_NtB2H_5UTermNtNtB2J_3bit2B1ENtB3S_2B0EB46_EB46_EB46_EB46_ENtB1X_9OidSha256EENtB3_6Digest6updateRShECsff1zCjKRl2o_13turborepo_env.exit call void @_RNvNtCshz1bMpavo8Z_4sha26sha25611compress256(ptr noalias noundef nonnull align 8 dereferenceable(112) %22, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %53, i64 noundef 1), !noalias !201 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12), !noalias !202 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %5), !noalias !192 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11), !noalias !203 - %72 = getelementptr inbounds nuw i8, ptr %11, i64 64 - store i64 0, ptr %72, align 8, !noalias !203 + %71 = getelementptr inbounds nuw i8, ptr %11, i64 64 + store i64 0, ptr %71, align 8, !noalias !203 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10), !noalias !203 - store ptr %72, ptr %10, align 8, !noalias !203 + store ptr %71, ptr %10, align 8, !noalias !203 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9), !noalias !203 store ptr %5, ptr %9, align 8, !noalias !203 - %73 = getelementptr inbounds nuw i8, ptr %9, i64 8 - store ptr %10, ptr %73, align 8, !noalias !203 - %74 = getelementptr inbounds nuw i8, ptr %9, i64 16 - store i64 0, ptr %74, align 8, !noalias !203 - call void @_RINvXs32_NtNtCs1LoaDTb72WA_4core5slice4iterINtB7_7IterMuthENtNtNtNtBb_4iter6traits8iterator8Iterator4folduNCINvNvXs_NtNtB11_8adapters9enumerateINtB1Q_9EnumeratepEBV_4fold9enumerateQhuNCINvNvBV_8for_each4callTjB2S_ENCINvXsg_CshTjWJoR5NBV_13generic_arrayINtB3z_12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB4p_IB4p_IB4p_IB4p_IB4p_IB4p_NtB4r_5UTermNtNtB4t_3bit2B1ENtB5H_2B0EB5V_EB5V_EB5V_EB5V_EB5V_EEINtNtB3z_8sequence15GenericSequencehE8generateNCNvXNtB3z_5implsB42_NtNtBb_7default7Default7default0E0E0E0ECsff1zCjKRl2o_13turborepo_env.llvm.10116246802473599757(ptr noundef nonnull %11, ptr noundef nonnull %72, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %9), !noalias !206 + %72 = getelementptr inbounds nuw i8, ptr %9, i64 8 + store ptr %10, ptr %72, align 8, !noalias !203 + %73 = getelementptr inbounds nuw i8, ptr %9, i64 16 + store i64 0, ptr %73, align 8, !noalias !203 + call void @_RINvXs32_NtNtCs1LoaDTb72WA_4core5slice4iterINtB7_7IterMuthENtNtNtNtBb_4iter6traits8iterator8Iterator4folduNCINvNvXs_NtNtB11_8adapters9enumerateINtB1Q_9EnumeratepEBV_4fold9enumerateQhuNCINvNvBV_8for_each4callTjB2S_ENCINvXsg_CshTjWJoR5NBV_13generic_arrayINtB3z_12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB4p_IB4p_IB4p_IB4p_IB4p_IB4p_NtB4r_5UTermNtNtB4t_3bit2B1ENtB5H_2B0EB5V_EB5V_EB5V_EB5V_EB5V_EEINtNtB3z_8sequence15GenericSequencehE8generateNCNvXNtB3z_5implsB42_NtNtBb_7default7Default7default0E0E0E0ECsff1zCjKRl2o_13turborepo_env.llvm.10116246802473599757(ptr noundef nonnull %11, ptr noundef nonnull %71, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %9), !noalias !206 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9), !noalias !203 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10), !noalias !203 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %12, ptr noundef nonnull align 8 dereferenceable(64) %11, i64 64, i1 false), !noalias !207 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11), !noalias !203 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %5), !noalias !192 - %75 = getelementptr inbounds nuw i8, ptr %12, i64 56 - call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 %75, i64 noundef 8, ptr noalias noundef nonnull readonly align 1 %13, i64 noundef 8, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.21), !noalias !201 + %74 = getelementptr inbounds nuw i8, ptr %12, i64 56 + call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 %74, i64 noundef 8, ptr noalias noundef nonnull readonly align 1 %13, i64 noundef 8, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.21), !noalias !201 call void @_RNvNtCshz1bMpavo8Z_4sha26sha25611compress256(ptr noalias noundef nonnull align 8 dereferenceable(112) %22, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %12, i64 noundef 1), !noalias !201 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12), !noalias !202 br label %_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i -76: ; preds = %._crit_edge.i.i.i.i - %77 = getelementptr inbounds nuw i8, ptr %22, i64 96 - call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 %77, i64 noundef 8, ptr noalias noundef nonnull readonly align 1 %13, i64 noundef 8, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.19), !noalias !188 +75: ; preds = %._crit_edge.i.i.i.i + %76 = getelementptr inbounds nuw i8, ptr %22, i64 96 + call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 %76, i64 noundef 8, ptr noalias noundef nonnull readonly align 1 %13, i64 noundef 8, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.19), !noalias !188 call void @_RNvNtCshz1bMpavo8Z_4sha26sha25611compress256(ptr noalias noundef nonnull align 8 dereferenceable(112) %22, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %53, i64 noundef 1), !noalias !201 br label %_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i -_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i: ; preds = %76, %._crit_edge.thread.i.i.i.i +_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i: ; preds = %75, %._crit_edge.thread.i.i.i.i store i8 0, ptr %57, align 8, !alias.scope !196, !noalias !197 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13), !noalias !192 - br label %78 - -78: ; preds = %78, %_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i - %.sroa.12.031.i.i.i.i = phi i64 [ 0, %_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i ], [ %79, %78 ] - %79 = add nuw nsw i64 %.sroa.12.031.i.i.i.i, 1 - %80 = shl nuw nsw i64 %.sroa.12.031.i.i.i.i, 2 - %81 = getelementptr inbounds nuw i8, ptr %18, i64 %80 - %82 = getelementptr inbounds nuw i32, ptr %22, i64 %.sroa.12.031.i.i.i.i + br label %77 + +77: ; preds = %77, %_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i + %.sroa.12.031.i.i.i.i = phi i64 [ 0, %_RINvYINtNtNtCs1LoaDTb72WA_4core5slice4iter14ChunksExactMuthENtNtNtNtBa_4iter6traits8iterator8Iterator3zipINtB6_4ItermEECsff1zCjKRl2o_13turborepo_env.exit.i.i.i.i ], [ %78, %77 ] + %78 = add nuw nsw i64 %.sroa.12.031.i.i.i.i, 1 + %79 = shl nuw nsw i64 %.sroa.12.031.i.i.i.i, 2 + %80 = getelementptr inbounds nuw i8, ptr %18, i64 %79 + %81 = getelementptr inbounds nuw i32, ptr %22, i64 %.sroa.12.031.i.i.i.i call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14), !noalias !192 - %83 = load i32, ptr %82, align 4, !alias.scope !190, !noalias !191, !noundef !23 - %84 = call i32 @llvm.bswap.i32(i32 %83) - store i32 %84, ptr %14, align 4, !noalias !192 - call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 %81, i64 noundef 4, ptr noalias noundef nonnull readonly align 1 %14, i64 noundef 4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.57), !noalias !208 + %82 = load i32, ptr %81, align 4, !alias.scope !190, !noalias !191, !noundef !23 + %83 = call i32 @llvm.bswap.i32(i32 %82) + store i32 %83, ptr %14, align 4, !noalias !192 + call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 %80, i64 noundef 4, ptr noalias noundef nonnull readonly align 1 %14, i64 noundef 4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.57), !noalias !208 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14), !noalias !192 - %exitcond.not.i.i.i.i = icmp eq i64 %79, 8 - br i1 %exitcond.not.i.i.i.i, label %_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit, label %78 + %exitcond.not.i.i.i.i = icmp eq i64 %78, 8 + br i1 %exitcond.not.i.i.i.i, label %_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit, label %77 -_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit: ; preds = %78 +_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit: ; preds = %77 call void @_RNvMNtCs1LoaDTb72WA_4core5sliceSh15copy_from_sliceCs7yHavx6RIsz_5serde(ptr noalias noundef nonnull align 1 dereferenceable(32) %23, i64 noundef 32, ptr noalias noundef nonnull readonly align 1 %18, i64 noundef 32, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4ec265261aa2c4186d0098c17e5db520.63), !noalias !161 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18), !noalias !176 call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %22), !noalias !161 @@ -1018,14 +1017,14 @@ _RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_vari call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23), !noalias !161 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %30) call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8), !noalias !210 - %85 = getelementptr inbounds nuw i8, ptr %31, i64 32 + %84 = getelementptr inbounds nuw i8, ptr %31, i64 32 store ptr %31, ptr %8, align 8, !noalias !210 - %86 = getelementptr inbounds nuw i8, ptr %8, i64 8 - store ptr %85, ptr %86, align 8, !noalias !210 - %87 = getelementptr inbounds nuw i8, ptr %8, i64 16 - store ptr @anon.130a6bd16b817b43bceddd261eb9767e.3.llvm.10116246802473599757, ptr %87, align 8, !noalias !210 - %88 = getelementptr inbounds nuw i8, ptr %8, i64 24 - store i32 1114112, ptr %88, align 8, !noalias !210 + %85 = getelementptr inbounds nuw i8, ptr %8, i64 8 + store ptr %84, ptr %85, align 8, !noalias !210 + %86 = getelementptr inbounds nuw i8, ptr %8, i64 16 + store ptr @anon.130a6bd16b817b43bceddd261eb9767e.3.llvm.10116246802473599757, ptr %86, align 8, !noalias !210 + %87 = getelementptr inbounds nuw i8, ptr %8, i64 24 + store i32 1114112, ptr %87, align 8, !noalias !210 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7), !noalias !217 store i64 0, ptr %7, align 8, !noalias !217 %.sroa.4.0..sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 8 @@ -1033,22 +1032,22 @@ _RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_vari %.sroa.5.0..sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 16 store i64 0, ptr %.sroa.5.0..sroa_idx.i.i.i, align 8, !noalias !217 invoke void @_RINvXsb_NtCs68wO5nsWeTG_5alloc6stringNtB6_6StringINtNtNtNtCs1LoaDTb72WA_4core4iter6traits7collect6ExtendcE6extendNtCseBw3mChBYfU_3hex15BytesToHexCharsECsff1zCjKRl2o_13turborepo_env(ptr noalias noundef nonnull align 8 dereferenceable(24) %7, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %8) - to label %_RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit unwind label %89, !noalias !221 + to label %_RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit unwind label %88, !noalias !221 -89: ; preds = %_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit - %90 = landingpad { ptr, i32 } +88: ; preds = %_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit + %89 = landingpad { ptr, i32 } cleanup invoke void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env(ptr noalias noundef nonnull align 8 dereferenceable(24) %7) #16 - to label %common.resume unwind label %91, !noalias !222 + to label %common.resume unwind label %90, !noalias !222 -91: ; preds = %89 - %92 = landingpad { ptr, i32 } +90: ; preds = %88 + %91 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17h1bb225b6f4388944E() #17, !noalias !222 unreachable -common.resume: ; preds = %95, %98, %89 - %common.resume.op = phi { ptr, i32 } [ %90, %89 ], [ %99, %98 ], [ %96, %95 ] +common.resume: ; preds = %94, %97, %88 + %common.resume.op = phi { ptr, i32 } [ %89, %88 ], [ %98, %97 ], [ %95, %94 ] resume { ptr, i32 } %common.resume.op _RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit: ; preds = %_RNvYINtNtNtCs5qLmTC8D4jC_6digest8core_api7wrapper11CoreWrapperINtNtB7_11ct_variable21CtVariableCoreWrapperNtNtCshz1bMpavo8Z_4sha28core_api13Sha256VarCoreINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB2s_IB2s_IB2s_IB2s_IB2s_NtB2u_5UTermNtNtB2w_3bit2B1ENtB3F_2B0EB3T_EB3T_EB3T_EB3T_ENtB1K_9OidSha256EENtB9_11FixedOutput14finalize_fixedCsff1zCjKRl2o_13turborepo_env.exit @@ -1059,8 +1058,8 @@ _RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINt store ptr %33, ptr %29, align 8 %.sroa.46.0..sroa_idx = getelementptr inbounds nuw i8, ptr %29, i64 8 store ptr @_RNvXsR_NtCs1LoaDTb72WA_4core3fmtRNtNtCs68wO5nsWeTG_5alloc6string6StringNtB5_7Display3fmtCs5g6BnGVOFtV_12regex_syntax, ptr %.sroa.46.0..sroa_idx, align 8 - %93 = getelementptr inbounds nuw i8, ptr %29, i64 16 - store ptr %30, ptr %93, align 8 + %92 = getelementptr inbounds nuw i8, ptr %29, i64 16 + store ptr %30, ptr %92, align 8 %.sroa.410.0..sroa_idx = getelementptr inbounds nuw i8, ptr %29, i64 24 store ptr @"_ZN60_$LT$alloc..string..String$u20$as$u20$core..fmt..Display$GT$3fmt17h4ef59da2ce0d282aE", ptr %.sroa.410.0..sroa_idx, align 8 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6), !noalias !224 @@ -1074,44 +1073,44 @@ _RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINt %.sroa.7.0..sroa_idx = getelementptr inbounds nuw i8, ptr %6, i64 32 store ptr null, ptr %.sroa.7.0..sroa_idx, align 8, !noalias !232 invoke void @_ZN5alloc3fmt6format12format_inner17hb2a83c75d2bd59efE(ptr noalias nocapture noundef nonnull sret([24 x i8]) align 8 dereferenceable(24) %0, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %6) - to label %97 unwind label %95 + to label %96 unwind label %94 -94: ; preds = %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env.exit, %37 +93: ; preds = %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env.exit, %37 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) ret void -95: ; preds = %_RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit - %96 = landingpad { ptr, i32 } +94: ; preds = %_RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit + %95 = landingpad { ptr, i32 } cleanup invoke void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env(ptr noalias noundef nonnull align 8 dereferenceable(24) %30) #16 - to label %common.resume unwind label %102 + to label %common.resume unwind label %101 -97: ; preds = %_RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit +96: ; preds = %_RINvCseBw3mChBYfU_3hex6encodeINtCshTjWJoR5NBV_13generic_array12GenericArrayhINtNtCs5FtjDnxWtNK_7typenum4uint4UIntIB1d_IB1d_IB1d_IB1d_IB1d_NtB1f_5UTermNtNtB1h_3bit2B1ENtB2q_2B0EB2E_EB2E_EB2E_EB2E_EEECsff1zCjKRl2o_13turborepo_env.exit call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6), !noalias !224 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %29) invoke void @_RNvXsn_NtCs68wO5nsWeTG_5alloc3vecINtB5_3VechENtNtNtCs1LoaDTb72WA_4core3ops4drop4Drop4dropCs5g6BnGVOFtV_12regex_syntax(ptr noalias noundef nonnull align 8 dereferenceable(24) %30) - to label %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env.exit unwind label %98 + to label %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env.exit unwind label %97 -98: ; preds = %97 - %99 = landingpad { ptr, i32 } +97: ; preds = %96 + %98 = landingpad { ptr, i32 } cleanup invoke void @_RNvXs2_NtCs68wO5nsWeTG_5alloc7raw_vecINtB5_6RawVechENtNtNtCs1LoaDTb72WA_4core3ops4drop4Drop4dropCs5g6BnGVOFtV_12regex_syntax(ptr noalias noundef nonnull align 8 dereferenceable(24) %30) - to label %common.resume unwind label %100 + to label %common.resume unwind label %99 -100: ; preds = %98 - %101 = landingpad { ptr, i32 } +99: ; preds = %97 + %100 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17h1bb225b6f4388944E() #17 unreachable -_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env.exit: ; preds = %97 +_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtCs68wO5nsWeTG_5alloc6string6StringECsff1zCjKRl2o_13turborepo_env.exit: ; preds = %96 call void @_RNvXs2_NtCs68wO5nsWeTG_5alloc7raw_vecINtB5_6RawVechENtNtNtCs1LoaDTb72WA_4core3ops4drop4Drop4dropCs5g6BnGVOFtV_12regex_syntax(ptr noalias noundef nonnull align 8 dereferenceable(24) %30) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %30) call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %32) - br label %94 + br label %93 -102: ; preds = %95 - %103 = landingpad { ptr, i32 } +101: ; preds = %94 + %102 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17h1bb225b6f4388944E() #17 unreachable diff --git a/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll b/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll index e8d89f6098c..9b9a6dfa9c8 100644 --- a/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll +++ b/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll @@ -7859,53 +7859,37 @@ _ZN17cranelift_codegen2ir5types4Type14log2_lane_bits17h96ee7a58341145dcE.exit.i2 ; Function Attrs: nonlazybind uwtable define noundef range(i16 118, 256) i16 @_ZN17cranelift_codegen2ir12instructions12ValueTypeSet7example17h93fca4a878ad4a9dE(i64 %0) unnamed_addr #2 { - %.sroa.219.0.extract.shift = lshr i64 %0, 32 - %.sroa.219.0.extract.trunc = trunc i64 %.sroa.219.0.extract.shift to i8 - %.not = icmp ne i8 %.sroa.219.0.extract.trunc, 0 - %2 = tail call range(i8 0, 9) i8 @llvm.ctlz.i8(i8 %.sroa.219.0.extract.trunc, i1 true) - %3 = xor i8 %2, 6 - %4 = icmp samesign ugt i8 %3, 5 - %.09 = select i1 %.not, i1 %4, i1 false - br i1 %.09, label %10, label %5 + %2 = and i64 %0, 65535 + %.not25 = icmp eq i64 %2, 0 + br i1 %.not25, label %3, label %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit -5: ; preds = %1 - %.sroa.3.0.extract.shift = lshr i64 %0, 40 - %.sroa.3.0.extract.trunc = trunc i64 %.sroa.3.0.extract.shift to i8 - %.not23 = icmp ne i8 %.sroa.3.0.extract.trunc, 0 - %6 = tail call range(i8 0, 9) i8 @llvm.ctlz.i8(i8 %.sroa.3.0.extract.trunc, i1 true) - %7 = xor i8 %6, 6 - %8 = icmp samesign ugt i8 %7, 5 - %.0 = select i1 %.not23, i1 %8, i1 false - %9 = select i1 %.0, i32 123, i32 118 - br label %10 - -10: ; preds = %5, %1 - %.010 = phi i32 [ 120, %1 ], [ %9, %5 ] - %11 = and i64 %0, 65535 - %.not24 = icmp eq i64 %11, 0 - br i1 %.not24, label %12, label %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit - -12: ; preds = %10 +3: ; preds = %1 tail call void @_ZN4core6option13unwrap_failed17hcb3a256a9f1ca882E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.7173b3c5b10b09ddf4bd2faf440a3554.101) #36 unreachable -_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit: ; preds = %10 - %13 = trunc i64 %0 to i32 - %14 = and i32 %13, 65535 - %15 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %14, i1 false) - %16 = shl nuw nsw i32 %15, 4 - %17 = and i32 %16, 496 - %18 = add nuw nsw i32 %.010, %17 - %19 = icmp samesign ult i32 %18, 256 - br i1 %19, label %20, label %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit.thread +_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit: ; preds = %1 + %4 = and i64 %0, 824633720832 + %.not = icmp eq i64 %4, 0 + %5 = and i64 %0, 211106232532992 + %.not24 = icmp eq i64 %5, 0 + %6 = select i1 %.not24, i32 118, i32 123 + %.010 = select i1 %.not, i32 %6, i32 120 + %7 = trunc i64 %0 to i32 + %8 = and i32 %7, 65535 + %9 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %8, i1 false) + %10 = shl nuw nsw i32 %9, 4 + %11 = and i32 %10, 496 + %12 = add nuw nsw i32 %11, %.010 + %13 = icmp samesign ult i32 %12, 256 + br i1 %13, label %14, label %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit.thread _ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit.thread: ; preds = %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit tail call void @_ZN4core6option13unwrap_failed17hcb3a256a9f1ca882E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.7173b3c5b10b09ddf4bd2faf440a3554.102) #36 unreachable -20: ; preds = %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit - %21 = trunc nuw nsw i32 %18 to i16 - ret i16 %21 +14: ; preds = %_ZN17cranelift_codegen2ir5types4Type2by17hd5fb9e46d78fdb7fE.exit + %15 = trunc nuw nsw i32 %12 to i16 + ret i16 %15 } ; Function Attrs: nonlazybind uwtable @@ -58175,9 +58159,6 @@ declare i64 @llvm.umin.i64(i64, i64) #33 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #33 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.ctlz.i8(i8, i1 immarg) #33 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #33 diff --git a/bench/yosys/optimized/ezsat.ll b/bench/yosys/optimized/ezsat.ll index d165fed4aad..4e51b13e588 100644 --- a/bench/yosys/optimized/ezsat.ll +++ b/bench/yosys/optimized/ezsat.ll @@ -1285,26 +1285,23 @@ _ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit: ; pr %.143 = phi i32 [ %89, %87 ], [ %spec.select, %92 ] %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 %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge.loopexit, label %79, !llvm.loop !12 + br i1 %exitcond.not, label %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge, label %79, !llvm.loop !12 -_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge.loopexit: ; preds = %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit - %93 = add nsw i32 %.143, 1 +_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge: ; preds = %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit.preheader + %.042.lcssa = phi i32 [ 0, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit.preheader ], [ %.143, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit ] + %93 = add nsw i32 %.042.lcssa, 1 %94 = sext i32 %93 to i64 - br label %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge - -_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge: ; preds = %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge.loopexit, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit.preheader - %.042.lcssa = phi i64 [ 1, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit.preheader ], [ %94, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge.loopexit ] - %95 = icmp ult i64 %72, %.042.lcssa + %95 = icmp ult i64 %72, %94 br i1 %95, label %96, label %126 96: ; preds = %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge - %97 = sub nuw nsw i64 %.042.lcssa, %72 + %97 = sub nuw nsw i64 %94, %72 %98 = ptrtoint ptr %.sroa.59.1 to i64 %99 = sub i64 %98, %69 %100 = ashr exact i64 %99, 2 %101 = icmp ult i64 %72, 2305843009213693952 tail call void @llvm.assume(i1 %101) - %102 = xor i64 %72, 2305843009213693951 + %102 = sub nuw nsw i64 2305843009213693951, %72 %103 = icmp ule i64 %100, %102 tail call void @llvm.assume(i1 %103) %.not28.i = icmp ult i64 %100, %97 @@ -1324,7 +1321,7 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i: ; preds = %104 br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit 110: ; preds = %96 - %111 = icmp ult i64 %102, %97 + %111 = icmp slt i32 %.042.lcssa, -1 br i1 %111, label %112, label %_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i 112: ; preds = %110 @@ -1376,8 +1373,8 @@ _ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i: ; preds = %124, %_ZNSt6 br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit 126: ; preds = %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_.exit._crit_edge - %127 = icmp ugt i64 %72, %.042.lcssa - %128 = getelementptr inbounds i32, ptr %.sroa.0106.2, i64 %.042.lcssa + %127 = icmp ugt i64 %72, %94 + %128 = getelementptr inbounds i32, ptr %.sroa.0106.2, i64 %94 %spec.select180 = select i1 %127, ptr %128, ptr %.sroa.36.1 br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit @@ -17627,7 +17624,7 @@ define linkonce_odr void @_ZSt6__sortIN9__gnu_cxx17__normal_iteratorIPiSt6vector %7 = ashr exact i64 %6, 2 %8 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %7, i1 true) %9 = shl nuw nsw i64 %8, 1 - %10 = xor i64 %9, 126 + %10 = sub nuw nsw i64 126, %9 tail call void @_ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_T0_T1_(ptr %0, ptr %1, i64 noundef %10) %11 = icmp sgt i64 %6, 64 %scevgep.i = getelementptr i8, ptr %0, i64 4 @@ -18126,7 +18123,7 @@ define linkonce_odr void @_ZNSt6vectorIiSaIiEE17_M_default_appendEm(ptr noundef %15 = ashr exact i64 %14, 2 %16 = icmp ult i64 %10, 2305843009213693952 tail call void @llvm.assume(i1 %16) - %17 = xor i64 %10, 2305843009213693951 + %17 = sub nuw nsw i64 2305843009213693951, %10 %18 = icmp ule i64 %15, %17 tail call void @llvm.assume(i1 %18) %.not28 = icmp ult i64 %15, %1 diff --git a/bench/zed-rs/optimized/0oeh7hwbxnw4zu37xj5psd1f6.ll b/bench/zed-rs/optimized/0oeh7hwbxnw4zu37xj5psd1f6.ll index 2623a0f2c39..f5b31a15aa9 100644 --- a/bench/zed-rs/optimized/0oeh7hwbxnw4zu37xj5psd1f6.ll +++ b/bench/zed-rs/optimized/0oeh7hwbxnw4zu37xj5psd1f6.ll @@ -520,59 +520,58 @@ define hidden void @"_ZN129_$LT$digest..core_api..ct_variable..CtVariableCoreWra ._crit_edge.i: ; preds = %3 %scevgep.i = getelementptr i8, ptr %26, i64 1 - %28 = xor i64 %18, 63 + %28 = sub nuw nsw i64 63, %18 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i, i8 0, i64 %28, i1 false), !alias.scope !86, !noalias !99 - %29 = xor i64 %18, 56 - %30 = icmp samesign ult i64 %29, 8 - br i1 %30, label %._crit_edge.thread.i, label %35 + %29 = icmp samesign ugt i8 %17, 55 + br i1 %29, label %._crit_edge.thread.i, label %34 ._crit_edge.thread.i: ; preds = %._crit_edge.i, %3 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1), !noalias !88 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !100 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4), !noalias !101 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !102 - %31 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %31, align 8, !noalias !102 + %30 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %30, align 8, !noalias !102 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !102 - store ptr %31, ptr %6, align 8, !noalias !102 + store ptr %30, ptr %6, align 8, !noalias !102 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !102 store ptr %4, ptr %5, align 8, !noalias !102 - %32 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %32, align 8, !noalias !102 - %33 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %33, align 8, !noalias !102 - call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hc316830e5a6462bcE.llvm.7674576391064769846"(ptr noundef nonnull %7, ptr noundef nonnull %31, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !105 + %31 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %31, align 8, !noalias !102 + %32 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %32, align 8, !noalias !102 + call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hc316830e5a6462bcE.llvm.7674576391064769846"(ptr noundef nonnull %7, ptr noundef nonnull %30, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !105 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5), !noalias !102 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6), !noalias !102 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !106 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !102 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4), !noalias !101 - %34 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %25, ptr %34, align 1, !alias.scope !107, !noalias !111 + %33 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %25, ptr %33, align 1, !alias.scope !107, !noalias !111 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1), !noalias !88 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !100 br label %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i -35: ; preds = %._crit_edge.i - %36 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %25, ptr %36, align 1, !alias.scope !113, !noalias !117 +34: ; preds = %._crit_edge.i + %35 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %25, ptr %35, align 1, !alias.scope !113, !noalias !117 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1), !noalias !88 br label %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i -_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i: ; preds = %35, %._crit_edge.thread.i +_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i: ; preds = %34, %._crit_edge.thread.i store i8 0, ptr %16, align 1, !alias.scope !95, !noalias !96 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i", %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i - %.sroa.12.034.i = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i ], [ %37, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i" ] - %37 = add nuw nsw i64 %.sroa.12.034.i, 1 - %38 = shl nuw nsw i64 %.sroa.12.034.i, 2 - %39 = getelementptr inbounds nuw i8, ptr %12, i64 %38 - %40 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.034.i - %41 = load i32, ptr %40, align 4, !alias.scope !83, !noalias !91, !noundef !9 - %42 = call i32 @llvm.bswap.i32(i32 %41) - store i32 %42, ptr %39, align 1, !alias.scope !119, !noalias !123 - %exitcond.not.i = icmp eq i64 %37, 8 + %.sroa.12.034.i = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit.i ], [ %36, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i" ] + %36 = add nuw nsw i64 %.sroa.12.034.i, 1 + %37 = shl nuw nsw i64 %.sroa.12.034.i, 2 + %38 = getelementptr inbounds nuw i8, ptr %12, i64 %37 + %39 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.034.i + %40 = load i32, ptr %39, align 4, !alias.scope !83, !noalias !91, !noundef !9 + %41 = call i32 @llvm.bswap.i32(i32 %40) + store i32 %41, ptr %38, align 1, !alias.scope !119, !noalias !123 + %exitcond.not.i = icmp eq i64 %36, 8 br i1 %exitcond.not.i, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit.i" @@ -5182,63 +5181,62 @@ define hidden void @"_ZN86_$LT$sha2..core_api..Sha256VarCore$u20$as$u20$digest.. ._crit_edge: ; preds = %3 %21 = getelementptr i8, ptr %1, i64 %11 %scevgep = getelementptr i8, ptr %21, i64 1 - %22 = xor i64 %11, 63 + %22 = sub nuw nsw i64 63, %11 tail call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 0, i64 %22, i1 false), !noalias !938 - %23 = xor i64 %11, 56 - %24 = icmp samesign ult i64 %23, 8 - br i1 %24, label %._crit_edge.thread, label %29 + %23 = icmp samesign ugt i8 %10, 55 + br i1 %23, label %._crit_edge.thread, label %28 ._crit_edge.thread: ; preds = %3, %._crit_edge tail call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 4 dereferenceable(32) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1) call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !939 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4) call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !940 - %25 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %25, align 8, !noalias !940 + %24 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %24, align 8, !noalias !940 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !940 - store ptr %25, ptr %6, align 8, !noalias !940 + store ptr %24, ptr %6, align 8, !noalias !940 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !940 store ptr %4, ptr %5, align 8, !noalias !940 - %26 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %26, align 8, !noalias !940 - %27 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %27, align 8, !noalias !940 - call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hc316830e5a6462bcE.llvm.7674576391064769846"(ptr noundef nonnull %7, ptr noundef nonnull %25, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !940 + %25 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %25, align 8, !noalias !940 + %26 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %26, align 8, !noalias !940 + call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17hc316830e5a6462bcE.llvm.7674576391064769846"(ptr noundef nonnull %7, ptr noundef nonnull %24, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !940 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5), !noalias !940 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6), !noalias !940 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !938 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !940 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4) - %28 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %18, ptr %28, align 1, !alias.scope !943, !noalias !947 + %27 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %18, ptr %27, align 1, !alias.scope !943, !noalias !947 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 4 dereferenceable(32) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !939 br label %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit -29: ; preds = %._crit_edge - %30 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %18, ptr %30, align 1, !alias.scope !949, !noalias !953 +28: ; preds = %._crit_edge + %29 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %18, ptr %29, align 1, !alias.scope !949, !noalias !953 tail call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 4 dereferenceable(32) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1) br label %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit -_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit: ; preds = %29, %._crit_edge.thread +_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit: ; preds = %28, %._crit_edge.thread store i8 0, ptr %9, align 1, !alias.scope !932, !noalias !935 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" -31: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" +30: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" ret void "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit": ; preds = %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" - %.sroa.12.034 = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit ], [ %32, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" ] - %32 = add nuw nsw i64 %.sroa.12.034, 1 - %33 = shl nuw nsw i64 %.sroa.12.034, 2 - %34 = getelementptr inbounds nuw i8, ptr %2, i64 %33 - %35 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.034 - %36 = load i32, ptr %35, align 4, !noundef !9 - %37 = call i32 @llvm.bswap.i32(i32 %36) - store i32 %37, ptr %34, align 1, !alias.scope !955, !noalias !959 - %exitcond.not = icmp eq i64 %32, 8 - br i1 %exitcond.not, label %31, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" + %.sroa.12.034 = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17h11c5a7ed23133cb2E.exit ], [ %31, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" ] + %31 = add nuw nsw i64 %.sroa.12.034, 1 + %32 = shl nuw nsw i64 %.sroa.12.034, 2 + %33 = getelementptr inbounds nuw i8, ptr %2, i64 %32 + %34 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.034 + %35 = load i32, ptr %34, align 4, !noundef !9 + %36 = call i32 @llvm.bswap.i32(i32 %35) + store i32 %36, ptr %33, align 1, !alias.scope !955, !noalias !959 + %exitcond.not = icmp eq i64 %31, 8 + br i1 %exitcond.not, label %30, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hf17b443b3b8b2069E.exit" } ; Function Attrs: inlinehint nonlazybind uwtable diff --git a/bench/zed-rs/optimized/5ta1fnasvc90k95zqql8ufc92.ll b/bench/zed-rs/optimized/5ta1fnasvc90k95zqql8ufc92.ll index 00e2c88ca5d..519ae825ad2 100644 --- a/bench/zed-rs/optimized/5ta1fnasvc90k95zqql8ufc92.ll +++ b/bench/zed-rs/optimized/5ta1fnasvc90k95zqql8ufc92.ll @@ -2378,58 +2378,57 @@ define internal fastcc void @"_ZN44_$LT$D$u20$as$u20$digest..digest..Digest$GT$6 ._crit_edge.i.i.i.i: ; preds = %"_ZN82_$LT$digest..core_api..wrapper..CoreWrapper$LT$T$GT$$u20$as$u20$digest..Update$GT$6update17hd802f1cca2332b59E.exit" %scevgep.i.i.i.i = getelementptr i8, ptr %48, i64 1 - %50 = xor i64 %40, 63 + %50 = sub nuw nsw i64 63, %40 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i.i.i.i, i8 0, i64 %50, i1 false), !alias.scope !322, !noalias !333 - %51 = xor i64 %40, 56 - %52 = icmp samesign ult i64 %51, 8 - br i1 %52, label %._crit_edge.thread.i.i.i.i, label %57 + %51 = icmp samesign ugt i8 %39, 55 + br i1 %51, label %._crit_edge.thread.i.i.i.i, label %56 ._crit_edge.thread.i.i.i.i: ; preds = %._crit_edge.i.i.i.i, %"_ZN82_$LT$digest..core_api..wrapper..CoreWrapper$LT$T$GT$$u20$as$u20$digest..Update$GT$6update17hd802f1cca2332b59E.exit" call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(112) %16, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %34, i64 noundef 1), !noalias !334 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !335 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4), !noalias !336 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !337 - %53 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %53, align 8, !noalias !337 + %52 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %52, align 8, !noalias !337 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !337 - store ptr %53, ptr %6, align 8, !noalias !337 + store ptr %52, ptr %6, align 8, !noalias !337 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !337 store ptr %4, ptr %5, align 8, !noalias !337 - %54 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %54, align 8, !noalias !337 - %55 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %55, align 8, !noalias !337 - call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h41a442f04835b163E.llvm.11111619368960553376"(ptr noundef nonnull %7, ptr noundef nonnull %53, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !340 + %53 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %53, align 8, !noalias !337 + %54 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %54, align 8, !noalias !337 + call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h41a442f04835b163E.llvm.11111619368960553376"(ptr noundef nonnull %7, ptr noundef nonnull %52, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !340 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5), !noalias !337 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6), !noalias !337 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !341 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !337 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4), !noalias !336 - %56 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %47, ptr %56, align 1, !alias.scope !342, !noalias !346 + %55 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %47, ptr %55, align 1, !alias.scope !342, !noalias !346 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(112) %16, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1), !noalias !334 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !335 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader" -57: ; preds = %._crit_edge.i.i.i.i - %58 = getelementptr inbounds nuw i8, ptr %16, i64 96 - store i64 %47, ptr %58, align 8, !alias.scope !348, !noalias !352 +56: ; preds = %._crit_edge.i.i.i.i + %57 = getelementptr inbounds nuw i8, ptr %16, i64 96 + store i64 %47, ptr %57, align 8, !alias.scope !348, !noalias !352 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(112) %16, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %34, i64 noundef 1), !noalias !334 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader" -"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader": ; preds = %57, %._crit_edge.thread.i.i.i.i +"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader": ; preds = %56, %._crit_edge.thread.i.i.i.i br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader", %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i" - %.sroa.12.034.i.i.i.i = phi i64 [ %59, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i" ], [ 0, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader" ] - %59 = add nuw nsw i64 %.sroa.12.034.i.i.i.i, 1 - %60 = shl nuw nsw i64 %.sroa.12.034.i.i.i.i, 2 - %61 = getelementptr inbounds nuw i8, ptr %12, i64 %60 - %62 = getelementptr inbounds nuw i32, ptr %16, i64 %.sroa.12.034.i.i.i.i - %63 = load i32, ptr %62, align 4, !alias.scope !324, !noalias !325, !noundef !5 - %64 = call i32 @llvm.bswap.i32(i32 %63) - store i32 %64, ptr %61, align 1, !alias.scope !354, !noalias !358 - %exitcond.not.i.i.i.i = icmp eq i64 %59, 8 + %.sroa.12.034.i.i.i.i = phi i64 [ %58, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i" ], [ 0, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i.preheader" ] + %58 = add nuw nsw i64 %.sroa.12.034.i.i.i.i, 1 + %59 = shl nuw nsw i64 %.sroa.12.034.i.i.i.i, 2 + %60 = getelementptr inbounds nuw i8, ptr %12, i64 %59 + %61 = getelementptr inbounds nuw i32, ptr %16, i64 %.sroa.12.034.i.i.i.i + %62 = load i32, ptr %61, align 4, !alias.scope !324, !noalias !325, !noundef !5 + %63 = call i32 @llvm.bswap.i32(i32 %62) + store i32 %63, ptr %60, align 1, !alias.scope !354, !noalias !358 + %exitcond.not.i.i.i.i = icmp eq i64 %58, 8 br i1 %exitcond.not.i.i.i.i, label %_ZN6digest11FixedOutput14finalize_fixed17ha5820c2f630280b0E.exit, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i" _ZN6digest11FixedOutput14finalize_fixed17ha5820c2f630280b0E.exit: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i.i.i.i" @@ -5759,7 +5758,7 @@ _ZN4core5slice4sort6stable5drift10create_run17h3abc6d03e9369fb5E.exit: ; preds = %104 = tail call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 %103, i1 true) %105 = trunc nuw nsw i64 %104 to i32 %106 = shl nuw nsw i32 %105, 1 - %107 = xor i32 %106, 126 + %107 = sub nuw nsw i32 126, %106 tail call void @_ZN4core5slice4sort6stable9quicksort9quicksort17h539f4e419b0b99e8E(ptr noalias noundef nonnull align 8 %93, i64 noundef %89, ptr noalias noundef nonnull align 8 %2, i64 noundef %3, i32 noundef %107, ptr noalias noundef readonly align 8 dereferenceable_or_null(32) null, ptr noalias noundef nonnull align 8 dereferenceable(8) %5) br label %108 @@ -5772,7 +5771,7 @@ _ZN4core5slice4sort6stable5drift10create_run17h3abc6d03e9369fb5E.exit: ; preds = %111 = tail call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 %110, i1 true) %112 = trunc nuw nsw i64 %111 to i32 %113 = shl nuw nsw i32 %112, 1 - %114 = xor i32 %113, 126 + %114 = sub nuw nsw i32 126, %113 tail call void @_ZN4core5slice4sort6stable9quicksort9quicksort17h539f4e419b0b99e8E(ptr noalias noundef nonnull align 8 %109, i64 noundef %90, ptr noalias noundef nonnull align 8 %2, i64 noundef %3, i32 noundef %114, ptr noalias noundef readonly align 8 dereferenceable_or_null(32) null, ptr noalias noundef nonnull align 8 dereferenceable(8) %5) br label %115 @@ -5803,7 +5802,7 @@ _ZN4core5slice4sort6stable5drift13logical_merge17hd554d103aa1d6362E.exit: ; pred %127 = tail call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 %126, i1 true) %128 = trunc nuw nsw i64 %127 to i32 %129 = shl nuw nsw i32 %128, 1 - %130 = xor i32 %129, 126 + %130 = sub nuw nsw i32 126, %129 tail call void @_ZN4core5slice4sort6stable9quicksort9quicksort17h539f4e419b0b99e8E(ptr noalias noundef nonnull align 8 %0, i64 noundef %1, ptr noalias noundef nonnull align 8 %2, i64 noundef %3, i32 noundef %130, ptr noalias noundef readonly align 8 dereferenceable_or_null(32) null, ptr noalias noundef nonnull align 8 dereferenceable(8) %5) br label %131 @@ -5877,7 +5876,7 @@ _ZN4core5slice4sort6shared17find_existing_run17h313ad9ba18b3fc17E.exit.thread: ; %18 = tail call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 %17, i1 true) %19 = trunc nuw nsw i64 %18 to i32 %20 = shl nuw nsw i32 %19, 1 - %21 = xor i32 %20, 126 + %21 = sub nuw nsw i32 126, %20 tail call void @_ZN4core5slice4sort8unstable9quicksort9quicksort17h5bc2006986602531E(ptr noalias noundef nonnull align 8 %0, i64 noundef %1, ptr noalias noundef readonly align 8 dereferenceable_or_null(80) null, i32 noundef %21, ptr noalias noundef nonnull align 8 dereferenceable(8) %2) br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$7reverse17hc6fb2b2f533155ccE.exit" @@ -10605,7 +10604,7 @@ _ZN4core5slice4sort6shared17find_existing_run17h9f0226770afb60d6E.exit.thread.i. %103 = call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 %102, i1 true) %104 = trunc nuw nsw i64 %103 to i32 %105 = shl nuw nsw i32 %104, 1 - %106 = xor i32 %105, 126 + %106 = sub nuw nsw i32 126, %105 invoke void @_ZN4core5slice4sort8unstable9quicksort9quicksort17h3137891309a3dd90E(ptr noalias noundef nonnull align 8 %75, i64 noundef range(i64 21, 0) %77, ptr noalias noundef readonly align 8 dereferenceable_or_null(16) null, i32 noundef %106, ptr noalias noundef nonnull align 8 dereferenceable(8) %8) to label %.loopexit50 unwind label %.loopexit.split-lp diff --git a/bench/zed-rs/optimized/7almbq0vtpgp7q0c9d6k1td97.ll b/bench/zed-rs/optimized/7almbq0vtpgp7q0c9d6k1td97.ll index 3e80240509f..18795eede2f 100644 --- a/bench/zed-rs/optimized/7almbq0vtpgp7q0c9d6k1td97.ll +++ b/bench/zed-rs/optimized/7almbq0vtpgp7q0c9d6k1td97.ll @@ -1618,59 +1618,58 @@ define hidden void @"_ZN129_$LT$digest..core_api..ct_variable..CtVariableCoreWra ._crit_edge.i: ; preds = %3 %scevgep.i = getelementptr i8, ptr %26, i64 1 - %28 = xor i64 %18, 63 + %28 = sub nuw nsw i64 63, %18 call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i, i8 0, i64 %28, i1 false), !alias.scope !265, !noalias !278 - %29 = xor i64 %18, 56 - %30 = icmp samesign ult i64 %29, 8 - br i1 %30, label %._crit_edge.thread.i, label %35 + %29 = icmp samesign ugt i8 %17, 55 + br i1 %29, label %._crit_edge.thread.i, label %34 ._crit_edge.thread.i: ; preds = %._crit_edge.i, %3 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1), !noalias !267 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8), !noalias !279 call void @llvm.lifetime.start.p0(i64 0, ptr nonnull %4), !noalias !280 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7), !noalias !281 - %31 = getelementptr inbounds nuw i8, ptr %7, i64 64 - store i64 0, ptr %31, align 8, !noalias !281 + %30 = getelementptr inbounds nuw i8, ptr %7, i64 64 + store i64 0, ptr %30, align 8, !noalias !281 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6), !noalias !281 - store ptr %31, ptr %6, align 8, !noalias !281 + store ptr %30, ptr %6, align 8, !noalias !281 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !281 store ptr %4, ptr %5, align 8, !noalias !281 - %32 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %6, ptr %32, align 8, !noalias !281 - %33 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 0, ptr %33, align 8, !noalias !281 - call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h41a442f04835b163E.llvm.11111619368960553376"(ptr noundef nonnull %7, ptr noundef nonnull %31, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !284 + %31 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %6, ptr %31, align 8, !noalias !281 + %32 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 0, ptr %32, align 8, !noalias !281 + call void @"_ZN94_$LT$core..slice..iter..IterMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h41a442f04835b163E.llvm.11111619368960553376"(ptr noundef nonnull %7, ptr noundef nonnull %30, ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %5), !noalias !284 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5), !noalias !281 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6), !noalias !281 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %8, ptr noundef nonnull align 8 dereferenceable(64) %7, i64 56, i1 false), !noalias !285 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7), !noalias !281 call void @llvm.lifetime.end.p0(i64 0, ptr nonnull %4), !noalias !280 - %34 = getelementptr inbounds nuw i8, ptr %8, i64 56 - store i64 %25, ptr %34, align 1, !alias.scope !286, !noalias !290 + %33 = getelementptr inbounds nuw i8, ptr %8, i64 56 + store i64 %25, ptr %33, align 1, !alias.scope !286, !noalias !290 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(64) %8, i64 noundef 1), !noalias !267 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8), !noalias !279 br label %_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i -35: ; preds = %._crit_edge.i - %36 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store i64 %25, ptr %36, align 1, !alias.scope !292, !noalias !296 +34: ; preds = %._crit_edge.i + %35 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store i64 %25, ptr %35, align 1, !alias.scope !292, !noalias !296 call void @_ZN4sha26sha25611compress25617h72932c15ee4ebcdaE(ptr noalias noundef nonnull align 8 dereferenceable(40) %0, ptr noalias noundef nonnull readonly align 1 dereferenceable(65) %1, i64 noundef 1), !noalias !267 br label %_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i -_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i: ; preds = %35, %._crit_edge.thread.i +_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i: ; preds = %34, %._crit_edge.thread.i store i8 0, ptr %16, align 1, !alias.scope !274, !noalias !275 br label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i" "_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i", %_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i - %.sroa.12.034.i = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i ], [ %37, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i" ] - %37 = add nuw nsw i64 %.sroa.12.034.i, 1 - %38 = shl nuw nsw i64 %.sroa.12.034.i, 2 - %39 = getelementptr inbounds nuw i8, ptr %12, i64 %38 - %40 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.034.i - %41 = load i32, ptr %40, align 4, !alias.scope !262, !noalias !270, !noundef !36 - %42 = call i32 @llvm.bswap.i32(i32 %41) - store i32 %42, ptr %39, align 1, !alias.scope !298, !noalias !302 - %exitcond.not.i = icmp eq i64 %37, 8 + %.sroa.12.034.i = phi i64 [ 0, %_ZN4core4iter6traits8iterator8Iterator3zip17hf597b3fe14362ad2E.exit.i ], [ %36, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i" ] + %36 = add nuw nsw i64 %.sroa.12.034.i, 1 + %37 = shl nuw nsw i64 %.sroa.12.034.i, 2 + %38 = getelementptr inbounds nuw i8, ptr %12, i64 %37 + %39 = getelementptr inbounds nuw i32, ptr %0, i64 %.sroa.12.034.i + %40 = load i32, ptr %39, align 4, !alias.scope !262, !noalias !270, !noundef !36 + %41 = call i32 @llvm.bswap.i32(i32 %40) + store i32 %41, ptr %38, align 1, !alias.scope !298, !noalias !302 + %exitcond.not.i = icmp eq i64 %36, 8 br i1 %exitcond.not.i, label %"_ZN86_$LT$sha2..core_api..Sha256VarCore$u20$as$u20$digest..core_api..VariableOutputCore$GT$22finalize_variable_core17h092bda4f464f31d2E.exit", label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i" "_ZN86_$LT$sha2..core_api..Sha256VarCore$u20$as$u20$digest..core_api..VariableOutputCore$GT$22finalize_variable_core17h092bda4f464f31d2E.exit": ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h32f3686baee9daf7E.exit.i" diff --git a/bench/zstd/optimized/entropy_common.c.ll b/bench/zstd/optimized/entropy_common.c.ll index 71e8ffa7dff..714e1816ec0 100644 --- a/bench/zstd/optimized/entropy_common.c.ll +++ b/bench/zstd/optimized/entropy_common.c.ll @@ -194,7 +194,7 @@ if.end84.i.i: ; preds = %if.end81.i.i, %for. %bitCount.i.1.i = phi i32 [ %bitCount.i.5.i, %if.end81.i.i ], [ %bitCount.i.0.i, %for.cond.i.i ] %bitStream.i.1.i = phi i32 [ %shr83.i.i, %if.end81.i.i ], [ %bitStream.i.0.i, %for.cond.i.i ] %ip.i.1.i = phi ptr [ %ip.i.5.i, %if.end81.i.i ], [ %ip.i.0.i, %for.cond.i.i ] - %mul85.i.i = shl nuw nsw i32 %threshold.i.0.i, 1 + %mul85.i.i = shl nsw i32 %threshold.i.0.i, 1 %sub86.i.i = add nsw i32 %mul85.i.i, -1 %sub87.i.i = sub nsw i32 %sub86.i.i, %remaining.i.0.i %sub88.i.i = add nsw i32 %threshold.i.0.i, -1 @@ -237,9 +237,8 @@ if.then120.i.i: ; preds = %if.end107.i.i if.end124.i.i: ; preds = %if.then120.i.i %4 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %remaining.i.2.i, i1 true) - %sub.i = xor i32 %4, 31 %add126.i.i = sub nuw nsw i32 32, %4 - %shl128.i.i = shl nuw nsw i32 1, %sub.i + %shl128.i.i = lshr exact i32 -2147483648, %4 br label %if.end129.i.i if.end129.i.i: ; preds = %if.end124.i.i, %if.end107.i.i @@ -453,7 +452,7 @@ if.end84.i: ; preds = %if.end81.i, %for.co %bitCount.i.1 = phi i32 [ %bitCount.i.5, %if.end81.i ], [ %bitCount.i.0, %for.cond.i ] %bitStream.i.1 = phi i32 [ %shr83.i, %if.end81.i ], [ %bitStream.i.0, %for.cond.i ] %ip.i.1 = phi ptr [ %ip.i.5, %if.end81.i ], [ %ip.i.0, %for.cond.i ] - %mul85.i = shl nuw nsw i32 %threshold.i.0, 1 + %mul85.i = shl nsw i32 %threshold.i.0, 1 %sub86.i = add nsw i32 %mul85.i, -1 %sub87.i = sub nsw i32 %sub86.i, %remaining.i.0 %sub88.i = add nsw i32 %threshold.i.0, -1 @@ -496,9 +495,8 @@ if.then120.i: ; preds = %if.end107.i if.end124.i: ; preds = %if.then120.i %4 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %remaining.i.2, i1 true) - %sub.i111 = xor i32 %4, 31 %add126.i = sub nuw nsw i32 32, %4 - %shl128.i = shl nuw nsw i32 1, %sub.i111 + %shl128.i = lshr exact i32 -2147483648, %4 br label %if.end129.i if.end129.i: ; preds = %if.end124.i, %if.end107.i @@ -619,8 +617,8 @@ if.end7.i.i: ; preds = %if.then2.i.i if.end11.i.i: ; preds = %if.end7.i.i %add.ptr.i.i = getelementptr inbounds nuw i8, ptr %src, i64 1 - %cmp13.i53.not.i = icmp eq i64 %sub.i.i, 0 - br i1 %cmp13.i53.not.i, label %if.end41.i.thread.i, label %for.body.i.i + %cmp13.i54.not.i = icmp eq i64 %sub.i.i, 0 + br i1 %cmp13.i54.not.i, label %if.end41.i.thread.i, label %for.body.i.i if.end41.i.thread.i: ; preds = %if.end11.i.i tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %rankStats, i8 0, i64 52, i1 false) @@ -658,14 +656,14 @@ if.end41.i.i: ; preds = %for.body.i.i, %if.e %oSize.i.0.i = phi i64 [ %call.i.i, %if.end34.i.i ], [ %sub.i.i, %for.body.i.i ] %iSize.i.0.i = phi i64 [ %conv.i.i, %if.end34.i.i ], [ %div.i47.i, %for.body.i.i ] tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %rankStats, i8 0, i64 52, i1 false) - %cmp45.i56.not.i = icmp eq i64 %oSize.i.0.i, 0 - br i1 %cmp45.i56.not.i, label %return, label %for.body47.i.i + %cmp45.i57.not.i = icmp eq i64 %oSize.i.0.i, 0 + br i1 %cmp45.i57.not.i, label %return, label %for.body47.i.i for.body47.i.i: ; preds = %if.end41.i.i, %if.end54.i.i - %conv44.i59.i = phi i64 [ %conv44.i.i, %if.end54.i.i ], [ 0, %if.end41.i.i ] - %weightTotal.i.058.i = phi i32 [ %add63.i.i, %if.end54.i.i ], [ 0, %if.end41.i.i ] - %n42.i.057.i = phi i32 [ %inc65.i.i, %if.end54.i.i ], [ 0, %if.end41.i.i ] - %arrayidx49.i.i = getelementptr inbounds nuw i8, ptr %huffWeight, i64 %conv44.i59.i + %conv44.i60.i = phi i64 [ %conv44.i.i, %if.end54.i.i ], [ 0, %if.end41.i.i ] + %weightTotal.i.059.i = phi i32 [ %add63.i.i, %if.end54.i.i ], [ 0, %if.end41.i.i ] + %n42.i.058.i = phi i32 [ %inc65.i.i, %if.end54.i.i ], [ 0, %if.end41.i.i ] + %arrayidx49.i.i = getelementptr inbounds nuw i8, ptr %huffWeight, i64 %conv44.i60.i %8 = load i8, ptr %arrayidx49.i.i, align 1 %cmp51.i.i = icmp ugt i8 %8, 12 br i1 %cmp51.i.i, label %return, label %if.end54.i.i @@ -680,60 +678,56 @@ if.end54.i.i: ; preds = %for.body47.i.i %conv61.i.i = zext nneg i8 %10 to i32 %shl.i.i = shl nuw i32 1, %conv61.i.i %shr62.i.i = ashr i32 %shl.i.i, 1 - %add63.i.i = add i32 %shr62.i.i, %weightTotal.i.058.i - %inc65.i.i = add i32 %n42.i.057.i, 1 + %add63.i.i = add i32 %shr62.i.i, %weightTotal.i.059.i + %inc65.i.i = add i32 %n42.i.058.i, 1 %conv44.i.i = zext i32 %inc65.i.i to i64 %cmp45.i.i = icmp ugt i64 %oSize.i.0.i, %conv44.i.i br i1 %cmp45.i.i, label %for.body47.i.i, label %for.end66.i.i, !llvm.loop !7 for.end66.i.i: ; preds = %if.end54.i.i - %cmp67.i.i = icmp eq i32 %add63.i.i, 0 - br i1 %cmp67.i.i, label %return, label %if.end70.i.i - -if.end70.i.i: ; preds = %for.end66.i.i - %11 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %add63.i.i, i1 true) - %sub.i49.i = xor i32 %11, 31 - %cmp73.i.i = icmp samesign ugt i32 %sub.i49.i, 11 - br i1 %cmp73.i.i, label %return, label %if.end76.i.i - -if.end76.i.i: ; preds = %if.end70.i.i - %add72.i.i = sub nuw nsw i32 32, %11 + %11 = add i32 %add63.i.i, -4096 + %or.cond52.i = icmp ult i32 %11, -4095 + br i1 %or.cond52.i, label %return, label %if.end76.i.i + +if.end76.i.i: ; preds = %for.end66.i.i + %12 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %add63.i.i, i1 true) + %sub.i49.i = sub nuw nsw i32 31, %12 + %add72.i.i = sub nuw nsw i32 32, %12 store i32 %add72.i.i, ptr %tableLogPtr, align 4 %shl77.i.i = shl nuw nsw i32 2, %sub.i49.i - %sub78.i.i = sub i32 %shl77.i.i, %add63.i.i - %12 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %sub78.i.i, i1 true) - %sub.i50.i = xor i32 %12, 31 - %shl80.i.i = shl nuw i32 1, %sub.i50.i + %sub78.i.i = sub nsw i32 %shl77.i.i, %add63.i.i + %13 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %sub78.i.i, i1 true) + %shl80.i.i = lshr exact i32 -2147483648, %13 %cmp83.i.not.i = icmp eq i32 %shl80.i.i, %sub78.i.i br i1 %cmp83.i.not.i, label %if.end86.i.i, label %return if.end86.i.i: ; preds = %if.end76.i.i - %add82.i.i = sub nuw nsw i32 32, %12 + %add82.i.i = sub nuw nsw i32 32, %13 %conv87.i.i = trunc nuw nsw i32 %add82.i.i to i8 %arrayidx88.i.i = getelementptr inbounds nuw i8, ptr %huffWeight, i64 %oSize.i.0.i store i8 %conv87.i.i, ptr %arrayidx88.i.i, align 1 %idxprom89.i.i = zext nneg i32 %add82.i.i to i64 %arrayidx90.i.i = getelementptr inbounds nuw i32, ptr %rankStats, i64 %idxprom89.i.i - %13 = load i32, ptr %arrayidx90.i.i, align 4 - %inc91.i.i = add i32 %13, 1 + %14 = load i32, ptr %arrayidx90.i.i, align 4 + %inc91.i.i = add i32 %14, 1 store i32 %inc91.i.i, ptr %arrayidx90.i.i, align 4 %arrayidx92.i.i = getelementptr inbounds nuw i8, ptr %rankStats, i64 4 - %14 = load i32, ptr %arrayidx92.i.i, align 4 - %cmp93.i.i = icmp ugt i32 %14, 1 - %and96.i.i = and i32 %14, 1 + %15 = load i32, ptr %arrayidx92.i.i, align 4 + %cmp93.i.i = icmp ugt i32 %15, 1 + %and96.i.i = and i32 %15, 1 %tobool97.i.not.i = icmp eq i32 %and96.i.i, 0 %or.cond.i = and i1 %cmp93.i.i, %tobool97.i.not.i br i1 %or.cond.i, label %if.end99.i.i, label %return if.end99.i.i: ; preds = %if.end86.i.i - %15 = trunc i64 %oSize.i.0.i to i32 - %conv101.i.i = add i32 %15, 1 + %16 = trunc i64 %oSize.i.0.i to i32 + %conv101.i.i = add i32 %16, 1 store i32 %conv101.i.i, ptr %nbSymbolsPtr, align 4 %add102.i.i = add nuw nsw i64 %iSize.i.0.i, 1 br label %return -return: ; preds = %for.body47.i.i, %if.end99.i.i, %if.end86.i.i, %if.end76.i.i, %if.end70.i.i, %for.end66.i.i, %if.end41.i.i, %if.end34.i.i, %if.else.i.i, %if.end41.i.thread.i, %if.end7.i.i, %if.then2.i.i, %if.end, %if.then - %retval.0 = phi i64 [ %call, %if.then ], [ %add102.i.i, %if.end99.i.i ], [ -72, %if.end ], [ -72, %if.then2.i.i ], [ -20, %if.end7.i.i ], [ -72, %if.else.i.i ], [ %call.i.i, %if.end34.i.i ], [ -20, %for.end66.i.i ], [ -20, %if.end70.i.i ], [ -20, %if.end76.i.i ], [ -20, %if.end86.i.i ], [ -20, %if.end41.i.i ], [ -20, %if.end41.i.thread.i ], [ -20, %for.body47.i.i ] +return: ; preds = %for.body47.i.i, %if.end99.i.i, %if.end86.i.i, %if.end76.i.i, %for.end66.i.i, %if.end41.i.i, %if.end34.i.i, %if.else.i.i, %if.end41.i.thread.i, %if.end7.i.i, %if.then2.i.i, %if.end, %if.then + %retval.0 = phi i64 [ %call, %if.then ], [ %add102.i.i, %if.end99.i.i ], [ -72, %if.end ], [ -72, %if.then2.i.i ], [ -20, %if.end7.i.i ], [ -72, %if.else.i.i ], [ %call.i.i, %if.end34.i.i ], [ -20, %for.end66.i.i ], [ -20, %if.end76.i.i ], [ -20, %if.end86.i.i ], [ -20, %if.end41.i.i ], [ -20, %if.end41.i.thread.i ], [ -20, %for.body47.i.i ] ret i64 %retval.0 } @@ -762,8 +756,8 @@ if.end7.i: ; preds = %if.then2.i if.end11.i: ; preds = %if.end7.i %add.ptr.i = getelementptr inbounds nuw i8, ptr %src, i64 1 - %cmp13.i53.not = icmp eq i64 %sub.i, 0 - br i1 %cmp13.i53.not, label %if.end41.i.thread, label %for.body.i.preheader + %cmp13.i54.not = icmp eq i64 %sub.i, 0 + br i1 %cmp13.i54.not, label %if.end41.i.thread, label %for.body.i.preheader if.end41.i.thread: ; preds = %if.end11.i tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %rankStats, i8 0, i64 52, i1 false) @@ -806,14 +800,14 @@ if.end41.i: ; preds = %for.body.i, %if.end %oSize.i.0 = phi i64 [ %call.i, %if.end34.i ], [ %sub.i, %for.body.i ] %iSize.i.0 = phi i64 [ %conv.i, %if.end34.i ], [ %div.i47, %for.body.i ] tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %rankStats, i8 0, i64 52, i1 false) - %cmp45.i56.not = icmp eq i64 %oSize.i.0, 0 - br i1 %cmp45.i56.not, label %HUF_readStats_body.exit, label %for.body47.i + %cmp45.i57.not = icmp eq i64 %oSize.i.0, 0 + br i1 %cmp45.i57.not, label %HUF_readStats_body.exit, label %for.body47.i for.body47.i: ; preds = %if.end41.i, %if.end54.i - %conv44.i59 = phi i64 [ %conv44.i, %if.end54.i ], [ 0, %if.end41.i ] - %weightTotal.i.058 = phi i32 [ %add63.i, %if.end54.i ], [ 0, %if.end41.i ] - %n42.i.057 = phi i32 [ %inc65.i, %if.end54.i ], [ 0, %if.end41.i ] - %arrayidx49.i = getelementptr inbounds nuw i8, ptr %huffWeight, i64 %conv44.i59 + %conv44.i60 = phi i64 [ %conv44.i, %if.end54.i ], [ 0, %if.end41.i ] + %weightTotal.i.059 = phi i32 [ %add63.i, %if.end54.i ], [ 0, %if.end41.i ] + %n42.i.058 = phi i32 [ %inc65.i, %if.end54.i ], [ 0, %if.end41.i ] + %arrayidx49.i = getelementptr inbounds nuw i8, ptr %huffWeight, i64 %conv44.i60 %8 = load i8, ptr %arrayidx49.i, align 1 %cmp51.i = icmp ugt i8 %8, 12 br i1 %cmp51.i, label %HUF_readStats_body.exit, label %if.end54.i @@ -828,60 +822,56 @@ if.end54.i: ; preds = %for.body47.i %conv61.i = zext nneg i8 %10 to i32 %shl.i = shl nuw i32 1, %conv61.i %shr62.i = ashr i32 %shl.i, 1 - %add63.i = add i32 %shr62.i, %weightTotal.i.058 - %inc65.i = add i32 %n42.i.057, 1 + %add63.i = add i32 %shr62.i, %weightTotal.i.059 + %inc65.i = add i32 %n42.i.058, 1 %conv44.i = zext i32 %inc65.i to i64 %cmp45.i = icmp ugt i64 %oSize.i.0, %conv44.i br i1 %cmp45.i, label %for.body47.i, label %for.end66.i, !llvm.loop !7 for.end66.i: ; preds = %if.end54.i - %cmp67.i = icmp eq i32 %add63.i, 0 - br i1 %cmp67.i, label %HUF_readStats_body.exit, label %if.end70.i - -if.end70.i: ; preds = %for.end66.i - %11 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %add63.i, i1 true) - %sub.i49 = xor i32 %11, 31 - %cmp73.i = icmp samesign ugt i32 %sub.i49, 11 - br i1 %cmp73.i, label %HUF_readStats_body.exit, label %if.end76.i - -if.end76.i: ; preds = %if.end70.i - %add72.i = sub nuw nsw i32 32, %11 + %11 = add i32 %add63.i, -4096 + %or.cond52 = icmp ult i32 %11, -4095 + br i1 %or.cond52, label %HUF_readStats_body.exit, label %if.end76.i + +if.end76.i: ; preds = %for.end66.i + %12 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %add63.i, i1 true) + %sub.i49 = sub nuw nsw i32 31, %12 + %add72.i = sub nuw nsw i32 32, %12 store i32 %add72.i, ptr %tableLogPtr, align 4 %shl77.i = shl nuw nsw i32 2, %sub.i49 - %sub78.i = sub i32 %shl77.i, %add63.i - %12 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %sub78.i, i1 true) - %sub.i50 = xor i32 %12, 31 - %shl80.i = shl nuw i32 1, %sub.i50 + %sub78.i = sub nsw i32 %shl77.i, %add63.i + %13 = tail call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %sub78.i, i1 true) + %shl80.i = lshr exact i32 -2147483648, %13 %cmp83.i.not = icmp eq i32 %shl80.i, %sub78.i br i1 %cmp83.i.not, label %if.end86.i, label %HUF_readStats_body.exit if.end86.i: ; preds = %if.end76.i - %add82.i = sub nuw nsw i32 32, %12 + %add82.i = sub nuw nsw i32 32, %13 %conv87.i = trunc nuw nsw i32 %add82.i to i8 %arrayidx88.i = getelementptr inbounds nuw i8, ptr %huffWeight, i64 %oSize.i.0 store i8 %conv87.i, ptr %arrayidx88.i, align 1 %idxprom89.i = zext nneg i32 %add82.i to i64 %arrayidx90.i = getelementptr inbounds nuw i32, ptr %rankStats, i64 %idxprom89.i - %13 = load i32, ptr %arrayidx90.i, align 4 - %inc91.i = add i32 %13, 1 + %14 = load i32, ptr %arrayidx90.i, align 4 + %inc91.i = add i32 %14, 1 store i32 %inc91.i, ptr %arrayidx90.i, align 4 %arrayidx92.i = getelementptr inbounds nuw i8, ptr %rankStats, i64 4 - %14 = load i32, ptr %arrayidx92.i, align 4 - %cmp93.i = icmp ugt i32 %14, 1 - %and96.i = and i32 %14, 1 + %15 = load i32, ptr %arrayidx92.i, align 4 + %cmp93.i = icmp ugt i32 %15, 1 + %and96.i = and i32 %15, 1 %tobool97.i.not = icmp eq i32 %and96.i, 0 %or.cond = and i1 %cmp93.i, %tobool97.i.not br i1 %or.cond, label %if.end99.i, label %HUF_readStats_body.exit if.end99.i: ; preds = %if.end86.i - %15 = trunc i64 %oSize.i.0 to i32 - %conv101.i = add i32 %15, 1 + %16 = trunc i64 %oSize.i.0 to i32 + %conv101.i = add i32 %16, 1 store i32 %conv101.i, ptr %nbSymbolsPtr, align 4 %add102.i = add nuw nsw i64 %iSize.i.0, 1 br label %HUF_readStats_body.exit -HUF_readStats_body.exit: ; preds = %for.body47.i, %if.end41.i.thread, %if.end41.i, %if.end86.i, %if.end76.i, %if.end70.i, %for.end66.i, %if.end34.i, %if.else.i, %if.end7.i, %if.then2.i, %entry, %if.end99.i - %retval.i.0 = phi i64 [ %add102.i, %if.end99.i ], [ -72, %entry ], [ -72, %if.then2.i ], [ -20, %if.end7.i ], [ -72, %if.else.i ], [ %call.i, %if.end34.i ], [ -20, %for.end66.i ], [ -20, %if.end70.i ], [ -20, %if.end76.i ], [ -20, %if.end86.i ], [ -20, %if.end41.i ], [ -20, %if.end41.i.thread ], [ -20, %for.body47.i ] +HUF_readStats_body.exit: ; preds = %for.body47.i, %if.end41.i.thread, %if.end41.i, %if.end86.i, %if.end76.i, %for.end66.i, %if.end34.i, %if.else.i, %if.end7.i, %if.then2.i, %entry, %if.end99.i + %retval.i.0 = phi i64 [ %add102.i, %if.end99.i ], [ -72, %entry ], [ -72, %if.then2.i ], [ -20, %if.end7.i ], [ -72, %if.else.i ], [ %call.i, %if.end34.i ], [ -20, %for.end66.i ], [ -20, %if.end76.i ], [ -20, %if.end86.i ], [ -20, %if.end41.i ], [ -20, %if.end41.i.thread ], [ -20, %for.body47.i ] ret i64 %retval.i.0 } diff --git a/bench/zstd/optimized/fse_decompress.c.ll b/bench/zstd/optimized/fse_decompress.c.ll index d17c0142420..bddd5758bc5 100644 --- a/bench/zstd/optimized/fse_decompress.c.ll +++ b/bench/zstd/optimized/fse_decompress.c.ll @@ -221,6 +221,7 @@ for.end144.if.end149_crit_edge: ; preds = %for.end144 if.end149: ; preds = %for.cond88.preheader, %for.end144.if.end149_crit_edge %wide.trip.count121.pre-phi = phi i64 [ %.pre, %for.end144.if.end149_crit_edge ], [ %conv84, %for.cond88.preheader ] + %sub.i.neg = add nuw nsw i32 %tableLog, -31 br label %for.body154 for.body154: ; preds = %if.end149, %for.body154 @@ -235,8 +236,7 @@ for.body154: ; preds = %if.end149, %for.bod store i16 %inc161, ptr %arrayidx160, align 2 %conv162 = zext i16 %9 to i32 %10 = tail call range(i32 16, 32) i32 @llvm.ctlz.i32(i32 range(i32 0, 65536) %conv162, i1 true) - %sub.i = xor i32 %10, 31 - %sub163 = sub nsw i32 %tableLog, %sub.i + %sub163 = add nsw i32 %sub.i.neg, %10 %conv164 = trunc nsw i32 %sub163 to i8 %nbBits = getelementptr inbounds nuw i8, ptr %arrayidx157, i64 3 store i8 %conv164, ptr %nbBits, align 1 @@ -1792,8 +1792,7 @@ cond.end.thread: ; preds = %if.then3 cond.end: ; preds = %if.then3 %conv = zext i8 %0 to i32 %1 = tail call range(i32 16, 32) i32 @llvm.ctlz.i32(i32 range(i32 0, 65536) %conv, i1 true) - %sub.i = xor i32 %1, 31 - %sub9 = sub nuw nsw i32 8, %sub.i + %sub9 = add nsw i32 %1, -23 %bitsConsumed = getelementptr inbounds nuw i8, ptr %bitD, i64 8 store i32 %sub9, ptr %bitsConsumed, align 8 br label %return @@ -1890,8 +1889,8 @@ if.end70: ; preds = %sw.epilog %bitsConsumed65 = getelementptr inbounds nuw i8, ptr %bitD, i64 8 %17 = trunc nuw i64 %srcSize to i32 %18 = shl nuw nsw i32 %17, 3 - %19 = sub nsw i32 %16, %18 - %add74 = add nsw i32 %19, 41 + %reass.sub46 = sub nsw i32 %16, %18 + %add74 = add nsw i32 %reass.sub46, 41 store i32 %add74, ptr %bitsConsumed65, align 8 br label %return diff --git a/bench/zstd/optimized/zstd_compress.c.ll b/bench/zstd/optimized/zstd_compress.c.ll index 60045258197..254b844489e 100644 --- a/bench/zstd/optimized/zstd_compress.c.ll +++ b/bench/zstd/optimized/zstd_compress.c.ll @@ -3825,7 +3825,7 @@ ZSTD_LLcode.exit: ; preds = %cond.true.i, %cond. %arrayidx14 = getelementptr inbounds nuw i8, ptr %1, i64 %indvars.iv store i8 %cond.i, ptr %arrayidx14, align 1 %14 = trunc nuw nsw i32 %8 to i8 - %conv15 = xor i8 %14, 31 + %conv15 = sub nuw nsw i8 31, %14 %arrayidx17 = getelementptr inbounds nuw i8, ptr %2, i64 %indvars.iv store i8 %conv15, ptr %arrayidx17, align 1 %cmp.i22 = icmp ugt i16 %9, 127 @@ -5654,7 +5654,7 @@ do.end196: ; preds = %ZSTD_dictNCountRepe %conv = trunc nuw i64 %sub.ptr.sub210 to i32 %add = add nuw i32 %conv, 131072 %11 = call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %add, i1 true) - %sub.i = xor i32 %11, 31 + %sub.i = sub nuw nsw i32 31, %11 %offcodeMax.0 = select i1 %cmp211, i32 %sub.i, i32 31 %12 = load i32, ptr %offcodeMaxValue, align 4 %cmp.i80 = icmp ult i32 %12, %offcodeMax.0 @@ -10544,7 +10544,6 @@ if.then29: ; preds = %for.body if.else33: ; preds = %for.body %cmp34 = icmp eq i32 %12, 0 - %conv35 = zext i1 %cmp34 to i32 %14 = load i32, ptr %arrayidx, align 4 %add.i = add i32 %14, 3 %cmp.i = icmp ne i32 %14, %9 @@ -10564,7 +10563,7 @@ if.else4.i: ; preds = %if.else.i135 br i1 %cmp6.i, label %if.then7.i, label %if.else9.i if.then7.i: ; preds = %if.else4.i - %sub8.i = xor i32 %conv35, 3 + %sub8.i = select i1 %cmp34, i32 2, i32 3 br label %if.else.i139 if.else9.i: ; preds = %if.else4.i @@ -11050,7 +11049,6 @@ if.end83: ; preds = %if.then54, %if.then %startPosInSequence.1 = phi i32 [ 0, %if.then25 ], [ %startPosInSequence.0198, %if.then54 ] %endPosInSequence.1 = sub i32 %endPosInSequence.0197, %add22.pn %cmp84 = icmp eq i32 %litLength.1, 0 - %conv85 = zext i1 %cmp84 to i32 %add.i = add i32 %currSeq.sroa.0.0.copyload, 3 %cmp.i = icmp ne i32 %currSeq.sroa.0.0.copyload, %10 %or.cond173.not = select i1 %cmp84, i1 true, i1 %cmp.i @@ -11069,7 +11067,7 @@ if.else4.i: ; preds = %if.else.i136 br i1 %cmp6.i, label %if.then7.i, label %if.else9.i if.then7.i: ; preds = %if.else4.i - %sub8.i = xor i32 %conv85, 3 + %sub8.i = select i1 %cmp84, i32 2, i32 3 br label %if.else.i140 if.else9.i: ; preds = %if.else4.i @@ -14255,7 +14253,7 @@ ZSTD_LLcode.exit.i: ; preds = %cond.false.i.i, %co %arrayidx14.i = getelementptr inbounds nuw i8, ptr %1, i64 %indvars.iv.i store i8 %cond.i.i, ptr %arrayidx14.i, align 1 %14 = trunc nuw nsw i32 %8 to i8 - %conv15.i = xor i8 %14, 31 + %conv15.i = sub nuw nsw i8 31, %14 %arrayidx17.i = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv.i store i8 %conv15.i, ptr %arrayidx17.i, align 1 %cmp.i22.i = icmp ugt i16 %9, 127 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..88293885df6 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/122607 export COMPTIME_MODE=0 # Please rebase manually