diff --git a/bench/abc/optimized/giaRex.c.ll b/bench/abc/optimized/giaRex.c.ll index 1a7f1d7d162..4b0dfab5614 100644 --- a/bench/abc/optimized/giaRex.c.ll +++ b/bench/abc/optimized/giaRex.c.ll @@ -2258,73 +2258,74 @@ define i64 @Gia_ManAutomStep(ptr nocapture noundef readonly %0, i64 noundef %1, %94 = zext nneg i32 %93 to i64 %scevgep = getelementptr i8, ptr %2, i64 %94 %95 = shl nuw nsw i32 %.3.lcssa152, 3 - %narrow = sub nuw nsw i32 512, %95 - %96 = zext nneg i32 %narrow to i64 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %96, i1 false) + %96 = xor i32 %95, 504 + %narrow = add nuw nsw i32 %96, 8 + %97 = zext nneg i32 %narrow to i64 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %97, i1 false) br label %.preheader.i.preheader .preheader.i.preheader: ; preds = %.lr.ph130.preheader, %.critedge6 br label %.preheader.i -.preheader.i: ; preds = %.preheader.i.preheader, %115 - %.032.i = phi i64 [ %119, %115 ], [ 4294967295, %.preheader.i.preheader ] - %.02831.i = phi i32 [ %116, %115 ], [ 32, %.preheader.i.preheader ] - %97 = zext nneg i32 %.02831.i to i64 +.preheader.i: ; preds = %.preheader.i.preheader, %116 + %.032.i = phi i64 [ %120, %116 ], [ 4294967295, %.preheader.i.preheader ] + %.02831.i = phi i32 [ %117, %116 ], [ 32, %.preheader.i.preheader ] + %98 = zext nneg i32 %.02831.i to i64 %invariant.op.i = add nuw nsw i32 %.02831.i, 1 - %98 = xor i32 %.02831.i, -1 - br label %99 - -99: ; preds = %99, %.preheader.i - %.02930.i = phi i32 [ 0, %.preheader.i ], [ %113, %99 ] - %100 = sext i32 %.02930.i to i64 - %101 = getelementptr inbounds i64, ptr %2, i64 %100 - %102 = load i64, ptr %101, align 8 - %103 = add nsw i32 %.02930.i, %.02831.i - %104 = sext i32 %103 to i64 - %105 = getelementptr inbounds i64, ptr %2, i64 %104 - %106 = load i64, ptr %105, align 8 - %107 = lshr i64 %106, %97 - %108 = xor i64 %107, %102 - %109 = and i64 %108, %.032.i - %110 = xor i64 %109, %102 - store i64 %110, ptr %101, align 8 - %111 = shl i64 %109, %97 - %112 = xor i64 %111, %106 - store i64 %112, ptr %105, align 8 + %99 = xor i32 %.02831.i, -1 + br label %100 + +100: ; preds = %100, %.preheader.i + %.02930.i = phi i32 [ 0, %.preheader.i ], [ %114, %100 ] + %101 = sext i32 %.02930.i to i64 + %102 = getelementptr inbounds i64, ptr %2, i64 %101 + %103 = load i64, ptr %102, align 8 + %104 = add nsw i32 %.02930.i, %.02831.i + %105 = sext i32 %104 to i64 + %106 = getelementptr inbounds i64, ptr %2, i64 %105 + %107 = load i64, ptr %106, align 8 + %108 = lshr i64 %107, %98 + %109 = xor i64 %108, %103 + %110 = and i64 %109, %.032.i + %111 = xor i64 %110, %103 + store i64 %111, ptr %102, align 8 + %112 = shl i64 %110, %98 + %113 = xor i64 %112, %107 + store i64 %113, ptr %106, align 8 %.reass.i = add i32 %invariant.op.i, %.02930.i - %113 = and i32 %.reass.i, %98 - %114 = icmp slt i32 %113, 64 - br i1 %114, label %99, label %115, !llvm.loop !25 - -115: ; preds = %99 - %116 = lshr i32 %.02831.i, 1 - %117 = zext nneg i32 %116 to i64 - %118 = shl i64 %.032.i, %117 - %119 = xor i64 %118, %.032.i + %114 = and i32 %.reass.i, %99 + %115 = icmp slt i32 %114, 64 + br i1 %115, label %100, label %116, !llvm.loop !25 + +116: ; preds = %100 + %117 = lshr i32 %.02831.i, 1 + %118 = zext nneg i32 %117 to i64 + %119 = shl i64 %.032.i, %118 + %120 = xor i64 %119, %.032.i %.not.i101 = icmp samesign ult i32 %.02831.i, 2 br i1 %.not.i101, label %Gia_ManAutomTranspose64.exit, label %.preheader.i, !llvm.loop !26 -Gia_ManAutomTranspose64.exit: ; preds = %115 +Gia_ManAutomTranspose64.exit: ; preds = %116 %.val83 = load ptr, ptr %6, align 8 - %120 = getelementptr i8, ptr %0, i64 72 - %.val84 = load ptr, ptr %120, align 8 - %121 = getelementptr i8, ptr %.val84, i64 8 - %.val84.val = load ptr, ptr %121, align 8 + %121 = getelementptr i8, ptr %0, i64 72 + %.val84 = load ptr, ptr %121, align 8 + %122 = getelementptr i8, ptr %.val84, i64 8 + %.val84.val = load ptr, ptr %122, align 8 %.val84.val.val = load i32, ptr %.val84.val, align 4 - %122 = sext i32 %.val84.val.val to i64 - %123 = getelementptr inbounds %struct.Gia_Obj_t_, ptr %.val83, i64 %122 - %.val.i102 = load i64, ptr %123, align 4 - %124 = and i64 %.val.i102, 536870911 - %125 = sub nsw i64 %122, %124 + %123 = sext i32 %.val84.val.val to i64 + %124 = getelementptr inbounds %struct.Gia_Obj_t_, ptr %.val83, i64 %123 + %.val.i102 = load i64, ptr %124, align 4 + %125 = and i64 %.val.i102, 536870911 + %126 = sub nsw i64 %123, %125 %.val10.i104 = load ptr, ptr %5, align 8 - %sext12.i105 = shl i64 %125, 32 - %126 = ashr exact i64 %sext12.i105, 29 - %127 = getelementptr inbounds i8, ptr %.val10.i104, i64 %126 - %128 = load i64, ptr %127, align 8 - %129 = shl i64 %.val.i102, 34 - %sext.i106 = ashr i64 %129, 63 - %130 = xor i64 %128, %sext.i106 - ret i64 %130 + %sext12.i105 = shl i64 %126, 32 + %127 = ashr exact i64 %sext12.i105, 29 + %128 = getelementptr inbounds i8, ptr %.val10.i104, i64 %127 + %129 = load i64, ptr %128, align 8 + %130 = shl i64 %.val.i102, 34 + %sext.i106 = ashr i64 %130, 63 + %131 = xor i64 %129, %sext.i106 + ret i64 %131 } ; Function Attrs: nounwind uwtable diff --git a/bench/abseil-cpp/optimized/chi_square.cc.ll b/bench/abseil-cpp/optimized/chi_square.cc.ll index 2a51e8b2a12..14dc27b584a 100644 --- a/bench/abseil-cpp/optimized/chi_square.cc.ll +++ b/bench/abseil-cpp/optimized/chi_square.cc.ll @@ -219,34 +219,35 @@ if.else8.i: ; preds = %if.else.i br label %for.body.i10.i for.body.i10.i: ; preds = %for.body.i10.i, %if.else8.i - %indvars.iv.i11.i = phi i64 [ 2, %if.else8.i ], [ %indvars.iv.next.i14.i, %for.body.i10.i ] - %p.01.i12.i = phi double [ 0xBF07BA1C9A586733, %if.else8.i ], [ %12, %for.body.i10.i ] - %10 = sub nuw nsw i64 15, %indvars.iv.i11.i - %arrayidx1.i13.i = getelementptr inbounds nuw [15 x double], ptr @_ZZN4absl15random_internal12_GLOBAL__N_13POZEdE3kP2, i64 0, i64 %10 - %11 = load double, ptr %arrayidx1.i13.i, align 8 - %12 = tail call double @llvm.fma.f64(double %p.01.i12.i, double %sub.i, double %11) - %indvars.iv.next.i14.i = add nuw nsw i64 %indvars.iv.i11.i, 1 - %exitcond.not.i15.i = icmp eq i64 %indvars.iv.next.i14.i, 16 - br i1 %exitcond.not.i15.i, label %if.end11.i, label %for.body.i10.i, !llvm.loop !9 + %i.02.i.i = phi i32 [ 2, %if.else8.i ], [ %inc.i.i, %for.body.i10.i ] + %p.01.i11.i = phi double [ 0xBF07BA1C9A586733, %if.else8.i ], [ %11, %for.body.i10.i ] + %sub.i.i = xor i32 %i.02.i.i, 15 + %idxprom.i.i = zext nneg i32 %sub.i.i to i64 + %arrayidx1.i12.i = getelementptr inbounds nuw [15 x double], ptr @_ZZN4absl15random_internal12_GLOBAL__N_13POZEdE3kP2, i64 0, i64 %idxprom.i.i + %10 = load double, ptr %arrayidx1.i12.i, align 8 + %11 = tail call double @llvm.fma.f64(double %p.01.i11.i, double %sub.i, double %10) + %inc.i.i = add nuw nsw i32 %i.02.i.i, 1 + %exitcond.not.i13.i = icmp eq i32 %inc.i.i, 16 + br i1 %exitcond.not.i13.i, label %if.end11.i, label %for.body.i10.i, !llvm.loop !9 if.end11.i: ; preds = %for.body.i10.i, %_ZN4absl15random_internal12_GLOBAL__N_118EvaluatePolynomialIdLj9EEET_S3_RAT0__KS3_.exit.i, %if.end.i - %x.0.i = phi double [ %mul7.i, %_ZN4absl15random_internal12_GLOBAL__N_118EvaluatePolynomialIdLj9EEET_S3_RAT0__KS3_.exit.i ], [ 1.000000e+00, %if.end.i ], [ %12, %for.body.i10.i ] + %x.0.i = phi double [ %mul7.i, %_ZN4absl15random_internal12_GLOBAL__N_118EvaluatePolynomialIdLj9EEET_S3_RAT0__KS3_.exit.i ], [ 1.000000e+00, %if.end.i ], [ %11, %for.body.i10.i ] %cmp12.i = fcmp olt double %call30, 0.000000e+00 - %13 = fneg double %x.0.i - %cond.in.p.i = select i1 %cmp12.i, double %x.0.i, double %13 + %12 = fneg double %x.0.i + %cond.in.p.i = select i1 %cmp12.i, double %x.0.i, double %12 %cond.in.i = fadd double %cond.in.p.i, 1.000000e+00 %cond.i50 = fmul double %cond.in.i, 5.000000e-01 - %14 = fmul double %cond.i50, 2.000000e+00 + %13 = fmul double %cond.i50, 2.000000e+00 br label %cond.end cond.end: ; preds = %if.end11.i, %cond.false, %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit" - %cond = phi double [ %cond.i, %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit" ], [ %14, %if.end11.i ], [ 1.000000e+00, %cond.false ] + %cond = phi double [ %cond.i, %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit" ], [ %13, %if.end11.i ], [ 1.000000e+00, %cond.false ] %cmp34 = icmp slt i32 %dof, 3 br i1 %cmp34, label %return, label %if.end36 if.end36: ; preds = %cond.end - %15 = add nsw i32 %dof, -1 - %sub38 = uitofp nneg i32 %15 to double + %14 = add nsw i32 %dof, -1 + %sub38 = uitofp nneg i32 %14 to double %mul39 = fmul double %sub38, 5.000000e-01 %cond42 = select i1 %tobool.not, double 1.000000e+00, double 5.000000e-01 br i1 %cmp.i, label %if.then44, label %if.end55 @@ -266,8 +267,8 @@ while.body: ; preds = %while.body.preheade %s.070 = phi double [ %add53, %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit61" ], [ %cond, %while.body.preheader ] %call49 = tail call double @log(double noundef %z40.071) #9 %add = fadd double %e.072, %call49 - %16 = tail call double @llvm.fmuladd.f64(double %call47, double %z40.071, double %fneg27) - %sub51 = fsub double %16, %add + %15 = tail call double @llvm.fmuladd.f64(double %call47, double %z40.071, double %fneg27) + %sub51 = fsub double %15, %add %cmp.i57 = fcmp olt double %sub51, -2.000000e+01 br i1 %cmp.i57, label %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit61", label %cond.false.i58 @@ -308,11 +309,11 @@ while.body67: ; preds = %cond.end62, %while. while.end72: ; preds = %while.body67, %cond.end62 %c64.0.lcssa = phi double [ 0.000000e+00, %cond.end62 ], [ %add70, %while.body67 ] - %17 = tail call double @llvm.fmuladd.f64(double %c64.0.lcssa, double %cond.i, double %cond) + %16 = tail call double @llvm.fmuladd.f64(double %c64.0.lcssa, double %cond.i, double %cond) br label %return return: ; preds = %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit61", %if.then44, %cond.end, %if.end22, %if.end19, %if.else, %while.end72, %_ZN4absl15random_internal12_GLOBAL__N_115normal_survivalEd.exit47, %_ZN4absl15random_internal12_GLOBAL__N_115normal_survivalEd.exit - %retval.0 = phi double [ %div.i, %_ZN4absl15random_internal12_GLOBAL__N_115normal_survivalEd.exit ], [ %sub17, %_ZN4absl15random_internal12_GLOBAL__N_115normal_survivalEd.exit47 ], [ %17, %while.end72 ], [ 5.000000e-01, %if.else ], [ 1.000000e+00, %if.end19 ], [ 0.000000e+00, %if.end22 ], [ %cond, %cond.end ], [ %cond, %if.then44 ], [ %add53, %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit61" ] + %retval.0 = phi double [ %div.i, %_ZN4absl15random_internal12_GLOBAL__N_115normal_survivalEd.exit ], [ %sub17, %_ZN4absl15random_internal12_GLOBAL__N_115normal_survivalEd.exit47 ], [ %16, %while.end72 ], [ 5.000000e-01, %if.else ], [ 1.000000e+00, %if.end19 ], [ 0.000000e+00, %if.end22 ], [ %cond, %cond.end ], [ %cond, %if.then44 ], [ %add53, %"_ZZN4absl15random_internal15ChiSquarePValueEdiENK3$_0clEd.exit61" ] ret double %retval.0 } diff --git a/bench/abseil-cpp/optimized/int128_test.cc.ll b/bench/abseil-cpp/optimized/int128_test.cc.ll index 6d46bb281d9..0ba3559d45a 100644 --- a/bench/abseil-cpp/optimized/int128_test.cc.ll +++ b/bench/abseil-cpp/optimized/int128_test.cc.ll @@ -37972,10 +37972,11 @@ entry: br label %for.body4.lr.ph for.body4.lr.ph: ; preds = %for.inc265, %entry - %indvars.iv = phi i32 [ 127, %entry ], [ %indvars.iv.next, %for.inc265 ] %storemerge2802 = phi i32 [ 0, %entry ], [ %inc266, %for.inc265 ] + %sub = xor i32 %storemerge2802, 127 %sh_prom.i = zext nneg i32 %storemerge2802 to i128 %shl.i.neg = shl nsw i128 -1, %sh_prom.i + %umax = call i32 @llvm.umax.i32(i32 %sub, i32 1) br label %for.body4 for.body4: ; preds = %for.body4.lr.ph, %_ZN7testing15AssertionResultD2Ev.exit721 @@ -39065,7 +39066,7 @@ _ZN7testing15AssertionResultD2Ev.exit721: ; preds = %if.end262, %_ZNKSt1 store ptr null, ptr %message_.i.i702, align 8 call void @_ZN7testing11ScopedTraceD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %gtest_trace_899) #24 %inc = add nuw nsw i32 %storemerge1502801, 1 - %exitcond.not = icmp eq i32 %inc, %indvars.iv + %exitcond.not = icmp eq i32 %inc, %umax br i1 %exitcond.not, label %for.inc265, label %for.body4, !llvm.loop !828 ehcleanup263: ; preds = %_ZN7testing7MessageD2Ev.exit717, %lpad251 @@ -39080,7 +39081,6 @@ ehcleanup264: ; preds = %ehcleanup263, %ehcl for.inc265: ; preds = %_ZN7testing15AssertionResultD2Ev.exit721 %inc266 = add nuw nsw i32 %storemerge2802, 1 - %indvars.iv.next = add nsw i32 %indvars.iv, -1 %exitcond2808.not = icmp eq i32 %inc266, 64 br i1 %exitcond2808.not, label %for.end267, label %for.body4.lr.ph, !llvm.loop !829 @@ -92167,6 +92167,9 @@ declare void @llvm.assume(i1 noundef) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fabs.f64(double) #22 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umax.i32(i32, i32) #22 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/abseil-cpp/optimized/str_split_test.cc.ll b/bench/abseil-cpp/optimized/str_split_test.cc.ll index e0a39ce5802..1ae06291829 100644 --- a/bench/abseil-cpp/optimized/str_split_test.cc.ll +++ b/bench/abseil-cpp/optimized/str_split_test.cc.ll @@ -31579,7 +31579,7 @@ _ZNK4absl16strings_internal8SplitterINS_6ByCharENS_10AllowEmptyESt17basic_string %add.ptr15.i.i.i = getelementptr inbounds nuw i8, ptr @.str.159, i64 %2 %sub.ptr.rhs.cast.i.i.i = ptrtoint ptr %add.ptr15.i.i.i to i64 %sub.ptr.sub.i.i.i = sub i64 %sub.ptr.lhs.cast.i.i.i, %sub.ptr.rhs.cast.i.i.i - %sub.i.i.i.i = sub nuw nsw i64 3, %2 + %sub.i.i.i.i = xor i64 %2, 3 %.sroa.speculated.i.i.i.i = call i64 @llvm.umin.i64(i64 %sub.i.i.i.i, i64 %sub.ptr.sub.i.i.i) store i64 %.sroa.speculated.i.i.i.i, ptr %curr_.i.i, align 8, !alias.scope !571 %ref.tmp.sroa.2.0.curr_.sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %it, i64 24 @@ -72600,7 +72600,7 @@ if.then7: ; preds = %if.then br i1 %cmp14, label %if.then15, label %if.end53 if.then15: ; preds = %if.then7 - %sub18 = sub nuw nsw i8 15, %5 + %sub18 = xor i8 %5, 15 %6 = load i32, ptr %position_, align 4 %conv20 = and i32 %6, 255 %cmp21 = icmp samesign ult i32 %conv20, 15 @@ -72649,7 +72649,7 @@ if.then59: ; preds = %if.end53 br i1 %cmp67, label %if.then68, label %if.end108 if.then68: ; preds = %if.then59 - %sub72 = sub nuw nsw i8 15, %12 + %sub72 = xor i8 %12, 15 %13 = load i32, ptr %position_, align 4 %cmp75 = icmp sgt i32 %13, 0 %14 = zext i1 %cmp75 to i8 @@ -76177,7 +76177,7 @@ if.then7: ; preds = %if.then br i1 %cmp14, label %if.then15, label %if.end53 if.then15: ; preds = %if.then7 - %sub18 = sub nuw nsw i8 7, %5 + %sub18 = xor i8 %5, 7 %6 = load i32, ptr %position_, align 4 %conv20 = and i32 %6, 255 %cmp21 = icmp samesign ult i32 %conv20, 7 @@ -76226,7 +76226,7 @@ if.then59: ; preds = %if.end53 br i1 %cmp67, label %if.then68, label %if.end108 if.then68: ; preds = %if.then59 - %sub72 = sub nuw nsw i8 7, %12 + %sub72 = xor i8 %12, 7 %13 = load i32, ptr %position_, align 4 %cmp75 = icmp sgt i32 %13, 0 %14 = zext i1 %cmp75 to i8 @@ -79557,7 +79557,7 @@ if.then7: ; preds = %if.then br i1 %cmp14, label %if.then15, label %if.end53 if.then15: ; preds = %if.then7 - %sub18 = sub nuw nsw i8 15, %5 + %sub18 = xor i8 %5, 15 %6 = load i32, ptr %position_, align 4 %conv20 = and i32 %6, 255 %cmp21 = icmp samesign ult i32 %conv20, 15 @@ -79606,7 +79606,7 @@ if.then59: ; preds = %if.end53 br i1 %cmp67, label %if.then68, label %if.end108 if.then68: ; preds = %if.then59 - %sub72 = sub nuw nsw i8 15, %12 + %sub72 = xor i8 %12, 15 %13 = load i32, ptr %position_, align 4 %cmp75 = icmp sgt i32 %13, 0 %14 = zext i1 %cmp75 to i8 @@ -83126,7 +83126,7 @@ if.then7: ; preds = %if.then br i1 %cmp14, label %if.then15, label %if.end53 if.then15: ; preds = %if.then7 - %sub18 = sub nuw nsw i8 7, %5 + %sub18 = xor i8 %5, 7 %6 = load i32, ptr %position_, align 4 %conv20 = and i32 %6, 255 %cmp21 = icmp samesign ult i32 %conv20, 7 @@ -83175,7 +83175,7 @@ if.then59: ; preds = %if.end53 br i1 %cmp67, label %if.then68, label %if.end108 if.then68: ; preds = %if.then59 - %sub72 = sub nuw nsw i8 7, %12 + %sub72 = xor i8 %12, 7 %13 = load i32, ptr %position_, align 4 %cmp75 = icmp sgt i32 %13, 0 %14 = zext i1 %cmp75 to i8 @@ -110690,7 +110690,7 @@ if.then7: ; preds = %if.then br i1 %cmp14, label %if.then15, label %if.end53 if.then15: ; preds = %if.then7 - %sub18 = sub nuw nsw i8 7, %5 + %sub18 = xor i8 %5, 7 %6 = load i32, ptr %position_, align 4 %conv20 = and i32 %6, 255 %cmp21 = icmp samesign ult i32 %conv20, 7 @@ -110739,7 +110739,7 @@ if.then59: ; preds = %if.end53 br i1 %cmp67, label %if.then68, label %if.end108 if.then68: ; preds = %if.then59 - %sub72 = sub nuw nsw i8 7, %12 + %sub72 = xor i8 %12, 7 %13 = load i32, ptr %position_, align 4 %cmp75 = icmp sgt i32 %13, 0 %14 = zext i1 %cmp75 to i8 @@ -124017,7 +124017,7 @@ if.then7: ; preds = %if.then br i1 %cmp14, label %if.then15, label %if.end53 if.then15: ; preds = %if.then7 - %sub18 = sub nuw nsw i8 7, %5 + %sub18 = xor i8 %5, 7 %6 = load i32, ptr %position_, align 4 %conv20 = and i32 %6, 255 %cmp21 = icmp samesign ult i32 %conv20, 7 @@ -124066,7 +124066,7 @@ if.then59: ; preds = %if.end53 br i1 %cmp67, label %if.then68, label %if.end108 if.then68: ; preds = %if.then59 - %sub72 = sub nuw nsw i8 7, %12 + %sub72 = xor i8 %12, 7 %13 = load i32, ptr %position_, align 4 %cmp75 = icmp sgt i32 %13, 0 %14 = zext i1 %cmp75 to i8 diff --git a/bench/actix-rs/optimized/1rfb1t3n8679w74r.ll b/bench/actix-rs/optimized/1rfb1t3n8679w74r.ll index c2bcb83eee7..3fabe62f196 100644 --- a/bench/actix-rs/optimized/1rfb1t3n8679w74r.ll +++ b/bench/actix-rs/optimized/1rfb1t3n8679w74r.ll @@ -5391,7 +5391,7 @@ define hidden void @_ZN4time10formatting22format_number_pad_zero17hc8e3981a7ebb6 "_ZN4itoa54_$LT$impl$u20$itoa..private..Sealed$u20$for$u20$u8$GT$5write17hab5db7216d2f3d64E.exit": ; preds = %19, %25 %.1.i = phi i64 [ %.01823.i, %25 ], [ 1, %19 ] - %27 = sub nuw nsw i64 3, %.1.i + %27 = xor i64 %.1.i, 3 %28 = getelementptr inbounds nuw i8, ptr %1, i64 16 %29 = load i64, ptr %28, align 8, !alias.scope !604, !noalias !615, !noundef !4 %30 = load i64, ptr %1, align 8, !alias.scope !604, !noalias !615, !noundef !4 diff --git a/bench/arrow/optimized/basic_decimal.cc.ll b/bench/arrow/optimized/basic_decimal.cc.ll index ed946d8bf6c..b14cb7a092b 100644 --- a/bench/arrow/optimized/basic_decimal.cc.ll +++ b/bench/arrow/optimized/basic_decimal.cc.ll @@ -2258,7 +2258,7 @@ for.body.preheader: ; preds = %for.body.lr.ph %add.neg = xor i32 %div19, -1 %1 = sext i32 %add.neg to i64 %2 = zext nneg i32 %div19 to i64 - %3 = sub nuw nsw i64 3, %2 + %3 = xor i64 %2, 3 %arrayidx.i.i.i48 = getelementptr inbounds nuw [4 x i64], ptr %this, i64 0, i64 %3 %4 = load i64, ptr %arrayidx.i.i.i48, align 8 %arrayidx.i.i.i2049 = getelementptr inbounds nuw i8, ptr %this, i64 24 @@ -2382,29 +2382,30 @@ for.body.us.preheader: ; preds = %for.body.lr.ph %7 = zext nneg i32 %6 to i64 %scevgep = getelementptr i8, ptr %array_le, i64 %7 %8 = shl nuw nsw i32 %div14, 3 - %narrow = sub nuw nsw i32 32, %8 - %9 = zext nneg i32 %narrow to i64 - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %shifted_le, ptr align 8 %scevgep, i64 %9, i1 false) + %9 = xor i32 %8, 24 + %narrow = add nuw nsw i32 %9, 8 + %10 = zext nneg i32 %narrow to i64 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %shifted_le, ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i64 %10, i1 false) br label %for.end for.body: ; preds = %for.body.preheader, %cond.end %indvars.iv = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next.pre-phi, %cond.end ] %arrayidx.i.i21 = getelementptr inbounds nuw [4 x i64], ptr %array_le, i64 0, i64 %indvars.iv - %10 = load i64, ptr %arrayidx.i.i21, align 8 - %shr8 = lshr i64 %10, %sh_prom - %11 = sub nuw nsw i64 %indvars.iv, %3 - %arrayidx.i.i22 = getelementptr inbounds [4 x i64], ptr %shifted_le, i64 0, i64 %11 + %11 = load i64, ptr %arrayidx.i.i21, align 8 + %shr8 = lshr i64 %11, %sh_prom + %12 = sub nuw nsw i64 %indvars.iv, %3 + %arrayidx.i.i22 = getelementptr inbounds [4 x i64], ptr %shifted_le, i64 0, i64 %12 %cmp13.not = icmp eq i64 %indvars.iv, 3 br i1 %cmp13.not, label %cond.end, label %cond.true cond.true: ; preds = %for.body - %12 = add nuw nsw i64 %indvars.iv, 1 - %arrayidx.i.i23 = getelementptr inbounds nuw [4 x i64], ptr %array_le, i64 0, i64 %12 + %13 = add nuw nsw i64 %indvars.iv, 1 + %arrayidx.i.i23 = getelementptr inbounds nuw [4 x i64], ptr %array_le, i64 0, i64 %13 %cond.in.sroa.speculate.load.cond.true = load i64, ptr %arrayidx.i.i23, align 8 br label %cond.end cond.end: ; preds = %for.body, %cond.true - %indvars.iv.next.pre-phi = phi i64 [ %12, %cond.true ], [ 4, %for.body ] + %indvars.iv.next.pre-phi = phi i64 [ %13, %cond.true ], [ 4, %for.body ] %cond.in.sroa.speculated = phi i64 [ %cond.in.sroa.speculate.load.cond.true, %cond.true ], [ %shr, %for.body ] %shl = shl i64 %cond.in.sroa.speculated, %sh_prom18 %or = or i64 %shl, %shr8 diff --git a/bench/arrow/optimized/scalar.cc.ll b/bench/arrow/optimized/scalar.cc.ll index 5a91d8339df..a50228bef24 100644 --- a/bench/arrow/optimized/scalar.cc.ll +++ b/bench/arrow/optimized/scalar.cc.ll @@ -23255,20 +23255,31 @@ entry: sw.bb: ; preds = %entry %cmp = icmp ugt i64 %length, 3 - br i1 %cmp, label %return, label %sw.epilog + br i1 %cmp, label %return, label %if.end + +if.end: ; preds = %sw.bb + %sub = xor i64 %length, 3 + br label %sw.epilog sw.bb5: ; preds = %entry %cmp6 = icmp ugt i64 %length, 6 - br i1 %cmp6, label %return, label %sw.epilog + br i1 %cmp6, label %return, label %if.end10 + +if.end10: ; preds = %sw.bb5 + %sub13 = sub nuw nsw i64 6, %length + br label %sw.epilog sw.bb15: ; preds = %entry %cmp16 = icmp ugt i64 %length, 9 - br i1 %cmp16, label %return, label %sw.epilog + br i1 %cmp16, label %return, label %if.end20 + +if.end20: ; preds = %sw.bb15 + %sub23 = sub nuw nsw i64 9, %length + br label %sw.epilog -sw.epilog: ; preds = %sw.bb15, %sw.bb5, %sw.bb - %.pn = phi i64 [ 3, %sw.bb ], [ 6, %sw.bb5 ], [ 9, %sw.bb15 ] - %omitted.0 = sub nuw nsw i64 %.pn, %length - %cmp25 = icmp eq i64 %.pn, %length +sw.epilog: ; preds = %if.end20, %if.end10, %if.end + %omitted.0 = phi i64 [ %sub, %if.end ], [ %sub13, %if.end10 ], [ %sub23, %if.end20 ] + %cmp25 = icmp eq i64 %omitted.0, 0 br i1 %cmp25, label %if.then28, label %if.else if.then28: ; preds = %sw.epilog diff --git a/bench/assimp/optimized/BlenderScene.cpp.ll b/bench/assimp/optimized/BlenderScene.cpp.ll index a2c888588cd..e5acf7a1cd8 100644 --- a/bench/assimp/optimized/BlenderScene.cpp.ll +++ b/bench/assimp/optimized/BlenderScene.cpp.ll @@ -3246,7 +3246,7 @@ invoke.cont.i.i: ; preds = %if.then.i.i unreachable common.resume: ; preds = %catch.dispatch, %lpad65, %lpad.i.i - %common.resume.op = phi { ptr, i32 } [ %17, %lpad.i.i ], [ %38, %lpad65 ], [ %.pn26, %catch.dispatch ] + %common.resume.op = phi { ptr, i32 } [ %17, %lpad.i.i ], [ %40, %lpad65 ], [ %.pn26, %catch.dispatch ] resume { ptr, i32 } %common.resume.op lpad.i.i: ; preds = %if.then.i.i @@ -3315,9 +3315,10 @@ for.body55.preheader: ; preds = %for.cond.preheader, %28 = zext nneg i32 %27 to i64 %scevgep66 = getelementptr i8, ptr %out, i64 %28 %29 = shl nuw nsw i32 %i.0.lcssa71, 4 - %narrow68 = sub nuw nsw i32 64, %29 - %30 = zext nneg i32 %narrow68 to i64 - call void @llvm.memset.p0.i64(ptr align 4 %scevgep66, i8 0, i64 %30, i1 false) + %30 = xor i32 %29, 48 + %narrow68 = add nuw nsw i32 %30, 16 + %31 = zext nneg i32 %narrow68 to i64 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep66, i8 0, i64 %31, i1 false) br label %try.cont for.cond36.preheader: ; preds = %for.inc @@ -3326,14 +3327,15 @@ for.cond36.preheader: ; preds = %for.inc for.body39.preheader: ; preds = %for.cond23.preheader, %for.cond36.preheader %j.0.lcssa74 = phi i32 [ %inc, %for.cond36.preheader ], [ 0, %for.cond23.preheader ] - %31 = shl nuw nsw i32 %j.0.lcssa74, 2 - %32 = zext nneg i32 %31 to i64 - %33 = or disjoint i64 %25, %32 - %scevgep = getelementptr i8, ptr %out, i64 %33 - %34 = shl nuw nsw i32 %j.0.lcssa74, 2 - %narrow = sub nuw nsw i32 16, %34 - %35 = zext nneg i32 %narrow to i64 - call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %35, i1 false) + %32 = shl nuw nsw i32 %j.0.lcssa74, 2 + %33 = zext nneg i32 %32 to i64 + %34 = or disjoint i64 %25, %33 + %scevgep = getelementptr i8, ptr %out, i64 %34 + %35 = shl nuw nsw i32 %j.0.lcssa74, 2 + %36 = xor i32 %35, 12 + %narrow = add nuw nsw i32 %36, 4 + %37 = zext nneg i32 %narrow to i64 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %37, i1 false) br label %for.inc49 for.body31: ; preds = %for.cond23.preheader, %for.inc @@ -3346,30 +3348,30 @@ for.body31: ; preds = %for.cond23.preheade for.inc: ; preds = %for.body31 %inc = add nuw nsw i32 %j.054, 1 %conv24 = zext nneg i32 %inc to i64 - %36 = load i64, ptr %arrayidx26, align 8 - %.sroa.speculated = call i64 @llvm.umin.i64(i64 %36, i64 4) + %38 = load i64, ptr %arrayidx26, align 8 + %.sroa.speculated = call i64 @llvm.umin.i64(i64 %38, i64 4) %cmp30 = icmp samesign ugt i64 %.sroa.speculated, %conv24 br i1 %cmp30, label %for.body31, label %for.cond36.preheader, !llvm.loop !4 for.inc49: ; preds = %for.body39.preheader, %for.cond36.preheader %inc50 = add nuw nsw i32 %i.060, 1 %conv19 = zext nneg i32 %inc50 to i64 - %37 = load i64, ptr %array_sizes, align 8 - %.sroa.speculated48 = call i64 @llvm.umin.i64(i64 %37, i64 4) + %39 = load i64, ptr %array_sizes, align 8 + %.sroa.speculated48 = call i64 @llvm.umin.i64(i64 %39, i64 4) %cmp = icmp samesign ugt i64 %.sroa.speculated48, %conv19 br i1 %cmp, label %for.cond23.preheader, label %for.cond52.preheader, !llvm.loop !6 lpad65: ; preds = %call.i.noexc29, %catch - %38 = landingpad { ptr, i32 } + %40 = landingpad { ptr, i32 } cleanup invoke void @__cxa_end_catch() to label %common.resume unwind label %terminate.lpad terminate.lpad: ; preds = %lpad65 - %39 = landingpad { ptr, i32 } + %41 = landingpad { ptr, i32 } catch ptr null - %40 = extractvalue { ptr, i32 } %39, 0 - call void @__clang_call_terminate(ptr %40) #22 + %42 = extractvalue { ptr, i32 } %41, 0 + call void @__clang_call_terminate(ptr %42) #22 unreachable } @@ -8022,7 +8024,7 @@ invoke.cont.i.i: ; preds = %if.then.i.i unreachable common.resume: ; preds = %catch.dispatch, %lpad62, %lpad.i.i - %common.resume.op = phi { ptr, i32 } [ %17, %lpad.i.i ], [ %32, %lpad62 ], [ %.pn26, %catch.dispatch ] + %common.resume.op = phi { ptr, i32 } [ %17, %lpad.i.i ], [ %33, %lpad62 ], [ %.pn26, %catch.dispatch ] resume { ptr, i32 } %common.resume.op lpad.i.i: ; preds = %if.then.i.i @@ -8090,9 +8092,10 @@ for.body52.preheader: ; preds = %for.cond.preheader, %27 = zext nneg i32 %26 to i64 %scevgep = getelementptr i8, ptr %out, i64 %27 %28 = shl nuw nsw i32 %i.0.lcssa68, 3 - %narrow = sub nuw nsw i32 32, %28 - %29 = zext nneg i32 %narrow to i64 - call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %29, i1 false) + %29 = xor i32 %28, 24 + %narrow = add nuw nsw i32 %29, 8 + %30 = zext nneg i32 %narrow to i64 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %30, i1 false) br label %try.cont for.cond34.preheader: ; preds = %for.inc @@ -8114,8 +8117,8 @@ for.body29: ; preds = %for.cond22.preheade for.inc: ; preds = %for.body29 %inc = add nuw nsw i32 %j.051, 1 %conv23 = zext nneg i32 %inc to i64 - %30 = load i64, ptr %arrayidx25, align 8 - %.sroa.speculated = call i64 @llvm.umin.i64(i64 %30, i64 2) + %31 = load i64, ptr %arrayidx25, align 8 + %.sroa.speculated = call i64 @llvm.umin.i64(i64 %31, i64 2) %cmp28 = icmp samesign ugt i64 %.sroa.speculated, %conv23 br i1 %cmp28, label %for.body29, label %for.cond34.preheader, !llvm.loop !11 @@ -8132,22 +8135,22 @@ for.inc46.loopexit.critedge: ; preds = %for.inc46.loopexit. for.inc46: ; preds = %for.body37.preheader, %for.inc46.loopexit.critedge, %for.cond34.preheader %inc47 = add nuw nsw i32 %i.057, 1 %conv19 = zext nneg i32 %inc47 to i64 - %31 = load i64, ptr %array_sizes, align 8 - %.sroa.speculated45 = call i64 @llvm.umin.i64(i64 %31, i64 4) + %32 = load i64, ptr %array_sizes, align 8 + %.sroa.speculated45 = call i64 @llvm.umin.i64(i64 %32, i64 4) %cmp = icmp samesign ugt i64 %.sroa.speculated45, %conv19 br i1 %cmp, label %for.cond22.preheader, label %for.cond49.preheader, !llvm.loop !12 lpad62: ; preds = %catch - %32 = landingpad { ptr, i32 } + %33 = landingpad { ptr, i32 } cleanup invoke void @__cxa_end_catch() to label %common.resume unwind label %terminate.lpad terminate.lpad: ; preds = %lpad62 - %33 = landingpad { ptr, i32 } + %34 = landingpad { ptr, i32 } catch ptr null - %34 = extractvalue { ptr, i32 } %33, 0 - call void @__clang_call_terminate(ptr %34) #22 + %35 = extractvalue { ptr, i32 } %34, 0 + call void @__clang_call_terminate(ptr %35) #22 unreachable } @@ -8318,7 +8321,7 @@ invoke.cont.i.i: ; preds = %if.then.i.i unreachable common.resume: ; preds = %catch.dispatch, %lpad35, %lpad.i.i - %common.resume.op = phi { ptr, i32 } [ %17, %lpad.i.i ], [ %30, %lpad35 ], [ %.pn18, %catch.dispatch ] + %common.resume.op = phi { ptr, i32 } [ %17, %lpad.i.i ], [ %31, %lpad35 ], [ %.pn18, %catch.dispatch ] resume { ptr, i32 } %common.resume.op lpad.i.i: ; preds = %if.then.i.i @@ -8375,9 +8378,10 @@ for.body26.preheader: ; preds = %for.cond.preheader, %26 = zext nneg i32 %25 to i64 %scevgep = getelementptr i8, ptr %out, i64 %26 %27 = shl nuw nsw i32 %i.0.lcssa45, 2 - %narrow = sub nuw nsw i32 16, %27 - %28 = zext nneg i32 %narrow to i64 - call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %28, i1 false) + %28 = xor i32 %27, 12 + %narrow = add nuw nsw i32 %28, 4 + %29 = zext nneg i32 %narrow to i64 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %29, i1 false) br label %try.cont for.body: ; preds = %for.cond.preheader, %for.inc @@ -8390,22 +8394,22 @@ for.body: ; preds = %for.cond.preheader, for.inc: ; preds = %for.body %inc = add nuw nsw i32 %i.038, 1 %conv18 = zext nneg i32 %inc to i64 - %29 = load i64, ptr %array_sizes, align 8 - %.sroa.speculated = call i64 @llvm.umin.i64(i64 %29, i64 4) + %30 = load i64, ptr %array_sizes, align 8 + %.sroa.speculated = call i64 @llvm.umin.i64(i64 %30, i64 4) %cmp = icmp samesign ugt i64 %.sroa.speculated, %conv18 br i1 %cmp, label %for.body, label %for.cond23.preheader, !llvm.loop !13 lpad35: ; preds = %catch - %30 = landingpad { ptr, i32 } + %31 = landingpad { ptr, i32 } cleanup invoke void @__cxa_end_catch() to label %common.resume unwind label %terminate.lpad terminate.lpad: ; preds = %lpad35 - %31 = landingpad { ptr, i32 } + %32 = landingpad { ptr, i32 } catch ptr null - %32 = extractvalue { ptr, i32 } %31, 0 - call void @__clang_call_terminate(ptr %32) #22 + %33 = extractvalue { ptr, i32 } %32, 0 + call void @__clang_call_terminate(ptr %33) #22 unreachable } diff --git a/bench/assimp/optimized/clipper.cpp.ll b/bench/assimp/optimized/clipper.cpp.ll index b88c8299233..8b463af084c 100644 --- a/bench/assimp/optimized/clipper.cpp.ll +++ b/bench/assimp/optimized/clipper.cpp.ll @@ -830,7 +830,7 @@ if.then38: ; preds = %if.then34 br i1 %cmp76, label %if.then42, label %if.else if.then42: ; preds = %if.then38 - %sub = sub nuw nsw i32 1, %result.060 + %sub = xor i32 %result.060, 1 br label %if.end112 if.else: ; preds = %if.then38 @@ -852,8 +852,8 @@ if.end61: ; preds = %if.else %cmp62 = fcmp ogt double %7, 0.000000e+00 %8 = icmp sle i64 %ipNext.sroa.8.0.copyload, %ip.sroa.6.059 %cmp68 = xor i1 %8, %cmp62 - %sub70 = sub nuw nsw i32 1, %result.060 - %spec.select = select i1 %cmp68, i32 %sub70, i32 %result.060 + %sub70 = zext i1 %cmp68 to i32 + %spec.select = xor i32 %result.060, %sub70 br label %if.end112 if.else73: ; preds = %if.then34 @@ -878,8 +878,8 @@ if.end99: ; preds = %if.then77 %cmp100 = fcmp ogt double %10, 0.000000e+00 %11 = icmp sle i64 %ipNext.sroa.8.0.copyload, %ip.sroa.6.059 %cmp106 = xor i1 %11, %cmp100 - %sub108 = sub nuw nsw i32 1, %result.060 - %spec.select55 = select i1 %cmp106, i32 %sub108, i32 %result.060 + %sub108 = zext i1 %cmp106 to i32 + %spec.select55 = xor i32 %result.060, %sub108 br label %if.end112 if.end112: ; preds = %if.end99, %if.end61, %if.then42, %if.else73, %if.end24 @@ -961,7 +961,7 @@ if.then40: ; preds = %if.then35 br i1 %cmp91, label %if.then46, label %if.else if.then46: ; preds = %if.then40 - %sub = sub nuw nsw i32 1, %result.0 + %sub = xor i32 %result.0, 1 br label %if.end136 if.else: ; preds = %if.then40 @@ -983,8 +983,8 @@ if.end71: ; preds = %if.else %cmp72 = fcmp ogt double %14, 0.000000e+00 %15 = icmp sle i64 %3, %10 %cmp81 = xor i1 %15, %cmp72 - %sub83 = sub nuw nsw i32 1, %result.0 - %spec.select = select i1 %cmp81, i32 %sub83, i32 %result.0 + %sub83 = zext i1 %cmp81 to i32 + %spec.select = xor i32 %result.0, %sub83 br label %if.end136 if.else86: ; preds = %if.then35 @@ -1009,8 +1009,8 @@ if.end120: ; preds = %if.then92 %cmp121 = fcmp ogt double %17, 0.000000e+00 %18 = icmp sle i64 %3, %10 %cmp130 = xor i1 %18, %cmp121 - %sub132 = sub nuw nsw i32 1, %result.0 - %spec.select56 = select i1 %cmp130, i32 %sub132, i32 %result.0 + %sub132 = zext i1 %cmp130 to i32 + %spec.select56 = xor i32 %result.0, %sub132 br label %if.end136 if.end136: ; preds = %land.lhs.true.if.end22_crit_edge, %if.end120, %if.end71, %if.then46, %if.else86, %if.end22 @@ -10501,7 +10501,7 @@ if.then40.i: ; preds = %if.then35.i br i1 %cmp91.i, label %if.then46.i, label %if.else.i if.then46.i: ; preds = %if.then40.i - %sub.i92 = sub nuw nsw i32 1, %result.0.i + %sub.i92 = xor i32 %result.0.i, 1 br label %if.end136.i if.else.i: ; preds = %if.then40.i @@ -10523,8 +10523,8 @@ if.end71.i: ; preds = %if.else.i %cmp72.i = fcmp ogt double %38, 0.000000e+00 %39 = icmp sle i64 %30, %35 %cmp81.i = xor i1 %39, %cmp72.i - %sub83.i = sub nuw nsw i32 1, %result.0.i - %spec.select.i = select i1 %cmp81.i, i32 %sub83.i, i32 %result.0.i + %sub83.i = zext i1 %cmp81.i to i32 + %spec.select.i = xor i32 %result.0.i, %sub83.i br label %if.end136.i if.else86.i: ; preds = %if.then35.i @@ -10549,8 +10549,8 @@ if.end120.i: ; preds = %if.then92.i %cmp121.i = fcmp ogt double %41, 0.000000e+00 %42 = icmp sle i64 %30, %35 %cmp130.i = xor i1 %42, %cmp121.i - %sub132.i = sub nuw nsw i32 1, %result.0.i - %spec.select56.i = select i1 %cmp130.i, i32 %sub132.i, i32 %result.0.i + %sub132.i = zext i1 %cmp130.i to i32 + %spec.select56.i = xor i32 %result.0.i, %sub132.i br label %if.end136.i if.end136.i: ; preds = %land.lhs.true.i, %if.end120.i, %if.else86.i, %if.end71.i, %if.then46.i, %if.end22.i @@ -10645,7 +10645,7 @@ if.then40.i114: ; preds = %if.then35.i109 br i1 %cmp91.i113, label %if.then46.i135, label %if.else.i115 if.then46.i135: ; preds = %if.then40.i114 - %sub.i136 = sub nuw nsw i32 1, %result.0.i98 + %sub.i136 = xor i32 %result.0.i98, 1 br label %if.end136.i132 if.else.i115: ; preds = %if.then40.i114 @@ -10667,8 +10667,8 @@ if.end71.i127: ; preds = %if.else.i115 %cmp72.i128 = fcmp ogt double %57, 0.000000e+00 %58 = icmp sle i64 %49, %54 %cmp81.i129 = xor i1 %58, %cmp72.i128 - %sub83.i130 = sub nuw nsw i32 1, %result.0.i98 - %spec.select.i131 = select i1 %cmp81.i129, i32 %sub83.i130, i32 %result.0.i98 + %sub83.i130 = zext i1 %cmp81.i129 to i32 + %spec.select.i131 = xor i32 %result.0.i98, %sub83.i130 br label %if.end136.i132 if.else86.i137: ; preds = %if.then35.i109 @@ -10693,8 +10693,8 @@ if.end120.i149: ; preds = %if.then92.i138 %cmp121.i150 = fcmp ogt double %60, 0.000000e+00 %61 = icmp sle i64 %49, %54 %cmp130.i151 = xor i1 %61, %cmp121.i150 - %sub132.i152 = sub nuw nsw i32 1, %result.0.i98 - %spec.select56.i153 = select i1 %cmp130.i151, i32 %sub132.i152, i32 %result.0.i98 + %sub132.i152 = zext i1 %cmp130.i151 to i32 + %spec.select56.i153 = xor i32 %result.0.i98, %sub132.i152 br label %if.end136.i132 if.end136.i132: ; preds = %land.lhs.true.i160, %if.end120.i149, %if.else86.i137, %if.end71.i127, %if.then46.i135, %if.end22.i106 @@ -10851,7 +10851,7 @@ if.then40.i.i: ; preds = %if.then35.i.i br i1 %cmp91.i.i, label %if.then46.i.i, label %if.else.i.i86 if.then46.i.i: ; preds = %if.then40.i.i - %sub.i.i = sub nuw nsw i32 1, %result.0.i.i + %sub.i.i = xor i32 %result.0.i.i, 1 br label %if.end136.i.i if.else.i.i86: ; preds = %if.then40.i.i @@ -10873,8 +10873,8 @@ if.end71.i.i: ; preds = %if.else.i.i86 %cmp72.i.i = fcmp ogt double %89, 0.000000e+00 %90 = icmp sle i64 %81, %86 %cmp81.i.i = xor i1 %90, %cmp72.i.i - %sub83.i.i = sub nuw nsw i32 1, %result.0.i.i - %spec.select.i.i = select i1 %cmp81.i.i, i32 %sub83.i.i, i32 %result.0.i.i + %sub83.i.i = zext i1 %cmp81.i.i to i32 + %spec.select.i.i = xor i32 %result.0.i.i, %sub83.i.i br label %if.end136.i.i if.else86.i.i: ; preds = %if.then35.i.i @@ -10899,8 +10899,8 @@ if.end120.i.i: ; preds = %if.then92.i.i %cmp121.i.i = fcmp ogt double %92, 0.000000e+00 %93 = icmp sle i64 %81, %86 %cmp130.i.i = xor i1 %93, %cmp121.i.i - %sub132.i.i = sub nuw nsw i32 1, %result.0.i.i - %spec.select56.i.i = select i1 %cmp130.i.i, i32 %sub132.i.i, i32 %result.0.i.i + %sub132.i.i = zext i1 %cmp130.i.i to i32 + %spec.select56.i.i = xor i32 %result.0.i.i, %sub132.i.i br label %if.end136.i.i if.end136.i.i: ; preds = %if.end120.i.i, %if.else86.i.i, %if.end71.i.i, %if.then46.i.i, %if.end22.i.i, %land.lhs.true.i.i @@ -18015,7 +18015,7 @@ if.then40.i: ; preds = %if.then35.i br i1 %cmp91.i, label %if.then46.i, label %if.else.i if.then46.i: ; preds = %if.then40.i - %sub.i = sub nuw nsw i32 1, %result.0.i + %sub.i = xor i32 %result.0.i, 1 br label %if.end136.i if.else.i: ; preds = %if.then40.i @@ -18037,8 +18037,8 @@ if.end71.i: ; preds = %if.else.i %cmp72.i = fcmp ogt double %20, 0.000000e+00 %21 = icmp sle i64 %12, %17 %cmp81.i = xor i1 %21, %cmp72.i - %sub83.i = sub nuw nsw i32 1, %result.0.i - %spec.select.i = select i1 %cmp81.i, i32 %sub83.i, i32 %result.0.i + %sub83.i = zext i1 %cmp81.i to i32 + %spec.select.i = xor i32 %result.0.i, %sub83.i br label %if.end136.i if.else86.i: ; preds = %if.then35.i @@ -18063,8 +18063,8 @@ if.end120.i: ; preds = %if.then92.i %cmp121.i = fcmp ogt double %23, 0.000000e+00 %24 = icmp sle i64 %12, %17 %cmp130.i = xor i1 %24, %cmp121.i - %sub132.i = sub nuw nsw i32 1, %result.0.i - %spec.select56.i = select i1 %cmp130.i, i32 %sub132.i, i32 %result.0.i + %sub132.i = zext i1 %cmp130.i to i32 + %spec.select56.i = xor i32 %result.0.i, %sub132.i br label %if.end136.i if.end136.i: ; preds = %land.lhs.true.i, %if.end120.i, %if.else86.i, %if.end71.i, %if.then46.i, %if.end22.i @@ -18238,7 +18238,7 @@ if.then40.i: ; preds = %if.then35.i br i1 %cmp91.i, label %if.then46.i, label %if.else.i if.then46.i: ; preds = %if.then40.i - %sub.i = sub nuw nsw i32 1, %result.0.i + %sub.i = xor i32 %result.0.i, 1 br label %if.end136.i if.else.i: ; preds = %if.then40.i @@ -18260,8 +18260,8 @@ if.end71.i: ; preds = %if.else.i %cmp72.i = fcmp ogt double %21, 0.000000e+00 %22 = icmp sle i64 %13, %18 %cmp81.i = xor i1 %22, %cmp72.i - %sub83.i = sub nuw nsw i32 1, %result.0.i - %spec.select.i = select i1 %cmp81.i, i32 %sub83.i, i32 %result.0.i + %sub83.i = zext i1 %cmp81.i to i32 + %spec.select.i = xor i32 %result.0.i, %sub83.i br label %if.end136.i if.else86.i: ; preds = %if.then35.i @@ -18286,8 +18286,8 @@ if.end120.i: ; preds = %if.then92.i %cmp121.i = fcmp ogt double %24, 0.000000e+00 %25 = icmp sle i64 %13, %18 %cmp130.i = xor i1 %25, %cmp121.i - %sub132.i = sub nuw nsw i32 1, %result.0.i - %spec.select56.i = select i1 %cmp130.i, i32 %sub132.i, i32 %result.0.i + %sub132.i = zext i1 %cmp130.i to i32 + %spec.select56.i = xor i32 %result.0.i, %sub132.i br label %if.end136.i if.end136.i: ; preds = %land.lhs.true.i, %if.end120.i, %if.else86.i, %if.end71.i, %if.then46.i, %if.end22.i @@ -18372,7 +18372,7 @@ if.then40.i65: ; preds = %if.then35.i60 br i1 %cmp91.i64, label %if.then46.i86, label %if.else.i66 if.then46.i86: ; preds = %if.then40.i65 - %sub.i87 = sub nuw nsw i32 1, %result.0.i49 + %sub.i87 = xor i32 %result.0.i49, 1 br label %if.end136.i83 if.else.i66: ; preds = %if.then40.i65 @@ -18394,8 +18394,8 @@ if.end71.i78: ; preds = %if.else.i66 %cmp72.i79 = fcmp ogt double %39, 0.000000e+00 %40 = icmp sle i64 %31, %36 %cmp81.i80 = xor i1 %40, %cmp72.i79 - %sub83.i81 = sub nuw nsw i32 1, %result.0.i49 - %spec.select.i82 = select i1 %cmp81.i80, i32 %sub83.i81, i32 %result.0.i49 + %sub83.i81 = zext i1 %cmp81.i80 to i32 + %spec.select.i82 = xor i32 %result.0.i49, %sub83.i81 br label %if.end136.i83 if.else86.i88: ; preds = %if.then35.i60 @@ -18420,8 +18420,8 @@ if.end120.i100: ; preds = %if.then92.i89 %cmp121.i101 = fcmp ogt double %42, 0.000000e+00 %43 = icmp sle i64 %31, %36 %cmp130.i102 = xor i1 %43, %cmp121.i101 - %sub132.i103 = sub nuw nsw i32 1, %result.0.i49 - %spec.select56.i104 = select i1 %cmp130.i102, i32 %sub132.i103, i32 %result.0.i49 + %sub132.i103 = zext i1 %cmp130.i102 to i32 + %spec.select56.i104 = xor i32 %result.0.i49, %sub132.i103 br label %if.end136.i83 if.end136.i83: ; preds = %land.lhs.true.i111, %if.end120.i100, %if.else86.i88, %if.end71.i78, %if.then46.i86, %if.end22.i57 diff --git a/bench/bullet3/optimized/b3GjkEpa.ll b/bench/bullet3/optimized/b3GjkEpa.ll index f8b03ae047c..800273b464f 100644 --- a/bench/bullet3/optimized/b3GjkEpa.ll +++ b/bench/bullet3/optimized/b3GjkEpa.ll @@ -1086,9 +1086,10 @@ sw.bb: ; preds = %entry for.body.i.i: ; preds = %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i, %sw.bb %0 = phi i32 [ 0, %sw.bb ], [ %inc.i.i.i, %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] %1 = phi ptr [ null, %sw.bb ], [ %arrayidx.i.i, %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] - %indvars.iv.i.i = phi i64 [ 0, %sw.bb ], [ %indvars.iv.next.i.i, %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] - %2 = sub nuw nsw i64 127, %indvars.iv.i.i - %arrayidx.i.i = getelementptr inbounds nuw [128 x %"struct.gjkepa2_impl2::b3EPA::sFace"], ptr %m_fc_store.i.i, i64 0, i64 %2 + %i.03.i.i = phi i32 [ 0, %sw.bb ], [ %inc.i.i, %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] + %sub3.i.i = xor i32 %i.03.i.i, 127 + %idxprom.i.i = zext nneg i32 %sub3.i.i to i64 + %arrayidx.i.i = getelementptr inbounds nuw [128 x %"struct.gjkepa2_impl2::b3EPA::sFace"], ptr %m_fc_store.i.i, i64 0, i64 %idxprom.i.i %l.i.i.i = getelementptr inbounds nuw i8, ptr %arrayidx.i.i, i64 72 store ptr null, ptr %l.i.i.i, align 8 %arrayidx2.i.i.i = getelementptr inbounds nuw i8, ptr %arrayidx.i.i, i64 80 @@ -1103,52 +1104,52 @@ if.then.i.i.i: ; preds = %for.body.i.i br label %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i _ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i: ; preds = %if.then.i.i.i, %for.body.i.i - %3 = phi i32 [ %.pre.i, %if.then.i.i.i ], [ %0, %for.body.i.i ] + %2 = phi i32 [ %.pre.i, %if.then.i.i.i ], [ %0, %for.body.i.i ] store ptr %arrayidx.i.i, ptr %m_stock.i, align 8 - %inc.i.i.i = add i32 %3, 1 + %inc.i.i.i = add i32 %2, 1 store i32 %inc.i.i.i, ptr %count.i1.i, align 16 - %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %indvars.iv.next.i.i, 128 + %inc.i.i = add nuw nsw i32 %i.03.i.i, 1 + %exitcond.not.i.i = icmp eq i32 %inc.i.i, 128 br i1 %exitcond.not.i.i, label %_ZN13gjkepa2_impl25b3EPAC2Ev.exit, label %for.body.i.i, !llvm.loop !20 _ZN13gjkepa2_impl25b3EPAC2Ev.exit: ; preds = %_ZN13gjkepa2_impl25b3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i - %4 = load float, ptr %guess, align 16 - %fneg.i = fneg float %4 + %3 = load float, ptr %guess, align 16 + %fneg.i = fneg float %3 %arrayidx1.i = getelementptr inbounds nuw i8, ptr %guess, i64 4 - %5 = load float, ptr %arrayidx1.i, align 4 - %fneg2.i = fneg float %5 + %4 = load float, ptr %arrayidx1.i, align 4 + %fneg2.i = fneg float %4 %arrayidx3.i = getelementptr inbounds nuw i8, ptr %guess, i64 8 - %6 = load float, ptr %arrayidx3.i, align 8 - %fneg4.i = fneg float %6 + %5 = load float, ptr %arrayidx3.i, align 8 + %fneg4.i = fneg float %5 %retval.sroa.0.0.vec.insert.i.i = insertelement <2 x float> poison, float %fneg.i, i64 0 %retval.sroa.0.4.vec.insert.i.i = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i.i, float %fneg2.i, i64 1 %retval.sroa.3.12.vec.insert.i.i = insertelement <2 x float> , float %fneg4.i, i64 0 store <2 x float> %retval.sroa.0.4.vec.insert.i.i, ptr %ref.tmp, align 16 - %7 = getelementptr inbounds nuw i8, ptr %ref.tmp, i64 8 - store <2 x float> %retval.sroa.3.12.vec.insert.i.i, ptr %7, align 8 + %6 = getelementptr inbounds nuw i8, ptr %ref.tmp, i64 8 + store <2 x float> %retval.sroa.3.12.vec.insert.i.i, ptr %6, align 8 %call3 = call noundef i32 @_ZN13gjkepa2_impl25b3EPA8EvaluateERNS_5b3GJKERK9b3Vector3(ptr noundef nonnull align 16 dereferenceable(14472) %epa, ptr noundef nonnull align 16 dereferenceable(484) %gjk, ptr noundef nonnull align 16 dereferenceable(16) %ref.tmp) %cmp.not = icmp eq i32 %call3, 9 br i1 %cmp.not, label %if.else, label %for.cond.preheader for.cond.preheader: ; preds = %_ZN13gjkepa2_impl25b3EPAC2Ev.exit %rank = getelementptr inbounds nuw i8, ptr %epa, i64 56 - %8 = load i32, ptr %rank, align 8 - %cmp793.not = icmp eq i32 %8, 0 + %7 = load i32, ptr %rank, align 8 + %cmp793.not = icmp eq i32 %7, 0 br i1 %cmp793.not, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %for.cond.preheader %m_result = getelementptr inbounds nuw i8, ptr %epa, i64 8 %m_enableMargin.i.i = getelementptr inbounds nuw i8, ptr %shape, i64 128 - %9 = load i8, ptr %m_enableMargin.i.i, align 16 - %tobool.i.i = trunc i8 %9 to i1 - %10 = load ptr, ptr %shape, align 16 - %m_numVertices.i.i.i = getelementptr inbounds nuw i8, ptr %10, i64 76 - %11 = load i32, ptr %m_numVertices.i.i.i, align 4 - %cmp.i.i.i = icmp sgt i32 %11, 0 - %m_vertexOffset.i.i.i.i = getelementptr inbounds nuw i8, ptr %10, i64 80 + %8 = load i8, ptr %m_enableMargin.i.i, align 16 + %tobool.i.i = trunc i8 %8 to i1 + %9 = load ptr, ptr %shape, align 16 + %m_numVertices.i.i.i = getelementptr inbounds nuw i8, ptr %9, i64 76 + %10 = load i32, ptr %m_numVertices.i.i.i, align 4 + %cmp.i.i.i = icmp sgt i32 %10, 0 + %m_vertexOffset.i.i.i.i = getelementptr inbounds nuw i8, ptr %9, i64 80 %m_data.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %verticesB, i64 16 - %12 = load ptr, ptr %m_data.i.i.i.i.i, align 8 - %conv.i.i.i.i = zext nneg i32 %11 to i64 + %11 = load ptr, ptr %m_data.i.i.i.i.i, align 8 + %conv.i.i.i.i = zext nneg i32 %10 to i64 %p = getelementptr inbounds nuw i8, ptr %epa, i64 40 br i1 %tobool.i.i, label %for.body.lr.ph.split.us, label %for.body.lr.ph.split @@ -1156,14 +1157,14 @@ for.body.lr.ph.split.us: ; preds = %for.body.lr.ph br i1 %cmp.i.i.i, label %for.body.lr.ph.split.us.split.us, label %for.body.us.preheader for.body.us.preheader: ; preds = %for.body.lr.ph.split.us - %wide.trip.count150 = zext i32 %8 to i64 + %wide.trip.count150 = zext i32 %7 to i64 br label %for.body.us for.body.lr.ph.split.us.split.us: ; preds = %for.body.lr.ph.split.us - %13 = load i32, ptr %m_vertexOffset.i.i.i.i, align 16 - %idxprom.i.i.i.i.us.us = sext i32 %13 to i64 - %arrayidx.i.i.i.i.us.us = getelementptr inbounds %class.b3Vector3, ptr %12, i64 %idxprom.i.i.i.i.us.us - %wide.trip.count155 = zext i32 %8 to i64 + %12 = load i32, ptr %m_vertexOffset.i.i.i.i, align 16 + %idxprom.i.i.i.i.us.us = sext i32 %12 to i64 + %arrayidx.i.i.i.i.us.us = getelementptr inbounds %class.b3Vector3, ptr %11, i64 %idxprom.i.i.i.i.us.us + %wide.trip.count155 = zext i32 %7 to i64 br label %for.body.us.us for.body.us.us: ; preds = %return.sink.split.i.i.loopexit.us.us, %for.body.lr.ph.split.us.split.us @@ -1171,11 +1172,11 @@ for.body.us.us: ; preds = %return.sink.split.i %w0.sroa.9.095.us.us = phi <2 x float> [ %w0.sroa.9.8.vec.insert.us.us, %return.sink.split.i.i.loopexit.us.us ], [ zeroinitializer, %for.body.lr.ph.split.us.split.us ] %w0.sroa.0.094.us.us = phi <2 x float> [ %w0.sroa.0.4.vec.insert.us.us, %return.sink.split.i.i.loopexit.us.us ], [ zeroinitializer, %for.body.lr.ph.split.us.split.us ] %arrayidx.us.us = getelementptr inbounds nuw [4 x ptr], ptr %m_result, i64 0, i64 %indvars.iv152 - %14 = load ptr, ptr %arrayidx.us.us, align 8 - %scaled.sroa.0.0.copyload.i.i.i.us.us = load float, ptr %14, align 16 - %scaled.sroa.2.0.supportVec.sroa_idx.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %14, i64 4 + %13 = load ptr, ptr %arrayidx.us.us, align 8 + %scaled.sroa.0.0.copyload.i.i.i.us.us = load float, ptr %13, align 16 + %scaled.sroa.2.0.supportVec.sroa_idx.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %13, i64 4 %scaled.sroa.2.0.copyload.i.i.i.us.us = load float, ptr %scaled.sroa.2.0.supportVec.sroa_idx.i.i.i.us.us, align 4 - %scaled.sroa.3.0.supportVec.sroa_idx.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %14, i64 8 + %scaled.sroa.3.0.supportVec.sroa_idx.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %13, i64 8 %scaled.sroa.3.0.copyload.i.i.i.us.us = load float, ptr %scaled.sroa.3.0.supportVec.sroa_idx.i.i.i.us.us, align 8 br label %for.body.i.i.i.i.us.us @@ -1184,38 +1185,38 @@ for.body.i.i.i.i.us.us: ; preds = %for.body.i.i.i.i.us %maxDot.010.i.i.i.i.us.us = phi float [ 0xC7EFFFFFE0000000, %for.body.us.us ], [ %maxDot.1.i.i.i.i.us.us, %for.body.i.i.i.i.us.us ] %ptIndex.09.i.i.i.i.us.us = phi i32 [ -1, %for.body.us.us ], [ %ptIndex.1.i.i.i.i.us.us, %for.body.i.i.i.i.us.us ] %arrayidx.i5.i.i.i.us.us = getelementptr inbounds nuw %class.b3Vector3, ptr %arrayidx.i.i.i.i.us.us, i64 %indvars.iv.i.i.i.i.us.us - %15 = load float, ptr %arrayidx.i5.i.i.i.us.us, align 16 + %14 = load float, ptr %arrayidx.i5.i.i.i.us.us, align 16 %arrayidx3.i.i.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %arrayidx.i5.i.i.i.us.us, i64 4 - %16 = load float, ptr %arrayidx3.i.i.i.i.i.us.us, align 4 - %mul5.i.i.i.i.i.us.us = fmul float %scaled.sroa.2.0.copyload.i.i.i.us.us, %16 - %17 = call float @llvm.fmuladd.f32(float %15, float %scaled.sroa.0.0.copyload.i.i.i.us.us, float %mul5.i.i.i.i.i.us.us) + %15 = load float, ptr %arrayidx3.i.i.i.i.i.us.us, align 4 + %mul5.i.i.i.i.i.us.us = fmul float %scaled.sroa.2.0.copyload.i.i.i.us.us, %15 + %16 = call float @llvm.fmuladd.f32(float %14, float %scaled.sroa.0.0.copyload.i.i.i.us.us, float %mul5.i.i.i.i.i.us.us) %arrayidx6.i.i.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %arrayidx.i5.i.i.i.us.us, i64 8 - %18 = load float, ptr %arrayidx6.i.i.i.i.i.us.us, align 8 - %19 = call noundef float @llvm.fmuladd.f32(float %18, float %scaled.sroa.3.0.copyload.i.i.i.us.us, float %17) - %cmp2.i.i.i.i.us.us = fcmp ogt float %19, %maxDot.010.i.i.i.i.us.us - %20 = trunc nuw nsw i64 %indvars.iv.i.i.i.i.us.us to i32 - %ptIndex.1.i.i.i.i.us.us = select i1 %cmp2.i.i.i.i.us.us, i32 %20, i32 %ptIndex.09.i.i.i.i.us.us - %maxDot.1.i.i.i.i.us.us = select i1 %cmp2.i.i.i.i.us.us, float %19, float %maxDot.010.i.i.i.i.us.us + %17 = load float, ptr %arrayidx6.i.i.i.i.i.us.us, align 8 + %18 = call noundef float @llvm.fmuladd.f32(float %17, float %scaled.sroa.3.0.copyload.i.i.i.us.us, float %16) + %cmp2.i.i.i.i.us.us = fcmp ogt float %18, %maxDot.010.i.i.i.i.us.us + %19 = trunc nuw nsw i64 %indvars.iv.i.i.i.i.us.us to i32 + %ptIndex.1.i.i.i.i.us.us = select i1 %cmp2.i.i.i.i.us.us, i32 %19, i32 %ptIndex.09.i.i.i.i.us.us + %maxDot.1.i.i.i.i.us.us = select i1 %cmp2.i.i.i.i.us.us, float %18, float %maxDot.010.i.i.i.i.us.us %indvars.iv.next.i.i.i.i.us.us = add nuw nsw i64 %indvars.iv.i.i.i.i.us.us, 1 %exitcond.not.i.i.i.i.us.us = icmp eq i64 %indvars.iv.next.i.i.i.i.us.us, %conv.i.i.i.i br i1 %exitcond.not.i.i.i.i.us.us, label %return.sink.split.i.i.loopexit.us.us, label %for.body.i.i.i.i.us.us, !llvm.loop !5 return.sink.split.i.i.loopexit.us.us: ; preds = %for.body.i.i.i.i.us.us %spec.store.select.i.i.i.i.i.us.us = call i32 @llvm.smax.i32(i32 %ptIndex.1.i.i.i.i.us.us, i32 0) - %add.i.i.i.i.us.us = add nsw i32 %spec.store.select.i.i.i.i.i.us.us, %13 + %add.i.i.i.i.us.us = add nsw i32 %spec.store.select.i.i.i.i.i.us.us, %12 %idxprom.i7.i.i.i.i.us.us = sext i32 %add.i.i.i.i.us.us to i64 - %arrayidx.i8.i.i.i.i.us.us = getelementptr inbounds %class.b3Vector3, ptr %12, i64 %idxprom.i7.i.i.i.i.us.us + %arrayidx.i8.i.i.i.i.us.us = getelementptr inbounds %class.b3Vector3, ptr %11, i64 %idxprom.i7.i.i.i.i.us.us %retval.sroa.0.0.copyload.i.i.i.i.us.us = load <2 x float>, ptr %arrayidx.i8.i.i.i.i.us.us, align 16 %retval.sroa.3.0.call7.sroa_idx.i.i.i.i.us.us = getelementptr inbounds nuw i8, ptr %arrayidx.i8.i.i.i.i.us.us, i64 8 %retval.sroa.3.0.copyload.i.i.i.i.us.us = load <2 x float>, ptr %retval.sroa.3.0.call7.sroa_idx.i.i.i.i.us.us, align 8 %arrayidx16.us.us = getelementptr inbounds nuw [4 x float], ptr %p, i64 0, i64 %indvars.iv152 %ref.tmp9.sroa.0.0.vec.extract.us.us = extractelement <2 x float> %retval.sroa.0.0.copyload.i.i.i.i.us.us, i64 0 - %21 = load float, ptr %arrayidx16.us.us, align 4 - %mul.i.us.us = fmul float %21, %ref.tmp9.sroa.0.0.vec.extract.us.us + %20 = load float, ptr %arrayidx16.us.us, align 4 + %mul.i.us.us = fmul float %20, %ref.tmp9.sroa.0.0.vec.extract.us.us %ref.tmp9.sroa.0.4.vec.extract.us.us = extractelement <2 x float> %retval.sroa.0.0.copyload.i.i.i.i.us.us, i64 1 - %mul2.i.us.us = fmul float %21, %ref.tmp9.sroa.0.4.vec.extract.us.us + %mul2.i.us.us = fmul float %20, %ref.tmp9.sroa.0.4.vec.extract.us.us %ref.tmp9.sroa.3.8.vec.extract.us.us = extractelement <2 x float> %retval.sroa.3.0.copyload.i.i.i.i.us.us, i64 0 - %mul4.i.us.us = fmul float %21, %ref.tmp9.sroa.3.8.vec.extract.us.us + %mul4.i.us.us = fmul float %20, %ref.tmp9.sroa.3.8.vec.extract.us.us %w0.sroa.0.0.vec.extract.us.us = extractelement <2 x float> %w0.sroa.0.094.us.us, i64 0 %add.i.us.us = fadd float %w0.sroa.0.0.vec.extract.us.us, %mul.i.us.us %w0.sroa.0.0.vec.insert.us.us = insertelement <2 x float> poison, float %add.i.us.us, i64 0 @@ -1234,8 +1235,8 @@ for.body.us: ; preds = %for.body.us.prehead %w0.sroa.9.095.us = phi <2 x float> [ zeroinitializer, %for.body.us.preheader ], [ %w0.sroa.9.8.vec.insert.us, %for.body.us ] %w0.sroa.0.094.us = phi <2 x float> [ zeroinitializer, %for.body.us.preheader ], [ %w0.sroa.0.4.vec.insert.us, %for.body.us ] %arrayidx16.us = getelementptr inbounds nuw [4 x float], ptr %p, i64 0, i64 %indvars.iv147 - %22 = load float, ptr %arrayidx16.us, align 4 - %mul.i.us = fmul float %22, 0.000000e+00 + %21 = load float, ptr %arrayidx16.us, align 4 + %mul.i.us = fmul float %21, 0.000000e+00 %w0.sroa.0.0.vec.extract.us = extractelement <2 x float> %w0.sroa.0.094.us, i64 0 %add.i.us = fadd float %w0.sroa.0.0.vec.extract.us, %mul.i.us %w0.sroa.0.0.vec.insert.us = insertelement <2 x float> poison, float %add.i.us, i64 0 @@ -1253,14 +1254,14 @@ for.body.lr.ph.split: ; preds = %for.body.lr.ph br i1 %cmp.i.i.i, label %for.body.lr.ph.split.split.us, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph.split - %wide.trip.count = zext i32 %8 to i64 + %wide.trip.count = zext i32 %7 to i64 br label %for.body for.body.lr.ph.split.split.us: ; preds = %for.body.lr.ph.split - %23 = load i32, ptr %m_vertexOffset.i.i.i.i, align 16 - %idxprom.i.i.i.i.i.us = sext i32 %23 to i64 - %arrayidx.i.i.i.i.i.us = getelementptr inbounds %class.b3Vector3, ptr %12, i64 %idxprom.i.i.i.i.i.us - %wide.trip.count145 = zext i32 %8 to i64 + %22 = load i32, ptr %m_vertexOffset.i.i.i.i, align 16 + %idxprom.i.i.i.i.i.us = sext i32 %22 to i64 + %arrayidx.i.i.i.i.i.us = getelementptr inbounds %class.b3Vector3, ptr %11, i64 %idxprom.i.i.i.i.i.us + %wide.trip.count145 = zext i32 %7 to i64 br label %for.body.us99 for.body.us99: ; preds = %return.sink.split.i.i.loopexit92.us, %for.body.lr.ph.split.split.us @@ -1268,11 +1269,11 @@ for.body.us99: ; preds = %return.sink.split.i %w0.sroa.9.095.us101 = phi <2 x float> [ %w0.sroa.9.8.vec.insert.us122, %return.sink.split.i.i.loopexit92.us ], [ zeroinitializer, %for.body.lr.ph.split.split.us ] %w0.sroa.0.094.us102 = phi <2 x float> [ %w0.sroa.0.4.vec.insert.us119, %return.sink.split.i.i.loopexit92.us ], [ zeroinitializer, %for.body.lr.ph.split.split.us ] %arrayidx.us104 = getelementptr inbounds nuw [4 x ptr], ptr %m_result, i64 0, i64 %indvars.iv142 - %24 = load ptr, ptr %arrayidx.us104, align 8 - %scaled.sroa.0.0.copyload.i.i.i.i.us = load float, ptr %24, align 16 - %scaled.sroa.2.0.supportVec.sroa_idx.i.i.i.i.us = getelementptr inbounds nuw i8, ptr %24, i64 4 + %23 = load ptr, ptr %arrayidx.us104, align 8 + %scaled.sroa.0.0.copyload.i.i.i.i.us = load float, ptr %23, align 16 + %scaled.sroa.2.0.supportVec.sroa_idx.i.i.i.i.us = getelementptr inbounds nuw i8, ptr %23, i64 4 %scaled.sroa.2.0.copyload.i.i.i.i.us = load float, ptr %scaled.sroa.2.0.supportVec.sroa_idx.i.i.i.i.us, align 4 - %scaled.sroa.3.0.supportVec.sroa_idx.i.i.i.i.us = getelementptr inbounds nuw i8, ptr %24, i64 8 + %scaled.sroa.3.0.supportVec.sroa_idx.i.i.i.i.us = getelementptr inbounds nuw i8, ptr %23, i64 8 %scaled.sroa.3.0.copyload.i.i.i.i.us = load float, ptr %scaled.sroa.3.0.supportVec.sroa_idx.i.i.i.i.us, align 8 br label %for.body.i.i.i.i.i.us @@ -1281,38 +1282,38 @@ for.body.i.i.i.i.i.us: ; preds = %for.body.i.i.i.i.i. %maxDot.010.i.i.i.i.i.us = phi float [ 0xC7EFFFFFE0000000, %for.body.us99 ], [ %maxDot.1.i.i.i.i.i.us, %for.body.i.i.i.i.i.us ] %ptIndex.09.i.i.i.i.i.us = phi i32 [ -1, %for.body.us99 ], [ %ptIndex.1.i.i.i.i.i.us, %for.body.i.i.i.i.i.us ] %arrayidx.i5.i.i.i.i.us = getelementptr inbounds nuw %class.b3Vector3, ptr %arrayidx.i.i.i.i.i.us, i64 %indvars.iv.i.i.i.i.i.us - %25 = load float, ptr %arrayidx.i5.i.i.i.i.us, align 16 + %24 = load float, ptr %arrayidx.i5.i.i.i.i.us, align 16 %arrayidx3.i.i.i.i.i.i.us = getelementptr inbounds nuw i8, ptr %arrayidx.i5.i.i.i.i.us, i64 4 - %26 = load float, ptr %arrayidx3.i.i.i.i.i.i.us, align 4 - %mul5.i.i.i.i.i.i.us = fmul float %scaled.sroa.2.0.copyload.i.i.i.i.us, %26 - %27 = call float @llvm.fmuladd.f32(float %25, float %scaled.sroa.0.0.copyload.i.i.i.i.us, float %mul5.i.i.i.i.i.i.us) + %25 = load float, ptr %arrayidx3.i.i.i.i.i.i.us, align 4 + %mul5.i.i.i.i.i.i.us = fmul float %scaled.sroa.2.0.copyload.i.i.i.i.us, %25 + %26 = call float @llvm.fmuladd.f32(float %24, float %scaled.sroa.0.0.copyload.i.i.i.i.us, float %mul5.i.i.i.i.i.i.us) %arrayidx6.i.i.i.i.i.i.us = getelementptr inbounds nuw i8, ptr %arrayidx.i5.i.i.i.i.us, i64 8 - %28 = load float, ptr %arrayidx6.i.i.i.i.i.i.us, align 8 - %29 = call noundef float @llvm.fmuladd.f32(float %28, float %scaled.sroa.3.0.copyload.i.i.i.i.us, float %27) - %cmp2.i.i.i.i.i.us = fcmp ogt float %29, %maxDot.010.i.i.i.i.i.us - %30 = trunc nuw nsw i64 %indvars.iv.i.i.i.i.i.us to i32 - %ptIndex.1.i.i.i.i.i.us = select i1 %cmp2.i.i.i.i.i.us, i32 %30, i32 %ptIndex.09.i.i.i.i.i.us - %maxDot.1.i.i.i.i.i.us = select i1 %cmp2.i.i.i.i.i.us, float %29, float %maxDot.010.i.i.i.i.i.us + %27 = load float, ptr %arrayidx6.i.i.i.i.i.i.us, align 8 + %28 = call noundef float @llvm.fmuladd.f32(float %27, float %scaled.sroa.3.0.copyload.i.i.i.i.us, float %26) + %cmp2.i.i.i.i.i.us = fcmp ogt float %28, %maxDot.010.i.i.i.i.i.us + %29 = trunc nuw nsw i64 %indvars.iv.i.i.i.i.i.us to i32 + %ptIndex.1.i.i.i.i.i.us = select i1 %cmp2.i.i.i.i.i.us, i32 %29, i32 %ptIndex.09.i.i.i.i.i.us + %maxDot.1.i.i.i.i.i.us = select i1 %cmp2.i.i.i.i.i.us, float %28, float %maxDot.010.i.i.i.i.i.us %indvars.iv.next.i.i.i.i.i.us = add nuw nsw i64 %indvars.iv.i.i.i.i.i.us, 1 %exitcond.not.i.i.i.i.i.us = icmp eq i64 %indvars.iv.next.i.i.i.i.i.us, %conv.i.i.i.i br i1 %exitcond.not.i.i.i.i.i.us, label %return.sink.split.i.i.loopexit92.us, label %for.body.i.i.i.i.i.us, !llvm.loop !5 return.sink.split.i.i.loopexit92.us: ; preds = %for.body.i.i.i.i.i.us %spec.store.select.i.i.i.i.i.us125 = call i32 @llvm.smax.i32(i32 %ptIndex.1.i.i.i.i.i.us, i32 0) - %add.i.i.i.i.us126 = add nsw i32 %spec.store.select.i.i.i.i.i.us125, %23 + %add.i.i.i.i.us126 = add nsw i32 %spec.store.select.i.i.i.i.i.us125, %22 %idxprom.i7.i.i.i.i.us127 = sext i32 %add.i.i.i.i.us126 to i64 - %arrayidx.i8.i.i.i.i.us128 = getelementptr inbounds %class.b3Vector3, ptr %12, i64 %idxprom.i7.i.i.i.i.us127 + %arrayidx.i8.i.i.i.i.us128 = getelementptr inbounds %class.b3Vector3, ptr %11, i64 %idxprom.i7.i.i.i.i.us127 %retval.sroa.0.0.copyload.i.i.i.i.us129 = load <2 x float>, ptr %arrayidx.i8.i.i.i.i.us128, align 16 %retval.sroa.3.0.call7.sroa_idx.i.i.i.i.us130 = getelementptr inbounds nuw i8, ptr %arrayidx.i8.i.i.i.i.us128, i64 8 %retval.sroa.3.0.copyload.i.i.i.i.us131 = load <2 x float>, ptr %retval.sroa.3.0.call7.sroa_idx.i.i.i.i.us130, align 8 %arrayidx16.us107 = getelementptr inbounds nuw [4 x float], ptr %p, i64 0, i64 %indvars.iv142 %ref.tmp9.sroa.0.0.vec.extract.us108 = extractelement <2 x float> %retval.sroa.0.0.copyload.i.i.i.i.us129, i64 0 - %31 = load float, ptr %arrayidx16.us107, align 4 - %mul.i.us109 = fmul float %31, %ref.tmp9.sroa.0.0.vec.extract.us108 + %30 = load float, ptr %arrayidx16.us107, align 4 + %mul.i.us109 = fmul float %30, %ref.tmp9.sroa.0.0.vec.extract.us108 %ref.tmp9.sroa.0.4.vec.extract.us110 = extractelement <2 x float> %retval.sroa.0.0.copyload.i.i.i.i.us129, i64 1 - %mul2.i.us111 = fmul float %31, %ref.tmp9.sroa.0.4.vec.extract.us110 + %mul2.i.us111 = fmul float %30, %ref.tmp9.sroa.0.4.vec.extract.us110 %ref.tmp9.sroa.3.8.vec.extract.us112 = extractelement <2 x float> %retval.sroa.3.0.copyload.i.i.i.i.us131, i64 0 - %mul4.i.us113 = fmul float %31, %ref.tmp9.sroa.3.8.vec.extract.us112 + %mul4.i.us113 = fmul float %30, %ref.tmp9.sroa.3.8.vec.extract.us112 %w0.sroa.0.0.vec.extract.us114 = extractelement <2 x float> %w0.sroa.0.094.us102, i64 0 %add.i.us115 = fadd float %w0.sroa.0.0.vec.extract.us114, %mul.i.us109 %w0.sroa.0.0.vec.insert.us116 = insertelement <2 x float> poison, float %add.i.us115, i64 0 @@ -1331,8 +1332,8 @@ for.body: ; preds = %for.body.preheader, %w0.sroa.9.095 = phi <2 x float> [ zeroinitializer, %for.body.preheader ], [ %w0.sroa.9.8.vec.insert, %for.body ] %w0.sroa.0.094 = phi <2 x float> [ zeroinitializer, %for.body.preheader ], [ %w0.sroa.0.4.vec.insert, %for.body ] %arrayidx16 = getelementptr inbounds nuw [4 x float], ptr %p, i64 0, i64 %indvars.iv - %32 = load float, ptr %arrayidx16, align 4 - %mul.i = fmul float %32, 0.000000e+00 + %31 = load float, ptr %arrayidx16, align 4 + %mul.i = fmul float %31, 0.000000e+00 %w0.sroa.0.0.vec.extract = extractelement <2 x float> %w0.sroa.0.094, i64 0 %add.i = fadd float %w0.sroa.0.0.vec.extract, %mul.i %w0.sroa.0.0.vec.insert = insertelement <2 x float> poison, float %add.i, i64 0 @@ -1353,41 +1354,41 @@ for.end: ; preds = %for.body, %return.s %arrayidx.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 16 %arrayidx.i1.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 32 %w0.sroa.0.0.vec.extract79 = extractelement <2 x float> %w0.sroa.0.0.lcssa, i64 0 - %33 = load float, ptr %transA, align 16 + %32 = load float, ptr %transA, align 16 %w0.sroa.0.4.vec.extract84 = extractelement <2 x float> %w0.sroa.0.0.lcssa, i64 1 %arrayidx4.i.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 4 - %34 = load float, ptr %arrayidx4.i.i.i.i, align 4 - %mul5.i.i.i.i = fmul float %w0.sroa.0.4.vec.extract84, %34 - %35 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.vec.extract79, float %33, float %mul5.i.i.i.i) + %33 = load float, ptr %arrayidx4.i.i.i.i, align 4 + %mul5.i.i.i.i = fmul float %w0.sroa.0.4.vec.extract84, %33 + %34 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.vec.extract79, float %32, float %mul5.i.i.i.i) %w0.sroa.9.8.vec.extract89 = extractelement <2 x float> %w0.sroa.9.0.lcssa, i64 0 %arrayidx7.i.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 8 - %36 = load float, ptr %arrayidx7.i.i.i.i, align 8 - %37 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.9.8.vec.extract89, float %36, float %35) - %38 = load float, ptr %arrayidx.i.i.i, align 16 + %35 = load float, ptr %arrayidx7.i.i.i.i, align 8 + %36 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.9.8.vec.extract89, float %35, float %34) + %37 = load float, ptr %arrayidx.i.i.i, align 16 %arrayidx4.i2.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 20 - %39 = load float, ptr %arrayidx4.i2.i.i.i, align 4 - %mul5.i3.i.i.i = fmul float %w0.sroa.0.4.vec.extract84, %39 - %40 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.vec.extract79, float %38, float %mul5.i3.i.i.i) + %38 = load float, ptr %arrayidx4.i2.i.i.i, align 4 + %mul5.i3.i.i.i = fmul float %w0.sroa.0.4.vec.extract84, %38 + %39 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.vec.extract79, float %37, float %mul5.i3.i.i.i) %arrayidx7.i5.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 24 - %41 = load float, ptr %arrayidx7.i5.i.i.i, align 8 - %42 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.9.8.vec.extract89, float %41, float %40) - %43 = load float, ptr %arrayidx.i1.i.i, align 16 + %40 = load float, ptr %arrayidx7.i5.i.i.i, align 8 + %41 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.9.8.vec.extract89, float %40, float %39) + %42 = load float, ptr %arrayidx.i1.i.i, align 16 %arrayidx4.i7.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 36 - %44 = load float, ptr %arrayidx4.i7.i.i.i, align 4 - %mul5.i8.i.i.i = fmul float %w0.sroa.0.4.vec.extract84, %44 - %45 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.vec.extract79, float %43, float %mul5.i8.i.i.i) + %43 = load float, ptr %arrayidx4.i7.i.i.i, align 4 + %mul5.i8.i.i.i = fmul float %w0.sroa.0.4.vec.extract84, %43 + %44 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.vec.extract79, float %42, float %mul5.i8.i.i.i) %arrayidx7.i10.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 40 - %46 = load float, ptr %arrayidx7.i10.i.i.i, align 8 - %47 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.9.8.vec.extract89, float %46, float %45) + %45 = load float, ptr %arrayidx7.i10.i.i.i, align 8 + %46 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.9.8.vec.extract89, float %45, float %44) %m_origin.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 48 - %48 = load float, ptr %m_origin.i.i, align 16 - %add.i.i.i = fadd float %37, %48 + %47 = load float, ptr %m_origin.i.i, align 16 + %add.i.i.i = fadd float %36, %47 %arrayidx3.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 52 - %49 = load float, ptr %arrayidx3.i.i.i, align 4 - %add4.i.i.i = fadd float %42, %49 + %48 = load float, ptr %arrayidx3.i.i.i, align 4 + %add4.i.i.i = fadd float %41, %48 %arrayidx6.i.i.i = getelementptr inbounds nuw i8, ptr %transA, i64 56 - %50 = load float, ptr %arrayidx6.i.i.i, align 8 - %add7.i.i.i = fadd float %47, %50 + %49 = load float, ptr %arrayidx6.i.i.i, align 8 + %add7.i.i.i = fadd float %46, %49 %retval.sroa.0.0.vec.insert.i.i2.i.i = insertelement <2 x float> poison, float %add.i.i.i, i64 0 %retval.sroa.0.4.vec.insert.i.i3.i.i = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i.i2.i.i, float %add4.i.i.i, i64 1 %retval.sroa.3.12.vec.insert.i.i4.i.i = insertelement <2 x float> , float %add7.i.i.i, i64 0 @@ -1396,42 +1397,42 @@ for.end: ; preds = %for.body, %return.s %ref.tmp21.sroa.2.0.arrayidx25.sroa_idx = getelementptr inbounds nuw i8, ptr %results, i64 24 store <2 x float> %retval.sroa.3.12.vec.insert.i.i4.i.i, ptr %ref.tmp21.sroa.2.0.arrayidx25.sroa_idx, align 8 %m_depth = getelementptr inbounds nuw i8, ptr %epa, i64 80 - %51 = load float, ptr %m_normal.i.i, align 16 - %52 = load float, ptr %m_depth, align 16 - %mul.i26 = fmul float %51, %52 + %50 = load float, ptr %m_normal.i.i, align 16 + %51 = load float, ptr %m_depth, align 16 + %mul.i26 = fmul float %50, %51 %arrayidx1.i27 = getelementptr inbounds nuw i8, ptr %epa, i64 68 - %53 = load float, ptr %arrayidx1.i27, align 4 - %mul2.i28 = fmul float %52, %53 + %52 = load float, ptr %arrayidx1.i27, align 4 + %mul2.i28 = fmul float %51, %52 %arrayidx3.i29 = getelementptr inbounds nuw i8, ptr %epa, i64 72 - %54 = load float, ptr %arrayidx3.i29, align 8 - %mul4.i30 = fmul float %52, %54 + %53 = load float, ptr %arrayidx3.i29, align 8 + %mul4.i30 = fmul float %51, %53 %sub.i = fsub float %w0.sroa.0.0.vec.extract79, %mul.i26 %sub4.i = fsub float %w0.sroa.0.4.vec.extract84, %mul2.i28 %sub7.i = fsub float %w0.sroa.9.8.vec.extract89, %mul4.i30 - %55 = load float, ptr %transA, align 16 - %56 = load float, ptr %arrayidx4.i.i.i.i, align 4 - %mul5.i.i.i.i47 = fmul float %sub4.i, %56 - %57 = call float @llvm.fmuladd.f32(float %sub.i, float %55, float %mul5.i.i.i.i47) - %58 = load float, ptr %arrayidx7.i.i.i.i, align 8 - %59 = call noundef float @llvm.fmuladd.f32(float %sub7.i, float %58, float %57) - %60 = load float, ptr %arrayidx.i.i.i, align 16 - %61 = load float, ptr %arrayidx4.i2.i.i.i, align 4 - %mul5.i3.i.i.i51 = fmul float %sub4.i, %61 - %62 = call float @llvm.fmuladd.f32(float %sub.i, float %60, float %mul5.i3.i.i.i51) - %63 = load float, ptr %arrayidx7.i5.i.i.i, align 8 - %64 = call noundef float @llvm.fmuladd.f32(float %sub7.i, float %63, float %62) - %65 = load float, ptr %arrayidx.i1.i.i, align 16 - %66 = load float, ptr %arrayidx4.i7.i.i.i, align 4 - %mul5.i8.i.i.i54 = fmul float %sub4.i, %66 - %67 = call float @llvm.fmuladd.f32(float %sub.i, float %65, float %mul5.i8.i.i.i54) - %68 = load float, ptr %arrayidx7.i10.i.i.i, align 8 - %69 = call noundef float @llvm.fmuladd.f32(float %sub7.i, float %68, float %67) - %70 = load float, ptr %m_origin.i.i, align 16 - %add.i.i.i57 = fadd float %59, %70 - %71 = load float, ptr %arrayidx3.i.i.i, align 4 - %add4.i.i.i59 = fadd float %64, %71 - %72 = load float, ptr %arrayidx6.i.i.i, align 8 - %add7.i.i.i61 = fadd float %69, %72 + %54 = load float, ptr %transA, align 16 + %55 = load float, ptr %arrayidx4.i.i.i.i, align 4 + %mul5.i.i.i.i47 = fmul float %sub4.i, %55 + %56 = call float @llvm.fmuladd.f32(float %sub.i, float %54, float %mul5.i.i.i.i47) + %57 = load float, ptr %arrayidx7.i.i.i.i, align 8 + %58 = call noundef float @llvm.fmuladd.f32(float %sub7.i, float %57, float %56) + %59 = load float, ptr %arrayidx.i.i.i, align 16 + %60 = load float, ptr %arrayidx4.i2.i.i.i, align 4 + %mul5.i3.i.i.i51 = fmul float %sub4.i, %60 + %61 = call float @llvm.fmuladd.f32(float %sub.i, float %59, float %mul5.i3.i.i.i51) + %62 = load float, ptr %arrayidx7.i5.i.i.i, align 8 + %63 = call noundef float @llvm.fmuladd.f32(float %sub7.i, float %62, float %61) + %64 = load float, ptr %arrayidx.i1.i.i, align 16 + %65 = load float, ptr %arrayidx4.i7.i.i.i, align 4 + %mul5.i8.i.i.i54 = fmul float %sub4.i, %65 + %66 = call float @llvm.fmuladd.f32(float %sub.i, float %64, float %mul5.i8.i.i.i54) + %67 = load float, ptr %arrayidx7.i10.i.i.i, align 8 + %68 = call noundef float @llvm.fmuladd.f32(float %sub7.i, float %67, float %66) + %69 = load float, ptr %m_origin.i.i, align 16 + %add.i.i.i57 = fadd float %58, %69 + %70 = load float, ptr %arrayidx3.i.i.i, align 4 + %add4.i.i.i59 = fadd float %63, %70 + %71 = load float, ptr %arrayidx6.i.i.i, align 8 + %add7.i.i.i61 = fadd float %68, %71 %retval.sroa.0.0.vec.insert.i.i2.i.i62 = insertelement <2 x float> poison, float %add.i.i.i57, i64 0 %retval.sroa.0.4.vec.insert.i.i3.i.i63 = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i.i2.i.i62, float %add4.i.i.i59, i64 1 %retval.sroa.3.12.vec.insert.i.i4.i.i64 = insertelement <2 x float> , float %add7.i.i.i61, i64 0 @@ -1439,9 +1440,9 @@ for.end: ; preds = %for.body, %return.s store <2 x float> %retval.sroa.0.4.vec.insert.i.i3.i.i63, ptr %arrayidx39, align 16 %ref.tmp26.sroa.2.0.arrayidx39.sroa_idx = getelementptr inbounds nuw i8, ptr %results, i64 40 store <2 x float> %retval.sroa.3.12.vec.insert.i.i4.i.i64, ptr %ref.tmp26.sroa.2.0.arrayidx39.sroa_idx, align 8 - %fneg.i67 = fneg float %51 - %fneg2.i69 = fneg float %53 - %fneg4.i71 = fneg float %54 + %fneg.i67 = fneg float %50 + %fneg2.i69 = fneg float %52 + %fneg4.i71 = fneg float %53 %retval.sroa.0.0.vec.insert.i.i72 = insertelement <2 x float> poison, float %fneg.i67, i64 0 %retval.sroa.0.4.vec.insert.i.i73 = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i.i72, float %fneg2.i69, i64 1 %retval.sroa.3.12.vec.insert.i.i74 = insertelement <2 x float> , float %fneg4.i71, i64 0 @@ -1449,7 +1450,7 @@ for.end: ; preds = %for.body, %return.s store <2 x float> %retval.sroa.0.4.vec.insert.i.i73, ptr %normal, align 16 %ref.tmp40.sroa.2.0.normal.sroa_idx = getelementptr inbounds nuw i8, ptr %results, i64 56 store <2 x float> %retval.sroa.3.12.vec.insert.i.i74, ptr %ref.tmp40.sroa.2.0.normal.sroa_idx, align 8 - %fneg = fneg float %52 + %fneg = fneg float %51 %distance = getelementptr inbounds nuw i8, ptr %results, i64 64 store float %fneg, ptr %distance, align 16 br label %return diff --git a/bench/bullet3/optimized/btBoxBoxDetector.ll b/bench/bullet3/optimized/btBoxBoxDetector.ll index 66684c316b1..b4f72d77b66 100644 --- a/bench/bullet3/optimized/btBoxBoxDetector.ll +++ b/bench/bullet3/optimized/btBoxBoxDetector.ll @@ -1802,7 +1802,7 @@ for.cond1.preheader: ; preds = %entry, %for.inc81 %r.082 = phi ptr [ %ret, %entry ], [ %cond78, %for.inc81 ] %q.081 = phi ptr [ %p, %entry ], [ %r.178, %for.inc81 ] %arrayidx8 = getelementptr inbounds nuw float, ptr %h, i64 %indvars.iv - %0 = xor i64 %indvars.iv, 1 + %idxprom36 = xor i64 %indvars.iv, 1 br label %for.cond4.preheader for.cond4.preheader: ; preds = %for.cond1.preheader, %for.end @@ -1823,19 +1823,19 @@ for.body6: ; preds = %for.body6.lr.ph, %i %pq.074 = phi ptr [ %q.177, %for.body6.lr.ph ], [ %add.ptr17, %if.end72 ] %nr.273 = phi i32 [ 0, %for.body6.lr.ph ], [ %nr.5, %if.end72 ] %arrayidx = getelementptr inbounds nuw float, ptr %pq.074, i64 %indvars.iv - %1 = load float, ptr %arrayidx, align 4 - %mul = fmul float %1, %conv - %2 = load float, ptr %arrayidx8, align 4 - %cmp9 = fcmp olt float %mul, %2 + %0 = load float, ptr %arrayidx, align 4 + %mul = fmul float %0, %conv + %1 = load float, ptr %arrayidx8, align 4 + %cmp9 = fcmp olt float %mul, %1 br i1 %cmp9, label %if.then, label %if.end15 if.then: ; preds = %for.body6 - %3 = load float, ptr %pq.074, align 4 - store float %3, ptr %pr.075, align 4 + %2 = load float, ptr %pq.074, align 4 + store float %2, ptr %pr.075, align 4 %arrayidx12 = getelementptr inbounds nuw i8, ptr %pq.074, i64 4 - %4 = load float, ptr %arrayidx12, align 4 + %3 = load float, ptr %arrayidx12, align 4 %arrayidx13 = getelementptr inbounds nuw i8, ptr %pr.075, i64 4 - store float %4, ptr %arrayidx13, align 4 + store float %3, ptr %arrayidx13, align 4 %inc = add nsw i32 %nr.273, 1 %and = and i32 %inc, 8 %tobool.not = icmp eq i32 %and, 0 @@ -1844,42 +1844,42 @@ if.then: ; preds = %for.body6 if.then.if.end15_crit_edge: ; preds = %if.then %add.ptr = getelementptr inbounds nuw i8, ptr %pr.075, i64 8 %.pre = load float, ptr %arrayidx, align 4 - %.pre90 = load float, ptr %arrayidx8, align 4 - %.pre91 = fmul float %.pre, %conv + %.pre89 = load float, ptr %arrayidx8, align 4 + %.pre90 = fmul float %.pre, %conv br label %if.end15 if.end15: ; preds = %if.then.if.end15_crit_edge, %for.body6 - %mul21.pre-phi = phi float [ %.pre91, %if.then.if.end15_crit_edge ], [ %mul, %for.body6 ] - %5 = phi float [ %.pre90, %if.then.if.end15_crit_edge ], [ %2, %for.body6 ] - %6 = phi float [ %.pre, %if.then.if.end15_crit_edge ], [ %1, %for.body6 ] + %mul21.pre-phi = phi float [ %.pre90, %if.then.if.end15_crit_edge ], [ %mul, %for.body6 ] + %4 = phi float [ %.pre89, %if.then.if.end15_crit_edge ], [ %1, %for.body6 ] + %5 = phi float [ %.pre, %if.then.if.end15_crit_edge ], [ %0, %for.body6 ] %nr.3 = phi i32 [ %inc, %if.then.if.end15_crit_edge ], [ %nr.273, %for.body6 ] %pr.1 = phi ptr [ %add.ptr, %if.then.if.end15_crit_edge ], [ %pr.075, %for.body6 ] %cmp16.not = icmp eq i32 %i.076, 1 %add.ptr17 = getelementptr inbounds nuw i8, ptr %pq.074, i64 8 %cond = select i1 %cmp16.not, ptr %q.177, ptr %add.ptr17 - %cmp24 = fcmp olt float %mul21.pre-phi, %5 + %cmp24 = fcmp olt float %mul21.pre-phi, %4 %arrayidx28 = getelementptr inbounds nuw float, ptr %cond, i64 %indvars.iv - %7 = load float, ptr %arrayidx28, align 4 - %mul29 = fmul float %7, %conv - %cmp32 = fcmp olt float %mul29, %5 + %6 = load float, ptr %arrayidx28, align 4 + %mul29 = fmul float %6, %conv + %cmp32 = fcmp olt float %mul29, %4 %xor63 = xor i1 %cmp24, %cmp32 br i1 %xor63, label %if.then35, label %if.end72 if.then35: ; preds = %if.end15 - %arrayidx37 = getelementptr inbounds nuw float, ptr %pq.074, i64 %0 - %8 = load float, ptr %arrayidx37, align 4 - %arrayidx40 = getelementptr inbounds nuw float, ptr %cond, i64 %0 - %9 = load float, ptr %arrayidx40, align 4 - %sub44 = fsub float %9, %8 - %sub49 = fsub float %7, %6 + %arrayidx37 = getelementptr inbounds nuw float, ptr %pq.074, i64 %idxprom36 + %7 = load float, ptr %arrayidx37, align 4 + %arrayidx40 = getelementptr inbounds nuw float, ptr %cond, i64 %idxprom36 + %8 = load float, ptr %arrayidx40, align 4 + %sub44 = fsub float %8, %7 + %sub49 = fsub float %6, %5 %div = fdiv float %sub44, %sub49 - %neg = fneg float %6 - %10 = call float @llvm.fmuladd.f32(float %conv, float %5, float %neg) - %11 = call float @llvm.fmuladd.f32(float %div, float %10, float %8) - %arrayidx59 = getelementptr inbounds nuw float, ptr %pr.1, i64 %0 - store float %11, ptr %arrayidx59, align 4 - %12 = load float, ptr %arrayidx8, align 4 - %mul63 = fmul float %12, %conv + %neg = fneg float %5 + %9 = call float @llvm.fmuladd.f32(float %conv, float %4, float %neg) + %10 = call float @llvm.fmuladd.f32(float %div, float %9, float %7) + %arrayidx59 = getelementptr inbounds nuw float, ptr %pr.1, i64 %idxprom36 + store float %10, ptr %arrayidx59, align 4 + %11 = load float, ptr %arrayidx8, align 4 + %mul63 = fmul float %11, %conv %arrayidx65 = getelementptr inbounds nuw float, ptr %pr.1, i64 %indvars.iv store float %mul63, ptr %arrayidx65, align 4 %add.ptr66 = getelementptr inbounds nuw i8, ptr %pr.1, i64 8 diff --git a/bench/bullet3/optimized/btGjkEpa2.ll b/bench/bullet3/optimized/btGjkEpa2.ll index 88f86db397b..7580e8c61df 100644 --- a/bench/bullet3/optimized/btGjkEpa2.ll +++ b/bench/bullet3/optimized/btGjkEpa2.ll @@ -1392,9 +1392,10 @@ sw.bb: ; preds = %entry for.body.i.i: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i, %sw.bb %4 = phi i32 [ 0, %sw.bb ], [ %inc.i.i.i, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] %5 = phi ptr [ null, %sw.bb ], [ %arrayidx.i.i, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] - %indvars.iv.i.i = phi i64 [ 0, %sw.bb ], [ %indvars.iv.next.i.i, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] - %6 = sub nuw nsw i64 255, %indvars.iv.i.i - %arrayidx.i.i = getelementptr inbounds nuw [256 x %"struct.gjkepa2_impl::EPA::sFace"], ptr %m_fc_store.i.i, i64 0, i64 %6 + %i.03.i.i = phi i32 [ 0, %sw.bb ], [ %inc.i.i, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i ] + %sub5.i.i = xor i32 %i.03.i.i, 255 + %idxprom.i.i = zext nneg i32 %sub5.i.i to i64 + %arrayidx.i.i = getelementptr inbounds nuw [256 x %"struct.gjkepa2_impl::EPA::sFace"], ptr %m_fc_store.i.i, i64 0, i64 %idxprom.i.i %l.i.i.i = getelementptr inbounds nuw i8, ptr %arrayidx.i.i, i64 72 store ptr null, ptr %l.i.i.i, align 8 %arrayidx2.i.i.i = getelementptr inbounds nuw i8, ptr %arrayidx.i.i, i64 80 @@ -1409,35 +1410,35 @@ if.then.i.i.i: ; preds = %for.body.i.i br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i _ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i: ; preds = %if.then.i.i.i, %for.body.i.i - %7 = phi i32 [ %.pre.i, %if.then.i.i.i ], [ %4, %for.body.i.i ] + %6 = phi i32 [ %.pre.i, %if.then.i.i.i ], [ %4, %for.body.i.i ] store ptr %arrayidx.i.i, ptr %m_stock.i, align 8 - %inc.i.i.i = add i32 %7, 1 + %inc.i.i.i = add i32 %6, 1 store i32 %inc.i.i.i, ptr %count.i1.i, align 8 - %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %indvars.iv.next.i.i, 256 + %inc.i.i = add nuw nsw i32 %i.03.i.i, 1 + %exitcond.not.i.i = icmp eq i32 %inc.i.i, 256 br i1 %exitcond.not.i.i, label %_ZN12gjkepa2_impl3EPAC2Ev.exit, label %for.body.i.i, !llvm.loop !20 _ZN12gjkepa2_impl3EPAC2Ev.exit: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i - %8 = load float, ptr %guess, align 4 - %fneg.i14 = fneg float %8 - %9 = load float, ptr %arrayidx3.i, align 4 - %fneg4.i16 = fneg float %9 - %10 = load float, ptr %arrayidx7.i, align 4 - %fneg8.i18 = fneg float %10 + %7 = load float, ptr %guess, align 4 + %fneg.i14 = fneg float %7 + %8 = load float, ptr %arrayidx3.i, align 4 + %fneg4.i16 = fneg float %8 + %9 = load float, ptr %arrayidx7.i, align 4 + %fneg8.i18 = fneg float %9 %retval.sroa.0.0.vec.insert.i19 = insertelement <2 x float> poison, float %fneg.i14, i64 0 %retval.sroa.0.4.vec.insert.i20 = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i19, float %fneg4.i16, i64 1 %retval.sroa.3.12.vec.insert.i21 = insertelement <2 x float> , float %fneg8.i18, i64 0 store <2 x float> %retval.sroa.0.4.vec.insert.i20, ptr %ref.tmp2, align 8 - %11 = getelementptr inbounds nuw i8, ptr %ref.tmp2, i64 8 - store <2 x float> %retval.sroa.3.12.vec.insert.i21, ptr %11, align 8 + %10 = getelementptr inbounds nuw i8, ptr %ref.tmp2, i64 8 + store <2 x float> %retval.sroa.3.12.vec.insert.i21, ptr %10, align 8 %call5 = call noundef i32 @_ZN12gjkepa2_impl3EPA8EvaluateERNS_3GJKERK9btVector3(ptr noundef nonnull align 8 dereferenceable(28800) %epa, ptr noundef nonnull align 8 dereferenceable(460) %gjk, ptr noundef nonnull align 4 dereferenceable(16) %ref.tmp2) %cmp.not = icmp eq i32 %call5, 9 br i1 %cmp.not, label %if.else, label %for.cond.preheader for.cond.preheader: ; preds = %_ZN12gjkepa2_impl3EPAC2Ev.exit %rank = getelementptr inbounds nuw i8, ptr %epa, i64 56 - %12 = load i32, ptr %rank, align 8 - %cmp992.not = icmp eq i32 %12, 0 + %11 = load i32, ptr %rank, align 8 + %cmp992.not = icmp eq i32 %11, 0 br i1 %cmp992.not, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %for.cond.preheader @@ -1453,20 +1454,20 @@ for.body: ; preds = %for.body.lr.ph, %_Z %w0.sroa.5.094 = phi float [ 0.000000e+00, %for.body.lr.ph ], [ %add8.i, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] %w0.sroa.0.093 = phi float [ 0.000000e+00, %for.body.lr.ph ], [ %add.i, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] %arrayidx = getelementptr inbounds nuw [4 x ptr], ptr %m_result, i64 0, i64 %indvars.iv - %13 = load ptr, ptr %arrayidx, align 8 - %14 = load ptr, ptr %shape, align 8 + %12 = load ptr, ptr %arrayidx, align 8 + %13 = load ptr, ptr %shape, align 8 %.unpack.i4.i = load i64, ptr %Ls.i3.i, align 8 %.unpack2.i6.i = load i64, ptr %.elt1.i5.i, align 8 - %15 = getelementptr inbounds i8, ptr %14, i64 %.unpack2.i6.i - %16 = and i64 %.unpack.i4.i, 1 - %memptr.isvirtual.not.i7.i = icmp eq i64 %16, 0 + %14 = getelementptr inbounds i8, ptr %13, i64 %.unpack2.i6.i + %15 = and i64 %.unpack.i4.i, 1 + %memptr.isvirtual.not.i7.i = icmp eq i64 %15, 0 br i1 %memptr.isvirtual.not.i7.i, label %memptr.nonvirtual.i11.i, label %memptr.virtual.i8.i memptr.virtual.i8.i: ; preds = %for.body - %vtable.i9.i = load ptr, ptr %15, align 8 - %17 = getelementptr i8, ptr %vtable.i9.i, i64 %.unpack.i4.i - %18 = getelementptr i8, ptr %17, i64 -1 - %memptr.virtualfn.i10.i = load ptr, ptr %18, align 8, !nosanitize !5 + %vtable.i9.i = load ptr, ptr %14, align 8 + %16 = getelementptr i8, ptr %vtable.i9.i, i64 %.unpack.i4.i + %17 = getelementptr i8, ptr %16, i64 -1 + %memptr.virtualfn.i10.i = load ptr, ptr %17, align 8, !nosanitize !5 br label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit memptr.nonvirtual.i11.i: ; preds = %for.body @@ -1474,25 +1475,25 @@ memptr.nonvirtual.i11.i: ; preds = %for.body br label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit _ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit: ; preds = %memptr.virtual.i8.i, %memptr.nonvirtual.i11.i - %19 = phi ptr [ %memptr.virtualfn.i10.i, %memptr.virtual.i8.i ], [ %memptr.nonvirtualfn.i12.i, %memptr.nonvirtual.i11.i ] - %call.i.i = call { <2 x float>, <2 x float> } %19(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 4 dereferenceable(16) %13) - %20 = extractvalue { <2 x float>, <2 x float> } %call.i.i, 0 - %21 = extractvalue { <2 x float>, <2 x float> } %call.i.i, 1 + %18 = phi ptr [ %memptr.virtualfn.i10.i, %memptr.virtual.i8.i ], [ %memptr.nonvirtualfn.i12.i, %memptr.nonvirtual.i11.i ] + %call.i.i = call { <2 x float>, <2 x float> } %18(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 4 dereferenceable(16) %12) + %19 = extractvalue { <2 x float>, <2 x float> } %call.i.i, 0 + %20 = extractvalue { <2 x float>, <2 x float> } %call.i.i, 1 %arrayidx17 = getelementptr inbounds nuw [4 x float], ptr %p, i64 0, i64 %indvars.iv - %ref.tmp11.sroa.0.0.vec.extract = extractelement <2 x float> %20, i64 0 - %22 = load float, ptr %arrayidx17, align 4 - %mul.i = fmul float %22, %ref.tmp11.sroa.0.0.vec.extract - %ref.tmp11.sroa.0.4.vec.extract = extractelement <2 x float> %20, i64 1 - %mul4.i = fmul float %22, %ref.tmp11.sroa.0.4.vec.extract - %ref.tmp11.sroa.3.8.vec.extract = extractelement <2 x float> %21, i64 0 - %mul8.i = fmul float %22, %ref.tmp11.sroa.3.8.vec.extract + %ref.tmp11.sroa.0.0.vec.extract = extractelement <2 x float> %19, i64 0 + %21 = load float, ptr %arrayidx17, align 4 + %mul.i = fmul float %21, %ref.tmp11.sroa.0.0.vec.extract + %ref.tmp11.sroa.0.4.vec.extract = extractelement <2 x float> %19, i64 1 + %mul4.i = fmul float %21, %ref.tmp11.sroa.0.4.vec.extract + %ref.tmp11.sroa.3.8.vec.extract = extractelement <2 x float> %20, i64 0 + %mul8.i = fmul float %21, %ref.tmp11.sroa.3.8.vec.extract %add.i = fadd float %w0.sroa.0.093, %mul.i %add8.i = fadd float %w0.sroa.5.094, %mul4.i %add13.i = fadd float %w0.sroa.10.095, %mul8.i %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %23 = load i32, ptr %rank, align 8 - %24 = zext i32 %23 to i64 - %cmp9 = icmp samesign ult i64 %indvars.iv.next, %24 + %22 = load i32, ptr %rank, align 8 + %23 = zext i32 %22 to i64 + %cmp9 = icmp samesign ult i64 %indvars.iv.next, %23 br i1 %cmp9, label %for.body, label %for.end, !llvm.loop !21 for.end: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit, %for.cond.preheader @@ -1502,39 +1503,39 @@ for.end: ; preds = %_ZNK12gjkepa2_impl1 store i32 1, ptr %results, align 4 %arrayidx.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 16 %arrayidx.i1.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 32 - %25 = load float, ptr %wtrs0, align 4 + %24 = load float, ptr %wtrs0, align 4 %arrayidx7.i.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 4 - %26 = load float, ptr %arrayidx7.i.i.i.i, align 4 - %mul8.i.i.i.i = fmul float %w0.sroa.5.0.lcssa, %26 - %27 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.lcssa, float %25, float %mul8.i.i.i.i) + %25 = load float, ptr %arrayidx7.i.i.i.i, align 4 + %mul8.i.i.i.i = fmul float %w0.sroa.5.0.lcssa, %25 + %26 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.lcssa, float %24, float %mul8.i.i.i.i) %arrayidx12.i.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 8 - %28 = load float, ptr %arrayidx12.i.i.i.i, align 4 - %29 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.10.0.lcssa, float %28, float %27) - %30 = load float, ptr %arrayidx.i.i.i, align 4 + %27 = load float, ptr %arrayidx12.i.i.i.i, align 4 + %28 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.10.0.lcssa, float %27, float %26) + %29 = load float, ptr %arrayidx.i.i.i, align 4 %arrayidx7.i2.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 20 - %31 = load float, ptr %arrayidx7.i2.i.i.i, align 4 - %mul8.i3.i.i.i = fmul float %w0.sroa.5.0.lcssa, %31 - %32 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.lcssa, float %30, float %mul8.i3.i.i.i) + %30 = load float, ptr %arrayidx7.i2.i.i.i, align 4 + %mul8.i3.i.i.i = fmul float %w0.sroa.5.0.lcssa, %30 + %31 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.lcssa, float %29, float %mul8.i3.i.i.i) %arrayidx12.i5.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 24 - %33 = load float, ptr %arrayidx12.i5.i.i.i, align 4 - %34 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.10.0.lcssa, float %33, float %32) - %35 = load float, ptr %arrayidx.i1.i.i, align 4 + %32 = load float, ptr %arrayidx12.i5.i.i.i, align 4 + %33 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.10.0.lcssa, float %32, float %31) + %34 = load float, ptr %arrayidx.i1.i.i, align 4 %arrayidx7.i7.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 36 - %36 = load float, ptr %arrayidx7.i7.i.i.i, align 4 - %mul8.i8.i.i.i = fmul float %w0.sroa.5.0.lcssa, %36 - %37 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.lcssa, float %35, float %mul8.i8.i.i.i) + %35 = load float, ptr %arrayidx7.i7.i.i.i, align 4 + %mul8.i8.i.i.i = fmul float %w0.sroa.5.0.lcssa, %35 + %36 = call float @llvm.fmuladd.f32(float %w0.sroa.0.0.lcssa, float %34, float %mul8.i8.i.i.i) %arrayidx12.i10.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 40 - %38 = load float, ptr %arrayidx12.i10.i.i.i, align 4 - %39 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.10.0.lcssa, float %38, float %37) + %37 = load float, ptr %arrayidx12.i10.i.i.i, align 4 + %38 = call noundef float @llvm.fmuladd.f32(float %w0.sroa.10.0.lcssa, float %37, float %36) %m_origin.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 48 - %40 = load float, ptr %m_origin.i.i, align 4 - %add.i.i.i = fadd float %29, %40 + %39 = load float, ptr %m_origin.i.i, align 4 + %add.i.i.i = fadd float %28, %39 %arrayidx7.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 52 - %41 = load float, ptr %arrayidx7.i.i.i, align 4 - %add8.i.i.i = fadd float %34, %41 + %40 = load float, ptr %arrayidx7.i.i.i, align 4 + %add8.i.i.i = fadd float %33, %40 %arrayidx13.i.i.i = getelementptr inbounds nuw i8, ptr %wtrs0, i64 56 - %42 = load float, ptr %arrayidx13.i.i.i, align 4 - %add14.i.i.i = fadd float %39, %42 + %41 = load float, ptr %arrayidx13.i.i.i, align 4 + %add14.i.i.i = fadd float %38, %41 %retval.sroa.0.0.vec.insert.i2.i.i = insertelement <2 x float> poison, float %add.i.i.i, i64 0 %retval.sroa.0.4.vec.insert.i3.i.i = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i2.i.i, float %add8.i.i.i, i64 1 %retval.sroa.3.12.vec.insert.i4.i.i = insertelement <2 x float> , float %add14.i.i.i, i64 0 @@ -1543,42 +1544,42 @@ for.end: ; preds = %_ZNK12gjkepa2_impl1 %ref.tmp21.sroa.2.0.arrayidx24.sroa_idx = getelementptr inbounds nuw i8, ptr %results, i64 12 store <2 x float> %retval.sroa.3.12.vec.insert.i4.i.i, ptr %ref.tmp21.sroa.2.0.arrayidx24.sroa_idx, align 4 %m_depth = getelementptr inbounds nuw i8, ptr %epa, i64 80 - %43 = load float, ptr %m_normal.i.i, align 8 - %44 = load float, ptr %m_depth, align 8 - %mul.i35 = fmul float %43, %44 + %42 = load float, ptr %m_normal.i.i, align 8 + %43 = load float, ptr %m_depth, align 8 + %mul.i35 = fmul float %42, %43 %arrayidx3.i36 = getelementptr inbounds nuw i8, ptr %epa, i64 68 - %45 = load float, ptr %arrayidx3.i36, align 4 - %mul4.i37 = fmul float %44, %45 + %44 = load float, ptr %arrayidx3.i36, align 4 + %mul4.i37 = fmul float %43, %44 %arrayidx7.i38 = getelementptr inbounds nuw i8, ptr %epa, i64 72 - %46 = load float, ptr %arrayidx7.i38, align 8 - %mul8.i39 = fmul float %44, %46 + %45 = load float, ptr %arrayidx7.i38, align 8 + %mul8.i39 = fmul float %43, %45 %sub.i = fsub float %w0.sroa.0.0.lcssa, %mul.i35 %sub8.i = fsub float %w0.sroa.5.0.lcssa, %mul4.i37 %sub14.i = fsub float %w0.sroa.10.0.lcssa, %mul8.i39 - %47 = load float, ptr %wtrs0, align 4 - %48 = load float, ptr %arrayidx7.i.i.i.i, align 4 - %mul8.i.i.i.i56 = fmul float %sub8.i, %48 - %49 = call float @llvm.fmuladd.f32(float %sub.i, float %47, float %mul8.i.i.i.i56) - %50 = load float, ptr %arrayidx12.i.i.i.i, align 4 - %51 = call noundef float @llvm.fmuladd.f32(float %sub14.i, float %50, float %49) - %52 = load float, ptr %arrayidx.i.i.i, align 4 - %53 = load float, ptr %arrayidx7.i2.i.i.i, align 4 - %mul8.i3.i.i.i60 = fmul float %sub8.i, %53 - %54 = call float @llvm.fmuladd.f32(float %sub.i, float %52, float %mul8.i3.i.i.i60) - %55 = load float, ptr %arrayidx12.i5.i.i.i, align 4 - %56 = call noundef float @llvm.fmuladd.f32(float %sub14.i, float %55, float %54) - %57 = load float, ptr %arrayidx.i1.i.i, align 4 - %58 = load float, ptr %arrayidx7.i7.i.i.i, align 4 - %mul8.i8.i.i.i63 = fmul float %sub8.i, %58 - %59 = call float @llvm.fmuladd.f32(float %sub.i, float %57, float %mul8.i8.i.i.i63) - %60 = load float, ptr %arrayidx12.i10.i.i.i, align 4 - %61 = call noundef float @llvm.fmuladd.f32(float %sub14.i, float %60, float %59) - %62 = load float, ptr %m_origin.i.i, align 4 - %add.i.i.i66 = fadd float %51, %62 - %63 = load float, ptr %arrayidx7.i.i.i, align 4 - %add8.i.i.i68 = fadd float %56, %63 - %64 = load float, ptr %arrayidx13.i.i.i, align 4 - %add14.i.i.i70 = fadd float %61, %64 + %46 = load float, ptr %wtrs0, align 4 + %47 = load float, ptr %arrayidx7.i.i.i.i, align 4 + %mul8.i.i.i.i56 = fmul float %sub8.i, %47 + %48 = call float @llvm.fmuladd.f32(float %sub.i, float %46, float %mul8.i.i.i.i56) + %49 = load float, ptr %arrayidx12.i.i.i.i, align 4 + %50 = call noundef float @llvm.fmuladd.f32(float %sub14.i, float %49, float %48) + %51 = load float, ptr %arrayidx.i.i.i, align 4 + %52 = load float, ptr %arrayidx7.i2.i.i.i, align 4 + %mul8.i3.i.i.i60 = fmul float %sub8.i, %52 + %53 = call float @llvm.fmuladd.f32(float %sub.i, float %51, float %mul8.i3.i.i.i60) + %54 = load float, ptr %arrayidx12.i5.i.i.i, align 4 + %55 = call noundef float @llvm.fmuladd.f32(float %sub14.i, float %54, float %53) + %56 = load float, ptr %arrayidx.i1.i.i, align 4 + %57 = load float, ptr %arrayidx7.i7.i.i.i, align 4 + %mul8.i8.i.i.i63 = fmul float %sub8.i, %57 + %58 = call float @llvm.fmuladd.f32(float %sub.i, float %56, float %mul8.i8.i.i.i63) + %59 = load float, ptr %arrayidx12.i10.i.i.i, align 4 + %60 = call noundef float @llvm.fmuladd.f32(float %sub14.i, float %59, float %58) + %61 = load float, ptr %m_origin.i.i, align 4 + %add.i.i.i66 = fadd float %50, %61 + %62 = load float, ptr %arrayidx7.i.i.i, align 4 + %add8.i.i.i68 = fadd float %55, %62 + %63 = load float, ptr %arrayidx13.i.i.i, align 4 + %add14.i.i.i70 = fadd float %60, %63 %retval.sroa.0.0.vec.insert.i2.i.i71 = insertelement <2 x float> poison, float %add.i.i.i66, i64 0 %retval.sroa.0.4.vec.insert.i3.i.i72 = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i2.i.i71, float %add8.i.i.i68, i64 1 %retval.sroa.3.12.vec.insert.i4.i.i73 = insertelement <2 x float> , float %add14.i.i.i70, i64 0 @@ -1586,9 +1587,9 @@ for.end: ; preds = %_ZNK12gjkepa2_impl1 store <2 x float> %retval.sroa.0.4.vec.insert.i3.i.i72, ptr %arrayidx35, align 4 %ref.tmp25.sroa.2.0.arrayidx35.sroa_idx = getelementptr inbounds nuw i8, ptr %results, i64 28 store <2 x float> %retval.sroa.3.12.vec.insert.i4.i.i73, ptr %ref.tmp25.sroa.2.0.arrayidx35.sroa_idx, align 4 - %fneg.i76 = fneg float %43 - %fneg4.i78 = fneg float %45 - %fneg8.i80 = fneg float %46 + %fneg.i76 = fneg float %42 + %fneg4.i78 = fneg float %44 + %fneg8.i80 = fneg float %45 %retval.sroa.0.0.vec.insert.i81 = insertelement <2 x float> poison, float %fneg.i76, i64 0 %retval.sroa.0.4.vec.insert.i82 = insertelement <2 x float> %retval.sroa.0.0.vec.insert.i81, float %fneg4.i78, i64 1 %retval.sroa.3.12.vec.insert.i83 = insertelement <2 x float> , float %fneg8.i80, i64 0 @@ -1596,7 +1597,7 @@ for.end: ; preds = %_ZNK12gjkepa2_impl1 store <2 x float> %retval.sroa.0.4.vec.insert.i82, ptr %normal, align 4 %ref.tmp36.sroa.2.0.normal.sroa_idx = getelementptr inbounds nuw i8, ptr %results, i64 44 store <2 x float> %retval.sroa.3.12.vec.insert.i83, ptr %ref.tmp36.sroa.2.0.normal.sroa_idx, align 4 - %fneg = fneg float %44 + %fneg = fneg float %43 %distance = getelementptr inbounds nuw i8, ptr %results, i64 52 store float %fneg, ptr %distance, align 4 br label %return diff --git a/bench/ceres/optimized/schur_eliminator_2_2_2.cc.ll b/bench/ceres/optimized/schur_eliminator_2_2_2.cc.ll index b937baeca38..88daf311ef4 100644 --- a/bench/ceres/optimized/schur_eliminator_2_2_2.cc.ll +++ b/bench/ceres/optimized/schur_eliminator_2_2_2.cc.ll @@ -10055,7 +10055,7 @@ _ZN5Eigen10MatrixBaseINS_5BlockINS1_INS_6MatrixIdLin1ELi2ELi1ELin1ELi2EEELin1ELi br label %158 158: ; preds = %157, %_ZN5Eigen10MatrixBaseINS_5BlockINS1_INS_6MatrixIdLin1ELi2ELi1ELin1ELi2EEELin1ELi1ELb0EEELin1ELi1ELb0EEEE22makeHouseholderInPlaceERdS7_.exit - %159 = sub nuw nsw i64 1, %.083187 + %159 = xor i64 %.083187, 1 call void @llvm.experimental.noalias.scope.decl(metadata !257) %160 = load i64, ptr %4, align 8, !noalias !257 %161 = sub nsw i64 %160, %114 @@ -20890,7 +20890,7 @@ _ZNK5Eigen9DenseBaseINS_5BlockINS_6MatrixIdLi1ELin1ELi1ELi1ELin1EEELi1ELin1ELb0E %140 = mul nsw i64 %139, %.083163 %141 = getelementptr inbounds double, ptr %137, i64 %140 %142 = getelementptr inbounds nuw double, ptr %6, i64 %.083163 - %143 = sub nuw nsw i64 1, %.083163 + %143 = xor i64 %.083163, 1 %144 = getelementptr inbounds double, ptr %141, i64 %139 %or.cond.i.i = icmp eq i64 %.083163, 1 br i1 %or.cond.i.i, label %.thread.i, label %_ZNK5Eigen10MatrixBaseINS_5BlockIKNS1_INS1_INS_6MatrixIdLi2ELin1ELi1ELi2ELin1EEELi2ELi1ELb0EEELin1ELi1ELb0EEELin1ELi1ELb0EEEE11squaredNormEv.exit.i.i diff --git a/bench/clamav/optimized/kwajd.c.ll b/bench/clamav/optimized/kwajd.c.ll index 651989b22e1..65cbfa73376 100644 --- a/bench/clamav/optimized/kwajd.c.ll +++ b/bench/clamav/optimized/kwajd.c.ll @@ -2379,111 +2379,112 @@ define internal fastcc range(i32 0, 2) i32 @make_decode_table(i32 noundef range( %25 = zext nneg i32 %24 to i64 %scevgep = getelementptr i8, ptr %2, i64 %25 %26 = shl nuw nsw i16 %22, 1 - %narrow = sub nuw nsw i16 1024, %26 - %27 = zext nneg i16 %narrow to i64 - tail call void @llvm.memset.p0.i64(ptr align 2 %scevgep, i8 -1, i64 %27, i1 false) + %27 = xor i16 %26, 1022 + %narrow = add nuw nsw i16 %27, 2 + %28 = zext nneg i16 %narrow to i64 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %scevgep, i8 -1, i64 %28, i1 false) br label %._crit_edge ._crit_edge: ; preds = %.lr.ph.preheader, %21 - %28 = shl i32 %.2, 16 - %29 = trunc nuw nsw i32 %0 to i16 + %29 = shl i32 %.2, 16 + %30 = trunc nuw nsw i32 %0 to i16 br label %.preheader.split.us.preheader .preheader.split.us.preheader: ; preds = %.split129.us, %._crit_edge %indvars.iv145 = phi i32 [ 10, %._crit_edge ], [ %indvars.iv.next146, %.split129.us ] %indvars.iv = phi i32 [ 1, %._crit_edge ], [ %indvars.iv.next, %.split129.us ] - %.1135 = phi i32 [ 32768, %._crit_edge ], [ %62, %.split129.us ] - %.3134 = phi i32 [ %28, %._crit_edge ], [ %.5.us, %.split129.us ] + %.1135 = phi i32 [ 32768, %._crit_edge ], [ %63, %.split129.us ] + %.3134 = phi i32 [ %29, %._crit_edge ], [ %.5.us, %.split129.us ] %.082132 = phi i16 [ 256, %._crit_edge ], [ %.284.us, %.split129.us ] br label %.preheader.split.us -.preheader.split.us: ; preds = %.preheader.split.us.preheader, %37 - %.4127.us = phi i32 [ %.5.us, %37 ], [ %.3134, %.preheader.split.us.preheader ] - %.183126.us = phi i16 [ %.284.us, %37 ], [ %.082132, %.preheader.split.us.preheader ] - %.289125.us = phi i16 [ %38, %37 ], [ 0, %.preheader.split.us.preheader ] - %30 = zext nneg i16 %.289125.us to i64 - %31 = getelementptr inbounds nuw i8, ptr %1, i64 %30 - %32 = load i8, ptr %31, align 1 - %33 = zext i8 %32 to i32 - %.not.us = icmp eq i32 %indvars.iv145, %33 - br i1 %.not.us, label %34, label %37 - -34: ; preds = %.preheader.split.us - %35 = icmp ugt i32 %.4127.us, 33554431 - br i1 %35, label %.loopexit, label %.lr.ph122.us - -.lr.ph122.us: ; preds = %34 - %36 = lshr i32 %.4127.us, 16 - br label %40 - -37: ; preds = %._crit_edge123.us, %.preheader.split.us +.preheader.split.us: ; preds = %.preheader.split.us.preheader, %38 + %.4127.us = phi i32 [ %.5.us, %38 ], [ %.3134, %.preheader.split.us.preheader ] + %.183126.us = phi i16 [ %.284.us, %38 ], [ %.082132, %.preheader.split.us.preheader ] + %.289125.us = phi i16 [ %39, %38 ], [ 0, %.preheader.split.us.preheader ] + %31 = zext nneg i16 %.289125.us to i64 + %32 = getelementptr inbounds nuw i8, ptr %1, i64 %31 + %33 = load i8, ptr %32, align 1 + %34 = zext i8 %33 to i32 + %.not.us = icmp eq i32 %indvars.iv145, %34 + br i1 %.not.us, label %35, label %38 + +35: ; preds = %.preheader.split.us + %36 = icmp ugt i32 %.4127.us, 33554431 + br i1 %36, label %.loopexit, label %.lr.ph122.us + +.lr.ph122.us: ; preds = %35 + %37 = lshr i32 %.4127.us, 16 + br label %41 + +38: ; preds = %._crit_edge123.us, %.preheader.split.us %.284.us = phi i16 [ %.183126.us, %.preheader.split.us ], [ %.486.us, %._crit_edge123.us ] - %.5.us = phi i32 [ %.4127.us, %.preheader.split.us ], [ %61, %._crit_edge123.us ] - %38 = add nuw nsw i16 %.289125.us, 1 - %39 = icmp samesign ult i16 %38, %29 - br i1 %39, label %.preheader.split.us, label %.split129.us - -40: ; preds = %.lr.ph122.us, %54 - %.178120.us = phi i32 [ 0, %.lr.ph122.us ], [ %58, %54 ] - %.180119.us = phi i32 [ %36, %.lr.ph122.us ], [ %spec.select.us, %54 ] - %.385118.us = phi i16 [ %.183126.us, %.lr.ph122.us ], [ %.486.us, %54 ] - %41 = zext nneg i32 %.180119.us to i64 - %42 = getelementptr inbounds nuw i16, ptr %2, i64 %41 - %43 = load i16, ptr %42, align 2 - %44 = icmp eq i16 %43, -1 - br i1 %44, label %45, label %._crit_edge149 - -._crit_edge149: ; preds = %40 - %.pre = zext i16 %43 to i32 + %.5.us = phi i32 [ %.4127.us, %.preheader.split.us ], [ %62, %._crit_edge123.us ] + %39 = add nuw nsw i16 %.289125.us, 1 + %40 = icmp samesign ult i16 %39, %30 + br i1 %40, label %.preheader.split.us, label %.split129.us + +41: ; preds = %.lr.ph122.us, %55 + %.178120.us = phi i32 [ 0, %.lr.ph122.us ], [ %59, %55 ] + %.180119.us = phi i32 [ %37, %.lr.ph122.us ], [ %spec.select.us, %55 ] + %.385118.us = phi i16 [ %.183126.us, %.lr.ph122.us ], [ %.486.us, %55 ] + %42 = zext nneg i32 %.180119.us to i64 + %43 = getelementptr inbounds nuw i16, ptr %2, i64 %42 + %44 = load i16, ptr %43, align 2 + %45 = icmp eq i16 %44, -1 + br i1 %45, label %46, label %._crit_edge149 + +._crit_edge149: ; preds = %41 + %.pre = zext i16 %44 to i32 %.pre150 = shl nuw nsw i32 %.pre, 1 - br label %54 - -45: ; preds = %40 - %46 = zext i16 %.385118.us to i32 - %47 = shl nuw nsw i32 %46, 1 - %48 = zext nneg i32 %47 to i64 - %49 = getelementptr inbounds nuw i16, ptr %2, i64 %48 - store i16 -1, ptr %49, align 2 - %50 = or disjoint i32 %47, 1 - %51 = zext nneg i32 %50 to i64 - %52 = getelementptr inbounds nuw i16, ptr %2, i64 %51 - store i16 -1, ptr %52, align 2 - %53 = add i16 %.385118.us, 1 - store i16 %.385118.us, ptr %42, align 2 - br label %54 - -54: ; preds = %._crit_edge149, %45 - %.pre-phi151 = phi i32 [ %.pre150, %._crit_edge149 ], [ %47, %45 ] - %.486.us = phi i16 [ %.385118.us, %._crit_edge149 ], [ %53, %45 ] - %55 = sub nuw nsw i32 15, %.178120.us - %56 = lshr i32 %.4127.us, %55 - %57 = and i32 %56, 1 - %spec.select.us = or disjoint i32 %.pre-phi151, %57 - %58 = add nuw nsw i32 %.178120.us, 1 - %exitcond144.not = icmp eq i32 %58, %indvars.iv - br i1 %exitcond144.not, label %._crit_edge123.us, label %40 - -._crit_edge123.us: ; preds = %54 - %59 = zext nneg i32 %spec.select.us to i64 - %60 = getelementptr inbounds nuw i16, ptr %2, i64 %59 - store i16 %.289125.us, ptr %60, align 2 - %61 = add nuw nsw i32 %.4127.us, %.1135 - br label %37 - -.split129.us: ; preds = %37 - %62 = lshr i32 %.1135, 1 + br label %55 + +46: ; preds = %41 + %47 = zext i16 %.385118.us to i32 + %48 = shl nuw nsw i32 %47, 1 + %49 = zext nneg i32 %48 to i64 + %50 = getelementptr inbounds nuw i16, ptr %2, i64 %49 + store i16 -1, ptr %50, align 2 + %51 = or disjoint i32 %48, 1 + %52 = zext nneg i32 %51 to i64 + %53 = getelementptr inbounds nuw i16, ptr %2, i64 %52 + store i16 -1, ptr %53, align 2 + %54 = add i16 %.385118.us, 1 + store i16 %.385118.us, ptr %43, align 2 + br label %55 + +55: ; preds = %._crit_edge149, %46 + %.pre-phi151 = phi i32 [ %.pre150, %._crit_edge149 ], [ %48, %46 ] + %.486.us = phi i16 [ %.385118.us, %._crit_edge149 ], [ %54, %46 ] + %56 = xor i32 %.178120.us, 15 + %57 = lshr i32 %.4127.us, %56 + %58 = and i32 %57, 1 + %spec.select.us = or disjoint i32 %.pre-phi151, %58 + %59 = add nuw nsw i32 %.178120.us, 1 + %exitcond144.not = icmp eq i32 %59, %indvars.iv + br i1 %exitcond144.not, label %._crit_edge123.us, label %41 + +._crit_edge123.us: ; preds = %55 + %60 = zext nneg i32 %spec.select.us to i64 + %61 = getelementptr inbounds nuw i16, ptr %2, i64 %60 + store i16 %.289125.us, ptr %61, align 2 + %62 = add nuw nsw i32 %.4127.us, %.1135 + br label %38 + +.split129.us: ; preds = %38 + %63 = lshr i32 %.1135, 1 %indvars.iv.next146 = add nuw nsw i32 %indvars.iv145, 1 %indvars.iv.next = add nuw nsw i32 %indvars.iv, 1 %exitcond148.not = icmp eq i32 %indvars.iv.next146, 17 - br i1 %exitcond148.not, label %63, label %.preheader.split.us.preheader + br i1 %exitcond148.not, label %64, label %.preheader.split.us.preheader -63: ; preds = %.split129.us - %64 = icmp ne i32 %.5.us, 33554432 - %65 = zext i1 %64 to i32 +64: ; preds = %.split129.us + %65 = icmp ne i32 %.5.us, 33554432 + %66 = zext i1 %65 to i32 br label %.loopexit -.loopexit: ; preds = %8, %34, %19, %63 - %.090 = phi i32 [ %65, %63 ], [ 0, %19 ], [ 1, %34 ], [ 1, %8 ] +.loopexit: ; preds = %8, %35, %19, %64 + %.090 = phi i32 [ %66, %64 ], [ 0, %19 ], [ 1, %35 ], [ 1, %8 ] ret i32 %.090 } diff --git a/bench/clamav/optimized/readdb.c.ll b/bench/clamav/optimized/readdb.c.ll index c2a299073de..718696ffb33 100644 --- a/bench/clamav/optimized/readdb.c.ll +++ b/bench/clamav/optimized/readdb.c.ll @@ -7275,29 +7275,28 @@ define internal fastcc i32 @cli_loadign(ptr noundef %0, ptr nocapture noundef %1 br i1 %45, label %46, label %.loopexit 46: ; preds = %44 + %47 = xor i32 %42, 3 %.not78 = icmp eq ptr %.058, %5 - br i1 %.not78, label %.lr.ph.preheader, label %47 + br i1 %.not78, label %.lr.ph.preheader, label %48 -47: ; preds = %46 - %48 = and i64 %41, 3 - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %5, ptr align 1 %.058, i64 %48, i1 false) +48: ; preds = %46 + %49 = and i64 %41, 3 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %5, ptr align 1 %.058, i64 %49, i1 false) br label %.lr.ph.preheader -.lr.ph.preheader: ; preds = %46, %47 - %.260 = phi ptr [ %5, %47 ], [ %.058, %46 ] +.lr.ph.preheader: ; preds = %46, %48 + %.260 = phi ptr [ %5, %48 ], [ %.058, %46 ] store i8 0, ptr %21, align 1 - %49 = and i64 %41, 3 - %50 = xor i64 %49, 3 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %indvars.iv = phi i64 [ %50, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] - %indvars.iv.next = add nsw i64 %indvars.iv, -1 - %51 = sub nuw nsw i64 3, %indvars.iv - %52 = getelementptr inbounds nuw [8192 x i8], ptr %5, i64 0, i64 %51 - store i8 32, ptr %52, align 1 - %53 = trunc nuw i64 %indvars.iv to i32 - %54 = icmp sgt i32 %53, 1 + %.0106 = phi i32 [ %50, %.lr.ph ], [ %47, %.lr.ph.preheader ] + %50 = add nsw i32 %.0106, -1 + %51 = xor i32 %.0106, 3 + %52 = zext nneg i32 %51 to i64 + %53 = getelementptr inbounds nuw [8192 x i8], ptr %5, i64 0, i64 %52 + store i8 32, ptr %53, align 1 + %54 = icmp samesign ugt i32 %.0106, 1 br i1 %54, label %.lr.ph, label %.loopexit .loopexit: ; preds = %.lr.ph, %44 @@ -13792,7 +13791,7 @@ define internal fastcc range(i32 0, 2) i32 @cli_chkign(ptr noundef nonnull %0, p %6 = icmp ne ptr %1, null %7 = icmp ne ptr %2, null %or.cond3 = and i1 %6, %7 - br i1 %or.cond3, label %8, label %52 + br i1 %or.cond3, label %8, label %51 8: ; preds = %3 %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #20 @@ -13844,18 +13843,17 @@ define internal fastcc range(i32 0, 2) i32 @cli_chkign(ptr noundef nonnull %0, p br i1 %.not38.i, label %cli_signorm.exit, label %34 34: ; preds = %31 - %spec.select.i = tail call i64 @llvm.usub.sat.i64(i64 3, i64 %.029.i) - %35 = sub nuw i64 %spec.select40.i, %spec.select.i - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %33, ptr nonnull align 1 %1, i64 %35, i1 false) - %36 = getelementptr inbounds i8, ptr %33, i64 %spec.select40.i - store i8 0, ptr %36, align 1 + %35 = tail call i64 @llvm.umin.i64(i64 %.029.i, i64 3) + %spec.select.i = xor i64 %35, 3 + %36 = sub nuw i64 %spec.select40.i, %spec.select.i + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %33, ptr nonnull align 1 %1, i64 %36, i1 false) + %37 = getelementptr inbounds i8, ptr %33, i64 %spec.select40.i + store i8 0, ptr %37, align 1 %.not3942.i = icmp ugt i64 %.029.i, 2 br i1 %.not3942.i, label %cli_signorm.exit, label %.lr.ph.preheader.i .lr.ph.preheader.i: ; preds = %34 - %37 = getelementptr i8, ptr %33, i64 %.029.i - %38 = getelementptr i8, ptr %37, i64 %spec.select40.i - %scevgep.i = getelementptr i8, ptr %38, i64 -3 + %scevgep.i = getelementptr i8, ptr %33, i64 %36 tail call void @llvm.memset.p0.i64(ptr align 1 %scevgep.i, i8 32, i64 %spec.select.i, i1 false) br label %cli_signorm.exit @@ -13863,39 +13861,39 @@ cli_signorm.exit: ; preds = %16, %22, %24, %29, %.0.i = phi ptr [ null, %16 ], [ null, %24 ], [ null, %29 ], [ null, %31 ], [ null, %22 ], [ %33, %34 ], [ %33, %.lr.ph.preheader.i ] %.not = icmp eq ptr %.0.i, null %spec.select = select i1 %.not, ptr %1, ptr %.0.i - %39 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %spec.select) #20 - %40 = trunc i64 %39 to i32 - %41 = call i32 @cli_bm_scanbuff(ptr noundef nonnull %spec.select, i32 noundef %40, ptr noundef nonnull %4, ptr noundef null, ptr noundef nonnull %0, i32 noundef 0, ptr noundef null, ptr noundef null, ptr noundef null) #21 - %42 = icmp eq i32 %41, 1 - br i1 %42, label %43, label %50 + %38 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %spec.select) #20 + %39 = trunc i64 %38 to i32 + %40 = call i32 @cli_bm_scanbuff(ptr noundef nonnull %spec.select, i32 noundef %39, ptr noundef nonnull %4, ptr noundef null, ptr noundef nonnull %0, i32 noundef 0, ptr noundef null, ptr noundef null, ptr noundef null) #21 + %41 = icmp eq i32 %40, 1 + br i1 %41, label %42, label %49 -43: ; preds = %cli_signorm.exit - %44 = load ptr, ptr %4, align 8 - %.not24 = icmp eq ptr %44, null - br i1 %.not24, label %49, label %45 +42: ; preds = %cli_signorm.exit + %43 = load ptr, ptr %4, align 8 + %.not24 = icmp eq ptr %43, null + br i1 %.not24, label %48, label %44 -45: ; preds = %43 - %46 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #20 - %47 = call ptr @cl_hash_data(ptr noundef nonnull @.str.219, ptr noundef nonnull %2, i64 noundef %46, ptr noundef nonnull %5, ptr noundef null) #21 - %48 = load ptr, ptr %4, align 8 - %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %5, ptr noundef nonnull dereferenceable(16) %48, i64 16) +44: ; preds = %42 + %45 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #20 + %46 = call ptr @cl_hash_data(ptr noundef nonnull @.str.219, ptr noundef nonnull %2, i64 noundef %45, ptr noundef nonnull %5, ptr noundef null) #21 + %47 = load ptr, ptr %4, align 8 + %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %5, ptr noundef nonnull dereferenceable(16) %47, i64 16) %.not25 = icmp eq i32 %bcmp, 0 - br i1 %.not25, label %49, label %50 + br i1 %.not25, label %48, label %49 -49: ; preds = %45, %43 +48: ; preds = %44, %42 call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.220, ptr noundef nonnull %spec.select) #21 - br label %50 + br label %49 -50: ; preds = %49, %45, %cli_signorm.exit - %.0 = phi i32 [ 0, %45 ], [ 1, %49 ], [ 0, %cli_signorm.exit ] - br i1 %.not, label %52, label %51 +49: ; preds = %48, %44, %cli_signorm.exit + %.0 = phi i32 [ 0, %44 ], [ 1, %48 ], [ 0, %cli_signorm.exit ] + br i1 %.not, label %51, label %50 -51: ; preds = %50 +50: ; preds = %49 call void @free(ptr noundef nonnull %.0.i) #21 - br label %52 + br label %51 -52: ; preds = %50, %51, %3 - %.018 = phi i32 [ 0, %3 ], [ %.0, %51 ], [ %.0, %50 ] +51: ; preds = %49, %50, %3 + %.018 = phi i32 [ 0, %3 ], [ %.0, %50 ], [ %.0, %49 ] ret i32 %.018 } @@ -15715,9 +15713,6 @@ declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #18 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #18 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #18 diff --git a/bench/clamav/optimized/unpack.cpp.ll b/bench/clamav/optimized/unpack.cpp.ll index 1f498323bdd..9cc66b69474 100644 --- a/bench/clamav/optimized/unpack.cpp.ll +++ b/bench/clamav/optimized/unpack.cpp.ll @@ -7730,74 +7730,77 @@ define void @_ZN6Unpack16MakeDecodeTablesEPhP11DecodeTablej(ptr nocapture nonnul %51 = getelementptr inbounds nuw i8, ptr %2, i64 1160 br label %52 -52: ; preds = %47, %82 - %.07197 = phi i32 [ 0, %47 ], [ %84, %82 ] - %.07296 = phi i32 [ 1, %47 ], [ %.183, %82 ] +52: ; preds = %47, %85 + %.07197 = phi i32 [ 0, %47 ], [ %87, %85 ] + %.07296 = phi i32 [ 1, %47 ], [ %.183, %85 ] %53 = shl i32 %.07197, %49 %54 = icmp ult i32 %.07296, 16 br i1 %54, label %.lr.ph94.preheader, label %.critedge .lr.ph94.preheader: ; preds = %52 %55 = zext nneg i32 %.07296 to i64 + %56 = add nuw nsw i32 %.07296, 1 + %57 = xor i32 %.07296, 15 + %58 = add nuw nsw i32 %56, %57 br label %.lr.ph94 -.lr.ph94: ; preds = %.lr.ph94.preheader, %58 - %indvars.iv107 = phi i64 [ %55, %.lr.ph94.preheader ], [ %indvars.iv.next108, %58 ] - %56 = getelementptr inbounds nuw [16 x i32], ptr %19, i64 0, i64 %indvars.iv107 - %57 = load i32, ptr %56, align 4 - %.not = icmp ult i32 %53, %57 - br i1 %.not, label %62, label %58 +.lr.ph94: ; preds = %.lr.ph94.preheader, %61 + %indvars.iv107 = phi i64 [ %55, %.lr.ph94.preheader ], [ %indvars.iv.next108, %61 ] + %59 = getelementptr inbounds nuw [16 x i32], ptr %19, i64 0, i64 %indvars.iv107 + %60 = load i32, ptr %59, align 4 + %.not = icmp ult i32 %53, %60 + br i1 %.not, label %65, label %61 -58: ; preds = %.lr.ph94 +61: ; preds = %.lr.ph94 %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1 %exitcond110.not = icmp eq i64 %indvars.iv.next108, 16 br i1 %exitcond110.not, label %.critedge, label %.lr.ph94, !llvm.loop !70 -.critedge: ; preds = %58, %52 - %.1.lcssa = phi i32 [ %.07296, %52 ], [ 16, %58 ] - %59 = trunc i32 %.1.lcssa to i8 - %60 = zext i32 %.07197 to i64 - %61 = getelementptr inbounds nuw [1024 x i8], ptr %50, i64 0, i64 %60 - store i8 %59, ptr %61, align 1 - br label %82 +.critedge: ; preds = %61, %52 + %.1.lcssa = phi i32 [ %.07296, %52 ], [ %58, %61 ] + %62 = trunc i32 %.1.lcssa to i8 + %63 = zext i32 %.07197 to i64 + %64 = getelementptr inbounds nuw [1024 x i8], ptr %50, i64 0, i64 %63 + store i8 %62, ptr %64, align 1 + br label %85 -62: ; preds = %.lr.ph94 - %63 = trunc nuw nsw i64 %indvars.iv107 to i32 - %64 = trunc i64 %indvars.iv107 to i8 - %65 = zext i32 %.07197 to i64 - %66 = getelementptr inbounds nuw [1024 x i8], ptr %50, i64 0, i64 %65 - store i8 %64, ptr %66, align 1 - %67 = add nuw i64 %indvars.iv107, 4294967295 - %68 = and i64 %67, 4294967295 - %69 = getelementptr inbounds nuw [16 x i32], ptr %19, i64 0, i64 %68 - %70 = load i32, ptr %69, align 4 - %71 = sub i32 %53, %70 - %72 = sub nuw nsw i32 16, %63 - %73 = lshr i32 %71, %72 - %74 = getelementptr inbounds nuw [16 x i32], ptr %18, i64 0, i64 %indvars.iv107 - %75 = load i32, ptr %74, align 4 - %76 = add i32 %73, %75 - %77 = icmp ult i32 %76, %3 - br i1 %77, label %78, label %82 - -78: ; preds = %62 - %79 = zext i32 %76 to i64 - %80 = getelementptr inbounds nuw [306 x i16], ptr %16, i64 0, i64 %79 - %81 = load i16, ptr %80, align 2 - br label %82 +65: ; preds = %.lr.ph94 + %66 = trunc nuw nsw i64 %indvars.iv107 to i32 + %67 = trunc i64 %indvars.iv107 to i8 + %68 = zext i32 %.07197 to i64 + %69 = getelementptr inbounds nuw [1024 x i8], ptr %50, i64 0, i64 %68 + store i8 %67, ptr %69, align 1 + %70 = add nuw i64 %indvars.iv107, 4294967295 + %71 = and i64 %70, 4294967295 + %72 = getelementptr inbounds nuw [16 x i32], ptr %19, i64 0, i64 %71 + %73 = load i32, ptr %72, align 4 + %74 = sub i32 %53, %73 + %75 = sub nuw nsw i32 16, %66 + %76 = lshr i32 %74, %75 + %77 = getelementptr inbounds nuw [16 x i32], ptr %18, i64 0, i64 %indvars.iv107 + %78 = load i32, ptr %77, align 4 + %79 = add i32 %76, %78 + %80 = icmp ult i32 %79, %3 + br i1 %80, label %81, label %85 + +81: ; preds = %65 + %82 = zext i32 %79 to i64 + %83 = getelementptr inbounds nuw [306 x i16], ptr %16, i64 0, i64 %82 + %84 = load i16, ptr %83, align 2 + br label %85 -82: ; preds = %62, %.critedge, %78 - %.sink115 = phi i64 [ %65, %78 ], [ %65, %62 ], [ %60, %.critedge ] - %.sink113 = phi i16 [ %81, %78 ], [ 0, %62 ], [ 0, %.critedge ] - %.183 = phi i32 [ %63, %78 ], [ %63, %62 ], [ %.1.lcssa, %.critedge ] - %83 = getelementptr inbounds nuw [1024 x i16], ptr %51, i64 0, i64 %.sink115 - store i16 %.sink113, ptr %83, align 2 - %84 = add i32 %.07197, 1 - %.071.highbits = lshr i32 %84, %.sink - %85 = icmp eq i32 %.071.highbits, 0 - br i1 %85, label %52, label %86, !llvm.loop !71 - -86: ; preds = %82 +85: ; preds = %65, %.critedge, %81 + %.sink115 = phi i64 [ %68, %81 ], [ %68, %65 ], [ %63, %.critedge ] + %.sink113 = phi i16 [ %84, %81 ], [ 0, %65 ], [ 0, %.critedge ] + %.183 = phi i32 [ %66, %81 ], [ %66, %65 ], [ %.1.lcssa, %.critedge ] + %86 = getelementptr inbounds nuw [1024 x i16], ptr %51, i64 0, i64 %.sink115 + store i16 %.sink113, ptr %86, align 2 + %87 = add i32 %.07197, 1 + %.071.highbits = lshr i32 %87, %.sink + %88 = icmp eq i32 %.071.highbits, 0 + br i1 %88, label %52, label %89, !llvm.loop !71 + +89: ; preds = %85 ret void } diff --git a/bench/crow/optimized/example.cpp.ll b/bench/crow/optimized/example.cpp.ll index e7083ed9b90..c9ab87451df 100644 --- a/bench/crow/optimized/example.cpp.ll +++ b/bench/crow/optimized/example.cpp.ll @@ -58775,8 +58775,8 @@ _ZNSt6vectorISt6futureIvESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__norm %181 = load ptr, ptr %179, align 8, !tbaa !150 %182 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #36 %183 = icmp sgt i64 %182, -1 - %184 = sub nuw nsw i64 9223372036854775807, %182 - %185 = icmp samesign ult i64 %184, %180 + %184 = xor i64 %182, 9223372036854775807 + %185 = icmp slt i64 %184, %180 %or.cond = select i1 %183, i1 %185, i1 false %186 = add nsw i64 %182, %180 %187 = select i1 %or.cond, i64 9223372036854775807, i64 %186 @@ -76494,7 +76494,7 @@ define linkonce_odr dso_local noundef i64 @_ZNK4asio6detail11timer_queueINS0_18c br i1 %15, label %28, label %16 16: ; preds = %14 - %17 = sub nuw nsw i64 9223372036854775807, %10 + %17 = xor i64 %10, 9223372036854775807 %18 = sub nsw i64 0, %9 %19 = icmp samesign ult i64 %17, %18 %20 = sub nsw i64 %10, %9 @@ -76553,7 +76553,7 @@ define linkonce_odr dso_local noundef i64 @_ZNK4asio6detail11timer_queueINS0_18c br i1 %15, label %28, label %16 16: ; preds = %14 - %17 = sub nuw nsw i64 9223372036854775807, %10 + %17 = xor i64 %10, 9223372036854775807 %18 = sub nsw i64 0, %9 %19 = icmp samesign ult i64 %17, %18 %20 = sub nsw i64 %10, %9 @@ -80237,7 +80237,7 @@ define linkonce_odr dso_local noundef i64 @_ZNK4asio6detail11timer_queueINS0_18c br i1 %15, label %28, label %16 16: ; preds = %14 - %17 = sub nuw nsw i64 9223372036854775807, %10 + %17 = xor i64 %10, 9223372036854775807 %18 = sub nsw i64 0, %9 %19 = icmp samesign ult i64 %17, %18 %20 = sub nsw i64 %10, %9 @@ -80296,7 +80296,7 @@ define linkonce_odr dso_local noundef i64 @_ZNK4asio6detail11timer_queueINS0_18c br i1 %15, label %28, label %16 16: ; preds = %14 - %17 = sub nuw nsw i64 9223372036854775807, %10 + %17 = xor i64 %10, 9223372036854775807 %18 = sub nsw i64 0, %9 %19 = icmp samesign ult i64 %17, %18 %20 = sub nsw i64 %10, %9 @@ -83820,7 +83820,7 @@ define linkonce_odr dso_local void @_ZN4crow6ServerINS_4CrowIJ17ExampleMiddlewar br i1 %17, label %18, label %21 18: ; preds = %7 - %19 = sub nuw nsw i64 9223372036854775807, %16 + %19 = xor i64 %16, 9223372036854775807 %20 = icmp slt i64 %19, %14 br i1 %20, label %27, label %25 diff --git a/bench/cvc5/optimized/relational_match_generator.cpp.ll b/bench/cvc5/optimized/relational_match_generator.cpp.ll index 2e8286a4e06..9249a41e2db 100644 --- a/bench/cvc5/optimized/relational_match_generator.cpp.ll +++ b/bench/cvc5/optimized/relational_match_generator.cpp.ll @@ -543,13 +543,12 @@ invoke.cont44: ; preds = %lor.lhs.false.i.i.i to label %call2.i.i.i.noexc308 unwind label %lpad10.loopexit.split-lp call2.i.i.i.noexc308: ; preds = %invoke.cont44 + %conv48 = xor i64 %i.0681, 1 %cmp.i.i289 = icmp eq i32 %call2.i.i.i309, 2 %inc.i.i290 = zext i1 %cmp.i.i289 to i64 - %reass.sub682 = sub nsw i64 %inc.i.i290, %i.0681 - %spec.select.i.i291 = add nsw i64 %reass.sub682, 1 + %spec.select.i.i291 = add nuw nsw i64 %conv48, %inc.i.i290 %d_children.i.i292 = getelementptr inbounds nuw i8, ptr %48, i64 16 - %idxprom.i.i293 = and i64 %spec.select.i.i291, 4294967295 - %arrayidx.i.i294 = getelementptr inbounds nuw [0 x ptr], ptr %d_children.i.i292, i64 0, i64 %idxprom.i.i293 + %arrayidx.i.i294 = getelementptr inbounds nuw [0 x ptr], ptr %d_children.i.i292, i64 0, i64 %spec.select.i.i291 %49 = load ptr, ptr %arrayidx.i.i294, align 8, !noalias !17 store ptr %49, ptr %ref.tmp47, align 8, !alias.scope !17 %bf.load.i.i.i295 = load i64, ptr %49, align 8, !noalias !17 diff --git a/bench/eastl/optimized/Int128_t.cpp.ll b/bench/eastl/optimized/Int128_t.cpp.ll index 6f024ffead8..731faa2d160 100644 --- a/bench/eastl/optimized/Int128_t.cpp.ll +++ b/bench/eastl/optimized/Int128_t.cpp.ll @@ -2472,9 +2472,10 @@ if.else13: ; preds = %if.else for.body: ; preds = %for.inc, %if.else13 %i.0102 = phi i32 [ 0, %if.else13 ], [ %inc, %for.inc ] - %rem.i101.cmp = icmp samesign ugt i32 %i.0102, 63 - %rem.i101.v = select i1 %rem.i101.cmp, i32 127, i32 63 - %rem.i101 = sub nsw i32 %rem.i101.v, %i.0102 + %sub = xor i32 %i.0102, 127 + %rem.i101.urem = sub nsw i32 63, %i.0102 + %rem.i101.cmp = icmp samesign ult i32 %sub, 64 + %rem.i101 = select i1 %rem.i101.cmp, i32 %sub, i32 %rem.i101.urem %sh_prom.i = zext nneg i32 %rem.i101 to i64 %retval.0.i.v.v.v = select i1 %rem.i101.cmp, i64 %tempDividend.sroa.0.0, i64 %tempDividend.sroa.6.0 %retval.0.i.v.v = lshr i64 %retval.0.i.v.v.v, %sh_prom.i @@ -2518,7 +2519,7 @@ _ZN2EA4StdCgeERKNS0_8int128_tES3_.exit.thread: ; preds = %if.then8.i.i, %if.e if.then8.i.thread: ; preds = %_ZN2EA4StdCgeERKNS0_8int128_tES3_.exit.thread %15 = load i64, ptr %mPart114.i, align 8 - br label %if.end22.thread + br label %if.else13.i if.then.i62.thread: ; preds = %_ZN2EA4StdCgeERKNS0_8int128_tES3_.exit.thread %16 = load i64, ptr %quotient, align 8 @@ -2543,20 +2544,20 @@ if.else.i63: ; preds = %if.then.i62.thread, if.then8.i: ; preds = %_ZN2EA4StdCgeERKNS0_8int128_tES3_.exit %19 = load i64, ptr %mPart114.i, align 8 - br i1 %retval.0.i.i, label %if.then10.i, label %if.end22.thread + br i1 %retval.0.i.i, label %if.then10.i, label %if.else13.i if.then10.i: ; preds = %if.then8.i %or11.i = or i64 %19, %shl.i store i64 %or11.i, ptr %mPart114.i, align 8 br label %if.then20 -if.end22.thread: ; preds = %if.then8.i, %if.then8.i.thread +if.else13.i: ; preds = %if.then8.i.thread, %if.then8.i %20 = phi i64 [ %15, %if.then8.i.thread ], [ %19, %if.then8.i ] %shl.i108116 = phi i64 [ %shl.i104, %if.then8.i.thread ], [ %shl.i, %if.then8.i ] %not15.i = xor i64 %shl.i108116, -1 %and16.i = and i64 %20, %not15.i store i64 %and16.i, ptr %mPart114.i, align 8 - br label %land.lhs.true + br label %if.end22 if.then20: ; preds = %if.then2.i, %if.then10.i %21 = load i64, ptr %remainder, align 8 @@ -2570,11 +2571,11 @@ if.then20: ; preds = %if.then2.i, %if.the store i64 %sub7.i.i, ptr %mPart12.i.i48, align 8 br label %if.end22 -if.end22: ; preds = %if.else.i63, %if.then20 +if.end22: ; preds = %if.else13.i, %if.else.i63, %if.then20 %cmp23.not = icmp eq i32 %i.0102, 127 br i1 %cmp23.not, label %if.end29, label %land.lhs.true -land.lhs.true: ; preds = %if.end22.thread, %if.end22 +land.lhs.true: ; preds = %if.end22 %23 = load i64, ptr %remainder, align 8 %cmp.i66 = icmp eq i64 %23, 0 %24 = load i64, ptr %mPart12.i.i48, align 8 @@ -5156,9 +5157,10 @@ if.else8: ; preds = %if.else for.body: ; preds = %for.inc, %if.else8 %i.054 = phi i32 [ 0, %if.else8 ], [ %inc, %for.inc ] - %rem.i53.cmp = icmp samesign ugt i32 %i.054, 63 - %rem.i53.v = select i1 %rem.i53.cmp, i32 127, i32 63 - %rem.i53 = sub nsw i32 %rem.i53.v, %i.054 + %sub = xor i32 %i.054, 127 + %rem.i53.urem = sub nsw i32 63, %i.054 + %rem.i53.cmp = icmp samesign ult i32 %sub, 64 + %rem.i53 = select i1 %rem.i53.cmp, i32 %sub, i32 %rem.i53.urem %sh_prom.i = zext nneg i32 %rem.i53 to i64 %retval.0.i.v.v.v = select i1 %rem.i53.cmp, i64 %1, i64 %0 %retval.0.i.v.v = lshr i64 %retval.0.i.v.v.v, %sh_prom.i @@ -5189,7 +5191,7 @@ _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit: ; preds = %if.then.i.i, %if.el _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread: ; preds = %if.then.i.i, %if.else10.i.i %shl.i56 = shl nuw i64 1, %sh_prom.i %not.i = xor i64 %shl.i56, -1 - br i1 %rem.i53.cmp, label %if.else.i38, label %if.end.thread + br i1 %rem.i53.cmp, label %if.else.i38, label %if.else13.i if.then2.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit %8 = load i64, ptr %quotient, align 8 @@ -5209,11 +5211,11 @@ if.then10.i: ; preds = %_ZN2EA4StdCgeERKNS0 store i64 %or11.i, ptr %mPart114.i, align 8 br label %if.then15 -if.end.thread: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread +if.else13.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread %11 = load i64, ptr %mPart114.i, align 8 %and16.i = and i64 %11, %not.i store i64 %and16.i, ptr %mPart114.i, align 8 - br label %land.lhs.true + br label %if.end if.then15: ; preds = %if.then2.i, %if.then10.i %12 = load i64, ptr %remainder, align 8 @@ -5227,11 +5229,11 @@ if.then15: ; preds = %if.then2.i, %if.the store i64 %sub7.i.i, ptr %mPart12.i.i24, align 8 br label %if.end -if.end: ; preds = %if.else.i38, %if.then15 +if.end: ; preds = %if.else13.i, %if.else.i38, %if.then15 %cmp17.not = icmp eq i32 %i.054, 127 br i1 %cmp17.not, label %if.end23, label %land.lhs.true -land.lhs.true: ; preds = %if.end.thread, %if.end +land.lhs.true: ; preds = %if.end %14 = load i64, ptr %remainder, align 8 %cmp.i41 = icmp eq i64 %14, 0 %15 = load i64, ptr %mPart12.i.i24, align 8 @@ -5383,9 +5385,10 @@ for.body.i: ; preds = %if.else.i, %for.inc %ref.tmp.sroa.0.0 = phi i64 [ %ref.tmp.sroa.0.1, %for.inc.i ], [ 0, %if.else.i ] %ref.tmp.sroa.7.0 = phi i64 [ %ref.tmp.sroa.7.1, %for.inc.i ], [ 0, %if.else.i ] %i.054.i = phi i32 [ %inc.i, %for.inc.i ], [ 0, %if.else.i ] - %rem.i53.cmp.i = icmp samesign ugt i32 %i.054.i, 63 - %rem.i53.v.i = select i1 %rem.i53.cmp.i, i32 127, i32 63 - %rem.i53.i = sub nsw i32 %rem.i53.v.i, %i.054.i + %sub.i = xor i32 %i.054.i, 127 + %rem.i53.urem.i = sub nsw i32 63, %i.054.i + %rem.i53.cmp.i = icmp samesign ult i32 %sub.i, 64 + %rem.i53.i = select i1 %rem.i53.cmp.i, i32 %sub.i, i32 %rem.i53.urem.i %sh_prom.i.i = zext nneg i32 %rem.i53.i to i64 %retval.0.i.v.v.v.i = select i1 %rem.i53.cmp.i, i64 %1, i64 %0 %retval.0.i.v.v.i = lshr i64 %retval.0.i.v.v.v.i, %sh_prom.i.i @@ -5405,9 +5408,9 @@ if.else10.i.i.i: ; preds = %for.body.i _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i: ; preds = %if.else10.i.i.i, %if.then.i.i.i %shl.i.i = shl nuw i64 1, %sh_prom.i.i %or.i.i = select i1 %rem.i53.cmp.i, i64 %shl.i.i, i64 0 - %ref.tmp.sroa.0.3 = or i64 %or.i.i, %ref.tmp.sroa.0.0 + %ref.tmp.sroa.0.2 = or i64 %or.i.i, %ref.tmp.sroa.0.0 %or11.i.i = select i1 %rem.i53.cmp.i, i64 0, i64 %shl.i.i - %ref.tmp.sroa.7.3 = or i64 %or11.i.i, %ref.tmp.sroa.7.0 + %ref.tmp.sroa.7.2 = or i64 %or11.i.i, %ref.tmp.sroa.7.0 %sub.i.i.i = sub i64 %add.i.i.i, %3 %cmp.i.i39.i = icmp ult i64 %add.i.i.i, %3 %conv.neg.i.i.i = sext i1 %cmp.i.i39.i to i64 @@ -5418,29 +5421,25 @@ _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i: ; preds = %if.else10.i.i.i, %i _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i: ; preds = %if.else10.i.i.i, %if.then.i.i.i %shl.i56.i = shl nuw i64 1, %sh_prom.i.i %not.i.i = xor i64 %shl.i56.i, -1 - br i1 %rem.i53.cmp.i, label %if.else.i38.i, label %if.end.thread.i + br i1 %rem.i53.cmp.i, label %if.else.i38.i, label %if.else13.i.i if.else.i38.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i %and.i.i = and i64 %ref.tmp.sroa.0.0, %not.i.i br label %if.end.i -if.end.thread.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i +if.else13.i.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i %and16.i.i = and i64 %ref.tmp.sroa.7.0, %not.i.i - br label %land.lhs.true.i + br label %if.end.i -if.end.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i, %if.else.i38.i - %remainder.i.sroa.0.3 = phi i64 [ %add.i.i.i, %if.else.i38.i ], [ %sub.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] - %remainder.i.sroa.11.3 = phi i64 [ %remainder.i.sroa.11.0, %if.else.i38.i ], [ %sub7.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] - %ref.tmp.sroa.0.2 = phi i64 [ %and.i.i, %if.else.i38.i ], [ %ref.tmp.sroa.0.3, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] - %ref.tmp.sroa.7.2 = phi i64 [ %ref.tmp.sroa.7.0, %if.else.i38.i ], [ %ref.tmp.sroa.7.3, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] +if.end.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i, %if.else13.i.i, %if.else.i38.i + %remainder.i.sroa.0.1 = phi i64 [ %add.i.i.i, %if.else.i38.i ], [ %add.i.i.i, %if.else13.i.i ], [ %sub.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] + %remainder.i.sroa.11.1 = phi i64 [ %remainder.i.sroa.11.0, %if.else.i38.i ], [ %remainder.i.sroa.11.0, %if.else13.i.i ], [ %sub7.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] + %ref.tmp.sroa.0.1 = phi i64 [ %and.i.i, %if.else.i38.i ], [ %ref.tmp.sroa.0.0, %if.else13.i.i ], [ %ref.tmp.sroa.0.2, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] + %ref.tmp.sroa.7.1 = phi i64 [ %ref.tmp.sroa.7.0, %if.else.i38.i ], [ %and16.i.i, %if.else13.i.i ], [ %ref.tmp.sroa.7.2, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ] %cmp17.not.i = icmp eq i32 %i.054.i, 127 br i1 %cmp17.not.i, label %_ZNK2EA4StdC9uint128_t7ModulusERKS1_RS1_S4_.exit, label %land.lhs.true.i -land.lhs.true.i: ; preds = %if.end.i, %if.end.thread.i - %remainder.i.sroa.0.1 = phi i64 [ %remainder.i.sroa.0.3, %if.end.i ], [ %add.i.i.i, %if.end.thread.i ] - %remainder.i.sroa.11.1 = phi i64 [ %remainder.i.sroa.11.3, %if.end.i ], [ %remainder.i.sroa.11.0, %if.end.thread.i ] - %ref.tmp.sroa.0.1 = phi i64 [ %ref.tmp.sroa.0.2, %if.end.i ], [ %ref.tmp.sroa.0.0, %if.end.thread.i ] - %ref.tmp.sroa.7.1 = phi i64 [ %ref.tmp.sroa.7.2, %if.end.i ], [ %and16.i.i, %if.end.thread.i ] +land.lhs.true.i: ; preds = %if.end.i %cmp.i41.i = icmp eq i64 %remainder.i.sroa.0.1, 0 %cmp2.i43.i = icmp eq i64 %remainder.i.sroa.11.1, 0 %6 = select i1 %cmp.i41.i, i1 %cmp2.i43.i, i1 false @@ -5458,10 +5457,10 @@ for.inc.i: ; preds = %if.then19.i, %land. br label %for.body.i _ZNK2EA4StdC9uint128_t7ModulusERKS1_RS1_S4_.exit: ; preds = %if.end.i, %if.else.i, %entry - %ref.tmp.sroa.0.4 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.0.2, %if.end.i ] - %ref.tmp.sroa.7.4 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.7.2, %if.end.i ] - store i64 %ref.tmp.sroa.7.4, ptr %mPart1.i.i.i, align 8 - store i64 %ref.tmp.sroa.0.4, ptr %this, align 8 + %ref.tmp.sroa.0.3 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.0.1, %if.end.i ] + %ref.tmp.sroa.7.3 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.7.1, %if.end.i ] + store i64 %ref.tmp.sroa.7.3, ptr %mPart1.i.i.i, align 8 + store i64 %ref.tmp.sroa.0.3, ptr %this, align 8 ret ptr %this } @@ -5489,9 +5488,10 @@ for.body.i: ; preds = %if.else.i, %for.inc %ref.tmp.sroa.0.0 = phi i64 [ %ref.tmp.sroa.0.2, %for.inc.i ], [ 0, %if.else.i ] %ref.tmp.sroa.10.0 = phi i64 [ %ref.tmp.sroa.10.2, %for.inc.i ], [ 0, %if.else.i ] %i.054.i = phi i32 [ %inc.i, %for.inc.i ], [ 0, %if.else.i ] - %rem.i53.cmp.i = icmp samesign ugt i32 %i.054.i, 63 - %rem.i53.v.i = select i1 %rem.i53.cmp.i, i32 127, i32 63 - %rem.i53.i = sub nsw i32 %rem.i53.v.i, %i.054.i + %sub.i = xor i32 %i.054.i, 127 + %rem.i53.urem.i = sub nsw i32 63, %i.054.i + %rem.i53.cmp.i = icmp samesign ult i32 %sub.i, 64 + %rem.i53.i = select i1 %rem.i53.cmp.i, i32 %sub.i, i32 %rem.i53.urem.i %sh_prom.i.i = zext nneg i32 %rem.i53.i to i64 %retval.0.i.v.v.v.i = select i1 %rem.i53.cmp.i, i64 %1, i64 %0 %retval.0.i.v.v.i = lshr i64 %retval.0.i.v.v.v.i, %sh_prom.i.i @@ -5502,11 +5502,11 @@ for.body.i: ; preds = %if.else.i, %for.inc if.then.i.i.i: ; preds = %for.body.i %or.cond.not.i.i = icmp ult i64 %add.i.i.i, %3 - br i1 %or.cond.not.i.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i + br i1 %or.cond.not.i.i, label %if.end.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i if.else10.i.i.i: ; preds = %for.body.i %cmp13.i.i.i = icmp ugt i64 %ref.tmp.sroa.10.0, %2 - br i1 %cmp13.i.i.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i + br i1 %cmp13.i.i.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i, label %if.end.i _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i: ; preds = %if.else10.i.i.i, %if.then.i.i.i %sub.i.i.i = sub i64 %add.i.i.i, %3 @@ -5516,18 +5516,13 @@ _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i: ; preds = %if.else10.i.i.i, %i %sub7.i.i.i = add i64 %sub6.i.i.i, %conv.neg.i.i.i br label %if.end.i -_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i: ; preds = %if.else10.i.i.i, %if.then.i.i.i - br i1 %rem.i53.cmp.i, label %if.end.i, label %land.lhs.true.i - -if.end.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i - %ref.tmp.sroa.0.3 = phi i64 [ %sub.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ], [ %add.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] - %ref.tmp.sroa.10.3 = phi i64 [ %sub7.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ], [ %ref.tmp.sroa.10.0, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] +if.end.i: ; preds = %if.then.i.i.i, %if.else10.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i + %ref.tmp.sroa.0.1 = phi i64 [ %sub.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ], [ %add.i.i.i, %if.else10.i.i.i ], [ %add.i.i.i, %if.then.i.i.i ] + %ref.tmp.sroa.10.1 = phi i64 [ %sub7.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ], [ %ref.tmp.sroa.10.0, %if.else10.i.i.i ], [ %ref.tmp.sroa.10.0, %if.then.i.i.i ] %cmp17.not.i = icmp eq i32 %i.054.i, 127 br i1 %cmp17.not.i, label %_ZNK2EA4StdC9uint128_t7ModulusERKS1_RS1_S4_.exit, label %land.lhs.true.i -land.lhs.true.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i, %if.end.i - %ref.tmp.sroa.0.1 = phi i64 [ %ref.tmp.sroa.0.3, %if.end.i ], [ %add.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] - %ref.tmp.sroa.10.1 = phi i64 [ %ref.tmp.sroa.10.3, %if.end.i ], [ %ref.tmp.sroa.10.0, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] +land.lhs.true.i: ; preds = %if.end.i %cmp.i41.i = icmp eq i64 %ref.tmp.sroa.0.1, 0 %cmp2.i43.i = icmp eq i64 %ref.tmp.sroa.10.1, 0 %6 = select i1 %cmp.i41.i, i1 %cmp2.i43.i, i1 false @@ -5545,10 +5540,10 @@ for.inc.i: ; preds = %if.then19.i, %land. br label %for.body.i _ZNK2EA4StdC9uint128_t7ModulusERKS1_RS1_S4_.exit: ; preds = %if.end.i, %if.else.i, %entry - %ref.tmp.sroa.0.4 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.0.3, %if.end.i ] - %ref.tmp.sroa.10.4 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.10.3, %if.end.i ] - store i64 %ref.tmp.sroa.10.4, ptr %mPart1.i.i.i, align 8 - store i64 %ref.tmp.sroa.0.4, ptr %this, align 8 + %ref.tmp.sroa.0.3 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.0.1, %if.end.i ] + %ref.tmp.sroa.10.3 = phi i64 [ 0, %entry ], [ 0, %if.else.i ], [ %ref.tmp.sroa.10.1, %if.end.i ] + store i64 %ref.tmp.sroa.10.3, ptr %mPart1.i.i.i, align 8 + store i64 %ref.tmp.sroa.0.3, ptr %this, align 8 ret ptr %this } @@ -6294,17 +6289,18 @@ while.end.thread: ; preds = %if.then34 for.body.i.preheader: ; preds = %if.then34, %_ZN2EA4StdC9uint128_tdVERKS1_.exit %pValue.addr.5126 = phi ptr [ %incdec.ptr36, %_ZN2EA4StdC9uint128_tdVERKS1_.exit ], [ %pValue, %if.then34 ] - %value.sroa.6.0125 = phi i64 [ %ref.tmp.sroa.7.4.i, %_ZN2EA4StdC9uint128_tdVERKS1_.exit ], [ %5, %if.then34 ] - %value.sroa.0.0124 = phi i64 [ %ref.tmp.sroa.0.4.i, %_ZN2EA4StdC9uint128_tdVERKS1_.exit ], [ %6, %if.then34 ] + %value.sroa.6.0125 = phi i64 [ %ref.tmp.sroa.7.3.i, %_ZN2EA4StdC9uint128_tdVERKS1_.exit ], [ %5, %if.then34 ] + %value.sroa.0.0124 = phi i64 [ %ref.tmp.sroa.0.3.i, %_ZN2EA4StdC9uint128_tdVERKS1_.exit ], [ %6, %if.then34 ] br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %for.inc.i %remainder.sroa.0.1 = phi i64 [ %remainder.sroa.0.3, %for.inc.i ], [ 0, %for.body.i.preheader ] %remainder.sroa.10.1 = phi i64 [ %remainder.sroa.10.3, %for.inc.i ], [ 0, %for.body.i.preheader ] %i.054.i = phi i32 [ %inc.i, %for.inc.i ], [ 0, %for.body.i.preheader ] - %rem.i53.cmp.i = icmp samesign ugt i32 %i.054.i, 63 - %rem.i53.v.i = select i1 %rem.i53.cmp.i, i32 127, i32 63 - %rem.i53.i = sub nsw i32 %rem.i53.v.i, %i.054.i + %sub.i = xor i32 %i.054.i, 127 + %rem.i53.urem.i = sub nsw i32 63, %i.054.i + %rem.i53.cmp.i = icmp samesign ult i32 %sub.i, 64 + %rem.i53.i = select i1 %rem.i53.cmp.i, i32 %sub.i, i32 %rem.i53.urem.i %sh_prom.i.i = zext nneg i32 %rem.i53.i to i64 %retval.0.i.v.v.v.i = select i1 %rem.i53.cmp.i, i64 %value.sroa.0.0124, i64 %value.sroa.6.0125 %retval.0.i.v.v.i = lshr i64 %retval.0.i.v.v.v.i, %sh_prom.i.i @@ -6313,26 +6309,15 @@ for.body.i: ; preds = %for.body.i.preheade %cmp.i.i32.i = icmp eq i64 %remainder.sroa.10.1, 0 %or.cond.not.i.i = icmp ult i64 %add.i.i.i, 10 %or.cond81 = and i1 %cmp.i.i32.i, %or.cond.not.i.i - br i1 %or.cond81, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i, label %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i - -_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i: ; preds = %for.body.i %sub.i.i.i = add i64 %add.i.i.i, -10 %conv.neg.i.i.i = sext i1 %or.cond.not.i.i to i64 %sub7.i.i.i = add i64 %remainder.sroa.10.1, %conv.neg.i.i.i - br label %if.end.i - -_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i: ; preds = %for.body.i - br i1 %rem.i53.cmp.i, label %if.end.i, label %land.lhs.true.i - -if.end.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i - %remainder.sroa.0.4 = phi i64 [ %sub.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ], [ %add.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] - %remainder.sroa.10.4 = phi i64 [ %sub7.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i ], [ 0, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] + %remainder.sroa.0.2 = select i1 %or.cond81, i64 %add.i.i.i, i64 %sub.i.i.i + %remainder.sroa.10.2 = select i1 %or.cond81, i64 0, i64 %sub7.i.i.i %cmp17.not.i = icmp eq i32 %i.054.i, 127 br i1 %cmp17.not.i, label %if.else.i.i, label %land.lhs.true.i -land.lhs.true.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i, %if.end.i - %remainder.sroa.0.2 = phi i64 [ %remainder.sroa.0.4, %if.end.i ], [ %add.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] - %remainder.sroa.10.2 = phi i64 [ %remainder.sroa.10.4, %if.end.i ], [ 0, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i ] +land.lhs.true.i: ; preds = %for.body.i %8 = or i64 %remainder.sroa.10.2, %remainder.sroa.0.2 %9 = icmp eq i64 %8, 0 br i1 %9, label %for.inc.i, label %if.then19.i @@ -6348,8 +6333,8 @@ for.inc.i: ; preds = %if.then19.i, %land. %inc.i = add nuw nsw i32 %i.054.i, 1 br label %for.body.i -if.else.i.i: ; preds = %if.end.i - %10 = trunc i64 %remainder.sroa.0.4 to i8 +if.else.i.i: ; preds = %for.body.i + %10 = trunc i64 %remainder.sroa.0.2 to i8 %conv = add i8 %10, 48 %incdec.ptr36 = getelementptr inbounds nuw i8, ptr %pValue.addr.5126, i64 1 store i8 %conv, ptr %pValue.addr.5126, align 1 @@ -6363,9 +6348,10 @@ for.body.i.i: ; preds = %if.else.i.i, %for.i %ref.tmp.sroa.0.0.i = phi i64 [ %ref.tmp.sroa.0.1.i, %for.inc.i.i ], [ 0, %if.else.i.i ] %ref.tmp.sroa.7.0.i = phi i64 [ %ref.tmp.sroa.7.1.i, %for.inc.i.i ], [ 0, %if.else.i.i ] %i.054.i.i = phi i32 [ %inc.i.i, %for.inc.i.i ], [ 0, %if.else.i.i ] - %rem.i53.cmp.i.i = icmp samesign ugt i32 %i.054.i.i, 63 - %rem.i53.v.i.i = select i1 %rem.i53.cmp.i.i, i32 127, i32 63 - %rem.i53.i.i = sub nsw i32 %rem.i53.v.i.i, %i.054.i.i + %sub.i.i = xor i32 %i.054.i.i, 127 + %rem.i53.urem.i.i = sub nsw i32 63, %i.054.i.i + %rem.i53.cmp.i.i = icmp samesign ult i32 %sub.i.i, 64 + %rem.i53.i.i = select i1 %rem.i53.cmp.i.i, i32 %sub.i.i, i32 %rem.i53.urem.i.i %sh_prom.i.i.i = zext nneg i32 %rem.i53.i.i to i64 %retval.0.i.v.v.v.i.i = select i1 %rem.i53.cmp.i.i, i64 %value.sroa.0.0124, i64 %value.sroa.6.0125 %retval.0.i.v.v.i.i = lshr i64 %retval.0.i.v.v.v.i.i, %sh_prom.i.i.i @@ -6379,9 +6365,9 @@ for.body.i.i: ; preds = %if.else.i.i, %for.i _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i: ; preds = %for.body.i.i %or.i.i.i = select i1 %rem.i53.cmp.i.i, i64 %shl.i56.i.i, i64 0 - %ref.tmp.sroa.0.3.i = or i64 %or.i.i.i, %ref.tmp.sroa.0.0.i + %ref.tmp.sroa.0.2.i = or i64 %or.i.i.i, %ref.tmp.sroa.0.0.i %or11.i.i.i = select i1 %rem.i53.cmp.i.i, i64 0, i64 %shl.i56.i.i - %ref.tmp.sroa.7.3.i = or i64 %or11.i.i.i, %ref.tmp.sroa.7.0.i + %ref.tmp.sroa.7.2.i = or i64 %or11.i.i.i, %ref.tmp.sroa.7.0.i %sub.i.i.i.i = add i64 %add.i.i.i.i, -10 %conv.neg.i.i.i.i = sext i1 %or.cond.not.i.i.i to i64 %sub7.i.i.i.i = add i64 %remainder.i.sroa.11.0.i, %conv.neg.i.i.i.i @@ -6389,29 +6375,25 @@ _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i: ; preds = %for.body.i.i _ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i.i: ; preds = %for.body.i.i %not.i.i.i = xor i64 %shl.i56.i.i, -1 - br i1 %rem.i53.cmp.i.i, label %if.else.i38.i.i, label %if.end.thread.i.i + br i1 %rem.i53.cmp.i.i, label %if.else.i38.i.i, label %if.else13.i.i.i if.else.i38.i.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i.i %and.i.i.i = and i64 %ref.tmp.sroa.0.0.i, %not.i.i.i br label %if.end.i.i -if.end.thread.i.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i.i +if.else13.i.i.i: ; preds = %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.thread.i.i %and16.i.i.i = and i64 %ref.tmp.sroa.7.0.i, %not.i.i.i - br label %land.lhs.true.i.i + br label %if.end.i.i -if.end.i.i: ; preds = %if.else.i38.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i - %remainder.i.sroa.0.3.i = phi i64 [ %add.i.i.i.i, %if.else.i38.i.i ], [ %sub.i.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] - %remainder.i.sroa.11.3.i = phi i64 [ 0, %if.else.i38.i.i ], [ %sub7.i.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] - %ref.tmp.sroa.0.2.i = phi i64 [ %and.i.i.i, %if.else.i38.i.i ], [ %ref.tmp.sroa.0.3.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] - %ref.tmp.sroa.7.2.i = phi i64 [ %ref.tmp.sroa.7.0.i, %if.else.i38.i.i ], [ %ref.tmp.sroa.7.3.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] +if.end.i.i: ; preds = %if.else13.i.i.i, %if.else.i38.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i + %remainder.i.sroa.0.1.i = phi i64 [ %add.i.i.i.i, %if.else.i38.i.i ], [ %add.i.i.i.i, %if.else13.i.i.i ], [ %sub.i.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] + %remainder.i.sroa.11.1.i = phi i64 [ 0, %if.else.i38.i.i ], [ 0, %if.else13.i.i.i ], [ %sub7.i.i.i.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] + %ref.tmp.sroa.0.1.i = phi i64 [ %and.i.i.i, %if.else.i38.i.i ], [ %ref.tmp.sroa.0.0.i, %if.else13.i.i.i ], [ %ref.tmp.sroa.0.2.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] + %ref.tmp.sroa.7.1.i = phi i64 [ %ref.tmp.sroa.7.0.i, %if.else.i38.i.i ], [ %and16.i.i.i, %if.else13.i.i.i ], [ %ref.tmp.sroa.7.2.i, %_ZN2EA4StdCgeERKNS0_9uint128_tES3_.exit.i.i ] %cmp17.not.i.i = icmp eq i32 %i.054.i.i, 127 br i1 %cmp17.not.i.i, label %_ZN2EA4StdC9uint128_tdVERKS1_.exit, label %land.lhs.true.i.i -land.lhs.true.i.i: ; preds = %if.end.i.i, %if.end.thread.i.i - %remainder.i.sroa.0.1.i = phi i64 [ %remainder.i.sroa.0.3.i, %if.end.i.i ], [ %add.i.i.i.i, %if.end.thread.i.i ] - %remainder.i.sroa.11.1.i = phi i64 [ %remainder.i.sroa.11.3.i, %if.end.i.i ], [ 0, %if.end.thread.i.i ] - %ref.tmp.sroa.0.1.i = phi i64 [ %ref.tmp.sroa.0.2.i, %if.end.i.i ], [ %ref.tmp.sroa.0.0.i, %if.end.thread.i.i ] - %ref.tmp.sroa.7.1.i = phi i64 [ %ref.tmp.sroa.7.2.i, %if.end.i.i ], [ %and16.i.i.i, %if.end.thread.i.i ] +land.lhs.true.i.i: ; preds = %if.end.i.i %cmp.i41.i.i = icmp eq i64 %remainder.i.sroa.0.1.i, 0 %cmp2.i43.i.i = icmp eq i64 %remainder.i.sroa.11.1.i, 0 %13 = select i1 %cmp.i41.i.i, i1 %cmp2.i43.i.i, i1 false @@ -6429,15 +6411,15 @@ for.inc.i.i: ; preds = %if.then19.i.i, %lan br label %for.body.i.i _ZN2EA4StdC9uint128_tdVERKS1_.exit: ; preds = %if.end.i.i, %if.else.i.i - %ref.tmp.sroa.0.4.i = phi i64 [ 0, %if.else.i.i ], [ %ref.tmp.sroa.0.2.i, %if.end.i.i ] - %ref.tmp.sroa.7.4.i = phi i64 [ 0, %if.else.i.i ], [ %ref.tmp.sroa.7.2.i, %if.end.i.i ] - %cmp.i.i = icmp eq i64 %ref.tmp.sroa.7.4.i, 0 - %or.cond.not.i = icmp ult i64 %ref.tmp.sroa.0.4.i, 10 + %ref.tmp.sroa.0.3.i = phi i64 [ 0, %if.else.i.i ], [ %ref.tmp.sroa.0.1.i, %if.end.i.i ] + %ref.tmp.sroa.7.3.i = phi i64 [ 0, %if.else.i.i ], [ %ref.tmp.sroa.7.1.i, %if.end.i.i ] + %cmp.i.i = icmp eq i64 %ref.tmp.sroa.7.3.i, 0 + %or.cond.not.i = icmp ult i64 %ref.tmp.sroa.0.3.i, 10 %or.cond = select i1 %cmp.i.i, i1 %or.cond.not.i, i1 false br i1 %or.cond, label %while.end, label %for.body.i.preheader, !llvm.loop !57 while.end: ; preds = %_ZN2EA4StdC9uint128_tdVERKS1_.exit - %14 = trunc nuw i64 %ref.tmp.sroa.0.4.i to i8 + %14 = trunc nuw i64 %ref.tmp.sroa.0.3.i to i8 %conv40 = or disjoint i8 %14, 48 %incdec.ptr41 = getelementptr inbounds nuw i8, ptr %pValue.addr.5126, i64 2 store i8 %conv40, ptr %incdec.ptr36, align 1 diff --git a/bench/eastl/optimized/TestBitVector.cpp.ll b/bench/eastl/optimized/TestBitVector.cpp.ll index 40bd75de3b1..4c0147e5a65 100644 --- a/bench/eastl/optimized/TestBitVector.cpp.ll +++ b/bench/eastl/optimized/TestBitVector.cpp.ll @@ -16821,8 +16821,7 @@ for.end527: ; preds = %invoke.cont508 for.body532.preheader: ; preds = %for.end527 %cmp.i.i1393 = icmp samesign ugt i64 %it.sroa.24.2, 1 %add.i.i = add nsw i64 %it.sroa.24.2, -2 - %sub6.i.i = sub nuw nsw i64 1, %it.sroa.24.2 - %sub12.i.i = xor i64 %sub6.i.i, 63 + %sub12.i.i = or disjoint i64 %it.sroa.24.2, 62 %storemerge.i.i = select i1 %cmp.i.i1393, i64 %add.i.i, i64 %sub12.i.i %div7.i.i = lshr i64 %add.i.i, 6 %add.ptr.i.i = getelementptr inbounds nuw i64, ptr %it.sroa.0.2, i64 %div7.i.i @@ -17022,7 +17021,7 @@ invoke.cont615: ; preds = %if.else.i.i.i.i.i14 %.not.i.i15253762 = or i1 %cmp7.i.i.i15243761, %cmp.i.i.i15233760 br i1 %.not.i.i15253762, label %for.body622, label %for.cond649.preheader -for.cond649.preheader.loopexit: ; preds = %invoke.cont642 +for.cond649.preheader.loopexit: ; preds = %for.inc641 %.pre3818 = load ptr, ptr %mpEnd.i.i1297, align 8 %.pre3819 = load i64, ptr %mFreeBitCount.i1298, align 8 br label %for.cond649.preheader @@ -17042,10 +17041,10 @@ for.cond649.preheader: ; preds = %for.cond649.prehead %cmp6513774 = icmp ult i64 %i448.73768, %sub.i15783773 br i1 %cmp6513774, label %for.body652, label %for.end675 -for.body622: ; preds = %invoke.cont615, %invoke.cont642 - %i448.63765 = phi i64 [ %sub644, %invoke.cont642 ], [ %dec617, %invoke.cont615 ] - %rit.sroa.0.23764 = phi ptr [ %add.ptr10.sink.i.i.i1550, %invoke.cont642 ], [ %add.ptr10.sink.i.i.i.i.i1508, %invoke.cont615 ] - %rit.sroa.24.23763 = phi i64 [ %storemerge.i.i.i1551, %invoke.cont642 ], [ %storemerge.i.i.i.i.i1507, %invoke.cont615 ] +for.body622: ; preds = %invoke.cont615, %for.inc641 + %i448.63765 = phi i64 [ %sub644, %for.inc641 ], [ %dec617, %invoke.cont615 ] + %rit.sroa.0.23764 = phi ptr [ %add.ptr10.sink.i.i.i1550, %for.inc641 ], [ %add.ptr10.sink.i.i.i.i.i1508, %invoke.cont615 ] + %rit.sroa.24.23763 = phi i64 [ %storemerge.i.i.i1551, %for.inc641 ], [ %storemerge.i.i.i.i.i1507, %invoke.cont615 ] %cmp.i1532 = icmp eq i64 %rit.sroa.24.23763, 0 %spec.select3525.idx = select i1 %cmp.i1532, i64 -8, i64 0 %spec.select3525 = getelementptr inbounds i8, ptr %rit.sroa.0.23764, i64 %spec.select3525.idx @@ -17064,22 +17063,12 @@ for.body622: ; preds = %invoke.cont615, %in for.inc641: ; preds = %for.body622 %cmp.i.i.i1543 = icmp ugt i64 %rit.sroa.24.23763, 1 - br i1 %cmp.i.i.i1543, label %if.then.i.i.i1552, label %if.else.i.i.i1544 - -if.then.i.i.i1552: ; preds = %for.inc641 %add.i.i.i = add nsw i64 %rit.sroa.24.23763, -2 %div7.i.i.i1553 = lshr i64 %add.i.i.i, 6 %rem.i.i.i1555 = and i64 %add.i.i.i, 63 - br label %invoke.cont642 - -if.else.i.i.i1544: ; preds = %for.inc641 - %sub6.i.i.i1545 = sub nuw nsw i64 1, %rit.sroa.24.23763 - %sub12.i.i.i1549 = xor i64 %sub6.i.i.i1545, 63 - br label %invoke.cont642 - -invoke.cont642: ; preds = %if.else.i.i.i1544, %if.then.i.i.i1552 - %div7.i.i.i1553.pn = phi i64 [ %div7.i.i.i1553, %if.then.i.i.i1552 ], [ -1, %if.else.i.i.i1544 ] - %storemerge.i.i.i1551 = phi i64 [ %rem.i.i.i1555, %if.then.i.i.i1552 ], [ %sub12.i.i.i1549, %if.else.i.i.i1544 ] + %sub12.i.i.i1549 = or disjoint i64 %rit.sroa.24.23763, 62 + %div7.i.i.i1553.pn = select i1 %cmp.i.i.i1543, i64 %div7.i.i.i1553, i64 -1 + %storemerge.i.i.i1551 = select i1 %cmp.i.i.i1543, i64 %rem.i.i.i1555, i64 %sub12.i.i.i1549 %add.ptr10.sink.i.i.i1550 = getelementptr inbounds i64, ptr %rit.sroa.0.23764, i64 %div7.i.i.i1553.pn %sub644 = add i64 %i448.63765, -2 %400 = load ptr, ptr %bv0442, align 8, !noalias !60 @@ -18214,7 +18203,7 @@ if.then.i2215: ; preds = %invoke.cont889 br i1 %cmp.i.i3173, label %if.then.i.i3177, label %if.else.i.i3174 if.then.i.i3177: ; preds = %if.then.i2215 - %sub.i.i3178 = sub nuw nsw i64 1, %sub.ptr.sub.i.i.i2210 + %sub.i.i3178 = xor i64 %sub.ptr.sub.i.i.i2210, 1 %561 = load ptr, ptr %mCapacityAllocator.i.i.i1625, align 8 %sub.ptr.lhs.cast.i.i.i3180 = ptrtoint ptr %561 to i64 %sub.ptr.sub.i.i.i3181 = sub i64 %sub.ptr.lhs.cast.i.i.i3180, %sub.ptr.lhs.cast.i.i.i2208 diff --git a/bench/eastl/optimized/TestBitset.cpp.ll b/bench/eastl/optimized/TestBitset.cpp.ll index 337f8daedc6..0f303b1bd7b 100644 --- a/bench/eastl/optimized/TestBitset.cpp.ll +++ b/bench/eastl/optimized/TestBitset.cpp.ll @@ -6123,7 +6123,7 @@ if.then: ; preds = %entry for.body.i: ; preds = %if.then, %cond.end.i %i.015.i = phi i64 [ %inc.i, %cond.end.i ], [ 0, %if.then ] - %sub.i = sub nuw nsw i64 3, %i.015.i + %sub.i = xor i64 %i.015.i, 3 %cmp2.i = icmp samesign ult i64 %shr.i, %sub.i br i1 %cmp2.i, label %cond.true.i, label %cond.end.i @@ -6586,7 +6586,7 @@ if.then.i: ; preds = %entry for.body.i.i: ; preds = %if.then.i, %cond.end.i.i %i.015.i.i = phi i64 [ %inc.i.i, %cond.end.i.i ], [ 0, %if.then.i ] - %sub.i.i = sub nuw nsw i64 3, %i.015.i.i + %sub.i.i = xor i64 %i.015.i.i, 3 %cmp2.i.i = icmp samesign ult i64 %shr.i.i, %sub.i.i br i1 %cmp2.i.i, label %cond.true.i.i, label %cond.end.i.i @@ -10903,7 +10903,7 @@ if.then: ; preds = %entry for.body.i: ; preds = %if.then, %cond.end.i %i.015.i = phi i64 [ %inc.i, %cond.end.i ], [ 0, %if.then ] - %sub.i = sub nuw nsw i64 3, %i.015.i + %sub.i = xor i64 %i.015.i, 3 %cmp2.i = icmp samesign ult i64 %shr.i, %sub.i br i1 %cmp2.i, label %cond.true.i, label %cond.end.i @@ -11366,7 +11366,7 @@ if.then.i: ; preds = %entry for.body.i.i: ; preds = %if.then.i, %cond.end.i.i %i.015.i.i = phi i64 [ %inc.i.i, %cond.end.i.i ], [ 0, %if.then.i ] - %sub.i.i = sub nuw nsw i64 3, %i.015.i.i + %sub.i.i = xor i64 %i.015.i.i, 3 %cmp2.i.i = icmp samesign ult i64 %shr.i.i, %sub.i.i br i1 %cmp2.i.i, label %cond.true.i.i, label %cond.end.i.i @@ -17055,7 +17055,8 @@ _ZN5eastl6bitsetILm129EmE4flipEv.exit1895: ; preds = %for.body.i.i1887 for.body.i.i1896: ; preds = %cond.end.i.i, %_ZN5eastl6bitsetILm129EmE4flipEv.exit1895 %i.015.i.i = phi i64 [ %add.i.i1909, %cond.end.i.i ], [ 0, %_ZN5eastl6bitsetILm129EmE4flipEv.exit1895 ] - %cmp2.i.i = icmp samesign ult i64 %i.015.i.i, 2 + %sub.i.i = xor i64 %i.015.i.i, 2 + %cmp2.i.i = icmp samesign ugt i64 %sub.i.i, 1 %add.i.i1909 = add nuw nsw i64 %i.015.i.i, 1 br i1 %cmp2.i.i, label %cond.true.i.i, label %cond.end.i.i diff --git a/bench/fmt/optimized/chrono-test.cc.ll b/bench/fmt/optimized/chrono-test.cc.ll index 80a597180f3..3bbd7035ad5 100644 --- a/bench/fmt/optimized/chrono-test.cc.ll +++ b/bench/fmt/optimized/chrono-test.cc.ll @@ -124569,9 +124569,9 @@ if.end72: ; preds = %if.else51, %if.then if.then92: ; preds = %if.end72 %add93 = add nsw i32 %sub74.neg, %digits_in_the_first_segment.0 %cmp.i = icmp sgt i32 %add93, 0 - %sub.i = sub nuw nsw i32 2147483647, %add93 - %cmp1.i = icmp samesign ugt i32 %precision, %sub.i - %or.cond.i = select i1 %cmp.i, i1 %cmp1.i, i1 false + %sub.i = xor i32 %add93, 2147483647 + %cmp1.i = icmp sgt i32 %precision, %sub.i + %or.cond.i = and i1 %cmp.i, %cmp1.i br i1 %or.cond.i, label %if.then.i, label %_ZN3fmt3v106detail16adjust_precisionERii.exit if.then.i: ; preds = %if.then92 @@ -126667,8 +126667,9 @@ if.end91: ; preds = %_ZN3fmt3v106detail6 if.then94: ; preds = %if.end91 %175 = load i32, ptr %exp10, align 4 + %add95 = add nsw i32 %175, 1 %cmp.i618 = icmp sgt i32 %175, -1 - %sub.i619 = sub nsw i32 2147483646, %175 + %sub.i619 = xor i32 %add95, 2147483647 %cmp1.i = icmp sgt i32 %num_digits, %sub.i619 %or.cond.i620 = select i1 %cmp.i618, i1 %cmp1.i, i1 false br i1 %or.cond.i620, label %if.then.i, label %_ZN3fmt3v106detail16adjust_precisionERii.exit @@ -126693,8 +126694,7 @@ lpad.i: ; preds = %if.then.i br label %lpad6.body _ZN3fmt3v106detail16adjust_precisionERii.exit: ; preds = %if.then94 - %add95 = add i32 %num_digits, 1 - %add.i622 = add i32 %add95, %175 + %add.i622 = add nsw i32 %add95, %num_digits br label %if.end98 if.end98: ; preds = %_ZN3fmt3v106detail16adjust_precisionERii.exit, %if.end91, %if.end62 diff --git a/bench/fmt/optimized/format-impl-test.cc.ll b/bench/fmt/optimized/format-impl-test.cc.ll index d2a2c178815..be986738911 100644 --- a/bench/fmt/optimized/format-impl-test.cc.ll +++ b/bench/fmt/optimized/format-impl-test.cc.ll @@ -15585,7 +15585,7 @@ _ZN7testing15AssertionResultD2Ev.exit: ; preds = %if.end, %_ZNKSt14de store ptr null, ptr %message_.i.i, align 8 %11 = call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %shl, i1 true) store i32 %11, ptr %ref.tmp16, align 4 - %sub20 = sub nuw nsw i32 31, %i.045 + %sub20 = xor i32 %i.045, 31 store i32 %sub20, ptr %ref.tmp18, align 4 %cmp.i.i19 = icmp eq i32 %11, %sub20 br i1 %cmp.i.i19, label %if.then.i.i21, label %if.end.i.i20 @@ -33380,25 +33380,19 @@ entry: br i1 %or.cond30, label %if.then8, label %if.end36 if.then8: ; preds = %entry - %4 = shl nuw nsw i32 %precision, 2 - %mul = sub nuw nsw i32 56, %4 + %sub9 = shl nuw nsw i32 %precision, 2 + %sub10 = xor i32 %sub9, 60 + %mul = add nsw i32 %sub10, -4 %sh_prom = zext nneg i32 %mul to i128 - %5 = shl nuw nsw i128 8, %sh_prom - %6 = and i128 %5, %coerce.sroa.0.0.insert.ext.i.i - %cmp16.not = icmp eq i128 %6, 0 - br i1 %cmp16.not, label %if.end26, label %if.then17 - -if.then17: ; preds = %if.then8 - %add18 = sub nuw nsw i32 60, %4 - %sh_prom19 = zext nneg i32 %add18 to i128 + %4 = shl i128 8, %sh_prom + %5 = and i128 %4, %coerce.sroa.0.0.insert.ext.i.i + %cmp16.not = icmp eq i128 %5, 0 + %sh_prom19 = zext nneg i32 %sub10 to i128 %shl20 = shl nuw nsw i128 1, %sh_prom19 %add22 = add nuw nsw i128 %shl20, %coerce.sroa.0.0.insert.ext.i.i %not = sub nsw i128 0, %shl20 %and25 = and i128 %add22, %not - br label %if.end26 - -if.end26: ; preds = %if.then17, %if.then8 - %f.sroa.0.1 = phi i128 [ %coerce.sroa.0.0.insert.ext.i.i, %if.then8 ], [ %and25, %if.then17 ] + %f.sroa.0.1 = select i1 %cmp16.not, i128 %coerce.sroa.0.0.insert.ext.i.i, i128 %and25 %and28 = and i128 %f.sroa.0.1, 18446744073709551616 %cmp29.not = icmp eq i128 %and28, 0 %extract.t = trunc i128 %f.sroa.0.1 to i64 @@ -33406,20 +33400,20 @@ if.end26: ; preds = %if.then17, %if.then %extract.t128 = trunc nuw nsw i128 %extract to i64 br i1 %cmp29.not, label %if.end36, label %if.then30 -if.then30: ; preds = %if.end26 +if.then30: ; preds = %if.then8 %shr32 = lshr i128 %f.sroa.0.1, 4 %add34 = add nsw i32 %f.sroa.7.0, 4 - %extract.t126 = trunc nuw nsw i128 %shr32 to i64 + %extract.t126 = trunc i128 %shr32 to i64 br label %if.end36 -if.end36: ; preds = %if.end26, %if.then30, %entry - %f.sroa.0.0.off0 = phi i64 [ %extract.t, %if.end26 ], [ %extract.t126, %if.then30 ], [ %extract.t127, %entry ] - %f.sroa.0.0.off64 = phi i64 [ %extract.t128, %if.end26 ], [ 0, %if.then30 ], [ 0, %entry ] - %f.sroa.7.1 = phi i32 [ %f.sroa.7.0, %if.end26 ], [ %add34, %if.then30 ], [ %f.sroa.7.0, %entry ] - %print_xdigits.0 = phi i32 [ %precision, %if.end26 ], [ %precision, %if.then30 ], [ 15, %entry ] +if.end36: ; preds = %if.then8, %if.then30, %entry + %f.sroa.0.0.off0 = phi i64 [ %extract.t, %if.then8 ], [ %extract.t126, %if.then30 ], [ %extract.t127, %entry ] + %f.sroa.0.0.off64 = phi i64 [ %extract.t128, %if.then8 ], [ 0, %if.then30 ], [ 0, %entry ] + %f.sroa.7.1 = phi i32 [ %f.sroa.7.0, %if.then8 ], [ %add34, %if.then30 ], [ %f.sroa.7.0, %entry ] + %print_xdigits.0 = phi i32 [ %precision, %if.then8 ], [ %precision, %if.then30 ], [ 15, %entry ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %xdigits, i8 48, i64 32, i1 false) - %7 = and i32 %specs.sroa.1.0.extract.trunc, 65536 - %bf.cast.not = icmp eq i32 %7, 0 + %6 = and i32 %specs.sroa.1.0.extract.trunc, 65536 + %bf.cast.not = icmp eq i32 %6, 0 %value.sroa.2.0.insert.ext.i = zext nneg i64 %f.sroa.0.0.off64 to i128 %value.sroa.2.0.insert.shift.i = shl nuw nsw i128 %value.sroa.2.0.insert.ext.i, 64 %value.sroa.0.0.insert.ext.i = zext i64 %f.sroa.0.0.off0 to i128 @@ -33431,12 +33425,12 @@ if.end36: ; preds = %if.end26, %if.then3 do.body.i: ; preds = %do.body.i, %if.end36 %value.addr.0.i = phi i128 [ %value.sroa.0.0.insert.insert.i, %if.end36 ], [ %shr.i, %do.body.i ] %buffer.addr.0.i = phi ptr [ %add.ptr.i32, %if.end36 ], [ %incdec.ptr.i, %do.body.i ] - %8 = trunc i128 %value.addr.0.i to i64 - %conv.i = and i64 %8, 15 + %7 = trunc i128 %value.addr.0.i to i64 + %conv.i = and i64 %7, 15 %arrayidx.i = getelementptr inbounds nuw i8, ptr %.str.195..str.196.i, i64 %conv.i - %9 = load i8, ptr %arrayidx.i, align 1 + %8 = load i8, ptr %arrayidx.i, align 1 %incdec.ptr.i = getelementptr inbounds i8, ptr %buffer.addr.0.i, i64 -1 - store i8 %9, ptr %incdec.ptr.i, align 1 + store i8 %8, ptr %incdec.ptr.i, align 1 %shr.i = lshr i128 %value.addr.0.i, 4 %cmp.not.i = icmp samesign ult i128 %value.addr.0.i, 16 br i1 %cmp.not.i, label %while.cond.preheader, label %do.body.i, !llvm.loop !278 @@ -33449,8 +33443,8 @@ land.rhs: ; preds = %while.cond.preheade %print_xdigits.1134 = phi i32 [ %dec44, %while.body ], [ %print_xdigits.0, %while.cond.preheader ] %idxprom = zext nneg i32 %print_xdigits.1134 to i64 %arrayidx = getelementptr inbounds nuw [32 x i8], ptr %xdigits, i64 0, i64 %idxprom - %10 = load i8, ptr %arrayidx, align 1 - %cmp43.not.not = icmp ne i8 %10, 48 + %9 = load i8, ptr %arrayidx, align 1 + %cmp43.not.not = icmp ne i8 %9, 48 br i1 %cmp43.not.not, label %while.end, label %while.body while.body: ; preds = %land.rhs @@ -33462,101 +33456,101 @@ while.end: ; preds = %land.rhs, %while.bo %print_xdigits.1.lcssa = phi i32 [ %print_xdigits.0, %while.cond.preheader ], [ 0, %while.body ], [ %print_xdigits.1134, %land.rhs ] %cmp41.lcssa = phi i1 [ false, %while.cond.preheader ], [ %cmp43.not.not, %while.body ], [ %cmp43.not.not, %land.rhs ] %size_.i = getelementptr inbounds nuw i8, ptr %buf, i64 16 - %11 = load i64, ptr %size_.i, align 8 - %add.i = add i64 %11, 1 + %10 = load i64, ptr %size_.i, align 8 + %add.i = add i64 %10, 1 %capacity_.i.i = getelementptr inbounds nuw i8, ptr %buf, i64 24 - %12 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i = icmp ugt i64 %add.i, %12 + %11 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i = icmp ugt i64 %add.i, %11 br i1 %cmp.i.i, label %if.then.i.i, label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit if.then.i.i: ; preds = %while.end %vtable.i.i = load ptr, ptr %buf, align 8 - %13 = load ptr, ptr %vtable.i.i, align 8 - tail call void %13(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i) + %12 = load ptr, ptr %vtable.i.i, align 8 + tail call void %12(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i) %.pre.i = load i64, ptr %size_.i, align 8 %.pre1.i = add i64 %.pre.i, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit: ; preds = %while.end, %if.then.i.i %inc.pre-phi.i = phi i64 [ %add.i, %while.end ], [ %.pre1.i, %if.then.i.i ] - %14 = phi i64 [ %11, %while.end ], [ %.pre.i, %if.then.i.i ] + %13 = phi i64 [ %10, %while.end ], [ %.pre.i, %if.then.i.i ] %ptr_.i = getelementptr inbounds nuw i8, ptr %buf, i64 8 - %15 = load ptr, ptr %ptr_.i, align 8 + %14 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i, ptr %size_.i, align 8 - %arrayidx.i33 = getelementptr inbounds i8, ptr %15, i64 %14 + %arrayidx.i33 = getelementptr inbounds i8, ptr %14, i64 %13 store i8 48, ptr %arrayidx.i33, align 1 %cond = select i1 %bf.cast.not, i8 120, i8 88 - %16 = load i64, ptr %size_.i, align 8 - %add.i35 = add i64 %16, 1 - %17 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i37 = icmp ugt i64 %add.i35, %17 + %15 = load i64, ptr %size_.i, align 8 + %add.i35 = add i64 %15, 1 + %16 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i37 = icmp ugt i64 %add.i35, %16 br i1 %cmp.i.i37, label %if.then.i.i41, label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45 if.then.i.i41: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit %vtable.i.i42 = load ptr, ptr %buf, align 8 - %18 = load ptr, ptr %vtable.i.i42, align 8 - tail call void %18(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i35) + %17 = load ptr, ptr %vtable.i.i42, align 8 + tail call void %17(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i35) %.pre.i43 = load i64, ptr %size_.i, align 8 %.pre1.i44 = add i64 %.pre.i43, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit, %if.then.i.i41 %inc.pre-phi.i38 = phi i64 [ %add.i35, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit ], [ %.pre1.i44, %if.then.i.i41 ] - %19 = phi i64 [ %16, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit ], [ %.pre.i43, %if.then.i.i41 ] - %20 = load ptr, ptr %ptr_.i, align 8 + %18 = phi i64 [ %15, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit ], [ %.pre.i43, %if.then.i.i41 ] + %19 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i38, ptr %size_.i, align 8 - %arrayidx.i40 = getelementptr inbounds i8, ptr %20, i64 %19 + %arrayidx.i40 = getelementptr inbounds i8, ptr %19, i64 %18 store i8 %cond, ptr %arrayidx.i40, align 1 - %21 = load i64, ptr %size_.i, align 8 - %add.i47 = add i64 %21, 1 - %22 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i49 = icmp ugt i64 %add.i47, %22 + %20 = load i64, ptr %size_.i, align 8 + %add.i47 = add i64 %20, 1 + %21 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i49 = icmp ugt i64 %add.i47, %21 br i1 %cmp.i.i49, label %if.then.i.i53, label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit57 if.then.i.i53: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45 %vtable.i.i54 = load ptr, ptr %buf, align 8 - %23 = load ptr, ptr %vtable.i.i54, align 8 - tail call void %23(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i47) + %22 = load ptr, ptr %vtable.i.i54, align 8 + tail call void %22(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i47) %.pre.i55 = load i64, ptr %size_.i, align 8 %.pre1.i56 = add i64 %.pre.i55, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit57 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit57: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45, %if.then.i.i53 %inc.pre-phi.i50 = phi i64 [ %add.i47, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45 ], [ %.pre1.i56, %if.then.i.i53 ] - %24 = phi i64 [ %21, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45 ], [ %.pre.i55, %if.then.i.i53 ] - %25 = load i8, ptr %xdigits, align 16 - %26 = load ptr, ptr %ptr_.i, align 8 + %23 = phi i64 [ %20, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit45 ], [ %.pre.i55, %if.then.i.i53 ] + %24 = load i8, ptr %xdigits, align 16 + %25 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i50, ptr %size_.i, align 8 - %arrayidx.i52 = getelementptr inbounds i8, ptr %26, i64 %24 - store i8 %25, ptr %arrayidx.i52, align 1 - %27 = and i32 %specs.sroa.1.0.extract.trunc, 524288 - %bf.cast55 = icmp ne i32 %27, 0 + %arrayidx.i52 = getelementptr inbounds i8, ptr %25, i64 %23 + store i8 %24, ptr %arrayidx.i52, align 1 + %26 = and i32 %specs.sroa.1.0.extract.trunc, 524288 + %bf.cast55 = icmp ne i32 %26, 0 %cmp58 = icmp sgt i32 %precision, 0 - %28 = or i1 %cmp58, %bf.cast55 - %or.cond31 = or i1 %28, %cmp41.lcssa + %27 = or i1 %cmp58, %bf.cast55 + %or.cond31 = or i1 %27, %cmp41.lcssa br i1 %or.cond31, label %if.then59, label %if.end61 if.then59: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit57 - %29 = load i64, ptr %size_.i, align 8 - %add.i59 = add i64 %29, 1 - %30 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i61 = icmp ugt i64 %add.i59, %30 + %28 = load i64, ptr %size_.i, align 8 + %add.i59 = add i64 %28, 1 + %29 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i61 = icmp ugt i64 %add.i59, %29 br i1 %cmp.i.i61, label %if.then.i.i65, label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit69 if.then.i.i65: ; preds = %if.then59 %vtable.i.i66 = load ptr, ptr %buf, align 8 - %31 = load ptr, ptr %vtable.i.i66, align 8 - tail call void %31(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i59) + %30 = load ptr, ptr %vtable.i.i66, align 8 + tail call void %30(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i59) %.pre.i67 = load i64, ptr %size_.i, align 8 %.pre1.i68 = add i64 %.pre.i67, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit69 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit69: ; preds = %if.then59, %if.then.i.i65 %inc.pre-phi.i62 = phi i64 [ %add.i59, %if.then59 ], [ %.pre1.i68, %if.then.i.i65 ] - %32 = phi i64 [ %29, %if.then59 ], [ %.pre.i67, %if.then.i.i65 ] - %33 = load ptr, ptr %ptr_.i, align 8 + %31 = phi i64 [ %28, %if.then59 ], [ %.pre.i67, %if.then.i.i65 ] + %32 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i62, ptr %size_.i, align 8 - %arrayidx.i64 = getelementptr inbounds i8, ptr %33, i64 %32 + %arrayidx.i64 = getelementptr inbounds i8, ptr %32, i64 %31 store i8 46, ptr %arrayidx.i64, align 1 br label %if.end61 @@ -33570,26 +33564,26 @@ if.end61: ; preds = %_ZN3fmt3v106detail6 for.body: ; preds = %if.end61, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81 %print_xdigits.2140 = phi i32 [ %inc68, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81 ], [ %print_xdigits.1.lcssa, %if.end61 ] - %34 = load i64, ptr %size_.i, align 8 - %add.i71 = add i64 %34, 1 - %35 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i73 = icmp ugt i64 %add.i71, %35 + %33 = load i64, ptr %size_.i, align 8 + %add.i71 = add i64 %33, 1 + %34 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i73 = icmp ugt i64 %add.i71, %34 br i1 %cmp.i.i73, label %if.then.i.i77, label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81 if.then.i.i77: ; preds = %for.body %vtable.i.i78 = load ptr, ptr %buf, align 8 - %36 = load ptr, ptr %vtable.i.i78, align 8 - call void %36(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i71) + %35 = load ptr, ptr %vtable.i.i78, align 8 + call void %35(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i71) %.pre.i79 = load i64, ptr %size_.i, align 8 %.pre1.i80 = add i64 %.pre.i79, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81: ; preds = %for.body, %if.then.i.i77 %inc.pre-phi.i74 = phi i64 [ %add.i71, %for.body ], [ %.pre1.i80, %if.then.i.i77 ] - %37 = phi i64 [ %34, %for.body ], [ %.pre.i79, %if.then.i.i77 ] - %38 = load ptr, ptr %ptr_.i, align 8 + %36 = phi i64 [ %33, %for.body ], [ %.pre.i79, %if.then.i.i77 ] + %37 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i74, ptr %size_.i, align 8 - %arrayidx.i76 = getelementptr inbounds i8, ptr %38, i64 %37 + %arrayidx.i76 = getelementptr inbounds i8, ptr %37, i64 %36 store i8 48, ptr %arrayidx.i76, align 1 %inc68 = add i32 %print_xdigits.2140, 1 %exitcond.not = icmp eq i32 %inc68, %precision @@ -33597,32 +33591,32 @@ _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81: ; preds = %for.body, %if.then for.end: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit81, %if.end61 %cond75 = select i1 %bf.cast.not, i8 112, i8 80 - %39 = load i64, ptr %size_.i, align 8 - %add.i83 = add i64 %39, 1 - %40 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i85 = icmp ugt i64 %add.i83, %40 + %38 = load i64, ptr %size_.i, align 8 + %add.i83 = add i64 %38, 1 + %39 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i85 = icmp ugt i64 %add.i83, %39 br i1 %cmp.i.i85, label %if.then.i.i89, label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit93 if.then.i.i89: ; preds = %for.end %vtable.i.i90 = load ptr, ptr %buf, align 8 - %41 = load ptr, ptr %vtable.i.i90, align 8 - call void %41(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i83) + %40 = load ptr, ptr %vtable.i.i90, align 8 + call void %40(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i83) %.pre.i91 = load i64, ptr %size_.i, align 8 %.pre1.i92 = add i64 %.pre.i91, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit93 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit93: ; preds = %for.end, %if.then.i.i89 %inc.pre-phi.i86 = phi i64 [ %add.i83, %for.end ], [ %.pre1.i92, %if.then.i.i89 ] - %42 = phi i64 [ %39, %for.end ], [ %.pre.i91, %if.then.i.i89 ] - %43 = load ptr, ptr %ptr_.i, align 8 + %41 = phi i64 [ %38, %for.end ], [ %.pre.i91, %if.then.i.i89 ] + %42 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i86, ptr %size_.i, align 8 - %arrayidx.i88 = getelementptr inbounds i8, ptr %43, i64 %42 + %arrayidx.i88 = getelementptr inbounds i8, ptr %42, i64 %41 store i8 %cond75, ptr %arrayidx.i88, align 1 %cmp77 = icmp slt i32 %f.sroa.7.1, 0 - %44 = load i64, ptr %size_.i, align 8 - %add.i95 = add i64 %44, 1 - %45 = load i64, ptr %capacity_.i.i, align 8 - %cmp.i.i97 = icmp ugt i64 %add.i95, %45 + %43 = load i64, ptr %size_.i, align 8 + %add.i95 = add i64 %43, 1 + %44 = load i64, ptr %capacity_.i.i, align 8 + %cmp.i.i97 = icmp ugt i64 %add.i95, %44 br i1 %cmp77, label %if.then78, label %if.else if.then78: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit93 @@ -33630,18 +33624,18 @@ if.then78: ; preds = %_ZN3fmt3v106detail6 if.then.i.i101: ; preds = %if.then78 %vtable.i.i102 = load ptr, ptr %buf, align 8 - %46 = load ptr, ptr %vtable.i.i102, align 8 - call void %46(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i95) + %45 = load ptr, ptr %vtable.i.i102, align 8 + call void %45(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i95) %.pre.i103 = load i64, ptr %size_.i, align 8 %.pre1.i104 = add i64 %.pre.i103, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit105 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit105: ; preds = %if.then78, %if.then.i.i101 %inc.pre-phi.i98 = phi i64 [ %add.i95, %if.then78 ], [ %.pre1.i104, %if.then.i.i101 ] - %47 = phi i64 [ %44, %if.then78 ], [ %.pre.i103, %if.then.i.i101 ] - %48 = load ptr, ptr %ptr_.i, align 8 + %46 = phi i64 [ %43, %if.then78 ], [ %.pre.i103, %if.then.i.i101 ] + %47 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i98, ptr %size_.i, align 8 - %arrayidx.i100 = getelementptr inbounds i8, ptr %48, i64 %47 + %arrayidx.i100 = getelementptr inbounds i8, ptr %47, i64 %46 store i8 45, ptr %arrayidx.i100, align 1 %sub81 = sub nsw i32 0, %f.sroa.7.1 br label %if.end84 @@ -33651,38 +33645,38 @@ if.else: ; preds = %_ZN3fmt3v106detail6 if.then.i.i113: ; preds = %if.else %vtable.i.i114 = load ptr, ptr %buf, align 8 - %49 = load ptr, ptr %vtable.i.i114, align 8 - call void %49(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i95) + %48 = load ptr, ptr %vtable.i.i114, align 8 + call void %48(ptr noundef nonnull align 8 dereferenceable(32) %buf, i64 noundef %add.i95) %.pre.i115 = load i64, ptr %size_.i, align 8 %.pre1.i116 = add i64 %.pre.i115, 1 br label %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit117 _ZN3fmt3v106detail6bufferIcE9push_backERKc.exit117: ; preds = %if.else, %if.then.i.i113 %inc.pre-phi.i110 = phi i64 [ %add.i95, %if.else ], [ %.pre1.i116, %if.then.i.i113 ] - %50 = phi i64 [ %44, %if.else ], [ %.pre.i115, %if.then.i.i113 ] - %51 = load ptr, ptr %ptr_.i, align 8 + %49 = phi i64 [ %43, %if.else ], [ %.pre.i115, %if.then.i.i113 ] + %50 = load ptr, ptr %ptr_.i, align 8 store i64 %inc.pre-phi.i110, ptr %size_.i, align 8 - %arrayidx.i112 = getelementptr inbounds i8, ptr %51, i64 %50 + %arrayidx.i112 = getelementptr inbounds i8, ptr %50, i64 %49 store i8 43, ptr %arrayidx.i112, align 1 br label %if.end84 if.end84: ; preds = %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit117, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit105 %abs_e.0 = phi i32 [ %sub81, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit105 ], [ %f.sroa.7.1, %_ZN3fmt3v106detail6bufferIcE9push_backERKc.exit117 ] %or.i.i = or i32 %abs_e.0, 1 - %52 = call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %or.i.i, i1 true) - %xor.i.i = xor i32 %52, 31 + %51 = call range(i32 0, 32) i32 @llvm.ctlz.i32(i32 %or.i.i, i1 true) + %xor.i.i = xor i32 %51, 31 %idxprom.i.i = zext nneg i32 %xor.i.i to i64 %arrayidx.i.i = getelementptr inbounds nuw [32 x i64], ptr @_ZZN3fmt3v106detail15do_count_digitsEjE5table, i64 0, i64 %idxprom.i.i - %53 = load i64, ptr %arrayidx.i.i, align 8 + %52 = load i64, ptr %arrayidx.i.i, align 8 %conv.i.i = zext nneg i32 %abs_e.0 to i64 - %add.i.i = add i64 %53, %conv.i.i + %add.i.i = add i64 %52, %conv.i.i %shr.i.i = lshr i64 %add.i.i, 32 %conv1.i.i = trunc nuw i64 %shr.i.i to i32 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %buffer.i) call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %buffer.i, i8 0, i64 10, i1 false) %call.i = call { ptr, ptr } @_ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i(ptr noundef nonnull %buffer.i, i32 noundef %abs_e.0, i32 noundef %conv1.i.i) - %54 = extractvalue { ptr, ptr } %call.i, 1 - call void @_ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_(ptr noundef nonnull align 8 dereferenceable(32) %buf, ptr noundef nonnull %buffer.i, ptr noundef %54) + %53 = extractvalue { ptr, ptr } %call.i, 1 + call void @_ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_(ptr noundef nonnull align 8 dereferenceable(32) %buf, ptr noundef nonnull %buffer.i, ptr noundef %53) call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %buffer.i) ret void } @@ -34874,8 +34868,9 @@ if.end91: ; preds = %_ZN3fmt3v106detail6 if.then94: ; preds = %if.end91 %110 = load i32, ptr %exp10, align 4 + %add95 = add nsw i32 %110, 1 %cmp.i294 = icmp sgt i32 %110, -1 - %sub.i = sub nsw i32 2147483646, %110 + %sub.i = xor i32 %add95, 2147483647 %cmp1.i = icmp sgt i32 %num_digits, %sub.i %or.cond.i295 = select i1 %cmp.i294, i1 %cmp1.i, i1 false br i1 %or.cond.i295, label %if.then.i298, label %_ZN3fmt3v106detail16adjust_precisionERii.exit @@ -34906,8 +34901,7 @@ lpad.i: ; preds = %if.then.i298 br label %lpad6.body _ZN3fmt3v106detail16adjust_precisionERii.exit: ; preds = %if.then94 - %add95 = add i32 %num_digits, 1 - %add.i297 = add i32 %add95, %110 + %add.i297 = add nsw i32 %add95, %num_digits br label %if.end98 if.end98: ; preds = %_ZN3fmt3v106detail16adjust_precisionERii.exit, %if.end91, %if.end62 @@ -45074,9 +45068,9 @@ if.end72: ; preds = %if.end54.thread, %i if.then92: ; preds = %if.end72 %add93 = add nsw i32 %sub74.neg, %digits_in_the_first_segment.0 %cmp.i135 = icmp sgt i32 %add93, 0 - %sub.i = sub nuw nsw i32 2147483647, %add93 - %cmp1.i = icmp samesign ugt i32 %precision, %sub.i - %or.cond.i137 = select i1 %cmp.i135, i1 %cmp1.i, i1 false + %sub.i = xor i32 %add93, 2147483647 + %cmp1.i = icmp sgt i32 %precision, %sub.i + %or.cond.i137 = and i1 %cmp.i135, %cmp1.i br i1 %or.cond.i137, label %if.then.i139, label %_ZN3fmt3v106detail16adjust_precisionERii.exit if.then.i139: ; preds = %if.then92 diff --git a/bench/freetype/optimized/ftbitmap.c.ll b/bench/freetype/optimized/ftbitmap.c.ll index 4a9399f357d..9b4dddb626a 100644 --- a/bench/freetype/optimized/ftbitmap.c.ll +++ b/bench/freetype/optimized/ftbitmap.c.ll @@ -1620,7 +1620,7 @@ define i32 @FT_Bitmap_Blend(ptr noundef %0, ptr noundef %1, i64 %2, i64 %3, ptr %206 = udiv i32 %205, 255 %207 = mul nuw nsw i32 %202, %191 %208 = udiv i32 %207, 255 - %209 = sub nuw nsw i32 255, %202 + %209 = xor i32 %202, 255 %210 = load i8, ptr %.0221299, align 1 %211 = zext i8 %210 to i32 %212 = getelementptr inbounds nuw i8, ptr %.0221299, i64 1 @@ -1633,31 +1633,23 @@ define i32 @FT_Bitmap_Blend(ptr noundef %0, ptr noundef %1, i64 %2, i64 %3, ptr %219 = load i8, ptr %218, align 1 %220 = zext i8 %219 to i32 %221 = mul nuw nsw i32 %209, %211 - %.lhs.trunc = trunc nuw i32 %221 to i16 - %222 = udiv i16 %.lhs.trunc, 255 - %.zext = zext nneg i16 %222 to i32 - %223 = add nuw nsw i32 %204, %.zext + %222 = udiv i32 %221, 255 + %223 = add nuw nsw i32 %222, %204 %224 = trunc i32 %223 to i8 store i8 %224, ptr %.0221299, align 1 %225 = mul nuw nsw i32 %209, %214 - %.lhs.trunc315 = trunc nuw i32 %225 to i16 - %226 = udiv i16 %.lhs.trunc315, 255 - %.zext316 = zext nneg i16 %226 to i32 - %227 = add nuw nsw i32 %206, %.zext316 + %226 = udiv i32 %225, 255 + %227 = add nuw nsw i32 %226, %206 %228 = trunc i32 %227 to i8 store i8 %228, ptr %212, align 1 %229 = mul nuw nsw i32 %209, %217 - %.lhs.trunc317 = trunc nuw i32 %229 to i16 - %230 = udiv i16 %.lhs.trunc317, 255 - %.zext318 = zext nneg i16 %230 to i32 - %231 = add nuw nsw i32 %208, %.zext318 + %230 = udiv i32 %229, 255 + %231 = add nuw nsw i32 %230, %208 %232 = trunc i32 %231 to i8 store i8 %232, ptr %215, align 1 %233 = mul nuw nsw i32 %209, %220 - %.lhs.trunc319 = trunc nuw i32 %233 to i16 - %234 = udiv i16 %.lhs.trunc319, 255 - %.zext320 = zext nneg i16 %234 to i32 - %235 = add nuw nsw i32 %202, %.zext320 + %234 = udiv i32 %233, 255 + %235 = add nuw nsw i32 %234, %202 %236 = trunc i32 %235 to i8 %237 = getelementptr inbounds nuw i8, ptr %.0221299, i64 4 store i8 %236, ptr %218, align 1 diff --git a/bench/grpc/optimized/grpc_ares_wrapper.cc.ll b/bench/grpc/optimized/grpc_ares_wrapper.cc.ll index d2154926b30..4073950aae1 100644 --- a/bench/grpc/optimized/grpc_ares_wrapper.cc.ll +++ b/bench/grpc/optimized/grpc_ares_wrapper.cc.ll @@ -453,7 +453,7 @@ if.end11.i.i: ; preds = %if.end.i.i br i1 %cmp.i.i.i, label %if.then.i.i.i, label %if.else.i.i.i if.then.i.i.i: ; preds = %if.end11.i.i - %sub.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i + %sub.i.i.i = xor i64 %call.i, 9223372036854775807 %cmp1.i.i.i = icmp slt i64 %sub.i.i.i, %conv br i1 %cmp1.i.i.i, label %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit, label %if.end7.i.i.i @@ -491,22 +491,32 @@ _ZN9grpc_core9Timestamp3NowEv.exit.i: ; preds = %11, %do.end.i %vtable.i.i = load ptr, ptr %12, align 8 %13 = load ptr, ptr %vtable.i.i, align 8 %call.i.i = tail call i64 %13(ptr noundef nonnull align 8 dereferenceable(8) %12) + %call.i.i.off = add i64 %call.i.i, -9223372036854775807 + %switch = icmp ult i64 %call.i.i.off, 2 + br i1 %switch, label %_ZL37calculate_next_ares_backup_poll_alarmP19grpc_ares_ev_driver.exit, label %if.end11.i.i.i + +if.end11.i.i.i: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit.i + %cmp.i.i.i.i = icmp sgt i64 %call.i.i, 0 + %sub.i.i.i.i = xor i64 %call.i.i, 9223372036854775800 + %cmp1.i.i.i.i = icmp samesign ult i64 %sub.i.i.i.i, 1000 + %or.cond.i = select i1 %cmp.i.i.i.i, i1 %cmp1.i.i.i.i, i1 false + %add.i.i.i.i = add nsw i64 %call.i.i, 1000 + %spec.select.i = select i1 %or.cond.i, i64 9223372036854775807, i64 %add.i.i.i.i + br label %_ZL37calculate_next_ares_backup_poll_alarmP19grpc_ares_ev_driver.exit + +_ZL37calculate_next_ares_backup_poll_alarmP19grpc_ares_ev_driver.exit: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit.i, %if.end11.i.i.i + %retval.0.i.i.i = phi i64 [ %spec.select.i, %if.end11.i.i.i ], [ %call.i.i, %_ZN9grpc_core9Timestamp3NowEv.exit.i ] %14 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_trace_cares_resolver, i64 16) monotonic, align 8 %tobool.i.i.i.i19 = trunc i8 %14 to i1 br i1 %tobool.i.i.i.i19, label %if.then.i22, label %_ZL23grpc_ares_ev_driver_refP19grpc_ares_ev_driver.exit24 -if.then.i22: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit.i +if.then.i22: ; preds = %_ZL37calculate_next_ares_backup_poll_alarmP19grpc_ares_ev_driver.exit %request.i23 = getelementptr inbounds nuw i8, ptr %ev_driver, i64 40 %15 = load ptr, ptr %request.i23, align 8 tail call void (ptr, i32, i32, ptr, ...) @gpr_log(ptr noundef nonnull @.str.5, i32 noundef 193, i32 noundef 0, ptr noundef nonnull @.str.36, ptr noundef %15, ptr noundef nonnull %ev_driver) br label %_ZL23grpc_ares_ev_driver_refP19grpc_ares_ev_driver.exit24 -_ZL23grpc_ares_ev_driver_refP19grpc_ares_ev_driver.exit24: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit.i, %if.then.i22 - %call.i.i.off = add i64 %call.i.i, -9223372036854775807 - %switch = icmp ult i64 %call.i.i.off, 2 - %16 = tail call i64 @llvm.smin.i64(i64 %call.i.i, i64 9223372036854774807) - %spec.select.i = add nsw i64 %16, 1000 - %retval.0.i.i.i = select i1 %switch, i64 %call.i.i, i64 %spec.select.i +_ZL23grpc_ares_ev_driver_refP19grpc_ares_ev_driver.exit24: ; preds = %_ZL37calculate_next_ares_backup_poll_alarmP19grpc_ares_ev_driver.exit, %if.then.i22 tail call void @gpr_ref(ptr noundef nonnull %refs.i) %on_ares_backup_poll_alarm_locked = getelementptr inbounds nuw i8, ptr %ev_driver, i64 208 %cb1.i25 = getelementptr inbounds nuw i8, ptr %ev_driver, i64 216 @@ -1191,19 +1201,29 @@ _ZN9grpc_core9Timestamp3NowEv.exit.i: ; preds = %25, %do.end.i call.i.i.noexc: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit.i %call.i.i28.off = add i64 %call.i.i28, -9223372036854775807 %switch = icmp ult i64 %call.i.i28.off, 2 - %29 = call i64 @llvm.smin.i64(i64 %call.i.i28, i64 9223372036854774807) - %spec.select.i = add nsw i64 %29, 1000 - %retval.0.i.i.i = select i1 %switch, i64 %call.i.i28, i64 %spec.select.i - %30 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_trace_cares_resolver, i64 16) monotonic, align 8 - %tobool.i.i.i.i29 = trunc i8 %30 to i1 + br i1 %switch, label %invoke.cont36, label %if.end11.i.i.i + +if.end11.i.i.i: ; preds = %call.i.i.noexc + %cmp.i.i.i.i = icmp sgt i64 %call.i.i28, 0 + %sub.i.i.i.i = xor i64 %call.i.i28, 9223372036854775800 + %cmp1.i.i.i.i = icmp samesign ult i64 %sub.i.i.i.i, 1000 + %or.cond.i = select i1 %cmp.i.i.i.i, i1 %cmp1.i.i.i.i, i1 false + %add.i.i.i.i = add nsw i64 %call.i.i28, 1000 + %spec.select.i = select i1 %or.cond.i, i64 9223372036854775807, i64 %add.i.i.i.i + br label %invoke.cont36 + +invoke.cont36: ; preds = %call.i.i.noexc, %if.end11.i.i.i + %retval.0.i.i.i = phi i64 [ %spec.select.i, %if.end11.i.i.i ], [ %call.i.i28, %call.i.i.noexc ] + %29 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_trace_cares_resolver, i64 16) monotonic, align 8 + %tobool.i.i.i.i29 = trunc i8 %29 to i1 br i1 %tobool.i.i.i.i29, label %if.then.i31, label %do.end.i30 -if.then.i31: ; preds = %call.i.i.noexc - %31 = load ptr, ptr %request, align 8 - invoke void (ptr, i32, i32, ptr, ...) @gpr_log(ptr noundef nonnull @.str.5, i32 noundef 193, i32 noundef 0, ptr noundef nonnull @.str.36, ptr noundef %31, ptr noundef nonnull %arg) +if.then.i31: ; preds = %invoke.cont36 + %30 = load ptr, ptr %request, align 8 + invoke void (ptr, i32, i32, ptr, ...) @gpr_log(ptr noundef nonnull @.str.5, i32 noundef 193, i32 noundef 0, ptr noundef nonnull @.str.36, ptr noundef %30, ptr noundef nonnull %arg) to label %do.end.i30 unwind label %lpad.loopexit.split-lp -do.end.i30: ; preds = %if.then.i31, %call.i.i.noexc +do.end.i30: ; preds = %if.then.i31, %invoke.cont36 %refs.i = getelementptr inbounds nuw i8, ptr %arg, i64 16 invoke void @gpr_ref(ptr noundef nonnull %refs.i) to label %invoke.cont38 unwind label %lpad.loopexit.split-lp @@ -1233,10 +1253,10 @@ invoke.cont47: ; preds = %if.end46 to label %_ZN4absl12lts_202308029MutexLockD2Ev.exit unwind label %terminate.lpad.i terminate.lpad.i: ; preds = %invoke.cont47 - %32 = landingpad { ptr, i32 } + %31 = landingpad { ptr, i32 } catch ptr null - %33 = extractvalue { ptr, i32 } %32, 0 - call void @__clang_call_terminate(ptr %33) #26 + %32 = extractvalue { ptr, i32 } %31, 0 + call void @__clang_call_terminate(ptr %32) #26 unreachable _ZN4absl12lts_202308029MutexLockD2Ev.exit: ; preds = %invoke.cont47 @@ -1248,10 +1268,10 @@ ehcleanup: ; preds = %lpad.loopexit, %lpa to label %_ZN4absl12lts_202308029MutexLockD2Ev.exit36 unwind label %terminate.lpad.i35 terminate.lpad.i35: ; preds = %ehcleanup - %34 = landingpad { ptr, i32 } + %33 = landingpad { ptr, i32 } catch ptr null - %35 = extractvalue { ptr, i32 } %34, 0 - call void @__clang_call_terminate(ptr %35) #26 + %34 = extractvalue { ptr, i32 } %33, 0 + call void @__clang_call_terminate(ptr %34) #26 unreachable _ZN4absl12lts_202308029MutexLockD2Ev.exit36: ; preds = %ehcleanup @@ -6283,9 +6303,6 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #22 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #22 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.smin.i64(i64, i64) #21 - attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/grpc/optimized/oauth2_credentials.cc.ll b/bench/grpc/optimized/oauth2_credentials.cc.ll index 9b370c6b06d..fba9b28b669 100644 --- a/bench/grpc/optimized/oauth2_credentials.cc.ll +++ b/bench/grpc/optimized/oauth2_credentials.cc.ll @@ -2924,76 +2924,86 @@ _ZTWN9grpc_core9Timestamp25thread_local_time_source_E.exit.i: ; preds = %49, %in invoke.cont91: ; preds = %_ZTWN9grpc_core9Timestamp25thread_local_time_source_E.exit.i %call.i41.off = add i64 %call.i41, -9223372036854775807 %switch = icmp ult i64 %call.i41.off, 2 - %53 = call i64 @llvm.smin.i64(i64 %call.i41, i64 9223372036854715807) - %spec.select = add nsw i64 %53, 60000 - %retval.0.i.i = select i1 %switch, i64 %call.i41, i64 %spec.select + br i1 %switch, label %invoke.cont97, label %if.end11.i.i + +if.end11.i.i: ; preds = %invoke.cont91 + %cmp.i.i.i43 = icmp sgt i64 %call.i41, 0 + %sub.i.i.i = xor i64 %call.i41, 9223372036854775776 + %cmp1.i.i.i = icmp samesign ult i64 %sub.i.i.i, 60000 + %or.cond = select i1 %cmp.i.i.i43, i1 %cmp1.i.i.i, i1 false + %add.i.i.i = add nsw i64 %call.i41, 60000 + %spec.select = select i1 %or.cond, i64 9223372036854775807, i64 %add.i.i.i + br label %invoke.cont97 + +invoke.cont97: ; preds = %invoke.cont91, %if.end11.i.i + %retval.0.i.i = phi i64 [ %spec.select, %if.end11.i.i ], [ %call.i41, %invoke.cont91 ] %vtable101 = load ptr, ptr %this, align 8 %vfn102 = getelementptr inbounds nuw i8, ptr %vtable101, i64 56 - %54 = load ptr, ptr %vfn102, align 8 - invoke void %54(ptr noundef nonnull align 8 dereferenceable(120) %this, ptr noundef nonnull %call82, ptr noundef nonnull %pollent_, ptr noundef nonnull @_ZL37on_oauth2_token_fetcher_http_responsePvN4absl12lts_202308026StatusE, i64 %retval.0.i.i) + %53 = load ptr, ptr %vfn102, align 8 + invoke void %53(ptr noundef nonnull align 8 dereferenceable(120) %this, ptr noundef nonnull %call82, ptr noundef nonnull %pollent_, ptr noundef nonnull @_ZL37on_oauth2_token_fetcher_http_responsePvN4absl12lts_202308026StatusE, i64 %retval.0.i.i) to label %if.then.i71 unwind label %ehcleanup105 -ehcleanup105: ; preds = %_ZTWN9grpc_core9Timestamp25thread_local_time_source_E.exit.i, %49, %invoke.cont91 - %55 = landingpad { ptr, i32 } +ehcleanup105: ; preds = %_ZTWN9grpc_core9Timestamp25thread_local_time_source_E.exit.i, %49, %invoke.cont97 + %54 = landingpad { ptr, i32 } cleanup br label %if.then.i87 -if.then.i71: ; preds = %invoke.cont91, %invoke.cont78 - %56 = atomicrmw add ptr %refs_.i.i.i, i64 1 monotonic, align 8 +if.then.i71: ; preds = %invoke.cont97, %invoke.cont78 + %55 = atomicrmw add ptr %refs_.i.i.i, i64 1 monotonic, align 8 %arg.i63 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 store ptr @"_ZN9grpc_core20arena_promise_detail7InlinedIN4absl12lts_202308028StatusOrISt10unique_ptrI19grpc_metadata_batchNS_5Arena13PooledDeleterEEEEZN37grpc_oauth2_token_fetcher_credentials18GetRequestMetadataES9_PKN21grpc_call_credentials22GetRequestMetadataArgsEE3$_1E6vtableE", ptr %agg.result, align 16 store ptr %call.i27, ptr %arg.i63, align 16 - %57 = atomicrmw sub ptr %refs_.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i73 = icmp eq i64 %57, 1 + %56 = atomicrmw sub ptr %refs_.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i73 = icmp eq i64 %56, 1 br i1 %cmp.i.i.i73, label %if.then.i.i74, label %cleanup if.then.i.i74: ; preds = %if.then.i71 %vtable.i.i.i75 = load ptr, ptr %call.i27, align 8 %vfn.i.i.i76 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i75, i64 8 - %58 = load ptr, ptr %vfn.i.i.i76, align 8 - call void %58(ptr noundef nonnull align 8 dereferenceable(112) %call.i27) #30 + %57 = load ptr, ptr %vfn.i.i.i76, align 8 + call void %57(ptr noundef nonnull align 8 dereferenceable(112) %call.i27) #30 br label %cleanup if.then.i87: ; preds = %lpad40, %ehcleanup105 - %.pn2 = phi { ptr, i32 } [ %47, %lpad40 ], [ %55, %ehcleanup105 ] - %59 = atomicrmw sub ptr %refs_.i.i.i, i64 1 acq_rel, align 8 - %cmp.i.i.i89 = icmp eq i64 %59, 1 + %.pn2 = phi { ptr, i32 } [ %47, %lpad40 ], [ %54, %ehcleanup105 ] + %58 = atomicrmw sub ptr %refs_.i.i.i, i64 1 acq_rel, align 8 + %cmp.i.i.i89 = icmp eq i64 %58, 1 br i1 %cmp.i.i.i89, label %if.then.i.i90, label %ehcleanup113 if.then.i.i90: ; preds = %if.then.i87 %vtable.i.i.i91 = load ptr, ptr %call.i27, align 8 %vfn.i.i.i92 = getelementptr inbounds nuw i8, ptr %vtable.i.i.i91, i64 8 - %60 = load ptr, ptr %vfn.i.i.i92, align 8 - call void %60(ptr noundef nonnull align 8 dereferenceable(112) %call.i27) #30 + %59 = load ptr, ptr %vfn.i.i.i92, align 8 + call void %59(ptr noundef nonnull align 8 dereferenceable(112) %call.i27) #30 br label %ehcleanup113 cleanup: ; preds = %if.then.i.i74, %if.then.i71, %_ZNSt10unique_ptrI19grpc_metadata_batchN9grpc_core5Arena13PooledDeleterEED2Ev.exit - %61 = load i8, ptr %_M_engaged.i.i.i.i.i, align 8 - %tobool.i.i.i.i = trunc i8 %61 to i1 + %60 = load i8, ptr %_M_engaged.i.i.i.i.i, align 8 + %tobool.i.i.i.i = trunc i8 %60 to i1 br i1 %tobool.i.i.i.i, label %if.then.i.i.i.i94, label %_ZNSt8optionalIN9grpc_core5SliceEED2Ev.exit if.then.i.i.i.i94: ; preds = %cleanup store i8 0, ptr %_M_engaged.i.i.i.i.i, align 8 - %62 = load ptr, ptr %cached_access_token_value, align 8 - %cmp.i.i.i.i.i.i.i = icmp ugt ptr %62, inttoptr (i64 1 to ptr) + %61 = load ptr, ptr %cached_access_token_value, align 8 + %cmp.i.i.i.i.i.i.i = icmp ugt ptr %61, inttoptr (i64 1 to ptr) br i1 %cmp.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i, label %_ZNSt8optionalIN9grpc_core5SliceEED2Ev.exit if.then.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i94 - %63 = atomicrmw sub ptr %62, i64 1 acq_rel, align 8 - %cmp.i.i.i.i.i.i.i.i = icmp eq i64 %63, 1 + %62 = atomicrmw sub ptr %61, i64 1 acq_rel, align 8 + %cmp.i.i.i.i.i.i.i.i = icmp eq i64 %62, 1 br i1 %cmp.i.i.i.i.i.i.i.i, label %if.then.i.i.i.i.i.i.i.i, label %_ZNSt8optionalIN9grpc_core5SliceEED2Ev.exit if.then.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i - %destroyer_fn_.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %62, i64 8 - %64 = load ptr, ptr %destroyer_fn_.i.i.i.i.i.i.i.i, align 8 - invoke void %64(ptr noundef nonnull align 8 dereferenceable(16) %62) + %destroyer_fn_.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %61, i64 8 + %63 = load ptr, ptr %destroyer_fn_.i.i.i.i.i.i.i.i, align 8 + invoke void %63(ptr noundef nonnull align 8 dereferenceable(16) %61) to label %_ZNSt8optionalIN9grpc_core5SliceEED2Ev.exit unwind label %terminate.lpad.i.i.i.i.i.i terminate.lpad.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i - %65 = landingpad { ptr, i32 } + %64 = landingpad { ptr, i32 } catch ptr null - %66 = extractvalue { ptr, i32 } %65, 0 - call void @__clang_call_terminate(ptr %66) #32 + %65 = extractvalue { ptr, i32 } %64, 0 + call void @__clang_call_terminate(ptr %65) #32 unreachable _ZNSt8optionalIN9grpc_core5SliceEED2Ev.exit: ; preds = %cleanup, %if.then.i.i.i.i94, %if.then.i.i.i.i.i.i.i, %if.then.i.i.i.i.i.i.i.i @@ -12641,9 +12651,6 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #24 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #25 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.smin.i64(i64, i64) #26 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #26 diff --git a/bench/grpc/optimized/tcp_posix.cc.ll b/bench/grpc/optimized/tcp_posix.cc.ll index 557a06916df..74631fbb442 100644 --- a/bench/grpc/optimized/tcp_posix.cc.ll +++ b/bench/grpc/optimized/tcp_posix.cc.ll @@ -8288,26 +8288,36 @@ _ZN9grpc_core9Timestamp3NowEv.exit: ; preds = %if.end, %3 %call.i = tail call i64 %6(ptr noundef nonnull align 8 dereferenceable(8) %5) %call.i.off = add i64 %call.i, -9223372036854775807 %switch = icmp ult i64 %call.i.off, 2 - %7 = tail call i64 @llvm.smin.i64(i64 %call.i, i64 9223372036854765807) - %spec.select = add nsw i64 %7, 10000 - %retval.0.i.i = select i1 %switch, i64 %call.i, i64 %spec.select + br i1 %switch, label %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit, label %if.end11.i.i + +if.end11.i.i: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit + %cmp.i.i.i = icmp sgt i64 %call.i, 0 + %sub.i.i.i = xor i64 %call.i, 9223372036854775792 + %cmp1.i.i.i = icmp samesign ult i64 %sub.i.i.i, 10000 + %or.cond = select i1 %cmp.i.i.i, i1 %cmp1.i.i.i, i1 false + %add.i.i.i = add nsw i64 %call.i, 10000 + %spec.select = select i1 %or.cond, i64 9223372036854775807, i64 %add.i.i.i + br label %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit + +_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit, %if.end11.i.i + %retval.0.i.i = phi i64 [ %spec.select, %if.end11.i.i ], [ %call.i, %_ZN9grpc_core9Timestamp3NowEv.exit ] %add.ptr = getelementptr inbounds nuw i8, ptr %bp, i64 40 call void @_Z17grpc_pollset_workP12grpc_pollsetPP19grpc_pollset_workerN9grpc_core9TimestampE(ptr nonnull sret(%"class.absl::lts_20230802::Status") align 8 %agg.tmp9, ptr noundef nonnull %add.ptr, ptr noundef null, i64 %retval.0.i.i) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %agg.tmp.i) - %8 = load i64, ptr %agg.tmp9, align 8 - %cmp.i.i12 = icmp eq i64 %8, 0 + %7 = load i64, ptr %agg.tmp9, align 8 + %cmp.i.i12 = icmp eq i64 %7, 0 br i1 %cmp.i.i12, label %invoke.cont, label %cond.false.i -cond.false.i: ; preds = %_ZN9grpc_core9Timestamp3NowEv.exit - store i64 %8, ptr %agg.tmp.i, align 8 - %and.i.i.i.i = and i64 %8, 1 +cond.false.i: ; preds = %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit + store i64 %7, ptr %agg.tmp.i, align 8 + %and.i.i.i.i = and i64 %7, 1 %cmp.i.i.i.i = icmp eq i64 %and.i.i.i.i, 0 br i1 %cmp.i.i.i.i, label %_ZN4absl12lts_202308026StatusC2ERKS1_.exit.i, label %if.then.i.i.i13 if.then.i.i.i13: ; preds = %cond.false.i - %sub.i.i.i.i = add nsw i64 %8, -1 - %9 = inttoptr i64 %sub.i.i.i.i to ptr - %10 = atomicrmw add ptr %9, i32 1 monotonic, align 4 + %sub.i.i.i.i = add nsw i64 %7, -1 + %8 = inttoptr i64 %sub.i.i.i.i to ptr + %9 = atomicrmw add ptr %8, i32 1 monotonic, align 4 br label %_ZN4absl12lts_202308026StatusC2ERKS1_.exit.i _ZN4absl12lts_202308026StatusC2ERKS1_.exit.i: ; preds = %if.then.i.i.i13, %cond.false.i @@ -8315,58 +8325,58 @@ _ZN4absl12lts_202308026StatusC2ERKS1_.exit.i: ; preds = %if.then.i.i.i13, %c to label %cleanup.action.i unwind label %lpad.i cleanup.action.i: ; preds = %_ZN4absl12lts_202308026StatusC2ERKS1_.exit.i - %11 = load i64, ptr %agg.tmp.i, align 8 - %and.i.i.i1.i = and i64 %11, 1 + %10 = load i64, ptr %agg.tmp.i, align 8 + %and.i.i.i1.i = and i64 %10, 1 %cmp.i.i.i2.i = icmp eq i64 %and.i.i.i1.i, 0 br i1 %cmp.i.i.i2.i, label %invoke.cont, label %if.then.i.i3.i if.then.i.i3.i: ; preds = %cleanup.action.i - invoke void @_ZN4absl12lts_202308026Status15UnrefNonInlinedEm(i64 noundef %11) + invoke void @_ZN4absl12lts_202308026Status15UnrefNonInlinedEm(i64 noundef %10) to label %invoke.cont unwind label %terminate.lpad.i.i terminate.lpad.i.i: ; preds = %if.then.i.i3.i - %12 = landingpad { ptr, i32 } + %11 = landingpad { ptr, i32 } catch ptr null - %13 = extractvalue { ptr, i32 } %12, 0 - call void @__clang_call_terminate(ptr %13) #28 + %12 = extractvalue { ptr, i32 } %11, 0 + call void @__clang_call_terminate(ptr %12) #28 unreachable lpad.i: ; preds = %_ZN4absl12lts_202308026StatusC2ERKS1_.exit.i - %14 = landingpad { ptr, i32 } + %13 = landingpad { ptr, i32 } cleanup call void @_ZN4absl12lts_202308026StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %agg.tmp.i) #25 br label %eh.resume -invoke.cont: ; preds = %if.then.i.i3.i, %cleanup.action.i, %_ZN9grpc_core9Timestamp3NowEv.exit +invoke.cont: ; preds = %if.then.i.i3.i, %cleanup.action.i, %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %agg.tmp.i) - %15 = load i64, ptr %agg.tmp9, align 8 - %and.i.i.i = and i64 %15, 1 + %14 = load i64, ptr %agg.tmp9, align 8 + %and.i.i.i = and i64 %14, 1 %cmp.i.i.i14 = icmp eq i64 %and.i.i.i, 0 br i1 %cmp.i.i.i14, label %_ZN4absl12lts_202308026StatusD2Ev.exit, label %if.then.i.i if.then.i.i: ; preds = %invoke.cont - invoke void @_ZN4absl12lts_202308026Status15UnrefNonInlinedEm(i64 noundef %15) + invoke void @_ZN4absl12lts_202308026Status15UnrefNonInlinedEm(i64 noundef %14) to label %_ZN4absl12lts_202308026StatusD2Ev.exit unwind label %terminate.lpad.i terminate.lpad.i: ; preds = %if.then.i.i - %16 = landingpad { ptr, i32 } + %15 = landingpad { ptr, i32 } catch ptr null - %17 = extractvalue { ptr, i32 } %16, 0 - call void @__clang_call_terminate(ptr %17) #28 + %16 = extractvalue { ptr, i32 } %15, 0 + call void @__clang_call_terminate(ptr %16) #28 unreachable _ZN4absl12lts_202308026StatusD2Ev.exit: ; preds = %invoke.cont, %if.then.i.i - %18 = load ptr, ptr %bp, align 8 - call void @gpr_mu_unlock(ptr noundef %18) - %19 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8 - call void @_ZN4absl12lts_202308025Mutex4LockEv(ptr noundef nonnull align 8 dereferenceable(8) %19) - %20 = load i32, ptr @_ZL33g_uncovered_notifications_pending, align 4 - %cmp = icmp eq i32 %20, 1 + %17 = load ptr, ptr %bp, align 8 + call void @gpr_mu_unlock(ptr noundef %17) + %18 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8 + call void @_ZN4absl12lts_202308025Mutex4LockEv(ptr noundef nonnull align 8 dereferenceable(8) %18) + %19 = load i32, ptr @_ZL33g_uncovered_notifications_pending, align 4 + %cmp = icmp eq i32 %19, 1 br i1 %cmp, label %do.body, label %if.else do.body: ; preds = %_ZN4absl12lts_202308026StatusD2Ev.exit - %21 = load ptr, ptr @_ZL15g_backup_poller, align 8 - %cmp15.not = icmp eq ptr %21, %bp + %20 = load ptr, ptr @_ZL15g_backup_poller, align 8 + %cmp15.not = icmp eq ptr %20, %bp br i1 %cmp15.not, label %do.end, label %if.then16 if.then16: ; preds = %do.body @@ -8376,10 +8386,10 @@ if.then16: ; preds = %do.body do.end: ; preds = %do.body store ptr null, ptr @_ZL15g_backup_poller, align 8 store i32 0, ptr @_ZL33g_uncovered_notifications_pending, align 4 - %22 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8 - call void @_ZN4absl12lts_202308025Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %22) - %23 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_tcp_trace, i64 16) monotonic, align 8 - %tobool.i.i.i15 = trunc i8 %23 to i1 + %21 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8 + call void @_ZN4absl12lts_202308025Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %21) + %22 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_tcp_trace, i64 16) monotonic, align 8 + %tobool.i.i.i15 = trunc i8 %22 to i1 br i1 %tobool.i.i.i15, label %if.then19, label %if.end20 if.then19: ; preds = %do.end @@ -8398,10 +8408,10 @@ if.end20: ; preds = %if.then19, %do.end br label %if.end30 if.else: ; preds = %_ZN4absl12lts_202308026StatusD2Ev.exit - %24 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8 - call void @_ZN4absl12lts_202308025Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %24) - %25 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_tcp_trace, i64 16) monotonic, align 8 - %tobool.i.i.i16 = trunc i8 %25 to i1 + %23 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8 + call void @_ZN4absl12lts_202308025Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %23) + %24 = load atomic i8, ptr getelementptr inbounds nuw (i8, ptr @grpc_tcp_trace, i64 16) monotonic, align 8 + %tobool.i.i.i16 = trunc i8 %24 to i1 br i1 %tobool.i.i.i16, label %if.then24, label %if.end25 if.then24: ; preds = %if.else @@ -8415,24 +8425,24 @@ if.end25: ; preds = %if.then24, %if.else to label %invoke.cont29 unwind label %lpad28 invoke.cont29: ; preds = %if.end25 - %26 = load i64, ptr %agg.tmp27, align 8 - %and.i.i.i17 = and i64 %26, 1 + %25 = load i64, ptr %agg.tmp27, align 8 + %and.i.i.i17 = and i64 %25, 1 %cmp.i.i.i18 = icmp eq i64 %and.i.i.i17, 0 br i1 %cmp.i.i.i18, label %if.end30, label %if.then.i.i19 if.then.i.i19: ; preds = %invoke.cont29 - invoke void @_ZN4absl12lts_202308026Status15UnrefNonInlinedEm(i64 noundef %26) + invoke void @_ZN4absl12lts_202308026Status15UnrefNonInlinedEm(i64 noundef %25) to label %if.end30 unwind label %terminate.lpad.i20 terminate.lpad.i20: ; preds = %if.then.i.i19 - %27 = landingpad { ptr, i32 } + %26 = landingpad { ptr, i32 } catch ptr null - %28 = extractvalue { ptr, i32 } %27, 0 - call void @__clang_call_terminate(ptr %28) #28 + %27 = extractvalue { ptr, i32 } %26, 0 + call void @__clang_call_terminate(ptr %27) #28 unreachable lpad28: ; preds = %if.end25 - %29 = landingpad { ptr, i32 } + %28 = landingpad { ptr, i32 } cleanup br label %eh.resume @@ -8441,7 +8451,7 @@ if.end30: ; preds = %if.then.i.i19, %inv eh.resume: ; preds = %lpad28, %lpad.i %agg.tmp27.sink = phi ptr [ %agg.tmp27, %lpad28 ], [ %agg.tmp9, %lpad.i ] - %.pn = phi { ptr, i32 } [ %29, %lpad28 ], [ %14, %lpad.i ] + %.pn = phi { ptr, i32 } [ %28, %lpad28 ], [ %13, %lpad.i ] call void @_ZN4absl12lts_202308026StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %agg.tmp27.sink) #25 resume { ptr, i32 } %.pn } @@ -9219,9 +9229,6 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #20 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #21 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.smin.i64(i64, i64) #22 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #22 diff --git a/bench/hdf5/optimized/sio_engine.c.ll b/bench/hdf5/optimized/sio_engine.c.ll index ba24fa545e1..9e51d50e82d 100644 --- a/bench/hdf5/optimized/sio_engine.c.ll +++ b/bench/hdf5/optimized/sio_engine.c.ll @@ -277,26 +277,23 @@ define dso_local void @do_sio(ptr nocapture noundef readonly byval(%struct.param .critedge.i: ; preds = %.preheader.i store i8 47, ptr %90, align 1 %93 = icmp samesign ult i64 %.0871.i, 4095 - br i1 %93, label %.lr.ph.preheader.i, label %.critedge5.i + br i1 %93, label %.lr.ph.i, label %.critedge5.i -.lr.ph.preheader.i: ; preds = %.critedge.i - %94 = sub nuw nsw i64 4095, %.0871.i - br label %.lr.ph.i +.lr.ph.i: ; preds = %.critedge.i, %96 + %.1884.in.i = phi i64 [ %.1884.i, %96 ], [ %.0871.i, %.critedge.i ] + %.0863.i = phi i64 [ %98, %96 ], [ 0, %.critedge.i ] + %94 = getelementptr inbounds nuw i8, ptr %87, i64 %.0863.i + %95 = load i8, ptr %94, align 1 + %.not98.i = icmp eq i8 %95, 0 + br i1 %.not98.i, label %.critedge5.i, label %96 -.lr.ph.i: ; preds = %97, %.lr.ph.preheader.i - %.1884.in.i = phi i64 [ %.1884.i, %97 ], [ %.0871.i, %.lr.ph.preheader.i ] - %.0863.i = phi i64 [ %99, %97 ], [ 0, %.lr.ph.preheader.i ] - %95 = getelementptr inbounds nuw i8, ptr %87, i64 %.0863.i - %96 = load i8, ptr %95, align 1 - %.not98.i = icmp eq i8 %96, 0 - br i1 %.not98.i, label %.critedge5.i, label %97 - -97: ; preds = %.lr.ph.i +96: ; preds = %.lr.ph.i %.1884.i = add nuw nsw i64 %.1884.in.i, 1 - %98 = getelementptr inbounds nuw i8, ptr %28, i64 %.1884.i - store i8 %96, ptr %98, align 1 - %99 = add nuw nsw i64 %.0863.i, 1 - %exitcond10.not.i = icmp eq i64 %99, %94 + %97 = getelementptr inbounds nuw i8, ptr %28, i64 %.1884.i + store i8 %95, ptr %97, align 1 + %98 = add nuw nsw i64 %.0863.i, 1 + %99 = xor i64 %98, %.0871.i + %exitcond10.not.i = icmp eq i64 %99, 4095 br i1 %exitcond10.not.i, label %.critedge5.i, label %.lr.ph.i 100: ; preds = %84 @@ -309,7 +306,7 @@ define dso_local void @do_sio(ptr nocapture noundef readonly byval(%struct.param store i8 %.sink.i, ptr %102, align 1 br label %.critedge5.i -.critedge5.i: ; preds = %97, %.lr.ph.i, %.critedge5.sink.split.i, %.critedge.i +.critedge5.i: ; preds = %96, %.lr.ph.i, %.critedge5.sink.split.i, %.critedge.i %103 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %28) #21 %104 = call i64 @strlen(ptr noundef nonnull readonly dereferenceable(1) %18) #21 %105 = add i64 %103, 1 @@ -520,7 +517,7 @@ sio_create_filename.exit: ; preds = %141, %.critedge5.i, br label %194 194: ; preds = %.thread.i, %187 - %indvars.iv116.i156 = phi i64 [ %193, %.thread.i ], [ 0, %187 ] + %indvars.iv116.i155 = phi i64 [ %193, %.thread.i ], [ 0, %187 ] %195 = phi i32 [ %188, %.thread.i ], [ %smin, %187 ] %cont_size.promoted.i = phi i64 [ %191, %.thread.i ], [ 1, %187 ] store i64 %cont_size.promoted.i, ptr @cont_size, align 8 @@ -532,7 +529,7 @@ sio_create_filename.exit: ; preds = %141, %.critedge5.i, br label %197 197: ; preds = %197, %.lr.ph106.i - %indvars.iv120.i = phi i64 [ %indvars.iv116.i156, %.lr.ph106.i ], [ %indvars.iv.next121.i, %197 ] + %indvars.iv120.i = phi i64 [ %indvars.iv116.i155, %.lr.ph106.i ], [ %indvars.iv.next121.i, %197 ] %198 = phi i64 [ %cont_size.promoted.i, %.lr.ph106.i ], [ %201, %197 ] %199 = getelementptr inbounds [32 x i64], ptr %174, i64 0, i64 %indvars.iv120.i %200 = load i64, ptr %199, align 8 @@ -880,18 +877,18 @@ do_write.exit: ; preds = %318, %327 call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %7) call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) - br i1 %33, label %.lr.ph.preheader.i88, label %._crit_edge.i74 + br i1 %33, label %.lr.ph.preheader.i, label %._crit_edge.i74 -.lr.ph.preheader.i88: ; preds = %371 +.lr.ph.preheader.i: ; preds = %371 %374 = zext nneg i32 %32 to i64 %375 = shl nuw nsw i64 %374, 3 call void @llvm.memset.p0.i64(ptr nonnull align 16 @offset, i8 0, i64 %375, i1 false) call void @llvm.memset.p0.i64(ptr nonnull align 16 @h5offset, i8 0, i64 %375, i1 false) br label %._crit_edge.i74 -._crit_edge.i74: ; preds = %.lr.ph.preheader.i88, %371 - %switch196 = icmp eq i32 %19, 0 - br i1 %switch196, label %.preheader.i81, label %.preheader80.i +._crit_edge.i74: ; preds = %.lr.ph.preheader.i, %371 + %switch195 = icmp eq i32 %19, 0 + br i1 %switch195, label %.preheader.i81, label %.preheader80.i .preheader80.i: ; preds = %._crit_edge.i74 br i1 %33, label %.lr.ph88.i, label %._crit_edge89.i @@ -910,7 +907,7 @@ do_write.exit: ; preds = %318, %327 %380 = getelementptr inbounds nuw i8, ptr %0, i64 296 %381 = getelementptr inbounds nuw i8, ptr %0, i64 40 %382 = zext i32 %32 to i64 - %smin169 = call i32 @llvm.smin.i32(i32 %32, i32 0) + %smin168 = call i32 @llvm.smin.i32(i32 %32, i32 0) br label %383 383: ; preds = %387, %.preheader.i81 @@ -929,7 +926,7 @@ do_write.exit: ; preds = %318, %327 br i1 %392, label %383, label %.thread.loopexit.i87 393: ; preds = %383 - store i32 %smin169, ptr @cont_dim, align 4 + store i32 %smin168, ptr @cont_dim, align 4 %.not.i82 = icmp eq i64 %indvars.iv102.i, 0 br i1 %.not.i82, label %400, label %.thread.i83 @@ -938,7 +935,7 @@ do_write.exit: ; preds = %318, %327 br label %.thread.i83 .thread.i83: ; preds = %.thread.loopexit.i87, %393 - %394 = phi i32 [ %385, %.thread.loopexit.i87 ], [ %smin169, %393 ] + %394 = phi i32 [ %385, %.thread.loopexit.i87 ], [ %smin168, %393 ] %sext.i84 = shl i64 %384, 32 %395 = ashr exact i64 %sext.i84, 32 %396 = getelementptr inbounds [32 x i64], ptr %380, i64 0, i64 %395 @@ -948,8 +945,8 @@ do_write.exit: ; preds = %318, %327 br label %400 400: ; preds = %.thread.i83, %393 - %indvars.iv102.i148 = phi i64 [ %399, %.thread.i83 ], [ 0, %393 ] - %401 = phi i32 [ %394, %.thread.i83 ], [ %smin169, %393 ] + %indvars.iv102.i147 = phi i64 [ %399, %.thread.i83 ], [ 0, %393 ] + %401 = phi i32 [ %394, %.thread.i83 ], [ %smin168, %393 ] %cont_size.promoted.i85 = phi i64 [ %397, %.thread.i83 ], [ 1, %393 ] store i64 %cont_size.promoted.i85, ptr @cont_size, align 8 %402 = icmp sgt i32 %32, %401 @@ -960,7 +957,7 @@ do_write.exit: ; preds = %318, %327 br label %403 403: ; preds = %403, %.lr.ph94.i - %indvars.iv106.i = phi i64 [ %indvars.iv102.i148, %.lr.ph94.i ], [ %indvars.iv.next107.i, %403 ] + %indvars.iv106.i = phi i64 [ %indvars.iv102.i147, %.lr.ph94.i ], [ %indvars.iv.next107.i, %403 ] %404 = phi i64 [ %cont_size.promoted.i85, %.lr.ph94.i ], [ %407, %403 ] %405 = getelementptr inbounds [32 x i64], ptr %380, i64 0, i64 %indvars.iv106.i %406 = load i64, ptr %405, align 8 @@ -1169,8 +1166,8 @@ do_read.exit: ; preds = %483, %492 500: ; preds = %499 %501 = load i32, ptr %17, align 8 %502 = call i32 @close(i32 noundef %501) #18 - %.not.i90 = icmp eq i32 %502, 0 - br i1 %.not.i90, label %506, label %503 + %.not.i89 = icmp eq i32 %502, 0 + br i1 %.not.i89, label %506, label %503 503: ; preds = %500 %504 = load ptr, ptr @stderr, align 8 @@ -1179,7 +1176,7 @@ do_read.exit: ; preds = %483, %492 506: ; preds = %500 store i32 -1, ptr %17, align 8 - br label %do_fclose.exit91 + br label %do_fclose.exit90 507: ; preds = %499 %508 = load i64, ptr %17, align 8 @@ -1194,14 +1191,14 @@ do_read.exit: ; preds = %483, %492 514: ; preds = %507 store i64 -1, ptr %17, align 8 - br label %do_fclose.exit91 + br label %do_fclose.exit90 515: ; preds = %499 %516 = load ptr, ptr @stderr, align 8 %517 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %516, ptr noundef nonnull @.str, i32 noundef %19) #17 br label %520 -do_fclose.exit91: ; preds = %506, %514 +do_fclose.exit90: ; preds = %506, %514 %518 = load ptr, ptr %151, align 8 %519 = call ptr @io_time_set(ptr noundef %518, i32 noundef 11, i32 noundef 1) #18 br label %525 @@ -1213,7 +1210,7 @@ do_fclose.exit91: ; preds = %506, %514 %524 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %523, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.11, i32 noundef 240, ptr noundef nonnull @.str.9) #17 br label %572 -525: ; preds = %do_fclose.exit91, %358 +525: ; preds = %do_fclose.exit90, %358 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) %526 = call noalias dereferenceable_or_null(4102) ptr @calloc(i64 noundef 1, i64 noundef 4102) #19 %527 = icmp eq ptr %526, null @@ -1233,8 +1230,8 @@ do_fclose.exit91: ; preds = %506, %514 535: ; preds = %531, %528 %536 = phi i32 [ %534, %531 ], [ %529, %528 ] - %.not.i92 = icmp eq i32 %536, 0 - br i1 %.not.i92, label %do_cleanupfile.exit, label %537 + %.not.i91 = icmp eq i32 %536, 0 + br i1 %.not.i91, label %do_cleanupfile.exit, label %537 537: ; preds = %535 %switch = icmp eq i32 %19, 0 @@ -1249,22 +1246,22 @@ do_fclose.exit91: ; preds = %506, %514 %542 = call i64 @H5Pget_driver(i64 noundef %541) #18 %543 = call i64 @H5FDperform_init(ptr noundef nonnull @H5FD_family_init) #18 %544 = icmp eq i64 %542, %543 - br i1 %544, label %.preheader.i97, label %553 + br i1 %544, label %.preheader.i96, label %553 -.preheader.i97: ; preds = %540 +.preheader.i96: ; preds = %540 %545 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %526, i64 noundef 4102, ptr noundef nonnull %28, i32 noundef 0) #18 %546 = call i32 @access(ptr noundef nonnull %526, i32 noundef 0) #18 %547 = icmp slt i32 %546, 0 - br i1 %547, label %.loopexit.i93, label %.lr.ph.i98 + br i1 %547, label %.loopexit.i92, label %.lr.ph.i97 -.lr.ph.i98: ; preds = %.preheader.i97, %.lr.ph.i98 - %.02329.i = phi i32 [ %549, %.lr.ph.i98 ], [ 0, %.preheader.i97 ] +.lr.ph.i97: ; preds = %.preheader.i96, %.lr.ph.i97 + %.02329.i = phi i32 [ %549, %.lr.ph.i97 ], [ 0, %.preheader.i96 ] %548 = call i32 @remove(ptr noundef nonnull %526) #18 %549 = add nuw nsw i32 %.02329.i, 1 %550 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %526, i64 noundef 4102, ptr noundef nonnull %28, i32 noundef %549) #18 %551 = call i32 @access(ptr noundef nonnull %526, i32 noundef 0) #18 %552 = icmp slt i32 %551, 0 - br i1 %552, label %.loopexit.i93, label %.lr.ph.i98 + br i1 %552, label %.loopexit.i92, label %.lr.ph.i97 553: ; preds = %540 %554 = call i64 @H5FDperform_init(ptr noundef nonnull @H5FD_core_init) #18 @@ -1276,34 +1273,34 @@ do_fclose.exit91: ; preds = %506, %514 %558 = call i32 @H5Pget_fapl_core(i64 noundef %557, ptr noundef null, ptr noundef nonnull %3) #18 %559 = load i8, ptr %3, align 1 %560 = trunc i8 %559 to i1 - br i1 %560, label %.loopexit.i93.sink.split, label %.loopexit.i93 + br i1 %560, label %.loopexit.i92.sink.split, label %.loopexit.i92 561: ; preds = %553 %562 = call i64 @H5FDperform_init(ptr noundef nonnull @H5FD_multi_init) #18 %563 = icmp eq i64 %542, %562 - br i1 %563, label %.preheader26.i, label %.loopexit.i93.sink.split + br i1 %563, label %.preheader26.i, label %.loopexit.i92.sink.split .preheader26.i: ; preds = %561, %.preheader26.i - %indvars.iv.i94 = phi i64 [ %indvars.iv.next.i95, %.preheader26.i ], [ 0, %561 ] - %564 = getelementptr inbounds nuw i8, ptr @.str.50, i64 %indvars.iv.i94 + %indvars.iv.i93 = phi i64 [ %indvars.iv.next.i94, %.preheader26.i ], [ 0, %561 ] + %564 = getelementptr inbounds nuw i8, ptr @.str.50, i64 %indvars.iv.i93 %565 = load i8, ptr %564, align 1 %566 = sext i8 %565 to i32 %567 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %526, i64 noundef 4102, ptr noundef nonnull @.str.54, ptr noundef nonnull %28, i32 noundef %566) #18 %568 = call i32 @remove(ptr noundef nonnull %526) #18 - %indvars.iv.next.i95 = add nuw nsw i64 %indvars.iv.i94, 1 - %exitcond.not.i96 = icmp eq i64 %indvars.iv.next.i95, 7 - br i1 %exitcond.not.i96, label %.loopexit.i93, label %.preheader26.i + %indvars.iv.next.i94 = add nuw nsw i64 %indvars.iv.i93, 1 + %exitcond.not.i95 = icmp eq i64 %indvars.iv.next.i94, 7 + br i1 %exitcond.not.i95, label %.loopexit.i92, label %.preheader26.i -.loopexit.i93.sink.split: ; preds = %561, %556 +.loopexit.i92.sink.split: ; preds = %561, %556 %569 = call i32 @remove(ptr noundef nonnull %28) #18 - br label %.loopexit.i93 + br label %.loopexit.i92 -.loopexit.i93: ; preds = %.preheader26.i, %.lr.ph.i98, %.loopexit.i93.sink.split, %556, %.preheader.i97 +.loopexit.i92: ; preds = %.preheader26.i, %.lr.ph.i97, %.loopexit.i92.sink.split, %556, %.preheader.i96 %570 = load i64, ptr @fapl, align 8 %571 = call i32 @H5Pclose(i64 noundef %570) #18 br label %do_cleanupfile.exit -do_cleanupfile.exit: ; preds = %525, %535, %538, %.loopexit.i93 +do_cleanupfile.exit: ; preds = %525, %535, %538, %.loopexit.i92 call void @free(ptr noundef %526) #18 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) br label %572 @@ -1312,7 +1309,7 @@ do_cleanupfile.exit: ; preds = %525, %535, %538, %. %.055 = phi ptr [ null, %22 ], [ null, %48 ], [ null, %56 ], [ null, %64 ], [ %62, %do_cleanupfile.exit ], [ %62, %520 ], [ %62, %496 ], [ %62, %368 ], [ %62, %353 ], [ %62, %331 ], [ %62, %156 ], [ null, %25 ] %.054 = phi i32 [ -1, %22 ], [ -1, %48 ], [ -1, %56 ], [ -1, %64 ], [ 0, %do_cleanupfile.exit ], [ -1, %520 ], [ -1, %496 ], [ -1, %368 ], [ -1, %353 ], [ -1, %331 ], [ -1, %156 ], [ -1, %25 ] %.053 = phi ptr [ null, %22 ], [ %28, %48 ], [ %28, %56 ], [ %28, %64 ], [ %28, %do_cleanupfile.exit ], [ %28, %520 ], [ %28, %496 ], [ %28, %368 ], [ %28, %353 ], [ %28, %331 ], [ %28, %156 ], [ null, %25 ] - switch i32 %19, label %do_fclose.exit101 [ + switch i32 %19, label %do_fclose.exit100 [ i32 0, label %573 i32 1, label %580 ] @@ -1320,34 +1317,34 @@ do_cleanupfile.exit: ; preds = %525, %535, %538, %. 573: ; preds = %572 %574 = load i32, ptr %17, align 8 %.not64 = icmp eq i32 %574, -1 - br i1 %.not64, label %do_fclose.exit101, label %575 + br i1 %.not64, label %do_fclose.exit100, label %575 575: ; preds = %573 %576 = call i32 @close(i32 noundef %574) #18 - %.not.i99 = icmp eq i32 %576, 0 - br i1 %.not.i99, label %do_fclose.exit101, label %577 + %.not.i98 = icmp eq i32 %576, 0 + br i1 %.not.i98, label %do_fclose.exit100, label %577 577: ; preds = %575 %578 = load ptr, ptr @stderr, align 8 %579 = call i64 @fwrite(ptr nonnull @.str.51, i64 24, i64 1, ptr %578) #23 - br label %do_fclose.exit101 + br label %do_fclose.exit100 580: ; preds = %572 %581 = load i64, ptr %17, align 8 %.not63 = icmp eq i64 %581, -1 - br i1 %.not63, label %do_fclose.exit101, label %582 + br i1 %.not63, label %do_fclose.exit100, label %582 582: ; preds = %580 %583 = call i32 @H5Fclose(i64 noundef %581) #18 %584 = icmp slt i32 %583, 0 - br i1 %584, label %585, label %do_fclose.exit101 + br i1 %584, label %585, label %do_fclose.exit100 585: ; preds = %582 %586 = load ptr, ptr @stderr, align 8 %587 = call i64 @fwrite(ptr nonnull @.str.52, i64 23, i64 1, ptr %586) #23 - br label %do_fclose.exit101 + br label %do_fclose.exit100 -do_fclose.exit101: ; preds = %582, %575, %585, %577, %572, %580, %573 +do_fclose.exit100: ; preds = %582, %575, %585, %577, %572, %580, %573 call void @free(ptr noundef %.055) #18 call void @free(ptr noundef %.053) #18 store i32 %.054, ptr %1, align 8 diff --git a/bench/icu/optimized/edits.ll b/bench/icu/optimized/edits.ll index 2755b9dc04d..3b398988deb 100644 --- a/bench/icu/optimized/edits.ll +++ b/bench/icu/optimized/edits.ll @@ -910,14 +910,14 @@ _ZNK6icu_755Edits8lastUnitEv.exit: ; preds = %if.end5 br i1 %cmp7, label %if.then8, label %if.end13 if.then8: ; preds = %_ZNK6icu_755Edits8lastUnitEv.exit - %narrow = sub nuw nsw i16 4095, %5 - %sub = zext nneg i16 %narrow to i32 + %6 = xor i16 %5, 4095 + %sub = zext nneg i16 %6 to i32 %cmp9.not = icmp samesign ugt i32 %unchangedLength, %sub br i1 %cmp9.not, label %if.end11, label %if.then10 if.then10: ; preds = %if.then8 - %6 = trunc i32 %unchangedLength to i16 - %conv.i14 = add nuw nsw i16 %5, %6 + %7 = trunc i32 %unchangedLength to i16 + %conv.i14 = add nuw nsw i16 %5, %7 store i16 %conv.i14, ptr %arrayidx.i, align 2 br label %if.end19 @@ -938,9 +938,9 @@ while.body.lr.ph: ; preds = %if.end13 while.body: ; preds = %while.body.lr.ph, %_ZN6icu_755Edits6appendEi.exit %unchangedLength.addr.170 = phi i32 [ %unchangedLength.addr.0, %while.body.lr.ph ], [ %sub15, %_ZN6icu_755Edits6appendEi.exit ] - %7 = load i32, ptr %length.i, align 4 - %8 = load i32, ptr %capacity.i, align 8 - %cmp.i20 = icmp slt i32 %7, %8 + %8 = load i32, ptr %length.i, align 4 + %9 = load i32, ptr %capacity.i, align 8 + %cmp.i20 = icmp slt i32 %8, %9 %.pre.i = load ptr, ptr %this, align 8 br i1 %cmp.i20, label %if.then.i, label %lor.lhs.false.i @@ -949,7 +949,7 @@ lor.lhs.false.i: ; preds = %while.body br i1 %cmp.i.i, label %if.end11.i.i, label %if.else.i.i if.else.i.i: ; preds = %lor.lhs.false.i - %cmp2.i.i = icmp eq i32 %8, 2147483647 + %cmp2.i.i = icmp eq i32 %9, 2147483647 br i1 %cmp2.i.i, label %if.then3.i.i, label %if.else4.i.i if.then3.i.i: ; preds = %if.else.i.i @@ -957,14 +957,14 @@ if.then3.i.i: ; preds = %if.else.i.i br label %_ZN6icu_755Edits6appendEi.exit if.else4.i.i: ; preds = %if.else.i.i - %cmp6.i.i = icmp sgt i32 %8, 1073741822 - %mul.i.i = shl nsw i32 %8, 1 + %cmp6.i.i = icmp sgt i32 %9, 1073741822 + %mul.i.i = shl nsw i32 %9, 1 %spec.select.i.i = select i1 %cmp6.i.i, i32 2147483647, i32 %mul.i.i br label %if.end11.i.i if.end11.i.i: ; preds = %if.else4.i.i, %lor.lhs.false.i %newCapacity.0.i.i = phi i32 [ %spec.select.i.i, %if.else4.i.i ], [ 2000, %lor.lhs.false.i ] - %sub.i.i = sub nsw i32 %newCapacity.0.i.i, %8 + %sub.i.i = sub nsw i32 %newCapacity.0.i.i, %9 %cmp13.i.i = icmp slt i32 %sub.i.i, 5 br i1 %cmp13.i.i, label %if.then14.i.i, label %if.end16.i.i @@ -984,16 +984,16 @@ if.then19.i.i: ; preds = %if.end16.i.i br label %_ZN6icu_755Edits6appendEi.exit do.body.i.i: ; preds = %if.end16.i.i - %9 = load ptr, ptr %this, align 8 - %10 = load i32, ptr %length.i, align 4 - %conv23.i.i = sext i32 %10 to i64 + %10 = load ptr, ptr %this, align 8 + %11 = load i32, ptr %length.i, align 4 + %conv23.i.i = sext i32 %11 to i64 %mul24.i.i = shl nsw i64 %conv23.i.i, 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %call.i.i, ptr align 2 %9, i64 %mul24.i.i, i1 false) - %cmp.not.i.i.i = icmp eq ptr %9, %stackArray.i.i + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %call.i.i, ptr align 2 %10, i64 %mul24.i.i, i1 false) + %cmp.not.i.i.i = icmp eq ptr %10, %stackArray.i.i br i1 %cmp.not.i.i.i, label %_ZN6icu_755Edits9growArrayEv.exit.i, label %if.then.i.i.i if.then.i.i.i: ; preds = %do.body.i.i - invoke void @uprv_free_75(ptr noundef %9) + invoke void @uprv_free_75(ptr noundef %10) to label %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i unwind label %terminate.lpad.i.i.i if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i: ; preds = %if.then.i.i.i @@ -1001,25 +1001,25 @@ if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i: ; preds = %if.then.i. br label %_ZN6icu_755Edits9growArrayEv.exit.i terminate.lpad.i.i.i: ; preds = %if.then.i.i.i - %11 = landingpad { ptr, i32 } + %12 = landingpad { ptr, i32 } catch ptr null - %12 = extractvalue { ptr, i32 } %11, 0 - tail call void @__clang_call_terminate(ptr %12) #15 + %13 = extractvalue { ptr, i32 } %12, 0 + tail call void @__clang_call_terminate(ptr %13) #15 unreachable _ZN6icu_755Edits9growArrayEv.exit.i: ; preds = %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i, %do.body.i.i - %.pre3.i = phi i32 [ %.pre3.pre.i, %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i ], [ %10, %do.body.i.i ] + %.pre3.i = phi i32 [ %.pre3.pre.i, %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i ], [ %11, %do.body.i.i ] store ptr %call.i.i, ptr %this, align 8 store i32 %newCapacity.0.i.i, ptr %capacity.i, align 8 br label %if.then.i if.then.i: ; preds = %_ZN6icu_755Edits9growArrayEv.exit.i, %while.body - %13 = phi i32 [ %.pre3.i, %_ZN6icu_755Edits9growArrayEv.exit.i ], [ %7, %while.body ] - %14 = phi ptr [ %call.i.i, %_ZN6icu_755Edits9growArrayEv.exit.i ], [ %.pre.i, %while.body ] - %inc.i = add nsw i32 %13, 1 + %14 = phi i32 [ %.pre3.i, %_ZN6icu_755Edits9growArrayEv.exit.i ], [ %8, %while.body ] + %15 = phi ptr [ %call.i.i, %_ZN6icu_755Edits9growArrayEv.exit.i ], [ %.pre.i, %while.body ] + %inc.i = add nsw i32 %14, 1 store i32 %inc.i, ptr %length.i, align 4 - %idxprom.i = sext i32 %13 to i64 - %arrayidx.i21 = getelementptr inbounds i16, ptr %14, i64 %idxprom.i + %idxprom.i = sext i32 %14 to i64 + %arrayidx.i21 = getelementptr inbounds i16, ptr %15, i64 %idxprom.i store i16 4095, ptr %arrayidx.i21, align 2 br label %_ZN6icu_755Edits6appendEi.exit @@ -1034,10 +1034,10 @@ while.end: ; preds = %_ZN6icu_755Edits6ap br i1 %cmp16, label %if.then17, label %if.end19 if.then17: ; preds = %while.end - %15 = load i32, ptr %length.i, align 4 + %16 = load i32, ptr %length.i, align 4 %capacity.i23 = getelementptr inbounds nuw i8, ptr %this, i64 8 - %16 = load i32, ptr %capacity.i23, align 8 - %cmp.i24 = icmp slt i32 %15, %16 + %17 = load i32, ptr %capacity.i23, align 8 + %cmp.i24 = icmp slt i32 %16, %17 %.pre.i25 = load ptr, ptr %this, align 8 br i1 %cmp.i24, label %if.then.i54, label %lor.lhs.false.i26 @@ -1047,7 +1047,7 @@ lor.lhs.false.i26: ; preds = %if.then17 br i1 %cmp.i.i28, label %if.end11.i.i35, label %if.else.i.i29 if.else.i.i29: ; preds = %lor.lhs.false.i26 - %cmp2.i.i30 = icmp eq i32 %16, 2147483647 + %cmp2.i.i30 = icmp eq i32 %17, 2147483647 br i1 %cmp2.i.i30, label %if.then3.i.i63, label %if.else4.i.i31 if.then3.i.i63: ; preds = %if.else.i.i29 @@ -1055,14 +1055,14 @@ if.then3.i.i63: ; preds = %if.else.i.i29 br label %if.end19 if.else4.i.i31: ; preds = %if.else.i.i29 - %cmp6.i.i32 = icmp sgt i32 %16, 1073741822 - %mul.i.i33 = shl nsw i32 %16, 1 + %cmp6.i.i32 = icmp sgt i32 %17, 1073741822 + %mul.i.i33 = shl nsw i32 %17, 1 %spec.select.i.i34 = select i1 %cmp6.i.i32, i32 2147483647, i32 %mul.i.i33 br label %if.end11.i.i35 if.end11.i.i35: ; preds = %if.else4.i.i31, %lor.lhs.false.i26 %newCapacity.0.i.i36 = phi i32 [ %spec.select.i.i34, %if.else4.i.i31 ], [ 2000, %lor.lhs.false.i26 ] - %sub.i.i37 = sub nsw i32 %newCapacity.0.i.i36, %16 + %sub.i.i37 = sub nsw i32 %newCapacity.0.i.i36, %17 %cmp13.i.i38 = icmp slt i32 %sub.i.i37, 5 br i1 %cmp13.i.i38, label %if.then14.i.i61, label %if.end16.i.i39 @@ -1082,16 +1082,16 @@ if.then19.i.i59: ; preds = %if.end16.i.i39 br label %if.end19 do.body.i.i44: ; preds = %if.end16.i.i39 - %17 = load ptr, ptr %this, align 8 - %18 = load i32, ptr %length.i, align 4 - %conv23.i.i45 = sext i32 %18 to i64 + %18 = load ptr, ptr %this, align 8 + %19 = load i32, ptr %length.i, align 4 + %conv23.i.i45 = sext i32 %19 to i64 %mul24.i.i46 = shl nsw i64 %conv23.i.i45, 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %call.i.i42, ptr align 2 %17, i64 %mul24.i.i46, i1 false) - %cmp.not.i.i.i47 = icmp eq ptr %17, %stackArray.i.i27 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %call.i.i42, ptr align 2 %18, i64 %mul24.i.i46, i1 false) + %cmp.not.i.i.i47 = icmp eq ptr %18, %stackArray.i.i27 br i1 %cmp.not.i.i.i47, label %_ZN6icu_755Edits9growArrayEv.exit.i52, label %if.then.i.i.i48 if.then.i.i.i48: ; preds = %do.body.i.i44 - invoke void @uprv_free_75(ptr noundef %17) + invoke void @uprv_free_75(ptr noundef %18) to label %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i50 unwind label %terminate.lpad.i.i.i49 if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i50: ; preds = %if.then.i.i.i48 @@ -1099,27 +1099,27 @@ if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i50: ; preds = %if.then. br label %_ZN6icu_755Edits9growArrayEv.exit.i52 terminate.lpad.i.i.i49: ; preds = %if.then.i.i.i48 - %19 = landingpad { ptr, i32 } + %20 = landingpad { ptr, i32 } catch ptr null - %20 = extractvalue { ptr, i32 } %19, 0 - tail call void @__clang_call_terminate(ptr %20) #15 + %21 = extractvalue { ptr, i32 } %20, 0 + tail call void @__clang_call_terminate(ptr %21) #15 unreachable _ZN6icu_755Edits9growArrayEv.exit.i52: ; preds = %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i50, %do.body.i.i44 - %.pre3.i53 = phi i32 [ %.pre3.pre.i51, %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i50 ], [ %18, %do.body.i.i44 ] + %.pre3.i53 = phi i32 [ %.pre3.pre.i51, %if.then.i.i._ZN6icu_755Edits9growArrayEv.exit_crit_edge.i50 ], [ %19, %do.body.i.i44 ] store ptr %call.i.i42, ptr %this, align 8 store i32 %newCapacity.0.i.i36, ptr %capacity.i23, align 8 br label %if.then.i54 if.then.i54: ; preds = %_ZN6icu_755Edits9growArrayEv.exit.i52, %if.then17 - %21 = phi i32 [ %.pre3.i53, %_ZN6icu_755Edits9growArrayEv.exit.i52 ], [ %15, %if.then17 ] - %22 = phi ptr [ %call.i.i42, %_ZN6icu_755Edits9growArrayEv.exit.i52 ], [ %.pre.i25, %if.then17 ] - %23 = trunc i32 %unchangedLength.addr.1.lcssa to i16 - %conv.i55 = add nsw i16 %23, -1 - %inc.i56 = add nsw i32 %21, 1 + %22 = phi i32 [ %.pre3.i53, %_ZN6icu_755Edits9growArrayEv.exit.i52 ], [ %16, %if.then17 ] + %23 = phi ptr [ %call.i.i42, %_ZN6icu_755Edits9growArrayEv.exit.i52 ], [ %.pre.i25, %if.then17 ] + %24 = trunc i32 %unchangedLength.addr.1.lcssa to i16 + %conv.i55 = add nsw i16 %24, -1 + %inc.i56 = add nsw i32 %22, 1 store i32 %inc.i56, ptr %length.i, align 4 - %idxprom.i57 = sext i32 %21 to i64 - %arrayidx.i58 = getelementptr inbounds i16, ptr %22, i64 %idxprom.i57 + %idxprom.i57 = sext i32 %22 to i64 + %arrayidx.i58 = getelementptr inbounds i16, ptr %23, i64 %idxprom.i57 store i16 %conv.i55, ptr %arrayidx.i58, align 2 br label %if.end19 @@ -1264,8 +1264,8 @@ if.then11: ; preds = %if.end9 land.lhs.true13: ; preds = %if.then11 %cmp14 = icmp sgt i32 %3, -1 - %sub17 = sub nuw nsw i32 2147483647, %3 - %cmp18 = icmp samesign ugt i32 %sub, %sub17 + %sub17 = xor i32 %3, 2147483647 + %cmp18 = icmp sgt i32 %sub, %sub17 %or.cond = select i1 %cmp14, i1 %cmp18, i1 false br i1 %or.cond, label %if.then28, label %if.end30 diff --git a/bench/icu/optimized/unames.ll b/bench/icu/optimized/unames.ll index 1bfd73af774..3398e6b7066 100644 --- a/bench/icu/optimized/unames.ll +++ b/bench/icu/optimized/unames.ll @@ -3561,16 +3561,17 @@ for.body106.preheader: ; preds = %if.end71, %for.cond %29 = zext nneg i32 %28 to i64 %scevgep = getelementptr i8, ptr %tokens, i64 %29 %30 = shl nuw nsw i32 %i.1.lcssa305, 1 - %narrow = sub nuw nsw i32 1024, %30 - %31 = zext nneg i32 %narrow to i64 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %scevgep, i8 0, i64 %31, i1 false) + %31 = xor i32 %30, 1022 + %narrow = add nuw nsw i32 %31, 2 + %32 = zext nneg i32 %narrow to i64 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %scevgep, i8 0, i64 %32, i1 false) br label %for.end111 for.body96: ; preds = %for.body96.preheader, %for.body96 %indvars.iv = phi i64 [ 0, %for.body96.preheader ], [ %indvars.iv.next, %for.body96 ] %arrayidx97 = getelementptr inbounds nuw i16, ptr %incdec.ptr, i64 %indvars.iv - %32 = load i16, ptr %arrayidx97, align 2 - %call98 = tail call signext i16 @udata_readInt16_75(ptr noundef %ds, i16 noundef signext %32) + %33 = load i16, ptr %arrayidx97, align 2 + %call98 = tail call signext i16 @udata_readInt16_75(ptr noundef %ds, i16 noundef signext %33) %arrayidx100 = getelementptr inbounds nuw [512 x i16], ptr %tokens, i64 0, i64 %indvars.iv store i16 %call98, ptr %arrayidx100, align 2 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -3582,8 +3583,8 @@ for.end111: ; preds = %for.body106.prehead %add.ptr114 = getelementptr inbounds nuw i8, ptr %tokens, i64 512 %conv123 = tail call i16 @llvm.usub.sat.i16(i16 %call85, i16 256) call fastcc void @_ZL12makeTokenMapPK12UDataSwapperPstPhP10UErrorCode(ptr noundef %ds, ptr noundef %add.ptr114, i16 noundef zeroext %conv123, ptr noundef %trailMap, ptr noundef %pErrorCode) - %33 = load i32, ptr %pErrorCode, align 4 - %cmp.i231 = icmp slt i32 %33, 1 + %34 = load i32, ptr %pErrorCode, align 4 + %cmp.i231 = icmp slt i32 %34, 1 br i1 %cmp.i231, label %if.end128, label %return if.end128: ; preds = %for.end111 @@ -3613,35 +3614,35 @@ for.cond153.preheader: ; preds = %for.body140, %for.c br i1 %cmp155255, label %for.body156.preheader, label %do.body172 for.body156.preheader: ; preds = %for.cond153.preheader - %34 = zext nneg i32 %i.3.lcssa to i64 + %35 = zext nneg i32 %i.3.lcssa to i64 %wide.trip.count295 = zext i16 %call85 to i64 br label %for.body156 for.body140: ; preds = %for.body140.preheader, %for.body140 %indvars.iv287 = phi i64 [ 0, %for.body140.preheader ], [ %indvars.iv.next288, %for.body140 ] - %35 = load ptr, ptr %swapArray16, align 8 + %36 = load ptr, ptr %swapArray16, align 8 %add.ptr143 = getelementptr inbounds nuw i16, ptr %incdec.ptr, i64 %indvars.iv287 %arrayidx145 = getelementptr inbounds nuw [256 x i8], ptr %map, i64 0, i64 %indvars.iv287 - %36 = load i8, ptr %arrayidx145, align 1 - %idx.ext147 = zext i8 %36 to i64 + %37 = load i8, ptr %arrayidx145, align 1 + %idx.ext147 = zext i8 %37 to i64 %add.ptr148 = getelementptr inbounds nuw i16, ptr %call131, i64 %idx.ext147 - %call149 = tail call noundef i32 %35(ptr noundef %ds, ptr noundef nonnull %add.ptr143, i32 noundef 2, ptr noundef nonnull %add.ptr148, ptr noundef nonnull %pErrorCode) + %call149 = tail call noundef i32 %36(ptr noundef %ds, ptr noundef nonnull %add.ptr143, i32 noundef 2, ptr noundef nonnull %add.ptr148, ptr noundef nonnull %pErrorCode) %indvars.iv.next288 = add nuw nsw i64 %indvars.iv287, 1 %exitcond291.not = icmp eq i64 %indvars.iv.next288, %wide.trip.count290 br i1 %exitcond291.not, label %for.cond153.preheader, label %for.body140, !llvm.loop !59 for.body156: ; preds = %for.body156.preheader, %for.body156 - %indvars.iv292 = phi i64 [ %34, %for.body156.preheader ], [ %indvars.iv.next293, %for.body156 ] - %37 = load ptr, ptr %swapArray16, align 8 + %indvars.iv292 = phi i64 [ %35, %for.body156.preheader ], [ %indvars.iv.next293, %for.body156 ] + %38 = load ptr, ptr %swapArray16, align 8 %add.ptr159 = getelementptr inbounds nuw i16, ptr %incdec.ptr, i64 %indvars.iv292 %and = and i64 %indvars.iv292, 2147483392 %add.ptr161 = getelementptr inbounds nuw i16, ptr %call131, i64 %and %and162 = and i64 %indvars.iv292, 255 %arrayidx164 = getelementptr inbounds nuw [256 x i8], ptr %trailMap, i64 0, i64 %and162 - %38 = load i8, ptr %arrayidx164, align 1 - %idx.ext166 = zext i8 %38 to i64 + %39 = load i8, ptr %arrayidx164, align 1 + %idx.ext166 = zext i8 %39 to i64 %add.ptr167 = getelementptr inbounds nuw i16, ptr %add.ptr161, i64 %idx.ext166 - %call168 = tail call noundef i32 %37(ptr noundef %ds, ptr noundef nonnull %add.ptr159, i32 noundef 2, ptr noundef nonnull %add.ptr167, ptr noundef nonnull %pErrorCode) + %call168 = tail call noundef i32 %38(ptr noundef %ds, ptr noundef nonnull %add.ptr159, i32 noundef 2, ptr noundef nonnull %add.ptr167, ptr noundef nonnull %pErrorCode) %indvars.iv.next293 = add nuw nsw i64 %indvars.iv292, 1 %exitcond296.not = icmp eq i64 %indvars.iv.next293, %wide.trip.count295 br i1 %exitcond296.not, label %do.body172, label %for.body156, !llvm.loop !60 @@ -3654,8 +3655,8 @@ do.body172: ; preds = %for.body156, %for.c %sub179 = sub i32 %call77, %call74 %add.ptr181 = getelementptr inbounds nuw i8, ptr %cond, i64 %idx.ext177 %call182 = tail call i32 @udata_swapInvStringBlock_75(ptr noundef %ds, ptr noundef nonnull %add.ptr178, i32 noundef %sub179, ptr noundef %add.ptr181, ptr noundef nonnull %pErrorCode) - %39 = load i32, ptr %pErrorCode, align 4 - %cmp.i233 = icmp slt i32 %39, 1 + %40 = load i32, ptr %pErrorCode, align 4 + %cmp.i233 = icmp slt i32 %40, 1 br i1 %cmp.i233, label %if.end186, label %if.then185 if.then185: ; preds = %do.body172 @@ -3663,22 +3664,22 @@ if.then185: ; preds = %do.body172 br label %return if.end186: ; preds = %do.body172 - %40 = load ptr, ptr %readUInt1684, align 8 + %41 = load ptr, ptr %readUInt1684, align 8 %idx.ext188 = zext i32 %call77 to i64 %add.ptr189 = getelementptr inbounds nuw i8, ptr %add.ptr38, i64 %idx.ext188 - %41 = load i16, ptr %add.ptr189, align 2 - %call190 = tail call noundef zeroext i16 %40(i16 noundef zeroext %41) + %42 = load i16, ptr %add.ptr189, align 2 + %call190 = tail call noundef zeroext i16 %41(i16 noundef zeroext %42) %conv191 = zext i16 %call190 to i32 - %42 = load ptr, ptr %swapArray16, align 8 + %43 = load ptr, ptr %swapArray16, align 8 %add196 = mul nuw nsw i32 %conv191, 6 %mul197 = add nuw nsw i32 %add196, 2 %add.ptr199 = getelementptr inbounds nuw i8, ptr %cond, i64 %idx.ext188 - %call200 = tail call noundef i32 %42(ptr noundef %ds, ptr noundef nonnull %add.ptr189, i32 noundef %mul197, ptr noundef %add.ptr199, ptr noundef nonnull %pErrorCode) + %call200 = tail call noundef i32 %43(ptr noundef %ds, ptr noundef nonnull %add.ptr189, i32 noundef %mul197, ptr noundef %add.ptr199, ptr noundef nonnull %pErrorCode) %inCharset = getelementptr inbounds nuw i8, ptr %ds, i64 1 - %43 = load i8, ptr %inCharset, align 1 + %44 = load i8, ptr %inCharset, align 1 %outCharset = getelementptr inbounds nuw i8, ptr %ds, i64 3 - %44 = load i8, ptr %outCharset, align 1 - %cmp203.not = icmp eq i8 %43, %44 + %45 = load i8, ptr %outCharset, align 1 + %cmp203.not = icmp eq i8 %44, %45 br i1 %cmp203.not, label %if.end246, label %if.then204 if.then204: ; preds = %if.end186 @@ -3710,13 +3711,13 @@ while.body: ; preds = %while.body.lr.ph, % %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %conv214 = trunc i64 %sub.ptr.sub to i32 %add.ptr219 = getelementptr inbounds i8, ptr %outStrings.0266, i64 %sub.ptr.sub - %45 = load i16, ptr %arrayidx220, align 2 - %conv221 = zext i16 %45 to i32 - %46 = load i16, ptr %arrayidx222, align 2 - %conv223 = zext i16 %46 to i32 + %46 = load i16, ptr %arrayidx220, align 2 + %conv221 = zext i16 %46 to i32 + %47 = load i16, ptr %arrayidx222, align 2 + %conv223 = zext i16 %47 to i32 %add224 = add nuw nsw i32 %conv223, %conv221 - %47 = add i32 %add224, %conv214 - %sub225 = sub i32 %stringsCount.0264, %47 + %48 = add i32 %add224, %conv214 + %sub225 = sub i32 %stringsCount.0264, %48 %cmp227.not257 = icmp eq i32 %add224, 0 br i1 %cmp227.not257, label %while.cond.loopexit, label %while.body228 @@ -3725,25 +3726,25 @@ while.body228: ; preds = %while.body, %if.end %inStrings.1259 = phi ptr [ %inStrings.2, %if.end244 ], [ %call213, %while.body ] %count.1258 = phi i32 [ %sub243, %if.end244 ], [ %add224, %while.body ] %incdec.ptr229 = getelementptr inbounds nuw i8, ptr %inStrings.1259, i64 1 - %48 = load i8, ptr %inStrings.1259, align 1 - %idxprom230 = zext i8 %48 to i64 + %49 = load i8, ptr %inStrings.1259, align 1 + %idxprom230 = zext i8 %49 to i64 %arrayidx231 = getelementptr inbounds nuw [256 x i8], ptr %map, i64 0, i64 %idxprom230 - %49 = load i8, ptr %arrayidx231, align 1 + %50 = load i8, ptr %arrayidx231, align 1 %incdec.ptr232 = getelementptr inbounds nuw i8, ptr %outStrings.1260, i64 1 - store i8 %49, ptr %outStrings.1260, align 1 + store i8 %50, ptr %outStrings.1260, align 1 %arrayidx234 = getelementptr inbounds nuw [512 x i16], ptr %tokens, i64 0, i64 %idxprom230 - %50 = load i16, ptr %arrayidx234, align 2 - %cmp236.not = icmp eq i16 %50, -2 + %51 = load i16, ptr %arrayidx234, align 2 + %cmp236.not = icmp eq i16 %51, -2 br i1 %cmp236.not, label %if.else238, label %if.end244 if.else238: ; preds = %while.body228 %incdec.ptr239 = getelementptr inbounds nuw i8, ptr %inStrings.1259, i64 2 - %51 = load i8, ptr %incdec.ptr229, align 1 - %idxprom240 = zext i8 %51 to i64 + %52 = load i8, ptr %incdec.ptr229, align 1 + %idxprom240 = zext i8 %52 to i64 %arrayidx241 = getelementptr inbounds nuw [256 x i8], ptr %trailMap, i64 0, i64 %idxprom240 - %52 = load i8, ptr %arrayidx241, align 1 + %53 = load i8, ptr %arrayidx241, align 1 %incdec.ptr242 = getelementptr inbounds nuw i8, ptr %outStrings.1260, i64 2 - store i8 %52, ptr %incdec.ptr232, align 1 + store i8 %53, ptr %incdec.ptr232, align 1 br label %if.end244 if.end244: ; preds = %while.body228, %if.else238 @@ -3755,14 +3756,14 @@ if.end244: ; preds = %while.body228, %if. br i1 %cmp227.not, label %while.cond.loopexit, label %while.body228, !llvm.loop !62 if.end246: ; preds = %while.cond.loopexit, %if.then204, %if.end186 - %53 = load ptr, ptr %readUInt3248, align 8 + %54 = load ptr, ptr %readUInt3248, align 8 %idx.ext248 = zext i32 %call50 to i64 %add.ptr249 = getelementptr inbounds nuw i8, ptr %add.ptr38, i64 %idx.ext248 - %54 = load i32, ptr %add.ptr249, align 4 - %call250 = tail call noundef i32 %53(i32 noundef %54) - %55 = load ptr, ptr %swapArray32, align 8 + %55 = load i32, ptr %add.ptr249, align 4 + %call250 = tail call noundef i32 %54(i32 noundef %55) + %56 = load ptr, ptr %swapArray32, align 8 %add.ptr255 = getelementptr inbounds nuw i8, ptr %cond, i64 %idx.ext248 - %call256 = tail call noundef i32 %55(ptr noundef %ds, ptr noundef nonnull %add.ptr249, i32 noundef 4, ptr noundef %add.ptr255, ptr noundef nonnull %pErrorCode) + %call256 = tail call noundef i32 %56(ptr noundef %ds, ptr noundef nonnull %add.ptr249, i32 noundef 4, ptr noundef %add.ptr255, ptr noundef nonnull %pErrorCode) %add257 = add i32 %call50, 4 %cmp259267.not = icmp eq i32 %call250, 0 br i1 %cmp259267.not, label %if.end326, label %for.body260.lr.ph @@ -3786,33 +3787,33 @@ if.end263: ; preds = %for.body260 %idx.ext264 = zext nneg i32 %offset.2269 to i64 %add.ptr265 = getelementptr inbounds nuw i8, ptr %add.ptr38, i64 %idx.ext264 %add.ptr267 = getelementptr inbounds nuw i8, ptr %cond, i64 %idx.ext264 - %56 = load ptr, ptr %readUInt1684, align 8 + %57 = load ptr, ptr %readUInt1684, align 8 %size269 = getelementptr inbounds nuw i8, ptr %add.ptr265, i64 10 - %57 = load i16, ptr %size269, align 2 - %call270 = tail call noundef zeroext i16 %56(i16 noundef zeroext %57) + %58 = load i16, ptr %size269, align 2 + %call270 = tail call noundef zeroext i16 %57(i16 noundef zeroext %58) %conv271 = zext i16 %call270 to i32 %add272 = add nuw i32 %offset.2269, %conv271 - %58 = load ptr, ptr %swapArray32, align 8 - %call274 = tail call noundef i32 %58(ptr noundef nonnull %ds, ptr noundef nonnull %add.ptr265, i32 noundef 8, ptr noundef %add.ptr267, ptr noundef nonnull %pErrorCode) - %59 = load ptr, ptr %swapArray16, align 8 + %59 = load ptr, ptr %swapArray32, align 8 + %call274 = tail call noundef i32 %59(ptr noundef nonnull %ds, ptr noundef nonnull %add.ptr265, i32 noundef 8, ptr noundef %add.ptr267, ptr noundef nonnull %pErrorCode) + %60 = load ptr, ptr %swapArray16, align 8 %size277 = getelementptr inbounds nuw i8, ptr %add.ptr267, i64 10 - %call278 = tail call noundef i32 %59(ptr noundef nonnull %ds, ptr noundef nonnull %size269, i32 noundef 2, ptr noundef nonnull %size277, ptr noundef nonnull %pErrorCode) + %call278 = tail call noundef i32 %60(ptr noundef nonnull %ds, ptr noundef nonnull %size269, i32 noundef 2, ptr noundef nonnull %size277, ptr noundef nonnull %pErrorCode) %type = getelementptr inbounds nuw i8, ptr %add.ptr265, i64 8 - %60 = load i8, ptr %type, align 4 - switch i8 %60, label %sw.default [ + %61 = load i8, ptr %type, align 4 + switch i8 %61, label %sw.default [ i8 0, label %sw.bb i8 1, label %sw.bb290 ] sw.bb: ; preds = %if.end263 - %61 = load ptr, ptr %swapInvChars319, align 8 + %62 = load ptr, ptr %swapInvChars319, align 8 %add.ptr280 = getelementptr inbounds nuw i8, ptr %add.ptr265, i64 12 %call282 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %add.ptr280) #11 %conv283 = trunc i64 %call282 to i32 %add.ptr284 = getelementptr inbounds nuw i8, ptr %add.ptr267, i64 12 - %call285 = tail call noundef i32 %61(ptr noundef nonnull %ds, ptr noundef nonnull %add.ptr280, i32 noundef %conv283, ptr noundef nonnull %add.ptr284, ptr noundef nonnull %pErrorCode) - %62 = load i32, ptr %pErrorCode, align 4 - %cmp.i235 = icmp slt i32 %62, 1 + %call285 = tail call noundef i32 %62(ptr noundef nonnull %ds, ptr noundef nonnull %add.ptr280, i32 noundef %conv283, ptr noundef nonnull %add.ptr284, ptr noundef nonnull %pErrorCode) + %63 = load i32, ptr %pErrorCode, align 4 + %cmp.i235 = icmp slt i32 %63, 1 br i1 %cmp.i235, label %for.inc323, label %if.then288 if.then288: ; preds = %sw.bb @@ -3821,45 +3822,45 @@ if.then288: ; preds = %sw.bb sw.bb290: ; preds = %if.end263 %variant = getelementptr inbounds nuw i8, ptr %add.ptr265, i64 9 - %63 = load i8, ptr %variant, align 1 - %conv291 = zext i8 %63 to i32 + %64 = load i8, ptr %variant, align 1 + %conv291 = zext i8 %64 to i32 %add.ptr292 = getelementptr inbounds nuw i8, ptr %add.ptr265, i64 12 %add.ptr293 = getelementptr inbounds nuw i8, ptr %add.ptr267, i64 12 - %64 = load ptr, ptr %swapArray16, align 8 + %65 = load ptr, ptr %swapArray16, align 8 %mul295 = shl nuw nsw i32 %conv291, 1 - %call296 = tail call noundef i32 %64(ptr noundef nonnull %ds, ptr noundef nonnull %add.ptr292, i32 noundef %mul295, ptr noundef nonnull %add.ptr293, ptr noundef nonnull %pErrorCode) - %idx.ext297 = zext i8 %63 to i64 + %call296 = tail call noundef i32 %65(ptr noundef nonnull %ds, ptr noundef nonnull %add.ptr292, i32 noundef %mul295, ptr noundef nonnull %add.ptr293, ptr noundef nonnull %pErrorCode) + %idx.ext297 = zext i8 %64 to i64 %add.ptr298 = getelementptr inbounds nuw i16, ptr %add.ptr292, i64 %idx.ext297 %add.ptr300 = getelementptr inbounds nuw i16, ptr %add.ptr293, i64 %idx.ext297 - %65 = add nsw i32 %conv271, -12 - %66 = sub nsw i32 %65, %mul295 - %67 = zext i32 %66 to i64 + %66 = add nsw i32 %conv271, -12 + %67 = sub nsw i32 %66, %mul295 + %68 = zext i32 %67 to i64 br label %while.cond307 while.cond307: ; preds = %land.rhs309, %sw.bb290 - %indvars.iv297 = phi i64 [ %68, %land.rhs309 ], [ %67, %sw.bb290 ] + %indvars.iv297 = phi i64 [ %69, %land.rhs309 ], [ %68, %sw.bb290 ] %cmp308.not = icmp eq i64 %indvars.iv297, 0 br i1 %cmp308.not, label %while.end318, label %land.rhs309 land.rhs309: ; preds = %while.cond307 - %68 = add nsw i64 %indvars.iv297, -1 - %arrayidx312 = getelementptr inbounds nuw i8, ptr %add.ptr298, i64 %68 - %69 = load i8, ptr %arrayidx312, align 1 - %cmp314.not = icmp eq i8 %69, 0 + %69 = add nsw i64 %indvars.iv297, -1 + %arrayidx312 = getelementptr inbounds nuw i8, ptr %add.ptr298, i64 %69 + %70 = load i8, ptr %arrayidx312, align 1 + %cmp314.not = icmp eq i8 %70, 0 br i1 %cmp314.not, label %while.end318.split.loop.exit314, label %while.cond307, !llvm.loop !63 while.end318.split.loop.exit314: ; preds = %land.rhs309 - %70 = trunc nuw i64 %indvars.iv297 to i32 + %71 = trunc nuw i64 %indvars.iv297 to i32 br label %while.end318 while.end318: ; preds = %while.cond307, %while.end318.split.loop.exit314 - %stringsCount.1.lcssa = phi i32 [ %70, %while.end318.split.loop.exit314 ], [ 0, %while.cond307 ] - %71 = load ptr, ptr %swapInvChars319, align 8 - %call320 = tail call noundef i32 %71(ptr noundef %ds, ptr noundef nonnull %add.ptr298, i32 noundef %stringsCount.1.lcssa, ptr noundef nonnull %add.ptr300, ptr noundef nonnull %pErrorCode) + %stringsCount.1.lcssa = phi i32 [ %71, %while.end318.split.loop.exit314 ], [ 0, %while.cond307 ] + %72 = load ptr, ptr %swapInvChars319, align 8 + %call320 = tail call noundef i32 %72(ptr noundef %ds, ptr noundef nonnull %add.ptr298, i32 noundef %stringsCount.1.lcssa, ptr noundef nonnull %add.ptr300, ptr noundef nonnull %pErrorCode) br label %for.inc323 sw.default: ; preds = %if.end263 - %conv279 = zext i8 %60 to i32 + %conv279 = zext i8 %61 to i32 tail call void (ptr, ptr, ...) @udata_printError_75(ptr noundef nonnull %ds, ptr noundef nonnull @.str.6, i32 noundef %conv279, i32 noundef %i.5268) store i32 16, ptr %pErrorCode, align 4 br label %return diff --git a/bench/image-rs/optimized/244uszkx0e8t5ie1.ll b/bench/image-rs/optimized/244uszkx0e8t5ie1.ll index 4d5f59959ca..80d09ae9a3f 100644 --- a/bench/image-rs/optimized/244uszkx0e8t5ie1.ll +++ b/bench/image-rs/optimized/244uszkx0e8t5ie1.ll @@ -23044,29 +23044,29 @@ _ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit: ; preds = %343 %410 = add i64 %46, %33 br label %411 -411: ; preds = %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17hd028b9f832cb58daE.exit.i37", %_ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit - %.017.i = phi i64 [ %410, %_ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit ], [ %427, %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17hd028b9f832cb58daE.exit.i37" ] - %.sroa.0.016.i = phi i64 [ 0, %_ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit ], [ %412, %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17hd028b9f832cb58daE.exit.i37" ] - %412 = add nuw nsw i64 %.sroa.0.016.i, 1 - %413 = add i64 %.017.i, 3 +411: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit.i37", %_ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit + %.020.i = phi i64 [ %410, %_ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit ], [ %427, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit.i37" ] + %.sroa.0.019.i = phi i64 [ 0, %_ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit ], [ %412, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit.i37" ] + %412 = add nuw nsw i64 %.sroa.0.019.i, 1 + %413 = add i64 %.020.i, 3 %414 = icmp eq i64 %413, -1 br i1 %414, label %422, label %415 415: ; preds = %411 - %416 = icmp ugt i64 %.017.i, -5 + %416 = icmp ugt i64 %.020.i, -5 br i1 %416, label %418, label %417 417: ; preds = %415 %.not.i.i36 = icmp ult i64 %413, %1 - br i1 %.not.i.i36, label %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17hd028b9f832cb58daE.exit.i37", label %420 + br i1 %.not.i.i36, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit.i37", label %420 418: ; preds = %415 - %419 = add nsw i64 %.017.i, 4 - tail call void @_ZN4core5slice5index22slice_index_order_fail17hcfcb08cd5efc8d4cE(i64 noundef %.017.i, i64 noundef %419, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4b579c9d043b721191b412a2a5c930c7.447) #34, !noalias !2622 + %419 = add nsw i64 %.020.i, 4 + tail call void @_ZN4core5slice5index22slice_index_order_fail17hcfcb08cd5efc8d4cE(i64 noundef %.020.i, i64 noundef %419, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4b579c9d043b721191b412a2a5c930c7.447) #34, !noalias !2622 unreachable 420: ; preds = %417 - %421 = add nuw i64 %.017.i, 4 + %421 = add nuw i64 %.020.i, 4 tail call void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %421, i64 noundef %1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4b579c9d043b721191b412a2a5c930c7.447) #34, !noalias !2622 unreachable @@ -23074,17 +23074,17 @@ _ZN5image6codecs4webp3vp811edge_pixels17h3aa6b66f5c2b1252E.exit: ; preds = %343 tail call void @_ZN4core5slice5index29slice_end_index_overflow_fail17h29a7f9de5ef3f7a0E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.4b579c9d043b721191b412a2a5c930c7.447) #34, !noalias !2628 unreachable -"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17hd028b9f832cb58daE.exit.i37": ; preds = %417 - %423 = sub nuw nsw i64 3, %.sroa.0.016.i +"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit.i37": ; preds = %417 + %423 = xor i64 %.sroa.0.019.i, 3 %424 = getelementptr inbounds nuw i8, ptr %8, i64 %423 - %425 = getelementptr inbounds i8, ptr %0, i64 %.017.i + %425 = getelementptr inbounds i8, ptr %0, i64 %.020.i %426 = load i32, ptr %424, align 1, !alias.scope !2629, !noalias !2633 store i32 %426, ptr %425, align 1, !alias.scope !2635, !noalias !2636 - %427 = add i64 %.017.i, %2 + %427 = add i64 %.020.i, %2 %exitcond.not.i38 = icmp eq i64 %412, 4 br i1 %exitcond.not.i38, label %_ZN5image6codecs4webp3vp815predict_brdpred17hfc891fb42df04ac1E.exit, label %411 -_ZN5image6codecs4webp3vp815predict_brdpred17hfc891fb42df04ac1E.exit: ; preds = %"_ZN115_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17hd028b9f832cb58daE.exit.i37" +_ZN5image6codecs4webp3vp815predict_brdpred17hfc891fb42df04ac1E.exit: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit.i37" call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %8), !noalias !2607 br label %_ZN5image6codecs4webp3vp815predict_bdcpred17h353272dfad87dd28E.exit diff --git a/bench/image-rs/optimized/8143hfqbwzfmz2f.ll b/bench/image-rs/optimized/8143hfqbwzfmz2f.ll index df63506eede..7c4835cc168 100644 --- a/bench/image-rs/optimized/8143hfqbwzfmz2f.ll +++ b/bench/image-rs/optimized/8143hfqbwzfmz2f.ll @@ -29987,7 +29987,7 @@ define void @_ZN5image6codecs3dxt15encode_dxt5_row17hfebf0fab4d2dcf4aE(ptr noali cleanup br label %14 -.loopexit.split-lp: ; preds = %164, %178, %179 +.loopexit.split-lp: ; preds = %162, %176, %177 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup br label %14 @@ -29995,7 +29995,7 @@ define void @_ZN5image6codecs3dxt15encode_dxt5_row17hfebf0fab4d2dcf4aE(ptr noali 14: ; preds = %.loopexit.split-lp, %.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] invoke void @"_ZN4core3ptr46drop_in_place$LT$alloc..vec..Vec$LT$u8$GT$$GT$17h232faed5db661fa9E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %10) #47 - to label %183 unwind label %181 + to label %181 unwind label %179 15: ; preds = %3 %16 = lshr exact i64 %2, 6 @@ -30027,17 +30027,17 @@ define void @_ZN5image6codecs3dxt15encode_dxt5_row17hfebf0fab4d2dcf4aE(ptr noali %32 = getelementptr inbounds nuw i8, ptr %5, i64 1 br label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i" -"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i": ; preds = %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph", %174 - %.sroa.10.052 = phi i64 [ 0, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph" ], [ %37, %174 ] - %.sroa.522.051 = phi i64 [ %17, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph" ], [ %34, %174 ] - %.sroa.0.050 = phi ptr [ %20, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph" ], [ %33, %174 ] +"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i": ; preds = %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph", %172 + %.sroa.10.052 = phi i64 [ 0, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph" ], [ %37, %172 ] + %.sroa.522.051 = phi i64 [ %17, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph" ], [ %34, %172 ] + %.sroa.0.050 = phi ptr [ %20, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i.lr.ph" ], [ %33, %172 ] %.0.sroa.speculated.i.i.i = tail call noundef i64 @llvm.umin.i64(i64 %.sroa.522.051, i64 16) %33 = getelementptr inbounds nuw i8, ptr %.sroa.0.050, i64 %.0.sroa.speculated.i.i.i %34 = sub nuw nsw i64 %.sroa.522.051, %.0.sroa.speculated.i.i.i %35 = icmp eq ptr %.sroa.0.050, null br i1 %35, label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i._crit_edge", label %36 -"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i._crit_edge": ; preds = %174, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i", %15 +"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i._crit_edge": ; preds = %172, %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i", %15 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %10, i64 24, i1 false) call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) @@ -30045,13 +30045,13 @@ define void @_ZN5image6codecs3dxt15encode_dxt5_row17hfebf0fab4d2dcf4aE(ptr noali 36: ; preds = %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i" %37 = add i64 %.sroa.10.052, 1 - br label %165 + br label %163 38: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" tail call void @llvm.experimental.noalias.scope.decl(metadata !7424) tail call void @llvm.experimental.noalias.scope.decl(metadata !7427) %39 = icmp ugt i64 %.sroa.522.051, 15 - br i1 %39, label %40, label %164 + br i1 %39, label %40, label %162 40: ; preds = %38 %41 = getelementptr inbounds nuw i8, ptr %.sroa.0.050, i64 8 @@ -30211,63 +30211,57 @@ _ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit.i: ; preds = %9 101: ; preds = %100 %.ptr113.le.i = getelementptr inbounds nuw i8, ptr %8, i64 %.add.i %102 = icmp samesign eq i64 %.add.i, 16 - br i1 %102, label %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i, label %103 - -103: ; preds = %101 - %gepdiff.i = sub nuw nsw i64 15, %.idx.i - br label %104 + br i1 %102, label %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i, label %.preheader126.i -104: ; preds = %104, %103 - %.019.i.i.i.i.i.i.i = phi i8 [ %.val.i.i.i.i.i.i.i, %103 ], [ %.0.i.i.i.i.i.i.i.i.i, %104 ] - %.018.i.i.i.i.i.i.i = phi i64 [ 0, %103 ], [ %106, %104 ] - %105 = getelementptr inbounds i8, ptr %.ptr113.le.i, i64 %.018.i.i.i.i.i.i.i - %.val.i.i.i.i8.i.i.i = load i8, ptr %105, align 1, !alias.scope !7492, !noalias !7429, !noundef !4 +.preheader126.i: ; preds = %101, %.preheader126.i + %.019.i.i.i.i.i.i.i = phi i8 [ %.0.i.i.i.i.i.i.i.i.i, %.preheader126.i ], [ %.val.i.i.i.i.i.i.i, %101 ] + %.018.i.i.i.i.i.i.i = phi i64 [ %104, %.preheader126.i ], [ 0, %101 ] + %103 = getelementptr inbounds i8, ptr %.ptr113.le.i, i64 %.018.i.i.i.i.i.i.i + %.val.i.i.i.i8.i.i.i = load i8, ptr %103, align 1, !alias.scope !7492, !noalias !7429, !noundef !4 %.not.i.i.i.i.i.i.i.i.i = icmp eq i8 %.val.i.i.i.i8.i.i.i, -1 %.0.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i = tail call i8 @llvm.umax.i8(i8 %.019.i.i.i.i.i.i.i, i8 %.val.i.i.i.i8.i.i.i) %.0.i.i.i.i.i.i.i.i.i = select i1 %.not.i.i.i.i.i.i.i.i.i, i8 %.019.i.i.i.i.i.i.i, i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i.i.i.i - %106 = add nuw i64 %.018.i.i.i.i.i.i.i, 1 - %107 = icmp eq i64 %106, %gepdiff.i - br i1 %107, label %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i, label %104 + %104 = add nuw i64 %.018.i.i.i.i.i.i.i, 1 + %105 = xor i64 %104, %.idx.i + %106 = icmp eq i64 %105, 15 + br i1 %106, label %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i, label %.preheader126.i -_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i: ; preds = %99, %104, %101 - %.049.i = phi i8 [ %.val.i.i.i.i.i.i.i, %101 ], [ %.0.i.i.i.i.i.i.i.i.i, %104 ], [ -1, %99 ] - br label %108 +_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i: ; preds = %99, %.preheader126.i, %101 + %.049.i = phi i8 [ %.val.i.i.i.i.i.i.i, %101 ], [ %.0.i.i.i.i.i.i.i.i.i, %.preheader126.i ], [ -1, %99 ] + br label %107 -108: ; preds = %109, %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i - %.idx114.i = phi i64 [ %.add115.i, %109 ], [ 0, %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i ] +107: ; preds = %108, %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i + %.idx114.i = phi i64 [ %.add115.i, %108 ], [ 0, %_ZN4core4iter6traits8iterator8Iterator6max_by17h983b0e9a43ebbbf1E.exit.i ] %.not16.not.not.i.not.not.not.i.not.not.not.i.not.not.not.i.not.i.i69.not.i = icmp eq i64 %.idx114.i, 16 - br i1 %.not16.not.not.i.not.not.not.i.not.not.not.i.not.not.not.i.not.i.i69.not.i, label %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, label %109 + br i1 %.not16.not.not.i.not.not.not.i.not.not.not.i.not.not.not.i.not.i.i69.not.i, label %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, label %108 -109: ; preds = %108 +108: ; preds = %107 %.ptr116.i = getelementptr inbounds nuw i8, ptr %8, i64 %.idx114.i %.add115.i = add nuw nsw i64 %.idx114.i, 1 %.val.i.i.i.i.i.i70.i = load i8, ptr %.ptr116.i, align 1, !alias.scope !7495, !noalias !7498, !noundef !4 %.not.i.i.i.i.i.i71.i = icmp eq i8 %.val.i.i.i.i.i.i70.i, 0 - br i1 %.not.i.i.i.i.i.i71.i, label %108, label %110 + br i1 %.not.i.i.i.i.i.i71.i, label %107, label %109 -110: ; preds = %109 +109: ; preds = %108 %.ptr117.le.i = getelementptr inbounds nuw i8, ptr %8, i64 %.add115.i - %111 = icmp samesign eq i64 %.add115.i, 16 - br i1 %111, label %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, label %112 - -112: ; preds = %110 - %gepdiff118.i = sub nuw nsw i64 15, %.idx114.i - br label %113 - -113: ; preds = %113, %112 - %.019.i.i.i.i.i.i72.i = phi i8 [ %.val.i.i.i.i.i.i70.i, %112 ], [ %.0.i.i.i.i.i.i.i.i77.i, %113 ] - %.018.i.i.i.i.i.i73.i = phi i64 [ 0, %112 ], [ %115, %113 ] - %114 = getelementptr inbounds i8, ptr %.ptr117.le.i, i64 %.018.i.i.i.i.i.i73.i - %.val.i.i.i.i8.i.i74.i = load i8, ptr %114, align 1, !alias.scope !7507, !noalias !7429, !noundef !4 + %110 = icmp samesign eq i64 %.add115.i, 16 + br i1 %110, label %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, label %.preheader.i + +.preheader.i: ; preds = %109, %.preheader.i + %.019.i.i.i.i.i.i72.i = phi i8 [ %.0.i.i.i.i.i.i.i.i77.i, %.preheader.i ], [ %.val.i.i.i.i.i.i70.i, %109 ] + %.018.i.i.i.i.i.i73.i = phi i64 [ %112, %.preheader.i ], [ 0, %109 ] + %111 = getelementptr inbounds i8, ptr %.ptr117.le.i, i64 %.018.i.i.i.i.i.i73.i + %.val.i.i.i.i8.i.i74.i = load i8, ptr %111, align 1, !alias.scope !7507, !noalias !7429, !noundef !4 %.not.i.i.i.i.i.i.i.i75.i = icmp eq i8 %.val.i.i.i.i8.i.i74.i, 0 %.0.sroa.speculated.i.i.i.i.i.i.i.i.i.i76.i = tail call i8 @llvm.umin.i8(i8 %.019.i.i.i.i.i.i72.i, i8 %.val.i.i.i.i8.i.i74.i) %.0.i.i.i.i.i.i.i.i77.i = select i1 %.not.i.i.i.i.i.i.i.i75.i, i8 %.019.i.i.i.i.i.i72.i, i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i.i.i76.i - %115 = add nuw i64 %.018.i.i.i.i.i.i73.i, 1 - %116 = icmp eq i64 %115, %gepdiff118.i - br i1 %116, label %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, label %113 + %112 = add nuw i64 %.018.i.i.i.i.i.i73.i, 1 + %113 = xor i64 %112, %.idx114.i + %114 = icmp eq i64 %113, 15 + br i1 %114, label %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, label %.preheader.i -_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i: ; preds = %108, %113, %110 - %spec.select.i = phi i8 [ %.val.i.i.i.i.i.i70.i, %110 ], [ %.0.i.i.i.i.i.i.i.i77.i, %113 ], [ 0, %108 ] +_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i: ; preds = %107, %.preheader.i, %109 + %spec.select.i = phi i8 [ %.val.i.i.i.i.i.i70.i, %109 ], [ %.0.i.i.i.i.i.i.i.i77.i, %.preheader.i ], [ 0, %107 ] tail call void @llvm.experimental.noalias.scope.decl(metadata !7510) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5), !noalias !7513 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4), !noalias !7513 @@ -30275,25 +30269,25 @@ _ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i: ; pred store i8 %spec.select.i, ptr %29, align 1, !noalias !7513 call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(5) %30, i8 0, i64 5, i1 false), !noalias !7513 store i8 -1, ptr %31, align 1, !noalias !7513 - %117 = icmp ugt i8 %.049.i, %spec.select.i - %118 = zext i8 %spec.select.i to i16 - %119 = zext i8 %.049.i to i64 - br i1 %117, label %.preheader.i.i100.i, label %.preheader24.i.i79.i + %115 = icmp ugt i8 %.049.i, %spec.select.i + %116 = zext i8 %spec.select.i to i16 + %117 = zext i8 %.049.i to i64 + br i1 %115, label %.preheader.i.i100.i, label %.preheader24.i.i79.i .preheader24.i.i79.i: ; preds = %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i, %.preheader24.i.i79.i %indvars.iv.i.i80.i = phi i64 [ %indvars.iv.next.i.i82.i, %.preheader24.i.i79.i ], [ 2, %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i ] %indvars29.i.i81.i = trunc i64 %indvars.iv.i.i80.i to i16 %indvars.iv.next.i.i82.i = add nuw nsw i64 %indvars.iv.i.i80.i, 1 - %120 = sub nuw nsw i64 6, %indvars.iv.i.i80.i - %121 = mul nuw nsw i64 %120, %119 - %122 = add nsw i16 %indvars29.i.i81.i, -1 - %123 = mul nuw nsw i16 %122, %118 - %124 = trunc nuw nsw i64 %121 to i16 - %125 = add nsw i16 %123, %124 - %126 = udiv i16 %125, 5 - %127 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %indvars.iv.i.i80.i - %128 = trunc i16 %126 to i8 - store i8 %128, ptr %127, align 1, !noalias !7513 + %118 = sub nuw nsw i64 6, %indvars.iv.i.i80.i + %119 = mul nuw nsw i64 %118, %117 + %120 = add nsw i16 %indvars29.i.i81.i, -1 + %121 = mul nuw nsw i16 %120, %116 + %122 = trunc nuw nsw i64 %119 to i16 + %123 = add nsw i16 %121, %122 + %124 = udiv i16 %123, 5 + %125 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %indvars.iv.i.i80.i + %126 = trunc i16 %124 to i8 + store i8 %126, ptr %125, align 1, !noalias !7513 %exitcond.not.i.i83.i = icmp eq i64 %indvars.iv.next.i.i82.i, 6 br i1 %exitcond.not.i.i83.i, label %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i, label %.preheader24.i.i79.i @@ -30301,142 +30295,142 @@ _ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i: ; pred %indvars.iv30.i.i101.i = phi i64 [ %indvars.iv.next31.i.i103.i, %.preheader.i.i100.i ], [ 2, %_ZN4core4iter6traits8iterator8Iterator6min_by17h9813b99652d2db9bE.exit.i ] %indvars32.i.i102.i = trunc i64 %indvars.iv30.i.i101.i to i16 %indvars.iv.next31.i.i103.i = add nuw nsw i64 %indvars.iv30.i.i101.i, 1 - %129 = sub nuw nsw i64 8, %indvars.iv30.i.i101.i - %130 = mul nuw nsw i64 %129, %119 - %131 = add nsw i16 %indvars32.i.i102.i, -1 - %132 = mul nuw nsw i16 %131, %118 - %133 = trunc nuw nsw i64 %130 to i16 - %134 = add nsw i16 %132, %133 - %135 = udiv i16 %134, 7 - %136 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %indvars.iv30.i.i101.i - %137 = trunc i16 %135 to i8 - store i8 %137, ptr %136, align 1, !noalias !7513 + %127 = sub nuw nsw i64 8, %indvars.iv30.i.i101.i + %128 = mul nuw nsw i64 %127, %117 + %129 = add nsw i16 %indvars32.i.i102.i, -1 + %130 = mul nuw nsw i16 %129, %116 + %131 = trunc nuw nsw i64 %128 to i16 + %132 = add nsw i16 %130, %131 + %133 = udiv i16 %132, 7 + %134 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %indvars.iv30.i.i101.i + %135 = trunc i16 %133 to i8 + store i8 %135, ptr %134, align 1, !noalias !7513 %exitcond33.not.i.i104.i = icmp eq i64 %indvars.iv.next31.i.i103.i, 8 br i1 %exitcond33.not.i.i104.i, label %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i, label %.preheader.i.i100.i _ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i: ; preds = %.preheader24.i.i79.i, %.preheader.i.i100.i - %138 = load i64, ptr %4, align 8, !noalias !7513 + %136 = load i64, ptr %4, align 8, !noalias !7513 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4), !noalias !7513 - store i64 %138, ptr %5, align 8, !noalias !7513 - %139 = trunc i64 %138 to i32 - %140 = and i32 %139, 255 - br label %141 - -141: ; preds = %152, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i - %.030.i85.i = phi i64 [ 0, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i ], [ %156, %152 ] - %.01629.i86.i = phi i32 [ 0, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i ], [ %153, %152 ] - %.sroa.0.0.idx28.i87.i = phi i64 [ 0, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i ], [ %.sroa.0.0.add.i89.i, %152 ] + store i64 %136, ptr %5, align 8, !noalias !7513 + %137 = trunc i64 %136 to i32 + %138 = and i32 %137, 255 + br label %139 + +139: ; preds = %150, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i + %.030.i85.i = phi i64 [ 0, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i ], [ %154, %150 ] + %.01629.i86.i = phi i32 [ 0, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i ], [ %151, %150 ] + %.sroa.0.0.idx28.i87.i = phi i64 [ 0, %_ZN5image6codecs3dxt16alpha_table_dxt517hf828886a08bcc26fE.exit.i84.i ], [ %.sroa.0.0.add.i89.i, %150 ] %.sroa.0.0.ptr.i88.i = getelementptr inbounds nuw i8, ptr %8, i64 %.sroa.0.0.idx28.i87.i - %142 = load i8, ptr %.sroa.0.0.ptr.i88.i, align 1, !alias.scope !7510, !noalias !7429, !noundef !4 - %143 = zext i8 %142 to i32 - %144 = sub nsw i32 %140, %143 - %145 = mul nsw i32 %144, %144 - br label %146 - -146: ; preds = %146, %141 - %.sroa.043.0.i.i.i.i90.i = phi i32 [ %145, %141 ], [ %.sroa.043.0.copyload44.sroa.speculated.i.i.i.i97.i, %146 ] - %.sroa.847.0.i.i.i.i91.i = phi i64 [ 0, %141 ], [ %.sroa.847.0.copyload48.sroa.speculated.i.i.i.i98.i, %146 ] - %.sroa.10.0.i.i.i.i92.i = phi i32 [ %145, %141 ], [ %.sroa.10.0.copyload49.sroa.speculated.i.i.i.i99.i, %146 ] - %.sroa.2.0.i.i.i.i.i.in.i.i.i93.i = phi i64 [ 0, %141 ], [ %.sroa.2.0.i.i.i.i.i.i.i.i94.i, %146 ] + %140 = load i8, ptr %.sroa.0.0.ptr.i88.i, align 1, !alias.scope !7510, !noalias !7429, !noundef !4 + %141 = zext i8 %140 to i32 + %142 = sub nsw i32 %138, %141 + %143 = mul nsw i32 %142, %142 + br label %144 + +144: ; preds = %144, %139 + %.sroa.043.0.i.i.i.i90.i = phi i32 [ %143, %139 ], [ %.sroa.043.0.copyload44.sroa.speculated.i.i.i.i97.i, %144 ] + %.sroa.847.0.i.i.i.i91.i = phi i64 [ 0, %139 ], [ %.sroa.847.0.copyload48.sroa.speculated.i.i.i.i98.i, %144 ] + %.sroa.10.0.i.i.i.i92.i = phi i32 [ %143, %139 ], [ %.sroa.10.0.copyload49.sroa.speculated.i.i.i.i99.i, %144 ] + %.sroa.2.0.i.i.i.i.i.in.i.i.i93.i = phi i64 [ 0, %139 ], [ %.sroa.2.0.i.i.i.i.i.i.i.i94.i, %144 ] %.sroa.2.0.i.i.i.i.i.i.i.i94.i = add nuw nsw i64 %.sroa.2.0.i.i.i.i.i.in.i.i.i93.i, 1 - %147 = getelementptr inbounds nuw i8, ptr %32, i64 %.sroa.2.0.i.i.i.i.i.in.i.i.i93.i - %.val1.i.i.i.i.i.i.i.i.i95.i = load i8, ptr %147, align 1, !alias.scope !7514, !noalias !7517, !noundef !4 - %148 = zext i8 %.val1.i.i.i.i.i.i.i.i.i95.i to i32 - %149 = sub nsw i32 %148, %143 - %150 = mul nsw i32 %149, %149 - %switch.i.i.i.i.i.i.i.i.i.i.i.i.i96.i = icmp samesign ugt i32 %.sroa.043.0.i.i.i.i90.i, %150 - %.sroa.043.0.copyload44.sroa.speculated.i.i.i.i97.i = tail call i32 @llvm.umin.i32(i32 %.sroa.043.0.i.i.i.i90.i, i32 %150) + %145 = getelementptr inbounds nuw i8, ptr %32, i64 %.sroa.2.0.i.i.i.i.i.in.i.i.i93.i + %.val1.i.i.i.i.i.i.i.i.i95.i = load i8, ptr %145, align 1, !alias.scope !7514, !noalias !7517, !noundef !4 + %146 = zext i8 %.val1.i.i.i.i.i.i.i.i.i95.i to i32 + %147 = sub nsw i32 %146, %141 + %148 = mul nsw i32 %147, %147 + %switch.i.i.i.i.i.i.i.i.i.i.i.i.i96.i = icmp samesign ugt i32 %.sroa.043.0.i.i.i.i90.i, %148 + %.sroa.043.0.copyload44.sroa.speculated.i.i.i.i97.i = tail call i32 @llvm.umin.i32(i32 %.sroa.043.0.i.i.i.i90.i, i32 %148) %.sroa.847.0.copyload48.sroa.speculated.i.i.i.i98.i = select i1 %switch.i.i.i.i.i.i.i.i.i.i.i.i.i96.i, i64 %.sroa.2.0.i.i.i.i.i.i.i.i94.i, i64 %.sroa.847.0.i.i.i.i91.i - %.sroa.10.0.copyload49.sroa.speculated.i.i.i.i99.i = select i1 %switch.i.i.i.i.i.i.i.i.i.i.i.i.i96.i, i32 %150, i32 %.sroa.10.0.i.i.i.i92.i - %151 = icmp eq i64 %.sroa.2.0.i.i.i.i.i.i.i.i94.i, 7 - br i1 %151, label %152, label %146 + %.sroa.10.0.copyload49.sroa.speculated.i.i.i.i99.i = select i1 %switch.i.i.i.i.i.i.i.i.i.i.i.i.i96.i, i32 %148, i32 %.sroa.10.0.i.i.i.i92.i + %149 = icmp eq i64 %.sroa.2.0.i.i.i.i.i.i.i.i94.i, 7 + br i1 %149, label %150, label %144 -152: ; preds = %146 +150: ; preds = %144 %.sroa.0.0.add.i89.i = add nuw nsw i64 %.sroa.0.0.idx28.i87.i, 1 - %153 = add i32 %.sroa.10.0.copyload49.sroa.speculated.i.i.i.i99.i, %.01629.i86.i - %154 = mul nuw nsw i64 %.sroa.0.0.idx28.i87.i, 3 - %155 = shl i64 %.sroa.847.0.copyload48.sroa.speculated.i.i.i.i98.i, %154 - %156 = or i64 %155, %.030.i85.i - %157 = icmp eq i64 %.sroa.0.0.add.i89.i, 16 - br i1 %157, label %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i, label %141 - -_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i: ; preds = %152 + %151 = add i32 %.sroa.10.0.copyload49.sroa.speculated.i.i.i.i99.i, %.01629.i86.i + %152 = mul nuw nsw i64 %.sroa.0.0.idx28.i87.i, 3 + %153 = shl i64 %.sroa.847.0.copyload48.sroa.speculated.i.i.i.i98.i, %152 + %154 = or i64 %153, %.030.i85.i + %155 = icmp eq i64 %.sroa.0.0.add.i89.i, 16 + br i1 %155, label %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i, label %139 + +_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i: ; preds = %150 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5), !noalias !7513 - %158 = icmp slt i32 %153, %94 - %.0.sroa.speculated.i.i.i.i.i.i.i.i.lcssa.sink.i = select i1 %158, i8 %.049.i, i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i.i - %.0.sroa.speculated.i.i.i.i.i.i.i.i68.lcssa.sink.i = select i1 %158, i8 %spec.select.i, i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i68.i - %.pn120.i = select i1 %158, i64 %156, i64 %97 + %156 = icmp slt i32 %151, %94 + %.0.sroa.speculated.i.i.i.i.i.i.i.i.lcssa.sink.i = select i1 %156, i8 %.049.i, i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i.i + %.0.sroa.speculated.i.i.i.i.i.i.i.i68.lcssa.sink.i = select i1 %156, i8 %spec.select.i, i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i68.i + %.pn119.i = select i1 %156, i64 %154, i64 %97 store i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i.lcssa.sink.i, ptr %.sroa.0.050, align 1, !alias.scope !7427, !noalias !7424 - %159 = getelementptr inbounds nuw i8, ptr %.sroa.0.050, i64 1 - store i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i68.lcssa.sink.i, ptr %159, align 1, !alias.scope !7427, !noalias !7424 - br label %160 + %157 = getelementptr inbounds nuw i8, ptr %.sroa.0.050, i64 1 + store i8 %.0.sroa.speculated.i.i.i.i.i.i.i.i68.lcssa.sink.i, ptr %157, align 1, !alias.scope !7427, !noalias !7424 + br label %158 -160: ; preds = %160, %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i - %.1138.i = phi i64 [ %.pn120.i, %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i ], [ %162, %160 ] - %.sroa.0.0106.idx137.i = phi i64 [ 2, %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i ], [ %.sroa.0.0106.add.i, %160 ] +158: ; preds = %158, %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i + %.1138.i = phi i64 [ %.pn119.i, %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i ], [ %160, %158 ] + %.sroa.0.0106.idx137.i = phi i64 [ 2, %_ZN5image6codecs3dxt17encode_dxt5_alpha17h9fea82578024f908E.exit105.i ], [ %.sroa.0.0106.add.i, %158 ] %.sroa.0.0106.ptr.i = getelementptr inbounds nuw i8, ptr %.sroa.0.050, i64 %.sroa.0.0106.idx137.i %.sroa.0.0106.add.i = add nuw nsw i64 %.sroa.0.0106.idx137.i, 1 - %161 = trunc i64 %.1138.i to i8 - store i8 %161, ptr %.sroa.0.0106.ptr.i, align 1, !alias.scope !7427, !noalias !7424 - %162 = lshr i64 %.1138.i, 8 - %163 = icmp eq i64 %.sroa.0.0106.add.i, 8 - br i1 %163, label %174, label %160 + %159 = trunc i64 %.1138.i to i8 + store i8 %159, ptr %.sroa.0.0106.ptr.i, align 1, !alias.scope !7427, !noalias !7424 + %160 = lshr i64 %.1138.i, 8 + %161 = icmp eq i64 %.sroa.0.0106.add.i, 8 + br i1 %161, label %172, label %158 -164: ; preds = %38 +162: ; preds = %38 invoke void @_ZN4core9panicking5panic17hb837a5ebbbe5b188E(ptr noalias noundef nonnull readonly align 1 @anon.a41bcb3e661f14a8805e9b353793d812.237, i64 noundef 56, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.a41bcb3e661f14a8805e9b353793d812.238) #46 to label %.noexc15 unwind label %.loopexit.split-lp -.noexc15: ; preds = %164 +.noexc15: ; preds = %162 unreachable -165: ; preds = %36, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" - %.sroa.01.049 = phi i64 [ 0, %36 ], [ %166, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" ] - %166 = add nuw nsw i64 %.sroa.01.049, 1 - %167 = shl nuw nsw i64 %.sroa.01.049, 4 - %168 = getelementptr inbounds nuw i8, ptr %9, i64 %167 - %169 = mul nuw nsw i64 %.sroa.01.049, %16 - %170 = add i64 %169, %.sroa.10.052 - %171 = shl i64 %170, 4 - %172 = add i64 %171, 16 - %173 = icmp eq i64 %171, -16 - br i1 %173, label %178, label %176 +163: ; preds = %36, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" + %.sroa.01.049 = phi i64 [ 0, %36 ], [ %164, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" ] + %164 = add nuw nsw i64 %.sroa.01.049, 1 + %165 = shl nuw nsw i64 %.sroa.01.049, 4 + %166 = getelementptr inbounds nuw i8, ptr %9, i64 %165 + %167 = mul nuw nsw i64 %.sroa.01.049, %16 + %168 = add i64 %167, %.sroa.10.052 + %169 = shl i64 %168, 4 + %170 = add i64 %169, 16 + %171 = icmp eq i64 %169, -16 + br i1 %171, label %176, label %174 -174: ; preds = %160 +172: ; preds = %158 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8), !noalias !7429 - %175 = icmp eq i64 %34, 0 - br i1 %175, label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i._crit_edge", label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i" + %173 = icmp eq i64 %34, 0 + br i1 %173, label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i._crit_edge", label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbb3eea99e5f1bc59E.exit.i" -176: ; preds = %165 - %177 = icmp ugt i64 %172, %2 - br i1 %177, label %179, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" +174: ; preds = %163 + %175 = icmp ugt i64 %170, %2 + br i1 %175, label %177, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit" -178: ; preds = %165 - invoke void @_ZN4core5slice5index22slice_index_order_fail17hcfcb08cd5efc8d4cE(i64 noundef -16, i64 noundef %172, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.a41bcb3e661f14a8805e9b353793d812.259) #46 +176: ; preds = %163 + invoke void @_ZN4core5slice5index22slice_index_order_fail17hcfcb08cd5efc8d4cE(i64 noundef -16, i64 noundef %170, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.a41bcb3e661f14a8805e9b353793d812.259) #46 to label %.noexc18 unwind label %.loopexit.split-lp -.noexc18: ; preds = %178 +.noexc18: ; preds = %176 unreachable -179: ; preds = %176 - invoke void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %172, i64 noundef %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.a41bcb3e661f14a8805e9b353793d812.259) #46 +177: ; preds = %174 + invoke void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %170, i64 noundef %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.a41bcb3e661f14a8805e9b353793d812.259) #46 to label %.noexc19 unwind label %.loopexit.split-lp -.noexc19: ; preds = %179 +.noexc19: ; preds = %177 unreachable -"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit": ; preds = %176 - %180 = getelementptr inbounds i8, ptr %1, i64 %171 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %168, ptr noundef nonnull readonly align 1 dereferenceable(16) %180, i64 16, i1 false), !alias.scope !7546, !noalias !7550 - %exitcond.not = icmp eq i64 %166, 4 - br i1 %exitcond.not, label %38, label %165 +"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hdfea2586a1465bd1E.exit": ; preds = %174 + %178 = getelementptr inbounds i8, ptr %1, i64 %169 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %166, ptr noundef nonnull readonly align 1 dereferenceable(16) %178, i64 16, i1 false), !alias.scope !7546, !noalias !7550 + %exitcond.not = icmp eq i64 %164, 4 + br i1 %exitcond.not, label %38, label %163 -181: ; preds = %14 - %182 = landingpad { ptr, i32 } +179: ; preds = %14 + %180 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #45 unreachable -183: ; preds = %14 +181: ; preds = %14 resume { ptr, i32 } %lpad.phi } diff --git a/bench/libevent/optimized/buffer.c.ll b/bench/libevent/optimized/buffer.c.ll index 45dcef95915..e4aad0b4566 100644 --- a/bench/libevent/optimized/buffer.c.ll +++ b/bench/libevent/optimized/buffer.c.ll @@ -1820,9 +1820,9 @@ if.end36: ; preds = %if.end33 lor.lhs.false51: ; preds = %if.end36 %cmp53 = icmp ult i64 %10, 4097 - %sub56 = sub nuw nsw i64 9223372036854775807, %10 + %sub56 = xor i64 %10, 9223372036854775807 %cmp57.not = icmp ult i64 %datlen, %sub56 - %or.cond = select i1 %cmp53, i1 %cmp57.not, i1 false + %or.cond = and i1 %cmp53, %cmp57.not br i1 %or.cond, label %if.else81, label %if.then58 if.then58: ; preds = %lor.lhs.false51, %if.end36 @@ -6299,10 +6299,10 @@ if.end8: ; preds = %if.end7, %if.end store i64 %length.addr.0, ptr %length9, align 8 %cmp10 = icmp slt i64 %offset, 0 %cmp11 = icmp slt i64 %length.addr.0, 0 - %or.cond1 = select i1 %cmp10, i1 true, i1 %cmp11 - %sub = sub nuw nsw i64 9223372036854775807, %length.addr.0 + %sub = xor i64 %length.addr.0, 9223372036854775807 %cmp15 = icmp ugt i64 %offset, %sub - %or.cond = select i1 %or.cond1, i1 true, i1 %cmp15 + %1 = or i1 %cmp11, %cmp15 + %or.cond = select i1 %cmp10, i1 true, i1 %1 br i1 %or.cond, label %err, label %if.end17 if.end17: ; preds = %if.end8 @@ -6328,12 +6328,12 @@ done: ; preds = %if.end20, %if.then1 br i1 %tobool26.not, label %if.then27, label %return if.then27: ; preds = %done - %1 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @evthread_lock_fns_, i64 8), align 8 - %tobool28.not = icmp eq ptr %1, null + %2 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @evthread_lock_fns_, i64 8), align 8 + %tobool28.not = icmp eq ptr %2, null br i1 %tobool28.not, label %cond.end, label %cond.true cond.true: ; preds = %if.then27 - %call29 = tail call ptr %1(i32 noundef 0) #16 + %call29 = tail call ptr %2(i32 noundef 0) #16 br label %cond.end cond.end: ; preds = %if.then27, %cond.true @@ -6941,10 +6941,10 @@ if.end8.i: ; preds = %if.end7.i, %if.end. store i64 %length.addr.0.i, ptr %length9.i, align 8 %cmp10.i = icmp slt i64 %offset, 0 %cmp11.i = icmp slt i64 %length.addr.0.i, 0 - %or.cond1.i = select i1 %cmp10.i, i1 true, i1 %cmp11.i - %sub.i = sub nuw nsw i64 9223372036854775807, %length.addr.0.i + %sub.i = xor i64 %length.addr.0.i, 9223372036854775807 %cmp15.i = icmp ugt i64 %offset, %sub.i - %or.cond.i = select i1 %or.cond1.i, i1 true, i1 %cmp15.i + %1 = or i1 %cmp11.i, %cmp15.i + %or.cond.i = select i1 %cmp10.i, i1 true, i1 %1 br i1 %or.cond.i, label %err.i, label %if.end17.i if.end17.i: ; preds = %if.end8.i @@ -6952,12 +6952,12 @@ if.end17.i: ; preds = %if.end8.i %bf.load.i = load i8, ptr %can_sendfile.i, align 8 %bf.set.i = or i8 %bf.load.i, 1 store i8 %bf.set.i, ptr %can_sendfile.i, align 8 - %1 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @evthread_lock_fns_, i64 8), align 8 - %tobool28.not.i = icmp eq ptr %1, null + %2 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @evthread_lock_fns_, i64 8), align 8 + %tobool28.not.i = icmp eq ptr %2, null br i1 %tobool28.not.i, label %if.end, label %cond.true.i cond.true.i: ; preds = %if.end17.i - %call29.i = tail call ptr %1(i32 noundef 0) #16 + %call29.i = tail call ptr %2(i32 noundef 0) #16 br label %if.end err.i: ; preds = %if.end8.i, %if.then3.i diff --git a/bench/libjpeg-turbo/optimized/jdphuff.c.ll b/bench/libjpeg-turbo/optimized/jdphuff.c.ll index c4745fbcf15..9b1acbeedf0 100644 --- a/bench/libjpeg-turbo/optimized/jdphuff.c.ll +++ b/bench/libjpeg-turbo/optimized/jdphuff.c.ll @@ -398,7 +398,7 @@ process_restart.exit.thread: ; preds = %._crit_edge.i, %42, %44 = getelementptr inbounds nuw i8, ptr %6, i64 32 %45 = load i32, ptr %44, align 8 %.not100 = icmp eq i32 %45, 0 - br i1 %.not100, label %46, label %164 + br i1 %.not100, label %46, label %157 46: ; preds = %process_restart.exit.thread %47 = getelementptr inbounds nuw i8, ptr %3, i64 32 @@ -432,10 +432,10 @@ process_restart.exit.thread: ; preds = %._crit_edge.i, %42, %68 = zext nneg i32 %8 to i64 br label %69 -69: ; preds = %.lr.ph, %149 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %149 ] - %.082126 = phi i32 [ %57, %.lr.ph ], [ %.4117, %149 ] - %.084125 = phi i64 [ %55, %.lr.ph ], [ %.488114, %149 ] +69: ; preds = %.lr.ph, %144 + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %144 ] + %.082113 = phi i32 [ %57, %.lr.ph ], [ %.4, %144 ] + %.084112 = phi i64 [ %55, %.lr.ph ], [ %.488, %144 ] %70 = getelementptr inbounds nuw ptr, ptr %1, i64 %indvars.iv %71 = load ptr, ptr %70, align 8 %72 = getelementptr inbounds nuw [10 x i32], ptr %62, i64 0, i64 %indvars.iv @@ -448,11 +448,11 @@ process_restart.exit.thread: ; preds = %._crit_edge.i, %42, %79 = sext i32 %78 to i64 %80 = getelementptr inbounds [4 x ptr], ptr %64, i64 0, i64 %79 %81 = load ptr, ptr %80, align 8 - %82 = icmp slt i32 %.082126, 8 + %82 = icmp slt i32 %.082113, 8 br i1 %82, label %83, label %89 83: ; preds = %69 - %84 = call i32 @jpeg_fill_bit_buffer(ptr noundef nonnull %3, i64 noundef %.084125, i32 noundef %.082126, i32 noundef 0) #5 + %84 = call i32 @jpeg_fill_bit_buffer(ptr noundef nonnull %3, i64 noundef %.084112, i32 noundef %.082113, i32 noundef 0) #5 %.not101 = icmp eq i32 %84, 0 br i1 %.not101, label %process_restart.exit, label %85 @@ -463,8 +463,8 @@ process_restart.exit.thread: ; preds = %._crit_edge.i, %42, br i1 %88, label %102, label %89 89: ; preds = %85, %69 - %.185 = phi i64 [ %86, %85 ], [ %.084125, %69 ] - %.183 = phi i32 [ %87, %85 ], [ %.082126, %69 ] + %.185 = phi i64 [ %86, %85 ], [ %.084112, %69 ] + %.183 = phi i32 [ %87, %85 ], [ %.082113, %69 ] %90 = add nsw i32 %.183, -8 %91 = zext nneg i32 %90 to i64 %92 = lshr i64 %.185, %91 @@ -499,129 +499,115 @@ process_restart.exit.thread: ; preds = %._crit_edge.i, %42, %.3 = phi i32 [ %107, %105 ], [ %100, %99 ] %.080 = phi i32 [ %103, %105 ], [ %101, %99 ] %.not102 = icmp eq i32 %.080, 0 - br i1 %.not102, label %.thread, label %111 + br i1 %.not102, label %129, label %109 -.thread: ; preds = %108 - %109 = getelementptr inbounds [4 x i32], ptr %67, i64 0, i64 %74 - %110 = load i32, ptr %109, align 4 - br label %136 +109: ; preds = %108 + %110 = icmp slt i32 %.3, %.080 + br i1 %110, label %111, label %116 -111: ; preds = %108 - %112 = icmp slt i32 %.3, %.080 - br i1 %112, label %113, label %118 +111: ; preds = %109 + %112 = call i32 @jpeg_fill_bit_buffer(ptr noundef nonnull %3, i64 noundef %.387, i32 noundef %.3, i32 noundef %.080) #5 + %.not103 = icmp eq i32 %112, 0 + br i1 %.not103, label %process_restart.exit, label %113 113: ; preds = %111 - %114 = call i32 @jpeg_fill_bit_buffer(ptr noundef nonnull %3, i64 noundef %.387, i32 noundef %.3, i32 noundef %.080) #5 - %.not103 = icmp eq i32 %114, 0 - br i1 %.not103, label %process_restart.exit, label %115 - -115: ; preds = %113 - %116 = load i64, ptr %65, align 8 - %117 = load i32, ptr %66, align 8 - br label %118 - -118: ; preds = %111, %115 - %.589 = phi i64 [ %116, %115 ], [ %.387, %111 ] - %.5 = phi i32 [ %117, %115 ], [ %.3, %111 ] - %119 = sub nsw i32 %.5, %.080 - %120 = zext nneg i32 %119 to i64 - %121 = lshr i64 %.589, %120 - %122 = trunc i64 %121 to i32 + %114 = load i64, ptr %65, align 8 + %115 = load i32, ptr %66, align 8 + br label %116 + +116: ; preds = %113, %109 + %.589 = phi i64 [ %114, %113 ], [ %.387, %109 ] + %.5 = phi i32 [ %115, %113 ], [ %.3, %109 ] + %117 = sub nsw i32 %.5, %.080 + %118 = zext nneg i32 %117 to i64 + %119 = lshr i64 %.589, %118 + %120 = trunc i64 %119 to i32 %notmask = shl nsw i32 -1, %.080 - %123 = xor i32 %notmask, -1 - %124 = and i32 %122, %123 - %125 = add nsw i32 %.080, -1 - %126 = shl nuw i32 1, %125 - %127 = icmp slt i32 %124, %126 - %128 = add nuw nsw i32 %notmask, 1 - %129 = select i1 %127, i32 %128, i32 0 - %130 = add nsw i32 %129, %124 - %131 = getelementptr inbounds [4 x i32], ptr %67, i64 0, i64 %74 - %132 = load i32, ptr %131, align 4 - %133 = icmp sgt i32 %132, -1 - %134 = sub nuw nsw i32 2147483647, %132 - %135 = icmp sgt i32 %130, %134 - %or.cond = select i1 %133, i1 %135, i1 false - br i1 %or.cond, label %142, label %136 - -136: ; preds = %.thread, %118 - %137 = phi i32 [ %110, %.thread ], [ %132, %118 ] - %138 = phi ptr [ %109, %.thread ], [ %131, %118 ] - %.1122 = phi i32 [ 0, %.thread ], [ %130, %118 ] - %.4119 = phi i32 [ %.3, %.thread ], [ %119, %118 ] - %.488116 = phi i64 [ %.387, %.thread ], [ %.589, %118 ] - %139 = icmp slt i32 %137, 0 - %140 = sub nsw i32 -2147483648, %137 - %141 = icmp slt i32 %.1122, %140 - %or.cond107 = select i1 %139, i1 %141, i1 false - br i1 %or.cond107, label %142, label %149 - -142: ; preds = %136, %118 - %143 = phi i32 [ %137, %136 ], [ %132, %118 ] - %144 = phi ptr [ %138, %136 ], [ %131, %118 ] - %.1121 = phi i32 [ %.1122, %136 ], [ %130, %118 ] - %.4118 = phi i32 [ %.4119, %136 ], [ %119, %118 ] - %.488115 = phi i64 [ %.488116, %136 ], [ %.589, %118 ] - %145 = load ptr, ptr %0, align 8 - %146 = getelementptr inbounds nuw i8, ptr %145, i64 40 - store i32 6, ptr %146, align 8 - %147 = load ptr, ptr %0, align 8 - %148 = load ptr, ptr %147, align 8 - call void %148(ptr noundef nonnull %0) #5 - br label %149 - -149: ; preds = %142, %136 - %150 = phi i32 [ %143, %142 ], [ %137, %136 ] - %151 = phi ptr [ %144, %142 ], [ %138, %136 ] - %.1120 = phi i32 [ %.1121, %142 ], [ %.1122, %136 ] - %.4117 = phi i32 [ %.4118, %142 ], [ %.4119, %136 ] - %.488114 = phi i64 [ %.488115, %142 ], [ %.488116, %136 ] - %152 = add nsw i32 %.1120, %150 - store i32 %152, ptr %151, align 4 - %153 = zext i32 %152 to i64 - %154 = shl i64 %153, %68 - %155 = trunc i64 %154 to i16 - store i16 %155, ptr %71, align 2 + %121 = xor i32 %notmask, -1 + %122 = and i32 %120, %121 + %123 = add nsw i32 %.080, -1 + %124 = shl nuw i32 1, %123 + %125 = icmp slt i32 %122, %124 + %126 = add nuw nsw i32 %notmask, 1 + %127 = select i1 %125, i32 %126, i32 0 + %128 = add nsw i32 %127, %122 + br label %129 + +129: ; preds = %116, %108 + %.488 = phi i64 [ %.589, %116 ], [ %.387, %108 ] + %.4 = phi i32 [ %117, %116 ], [ %.3, %108 ] + %.1 = phi i32 [ %128, %116 ], [ 0, %108 ] + %130 = getelementptr inbounds [4 x i32], ptr %67, i64 0, i64 %74 + %131 = load i32, ptr %130, align 4 + %132 = icmp sgt i32 %131, -1 + %133 = xor i32 %131, 2147483647 + %134 = icmp sgt i32 %.1, %133 + %or.cond = select i1 %132, i1 %134, i1 false + br i1 %or.cond, label %139, label %135 + +135: ; preds = %129 + %136 = icmp slt i32 %131, 0 + %137 = sub nsw i32 -2147483648, %131 + %138 = icmp slt i32 %.1, %137 + %or.cond107 = select i1 %136, i1 %138, i1 false + br i1 %or.cond107, label %139, label %144 + +139: ; preds = %135, %129 + %140 = load ptr, ptr %0, align 8 + %141 = getelementptr inbounds nuw i8, ptr %140, i64 40 + store i32 6, ptr %141, align 8 + %142 = load ptr, ptr %0, align 8 + %143 = load ptr, ptr %142, align 8 + call void %143(ptr noundef nonnull %0) #5 + br label %144 + +144: ; preds = %139, %135 + %145 = add nsw i32 %131, %.1 + store i32 %145, ptr %130, align 4 + %146 = zext i32 %145 to i64 + %147 = shl i64 %146, %68 + %148 = trunc i64 %147 to i16 + store i16 %148, ptr %71, align 2 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %156 = load i32, ptr %59, align 8 - %157 = sext i32 %156 to i64 - %158 = icmp slt i64 %indvars.iv.next, %157 - br i1 %158, label %69, label %._crit_edge.loopexit, !llvm.loop !11 + %149 = load i32, ptr %59, align 8 + %150 = sext i32 %149 to i64 + %151 = icmp slt i64 %indvars.iv.next, %150 + br i1 %151, label %69, label %._crit_edge.loopexit, !llvm.loop !11 -._crit_edge.loopexit: ; preds = %149 +._crit_edge.loopexit: ; preds = %144 %.pre = load ptr, ptr %3, align 8 - %.pre130 = load ptr, ptr %48, align 8 + %.pre117 = load ptr, ptr %48, align 8 br label %._crit_edge ._crit_edge: ; preds = %._crit_edge.loopexit, %46 - %159 = phi ptr [ %49, %46 ], [ %.pre130, %._crit_edge.loopexit ] - %160 = phi ptr [ %50, %46 ], [ %.pre, %._crit_edge.loopexit ] - %.084.lcssa = phi i64 [ %55, %46 ], [ %.488114, %._crit_edge.loopexit ] - %.082.lcssa = phi i32 [ %57, %46 ], [ %.4117, %._crit_edge.loopexit ] - store ptr %160, ptr %159, align 8 - %161 = load i64, ptr %53, align 8 - %162 = load ptr, ptr %48, align 8 - %163 = getelementptr inbounds nuw i8, ptr %162, i64 8 - store i64 %161, ptr %163, align 8 + %152 = phi ptr [ %49, %46 ], [ %.pre117, %._crit_edge.loopexit ] + %153 = phi ptr [ %50, %46 ], [ %.pre, %._crit_edge.loopexit ] + %.084.lcssa = phi i64 [ %55, %46 ], [ %.488, %._crit_edge.loopexit ] + %.082.lcssa = phi i32 [ %57, %46 ], [ %.4, %._crit_edge.loopexit ] + store ptr %153, ptr %152, align 8 + %154 = load i64, ptr %53, align 8 + %155 = load ptr, ptr %48, align 8 + %156 = getelementptr inbounds nuw i8, ptr %155, i64 8 + store i64 %154, ptr %156, align 8 store i64 %.084.lcssa, ptr %54, align 8 store i32 %.082.lcssa, ptr %56, align 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %58, ptr noundef nonnull align 4 dereferenceable(20) %4, i64 20, i1 false) - br label %164 - -164: ; preds = %._crit_edge, %process_restart.exit.thread - %165 = load i32, ptr %9, align 8 - %.not104 = icmp eq i32 %165, 0 - br i1 %.not104, label %process_restart.exit, label %166 - -166: ; preds = %164 - %167 = getelementptr inbounds nuw i8, ptr %6, i64 76 - %168 = load i32, ptr %167, align 4 - %169 = add i32 %168, -1 - store i32 %169, ptr %167, align 4 + br label %157 + +157: ; preds = %._crit_edge, %process_restart.exit.thread + %158 = load i32, ptr %9, align 8 + %.not104 = icmp eq i32 %158, 0 + br i1 %.not104, label %process_restart.exit, label %159 + +159: ; preds = %157 + %160 = getelementptr inbounds nuw i8, ptr %6, i64 76 + %161 = load i32, ptr %160, align 4 + %162 = add i32 %161, -1 + store i32 %162, ptr %160, align 4 br label %process_restart.exit -process_restart.exit: ; preds = %113, %102, %83, %15, %164, %166 - %.0 = phi i32 [ 1, %166 ], [ 1, %164 ], [ 0, %15 ], [ 0, %83 ], [ 0, %102 ], [ 0, %113 ] +process_restart.exit: ; preds = %111, %102, %83, %15, %157, %159 + %.0 = phi i32 [ 1, %159 ], [ 1, %157 ], [ 0, %15 ], [ 0, %83 ], [ 0, %102 ], [ 0, %111 ] ret i32 %.0 } diff --git a/bench/libpng/optimized/pngread.c.ll b/bench/libpng/optimized/pngread.c.ll index 78e7d89cb7c..09e07bac586 100644 --- a/bench/libpng/optimized/pngread.c.ll +++ b/bench/libpng/optimized/pngread.c.ll @@ -2743,7 +2743,7 @@ make_gray_colormap.exit463: ; preds = %.preheader579 %.0411631 = phi i32 [ 1, %207 ], [ %267, %266 ] %.1413630 = phi i32 [ 232, %207 ], [ %220, %266 ] %209 = mul nuw nsw i32 %.0411631, 51 - %210 = sub nuw nsw i32 255, %209 + %210 = xor i32 %209, 255 %211 = mul nuw nsw i32 %210, %.1401 %212 = mul nuw nsw i32 %210, %.1403 %213 = mul nuw nsw i32 %210, %.1405 @@ -5135,8 +5135,8 @@ define internal noundef i32 @png_image_read_and_map(ptr nocapture noundef readon 25: ; preds = %22 %26 = icmp samesign ugt i32 %.0104154, 1 - %27 = sub nuw nsw i32 7, %.0104154 - %28 = lshr i32 %27, 1 + %27 = lshr i32 %.0104154, 1 + %28 = xor i32 %27, 3 %29 = select i1 %26, i32 %28, i32 3 %notmask = shl nsw i32 -1, %29 %30 = xor i32 %notmask, -1 @@ -5501,8 +5501,8 @@ define internal noundef i32 @png_image_read_composite(ptr nocapture noundef read 30: ; preds = %27 %31 = icmp samesign ugt i32 %.07392, 1 - %32 = sub nuw nsw i32 7, %.07392 - %33 = lshr i32 %32, 1 + %32 = lshr i32 %.07392, 1 + %33 = xor i32 %32, 3 %34 = select i1 %31, i32 %33, i32 3 %notmask = shl nsw i32 -1, %34 %35 = xor i32 %notmask, -1 @@ -5735,8 +5735,8 @@ define internal noundef i32 @png_image_read_background(ptr nocapture noundef rea 47: ; preds = %44 %48 = icmp samesign ugt i32 %.0234, 1 - %49 = sub nuw nsw i32 7, %.0234 - %50 = lshr i32 %49, 1 + %49 = lshr i32 %.0234, 1 + %50 = xor i32 %49, 3 %51 = select i1 %48, i32 %50, i32 3 %notmask203 = shl nsw i32 -1, %51 %52 = xor i32 %notmask203, -1 @@ -5969,8 +5969,8 @@ define internal noundef i32 @png_image_read_background(ptr nocapture noundef rea 195: ; preds = %.split.us %196 = icmp samesign ugt i32 %.1219.us, 1 - %197 = sub nuw nsw i32 7, %.1219.us - %198 = lshr i32 %197, 1 + %197 = lshr i32 %.1219.us, 1 + %198 = xor i32 %197, 3 %199 = select i1 %196, i32 %198, i32 3 %notmask.us = shl nsw i32 -1, %199 %200 = xor i32 %notmask.us, -1 @@ -6080,8 +6080,8 @@ define internal noundef i32 @png_image_read_background(ptr nocapture noundef rea 258: ; preds = %.split %259 = icmp samesign ugt i32 %.1219, 1 - %260 = sub nuw nsw i32 7, %.1219 - %261 = lshr i32 %260, 1 + %260 = lshr i32 %.1219, 1 + %261 = xor i32 %260, 3 %262 = select i1 %259, i32 %261, i32 3 %notmask = shl nsw i32 -1, %262 %263 = xor i32 %notmask, -1 diff --git a/bench/libpng/optimized/pngwutil.c.ll b/bench/libpng/optimized/pngwutil.c.ll index a130024e404..7535bb84a7c 100644 --- a/bench/libpng/optimized/pngwutil.c.ll +++ b/bench/libpng/optimized/pngwutil.c.ll @@ -1301,7 +1301,7 @@ define internal fastcc i64 @png_image_size(ptr noalias nocapture noundef readonl %9 = getelementptr inbounds nuw i8, ptr %0, i64 612 %10 = load i8, ptr %9, align 4 %.not = icmp eq i8 %10, 0 - br i1 %.not, label %90, label %11 + br i1 %.not, label %86, label %11 11: ; preds = %8 %12 = getelementptr inbounds nuw i8, ptr %0, i64 504 @@ -1315,26 +1315,26 @@ define internal fastcc i64 @png_image_size(ptr noalias nocapture noundef readonl %19 = zext nneg i8 %18 to i64 br i1 %16, label %.split.us, label %.split -.split.us: ; preds = %11, %53 - %.03344.us = phi i32 [ %26, %53 ], [ 0, %11 ] - %.03443.us = phi i64 [ %.1.us, %53 ], [ 0, %11 ] +.split.us: ; preds = %11, %51 + %.03344.us = phi i32 [ %26, %51 ], [ 0, %11 ] + %.03443.us = phi i64 [ %.1.us, %51 ], [ 0, %11 ] %20 = icmp samesign ugt i32 %.03344.us, 1 - %21 = sub nuw nsw i32 7, %.03344.us - %22 = lshr i32 %21, 1 + %21 = lshr i32 %.03344.us, 1 + %22 = xor i32 %21, 3 %23 = select i1 %20, i32 %22, i32 3 %notmask.us = shl nsw i32 -1, %23 %24 = xor i32 %notmask.us, -1 %25 = and i32 %.03344.us, 1 %26 = add nuw nsw i32 %.03344.us, 1 %27 = lshr i32 %26, 1 - %28 = sub nuw nsw i32 3, %27 + %28 = xor i32 %27, 3 %29 = shl nuw nsw i32 %25, %28 %30 = and i32 %29, 7 %31 = add i32 %13, %24 %32 = sub i32 %31, %30 %33 = lshr i32 %32, %23 %.not40.us = icmp eq i32 %33, 0 - br i1 %.not40.us, label %53, label %34 + br i1 %.not40.us, label %51, label %34 34: ; preds = %.split.us %35 = zext i32 %33 to i64 @@ -1347,82 +1347,78 @@ define internal fastcc i64 @png_image_size(ptr noalias nocapture noundef readonl %notmask41.us = shl nsw i32 -1, %40 %41 = xor i32 %notmask41.us, -1 %42 = xor i32 %25, 1 - %43 = lshr i32 %.03344.us, 1 - %44 = sub nuw nsw i32 3, %43 - %45 = shl nuw nsw i32 %42, %44 - %46 = and i32 %45, 7 - %47 = sub nsw i32 %3, %46 - %48 = add nsw i32 %47, %41 - %49 = lshr i32 %48, %40 - %50 = zext nneg i32 %49 to i64 - %51 = mul i64 %37, %50 - %52 = add i64 %51, %.03443.us - br label %53 - -53: ; preds = %34, %.split.us - %.1.us = phi i64 [ %52, %34 ], [ %.03443.us, %.split.us ] + %43 = shl nuw nsw i32 %42, %22 + %44 = and i32 %43, 7 + %45 = sub nsw i32 %3, %44 + %46 = add nsw i32 %45, %41 + %47 = lshr i32 %46, %40 + %48 = zext nneg i32 %47 to i64 + %49 = mul i64 %37, %48 + %50 = add i64 %49, %.03443.us + br label %51 + +51: ; preds = %34, %.split.us + %.1.us = phi i64 [ %50, %34 ], [ %.03443.us, %.split.us ] %exitcond47.not = icmp eq i32 %26, 7 br i1 %exitcond47.not, label %.loopexit, label %.split.us, !llvm.loop !27 -.split: ; preds = %11, %89 - %.03344 = phi i32 [ %60, %89 ], [ 0, %11 ] - %.03443 = phi i64 [ %.1, %89 ], [ 0, %11 ] - %54 = icmp samesign ugt i32 %.03344, 1 - %55 = sub nuw nsw i32 7, %.03344 - %56 = lshr i32 %55, 1 - %57 = select i1 %54, i32 %56, i32 3 - %notmask = shl nsw i32 -1, %57 - %58 = xor i32 %notmask, -1 - %59 = and i32 %.03344, 1 - %60 = add nuw nsw i32 %.03344, 1 - %61 = lshr i32 %60, 1 - %62 = sub nuw nsw i32 3, %61 - %63 = shl nuw nsw i32 %59, %62 - %64 = and i32 %63, 7 - %65 = add i32 %13, %58 - %66 = sub i32 %65, %64 - %67 = lshr i32 %66, %57 - %.not40 = icmp eq i32 %67, 0 - br i1 %.not40, label %89, label %68 - -68: ; preds = %.split - %69 = zext i32 %67 to i64 - %70 = mul nuw nsw i64 %69, %17 - %71 = add nuw nsw i64 %70, 7 - %72 = lshr i64 %71, 3 - %73 = add nuw nsw i64 %72, 1 - %74 = sub nuw nsw i32 8, %.03344 - %75 = lshr i32 %74, 1 +.split: ; preds = %11, %85 + %.03344 = phi i32 [ %58, %85 ], [ 0, %11 ] + %.03443 = phi i64 [ %.1, %85 ], [ 0, %11 ] + %52 = icmp samesign ugt i32 %.03344, 1 + %53 = lshr i32 %.03344, 1 + %54 = xor i32 %53, 3 + %55 = select i1 %52, i32 %54, i32 3 + %notmask = shl nsw i32 -1, %55 + %56 = xor i32 %notmask, -1 + %57 = and i32 %.03344, 1 + %58 = add nuw nsw i32 %.03344, 1 + %59 = lshr i32 %58, 1 + %60 = xor i32 %59, 3 + %61 = shl nuw nsw i32 %57, %60 + %62 = and i32 %61, 7 + %63 = add i32 %13, %56 + %64 = sub i32 %63, %62 + %65 = lshr i32 %64, %55 + %.not40 = icmp eq i32 %65, 0 + br i1 %.not40, label %85, label %66 + +66: ; preds = %.split + %67 = zext i32 %65 to i64 + %68 = mul nuw nsw i64 %67, %17 + %69 = add nuw nsw i64 %68, 7 + %70 = lshr i64 %69, 3 + %71 = add nuw nsw i64 %70, 1 + %72 = sub nuw nsw i32 8, %.03344 + %73 = lshr i32 %72, 1 %.inv = icmp samesign ult i32 %.03344, 3 - %76 = select i1 %.inv, i32 3, i32 %75 - %notmask41 = shl nsw i32 -1, %76 - %77 = xor i32 %notmask41, -1 - %78 = xor i32 %59, 1 - %79 = lshr i32 %.03344, 1 - %80 = sub nuw nsw i32 3, %79 - %81 = shl nuw nsw i32 %78, %80 - %82 = and i32 %81, 7 - %83 = sub nsw i32 %3, %82 - %84 = add nsw i32 %83, %77 - %85 = lshr i32 %84, %76 - %86 = zext nneg i32 %85 to i64 - %87 = mul i64 %73, %86 - %88 = add i64 %87, %.03443 - br label %89 - -89: ; preds = %.split, %68 - %.1 = phi i64 [ %88, %68 ], [ %.03443, %.split ] - %exitcond.not = icmp eq i32 %60, 7 + %74 = select i1 %.inv, i32 3, i32 %73 + %notmask41 = shl nsw i32 -1, %74 + %75 = xor i32 %notmask41, -1 + %76 = xor i32 %57, 1 + %77 = shl nuw nsw i32 %76, %54 + %78 = and i32 %77, 7 + %79 = sub nsw i32 %3, %78 + %80 = add nsw i32 %79, %75 + %81 = lshr i32 %80, %74 + %82 = zext nneg i32 %81 to i64 + %83 = mul i64 %71, %82 + %84 = add i64 %83, %.03443 + br label %85 + +85: ; preds = %.split, %66 + %.1 = phi i64 [ %84, %66 ], [ %.03443, %.split ] + %exitcond.not = icmp eq i32 %58, 7 br i1 %exitcond.not, label %.loopexit, label %.split, !llvm.loop !27 -90: ; preds = %8 - %91 = add nuw nsw i64 %5, 1 - %92 = zext nneg i32 %3 to i64 - %93 = mul nuw nsw i64 %91, %92 +86: ; preds = %8 + %87 = add nuw nsw i64 %5, 1 + %88 = zext nneg i32 %3 to i64 + %89 = mul nuw nsw i64 %87, %88 br label %.loopexit -.loopexit: ; preds = %89, %53, %1, %90 - %.0 = phi i64 [ %93, %90 ], [ 4294967295, %1 ], [ %.1.us, %53 ], [ %.1, %89 ] +.loopexit: ; preds = %85, %51, %1, %86 + %.0 = phi i64 [ %89, %86 ], [ 4294967295, %1 ], [ %.1.us, %51 ], [ %.1, %85 ] ret i64 %.0 } diff --git a/bench/libquic/optimized/cbb.c.ll b/bench/libquic/optimized/cbb.c.ll index f67fbdcb142..a16331a739b 100644 --- a/bench/libquic/optimized/cbb.c.ll +++ b/bench/libquic/optimized/cbb.c.ll @@ -1308,20 +1308,20 @@ entry: for.body: ; preds = %entry, %for.body.backedge %tobool1.not = phi i1 [ %tobool1.not.be, %for.body.backedge ], [ true, %entry ] %i.076 = phi i64 [ %i.076.be, %for.body.backedge ], [ 0, %entry ] - %0 = shl nuw nsw i64 %i.076, 3 - %mul = sub nuw nsw i64 56, %0 + %sub = shl nuw nsw i64 %i.076, 3 + %mul = xor i64 %sub, 56 %shr = lshr i64 %value, %mul %conv = trunc i64 %shr to i8 br i1 %tobool1.not, label %if.then2, label %if.end15 if.then2: ; preds = %for.body - %1 = trunc i64 %shr to i32 - %conv3 = and i32 %1, 255 + %0 = trunc i64 %shr to i32 + %conv3 = and i32 %0, 255 %cmp4 = icmp eq i32 %conv3, 0 br i1 %cmp4, label %for.inc, label %if.end7 if.end7: ; preds = %if.then2 - %and9 = and i32 %1, 128 + %and9 = and i32 %0, 128 %tobool10.not = icmp eq i32 %and9, 0 br i1 %tobool10.not, label %if.end15, label %land.lhs.true @@ -1331,45 +1331,45 @@ land.lhs.true: ; preds = %if.end7 br i1 %tobool.not.i, label %return, label %if.end.i if.end.i: ; preds = %land.lhs.true - %2 = load ptr, ptr %child, align 8 - %cmp.i.i.i.i = icmp eq ptr %2, null + %1 = load ptr, ptr %child, align 8 + %cmp.i.i.i.i = icmp eq ptr %1, null br i1 %cmp.i.i.i.i, label %return, label %if.end.i.i.i.i if.end.i.i.i.i: ; preds = %if.end.i - %len1.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 8 - %3 = load i64, ptr %len1.i.i.i.i, align 8 - %add.i.i.i.i = add i64 %3, 1 - %cmp3.i.i.i.i = icmp eq i64 %3, -1 + %len1.i.i.i.i = getelementptr inbounds nuw i8, ptr %1, i64 8 + %2 = load i64, ptr %len1.i.i.i.i, align 8 + %add.i.i.i.i = add i64 %2, 1 + %cmp3.i.i.i.i = icmp eq i64 %2, -1 br i1 %cmp3.i.i.i.i, label %return, label %if.end5.i.i.i.i if.end5.i.i.i.i: ; preds = %if.end.i.i.i.i - %cap.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 16 - %4 = load i64, ptr %cap.i.i.i.i, align 8 - %cmp6.i.i.i.i = icmp ugt i64 %add.i.i.i.i, %4 + %cap.i.i.i.i = getelementptr inbounds nuw i8, ptr %1, i64 16 + %3 = load i64, ptr %cap.i.i.i.i, align 8 + %cmp6.i.i.i.i = icmp ugt i64 %add.i.i.i.i, %3 br i1 %cmp6.i.i.i.i, label %if.then7.i.i.i.i, label %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i: ; preds = %if.end5.i.i.i.i - %.pre.i.i = load ptr, ptr %2, align 8 + %.pre.i.i = load ptr, ptr %1, align 8 br label %CBB_add_u8.exit if.then7.i.i.i.i: ; preds = %if.end5.i.i.i.i - %can_resize.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 24 - %5 = load i8, ptr %can_resize.i.i.i.i, align 8 - %tobool.not.i.i.i.i = icmp eq i8 %5, 0 + %can_resize.i.i.i.i = getelementptr inbounds nuw i8, ptr %1, i64 24 + %4 = load i8, ptr %can_resize.i.i.i.i, align 8 + %tobool.not.i.i.i.i = icmp eq i8 %4, 0 br i1 %tobool.not.i.i.i.i, label %return, label %if.end10.i.i.i.i if.end10.i.i.i.i: ; preds = %if.then7.i.i.i.i - %mul.i.i.i.i = shl i64 %4, 1 - %cmp12.i.i.i.i = icmp slt i64 %4, 0 - %6 = call i64 @llvm.umax.i64(i64 %mul.i.i.i.i, i64 %add.i.i.i.i) - %newcap.0.i.i.i.i = select i1 %cmp12.i.i.i.i, i64 %add.i.i.i.i, i64 %6 - %7 = load ptr, ptr %2, align 8 - %call.i.i.i.i = call ptr @realloc(ptr noundef %7, i64 noundef %newcap.0.i.i.i.i) #15 + %mul.i.i.i.i = shl i64 %3, 1 + %cmp12.i.i.i.i = icmp slt i64 %3, 0 + %5 = call i64 @llvm.umax.i64(i64 %mul.i.i.i.i, i64 %add.i.i.i.i) + %newcap.0.i.i.i.i = select i1 %cmp12.i.i.i.i, i64 %add.i.i.i.i, i64 %5 + %6 = load ptr, ptr %1, align 8 + %call.i.i.i.i = call ptr @realloc(ptr noundef %6, i64 noundef %newcap.0.i.i.i.i) #15 %cmp16.i.i.i.i = icmp eq ptr %call.i.i.i.i, null br i1 %cmp16.i.i.i.i, label %return, label %if.end18.i.i.i.i if.end18.i.i.i.i: ; preds = %if.end10.i.i.i.i - store ptr %call.i.i.i.i, ptr %2, align 8 + store ptr %call.i.i.i.i, ptr %1, align 8 store i64 %newcap.0.i.i.i.i, ptr %cap.i.i.i.i, align 8 %.pre5.pre.i.i.i = load i64, ptr %len1.i.i.i.i, align 8 %.pre14.i.i = add i64 %.pre5.pre.i.i.i, 1 @@ -1377,9 +1377,9 @@ if.end18.i.i.i.i: ; preds = %if.end10.i.i.i.i CBB_add_u8.exit: ; preds = %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i, %if.end18.i.i.i.i %add.i.pre-phi.i.i = phi i64 [ %add.i.i.i.i, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i ], [ %.pre14.i.i, %if.end18.i.i.i.i ] - %8 = phi ptr [ %.pre.i.i, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i ], [ %call.i.i.i.i, %if.end18.i.i.i.i ] - %.pre.i.i.i = phi i64 [ %3, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i ], [ %.pre5.pre.i.i.i, %if.end18.i.i.i.i ] - %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %8, i64 %.pre.i.i.i + %7 = phi ptr [ %.pre.i.i, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i ], [ %call.i.i.i.i, %if.end18.i.i.i.i ] + %.pre.i.i.i = phi i64 [ %2, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i ], [ %.pre5.pre.i.i.i, %if.end18.i.i.i.i ] + %add.ptr.i.i.i.i = getelementptr inbounds i8, ptr %7, i64 %.pre.i.i.i store i64 %add.i.pre-phi.i.i, ptr %len1.i.i.i.i, align 8 store i8 0, ptr %add.ptr.i.i.i.i, align 1 br label %if.end15 @@ -1390,45 +1390,45 @@ if.end15: ; preds = %CBB_add_u8.exit, %i br i1 %tobool.not.i8, label %return, label %if.end.i9 if.end.i9: ; preds = %if.end15 - %9 = load ptr, ptr %child, align 8 - %cmp.i.i.i.i10 = icmp eq ptr %9, null + %8 = load ptr, ptr %child, align 8 + %cmp.i.i.i.i10 = icmp eq ptr %8, null br i1 %cmp.i.i.i.i10, label %return, label %if.end.i.i.i.i11 if.end.i.i.i.i11: ; preds = %if.end.i9 - %len1.i.i.i.i12 = getelementptr inbounds nuw i8, ptr %9, i64 8 - %10 = load i64, ptr %len1.i.i.i.i12, align 8 - %add.i.i.i.i13 = add i64 %10, 1 - %cmp3.i.i.i.i14 = icmp eq i64 %10, -1 + %len1.i.i.i.i12 = getelementptr inbounds nuw i8, ptr %8, i64 8 + %9 = load i64, ptr %len1.i.i.i.i12, align 8 + %add.i.i.i.i13 = add i64 %9, 1 + %cmp3.i.i.i.i14 = icmp eq i64 %9, -1 br i1 %cmp3.i.i.i.i14, label %return, label %if.end5.i.i.i.i15 if.end5.i.i.i.i15: ; preds = %if.end.i.i.i.i11 - %cap.i.i.i.i16 = getelementptr inbounds nuw i8, ptr %9, i64 16 - %11 = load i64, ptr %cap.i.i.i.i16, align 8 - %cmp6.i.i.i.i17 = icmp ugt i64 %add.i.i.i.i13, %11 + %cap.i.i.i.i16 = getelementptr inbounds nuw i8, ptr %8, i64 16 + %10 = load i64, ptr %cap.i.i.i.i16, align 8 + %cmp6.i.i.i.i17 = icmp ugt i64 %add.i.i.i.i13, %10 br i1 %cmp6.i.i.i.i17, label %if.then7.i.i.i.i25, label %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18: ; preds = %if.end5.i.i.i.i15 - %.pre.i.i19 = load ptr, ptr %9, align 8 + %.pre.i.i19 = load ptr, ptr %8, align 8 br label %for.inc.thread if.then7.i.i.i.i25: ; preds = %if.end5.i.i.i.i15 - %can_resize.i.i.i.i26 = getelementptr inbounds nuw i8, ptr %9, i64 24 - %12 = load i8, ptr %can_resize.i.i.i.i26, align 8 - %tobool.not.i.i.i.i27 = icmp eq i8 %12, 0 + %can_resize.i.i.i.i26 = getelementptr inbounds nuw i8, ptr %8, i64 24 + %11 = load i8, ptr %can_resize.i.i.i.i26, align 8 + %tobool.not.i.i.i.i27 = icmp eq i8 %11, 0 br i1 %tobool.not.i.i.i.i27, label %return, label %if.end10.i.i.i.i28 if.end10.i.i.i.i28: ; preds = %if.then7.i.i.i.i25 - %mul.i.i.i.i29 = shl i64 %11, 1 - %cmp12.i.i.i.i30 = icmp slt i64 %11, 0 - %13 = call i64 @llvm.umax.i64(i64 %mul.i.i.i.i29, i64 %add.i.i.i.i13) - %newcap.0.i.i.i.i31 = select i1 %cmp12.i.i.i.i30, i64 %add.i.i.i.i13, i64 %13 - %14 = load ptr, ptr %9, align 8 - %call.i.i.i.i32 = call ptr @realloc(ptr noundef %14, i64 noundef %newcap.0.i.i.i.i31) #15 + %mul.i.i.i.i29 = shl i64 %10, 1 + %cmp12.i.i.i.i30 = icmp slt i64 %10, 0 + %12 = call i64 @llvm.umax.i64(i64 %mul.i.i.i.i29, i64 %add.i.i.i.i13) + %newcap.0.i.i.i.i31 = select i1 %cmp12.i.i.i.i30, i64 %add.i.i.i.i13, i64 %12 + %13 = load ptr, ptr %8, align 8 + %call.i.i.i.i32 = call ptr @realloc(ptr noundef %13, i64 noundef %newcap.0.i.i.i.i31) #15 %cmp16.i.i.i.i33 = icmp eq ptr %call.i.i.i.i32, null br i1 %cmp16.i.i.i.i33, label %return, label %if.end18.i.i.i.i34 if.end18.i.i.i.i34: ; preds = %if.end10.i.i.i.i28 - store ptr %call.i.i.i.i32, ptr %9, align 8 + store ptr %call.i.i.i.i32, ptr %8, align 8 store i64 %newcap.0.i.i.i.i31, ptr %cap.i.i.i.i16, align 8 %.pre5.pre.i.i.i35 = load i64, ptr %len1.i.i.i.i12, align 8 %.pre14.i.i36 = add i64 %.pre5.pre.i.i.i35, 1 @@ -1446,9 +1446,9 @@ for.body.backedge: ; preds = %for.inc, %for.inc.t for.inc.thread: ; preds = %if.end18.i.i.i.i34, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 %add.i.pre-phi.i.i21 = phi i64 [ %add.i.i.i.i13, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 ], [ %.pre14.i.i36, %if.end18.i.i.i.i34 ] - %15 = phi ptr [ %.pre.i.i19, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 ], [ %call.i.i.i.i32, %if.end18.i.i.i.i34 ] - %.pre.i.i.i22 = phi i64 [ %10, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 ], [ %.pre5.pre.i.i.i35, %if.end18.i.i.i.i34 ] - %add.ptr.i.i.i.i23 = getelementptr inbounds i8, ptr %15, i64 %.pre.i.i.i22 + %14 = phi ptr [ %.pre.i.i19, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 ], [ %call.i.i.i.i32, %if.end18.i.i.i.i34 ] + %.pre.i.i.i22 = phi i64 [ %9, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i18 ], [ %.pre5.pre.i.i.i35, %if.end18.i.i.i.i34 ] + %add.ptr.i.i.i.i23 = getelementptr inbounds i8, ptr %14, i64 %.pre.i.i.i22 store i64 %add.i.pre-phi.i.i21, ptr %len1.i.i.i.i12, align 8 store i8 %conv, ptr %add.ptr.i.i.i.i23, align 1 %inc80 = add nuw nsw i64 %i.076, 1 @@ -1461,45 +1461,45 @@ land.lhs.true21: ; preds = %for.inc br i1 %tobool.not.i39, label %return, label %if.end.i40 if.end.i40: ; preds = %land.lhs.true21 - %16 = load ptr, ptr %child, align 8 - %cmp.i.i.i.i41 = icmp eq ptr %16, null + %15 = load ptr, ptr %child, align 8 + %cmp.i.i.i.i41 = icmp eq ptr %15, null br i1 %cmp.i.i.i.i41, label %return, label %if.end.i.i.i.i42 if.end.i.i.i.i42: ; preds = %if.end.i40 - %len1.i.i.i.i43 = getelementptr inbounds nuw i8, ptr %16, i64 8 - %17 = load i64, ptr %len1.i.i.i.i43, align 8 - %add.i.i.i.i44 = add i64 %17, 1 - %cmp3.i.i.i.i45 = icmp eq i64 %17, -1 + %len1.i.i.i.i43 = getelementptr inbounds nuw i8, ptr %15, i64 8 + %16 = load i64, ptr %len1.i.i.i.i43, align 8 + %add.i.i.i.i44 = add i64 %16, 1 + %cmp3.i.i.i.i45 = icmp eq i64 %16, -1 br i1 %cmp3.i.i.i.i45, label %return, label %if.end5.i.i.i.i46 if.end5.i.i.i.i46: ; preds = %if.end.i.i.i.i42 - %cap.i.i.i.i47 = getelementptr inbounds nuw i8, ptr %16, i64 16 - %18 = load i64, ptr %cap.i.i.i.i47, align 8 - %cmp6.i.i.i.i48 = icmp ugt i64 %add.i.i.i.i44, %18 + %cap.i.i.i.i47 = getelementptr inbounds nuw i8, ptr %15, i64 16 + %17 = load i64, ptr %cap.i.i.i.i47, align 8 + %cmp6.i.i.i.i48 = icmp ugt i64 %add.i.i.i.i44, %17 br i1 %cmp6.i.i.i.i48, label %if.then7.i.i.i.i56, label %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49 if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49: ; preds = %if.end5.i.i.i.i46 - %.pre.i.i50 = load ptr, ptr %16, align 8 + %.pre.i.i50 = load ptr, ptr %15, align 8 br label %CBB_add_u8.exit68 if.then7.i.i.i.i56: ; preds = %if.end5.i.i.i.i46 - %can_resize.i.i.i.i57 = getelementptr inbounds nuw i8, ptr %16, i64 24 - %19 = load i8, ptr %can_resize.i.i.i.i57, align 8 - %tobool.not.i.i.i.i58 = icmp eq i8 %19, 0 + %can_resize.i.i.i.i57 = getelementptr inbounds nuw i8, ptr %15, i64 24 + %18 = load i8, ptr %can_resize.i.i.i.i57, align 8 + %tobool.not.i.i.i.i58 = icmp eq i8 %18, 0 br i1 %tobool.not.i.i.i.i58, label %return, label %if.end10.i.i.i.i59 if.end10.i.i.i.i59: ; preds = %if.then7.i.i.i.i56 - %mul.i.i.i.i60 = shl i64 %18, 1 - %cmp12.i.i.i.i61 = icmp slt i64 %18, 0 - %20 = call i64 @llvm.umax.i64(i64 %mul.i.i.i.i60, i64 %add.i.i.i.i44) - %newcap.0.i.i.i.i62 = select i1 %cmp12.i.i.i.i61, i64 %add.i.i.i.i44, i64 %20 - %21 = load ptr, ptr %16, align 8 - %call.i.i.i.i63 = call ptr @realloc(ptr noundef %21, i64 noundef %newcap.0.i.i.i.i62) #15 + %mul.i.i.i.i60 = shl i64 %17, 1 + %cmp12.i.i.i.i61 = icmp slt i64 %17, 0 + %19 = call i64 @llvm.umax.i64(i64 %mul.i.i.i.i60, i64 %add.i.i.i.i44) + %newcap.0.i.i.i.i62 = select i1 %cmp12.i.i.i.i61, i64 %add.i.i.i.i44, i64 %19 + %20 = load ptr, ptr %15, align 8 + %call.i.i.i.i63 = call ptr @realloc(ptr noundef %20, i64 noundef %newcap.0.i.i.i.i62) #15 %cmp16.i.i.i.i64 = icmp eq ptr %call.i.i.i.i63, null br i1 %cmp16.i.i.i.i64, label %return, label %if.end18.i.i.i.i65 if.end18.i.i.i.i65: ; preds = %if.end10.i.i.i.i59 - store ptr %call.i.i.i.i63, ptr %16, align 8 + store ptr %call.i.i.i.i63, ptr %15, align 8 store i64 %newcap.0.i.i.i.i62, ptr %cap.i.i.i.i47, align 8 %.pre5.pre.i.i.i66 = load i64, ptr %len1.i.i.i.i43, align 8 %.pre14.i.i67 = add i64 %.pre5.pre.i.i.i66, 1 @@ -1507,9 +1507,9 @@ if.end18.i.i.i.i65: ; preds = %if.end10.i.i.i.i59 CBB_add_u8.exit68: ; preds = %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49, %if.end18.i.i.i.i65 %add.i.pre-phi.i.i52 = phi i64 [ %add.i.i.i.i44, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49 ], [ %.pre14.i.i67, %if.end18.i.i.i.i65 ] - %22 = phi ptr [ %.pre.i.i50, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49 ], [ %call.i.i.i.i63, %if.end18.i.i.i.i65 ] - %.pre.i.i.i53 = phi i64 [ %17, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49 ], [ %.pre5.pre.i.i.i66, %if.end18.i.i.i.i65 ] - %add.ptr.i.i.i.i54 = getelementptr inbounds i8, ptr %22, i64 %.pre.i.i.i53 + %21 = phi ptr [ %.pre.i.i50, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49 ], [ %call.i.i.i.i63, %if.end18.i.i.i.i65 ] + %.pre.i.i.i53 = phi i64 [ %16, %if.end5.i.i.cbb_buffer_add.exit_crit_edge.i.i49 ], [ %.pre5.pre.i.i.i66, %if.end18.i.i.i.i65 ] + %add.ptr.i.i.i.i54 = getelementptr inbounds i8, ptr %21, i64 %.pre.i.i.i53 store i64 %add.i.pre-phi.i.i52, ptr %len1.i.i.i.i43, align 8 store i8 0, ptr %add.ptr.i.i.i.i54, align 1 br label %if.end25 diff --git a/bench/libsodium/optimized/libaesni_la-aead_aes256gcm_aesni.ll b/bench/libsodium/optimized/libaesni_la-aead_aes256gcm_aesni.ll index 93e1a4b13a6..379d044c6de 100644 --- a/bench/libsodium/optimized/libaesni_la-aead_aes256gcm_aesni.ll +++ b/bench/libsodium/optimized/libaesni_la-aead_aes256gcm_aesni.ll @@ -1131,7 +1131,7 @@ for.body174.i: ; preds = %for.body174.i, %for %u.sroa.0.5653.i = phi <2 x i64> [ %160, %for.end167.i ], [ %xor.i17.i474.i, %for.body174.i ] %mul176.i = shl nuw nsw i64 %j.6656.i, 4 %add.ptr177.i = getelementptr i8, ptr %add.ptr159.i, i64 %mul176.i - %sub179.i = sub nuw nsw i64 3, %j.6656.i + %sub179.i = xor i64 %j.6656.i, 3 %arrayidx180.i = getelementptr [14 x <2 x i64>], ptr %hx170.i, i64 0, i64 %sub179.i %164 = load <2 x i64>, ptr %arrayidx180.i, align 16 %add.ptr177.val.i = load <16 x i8>, ptr %add.ptr177.i, align 1 @@ -2161,7 +2161,7 @@ for.body87.i: ; preds = %for.body87.i, %incr %u.sroa.0.3455.i = phi <2 x i64> [ %104, %incr_counters.exit286.i ], [ %xor.i17.i292.i, %for.body87.i ] %mul89.i = shl nuw nsw i64 %j.3458.i, 4 %add.ptr90.i = getelementptr i8, ptr %add.ptr82.i, i64 %mul89.i - %sub92.i = sub nuw nsw i64 3, %j.3458.i + %sub92.i = xor i64 %j.3458.i, 3 %arrayidx93.i = getelementptr [14 x <2 x i64>], ptr %hx83.i, i64 0, i64 %sub92.i %108 = load <2 x i64>, ptr %arrayidx93.i, align 16 %add.ptr90.val.i = load <16 x i8>, ptr %add.ptr90.i, align 1 @@ -2793,7 +2793,7 @@ for.body49: ; preds = %for.body41, %for.bo %u43.sroa.8.0180 = phi <2 x i64> [ %xor.i.i.i90, %for.body41 ], [ %xor.i.i98, %for.body49 ] %mul51 = shl nuw nsw i64 %j42.0183, 4 %add.ptr52 = getelementptr i8, ptr %add.ptr44, i64 %mul51 - %sub54 = sub nuw nsw i64 3, %j42.0183 + %sub54 = xor i64 %j42.0183, 3 %arrayidx55 = getelementptr [14 x <2 x i64>], ptr %hx45, i64 0, i64 %sub54 %47 = load <2 x i64>, ptr %arrayidx55, align 16 %add.ptr52.val = load <16 x i8>, ptr %add.ptr52, align 1 diff --git a/bench/lief/optimized/des.c.ll b/bench/lief/optimized/des.c.ll index 642583f809c..0c1275c833c 100644 --- a/bench/lief/optimized/des.c.ll +++ b/bench/lief/optimized/des.c.ll @@ -481,16 +481,17 @@ define hidden noundef i32 @mbedtls_des_setkey_dec(ptr nocapture noundef %0, ptr %9 = or disjoint i64 %indvars.iv, 1 %10 = getelementptr inbounds nuw [32 x i32], ptr %0, i64 0, i64 %9 %11 = load i32, ptr %10, align 4 - %12 = sub nuw nsw i64 31, %indvars.iv - %13 = getelementptr inbounds nuw [32 x i32], ptr %0, i64 0, i64 %12 - %14 = load i32, ptr %13, align 4 - store i32 %14, ptr %10, align 4 - store i32 %11, ptr %13, align 4 + %12 = and i64 %indvars.iv, 4294967294 + %13 = xor i64 %12, 31 + %14 = getelementptr inbounds nuw [32 x i32], ptr %0, i64 0, i64 %13 + %15 = load i32, ptr %14, align 4 + store i32 %15, ptr %10, align 4 + store i32 %11, ptr %14, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2 - %15 = icmp samesign ult i64 %indvars.iv, 14 - br i1 %15, label %3, label %16, !llvm.loop !9 + %16 = icmp samesign ult i64 %indvars.iv, 14 + br i1 %16, label %3, label %17, !llvm.loop !9 -16: ; preds = %3 +17: ; preds = %3 ret i32 0 } @@ -510,7 +511,7 @@ define hidden noundef i32 @mbedtls_des3_set2key_enc(ptr nocapture noundef %0, pt %9 = load i32, ptr %8, align 4 %10 = getelementptr inbounds nuw i32, ptr %3, i64 %indvars.iv.i store i32 %9, ptr %10, align 8 - %11 = sub nuw nsw i64 31, %indvars.iv.i + %11 = xor i64 %indvars.iv.i, 31 %12 = getelementptr inbounds nuw i32, ptr %0, i64 %11 %13 = load i32, ptr %12, align 4 %14 = or disjoint i64 %indvars.iv.i, 1 @@ -522,7 +523,7 @@ define hidden noundef i32 @mbedtls_des3_set2key_enc(ptr nocapture noundef %0, pt %19 = or disjoint i64 %indvars.iv.i, 32 %20 = getelementptr inbounds nuw i32, ptr %0, i64 %19 store i32 %18, ptr %20, align 4 - %21 = sub nuw nsw i64 63, %indvars.iv.i + %21 = xor i64 %indvars.iv.i, 63 %22 = getelementptr inbounds nuw i32, ptr %3, i64 %21 %23 = load i32, ptr %22, align 4 %24 = or disjoint i64 %indvars.iv.i, 33 @@ -567,7 +568,7 @@ define hidden noundef i32 @mbedtls_des3_set2key_dec(ptr nocapture noundef %0, pt %9 = load i32, ptr %8, align 8 %10 = getelementptr inbounds nuw i32, ptr %0, i64 %indvars.iv.i store i32 %9, ptr %10, align 4 - %11 = sub nuw nsw i64 31, %indvars.iv.i + %11 = xor i64 %indvars.iv.i, 31 %12 = getelementptr inbounds nuw i32, ptr %3, i64 %11 %13 = load i32, ptr %12, align 4 %14 = or disjoint i64 %indvars.iv.i, 1 @@ -579,7 +580,7 @@ define hidden noundef i32 @mbedtls_des3_set2key_dec(ptr nocapture noundef %0, pt %19 = or disjoint i64 %indvars.iv.i, 32 %20 = getelementptr inbounds nuw i32, ptr %3, i64 %19 store i32 %18, ptr %20, align 8 - %21 = sub nuw nsw i64 63, %indvars.iv.i + %21 = xor i64 %indvars.iv.i, 63 %22 = getelementptr inbounds nuw i32, ptr %0, i64 %21 %23 = load i32, ptr %22, align 4 %24 = or disjoint i64 %indvars.iv.i, 33 @@ -639,7 +640,7 @@ define hidden noundef i32 @mbedtls_des3_set3key_enc(ptr nocapture noundef %0, pt %21 = or disjoint i64 %indvars.iv.i, 32 %22 = getelementptr inbounds nuw i32, ptr %0, i64 %21 store i32 %20, ptr %22, align 4 - %23 = sub nuw nsw i64 63, %indvars.iv.i + %23 = xor i64 %indvars.iv.i, 63 %24 = getelementptr inbounds nuw i32, ptr %3, i64 %23 %25 = load i32, ptr %24, align 4 %26 = or disjoint i64 %indvars.iv.i, 33 @@ -651,7 +652,7 @@ define hidden noundef i32 @mbedtls_des3_set3key_enc(ptr nocapture noundef %0, pt %31 = or disjoint i64 %indvars.iv.i, 64 %32 = getelementptr inbounds nuw i32, ptr %3, i64 %31 store i32 %30, ptr %32, align 8 - %33 = sub nuw nsw i64 31, %indvars.iv.i + %33 = xor i64 %indvars.iv.i, 31 %34 = getelementptr inbounds nuw i32, ptr %0, i64 %33 %35 = load i32, ptr %34, align 4 %36 = or disjoint i64 %indvars.iv.i, 65 @@ -697,7 +698,7 @@ define hidden noundef i32 @mbedtls_des3_set3key_dec(ptr nocapture noundef %0, pt %21 = or disjoint i64 %indvars.iv.i, 32 %22 = getelementptr inbounds nuw i32, ptr %3, i64 %21 store i32 %20, ptr %22, align 8 - %23 = sub nuw nsw i64 63, %indvars.iv.i + %23 = xor i64 %indvars.iv.i, 63 %24 = getelementptr inbounds nuw i32, ptr %0, i64 %23 %25 = load i32, ptr %24, align 4 %26 = or disjoint i64 %indvars.iv.i, 33 @@ -709,7 +710,7 @@ define hidden noundef i32 @mbedtls_des3_set3key_dec(ptr nocapture noundef %0, pt %31 = or disjoint i64 %indvars.iv.i, 64 %32 = getelementptr inbounds nuw i32, ptr %0, i64 %31 store i32 %30, ptr %32, align 4 - %33 = sub nuw nsw i64 31, %indvars.iv.i + %33 = xor i64 %indvars.iv.i, 31 %34 = getelementptr inbounds nuw i32, ptr %3, i64 %33 %35 = load i32, ptr %34, align 4 %36 = or disjoint i64 %indvars.iv.i, 65 @@ -1674,7 +1675,7 @@ define hidden range(i32 0, 2) i32 @mbedtls_des_self_test(i32 noundef %0) local_u %30 = or disjoint i64 %indvars.iv.i, 1 %31 = getelementptr inbounds nuw [32 x i32], ptr %6, i64 0, i64 %30 %32 = load i32, ptr %31, align 4 - %33 = sub nuw nsw i64 31, %indvars.iv.i + %33 = xor i64 %indvars.iv.i, 31 %34 = getelementptr inbounds nuw [32 x i32], ptr %6, i64 0, i64 %33 %35 = load i32, ptr %34, align 4 store i32 %35, ptr %31, align 4 @@ -1700,7 +1701,7 @@ mbedtls_des_setkey_dec.exit.thread138: ; preds = %22 %41 = load i32, ptr %40, align 8 %42 = getelementptr inbounds nuw i32, ptr %7, i64 %indvars.iv.i.i store i32 %41, ptr %42, align 4 - %43 = sub nuw nsw i64 31, %indvars.iv.i.i + %43 = xor i64 %indvars.iv.i.i, 31 %44 = getelementptr inbounds nuw i32, ptr %5, i64 %43 %45 = load i32, ptr %44, align 4 %46 = or disjoint i64 %indvars.iv.i.i, 1 @@ -1712,7 +1713,7 @@ mbedtls_des_setkey_dec.exit.thread138: ; preds = %22 %51 = or disjoint i64 %indvars.iv.i.i, 32 %52 = getelementptr inbounds nuw i32, ptr %5, i64 %51 store i32 %50, ptr %52, align 8 - %53 = sub nuw nsw i64 63, %indvars.iv.i.i + %53 = xor i64 %indvars.iv.i.i, 63 %54 = getelementptr inbounds nuw i32, ptr %7, i64 %53 %55 = load i32, ptr %54, align 4 %56 = or disjoint i64 %indvars.iv.i.i, 33 @@ -1754,7 +1755,7 @@ mbedtls_des3_set2key_dec.exit: ; preds = %38 %73 = load i32, ptr %72, align 4 %74 = getelementptr inbounds nuw i32, ptr %4, i64 %indvars.iv.i.i83 store i32 %73, ptr %74, align 8 - %75 = sub nuw nsw i64 31, %indvars.iv.i.i83 + %75 = xor i64 %indvars.iv.i.i83, 31 %76 = getelementptr inbounds nuw i32, ptr %7, i64 %75 %77 = load i32, ptr %76, align 4 %78 = or disjoint i64 %indvars.iv.i.i83, 1 @@ -1766,7 +1767,7 @@ mbedtls_des3_set2key_dec.exit: ; preds = %38 %83 = or disjoint i64 %indvars.iv.i.i83, 32 %84 = getelementptr inbounds nuw i32, ptr %7, i64 %83 store i32 %82, ptr %84, align 4 - %85 = sub nuw nsw i64 63, %indvars.iv.i.i83 + %85 = xor i64 %indvars.iv.i.i83, 63 %86 = getelementptr inbounds nuw i32, ptr %4, i64 %85 %87 = load i32, ptr %86, align 4 %88 = or disjoint i64 %indvars.iv.i.i83, 33 @@ -1922,7 +1923,7 @@ mbedtls_des_setkey_dec.exit.split: ; preds = %mbedtls_des_setkey_ %141 = or disjoint i64 %indvars.iv.i85, 1 %142 = getelementptr inbounds nuw [32 x i32], ptr %6, i64 0, i64 %141 %143 = load i32, ptr %142, align 4 - %144 = sub nuw nsw i64 31, %indvars.iv.i85 + %144 = xor i64 %indvars.iv.i85, 31 %145 = getelementptr inbounds nuw [32 x i32], ptr %6, i64 0, i64 %144 %146 = load i32, ptr %145, align 4 store i32 %146, ptr %142, align 4 @@ -1948,7 +1949,7 @@ mbedtls_des_setkey_dec.exit.split: ; preds = %mbedtls_des_setkey_ %153 = load i32, ptr %152, align 8 %154 = getelementptr inbounds nuw i32, ptr %7, i64 %indvars.iv.i.i88 store i32 %153, ptr %154, align 4 - %155 = sub nuw nsw i64 31, %indvars.iv.i.i88 + %155 = xor i64 %indvars.iv.i.i88, 31 %156 = getelementptr inbounds nuw i32, ptr %3, i64 %155 %157 = load i32, ptr %156, align 4 %158 = or disjoint i64 %indvars.iv.i.i88, 1 @@ -1960,7 +1961,7 @@ mbedtls_des_setkey_dec.exit.split: ; preds = %mbedtls_des_setkey_ %163 = or disjoint i64 %indvars.iv.i.i88, 32 %164 = getelementptr inbounds nuw i32, ptr %3, i64 %163 store i32 %162, ptr %164, align 8 - %165 = sub nuw nsw i64 63, %indvars.iv.i.i88 + %165 = xor i64 %indvars.iv.i.i88, 63 %166 = getelementptr inbounds nuw i32, ptr %7, i64 %165 %167 = load i32, ptr %166, align 4 %168 = or disjoint i64 %indvars.iv.i.i88, 33 @@ -2002,7 +2003,7 @@ mbedtls_des3_set2key_dec.exit90: ; preds = %150 %185 = load i32, ptr %184, align 4 %186 = getelementptr inbounds nuw i32, ptr %2, i64 %indvars.iv.i.i91 store i32 %185, ptr %186, align 8 - %187 = sub nuw nsw i64 31, %indvars.iv.i.i91 + %187 = xor i64 %indvars.iv.i.i91, 31 %188 = getelementptr inbounds nuw i32, ptr %7, i64 %187 %189 = load i32, ptr %188, align 4 %190 = or disjoint i64 %indvars.iv.i.i91, 1 @@ -2014,7 +2015,7 @@ mbedtls_des3_set2key_dec.exit90: ; preds = %150 %195 = or disjoint i64 %indvars.iv.i.i91, 32 %196 = getelementptr inbounds nuw i32, ptr %7, i64 %195 store i32 %194, ptr %196, align 4 - %197 = sub nuw nsw i64 63, %indvars.iv.i.i91 + %197 = xor i64 %indvars.iv.i.i91, 63 %198 = getelementptr inbounds nuw i32, ptr %2, i64 %197 %199 = load i32, ptr %198, align 4 %200 = or disjoint i64 %indvars.iv.i.i91, 33 diff --git a/bench/llvm/optimized/AsmParser.cpp.ll b/bench/llvm/optimized/AsmParser.cpp.ll index 74292236630..0c54ae839c4 100644 --- a/bench/llvm/optimized/AsmParser.cpp.ll +++ b/bench/llvm/optimized/AsmParser.cpp.ll @@ -13785,7 +13785,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir %14 = getelementptr inbounds nuw i8, ptr %13, i64 264 %15 = load ptr, ptr %14, align 8 %16 = tail call noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(928) %0) #28 - br i1 %16, label %147, label %17 + br i1 %16, label %146, label %17 17: ; preds = %2 %18 = load ptr, ptr %0, align 8 @@ -13807,7 +13807,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir store ptr @.str.249, ptr %5, align 8 store i8 3, ptr %28, align 8 %30 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser8TokErrorERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr noundef nonnull align 8 dereferenceable(34) %5, ptr null, ptr null) #28 - br label %147 + br label %146 31: ; preds = %17 %32 = load ptr, ptr %0, align 8 @@ -13833,7 +13833,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir store i8 3, ptr %43, align 8 %45 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser10parseTokenENS_8AsmToken9TokenKindERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(34) %0, i32 noundef 26, ptr noundef nonnull align 8 dereferenceable(34) %3) #28 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) - br i1 %45, label %147, label %46 + br i1 %45, label %146, label %46 46: ; preds = %31 %47 = load ptr, ptr %0, align 8 @@ -13845,7 +13845,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir %53 = getelementptr inbounds nuw i8, ptr %52, i64 256 %54 = load ptr, ptr %53, align 8 %55 = call noundef zeroext i1 %54(ptr noundef nonnull align 8 dereferenceable(928) %0, ptr noundef nonnull align 8 dereferenceable(8) %7) #28 - br i1 %55, label %147, label %56 + br i1 %55, label %146, label %56 56: ; preds = %46 store i64 0, ptr %8, align 8 @@ -13857,7 +13857,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir %62 = load ptr, ptr %61, align 8 %63 = load i32, ptr %62, align 8 %64 = icmp eq i32 %63, 26 - br i1 %64, label %65, label %105 + br i1 %64, label %65, label %104 65: ; preds = %56 %66 = load ptr, ptr %0, align 8 @@ -13873,7 +13873,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir %76 = getelementptr inbounds nuw i8, ptr %75, i64 256 %77 = load ptr, ptr %76, align 8 %78 = call noundef zeroext i1 %77(ptr noundef nonnull align 8 dereferenceable(928) %0, ptr noundef nonnull align 8 dereferenceable(8) %8) #28 - br i1 %78, label %147, label %79 + br i1 %78, label %146, label %79 79: ; preds = %65 %80 = getelementptr inbounds nuw i8, ptr %0, i64 184 @@ -13891,7 +13891,7 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir store ptr @.str.250, ptr %9, align 8 store i8 3, ptr %86, align 8 %88 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser5ErrorENS_5SMLocERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr %74, ptr noundef nonnull align 8 dereferenceable(34) %9, ptr null, ptr null) #28 - br label %147 + br label %146 89: ; preds = %79 br i1 %1, label %94, label %90 @@ -13900,11 +13900,11 @@ define internal fastcc noundef zeroext i1 @_ZN12_GLOBAL__N_19AsmParser18parseDir %91 = getelementptr inbounds nuw i8, ptr %81, i64 353 %92 = load i8, ptr %91, align 1 %93 = trunc i8 %92 to i1 - br i1 %93, label %95, label %105 + br i1 %93, label %95, label %104 94: ; preds = %89 %.old = icmp eq i32 %83, 1 - br i1 %.old, label %95, label %105 + br i1 %.old, label %95, label %104 95: ; preds = %94, %90 %96 = load i64, ptr %8, align 8 @@ -13919,96 +13919,95 @@ _ZN4llvm13isPowerOf2_64Em.exit.thread: ; preds = %95 store ptr @.str.238, ptr %10, align 8 store i8 3, ptr %98, align 8 %100 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser5ErrorENS_5SMLocERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr %74, ptr noundef nonnull align 8 dereferenceable(34) %10, ptr null, ptr null) #28 - br label %147 + br label %146 101: ; preds = %95 %102 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %96, i1 false) - %103 = sub nsw i64 63, %102 - %104 = and i64 %103, 4294967295 - store i64 %104, ptr %8, align 8 - br label %105 - -105: ; preds = %90, %94, %101, %56 - %106 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser8parseEOLEv(ptr noundef nonnull align 8 dereferenceable(34) %0) #28 - br i1 %106, label %147, label %107 - -107: ; preds = %105 - %108 = load i64, ptr %7, align 8 - %109 = icmp slt i64 %108, 0 - br i1 %109, label %110, label %114 - -110: ; preds = %107 - %111 = getelementptr inbounds nuw i8, ptr %11, i64 32 - %112 = getelementptr inbounds nuw i8, ptr %11, i64 33 - store i8 1, ptr %112, align 1 + %103 = xor i64 %102, 63 + store i64 %103, ptr %8, align 8 + br label %104 + +104: ; preds = %90, %94, %101, %56 + %105 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser8parseEOLEv(ptr noundef nonnull align 8 dereferenceable(34) %0) #28 + br i1 %105, label %146, label %106 + +106: ; preds = %104 + %107 = load i64, ptr %7, align 8 + %108 = icmp slt i64 %107, 0 + br i1 %108, label %109, label %113 + +109: ; preds = %106 + %110 = getelementptr inbounds nuw i8, ptr %11, i64 32 + %111 = getelementptr inbounds nuw i8, ptr %11, i64 33 + store i8 1, ptr %111, align 1 store ptr @.str.251, ptr %11, align 8 - store i8 3, ptr %111, align 8 - %113 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser5ErrorENS_5SMLocERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr %51, ptr noundef nonnull align 8 dereferenceable(34) %11, ptr null, ptr null) #28 - br label %147 - -114: ; preds = %107 - %115 = getelementptr inbounds nuw i8, ptr %42, i64 8 - %116 = load i64, ptr %115, align 8 - %117 = and i64 %116, 4 - %.not.i = icmp eq i64 %117, 0 - br i1 %.not.i, label %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit, label %118 - -118: ; preds = %114 - %119 = and i64 %116, 28672 - %120 = icmp eq i64 %119, 8192 - br i1 %120, label %121, label %124 - -121: ; preds = %118 - %122 = getelementptr inbounds nuw i8, ptr %42, i64 24 - store ptr null, ptr %122, align 8 - %123 = and i64 %116, -28673 - br label %124 - -124: ; preds = %121, %118 - %125 = phi i64 [ %123, %121 ], [ %116, %118 ] + store i8 3, ptr %110, align 8 + %112 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser5ErrorENS_5SMLocERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr %51, ptr noundef nonnull align 8 dereferenceable(34) %11, ptr null, ptr null) #28 + br label %146 + +113: ; preds = %106 + %114 = getelementptr inbounds nuw i8, ptr %42, i64 8 + %115 = load i64, ptr %114, align 8 + %116 = and i64 %115, 4 + %.not.i = icmp eq i64 %116, 0 + br i1 %.not.i, label %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit, label %117 + +117: ; preds = %113 + %118 = and i64 %115, 28672 + %119 = icmp eq i64 %118, 8192 + br i1 %119, label %120, label %123 + +120: ; preds = %117 + %121 = getelementptr inbounds nuw i8, ptr %42, i64 24 + store ptr null, ptr %121, align 8 + %122 = and i64 %115, -28673 + br label %123 + +123: ; preds = %120, %117 + %124 = phi i64 [ %122, %120 ], [ %115, %117 ] store ptr null, ptr %42, align 8 - %126 = and i64 %125, -5 - store i64 %126, ptr %115, align 8 + %125 = and i64 %124, -5 + store i64 %125, ptr %114, align 8 br label %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit -_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit: ; preds = %114, %124 - %127 = call noundef zeroext i1 @_ZNK4llvm8MCSymbol11isUndefinedEb(ptr noundef nonnull align 8 dereferenceable(32) %42, i1 noundef zeroext true) - br i1 %127, label %132, label %128 +_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit: ; preds = %113, %123 + %126 = call noundef zeroext i1 @_ZNK4llvm8MCSymbol11isUndefinedEb(ptr noundef nonnull align 8 dereferenceable(32) %42, i1 noundef zeroext true) + br i1 %126, label %131, label %127 -128: ; preds = %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit - %129 = getelementptr inbounds nuw i8, ptr %12, i64 32 - %130 = getelementptr inbounds nuw i8, ptr %12, i64 33 - store i8 1, ptr %130, align 1 +127: ; preds = %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit + %128 = getelementptr inbounds nuw i8, ptr %12, i64 32 + %129 = getelementptr inbounds nuw i8, ptr %12, i64 33 + store i8 1, ptr %129, align 1 store ptr @.str.252, ptr %12, align 8 - store i8 3, ptr %129, align 8 - %131 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser5ErrorENS_5SMLocERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr %22, ptr noundef nonnull align 8 dereferenceable(34) %12, ptr null, ptr null) #28 - br label %147 + store i8 3, ptr %128, align 8 + %130 = call noundef zeroext i1 @_ZN4llvm11MCAsmParser5ErrorENS_5SMLocERKNS_5TwineENS_7SMRangeE(ptr noundef nonnull align 8 dereferenceable(34) %0, ptr %22, ptr noundef nonnull align 8 dereferenceable(34) %12, ptr null, ptr null) #28 + br label %146 -132: ; preds = %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit - %133 = load ptr, ptr %0, align 8 - %134 = getelementptr inbounds nuw i8, ptr %133, i64 56 - %135 = load ptr, ptr %134, align 8 - %136 = call noundef nonnull align 8 dereferenceable(288) ptr %135(ptr noundef nonnull align 8 dereferenceable(928) %0) #28 - %137 = load i64, ptr %7, align 8 - %138 = load i64, ptr %8, align 8 - %139 = trunc i64 %138 to i8 - %140 = load ptr, ptr %136, align 8 - br i1 %1, label %141, label %144 - -141: ; preds = %132 - %142 = getelementptr inbounds nuw i8, ptr %140, i64 472 - %143 = load ptr, ptr %142, align 8 - call void %143(ptr noundef nonnull align 8 dereferenceable(288) %136, ptr noundef nonnull %42, i64 noundef %137, i8 %139) #28 - br label %147 +131: ; preds = %_ZN4llvm8MCSymbol18redefineIfPossibleEv.exit + %132 = load ptr, ptr %0, align 8 + %133 = getelementptr inbounds nuw i8, ptr %132, i64 56 + %134 = load ptr, ptr %133, align 8 + %135 = call noundef nonnull align 8 dereferenceable(288) ptr %134(ptr noundef nonnull align 8 dereferenceable(928) %0) #28 + %136 = load i64, ptr %7, align 8 + %137 = load i64, ptr %8, align 8 + %138 = trunc i64 %137 to i8 + %139 = load ptr, ptr %135, align 8 + br i1 %1, label %140, label %143 + +140: ; preds = %131 + %141 = getelementptr inbounds nuw i8, ptr %139, i64 472 + %142 = load ptr, ptr %141, align 8 + call void %142(ptr noundef nonnull align 8 dereferenceable(288) %135, ptr noundef nonnull %42, i64 noundef %136, i8 %138) #28 + br label %146 -144: ; preds = %132 - %145 = getelementptr inbounds nuw i8, ptr %140, i64 464 - %146 = load ptr, ptr %145, align 8 - call void %146(ptr noundef nonnull align 8 dereferenceable(288) %136, ptr noundef nonnull %42, i64 noundef %137, i8 %139) #28 - br label %147 +143: ; preds = %131 + %144 = getelementptr inbounds nuw i8, ptr %139, i64 464 + %145 = load ptr, ptr %144, align 8 + call void %145(ptr noundef nonnull align 8 dereferenceable(288) %135, ptr noundef nonnull %42, i64 noundef %136, i8 %138) #28 + br label %146 -147: ; preds = %105, %65, %46, %31, %2, %144, %141, %128, %110, %_ZN4llvm13isPowerOf2_64Em.exit.thread, %85, %27 - %.0 = phi i1 [ %30, %27 ], [ %88, %85 ], [ %113, %110 ], [ false, %141 ], [ false, %144 ], [ %131, %128 ], [ %100, %_ZN4llvm13isPowerOf2_64Em.exit.thread ], [ true, %2 ], [ true, %31 ], [ true, %46 ], [ true, %65 ], [ true, %105 ] +146: ; preds = %104, %65, %46, %31, %2, %143, %140, %127, %109, %_ZN4llvm13isPowerOf2_64Em.exit.thread, %85, %27 + %.0 = phi i1 [ %30, %27 ], [ %88, %85 ], [ %112, %109 ], [ false, %140 ], [ false, %143 ], [ %130, %127 ], [ %100, %_ZN4llvm13isPowerOf2_64Em.exit.thread ], [ true, %2 ], [ true, %31 ], [ true, %46 ], [ true, %65 ], [ true, %104 ] ret i1 %.0 } @@ -22466,7 +22465,7 @@ _ZN4llvm13isPowerOf2_64Em.exit.thread: ; preds = %28 store i32 5, ptr %10, align 4 %38 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %30, i1 false) %39 = trunc nuw nsw i64 %38 to i32 - %40 = sub nuw nsw i32 63, %39 + %40 = xor i32 %39, 63 store i32 %40, ptr %11, align 4 %41 = call noundef nonnull align 8 dereferenceable(121) ptr @_ZN4llvm15SmallVectorImplINS_10AsmRewriteEE12emplace_backIJNS_14AsmRewriteKindERNS_5SMLocEijEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11) br label %42 diff --git a/bench/llvm/optimized/LLParser.cpp.ll b/bench/llvm/optimized/LLParser.cpp.ll index 6e21c7c3df8..2ba6f636d4e 100644 --- a/bench/llvm/optimized/LLParser.cpp.ll +++ b/bench/llvm/optimized/LLParser.cpp.ll @@ -16601,9 +16601,7 @@ _ZN4llvm13isPowerOf2_64Em.exit.thread: ; preds = %44 55: ; preds = %49 %56 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %.01922, i1 false) %57 = trunc nuw nsw i64 %56 to i16 - %58 = sub nsw i16 63, %57 - %.sroa.016.0.insert.ext = and i16 %58, 255 - %.sroa.016.0.insert.insert = or disjoint i16 %.sroa.016.0.insert.ext, 256 + %.sroa.016.0.insert.insert = xor i16 %57, 319 store i16 %.sroa.016.0.insert.insert, ptr %1, align 1 br label %_ZN4llvm8LLParser12EatIfPresentENS_5lltok4KindE.exit diff --git a/bench/llvm/optimized/X86ISelLowering.cpp.ll b/bench/llvm/optimized/X86ISelLowering.cpp.ll index 6c24b5680dd..06c986b200b 100644 --- a/bench/llvm/optimized/X86ISelLowering.cpp.ll +++ b/bench/llvm/optimized/X86ISelLowering.cpp.ll @@ -310783,35 +310783,34 @@ define internal fastcc { ptr, i32 } @_ZL17combineMulSpecialmPN4llvm6SDNodeERNS_1 66: ; preds = %62 %67 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %60, i1 false) - %68 = sub nsw i64 63, %67 + %68 = xor i64 %67, 63 %69 = getelementptr inbounds nuw i8, ptr %1, i64 40 %70 = load ptr, ptr %69, align 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %70, i64 16, i1 false) - %71 = and i64 %68, 4294967295 - %72 = call { ptr, i32 } @_ZN4llvm12SelectionDAG11getConstantEmRKNS_5SDLocENS_3EVTEbb(ptr noundef nonnull align 8 dereferenceable(904) %2, i64 noundef %71, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 5, ptr null, i1 noundef zeroext false, i1 noundef zeroext false) #35 - %.fca.0.extract22 = extractvalue { ptr, i32 } %72, 0 - %.fca.1.extract23 = extractvalue { ptr, i32 } %72, 1 + %71 = call { ptr, i32 } @_ZN4llvm12SelectionDAG11getConstantEmRKNS_5SDLocENS_3EVTEbb(ptr noundef nonnull align 8 dereferenceable(904) %2, i64 noundef %68, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 5, ptr null, i1 noundef zeroext false, i1 noundef zeroext false) #35 + %.fca.0.extract22 = extractvalue { ptr, i32 } %71, 0 + %.fca.1.extract23 = extractvalue { ptr, i32 } %71, 1 store ptr %.fca.0.extract22, ptr %16, align 8 %.sroa.225.0..sroa_idx = getelementptr inbounds nuw i8, ptr %16, i64 8 store i32 %.fca.1.extract23, ptr %.sroa.225.0..sroa_idx, align 8 - %73 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %2, i32 noundef 189, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 %3, ptr %4, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %15, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %16) #35 - %.fca.0.extract18 = extractvalue { ptr, i32 } %73, 0 - %.fca.1.extract19 = extractvalue { ptr, i32 } %73, 1 + %72 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %2, i32 noundef 189, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 %3, ptr %4, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %15, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %16) #35 + %.fca.0.extract18 = extractvalue { ptr, i32 } %72, 0 + %.fca.1.extract19 = extractvalue { ptr, i32 } %72, 1 %.sroa.013.0.copyload = load i16, ptr %7, align 8 %.sroa.215.0.copyload = load ptr, ptr %21, align 8 - %74 = load ptr, ptr %8, align 8 - %75 = getelementptr inbounds nuw i8, ptr %74, i64 40 - %76 = load ptr, ptr %75, align 8 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %76, i64 16, i1 false) - %77 = call { ptr, i32 } @_ZN4llvm12SelectionDAG11getConstantEmRKNS_5SDLocENS_3EVTEbb(ptr noundef nonnull align 8 dereferenceable(904) %2, i64 noundef %63, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 5, ptr null, i1 noundef zeroext false, i1 noundef zeroext false) #35 - %.fca.0.extract9 = extractvalue { ptr, i32 } %77, 0 - %.fca.1.extract10 = extractvalue { ptr, i32 } %77, 1 + %73 = load ptr, ptr %8, align 8 + %74 = getelementptr inbounds nuw i8, ptr %73, i64 40 + %75 = load ptr, ptr %74, align 8 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %75, i64 16, i1 false) + %76 = call { ptr, i32 } @_ZN4llvm12SelectionDAG11getConstantEmRKNS_5SDLocENS_3EVTEbb(ptr noundef nonnull align 8 dereferenceable(904) %2, i64 noundef %63, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 5, ptr null, i1 noundef zeroext false, i1 noundef zeroext false) #35 + %.fca.0.extract9 = extractvalue { ptr, i32 } %76, 0 + %.fca.1.extract10 = extractvalue { ptr, i32 } %76, 1 store ptr %.fca.0.extract9, ptr %18, align 8 %.sroa.212.0..sroa_idx = getelementptr inbounds nuw i8, ptr %18, i64 8 store i32 %.fca.1.extract10, ptr %.sroa.212.0..sroa_idx, align 8 - %78 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %2, i32 noundef 189, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 %.sroa.013.0.copyload, ptr %.sroa.215.0.copyload, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %17, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %18) #35 - %.fca.0.extract5 = extractvalue { ptr, i32 } %78, 0 - %.fca.1.extract6 = extractvalue { ptr, i32 } %78, 1 + %77 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %2, i32 noundef 189, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 %.sroa.013.0.copyload, ptr %.sroa.215.0.copyload, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %17, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %18) #35 + %.fca.0.extract5 = extractvalue { ptr, i32 } %77, 0 + %.fca.1.extract6 = extractvalue { ptr, i32 } %77, 1 %.sroa.02.0.copyload = load i16, ptr %7, align 8 %.sroa.24.0.copyload = load ptr, ptr %21, align 8 store ptr %.fca.0.extract18, ptr %19, align 8 @@ -310820,9 +310819,9 @@ define internal fastcc { ptr, i32 } @_ZL17combineMulSpecialmPN4llvm6SDNodeERNS_1 store ptr %.fca.0.extract5, ptr %20, align 8 %.sroa.217.0..sroa_idx = getelementptr inbounds nuw i8, ptr %20, i64 8 store i32 %.fca.1.extract6, ptr %.sroa.217.0..sroa_idx, align 8 - %79 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %2, i32 noundef 56, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 %.sroa.02.0.copyload, ptr %.sroa.24.0.copyload, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %19, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %20) #35 - %.fca.0.extract = extractvalue { ptr, i32 } %79, 0 - %.fca.1.extract = extractvalue { ptr, i32 } %79, 1 + %78 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %2, i32 noundef 56, ptr noundef nonnull align 8 dereferenceable(12) %5, i16 %.sroa.02.0.copyload, ptr %.sroa.24.0.copyload, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %19, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %20) #35 + %.fca.0.extract = extractvalue { ptr, i32 } %78, 0 + %.fca.1.extract = extractvalue { ptr, i32 } %78, 1 br label %_ZN4llvm13isPowerOf2_64Em.exit.thread _ZN4llvm13isPowerOf2_64Em.exit.thread: ; preds = %58, %62, %66, %53, %51, %49, %47, %45, %43, %41, %39, %34, %32, %30, %28 @@ -317172,9 +317171,9 @@ _ZN4llvm5SDLocC2ENS_7SDValueE.exit: ; preds = %17, %20 store ptr %.fca.0.extract29, ptr %9, align 8 %.sroa.3.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 8 store i32 %.fca.1.extract30, ptr %.sroa.3.0..sroa_idx, align 8 - %43 = xor i64 %indvars.iv, 1 - %44 = load ptr, ptr %31, align 8 - %45 = getelementptr inbounds nuw %"class.llvm::SDUse", ptr %44, i64 %43 + %43 = load ptr, ptr %31, align 8 + %44 = xor i64 %indvars.iv, 1 + %45 = getelementptr inbounds nuw %"class.llvm::SDUse", ptr %43, i64 %44 %46 = call { ptr, i32 } @_ZN4llvm12SelectionDAG7getNodeEjRKNS_5SDLocENS_3EVTENS_7SDValueES5_(ptr noundef nonnull align 8 dereferenceable(904) %1, i32 noundef %38, ptr noundef nonnull align 8 dereferenceable(12) %8, i16 %.sroa.0.0.copyload.i.i, ptr %.sroa.21.0.copyload.i.i, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %9, ptr noundef nonnull byval(%"class.llvm::SDValue") align 8 %45) #35 %.fca.0.extract23 = extractvalue { ptr, i32 } %46, 0 %.fca.1.extract24 = extractvalue { ptr, i32 } %46, 1 diff --git a/bench/luau/optimized/lbitlib.cpp.ll b/bench/luau/optimized/lbitlib.cpp.ll index 3a620e876ba..a74a628af35 100644 --- a/bench/luau/optimized/lbitlib.cpp.ll +++ b/bench/luau/optimized/lbitlib.cpp.ll @@ -339,20 +339,21 @@ define internal noundef i32 @_ZL9b_countlzP9lua_State(ptr noundef %0) #0 { %2 = tail call noundef i32 @_Z18luaL_checkunsignedP9lua_Statei(ptr noundef %0, i32 noundef 1) br label %3 -3: ; preds = %1, %6 - %.08 = phi i32 [ 0, %1 ], [ %7, %6 ] - %4 = lshr exact i32 -2147483648, %.08 - %5 = and i32 %4, %2 - %.not = icmp eq i32 %5, 0 - br i1 %.not, label %6, label %8 - -6: ; preds = %3 - %7 = add nuw nsw i32 %.08, 1 - %exitcond.not = icmp eq i32 %7, 32 - br i1 %exitcond.not, label %8, label %3, !llvm.loop !9 - -8: ; preds = %3, %6 - %.07 = phi i32 [ 32, %6 ], [ %.08, %3 ] +3: ; preds = %1, %7 + %.08 = phi i32 [ 0, %1 ], [ %8, %7 ] + %4 = xor i32 %.08, 31 + %5 = shl nuw i32 1, %4 + %6 = and i32 %5, %2 + %.not = icmp eq i32 %6, 0 + br i1 %.not, label %7, label %9 + +7: ; preds = %3 + %8 = add nuw nsw i32 %.08, 1 + %exitcond.not = icmp eq i32 %8, 32 + br i1 %exitcond.not, label %9, label %3, !llvm.loop !9 + +9: ; preds = %3, %7 + %.07 = phi i32 [ 32, %7 ], [ %.08, %3 ] tail call void @_Z16lua_pushunsignedP9lua_Statej(ptr noundef %0, i32 noundef %.07) ret i32 1 } diff --git a/bench/lvgl/optimized/lv_draw_sw_transform.ll b/bench/lvgl/optimized/lv_draw_sw_transform.ll index d57bd90d7ea..11bd15ab17d 100644 --- a/bench/lvgl/optimized/lv_draw_sw_transform.ll +++ b/bench/lvgl/optimized/lv_draw_sw_transform.ll @@ -456,13 +456,13 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % %308 = and i32 %296, 255 %309 = icmp samesign ult i32 %307, 128 %310 = shl nuw nsw i32 %307, 1 - %311 = sub nuw nsw i32 254, %310 + %311 = xor i32 %310, 254 %312 = add nsw i32 %310, -256 %.0103.i = select i1 %309, i32 %311, i32 %312 %.0101.i = select i1 %309, i32 -1, i32 1 %313 = icmp samesign ult i32 %308, 128 %314 = shl nuw nsw i32 %308, 1 - %315 = sub nuw nsw i32 254, %314 + %315 = xor i32 %314, 254 %316 = add nsw i32 %314, -256 %.0102.i = select i1 %313, i32 %315, i32 %316 %.0100.i = select i1 %313, i32 -1, i32 1 @@ -548,10 +548,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 365: ; preds = %362 %366 = zext i8 %321 to i32 - %367 = sub nuw nsw i32 255, %.0103.i + %367 = xor i32 %.0103.i, 255 %368 = mul nuw nsw i32 %367, %366 %369 = lshr i32 %368, 8 - %370 = trunc nuw i32 %369 to i8 + %370 = trunc i32 %369 to i8 store i8 %370, ptr %322, align 1, !tbaa !25 br label %380 @@ -566,10 +566,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 374: ; preds = %371 %375 = zext i8 %321 to i32 - %376 = sub nuw nsw i32 255, %.0102.i + %376 = xor i32 %.0102.i, 255 %377 = mul nuw nsw i32 %376, %375 %378 = lshr i32 %377, 8 - %379 = trunc nuw i32 %378 to i8 + %379 = trunc i32 %378 to i8 store i8 %379, ptr %322, align 1, !tbaa !25 br label %380 @@ -612,12 +612,12 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % %399 = and i32 %385, 255 %400 = and i32 %388, 255 %401 = icmp samesign ult i32 %399, 128 - %402 = sub nuw nsw i32 127, %399 + %402 = xor i32 %399, 127 %403 = add nsw i32 %399, -128 %.0149.i = select i1 %401, i32 -1, i32 1 %.0147.i = select i1 %401, i32 %402, i32 %403 %404 = icmp samesign ult i32 %400, 128 - %405 = sub nuw nsw i32 127, %400 + %405 = xor i32 %400, 127 %406 = add nsw i32 %400, -128 %.0150.i = select i1 %404, i32 %405, i32 %406 %.0148.i = select i1 %404, i32 -1, i32 1 @@ -664,10 +664,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 430: ; preds = %422 %431 = getelementptr inbounds nuw i8, ptr %413, i64 3 - %432 = sub nuw nsw i32 255, %.0150.i + %432 = xor i32 %.0150.i, 255 %433 = mul nuw nsw i32 %415, %432 %434 = lshr i32 %433, 8 - %435 = trunc nuw i32 %434 to i8 + %435 = trunc i32 %434 to i8 store i8 %435, ptr %431, align 1, !tbaa !29 br label %452 @@ -688,7 +688,7 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 441: ; preds = %438 %442 = mul nuw nsw i32 %.0150.i, %428 %443 = zext i8 %440 to i32 - %444 = sub nuw nsw i32 255, %.0150.i + %444 = xor i32 %.0150.i, 255 %445 = mul nuw nsw i32 %444, %443 %446 = add nuw nsw i32 %445, %442 %447 = lshr i32 %446, 8 @@ -697,7 +697,7 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % br label %449 449: ; preds = %441, %438 - %.sroa.5.0.insert.ext17.i = shl nsw i32 %.0150.i, 24 + %.sroa.5.0.insert.ext17.i = shl i32 %.0150.i, 24 %.sroa.011.0.insert.insert15.i = or disjoint i32 %.sroa.5.0.insert.ext17.i, %.sroa.011.0.insert.ext.i %450 = load i32, ptr %413, align 1 %451 = tail call i32 @lv_color_mix32(i32 %.sroa.011.0.insert.insert15.i, i32 %450) #3 @@ -713,10 +713,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % %456 = getelementptr inbounds nuw i8, ptr %413, i64 3 %457 = load i8, ptr %456, align 1, !tbaa !29 %458 = zext i8 %457 to i32 - %459 = sub nuw nsw i32 255, %.0147.i + %459 = xor i32 %.0147.i, 255 %460 = mul nuw nsw i32 %459, %458 %461 = lshr i32 %460, 8 - %462 = trunc nuw i32 %461 to i8 + %462 = trunc i32 %461 to i8 store i8 %462, ptr %456, align 1, !tbaa !29 br label %498 @@ -737,7 +737,7 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 469: ; preds = %466 %470 = mul nuw nsw i32 %.0147.i, %453 %471 = zext i8 %468 to i32 - %472 = sub nuw nsw i32 255, %.0147.i + %472 = xor i32 %.0147.i, 255 %473 = mul nuw nsw i32 %472, %471 %474 = add nuw nsw i32 %473, %470 %475 = lshr i32 %474, 8 @@ -746,7 +746,7 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % br label %477 477: ; preds = %469, %466 - %.sroa.528.0.insert.ext30.i = shl nsw i32 %.0147.i, 24 + %.sroa.528.0.insert.ext30.i = shl i32 %.0147.i, 24 %.sroa.023.0.insert.insert27.i = or disjoint i32 %.sroa.528.0.insert.ext30.i, %.sroa.023.0.insert.ext.i %478 = load i32, ptr %413, align 1 %479 = tail call i32 @lv_color_mix32(i32 %.sroa.023.0.insert.insert27.i, i32 %478) #3 @@ -764,10 +764,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 483: ; preds = %480 %484 = getelementptr inbounds nuw i8, ptr %413, i64 3 - %485 = sub nuw nsw i32 127, %.0147.i + %485 = xor i32 %.0147.i, 127 %486 = mul nuw nsw i32 %415, %485 %487 = lshr i32 %486, 7 - %488 = trunc nuw i32 %487 to i8 + %488 = trunc i32 %487 to i8 store i8 %488, ptr %484, align 1, !tbaa !29 br label %498 @@ -782,10 +782,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 492: ; preds = %489 %493 = getelementptr inbounds nuw i8, ptr %413, i64 3 - %494 = sub nuw nsw i32 127, %.0150.i + %494 = xor i32 %.0150.i, 127 %495 = mul nuw nsw i32 %415, %494 %496 = lshr i32 %495, 7 - %497 = trunc nuw i32 %496 to i8 + %497 = trunc i32 %496 to i8 store i8 %497, ptr %493, align 1, !tbaa !29 br label %498 @@ -842,13 +842,13 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % %523 = and i32 %511, 255 %524 = icmp samesign ult i32 %522, 128 %525 = shl nuw nsw i32 %522, 1 - %526 = sub nuw nsw i32 254, %525 + %526 = xor i32 %525, 254 %527 = add nsw i32 %525, -256 %.0110.i = select i1 %524, i32 %526, i32 %527 %.0108.i = select i1 %524, i32 -1, i32 1 %528 = icmp samesign ult i32 %523, 128 %529 = shl nuw nsw i32 %523, 1 - %530 = sub nuw nsw i32 254, %529 + %530 = xor i32 %529, 254 %531 = add nsw i32 %529, -256 %.0109.i = select i1 %528, i32 %530, i32 %531 %.0107.i = select i1 %528, i32 -1, i32 1 @@ -944,10 +944,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 584: ; preds = %581 %585 = load i8, ptr %535, align 1, !tbaa !25 %586 = zext i8 %585 to i32 - %587 = sub nuw nsw i32 255, %.0110.i + %587 = xor i32 %.0110.i, 255 %588 = mul nuw nsw i32 %587, %586 %589 = lshr i32 %588, 8 - %590 = trunc nuw i32 %589 to i8 + %590 = trunc i32 %589 to i8 store i8 %590, ptr %540, align 1, !tbaa !29 br label %601 @@ -963,10 +963,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 594: ; preds = %591 %595 = load i8, ptr %535, align 1, !tbaa !25 %596 = zext i8 %595 to i32 - %597 = sub nuw nsw i32 255, %.0109.i + %597 = xor i32 %.0109.i, 255 %598 = mul nuw nsw i32 %597, %596 %599 = lshr i32 %598, 8 - %600 = trunc nuw i32 %599 to i8 + %600 = trunc i32 %599 to i8 store i8 %600, ptr %540, align 1, !tbaa !29 br label %601 @@ -1012,13 +1012,13 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % %622 = and i32 %609, 255 %623 = icmp samesign ult i32 %621, 128 %624 = shl nuw nsw i32 %621, 1 - %625 = sub nuw nsw i32 254, %624 + %625 = xor i32 %624, 254 %626 = add nsw i32 %624, -256 %.0108.i255 = select i1 %623, i32 %625, i32 %626 %.0106.i256 = select i1 %623, i32 -1, i32 1 %627 = icmp samesign ult i32 %622, 128 %628 = shl nuw nsw i32 %622, 1 - %629 = sub nuw nsw i32 254, %628 + %629 = xor i32 %628, 254 %630 = add nsw i32 %628, -256 %.0107.i257 = select i1 %627, i32 %629, i32 %630 %.0105.i = select i1 %627, i32 -1, i32 1 @@ -1107,10 +1107,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 680: ; preds = %677 %681 = load i8, ptr %634, align 1, !tbaa !25 %682 = zext i8 %681 to i32 - %683 = sub nuw nsw i32 255, %.0108.i255 + %683 = xor i32 %.0108.i255, 255 %684 = mul nuw nsw i32 %683, %682 %685 = lshr i32 %684, 8 - %686 = trunc nuw i32 %685 to i8 + %686 = trunc i32 %685 to i8 store i8 %686, ptr %637, align 1, !tbaa !38 br label %697 @@ -1126,10 +1126,10 @@ transform_point_upscaled.exit220: ; preds = %.thread449, %224, % 690: ; preds = %687 %691 = load i8, ptr %634, align 1, !tbaa !25 %692 = zext i8 %691 to i32 - %693 = sub nuw nsw i32 255, %.0107.i257 + %693 = xor i32 %.0107.i257, 255 %694 = mul nuw nsw i32 %693, %692 %695 = lshr i32 %694, 8 - %696 = trunc nuw i32 %695 to i8 + %696 = trunc i32 %695 to i8 store i8 %696, ptr %637, align 1, !tbaa !38 br label %697 @@ -1202,12 +1202,12 @@ define internal fastcc void @transform_rgb888(ptr nocapture noundef readonly %0, %35 = and i32 %20, 255 %36 = and i32 %24, 255 %37 = icmp samesign ult i32 %35, 128 - %38 = sub nuw nsw i32 127, %35 + %38 = xor i32 %35, 127 %39 = add nsw i32 %35, -128 %.0155 = select i1 %37, i32 -1, i32 1 %.0153 = select i1 %37, i32 %38, i32 %39 %40 = icmp samesign ult i32 %36, 128 - %41 = sub nuw nsw i32 127, %36 + %41 = xor i32 %36, 127 %42 = add nsw i32 %36, -128 %.0156 = select i1 %40, i32 -1, i32 1 %.0154 = select i1 %40, i32 %41, i32 %42 @@ -1276,7 +1276,7 @@ define internal fastcc void @transform_rgb888(ptr nocapture noundef readonly %0, br i1 %81, label %84, label %82 82: ; preds = %63 - %.sroa.7.0.insert.ext28 = shl nsw i32 %.0154, 24 + %.sroa.7.0.insert.ext28 = shl i32 %.0154, 24 %.sroa.6.0.insert.insert26 = or disjoint i32 %.sroa.6.0.insert.shift, %.sroa.7.0.insert.ext28 %.sroa.5.0.insert.insert21 = or disjoint i32 %.sroa.6.0.insert.insert26, %.sroa.5.0.insert.shift %.sroa.012.0.insert.insert16 = or disjoint i32 %.sroa.5.0.insert.insert21, %.sroa.012.0.insert.ext @@ -1298,7 +1298,7 @@ define internal fastcc void @transform_rgb888(ptr nocapture noundef readonly %0, br i1 %86, label %106, label %87 87: ; preds = %84 - %.sroa.751.0.insert.ext53 = shl nsw i32 %.0153, 24 + %.sroa.751.0.insert.ext53 = shl i32 %.0153, 24 %.sroa.645.0.insert.insert50 = or disjoint i32 %.sroa.645.0.insert.shift, %.sroa.751.0.insert.ext53 %.sroa.539.0.insert.insert44 = or disjoint i32 %.sroa.645.0.insert.insert50, %.sroa.539.0.insert.shift %.sroa.034.0.insert.insert38 = or disjoint i32 %.sroa.539.0.insert.insert44, %.sroa.034.0.insert.ext @@ -1317,10 +1317,10 @@ define internal fastcc void @transform_rgb888(ptr nocapture noundef readonly %0, br i1 %or.cond, label %98, label %93 93: ; preds = %90 - %94 = sub nuw nsw i32 255, %.0153 + %94 = xor i32 %.0153, 255 %95 = mul nuw nsw i32 %94, 255 %96 = lshr i32 %95, 8 - %97 = trunc nuw i32 %96 to i8 + %97 = trunc i32 %96 to i8 store i8 %97, ptr %56, align 1, !tbaa !29 br label %106 @@ -1334,10 +1334,10 @@ define internal fastcc void @transform_rgb888(ptr nocapture noundef readonly %0, br i1 %or.cond177, label %106, label %101 101: ; preds = %98 - %102 = sub nuw nsw i32 255, %.0154 + %102 = xor i32 %.0154, 255 %103 = mul nuw nsw i32 %102, 255 %104 = lshr i32 %103, 8 - %105 = trunc nuw i32 %104 to i8 + %105 = trunc i32 %104 to i8 store i8 %105, ptr %56, align 1, !tbaa !29 br label %106 @@ -1398,13 +1398,13 @@ define internal fastcc void @transform_rgb565a8(ptr nocapture noundef readonly % %41 = and i32 %29, 255 %42 = icmp samesign ult i32 %40, 128 %43 = shl nuw nsw i32 %40, 1 - %44 = sub nuw nsw i32 254, %43 + %44 = xor i32 %43, 254 %45 = add nsw i32 %43, -256 %.0157 = select i1 %42, i32 -1, i32 1 %.0155 = select i1 %42, i32 %44, i32 %45 %46 = icmp samesign ult i32 %41, 128 %47 = shl nuw nsw i32 %41, 1 - %48 = sub nuw nsw i32 254, %47 + %48 = xor i32 %47, 254 %49 = add nsw i32 %47, -256 %.0158 = select i1 %46, i32 -1, i32 1 %.0156 = select i1 %46, i32 %48, i32 %49 @@ -1543,10 +1543,10 @@ define internal fastcc void @transform_rgb565a8(ptr nocapture noundef readonly % 132: ; preds = %129 %133 = zext i8 %.0 to i32 - %134 = sub nuw nsw i32 255, %.0155 + %134 = xor i32 %.0155, 255 %135 = mul nuw nsw i32 %134, %133 %136 = lshr i32 %135, 8 - %137 = trunc nuw i32 %136 to i8 + %137 = trunc i32 %136 to i8 %138 = getelementptr inbounds nuw i8, ptr %10, i64 %indvars.iv store i8 %137, ptr %138, align 1, !tbaa !25 br label %151 @@ -1562,10 +1562,10 @@ define internal fastcc void @transform_rgb565a8(ptr nocapture noundef readonly % 142: ; preds = %139 %143 = zext i8 %.0 to i32 - %144 = sub nuw nsw i32 255, %.0156 + %144 = xor i32 %.0156, 255 %145 = mul nuw nsw i32 %144, %143 %146 = lshr i32 %145, 8 - %147 = trunc nuw i32 %146 to i8 + %147 = trunc i32 %146 to i8 %148 = getelementptr inbounds nuw i8, ptr %10, i64 %indvars.iv store i8 %147, ptr %148, align 1, !tbaa !25 br label %151 diff --git a/bench/meshlab/optimized/filter_isoparametrization.cpp.ll b/bench/meshlab/optimized/filter_isoparametrization.cpp.ll index 3b6f4cb3929..45429242545 100644 --- a/bench/meshlab/optimized/filter_isoparametrization.cpp.ll +++ b/bench/meshlab/optimized/filter_isoparametrization.cpp.ll @@ -88606,7 +88606,7 @@ _ZNSt6vectorIP8BaseFaceSaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNKSt6vectorIP br i1 %42, label %43, label %45 43: ; preds = %32 - %44 = sub nuw nsw i64 1, %41 + %44 = xor i64 %41, 1 invoke void @_ZNSt6vectorIP8BaseFaceSaIS1_EE17_M_default_appendEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %44) to label %50 unwind label %82 @@ -106683,7 +106683,7 @@ _ZNSt6vectorIP12AbstractFaceSaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNKSt6vec br i1 %51, label %52, label %54 52: ; preds = %41 - %53 = sub nuw nsw i64 1, %50 + %53 = xor i64 %50, 1 invoke void @_ZNSt6vectorIiSaIiEE17_M_default_appendEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %53) to label %59 unwind label %203 @@ -120454,7 +120454,7 @@ define linkonce_odr noundef zeroext i1 @_ZN18IsoParametrization12param_domain10g br i1 %13, label %14, label %16 14: ; preds = %4 - %15 = sub nuw nsw i64 1, %12 + %15 = xor i64 %12, 1 tail call void @_ZNSt6vectorIP9ParamFaceSaIS1_EE17_M_default_appendEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %15) br label %_ZNSt6vectorIP9ParamFaceSaIS1_EE6resizeEm.exit @@ -120480,10 +120480,10 @@ _ZNSt6vectorIP9ParamFaceSaIS1_EE6resizeEm.exit: ; preds = %14, %16, %18, %20 %26 = sub i64 %24, %25 %27 = sdiv exact i64 %26, 12 %28 = icmp eq ptr %22, %23 - br i1 %28, label %29, label %45 + br i1 %28, label %29, label %47 29: ; preds = %_ZNSt6vectorIP9ParamFaceSaIS1_EE6resizeEm.exit - %30 = sub nuw nsw i64 1, %27 + %30 = xor i64 %27, 1 %31 = getelementptr inbounds nuw i8, ptr %3, i64 16 %32 = load ptr, ptr %31, align 8 %33 = ptrtoint ptr %32 to i64 @@ -120496,65 +120496,67 @@ _ZNSt6vectorIP9ParamFaceSaIS1_EE6resizeEm.exit: ; preds = %14, %16, %18, %20 br i1 %.not28.i.i, label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i.i, label %38 38: ; preds = %29 - %39 = sub nuw nsw i64 12, %26 + %39 = mul nuw nsw i64 %30, 12 %scevgep.i.i.i.i.i = getelementptr i8, ptr %22, i64 %39 store ptr %scevgep.i.i.i.i.i, ptr %21, align 8 br label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit _ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i.i: ; preds = %29 - %40 = tail call noalias noundef nonnull dereferenceable(12) ptr @_Znwm(i64 noundef 12) #38 - %41 = getelementptr inbounds i8, ptr %40, i64 %26 + %40 = add nuw nsw i64 %30, %27 + %41 = mul nuw nsw i64 %40, 12 + %42 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %41) #38 + %43 = getelementptr inbounds i8, ptr %42, i64 %26 %.not.i31.i.i = icmp eq ptr %22, null - br i1 %.not.i31.i.i, label %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i, label %42 + br i1 %.not.i31.i.i, label %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i, label %44 -42: ; preds = %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i.i +44: ; preds = %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i.i tail call void @_ZdlPv(ptr noundef nonnull %23) #35 br label %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i -_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i: ; preds = %42, %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i.i - store ptr %40, ptr %3, align 8 - %43 = getelementptr inbounds nuw %"class.vcg::Point3", ptr %41, i64 %30 - store ptr %43, ptr %21, align 8 - %44 = getelementptr inbounds nuw i8, ptr %40, i64 12 - store ptr %44, ptr %31, align 8 +_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i: ; preds = %44, %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE11_S_relocateEPS2_S5_S5_RS3_.exit.i.i + store ptr %42, ptr %3, align 8 + %45 = getelementptr inbounds nuw %"class.vcg::Point3", ptr %43, i64 %30 + store ptr %45, ptr %21, align 8 + %46 = getelementptr inbounds nuw %"class.vcg::Point3", ptr %42, i64 %40 + store ptr %46, ptr %31, align 8 br label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit -45: ; preds = %_ZNSt6vectorIP9ParamFaceSaIS1_EE6resizeEm.exit - %46 = icmp ugt i64 %27, 1 - br i1 %46, label %47, label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit - -47: ; preds = %45 - %48 = getelementptr inbounds nuw i8, ptr %23, i64 12 - %.not.i4.i = icmp eq ptr %22, %48 - br i1 %.not.i4.i, label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit, label %49 +47: ; preds = %_ZNSt6vectorIP9ParamFaceSaIS1_EE6resizeEm.exit + %48 = icmp ugt i64 %27, 1 + br i1 %48, label %49, label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit 49: ; preds = %47 - store ptr %48, ptr %21, align 8 + %50 = getelementptr inbounds nuw i8, ptr %23, i64 12 + %.not.i4.i = icmp eq ptr %22, %50 + br i1 %.not.i4.i, label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit, label %51 + +51: ; preds = %49 + store ptr %50, ptr %21, align 8 br label %_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit -_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit: ; preds = %38, %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i, %45, %47, %49 - %50 = phi ptr [ %23, %38 ], [ %40, %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i ], [ %23, %45 ], [ %23, %47 ], [ %23, %49 ] - %51 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %52 = load ptr, ptr %2, align 8 - %53 = call noundef zeroext i1 @_ZN6UVGridI9ParamMeshE10getClosestERKN3vcg6Point2IfEERP9ParamFaceRNS2_6Point3IfEE(ptr noundef nonnull align 8 dereferenceable(60) %51, ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 4 dereferenceable(12) %50) +_ZNSt6vectorIN3vcg6Point3IfEESaIS2_EE6resizeEm.exit: ; preds = %38, %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i, %47, %49, %51 + %52 = phi ptr [ %23, %38 ], [ %42, %_ZNSt12_Vector_baseIN3vcg6Point3IfEESaIS2_EE13_M_deallocateEPS2_m.exit32.i.i ], [ %23, %47 ], [ %23, %49 ], [ %23, %51 ] + %53 = getelementptr inbounds nuw i8, ptr %0, i64 40 %54 = load ptr, ptr %2, align 8 - %55 = load ptr, ptr %54, align 8 - %56 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %55 = call noundef zeroext i1 @_ZN6UVGridI9ParamMeshE10getClosestERKN3vcg6Point2IfEERP9ParamFaceRNS2_6Point3IfEE(ptr noundef nonnull align 8 dereferenceable(60) %53, ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 4 dereferenceable(12) %52) + %56 = load ptr, ptr %2, align 8 %57 = load ptr, ptr %56, align 8 - %58 = getelementptr inbounds nuw i8, ptr %57, i64 72 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 32 %59 = load ptr, ptr %58, align 8 - %60 = ptrtoint ptr %55 to i64 - %61 = ptrtoint ptr %59 to i64 - %62 = sub i64 %60, %61 - %63 = sdiv exact i64 %62, 160 - %64 = getelementptr inbounds nuw i8, ptr %0, i64 104 - %sext = shl i64 %63, 32 - %65 = load ptr, ptr %64, align 8 - %66 = ashr exact i64 %sext, 29 - %67 = getelementptr inbounds i8, ptr %65, i64 %66 - %68 = load ptr, ptr %67, align 8 - store ptr %68, ptr %54, align 8 - ret i1 %53 + %60 = getelementptr inbounds nuw i8, ptr %59, i64 72 + %61 = load ptr, ptr %60, align 8 + %62 = ptrtoint ptr %57 to i64 + %63 = ptrtoint ptr %61 to i64 + %64 = sub i64 %62, %63 + %65 = sdiv exact i64 %64, 160 + %66 = getelementptr inbounds nuw i8, ptr %0, i64 104 + %sext = shl i64 %65, 32 + %67 = load ptr, ptr %66, align 8 + %68 = ashr exact i64 %sext, 29 + %69 = getelementptr inbounds i8, ptr %67, i64 %68 + %70 = load ptr, ptr %69, align 8 + store ptr %70, ptr %56, align 8 + ret i1 %55 } ; Function Attrs: mustprogress uwtable diff --git a/bench/minetest/optimized/serverenvironment.cpp.ll b/bench/minetest/optimized/serverenvironment.cpp.ll index 33e663a9342..77af2a03cdd 100644 --- a/bench/minetest/optimized/serverenvironment.cpp.ll +++ b/bench/minetest/optimized/serverenvironment.cpp.ll @@ -19611,7 +19611,7 @@ if.then118: ; preds = %for.body112 %sub.ptr.sub.i275 = sub i64 %sub.ptr.lhs.cast.i273, %sub.ptr.lhs.cast.i %sub.ptr.div.i276 = ashr exact i64 %sub.ptr.sub.i275, 3 %cmp3.not.i = icmp ult i64 %sub.ptr.div.i276, %sub.i - br i1 %cmp3.not.i, label %_ZNKSt6vectorIPS_I9ActiveABMSaIS0_EESaIS3_EE12_M_check_lenEmPKc.exit.i, label %if.end.i.i.i.i.i.i + br i1 %cmp3.not.i, label %if.else42.i, label %if.end.i.i.i.i.i.i if.end.i.i.i.i.i.i: ; preds = %if.then118 %34 = shl nuw nsw i64 %conv114, 3 @@ -19625,14 +19625,14 @@ if.end.i.i.i.i.i.i: ; preds = %if.then118 %.pre323 = load ptr, ptr %m_aabms, align 8, !tbaa !511 br label %if.end125 -_ZNKSt6vectorIPS_I9ActiveABMSaIS0_EESaIS3_EE12_M_check_lenEmPKc.exit.i: ; preds = %if.then118 +if.else42.i: ; preds = %if.then118 %.sroa.speculated.i.i = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i, i64 %sub.i) %add.i.i = add nuw nsw i64 %.sroa.speculated.i.i, %sub.ptr.div.i %mul.i.i.i.i = shl nuw nsw i64 %add.i.i, 3 %call5.i.i.i.i289 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i) #38 to label %if.end.i.i.i.i.i161.i unwind label %lpad123.loopexit -if.end.i.i.i.i.i161.i: ; preds = %_ZNKSt6vectorIPS_I9ActiveABMSaIS0_EESaIS3_EE12_M_check_lenEmPKc.exit.i +if.end.i.i.i.i.i161.i: ; preds = %if.else42.i %add.ptr54.i = getelementptr inbounds i8, ptr %call5.i.i.i.i289, i64 %sub.ptr.sub.i %39 = shl nuw nsw i64 %conv114, 3 %40 = add nuw nsw i64 %39, 2040 @@ -19663,7 +19663,7 @@ _ZNSt12_Vector_baseIPSt6vectorI9ActiveABMSaIS1_EESaIS4_EE13_M_deallocateEPS4_m.e store ptr %add.ptr90.i, ptr %_M_end_of_storage.i271, align 8, !tbaa !547 br label %if.end125 -lpad123.loopexit: ; preds = %_ZNKSt6vectorIPS_I9ActiveABMSaIS0_EESaIS3_EE12_M_check_lenEmPKc.exit.i +lpad123.loopexit: ; preds = %if.else42.i %lpad.loopexit = landingpad { ptr, i32 } cleanup br label %ehcleanup151 diff --git a/bench/mitsuba3/optimized/bitmap.cpp.ll b/bench/mitsuba3/optimized/bitmap.cpp.ll index 4ccbff205b6..747dd66f448 100644 --- a/bench/mitsuba3/optimized/bitmap.cpp.ll +++ b/bench/mitsuba3/optimized/bitmap.cpp.ll @@ -36113,8 +36113,8 @@ _ZN5drjit12StringBuffer3putEc.exit: ; preds = %3, %10 %.not = icmp eq i64 %27, 0 br i1 %.not, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %_ZN5drjit12StringBuffer3putEc.exit, %87 - %.014 = phi i64 [ %63, %87 ], [ 0, %_ZN5drjit12StringBuffer3putEc.exit ] +.lr.ph: ; preds = %_ZN5drjit12StringBuffer3putEc.exit, %88 + %.014 = phi i64 [ %63, %88 ], [ 0, %_ZN5drjit12StringBuffer3putEc.exit ] %28 = getelementptr inbounds [2 x i32], ptr %1, i64 0, i64 %.014 %29 = load i32, ptr %28, align 4 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %4) @@ -36179,7 +36179,7 @@ _ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferE %63 = add nuw i64 %.014, 1 %64 = load i64, ptr %2, align 8 %65 = icmp ult i64 %63, %64 - br i1 %65, label %66, label %87 + br i1 %65, label %66, label %88 66: ; preds = %_ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferERKT0_PKmDpT1_.exit %67 = load ptr, ptr %8, align 8 @@ -36191,74 +36191,74 @@ _ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferE br i1 %.not.i.i11, label %_ZN5drjit12StringBuffer3putEPKc.exit, label %72 72: ; preds = %66 - %73 = load ptr, ptr %0, align 8 - %74 = ptrtoint ptr %73 to i64 - %75 = sub i64 %69, %74 - %76 = shl i64 %75, 1 - %reass.sub = sub i64 %76, %71 - %77 = add i64 %reass.sub, 3 - %78 = sub i64 %70, %74 - %79 = add i64 %78, 1 - %80 = tail call i64 @llvm.umin.i64(i64 %79, i64 %75) - %81 = tail call noalias ptr @malloc(i64 noundef %77) #43 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %81, ptr align 1 %73, i64 %80, i1 false) - tail call void @free(ptr noundef %73) #38 - store ptr %81, ptr %0, align 8 - %82 = getelementptr inbounds i8, ptr %81, i64 %77 - store ptr %82, ptr %8, align 8 - %83 = getelementptr inbounds i8, ptr %81, i64 %78 - store ptr %83, ptr %5, align 8 + %73 = xor i64 %71, 3 + %74 = load ptr, ptr %0, align 8 + %75 = ptrtoint ptr %74 to i64 + %76 = sub i64 %69, %75 + %77 = shl i64 %76, 1 + %78 = add i64 %77, %73 + %79 = sub i64 %70, %75 + %80 = add i64 %79, 1 + %81 = tail call i64 @llvm.umin.i64(i64 %80, i64 %76) + %82 = tail call noalias ptr @malloc(i64 noundef %78) #43 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %82, ptr align 1 %74, i64 %81, i1 false) + tail call void @free(ptr noundef %74) #38 + store ptr %82, ptr %0, align 8 + %83 = getelementptr inbounds i8, ptr %82, i64 %78 + store ptr %83, ptr %8, align 8 + %84 = getelementptr inbounds i8, ptr %82, i64 %79 + store ptr %84, ptr %5, align 8 br label %_ZN5drjit12StringBuffer3putEPKc.exit _ZN5drjit12StringBuffer3putEPKc.exit: ; preds = %66, %72 - %84 = phi ptr [ %83, %72 ], [ %68, %66 ] - store i16 8236, ptr %84, align 1 - %85 = load ptr, ptr %5, align 8 - %86 = getelementptr inbounds nuw i8, ptr %85, i64 2 - store ptr %86, ptr %5, align 8 - store i8 0, ptr %86, align 1 + %85 = phi ptr [ %84, %72 ], [ %68, %66 ] + store i16 8236, ptr %85, align 1 + %86 = load ptr, ptr %5, align 8 + %87 = getelementptr inbounds nuw i8, ptr %86, i64 2 + store ptr %87, ptr %5, align 8 + store i8 0, ptr %87, align 1 %.pre = load i64, ptr %2, align 8 - br label %87 - -87: ; preds = %_ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferERKT0_PKmDpT1_.exit, %_ZN5drjit12StringBuffer3putEPKc.exit - %88 = phi i64 [ %64, %_ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferERKT0_PKmDpT1_.exit ], [ %.pre, %_ZN5drjit12StringBuffer3putEPKc.exit ] - %89 = icmp ult i64 %63, %88 - br i1 %89, label %.lr.ph, label %._crit_edge, !llvm.loop !456 - -._crit_edge: ; preds = %87, %_ZN5drjit12StringBuffer3putEc.exit - %90 = load ptr, ptr %5, align 8 - %91 = getelementptr inbounds nuw i8, ptr %90, i64 1 - %92 = load ptr, ptr %8, align 8 - %.not.i12 = icmp ult ptr %91, %92 - br i1 %.not.i12, label %_ZN5drjit12StringBuffer3putEc.exit13, label %93 - -93: ; preds = %._crit_edge - %94 = load ptr, ptr %0, align 8 - %95 = ptrtoint ptr %92 to i64 - %96 = ptrtoint ptr %94 to i64 - %97 = sub i64 %95, %96 - %98 = shl i64 %97, 1 - %99 = add i64 %98, 2 - %100 = ptrtoint ptr %90 to i64 - %101 = sub i64 %100, %96 - %102 = add i64 %101, 1 - %103 = tail call i64 @llvm.umin.i64(i64 %102, i64 %97) - %104 = tail call noalias ptr @malloc(i64 noundef %99) #43 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %104, ptr align 1 %94, i64 %103, i1 false) - tail call void @free(ptr noundef %94) #38 - store ptr %104, ptr %0, align 8 - %105 = getelementptr inbounds i8, ptr %104, i64 %99 - store ptr %105, ptr %8, align 8 - %106 = getelementptr inbounds i8, ptr %104, i64 %101 + br label %88 + +88: ; preds = %_ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferERKT0_PKmDpT1_.exit, %_ZN5drjit12StringBuffer3putEPKc.exit + %89 = phi i64 [ %64, %_ZN5drjit6detail9to_stringILb0EN7mitsuba6VectorIjLm2EEEJmEEEvRNS_12StringBufferERKT0_PKmDpT1_.exit ], [ %.pre, %_ZN5drjit12StringBuffer3putEPKc.exit ] + %90 = icmp ult i64 %63, %89 + br i1 %90, label %.lr.ph, label %._crit_edge, !llvm.loop !456 + +._crit_edge: ; preds = %88, %_ZN5drjit12StringBuffer3putEc.exit + %91 = load ptr, ptr %5, align 8 + %92 = getelementptr inbounds nuw i8, ptr %91, i64 1 + %93 = load ptr, ptr %8, align 8 + %.not.i12 = icmp ult ptr %92, %93 + br i1 %.not.i12, label %_ZN5drjit12StringBuffer3putEc.exit13, label %94 + +94: ; preds = %._crit_edge + %95 = load ptr, ptr %0, align 8 + %96 = ptrtoint ptr %93 to i64 + %97 = ptrtoint ptr %95 to i64 + %98 = sub i64 %96, %97 + %99 = shl i64 %98, 1 + %100 = add i64 %99, 2 + %101 = ptrtoint ptr %91 to i64 + %102 = sub i64 %101, %97 + %103 = add i64 %102, 1 + %104 = tail call i64 @llvm.umin.i64(i64 %103, i64 %98) + %105 = tail call noalias ptr @malloc(i64 noundef %100) #43 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 1 %95, i64 %104, i1 false) + tail call void @free(ptr noundef %95) #38 + store ptr %105, ptr %0, align 8 + %106 = getelementptr inbounds i8, ptr %105, i64 %100 + store ptr %106, ptr %8, align 8 + %107 = getelementptr inbounds i8, ptr %105, i64 %102 br label %_ZN5drjit12StringBuffer3putEc.exit13 -_ZN5drjit12StringBuffer3putEc.exit13: ; preds = %._crit_edge, %93 - %107 = phi ptr [ %106, %93 ], [ %90, %._crit_edge ] - %108 = getelementptr inbounds nuw i8, ptr %107, i64 1 - store ptr %108, ptr %5, align 8 - store i8 93, ptr %107, align 1 - %109 = load ptr, ptr %5, align 8 - store i8 0, ptr %109, align 1 +_ZN5drjit12StringBuffer3putEc.exit13: ; preds = %._crit_edge, %94 + %108 = phi ptr [ %107, %94 ], [ %91, %._crit_edge ] + %109 = getelementptr inbounds nuw i8, ptr %108, i64 1 + store ptr %109, ptr %5, align 8 + store i8 93, ptr %108, align 1 + %110 = load ptr, ptr %5, align 8 + store i8 0, ptr %110, align 1 ret void } diff --git a/bench/mitsuba3/optimized/mesh.cpp.ll b/bench/mitsuba3/optimized/mesh.cpp.ll index 67be059eb8b..62c755c20d8 100644 --- a/bench/mitsuba3/optimized/mesh.cpp.ll +++ b/bench/mitsuba3/optimized/mesh.cpp.ll @@ -20503,8 +20503,8 @@ _ZN5drjit12StringBuffer3putEc.exit: ; preds = %3, %9 %.not = icmp eq i64 %26, 0 br i1 %.not, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %_ZN5drjit12StringBuffer3putEc.exit, %55 - %.013 = phi i64 [ %31, %55 ], [ 0, %_ZN5drjit12StringBuffer3putEc.exit ] +.lr.ph: ; preds = %_ZN5drjit12StringBuffer3putEc.exit, %56 + %.013 = phi i64 [ %31, %56 ], [ 0, %_ZN5drjit12StringBuffer3putEc.exit ] %27 = getelementptr inbounds float, ptr %1, i64 %.013 %28 = load float, ptr %27, align 4 %29 = fpext float %28 to double @@ -20512,7 +20512,7 @@ _ZN5drjit12StringBuffer3putEc.exit: ; preds = %3, %9 %31 = add nuw i64 %.013, 1 %32 = load i64, ptr %2, align 8 %33 = icmp ult i64 %31, %32 - br i1 %33, label %34, label %55 + br i1 %33, label %34, label %56 34: ; preds = %.lr.ph %35 = load ptr, ptr %7, align 8 @@ -20524,74 +20524,74 @@ _ZN5drjit12StringBuffer3putEc.exit: ; preds = %3, %9 br i1 %.not.i.i, label %_ZN5drjit12StringBuffer3putEPKc.exit, label %40 40: ; preds = %34 - %41 = load ptr, ptr %0, align 8 - %42 = ptrtoint ptr %41 to i64 - %43 = sub i64 %37, %42 - %44 = shl i64 %43, 1 - %reass.sub = sub i64 %44, %39 - %45 = add i64 %reass.sub, 3 - %46 = sub i64 %38, %42 - %47 = add i64 %46, 1 - %48 = tail call i64 @llvm.umin.i64(i64 %47, i64 %43) - %49 = tail call noalias ptr @malloc(i64 noundef %45) #38 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %49, ptr align 1 %41, i64 %48, i1 false) - tail call void @free(ptr noundef %41) #35 - store ptr %49, ptr %0, align 8 - %50 = getelementptr inbounds i8, ptr %49, i64 %45 - store ptr %50, ptr %7, align 8 - %51 = getelementptr inbounds i8, ptr %49, i64 %46 - store ptr %51, ptr %4, align 8 + %41 = xor i64 %39, 3 + %42 = load ptr, ptr %0, align 8 + %43 = ptrtoint ptr %42 to i64 + %44 = sub i64 %37, %43 + %45 = shl i64 %44, 1 + %46 = add i64 %45, %41 + %47 = sub i64 %38, %43 + %48 = add i64 %47, 1 + %49 = tail call i64 @llvm.umin.i64(i64 %48, i64 %44) + %50 = tail call noalias ptr @malloc(i64 noundef %46) #38 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %50, ptr align 1 %42, i64 %49, i1 false) + tail call void @free(ptr noundef %42) #35 + store ptr %50, ptr %0, align 8 + %51 = getelementptr inbounds i8, ptr %50, i64 %46 + store ptr %51, ptr %7, align 8 + %52 = getelementptr inbounds i8, ptr %50, i64 %47 + store ptr %52, ptr %4, align 8 br label %_ZN5drjit12StringBuffer3putEPKc.exit _ZN5drjit12StringBuffer3putEPKc.exit: ; preds = %34, %40 - %52 = phi ptr [ %51, %40 ], [ %36, %34 ] - store i16 8236, ptr %52, align 1 - %53 = load ptr, ptr %4, align 8 - %54 = getelementptr inbounds nuw i8, ptr %53, i64 2 - store ptr %54, ptr %4, align 8 - store i8 0, ptr %54, align 1 + %53 = phi ptr [ %52, %40 ], [ %36, %34 ] + store i16 8236, ptr %53, align 1 + %54 = load ptr, ptr %4, align 8 + %55 = getelementptr inbounds nuw i8, ptr %54, i64 2 + store ptr %55, ptr %4, align 8 + store i8 0, ptr %55, align 1 %.pre = load i64, ptr %2, align 8 - br label %55 - -55: ; preds = %.lr.ph, %_ZN5drjit12StringBuffer3putEPKc.exit - %56 = phi i64 [ %32, %.lr.ph ], [ %.pre, %_ZN5drjit12StringBuffer3putEPKc.exit ] - %57 = icmp ult i64 %31, %56 - br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !500 - -._crit_edge: ; preds = %55, %_ZN5drjit12StringBuffer3putEc.exit - %58 = load ptr, ptr %4, align 8 - %59 = getelementptr inbounds nuw i8, ptr %58, i64 1 - %60 = load ptr, ptr %7, align 8 - %.not.i11 = icmp ult ptr %59, %60 - br i1 %.not.i11, label %_ZN5drjit12StringBuffer3putEc.exit12, label %61 + br label %56 -61: ; preds = %._crit_edge - %62 = load ptr, ptr %0, align 8 - %63 = ptrtoint ptr %60 to i64 - %64 = ptrtoint ptr %62 to i64 - %65 = sub i64 %63, %64 - %66 = shl i64 %65, 1 - %67 = add i64 %66, 2 - %68 = ptrtoint ptr %58 to i64 - %69 = sub i64 %68, %64 - %70 = add i64 %69, 1 - %71 = tail call i64 @llvm.umin.i64(i64 %70, i64 %65) - %72 = tail call noalias ptr @malloc(i64 noundef %67) #38 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %72, ptr align 1 %62, i64 %71, i1 false) - tail call void @free(ptr noundef %62) #35 - store ptr %72, ptr %0, align 8 - %73 = getelementptr inbounds i8, ptr %72, i64 %67 - store ptr %73, ptr %7, align 8 - %74 = getelementptr inbounds i8, ptr %72, i64 %69 +56: ; preds = %.lr.ph, %_ZN5drjit12StringBuffer3putEPKc.exit + %57 = phi i64 [ %32, %.lr.ph ], [ %.pre, %_ZN5drjit12StringBuffer3putEPKc.exit ] + %58 = icmp ult i64 %31, %57 + br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !500 + +._crit_edge: ; preds = %56, %_ZN5drjit12StringBuffer3putEc.exit + %59 = load ptr, ptr %4, align 8 + %60 = getelementptr inbounds nuw i8, ptr %59, i64 1 + %61 = load ptr, ptr %7, align 8 + %.not.i11 = icmp ult ptr %60, %61 + br i1 %.not.i11, label %_ZN5drjit12StringBuffer3putEc.exit12, label %62 + +62: ; preds = %._crit_edge + %63 = load ptr, ptr %0, align 8 + %64 = ptrtoint ptr %61 to i64 + %65 = ptrtoint ptr %63 to i64 + %66 = sub i64 %64, %65 + %67 = shl i64 %66, 1 + %68 = add i64 %67, 2 + %69 = ptrtoint ptr %59 to i64 + %70 = sub i64 %69, %65 + %71 = add i64 %70, 1 + %72 = tail call i64 @llvm.umin.i64(i64 %71, i64 %66) + %73 = tail call noalias ptr @malloc(i64 noundef %68) #38 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %73, ptr align 1 %63, i64 %72, i1 false) + tail call void @free(ptr noundef %63) #35 + store ptr %73, ptr %0, align 8 + %74 = getelementptr inbounds i8, ptr %73, i64 %68 + store ptr %74, ptr %7, align 8 + %75 = getelementptr inbounds i8, ptr %73, i64 %70 br label %_ZN5drjit12StringBuffer3putEc.exit12 -_ZN5drjit12StringBuffer3putEc.exit12: ; preds = %._crit_edge, %61 - %75 = phi ptr [ %74, %61 ], [ %58, %._crit_edge ] - %76 = getelementptr inbounds nuw i8, ptr %75, i64 1 - store ptr %76, ptr %4, align 8 - store i8 93, ptr %75, align 1 - %77 = load ptr, ptr %4, align 8 - store i8 0, ptr %77, align 1 +_ZN5drjit12StringBuffer3putEc.exit12: ; preds = %._crit_edge, %62 + %76 = phi ptr [ %75, %62 ], [ %59, %._crit_edge ] + %77 = getelementptr inbounds nuw i8, ptr %76, i64 1 + store ptr %77, ptr %4, align 8 + store i8 93, ptr %76, align 1 + %78 = load ptr, ptr %4, align 8 + store i8 0, ptr %78, align 1 ret void } diff --git a/bench/nix/optimized/json-to-value.ll b/bench/nix/optimized/json-to-value.ll index a40eeda4e9d..1485015b64b 100644 --- a/bench/nix/optimized/json-to-value.ll +++ b/bench/nix/optimized/json-to-value.ll @@ -26208,7 +26208,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %.not.not.i = icmp eq i8 %39, 0 %40 = load i32, ptr %25, align 8 %41 = trunc i32 %40 to i8 - %42 = sub nuw nsw i64 7, %.09.i + %42 = xor i64 %.09.i, 7 %.sink12.i = select i1 %.not.not.i, i64 %42, i64 %.09.i %43 = getelementptr inbounds nuw [8 x i8], ptr %9, i64 0, i64 %.sink12.i store i8 %41, ptr %43, align 1 @@ -26326,7 +26326,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %.not.not.i31 = icmp eq i8 %87, 0 %88 = load i32, ptr %73, align 8 %89 = trunc i32 %88 to i8 - %90 = sub nuw nsw i64 3, %.09.i27 + %90 = xor i64 %.09.i27, 3 %.sink12.i32 = select i1 %.not.not.i31, i64 %90, i64 %.09.i27 %91 = getelementptr inbounds nuw [4 x i8], ptr %7, i64 0, i64 %.sink12.i32 store i8 %89, ptr %91, align 1 @@ -26536,7 +26536,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %.not.not.i41 = icmp eq i8 %187, 0 %188 = load i32, ptr %173, align 8 %189 = trunc i32 %188 to i8 - %190 = sub nuw nsw i64 3, %.09.i37 + %190 = xor i64 %.09.i37, 3 %.sink12.i42 = select i1 %.not.not.i41, i64 %190, i64 %.09.i37 %191 = getelementptr inbounds nuw [4 x i8], ptr %6, i64 0, i64 %.sink12.i42 store i8 %189, ptr %191, align 1 @@ -26664,7 +26664,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %.not.not.i52 = icmp eq i8 %253, 0 %254 = load i32, ptr %239, align 8 %255 = trunc i32 %254 to i8 - %256 = sub nuw nsw i64 3, %.09.i48 + %256 = xor i64 %.09.i48, 3 %.sink12.i53 = select i1 %.not.not.i52, i64 %256, i64 %.09.i48 %257 = getelementptr inbounds nuw [4 x i8], ptr %5, i64 0, i64 %.sink12.i53 store i8 %255, ptr %257, align 1 @@ -26726,7 +26726,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %.not.not.i60 = icmp eq i8 %285, 0 %286 = load i32, ptr %271, align 8 %287 = trunc i32 %286 to i8 - %288 = sub nuw nsw i64 7, %.09.i56 + %288 = xor i64 %.09.i56, 7 %.sink12.i61 = select i1 %.not.not.i60, i64 %288, i64 %.09.i56 %289 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %.sink12.i61 store i8 %287, ptr %289, align 1 @@ -27861,7 +27861,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %21 = trunc i8 %20 to i1 %22 = load i32, ptr %7, align 8 %23 = trunc i32 %22 to i8 - %24 = sub nuw nsw i64 3, %.09 + %24 = xor i64 %.09, 3 %.sink12 = select i1 %21, i64 %24, i64 %.09 %25 = getelementptr inbounds nuw [4 x i8], ptr %4, i64 0, i64 %.sink12 store i8 %23, ptr %25, align 1 @@ -27916,7 +27916,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %21 = trunc i8 %20 to i1 %22 = load i32, ptr %7, align 8 %23 = trunc i32 %22 to i8 - %24 = sub nuw nsw i64 7, %.09 + %24 = xor i64 %.09, 7 %.sink12 = select i1 %21, i64 %24, i64 %.09 %25 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %.sink12 store i8 %23, ptr %25, align 1 @@ -28941,7 +28941,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %21 = trunc i8 %20 to i1 %22 = load i32, ptr %7, align 8 %23 = trunc i32 %22 to i8 - %24 = sub nuw nsw i64 3, %.09 + %24 = xor i64 %.09, 3 %.sink12 = select i1 %21, i64 %24, i64 %.09 %25 = getelementptr inbounds nuw [4 x i8], ptr %4, i64 0, i64 %.sink12 store i8 %23, ptr %25, align 1 @@ -28996,7 +28996,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %21 = trunc i8 %20 to i1 %22 = load i32, ptr %7, align 8 %23 = trunc i32 %22 to i8 - %24 = sub nuw nsw i64 7, %.09 + %24 = xor i64 %.09, 7 %.sink12 = select i1 %21, i64 %24, i64 %.09 %25 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %.sink12 store i8 %23, ptr %25, align 1 @@ -30501,7 +30501,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %64 = trunc i8 %63 to i1 %65 = load i32, ptr %7, align 8 %66 = trunc i32 %65 to i8 - %67 = sub nuw nsw i64 3, %.09.i17 + %67 = xor i64 %.09.i17, 3 %.sink12.i21 = select i1 %64, i64 %67, i64 %.09.i17 %68 = getelementptr inbounds nuw [4 x i8], ptr %5, i64 0, i64 %.sink12.i21 store i8 %66, ptr %68, align 1 @@ -30702,7 +30702,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %160 = trunc i8 %159 to i1 %161 = load i32, ptr %7, align 8 %162 = trunc i32 %161 to i8 - %163 = sub nuw nsw i64 3, %.09.i43 + %163 = xor i64 %.09.i43, 3 %.sink12.i47 = select i1 %160, i64 %163, i64 %.09.i43 %164 = getelementptr inbounds nuw [4 x i8], ptr %3, i64 0, i64 %.sink12.i47 store i8 %162, ptr %164, align 1 @@ -31075,7 +31075,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %21 = trunc i8 %20 to i1 %22 = load i32, ptr %7, align 8 %23 = trunc i32 %22 to i8 - %24 = sub nuw nsw i64 3, %.09 + %24 = xor i64 %.09, 3 %.sink12 = select i1 %21, i64 %24, i64 %.09 %25 = getelementptr inbounds nuw [4 x i8], ptr %4, i64 0, i64 %.sink12 store i8 %23, ptr %25, align 1 @@ -31130,7 +31130,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %21 = trunc i8 %20 to i1 %22 = load i32, ptr %7, align 8 %23 = trunc i32 %22 to i8 - %24 = sub nuw nsw i64 7, %.09 + %24 = xor i64 %.09, 7 %.sink12 = select i1 %21, i64 %24, i64 %.09 %25 = getelementptr inbounds nuw [8 x i8], ptr %4, i64 0, i64 %.sink12 store i8 %23, ptr %25, align 1 @@ -31399,7 +31399,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %147 = trunc i8 %146 to i1 %148 = load i32, ptr %133, align 8 %149 = trunc i32 %148 to i8 - %150 = sub nuw nsw i64 3, %.09.i52 + %150 = xor i64 %.09.i52, 3 %.sink12.i56 = select i1 %147, i64 %150, i64 %.09.i52 %151 = getelementptr inbounds nuw [4 x i8], ptr %9, i64 0, i64 %.sink12.i56 store i8 %149, ptr %151, align 1 @@ -31460,7 +31460,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %179 = trunc i8 %178 to i1 %180 = load i32, ptr %165, align 8 %181 = trunc i32 %180 to i8 - %182 = sub nuw nsw i64 7, %.09.i57 + %182 = xor i64 %.09.i57, 7 %.sink12.i61 = select i1 %179, i64 %182, i64 %.09.i57 %183 = getelementptr inbounds nuw [8 x i8], ptr %8, i64 0, i64 %.sink12.i61 store i8 %181, ptr %183, align 1 @@ -31520,7 +31520,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %210 = trunc i8 %209 to i1 %211 = load i32, ptr %196, align 8 %212 = trunc i32 %211 to i8 - %213 = sub nuw nsw i64 3, %.09.i63 + %213 = xor i64 %.09.i63, 3 %.sink12.i67 = select i1 %210, i64 %213, i64 %.09.i63 %214 = getelementptr inbounds nuw [4 x i8], ptr %7, i64 0, i64 %.sink12.i67 store i8 %212, ptr %214, align 1 @@ -31624,7 +31624,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %256 = trunc i8 %255 to i1 %257 = load i32, ptr %242, align 8 %258 = trunc i32 %257 to i8 - %259 = sub nuw nsw i64 7, %.09.i69 + %259 = xor i64 %.09.i69, 7 %.sink12.i73 = select i1 %256, i64 %259, i64 %.09.i69 %260 = getelementptr inbounds nuw [8 x i8], ptr %6, i64 0, i64 %.sink12.i73 store i8 %258, ptr %260, align 1 @@ -33272,7 +33272,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %193 = trunc i8 %192 to i1 %194 = load i32, ptr %31, align 8 %195 = trunc i32 %194 to i8 - %196 = sub nuw nsw i64 3, %.09.i48 + %196 = xor i64 %.09.i48, 3 %.sink12.i52 = select i1 %193, i64 %196, i64 %.09.i48 %197 = getelementptr inbounds nuw [4 x i8], ptr %7, i64 0, i64 %.sink12.i52 store i8 %195, ptr %197, align 1 @@ -33391,7 +33391,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %248 = trunc i8 %247 to i1 %249 = load i32, ptr %31, align 8 %250 = trunc i32 %249 to i8 - %251 = sub nuw nsw i64 7, %.09.i63 + %251 = xor i64 %.09.i63, 7 %.sink12.i67 = select i1 %248, i64 %251, i64 %.09.i63 %252 = getelementptr inbounds nuw [8 x i8], ptr %6, i64 0, i64 %.sink12.i67 store i8 %250, ptr %252, align 1 @@ -34349,7 +34349,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %83 = trunc i8 %82 to i1 %84 = load i32, ptr %18, align 8 %85 = trunc i32 %84 to i8 - %86 = sub nuw nsw i64 3, %.09.i26 + %86 = xor i64 %.09.i26, 3 %.sink12.i30 = select i1 %83, i64 %86, i64 %.09.i26 %87 = getelementptr inbounds nuw [4 x i8], ptr %6, i64 0, i64 %.sink12.i30 store i8 %85, ptr %87, align 1 @@ -34402,7 +34402,7 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b %106 = trunc i8 %105 to i1 %107 = load i32, ptr %18, align 8 %108 = trunc i32 %107 to i8 - %109 = sub nuw nsw i64 7, %.09.i31 + %109 = xor i64 %.09.i31, 7 %.sink12.i35 = select i1 %106, i64 %109, i64 %.09.i31 %110 = getelementptr inbounds nuw [8 x i8], ptr %5, i64 0, i64 %.sink12.i35 store i8 %108, ptr %110, align 1 diff --git a/bench/nlohmann_json/optimized/unit-bjdata.cpp.ll b/bench/nlohmann_json/optimized/unit-bjdata.cpp.ll index 6d245e0d58f..e920f37fc18 100644 --- a/bench/nlohmann_json/optimized/unit-bjdata.cpp.ll +++ b/bench/nlohmann_json/optimized/unit-bjdata.cpp.ll @@ -123395,7 +123395,7 @@ if.end.i: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i = icmp eq i8 %5, 0 %6 = load i64, ptr %current.i.i, align 8 %conv7.i = trunc i64 %6 to i8 - %sub8.i = sub nuw nsw i64 7, %i.07.i + %sub8.i = xor i64 %i.07.i, 7 %sub8.sink.i = select i1 %cmp5.not.not.i, i64 %sub8.i, i64 %i.07.i %arrayidx.i.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec.i, i64 0, i64 %sub8.sink.i store i8 %conv7.i, ptr %arrayidx.i.i.i, align 1 @@ -123486,7 +123486,7 @@ if.end.i24: ; preds = %call2.i23.noexc %cmp5.not.not.i25 = icmp eq i8 %16, 0 %17 = load i64, ptr %current.i.i12, align 8 %conv7.i26 = trunc i64 %17 to i8 - %sub8.i27 = sub nuw nsw i64 3, %i.07.i15 + %sub8.i27 = xor i64 %i.07.i15, 3 %sub8.sink.i28 = select i1 %cmp5.not.not.i25, i64 %sub8.i27, i64 %i.07.i15 %arrayidx.i.i.i29 = getelementptr inbounds nuw [4 x i8], ptr %vec.i9, i64 0, i64 %sub8.sink.i28 store i8 %conv7.i26, ptr %arrayidx.i.i.i29, align 1 @@ -123672,7 +123672,7 @@ if.end.i52: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i53 = icmp eq i8 %40, 0 %41 = load i64, ptr %current.i.i40, align 8 %conv7.i54 = trunc i64 %41 to i8 - %sub8.i55 = sub nuw nsw i64 3, %i.07.i43 + %sub8.i55 = xor i64 %i.07.i43, 3 %sub8.sink.i56 = select i1 %cmp5.not.not.i53, i64 %sub8.i55, i64 %i.07.i43 %arrayidx.i.i.i57 = getelementptr inbounds nuw [4 x i8], ptr %vec.i37, i64 0, i64 %sub8.sink.i56 store i8 %conv7.i54, ptr %arrayidx.i.i.i57, align 1 @@ -123799,7 +123799,7 @@ if.end.i87: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i88 = icmp eq i8 %57, 0 %58 = load i64, ptr %current.i.i75, align 8 %conv7.i89 = trunc i64 %58 to i8 - %sub8.i90 = sub nuw nsw i64 3, %i.07.i78 + %sub8.i90 = xor i64 %i.07.i78, 3 %sub8.sink.i91 = select i1 %cmp5.not.not.i88, i64 %sub8.i90, i64 %i.07.i78 %arrayidx.i.i.i92 = getelementptr inbounds nuw [4 x i8], ptr %vec.i72, i64 0, i64 %sub8.sink.i91 store i8 %conv7.i89, ptr %arrayidx.i.i.i92, align 1 @@ -123861,7 +123861,7 @@ if.end.i114: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i115 = icmp eq i8 %66, 0 %67 = load i64, ptr %current.i.i102, align 8 %conv7.i116 = trunc i64 %67 to i8 - %sub8.i117 = sub nuw nsw i64 7, %i.07.i105 + %sub8.i117 = xor i64 %i.07.i105, 7 %sub8.sink.i118 = select i1 %cmp5.not.not.i115, i64 %sub8.i117, i64 %i.07.i105 %arrayidx.i.i.i119 = getelementptr inbounds nuw [8 x i8], ptr %vec.i99, i64 0, i64 %sub8.sink.i118 store i8 %conv7.i116, ptr %arrayidx.i.i.i119, align 1 @@ -126770,7 +126770,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -126828,7 +126828,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -127727,7 +127727,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -127785,7 +127785,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -129331,7 +129331,7 @@ if.end.i39: ; preds = %_ZN8nlohmann16json_ %19 = trunc i8 %18 to i1 %20 = load i64, ptr %current, align 8 %conv13.i40 = trunc i64 %20 to i8 - %sub10.i41 = sub nuw nsw i64 3, %i.08.i30 + %sub10.i41 = xor i64 %i.08.i30, 3 %sub10.sink.i42 = select i1 %19, i64 %sub10.i41, i64 %i.08.i30 %arrayidx.i.i.i43 = getelementptr inbounds nuw [4 x i8], ptr %vec.i24, i64 0, i64 %sub10.sink.i42 store i8 %conv13.i40, ptr %arrayidx.i.i.i43, align 1 @@ -129530,7 +129530,7 @@ if.end.i127: ; preds = %_ZN8nlohmann16json_ %50 = trunc i8 %49 to i1 %51 = load i64, ptr %current, align 8 %conv13.i129 = trunc i64 %51 to i8 - %sub10.i130 = sub nuw nsw i64 3, %i.08.i118 + %sub10.i130 = xor i64 %i.08.i118, 3 %sub10.sink.i131 = select i1 %50, i64 %sub10.i130, i64 %i.08.i118 %arrayidx.i.i.i132 = getelementptr inbounds nuw [4 x i8], ptr %vec.i112, i64 0, i64 %sub10.sink.i131 store i8 %conv13.i129, ptr %arrayidx.i.i.i132, align 1 @@ -129904,7 +129904,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -129962,7 +129962,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -130295,7 +130295,7 @@ if.end.i68: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %30, %36 %37 = load i64, ptr %current.i.i56, align 8 %conv13.i69 = trunc i64 %37 to i8 - %sub10.i70 = sub nuw nsw i64 3, %i.08.i59 + %sub10.i70 = xor i64 %i.08.i59, 3 %sub10.sink.i71 = select i1 %cmp7.not.i, i64 %i.08.i59, i64 %sub10.i70 %arrayidx.i.i.i72 = getelementptr inbounds nuw [4 x i8], ptr %vec.i53, i64 0, i64 %sub10.sink.i71 store i8 %conv13.i69, ptr %arrayidx.i.i.i72, align 1 @@ -130360,7 +130360,7 @@ if.end.i91: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i92 = xor i1 %41, %47 %48 = load i64, ptr %current.i.i79, align 8 %conv13.i93 = trunc i64 %48 to i8 - %sub10.i94 = sub nuw nsw i64 7, %i.08.i82 + %sub10.i94 = xor i64 %i.08.i82, 7 %sub10.sink.i95 = select i1 %cmp7.not.i92, i64 %i.08.i82, i64 %sub10.i94 %arrayidx.i.i.i96 = getelementptr inbounds nuw [8 x i8], ptr %vec.i76, i64 0, i64 %sub10.sink.i95 store i8 %conv13.i93, ptr %arrayidx.i.i.i96, align 1 @@ -130493,7 +130493,7 @@ if.end.i142: ; preds = %_ZN8nlohmann16json_ %68 = trunc i8 %67 to i1 %69 = load i64, ptr %current.i.i130, align 8 %conv13.i144 = trunc i64 %69 to i8 - %sub10.i145 = sub nuw nsw i64 3, %i.08.i133 + %sub10.i145 = xor i64 %i.08.i133, 3 %sub10.sink.i146 = select i1 %68, i64 %i.08.i133, i64 %sub10.i145 %arrayidx.i.i.i147 = getelementptr inbounds nuw [4 x i8], ptr %vec.i127, i64 0, i64 %sub10.sink.i146 store i8 %conv13.i144, ptr %arrayidx.i.i.i147, align 1 @@ -130560,7 +130560,7 @@ if.end.i168: ; preds = %_ZN8nlohmann16json_ %78 = trunc i8 %77 to i1 %79 = load i64, ptr %current.i.i156, align 8 %conv13.i170 = trunc i64 %79 to i8 - %sub10.i171 = sub nuw nsw i64 7, %i.08.i159 + %sub10.i171 = xor i64 %i.08.i159, 7 %sub10.sink.i172 = select i1 %78, i64 %i.08.i159, i64 %sub10.i171 %arrayidx.i.i.i173 = getelementptr inbounds nuw [8 x i8], ptr %vec.i153, i64 0, i64 %sub10.sink.i172 store i8 %conv13.i170, ptr %arrayidx.i.i.i173, align 1 @@ -130727,7 +130727,7 @@ if.end.i208: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i209 = xor i1 %97, %103 %104 = load i64, ptr %current.i.i196, align 8 %conv13.i210 = trunc i64 %104 to i8 - %sub10.i211 = sub nuw nsw i64 3, %i.08.i199 + %sub10.i211 = xor i64 %i.08.i199, 3 %sub10.sink.i212 = select i1 %cmp7.not.i209, i64 %i.08.i199, i64 %sub10.i211 %arrayidx.i.i.i213 = getelementptr inbounds nuw [4 x i8], ptr %vec.i193, i64 0, i64 %sub10.sink.i212 store i8 %conv13.i210, ptr %arrayidx.i.i.i213, align 1 @@ -130818,7 +130818,7 @@ if.end.i236: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i237 = xor i1 %110, %116 %117 = load i64, ptr %current.i.i224, align 8 %conv13.i238 = trunc i64 %117 to i8 - %sub10.i239 = sub nuw nsw i64 7, %i.08.i227 + %sub10.i239 = xor i64 %i.08.i227, 7 %sub10.sink.i240 = select i1 %cmp7.not.i237, i64 %i.08.i227, i64 %sub10.i239 %arrayidx.i.i.i241 = getelementptr inbounds nuw [8 x i8], ptr %vec.i221, i64 0, i64 %sub10.sink.i240 store i8 %conv13.i238, ptr %arrayidx.i.i.i241, align 1 @@ -132250,7 +132250,7 @@ if.end.i106: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %47, %53 %54 = load i64, ptr %current, align 8 %conv13.i107 = trunc i64 %54 to i8 - %sub10.i108 = sub nuw nsw i64 3, %i.08.i97 + %sub10.i108 = xor i64 %i.08.i97, 3 %sub10.sink.i109 = select i1 %cmp7.not.i, i64 %i.08.i97, i64 %sub10.i108 %arrayidx.i.i.i110 = getelementptr inbounds nuw [4 x i8], ptr %vec.i91, i64 0, i64 %sub10.sink.i109 store i8 %conv13.i107, ptr %arrayidx.i.i.i110, align 1 @@ -132339,7 +132339,7 @@ if.end.i148: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i149 = xor i1 %63, %69 %70 = load i64, ptr %current, align 8 %conv13.i150 = trunc i64 %70 to i8 - %sub10.i151 = sub nuw nsw i64 7, %i.08.i139 + %sub10.i151 = xor i64 %i.08.i139, 7 %sub10.sink.i152 = select i1 %cmp7.not.i149, i64 %i.08.i139, i64 %sub10.i151 %arrayidx.i.i.i153 = getelementptr inbounds nuw [8 x i8], ptr %vec.i133, i64 0, i64 %sub10.sink.i152 store i8 %conv13.i150, ptr %arrayidx.i.i.i153, align 1 @@ -132490,7 +132490,7 @@ if.end.i216: ; preds = %_ZN8nlohmann16json_ %95 = trunc i8 %94 to i1 %96 = load i64, ptr %current, align 8 %conv13.i218 = trunc i64 %96 to i8 - %sub10.i219 = sub nuw nsw i64 3, %i.08.i207 + %sub10.i219 = xor i64 %i.08.i207, 3 %sub10.sink.i220 = select i1 %95, i64 %i.08.i207, i64 %sub10.i219 %arrayidx.i.i.i221 = getelementptr inbounds nuw [4 x i8], ptr %vec.i201, i64 0, i64 %sub10.sink.i220 store i8 %conv13.i218, ptr %arrayidx.i.i.i221, align 1 @@ -132550,7 +132550,7 @@ if.end.i240: ; preds = %_ZN8nlohmann16json_ %105 = trunc i8 %104 to i1 %106 = load i64, ptr %current, align 8 %conv13.i242 = trunc i64 %106 to i8 - %sub10.i243 = sub nuw nsw i64 7, %i.08.i231 + %sub10.i243 = xor i64 %i.08.i231, 7 %sub10.sink.i244 = select i1 %105, i64 %i.08.i231, i64 %sub10.i243 %arrayidx.i.i.i245 = getelementptr inbounds nuw [8 x i8], ptr %vec.i225, i64 0, i64 %sub10.sink.i244 store i8 %conv13.i242, ptr %arrayidx.i.i.i245, align 1 @@ -134182,7 +134182,7 @@ if.end.i120: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %44, %50 %51 = load i64, ptr %current.i.i108, align 8 %conv13.i121 = trunc i64 %51 to i8 - %sub10.i122 = sub nuw nsw i64 3, %i.08.i111 + %sub10.i122 = xor i64 %i.08.i111, 3 %sub10.sink.i123 = select i1 %cmp7.not.i, i64 %i.08.i111, i64 %sub10.i122 %arrayidx.i.i.i124 = getelementptr inbounds nuw [4 x i8], ptr %vec.i105, i64 0, i64 %sub10.sink.i123 store i8 %conv13.i121, ptr %arrayidx.i.i.i124, align 1 @@ -134338,7 +134338,7 @@ if.end.i143: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i144 = xor i1 %63, %69 %70 = load i64, ptr %current.i.i131, align 8 %conv13.i145 = trunc i64 %70 to i8 - %sub10.i146 = sub nuw nsw i64 7, %i.08.i134 + %sub10.i146 = xor i64 %i.08.i134, 7 %sub10.sink.i147 = select i1 %cmp7.not.i144, i64 %i.08.i134, i64 %sub10.i146 %arrayidx.i.i.i148 = getelementptr inbounds nuw [8 x i8], ptr %vec.i128, i64 0, i64 %sub10.sink.i147 store i8 %conv13.i145, ptr %arrayidx.i.i.i148, align 1 @@ -134557,7 +134557,7 @@ if.end.i194: ; preds = %_ZN8nlohmann16json_ %97 = trunc i8 %96 to i1 %98 = load i64, ptr %current.i.i182, align 8 %conv13.i196 = trunc i64 %98 to i8 - %sub10.i197 = sub nuw nsw i64 3, %i.08.i185 + %sub10.i197 = xor i64 %i.08.i185, 3 %sub10.sink.i198 = select i1 %97, i64 %i.08.i185, i64 %sub10.i197 %arrayidx.i.i.i199 = getelementptr inbounds nuw [4 x i8], ptr %vec.i179, i64 0, i64 %sub10.sink.i198 store i8 %conv13.i196, ptr %arrayidx.i.i.i199, align 1 @@ -134619,7 +134619,7 @@ if.end.i218: ; preds = %_ZN8nlohmann16json_ %106 = trunc i8 %105 to i1 %107 = load i64, ptr %current.i.i206, align 8 %conv13.i220 = trunc i64 %107 to i8 - %sub10.i221 = sub nuw nsw i64 7, %i.08.i209 + %sub10.i221 = xor i64 %i.08.i209, 7 %sub10.sink.i222 = select i1 %106, i64 %i.08.i209, i64 %sub10.i221 %arrayidx.i.i.i223 = getelementptr inbounds nuw [8 x i8], ptr %vec.i203, i64 0, i64 %sub10.sink.i222 store i8 %conv13.i220, ptr %arrayidx.i.i.i223, align 1 @@ -161375,7 +161375,7 @@ if.end.i105: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %47, %53 %54 = load i64, ptr %current, align 8 %conv13.i106 = trunc i64 %54 to i8 - %sub10.i107 = sub nuw nsw i64 3, %i.08.i96 + %sub10.i107 = xor i64 %i.08.i96, 3 %sub10.sink.i108 = select i1 %cmp7.not.i, i64 %i.08.i96, i64 %sub10.i107 %arrayidx.i.i.i109 = getelementptr inbounds nuw [4 x i8], ptr %vec.i90, i64 0, i64 %sub10.sink.i108 store i8 %conv13.i106, ptr %arrayidx.i.i.i109, align 1 @@ -161464,7 +161464,7 @@ if.end.i147: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i148 = xor i1 %63, %69 %70 = load i64, ptr %current, align 8 %conv13.i149 = trunc i64 %70 to i8 - %sub10.i150 = sub nuw nsw i64 7, %i.08.i138 + %sub10.i150 = xor i64 %i.08.i138, 7 %sub10.sink.i151 = select i1 %cmp7.not.i148, i64 %i.08.i138, i64 %sub10.i150 %arrayidx.i.i.i152 = getelementptr inbounds nuw [8 x i8], ptr %vec.i132, i64 0, i64 %sub10.sink.i151 store i8 %conv13.i149, ptr %arrayidx.i.i.i152, align 1 @@ -161615,7 +161615,7 @@ if.end.i215: ; preds = %_ZN8nlohmann16json_ %95 = trunc i8 %94 to i1 %96 = load i64, ptr %current, align 8 %conv13.i217 = trunc i64 %96 to i8 - %sub10.i218 = sub nuw nsw i64 3, %i.08.i206 + %sub10.i218 = xor i64 %i.08.i206, 3 %sub10.sink.i219 = select i1 %95, i64 %i.08.i206, i64 %sub10.i218 %arrayidx.i.i.i220 = getelementptr inbounds nuw [4 x i8], ptr %vec.i200, i64 0, i64 %sub10.sink.i219 store i8 %conv13.i217, ptr %arrayidx.i.i.i220, align 1 @@ -161675,7 +161675,7 @@ if.end.i239: ; preds = %_ZN8nlohmann16json_ %105 = trunc i8 %104 to i1 %106 = load i64, ptr %current, align 8 %conv13.i241 = trunc i64 %106 to i8 - %sub10.i242 = sub nuw nsw i64 7, %i.08.i230 + %sub10.i242 = xor i64 %i.08.i230, 7 %sub10.sink.i243 = select i1 %105, i64 %i.08.i230, i64 %sub10.i242 %arrayidx.i.i.i244 = getelementptr inbounds nuw [8 x i8], ptr %vec.i224, i64 0, i64 %sub10.sink.i243 store i8 %conv13.i241, ptr %arrayidx.i.i.i244, align 1 @@ -162264,7 +162264,7 @@ if.end.i117: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %39, %45 %46 = load i64, ptr %current.i.i105, align 8 %conv13.i118 = trunc i64 %46 to i8 - %sub10.i119 = sub nuw nsw i64 3, %i.08.i108 + %sub10.i119 = xor i64 %i.08.i108, 3 %sub10.sink.i120 = select i1 %cmp7.not.i, i64 %i.08.i108, i64 %sub10.i119 %arrayidx.i.i.i121 = getelementptr inbounds nuw [4 x i8], ptr %vec.i102, i64 0, i64 %sub10.sink.i120 store i8 %conv13.i118, ptr %arrayidx.i.i.i121, align 1 @@ -162400,7 +162400,7 @@ if.end.i139: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i140 = xor i1 %55, %61 %62 = load i64, ptr %current.i.i127, align 8 %conv13.i141 = trunc i64 %62 to i8 - %sub10.i142 = sub nuw nsw i64 7, %i.08.i130 + %sub10.i142 = xor i64 %i.08.i130, 7 %sub10.sink.i143 = select i1 %cmp7.not.i140, i64 %i.08.i130, i64 %sub10.i142 %arrayidx.i.i.i144 = getelementptr inbounds nuw [8 x i8], ptr %vec.i124, i64 0, i64 %sub10.sink.i143 store i8 %conv13.i141, ptr %arrayidx.i.i.i144, align 1 @@ -162599,7 +162599,7 @@ if.end.i188: ; preds = %_ZN8nlohmann16json_ %86 = trunc i8 %85 to i1 %87 = load i64, ptr %current.i.i176, align 8 %conv13.i190 = trunc i64 %87 to i8 - %sub10.i191 = sub nuw nsw i64 3, %i.08.i179 + %sub10.i191 = xor i64 %i.08.i179, 3 %sub10.sink.i192 = select i1 %86, i64 %i.08.i179, i64 %sub10.i191 %arrayidx.i.i.i193 = getelementptr inbounds nuw [4 x i8], ptr %vec.i173, i64 0, i64 %sub10.sink.i192 store i8 %conv13.i190, ptr %arrayidx.i.i.i193, align 1 @@ -162661,7 +162661,7 @@ if.end.i212: ; preds = %_ZN8nlohmann16json_ %95 = trunc i8 %94 to i1 %96 = load i64, ptr %current.i.i200, align 8 %conv13.i214 = trunc i64 %96 to i8 - %sub10.i215 = sub nuw nsw i64 7, %i.08.i203 + %sub10.i215 = xor i64 %i.08.i203, 7 %sub10.sink.i216 = select i1 %95, i64 %i.08.i203, i64 %sub10.i215 %arrayidx.i.i.i217 = getelementptr inbounds nuw [8 x i8], ptr %vec.i197, i64 0, i64 %sub10.sink.i216 store i8 %conv13.i214, ptr %arrayidx.i.i.i217, align 1 @@ -176344,7 +176344,7 @@ if.end.i: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i = icmp eq i8 %4, 0 %5 = load i32, ptr %current.i.i, align 8 %conv7.i = trunc i32 %5 to i8 - %sub8.i = sub nuw nsw i64 7, %i.07.i + %sub8.i = xor i64 %i.07.i, 7 %sub8.sink.i = select i1 %cmp5.not.not.i, i64 %sub8.i, i64 %i.07.i %arrayidx.i.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec.i, i64 0, i64 %sub8.sink.i store i8 %conv7.i, ptr %arrayidx.i.i.i, align 1 @@ -176444,7 +176444,7 @@ if.end.i21: ; preds = %call2.i20.noexc %cmp5.not.not.i22 = icmp eq i8 %14, 0 %15 = load i32, ptr %current.i.i12, align 8 %conv7.i23 = trunc i32 %15 to i8 - %sub8.i24 = sub nuw nsw i64 3, %i.07.i15 + %sub8.i24 = xor i64 %i.07.i15, 3 %sub8.sink.i25 = select i1 %cmp5.not.not.i22, i64 %sub8.i24, i64 %i.07.i15 %arrayidx.i.i.i26 = getelementptr inbounds nuw [4 x i8], ptr %vec.i9, i64 0, i64 %sub8.sink.i25 store i8 %conv7.i23, ptr %arrayidx.i.i.i26, align 1 @@ -176590,7 +176590,7 @@ if.end.i55: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i56 = icmp eq i8 %29, 0 %30 = load i32, ptr %current.i.i46, align 8 %conv7.i57 = trunc i32 %30 to i8 - %sub8.i58 = sub nuw nsw i64 3, %i.07.i49 + %sub8.i58 = xor i64 %i.07.i49, 3 %sub8.sink.i59 = select i1 %cmp5.not.not.i56, i64 %sub8.i58, i64 %i.07.i49 %arrayidx.i.i.i60 = getelementptr inbounds nuw [4 x i8], ptr %vec.i43, i64 0, i64 %sub8.sink.i59 store i8 %conv7.i57, ptr %arrayidx.i.i.i60, align 1 @@ -176723,7 +176723,7 @@ if.end.i97: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i98 = icmp eq i8 %44, 0 %45 = load i32, ptr %current.i.i88, align 8 %conv7.i99 = trunc i32 %45 to i8 - %sub8.i100 = sub nuw nsw i64 3, %i.07.i91 + %sub8.i100 = xor i64 %i.07.i91, 3 %sub8.sink.i101 = select i1 %cmp5.not.not.i98, i64 %sub8.i100, i64 %i.07.i91 %arrayidx.i.i.i102 = getelementptr inbounds nuw [4 x i8], ptr %vec.i85, i64 0, i64 %sub8.sink.i101 store i8 %conv7.i99, ptr %arrayidx.i.i.i102, align 1 @@ -176788,7 +176788,7 @@ if.end.i128: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i129 = icmp eq i8 %52, 0 %53 = load i32, ptr %current.i.i119, align 8 %conv7.i130 = trunc i32 %53 to i8 - %sub8.i131 = sub nuw nsw i64 7, %i.07.i122 + %sub8.i131 = xor i64 %i.07.i122, 7 %sub8.sink.i132 = select i1 %cmp5.not.not.i129, i64 %sub8.i131, i64 %i.07.i122 %arrayidx.i.i.i133 = getelementptr inbounds nuw [8 x i8], ptr %vec.i116, i64 0, i64 %sub8.sink.i132 store i8 %conv7.i130, ptr %arrayidx.i.i.i133, align 1 @@ -177629,7 +177629,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -177690,7 +177690,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -178599,7 +178599,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -178660,7 +178660,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -179863,7 +179863,7 @@ if.end.i40: ; preds = %_ZN8nlohmann16json_ %16 = trunc i8 %15 to i1 %17 = load i32, ptr %current, align 8 %conv13.i41 = trunc i32 %17 to i8 - %sub10.i42 = sub nuw nsw i64 3, %i.08.i34 + %sub10.i42 = xor i64 %i.08.i34, 3 %sub10.sink.i43 = select i1 %16, i64 %sub10.i42, i64 %i.08.i34 %arrayidx.i.i.i44 = getelementptr inbounds nuw [4 x i8], ptr %vec.i28, i64 0, i64 %sub10.sink.i43 store i8 %conv13.i41, ptr %arrayidx.i.i.i44, align 1 @@ -180079,7 +180079,7 @@ if.end.i148: ; preds = %_ZN8nlohmann16json_ %44 = trunc i8 %43 to i1 %45 = load i32, ptr %current, align 8 %conv13.i150 = trunc i32 %45 to i8 - %sub10.i151 = sub nuw nsw i64 3, %i.08.i142 + %sub10.i151 = xor i64 %i.08.i142, 3 %sub10.sink.i152 = select i1 %44, i64 %sub10.i151, i64 %i.08.i142 %arrayidx.i.i.i153 = getelementptr inbounds nuw [4 x i8], ptr %vec.i136, i64 0, i64 %sub10.sink.i152 store i8 %conv13.i150, ptr %arrayidx.i.i.i153, align 1 @@ -180486,7 +180486,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -180547,7 +180547,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -180866,7 +180866,7 @@ if.end.i73: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %28, %33 %34 = load i32, ptr %current.i.i64, align 8 %conv13.i74 = trunc i32 %34 to i8 - %sub10.i75 = sub nuw nsw i64 3, %i.08.i67 + %sub10.i75 = xor i64 %i.08.i67, 3 %sub10.sink.i76 = select i1 %cmp7.not.i, i64 %i.08.i67, i64 %sub10.i75 %arrayidx.i.i.i77 = getelementptr inbounds nuw [4 x i8], ptr %vec.i61, i64 0, i64 %sub10.sink.i76 store i8 %conv13.i74, ptr %arrayidx.i.i.i77, align 1 @@ -180934,7 +180934,7 @@ if.end.i100: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i101 = xor i1 %38, %43 %44 = load i32, ptr %current.i.i91, align 8 %conv13.i102 = trunc i32 %44 to i8 - %sub10.i103 = sub nuw nsw i64 7, %i.08.i94 + %sub10.i103 = xor i64 %i.08.i94, 7 %sub10.sink.i104 = select i1 %cmp7.not.i101, i64 %i.08.i94, i64 %sub10.i103 %arrayidx.i.i.i105 = getelementptr inbounds nuw [8 x i8], ptr %vec.i88, i64 0, i64 %sub10.sink.i104 store i8 %conv13.i102, ptr %arrayidx.i.i.i105, align 1 @@ -181073,7 +181073,7 @@ if.end.i159: ; preds = %_ZN8nlohmann16json_ %62 = trunc i8 %61 to i1 %63 = load i32, ptr %current.i.i150, align 8 %conv13.i161 = trunc i32 %63 to i8 - %sub10.i162 = sub nuw nsw i64 3, %i.08.i153 + %sub10.i162 = xor i64 %i.08.i153, 3 %sub10.sink.i163 = select i1 %62, i64 %i.08.i153, i64 %sub10.i162 %arrayidx.i.i.i164 = getelementptr inbounds nuw [4 x i8], ptr %vec.i147, i64 0, i64 %sub10.sink.i163 store i8 %conv13.i161, ptr %arrayidx.i.i.i164, align 1 @@ -181143,7 +181143,7 @@ if.end.i189: ; preds = %_ZN8nlohmann16json_ %71 = trunc i8 %70 to i1 %72 = load i32, ptr %current.i.i180, align 8 %conv13.i191 = trunc i32 %72 to i8 - %sub10.i192 = sub nuw nsw i64 7, %i.08.i183 + %sub10.i192 = xor i64 %i.08.i183, 7 %sub10.sink.i193 = select i1 %71, i64 %i.08.i183, i64 %sub10.i192 %arrayidx.i.i.i194 = getelementptr inbounds nuw [8 x i8], ptr %vec.i177, i64 0, i64 %sub10.sink.i193 store i8 %conv13.i191, ptr %arrayidx.i.i.i194, align 1 @@ -181298,7 +181298,7 @@ if.end.i223: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i224 = xor i1 %86, %91 %92 = load i32, ptr %current.i.i214, align 8 %conv13.i225 = trunc i32 %92 to i8 - %sub10.i226 = sub nuw nsw i64 3, %i.08.i217 + %sub10.i226 = xor i64 %i.08.i217, 3 %sub10.sink.i227 = select i1 %cmp7.not.i224, i64 %i.08.i217, i64 %sub10.i226 %arrayidx.i.i.i228 = getelementptr inbounds nuw [4 x i8], ptr %vec.i211, i64 0, i64 %sub10.sink.i227 store i8 %conv13.i225, ptr %arrayidx.i.i.i228, align 1 @@ -181392,7 +181392,7 @@ if.end.i255: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i256 = xor i1 %98, %103 %104 = load i32, ptr %current.i.i246, align 8 %conv13.i257 = trunc i32 %104 to i8 - %sub10.i258 = sub nuw nsw i64 7, %i.08.i249 + %sub10.i258 = xor i64 %i.08.i249, 7 %sub10.sink.i259 = select i1 %cmp7.not.i256, i64 %i.08.i249, i64 %sub10.i258 %arrayidx.i.i.i260 = getelementptr inbounds nuw [8 x i8], ptr %vec.i243, i64 0, i64 %sub10.sink.i259 store i8 %conv13.i257, ptr %arrayidx.i.i.i260, align 1 @@ -182831,7 +182831,7 @@ if.end.i123: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %40, %45 %46 = load i32, ptr %current, align 8 %conv13.i124 = trunc i32 %46 to i8 - %sub10.i125 = sub nuw nsw i64 3, %i.08.i117 + %sub10.i125 = xor i64 %i.08.i117, 3 %sub10.sink.i126 = select i1 %cmp7.not.i, i64 %i.08.i117, i64 %sub10.i125 %arrayidx.i.i.i127 = getelementptr inbounds nuw [4 x i8], ptr %vec.i111, i64 0, i64 %sub10.sink.i126 store i8 %conv13.i124, ptr %arrayidx.i.i.i127, align 1 @@ -182926,7 +182926,7 @@ if.end.i173: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i174 = xor i1 %54, %59 %60 = load i32, ptr %current, align 8 %conv13.i175 = trunc i32 %60 to i8 - %sub10.i176 = sub nuw nsw i64 7, %i.08.i167 + %sub10.i176 = xor i64 %i.08.i167, 7 %sub10.sink.i177 = select i1 %cmp7.not.i174, i64 %i.08.i167, i64 %sub10.i176 %arrayidx.i.i.i178 = getelementptr inbounds nuw [8 x i8], ptr %vec.i161, i64 0, i64 %sub10.sink.i177 store i8 %conv13.i175, ptr %arrayidx.i.i.i178, align 1 @@ -183086,7 +183086,7 @@ if.end.i253: ; preds = %_ZN8nlohmann16json_ %82 = trunc i8 %81 to i1 %83 = load i32, ptr %current, align 8 %conv13.i255 = trunc i32 %83 to i8 - %sub10.i256 = sub nuw nsw i64 3, %i.08.i247 + %sub10.i256 = xor i64 %i.08.i247, 3 %sub10.sink.i257 = select i1 %82, i64 %i.08.i247, i64 %sub10.i256 %arrayidx.i.i.i258 = getelementptr inbounds nuw [4 x i8], ptr %vec.i241, i64 0, i64 %sub10.sink.i257 store i8 %conv13.i255, ptr %arrayidx.i.i.i258, align 1 @@ -183149,7 +183149,7 @@ if.end.i281: ; preds = %_ZN8nlohmann16json_ %91 = trunc i8 %90 to i1 %92 = load i32, ptr %current, align 8 %conv13.i283 = trunc i32 %92 to i8 - %sub10.i284 = sub nuw nsw i64 7, %i.08.i275 + %sub10.i284 = xor i64 %i.08.i275, 7 %sub10.sink.i285 = select i1 %91, i64 %i.08.i275, i64 %sub10.i284 %arrayidx.i.i.i286 = getelementptr inbounds nuw [8 x i8], ptr %vec.i269, i64 0, i64 %sub10.sink.i285 store i8 %conv13.i283, ptr %arrayidx.i.i.i286, align 1 @@ -184803,7 +184803,7 @@ if.end.i130: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %43, %48 %49 = load i32, ptr %current.i.i121, align 8 %conv13.i131 = trunc i32 %49 to i8 - %sub10.i132 = sub nuw nsw i64 3, %i.08.i124 + %sub10.i132 = xor i64 %i.08.i124, 3 %sub10.sink.i133 = select i1 %cmp7.not.i, i64 %i.08.i124, i64 %sub10.i132 %arrayidx.i.i.i134 = getelementptr inbounds nuw [4 x i8], ptr %vec.i118, i64 0, i64 %sub10.sink.i133 store i8 %conv13.i131, ptr %arrayidx.i.i.i134, align 1 @@ -184962,7 +184962,7 @@ if.end.i157: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i158 = xor i1 %61, %66 %67 = load i32, ptr %current.i.i148, align 8 %conv13.i159 = trunc i32 %67 to i8 - %sub10.i160 = sub nuw nsw i64 7, %i.08.i151 + %sub10.i160 = xor i64 %i.08.i151, 7 %sub10.sink.i161 = select i1 %cmp7.not.i158, i64 %i.08.i151, i64 %sub10.i160 %arrayidx.i.i.i162 = getelementptr inbounds nuw [8 x i8], ptr %vec.i145, i64 0, i64 %sub10.sink.i161 store i8 %conv13.i159, ptr %arrayidx.i.i.i162, align 1 @@ -185187,7 +185187,7 @@ if.end.i217: ; preds = %_ZN8nlohmann16json_ %92 = trunc i8 %91 to i1 %93 = load i32, ptr %current.i.i208, align 8 %conv13.i219 = trunc i32 %93 to i8 - %sub10.i220 = sub nuw nsw i64 3, %i.08.i211 + %sub10.i220 = xor i64 %i.08.i211, 3 %sub10.sink.i221 = select i1 %92, i64 %i.08.i211, i64 %sub10.i220 %arrayidx.i.i.i222 = getelementptr inbounds nuw [4 x i8], ptr %vec.i205, i64 0, i64 %sub10.sink.i221 store i8 %conv13.i219, ptr %arrayidx.i.i.i222, align 1 @@ -185252,7 +185252,7 @@ if.end.i245: ; preds = %_ZN8nlohmann16json_ %100 = trunc i8 %99 to i1 %101 = load i32, ptr %current.i.i236, align 8 %conv13.i247 = trunc i32 %101 to i8 - %sub10.i248 = sub nuw nsw i64 7, %i.08.i239 + %sub10.i248 = xor i64 %i.08.i239, 7 %sub10.sink.i249 = select i1 %100, i64 %i.08.i239, i64 %sub10.i248 %arrayidx.i.i.i250 = getelementptr inbounds nuw [8 x i8], ptr %vec.i233, i64 0, i64 %sub10.sink.i249 store i8 %conv13.i247, ptr %arrayidx.i.i.i250, align 1 diff --git a/bench/nlohmann_json/optimized/unit-class_parser.cpp.ll b/bench/nlohmann_json/optimized/unit-class_parser.cpp.ll index 8760ea31a1e..b0414d995f4 100644 --- a/bench/nlohmann_json/optimized/unit-class_parser.cpp.ll +++ b/bench/nlohmann_json/optimized/unit-class_parser.cpp.ll @@ -88358,7 +88358,7 @@ if.end.i: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i = icmp eq i8 %5, 0 %6 = load i32, ptr %current.i.i, align 8 %conv7.i = trunc i32 %6 to i8 - %sub8.i = sub nuw nsw i64 7, %i.07.i + %sub8.i = xor i64 %i.07.i, 7 %sub8.sink.i = select i1 %cmp5.not.not.i, i64 %sub8.i, i64 %i.07.i %arrayidx.i.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec.i, i64 0, i64 %sub8.sink.i store i8 %conv7.i, ptr %arrayidx.i.i.i, align 1 @@ -88449,7 +88449,7 @@ if.end.i24: ; preds = %call2.i23.noexc %cmp5.not.not.i25 = icmp eq i8 %16, 0 %17 = load i32, ptr %current.i.i12, align 8 %conv7.i26 = trunc i32 %17 to i8 - %sub8.i27 = sub nuw nsw i64 3, %i.07.i15 + %sub8.i27 = xor i64 %i.07.i15, 3 %sub8.sink.i28 = select i1 %cmp5.not.not.i25, i64 %sub8.i27, i64 %i.07.i15 %arrayidx.i.i.i29 = getelementptr inbounds nuw [4 x i8], ptr %vec.i9, i64 0, i64 %sub8.sink.i28 store i8 %conv7.i26, ptr %arrayidx.i.i.i29, align 1 @@ -88635,7 +88635,7 @@ if.end.i52: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i53 = icmp eq i8 %40, 0 %41 = load i32, ptr %current.i.i40, align 8 %conv7.i54 = trunc i32 %41 to i8 - %sub8.i55 = sub nuw nsw i64 3, %i.07.i43 + %sub8.i55 = xor i64 %i.07.i43, 3 %sub8.sink.i56 = select i1 %cmp5.not.not.i53, i64 %sub8.i55, i64 %i.07.i43 %arrayidx.i.i.i57 = getelementptr inbounds nuw [4 x i8], ptr %vec.i37, i64 0, i64 %sub8.sink.i56 store i8 %conv7.i54, ptr %arrayidx.i.i.i57, align 1 @@ -88762,7 +88762,7 @@ if.end.i87: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i88 = icmp eq i8 %57, 0 %58 = load i32, ptr %current.i.i75, align 8 %conv7.i89 = trunc i32 %58 to i8 - %sub8.i90 = sub nuw nsw i64 3, %i.07.i78 + %sub8.i90 = xor i64 %i.07.i78, 3 %sub8.sink.i91 = select i1 %cmp5.not.not.i88, i64 %sub8.i90, i64 %i.07.i78 %arrayidx.i.i.i92 = getelementptr inbounds nuw [4 x i8], ptr %vec.i72, i64 0, i64 %sub8.sink.i91 store i8 %conv7.i89, ptr %arrayidx.i.i.i92, align 1 @@ -88824,7 +88824,7 @@ if.end.i114: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i115 = icmp eq i8 %66, 0 %67 = load i32, ptr %current.i.i102, align 8 %conv7.i116 = trunc i32 %67 to i8 - %sub8.i117 = sub nuw nsw i64 7, %i.07.i105 + %sub8.i117 = xor i64 %i.07.i105, 7 %sub8.sink.i118 = select i1 %cmp5.not.not.i115, i64 %sub8.i117, i64 %i.07.i105 %arrayidx.i.i.i119 = getelementptr inbounds nuw [8 x i8], ptr %vec.i99, i64 0, i64 %sub8.sink.i118 store i8 %conv7.i116, ptr %arrayidx.i.i.i119, align 1 @@ -89963,7 +89963,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -90021,7 +90021,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -90918,7 +90918,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -90976,7 +90976,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -92345,7 +92345,7 @@ if.end.i39: ; preds = %_ZN8nlohmann16json_ %19 = trunc i8 %18 to i1 %20 = load i32, ptr %current, align 8 %conv13.i40 = trunc i32 %20 to i8 - %sub10.i41 = sub nuw nsw i64 3, %i.08.i30 + %sub10.i41 = xor i64 %i.08.i30, 3 %sub10.sink.i42 = select i1 %19, i64 %sub10.i41, i64 %i.08.i30 %arrayidx.i.i.i43 = getelementptr inbounds nuw [4 x i8], ptr %vec.i24, i64 0, i64 %sub10.sink.i42 store i8 %conv13.i40, ptr %arrayidx.i.i.i43, align 1 @@ -92546,7 +92546,7 @@ if.end.i127: ; preds = %_ZN8nlohmann16json_ %52 = trunc i8 %51 to i1 %53 = load i32, ptr %current, align 8 %conv13.i129 = trunc i32 %53 to i8 - %sub10.i130 = sub nuw nsw i64 3, %i.08.i118 + %sub10.i130 = xor i64 %i.08.i118, 3 %sub10.sink.i131 = select i1 %52, i64 %sub10.i130, i64 %i.08.i118 %arrayidx.i.i.i132 = getelementptr inbounds nuw [4 x i8], ptr %vec.i112, i64 0, i64 %sub10.sink.i131 store i8 %conv13.i129, ptr %arrayidx.i.i.i132, align 1 @@ -92926,7 +92926,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -92984,7 +92984,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -93319,7 +93319,7 @@ if.end.i68: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %31, %37 %38 = load i32, ptr %current.i.i56, align 8 %conv13.i69 = trunc i32 %38 to i8 - %sub10.i70 = sub nuw nsw i64 3, %i.08.i59 + %sub10.i70 = xor i64 %i.08.i59, 3 %sub10.sink.i71 = select i1 %cmp7.not.i, i64 %i.08.i59, i64 %sub10.i70 %arrayidx.i.i.i72 = getelementptr inbounds nuw [4 x i8], ptr %vec.i53, i64 0, i64 %sub10.sink.i71 store i8 %conv13.i69, ptr %arrayidx.i.i.i72, align 1 @@ -93384,7 +93384,7 @@ if.end.i91: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i92 = xor i1 %42, %48 %49 = load i32, ptr %current.i.i79, align 8 %conv13.i93 = trunc i32 %49 to i8 - %sub10.i94 = sub nuw nsw i64 7, %i.08.i82 + %sub10.i94 = xor i64 %i.08.i82, 7 %sub10.sink.i95 = select i1 %cmp7.not.i92, i64 %i.08.i82, i64 %sub10.i94 %arrayidx.i.i.i96 = getelementptr inbounds nuw [8 x i8], ptr %vec.i76, i64 0, i64 %sub10.sink.i95 store i8 %conv13.i93, ptr %arrayidx.i.i.i96, align 1 @@ -93517,7 +93517,7 @@ if.end.i142: ; preds = %_ZN8nlohmann16json_ %69 = trunc i8 %68 to i1 %70 = load i32, ptr %current.i.i130, align 8 %conv13.i144 = trunc i32 %70 to i8 - %sub10.i145 = sub nuw nsw i64 3, %i.08.i133 + %sub10.i145 = xor i64 %i.08.i133, 3 %sub10.sink.i146 = select i1 %69, i64 %i.08.i133, i64 %sub10.i145 %arrayidx.i.i.i147 = getelementptr inbounds nuw [4 x i8], ptr %vec.i127, i64 0, i64 %sub10.sink.i146 store i8 %conv13.i144, ptr %arrayidx.i.i.i147, align 1 @@ -93584,7 +93584,7 @@ if.end.i168: ; preds = %_ZN8nlohmann16json_ %79 = trunc i8 %78 to i1 %80 = load i32, ptr %current.i.i156, align 8 %conv13.i170 = trunc i32 %80 to i8 - %sub10.i171 = sub nuw nsw i64 7, %i.08.i159 + %sub10.i171 = xor i64 %i.08.i159, 7 %sub10.sink.i172 = select i1 %79, i64 %i.08.i159, i64 %sub10.i171 %arrayidx.i.i.i173 = getelementptr inbounds nuw [8 x i8], ptr %vec.i153, i64 0, i64 %sub10.sink.i172 store i8 %conv13.i170, ptr %arrayidx.i.i.i173, align 1 @@ -93749,7 +93749,7 @@ if.end.i208: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i209 = xor i1 %98, %104 %105 = load i32, ptr %current.i.i196, align 8 %conv13.i210 = trunc i32 %105 to i8 - %sub10.i211 = sub nuw nsw i64 3, %i.08.i199 + %sub10.i211 = xor i64 %i.08.i199, 3 %sub10.sink.i212 = select i1 %cmp7.not.i209, i64 %i.08.i199, i64 %sub10.i211 %arrayidx.i.i.i213 = getelementptr inbounds nuw [4 x i8], ptr %vec.i193, i64 0, i64 %sub10.sink.i212 store i8 %conv13.i210, ptr %arrayidx.i.i.i213, align 1 @@ -93840,7 +93840,7 @@ if.end.i236: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i237 = xor i1 %111, %117 %118 = load i32, ptr %current.i.i224, align 8 %conv13.i238 = trunc i32 %118 to i8 - %sub10.i239 = sub nuw nsw i64 7, %i.08.i227 + %sub10.i239 = xor i64 %i.08.i227, 7 %sub10.sink.i240 = select i1 %cmp7.not.i237, i64 %i.08.i227, i64 %sub10.i239 %arrayidx.i.i.i241 = getelementptr inbounds nuw [8 x i8], ptr %vec.i221, i64 0, i64 %sub10.sink.i240 store i8 %conv13.i238, ptr %arrayidx.i.i.i241, align 1 @@ -95271,7 +95271,7 @@ if.end.i106: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %47, %53 %54 = load i32, ptr %current, align 8 %conv13.i107 = trunc i32 %54 to i8 - %sub10.i108 = sub nuw nsw i64 3, %i.08.i97 + %sub10.i108 = xor i64 %i.08.i97, 3 %sub10.sink.i109 = select i1 %cmp7.not.i, i64 %i.08.i97, i64 %sub10.i108 %arrayidx.i.i.i110 = getelementptr inbounds nuw [4 x i8], ptr %vec.i91, i64 0, i64 %sub10.sink.i109 store i8 %conv13.i107, ptr %arrayidx.i.i.i110, align 1 @@ -95360,7 +95360,7 @@ if.end.i148: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i149 = xor i1 %63, %69 %70 = load i32, ptr %current, align 8 %conv13.i150 = trunc i32 %70 to i8 - %sub10.i151 = sub nuw nsw i64 7, %i.08.i139 + %sub10.i151 = xor i64 %i.08.i139, 7 %sub10.sink.i152 = select i1 %cmp7.not.i149, i64 %i.08.i139, i64 %sub10.i151 %arrayidx.i.i.i153 = getelementptr inbounds nuw [8 x i8], ptr %vec.i133, i64 0, i64 %sub10.sink.i152 store i8 %conv13.i150, ptr %arrayidx.i.i.i153, align 1 @@ -95511,7 +95511,7 @@ if.end.i216: ; preds = %_ZN8nlohmann16json_ %95 = trunc i8 %94 to i1 %96 = load i32, ptr %current, align 8 %conv13.i218 = trunc i32 %96 to i8 - %sub10.i219 = sub nuw nsw i64 3, %i.08.i207 + %sub10.i219 = xor i64 %i.08.i207, 3 %sub10.sink.i220 = select i1 %95, i64 %i.08.i207, i64 %sub10.i219 %arrayidx.i.i.i221 = getelementptr inbounds nuw [4 x i8], ptr %vec.i201, i64 0, i64 %sub10.sink.i220 store i8 %conv13.i218, ptr %arrayidx.i.i.i221, align 1 @@ -95571,7 +95571,7 @@ if.end.i240: ; preds = %_ZN8nlohmann16json_ %105 = trunc i8 %104 to i1 %106 = load i32, ptr %current, align 8 %conv13.i242 = trunc i32 %106 to i8 - %sub10.i243 = sub nuw nsw i64 7, %i.08.i231 + %sub10.i243 = xor i64 %i.08.i231, 7 %sub10.sink.i244 = select i1 %105, i64 %i.08.i231, i64 %sub10.i243 %arrayidx.i.i.i245 = getelementptr inbounds nuw [8 x i8], ptr %vec.i225, i64 0, i64 %sub10.sink.i244 store i8 %conv13.i242, ptr %arrayidx.i.i.i245, align 1 @@ -97202,7 +97202,7 @@ if.end.i120: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %45, %51 %52 = load i32, ptr %current.i.i108, align 8 %conv13.i121 = trunc i32 %52 to i8 - %sub10.i122 = sub nuw nsw i64 3, %i.08.i111 + %sub10.i122 = xor i64 %i.08.i111, 3 %sub10.sink.i123 = select i1 %cmp7.not.i, i64 %i.08.i111, i64 %sub10.i122 %arrayidx.i.i.i124 = getelementptr inbounds nuw [4 x i8], ptr %vec.i105, i64 0, i64 %sub10.sink.i123 store i8 %conv13.i121, ptr %arrayidx.i.i.i124, align 1 @@ -97358,7 +97358,7 @@ if.end.i143: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i144 = xor i1 %64, %70 %71 = load i32, ptr %current.i.i131, align 8 %conv13.i145 = trunc i32 %71 to i8 - %sub10.i146 = sub nuw nsw i64 7, %i.08.i134 + %sub10.i146 = xor i64 %i.08.i134, 7 %sub10.sink.i147 = select i1 %cmp7.not.i144, i64 %i.08.i134, i64 %sub10.i146 %arrayidx.i.i.i148 = getelementptr inbounds nuw [8 x i8], ptr %vec.i128, i64 0, i64 %sub10.sink.i147 store i8 %conv13.i145, ptr %arrayidx.i.i.i148, align 1 @@ -97577,7 +97577,7 @@ if.end.i194: ; preds = %_ZN8nlohmann16json_ %98 = trunc i8 %97 to i1 %99 = load i32, ptr %current.i.i182, align 8 %conv13.i196 = trunc i32 %99 to i8 - %sub10.i197 = sub nuw nsw i64 3, %i.08.i185 + %sub10.i197 = xor i64 %i.08.i185, 3 %sub10.sink.i198 = select i1 %98, i64 %i.08.i185, i64 %sub10.i197 %arrayidx.i.i.i199 = getelementptr inbounds nuw [4 x i8], ptr %vec.i179, i64 0, i64 %sub10.sink.i198 store i8 %conv13.i196, ptr %arrayidx.i.i.i199, align 1 @@ -97639,7 +97639,7 @@ if.end.i218: ; preds = %_ZN8nlohmann16json_ %107 = trunc i8 %106 to i1 %108 = load i32, ptr %current.i.i206, align 8 %conv13.i220 = trunc i32 %108 to i8 - %sub10.i221 = sub nuw nsw i64 7, %i.08.i209 + %sub10.i221 = xor i64 %i.08.i209, 7 %sub10.sink.i222 = select i1 %107, i64 %i.08.i209, i64 %sub10.i221 %arrayidx.i.i.i223 = getelementptr inbounds nuw [8 x i8], ptr %vec.i203, i64 0, i64 %sub10.sink.i222 store i8 %conv13.i220, ptr %arrayidx.i.i.i223, align 1 diff --git a/bench/nlohmann_json/optimized/unit-regression1.cpp.ll b/bench/nlohmann_json/optimized/unit-regression1.cpp.ll index 668c90c1205..fd8367cc0e6 100644 --- a/bench/nlohmann_json/optimized/unit-regression1.cpp.ll +++ b/bench/nlohmann_json/optimized/unit-regression1.cpp.ll @@ -121068,7 +121068,7 @@ if.end.i: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i = icmp eq i8 %5, 0 %6 = load i64, ptr %current.i.i, align 8 %conv7.i = trunc i64 %6 to i8 - %sub8.i = sub nuw nsw i64 7, %i.07.i + %sub8.i = xor i64 %i.07.i, 7 %sub8.sink.i = select i1 %cmp5.not.not.i, i64 %sub8.i, i64 %i.07.i %arrayidx.i.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec.i, i64 0, i64 %sub8.sink.i store i8 %conv7.i, ptr %arrayidx.i.i.i, align 1 @@ -121194,7 +121194,7 @@ if.end.i27: ; preds = %call2.i26.noexc %cmp5.not.not.i28 = icmp eq i8 %19, 0 %20 = load i64, ptr %current.i.i15, align 8 %conv7.i29 = trunc i64 %20 to i8 - %sub8.i30 = sub nuw nsw i64 3, %i.07.i18 + %sub8.i30 = xor i64 %i.07.i18, 3 %sub8.sink.i31 = select i1 %cmp5.not.not.i28, i64 %sub8.i30, i64 %i.07.i18 %arrayidx.i.i.i32 = getelementptr inbounds nuw [4 x i8], ptr %vec.i12, i64 0, i64 %sub8.sink.i31 store i8 %conv7.i29, ptr %arrayidx.i.i.i32, align 1 @@ -121380,7 +121380,7 @@ if.end.i56: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i57 = icmp eq i8 %43, 0 %44 = load i64, ptr %current.i.i44, align 8 %conv7.i58 = trunc i64 %44 to i8 - %sub8.i59 = sub nuw nsw i64 3, %i.07.i47 + %sub8.i59 = xor i64 %i.07.i47, 3 %sub8.sink.i60 = select i1 %cmp5.not.not.i57, i64 %sub8.i59, i64 %i.07.i47 %arrayidx.i.i.i61 = getelementptr inbounds nuw [4 x i8], ptr %vec.i41, i64 0, i64 %sub8.sink.i60 store i8 %conv7.i58, ptr %arrayidx.i.i.i61, align 1 @@ -121507,7 +121507,7 @@ if.end.i91: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i92 = icmp eq i8 %60, 0 %61 = load i64, ptr %current.i.i79, align 8 %conv7.i93 = trunc i64 %61 to i8 - %sub8.i94 = sub nuw nsw i64 3, %i.07.i82 + %sub8.i94 = xor i64 %i.07.i82, 3 %sub8.sink.i95 = select i1 %cmp5.not.not.i92, i64 %sub8.i94, i64 %i.07.i82 %arrayidx.i.i.i96 = getelementptr inbounds nuw [4 x i8], ptr %vec.i76, i64 0, i64 %sub8.sink.i95 store i8 %conv7.i93, ptr %arrayidx.i.i.i96, align 1 @@ -121569,7 +121569,7 @@ if.end.i118: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i119 = icmp eq i8 %69, 0 %70 = load i64, ptr %current.i.i106, align 8 %conv7.i120 = trunc i64 %70 to i8 - %sub8.i121 = sub nuw nsw i64 7, %i.07.i109 + %sub8.i121 = xor i64 %i.07.i109, 7 %sub8.sink.i122 = select i1 %cmp5.not.not.i119, i64 %sub8.i121, i64 %i.07.i109 %arrayidx.i.i.i123 = getelementptr inbounds nuw [8 x i8], ptr %vec.i103, i64 0, i64 %sub8.sink.i122 store i8 %conv7.i120, ptr %arrayidx.i.i.i123, align 1 @@ -122706,7 +122706,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -122764,7 +122764,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -123663,7 +123663,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -123721,7 +123721,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -125091,7 +125091,7 @@ if.end.i39: ; preds = %_ZN8nlohmann16json_ %19 = trunc i8 %18 to i1 %20 = load i64, ptr %current, align 8 %conv13.i40 = trunc i64 %20 to i8 - %sub10.i41 = sub nuw nsw i64 3, %i.08.i30 + %sub10.i41 = xor i64 %i.08.i30, 3 %sub10.sink.i42 = select i1 %19, i64 %sub10.i41, i64 %i.08.i30 %arrayidx.i.i.i43 = getelementptr inbounds nuw [4 x i8], ptr %vec.i24, i64 0, i64 %sub10.sink.i42 store i8 %conv13.i40, ptr %arrayidx.i.i.i43, align 1 @@ -125290,7 +125290,7 @@ if.end.i127: ; preds = %_ZN8nlohmann16json_ %50 = trunc i8 %49 to i1 %51 = load i64, ptr %current, align 8 %conv13.i129 = trunc i64 %51 to i8 - %sub10.i130 = sub nuw nsw i64 3, %i.08.i118 + %sub10.i130 = xor i64 %i.08.i118, 3 %sub10.sink.i131 = select i1 %50, i64 %sub10.i130, i64 %i.08.i118 %arrayidx.i.i.i132 = getelementptr inbounds nuw [4 x i8], ptr %vec.i112, i64 0, i64 %sub10.sink.i131 store i8 %conv13.i129, ptr %arrayidx.i.i.i132, align 1 @@ -125664,7 +125664,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -125722,7 +125722,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %6 %7 = load i64, ptr %current.i, align 8 %conv13 = trunc i64 %7 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -126056,7 +126056,7 @@ if.end.i68: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %30, %36 %37 = load i64, ptr %current.i.i56, align 8 %conv13.i69 = trunc i64 %37 to i8 - %sub10.i70 = sub nuw nsw i64 3, %i.08.i59 + %sub10.i70 = xor i64 %i.08.i59, 3 %sub10.sink.i71 = select i1 %cmp7.not.i, i64 %i.08.i59, i64 %sub10.i70 %arrayidx.i.i.i72 = getelementptr inbounds nuw [4 x i8], ptr %vec.i53, i64 0, i64 %sub10.sink.i71 store i8 %conv13.i69, ptr %arrayidx.i.i.i72, align 1 @@ -126121,7 +126121,7 @@ if.end.i91: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i92 = xor i1 %41, %47 %48 = load i64, ptr %current.i.i79, align 8 %conv13.i93 = trunc i64 %48 to i8 - %sub10.i94 = sub nuw nsw i64 7, %i.08.i82 + %sub10.i94 = xor i64 %i.08.i82, 7 %sub10.sink.i95 = select i1 %cmp7.not.i92, i64 %i.08.i82, i64 %sub10.i94 %arrayidx.i.i.i96 = getelementptr inbounds nuw [8 x i8], ptr %vec.i76, i64 0, i64 %sub10.sink.i95 store i8 %conv13.i93, ptr %arrayidx.i.i.i96, align 1 @@ -126254,7 +126254,7 @@ if.end.i142: ; preds = %_ZN8nlohmann16json_ %68 = trunc i8 %67 to i1 %69 = load i64, ptr %current.i.i130, align 8 %conv13.i144 = trunc i64 %69 to i8 - %sub10.i145 = sub nuw nsw i64 3, %i.08.i133 + %sub10.i145 = xor i64 %i.08.i133, 3 %sub10.sink.i146 = select i1 %68, i64 %i.08.i133, i64 %sub10.i145 %arrayidx.i.i.i147 = getelementptr inbounds nuw [4 x i8], ptr %vec.i127, i64 0, i64 %sub10.sink.i146 store i8 %conv13.i144, ptr %arrayidx.i.i.i147, align 1 @@ -126321,7 +126321,7 @@ if.end.i168: ; preds = %_ZN8nlohmann16json_ %78 = trunc i8 %77 to i1 %79 = load i64, ptr %current.i.i156, align 8 %conv13.i170 = trunc i64 %79 to i8 - %sub10.i171 = sub nuw nsw i64 7, %i.08.i159 + %sub10.i171 = xor i64 %i.08.i159, 7 %sub10.sink.i172 = select i1 %78, i64 %i.08.i159, i64 %sub10.i171 %arrayidx.i.i.i173 = getelementptr inbounds nuw [8 x i8], ptr %vec.i153, i64 0, i64 %sub10.sink.i172 store i8 %conv13.i170, ptr %arrayidx.i.i.i173, align 1 @@ -126488,7 +126488,7 @@ if.end.i208: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i209 = xor i1 %97, %103 %104 = load i64, ptr %current.i.i196, align 8 %conv13.i210 = trunc i64 %104 to i8 - %sub10.i211 = sub nuw nsw i64 3, %i.08.i199 + %sub10.i211 = xor i64 %i.08.i199, 3 %sub10.sink.i212 = select i1 %cmp7.not.i209, i64 %i.08.i199, i64 %sub10.i211 %arrayidx.i.i.i213 = getelementptr inbounds nuw [4 x i8], ptr %vec.i193, i64 0, i64 %sub10.sink.i212 store i8 %conv13.i210, ptr %arrayidx.i.i.i213, align 1 @@ -126614,7 +126614,7 @@ if.end.i239: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i240 = xor i1 %113, %119 %120 = load i64, ptr %current.i.i227, align 8 %conv13.i241 = trunc i64 %120 to i8 - %sub10.i242 = sub nuw nsw i64 7, %i.08.i230 + %sub10.i242 = xor i64 %i.08.i230, 7 %sub10.sink.i243 = select i1 %cmp7.not.i240, i64 %i.08.i230, i64 %sub10.i242 %arrayidx.i.i.i244 = getelementptr inbounds nuw [8 x i8], ptr %vec.i224, i64 0, i64 %sub10.sink.i243 store i8 %conv13.i241, ptr %arrayidx.i.i.i244, align 1 @@ -128121,7 +128121,7 @@ if.end.i106: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %47, %53 %54 = load i64, ptr %current, align 8 %conv13.i107 = trunc i64 %54 to i8 - %sub10.i108 = sub nuw nsw i64 3, %i.08.i97 + %sub10.i108 = xor i64 %i.08.i97, 3 %sub10.sink.i109 = select i1 %cmp7.not.i, i64 %i.08.i97, i64 %sub10.i108 %arrayidx.i.i.i110 = getelementptr inbounds nuw [4 x i8], ptr %vec.i91, i64 0, i64 %sub10.sink.i109 store i8 %conv13.i107, ptr %arrayidx.i.i.i110, align 1 @@ -128210,7 +128210,7 @@ if.end.i148: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i149 = xor i1 %63, %69 %70 = load i64, ptr %current, align 8 %conv13.i150 = trunc i64 %70 to i8 - %sub10.i151 = sub nuw nsw i64 7, %i.08.i139 + %sub10.i151 = xor i64 %i.08.i139, 7 %sub10.sink.i152 = select i1 %cmp7.not.i149, i64 %i.08.i139, i64 %sub10.i151 %arrayidx.i.i.i153 = getelementptr inbounds nuw [8 x i8], ptr %vec.i133, i64 0, i64 %sub10.sink.i152 store i8 %conv13.i150, ptr %arrayidx.i.i.i153, align 1 @@ -128361,7 +128361,7 @@ if.end.i216: ; preds = %_ZN8nlohmann16json_ %95 = trunc i8 %94 to i1 %96 = load i64, ptr %current, align 8 %conv13.i218 = trunc i64 %96 to i8 - %sub10.i219 = sub nuw nsw i64 3, %i.08.i207 + %sub10.i219 = xor i64 %i.08.i207, 3 %sub10.sink.i220 = select i1 %95, i64 %i.08.i207, i64 %sub10.i219 %arrayidx.i.i.i221 = getelementptr inbounds nuw [4 x i8], ptr %vec.i201, i64 0, i64 %sub10.sink.i220 store i8 %conv13.i218, ptr %arrayidx.i.i.i221, align 1 @@ -128421,7 +128421,7 @@ if.end.i240: ; preds = %_ZN8nlohmann16json_ %105 = trunc i8 %104 to i1 %106 = load i64, ptr %current, align 8 %conv13.i242 = trunc i64 %106 to i8 - %sub10.i243 = sub nuw nsw i64 7, %i.08.i231 + %sub10.i243 = xor i64 %i.08.i231, 7 %sub10.sink.i244 = select i1 %105, i64 %i.08.i231, i64 %sub10.i243 %arrayidx.i.i.i245 = getelementptr inbounds nuw [8 x i8], ptr %vec.i225, i64 0, i64 %sub10.sink.i244 store i8 %conv13.i242, ptr %arrayidx.i.i.i245, align 1 @@ -130118,7 +130118,7 @@ if.end.i120: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %44, %50 %51 = load i64, ptr %current.i.i108, align 8 %conv13.i121 = trunc i64 %51 to i8 - %sub10.i122 = sub nuw nsw i64 3, %i.08.i111 + %sub10.i122 = xor i64 %i.08.i111, 3 %sub10.sink.i123 = select i1 %cmp7.not.i, i64 %i.08.i111, i64 %sub10.i122 %arrayidx.i.i.i124 = getelementptr inbounds nuw [4 x i8], ptr %vec.i105, i64 0, i64 %sub10.sink.i123 store i8 %conv13.i121, ptr %arrayidx.i.i.i124, align 1 @@ -130274,7 +130274,7 @@ if.end.i143: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i144 = xor i1 %63, %69 %70 = load i64, ptr %current.i.i131, align 8 %conv13.i145 = trunc i64 %70 to i8 - %sub10.i146 = sub nuw nsw i64 7, %i.08.i134 + %sub10.i146 = xor i64 %i.08.i134, 7 %sub10.sink.i147 = select i1 %cmp7.not.i144, i64 %i.08.i134, i64 %sub10.i146 %arrayidx.i.i.i148 = getelementptr inbounds nuw [8 x i8], ptr %vec.i128, i64 0, i64 %sub10.sink.i147 store i8 %conv13.i145, ptr %arrayidx.i.i.i148, align 1 @@ -130493,7 +130493,7 @@ if.end.i194: ; preds = %_ZN8nlohmann16json_ %97 = trunc i8 %96 to i1 %98 = load i64, ptr %current.i.i182, align 8 %conv13.i196 = trunc i64 %98 to i8 - %sub10.i197 = sub nuw nsw i64 3, %i.08.i185 + %sub10.i197 = xor i64 %i.08.i185, 3 %sub10.sink.i198 = select i1 %97, i64 %i.08.i185, i64 %sub10.i197 %arrayidx.i.i.i199 = getelementptr inbounds nuw [4 x i8], ptr %vec.i179, i64 0, i64 %sub10.sink.i198 store i8 %conv13.i196, ptr %arrayidx.i.i.i199, align 1 @@ -130555,7 +130555,7 @@ if.end.i218: ; preds = %_ZN8nlohmann16json_ %106 = trunc i8 %105 to i1 %107 = load i64, ptr %current.i.i206, align 8 %conv13.i220 = trunc i64 %107 to i8 - %sub10.i221 = sub nuw nsw i64 7, %i.08.i209 + %sub10.i221 = xor i64 %i.08.i209, 7 %sub10.sink.i222 = select i1 %106, i64 %i.08.i209, i64 %sub10.i221 %arrayidx.i.i.i223 = getelementptr inbounds nuw [8 x i8], ptr %vec.i203, i64 0, i64 %sub10.sink.i222 store i8 %conv13.i220, ptr %arrayidx.i.i.i223, align 1 @@ -157280,7 +157280,7 @@ if.end.i: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i = icmp eq i8 %4, 0 %5 = load i32, ptr %current.i.i, align 8 %conv7.i = trunc i32 %5 to i8 - %sub8.i = sub nuw nsw i64 7, %i.07.i + %sub8.i = xor i64 %i.07.i, 7 %sub8.sink.i = select i1 %cmp5.not.not.i, i64 %sub8.i, i64 %i.07.i %arrayidx.i.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec.i, i64 0, i64 %sub8.sink.i store i8 %conv7.i, ptr %arrayidx.i.i.i, align 1 @@ -157415,7 +157415,7 @@ if.end.i24: ; preds = %call2.i23.noexc %cmp5.not.not.i25 = icmp eq i8 %17, 0 %18 = load i32, ptr %current.i.i15, align 8 %conv7.i26 = trunc i32 %18 to i8 - %sub8.i27 = sub nuw nsw i64 3, %i.07.i18 + %sub8.i27 = xor i64 %i.07.i18, 3 %sub8.sink.i28 = select i1 %cmp5.not.not.i25, i64 %sub8.i27, i64 %i.07.i18 %arrayidx.i.i.i29 = getelementptr inbounds nuw [4 x i8], ptr %vec.i12, i64 0, i64 %sub8.sink.i28 store i8 %conv7.i26, ptr %arrayidx.i.i.i29, align 1 @@ -157561,7 +157561,7 @@ if.end.i60: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i61 = icmp eq i8 %32, 0 %33 = load i32, ptr %current.i.i51, align 8 %conv7.i62 = trunc i32 %33 to i8 - %sub8.i63 = sub nuw nsw i64 3, %i.07.i54 + %sub8.i63 = xor i64 %i.07.i54, 3 %sub8.sink.i64 = select i1 %cmp5.not.not.i61, i64 %sub8.i63, i64 %i.07.i54 %arrayidx.i.i.i65 = getelementptr inbounds nuw [4 x i8], ptr %vec.i48, i64 0, i64 %sub8.sink.i64 store i8 %conv7.i62, ptr %arrayidx.i.i.i65, align 1 @@ -157694,7 +157694,7 @@ if.end.i103: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i104 = icmp eq i8 %47, 0 %48 = load i32, ptr %current.i.i94, align 8 %conv7.i105 = trunc i32 %48 to i8 - %sub8.i106 = sub nuw nsw i64 3, %i.07.i97 + %sub8.i106 = xor i64 %i.07.i97, 3 %sub8.sink.i107 = select i1 %cmp5.not.not.i104, i64 %sub8.i106, i64 %i.07.i97 %arrayidx.i.i.i108 = getelementptr inbounds nuw [4 x i8], ptr %vec.i91, i64 0, i64 %sub8.sink.i107 store i8 %conv7.i105, ptr %arrayidx.i.i.i108, align 1 @@ -157759,7 +157759,7 @@ if.end.i134: ; preds = %_ZN8nlohmann16json_ %cmp5.not.not.i135 = icmp eq i8 %55, 0 %56 = load i32, ptr %current.i.i125, align 8 %conv7.i136 = trunc i32 %56 to i8 - %sub8.i137 = sub nuw nsw i64 7, %i.07.i128 + %sub8.i137 = xor i64 %i.07.i128, 7 %sub8.sink.i138 = select i1 %cmp5.not.not.i135, i64 %sub8.i137, i64 %i.07.i128 %arrayidx.i.i.i139 = getelementptr inbounds nuw [8 x i8], ptr %vec.i122, i64 0, i64 %sub8.sink.i138 store i8 %conv7.i136, ptr %arrayidx.i.i.i139, align 1 @@ -158596,7 +158596,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -158657,7 +158657,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -159566,7 +159566,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -159627,7 +159627,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -160830,7 +160830,7 @@ if.end.i40: ; preds = %_ZN8nlohmann16json_ %16 = trunc i8 %15 to i1 %17 = load i32, ptr %current, align 8 %conv13.i41 = trunc i32 %17 to i8 - %sub10.i42 = sub nuw nsw i64 3, %i.08.i34 + %sub10.i42 = xor i64 %i.08.i34, 3 %sub10.sink.i43 = select i1 %16, i64 %sub10.i42, i64 %i.08.i34 %arrayidx.i.i.i44 = getelementptr inbounds nuw [4 x i8], ptr %vec.i28, i64 0, i64 %sub10.sink.i43 store i8 %conv13.i41, ptr %arrayidx.i.i.i44, align 1 @@ -161046,7 +161046,7 @@ if.end.i148: ; preds = %_ZN8nlohmann16json_ %44 = trunc i8 %43 to i1 %45 = load i32, ptr %current, align 8 %conv13.i150 = trunc i32 %45 to i8 - %sub10.i151 = sub nuw nsw i64 3, %i.08.i142 + %sub10.i151 = xor i64 %i.08.i142, 3 %sub10.sink.i152 = select i1 %44, i64 %sub10.i151, i64 %i.08.i142 %arrayidx.i.i.i153 = getelementptr inbounds nuw [4 x i8], ptr %vec.i136, i64 0, i64 %sub10.sink.i152 store i8 %conv13.i150, ptr %arrayidx.i.i.i153, align 1 @@ -161453,7 +161453,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 3, %i.08 + %sub10 = xor i64 %i.08, 3 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [4 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -161514,7 +161514,7 @@ if.end: ; preds = %_ZN8nlohmann16json_ %cmp7.not = xor i1 %0, %5 %6 = load i32, ptr %current.i, align 8 %conv13 = trunc i32 %6 to i8 - %sub10 = sub nuw nsw i64 7, %i.08 + %sub10 = xor i64 %i.08, 7 %sub10.sink = select i1 %cmp7.not, i64 %i.08, i64 %sub10 %arrayidx.i.i = getelementptr inbounds nuw [8 x i8], ptr %vec, i64 0, i64 %sub10.sink store i8 %conv13, ptr %arrayidx.i.i, align 1 @@ -161834,7 +161834,7 @@ if.end.i73: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %28, %33 %34 = load i32, ptr %current.i.i64, align 8 %conv13.i74 = trunc i32 %34 to i8 - %sub10.i75 = sub nuw nsw i64 3, %i.08.i67 + %sub10.i75 = xor i64 %i.08.i67, 3 %sub10.sink.i76 = select i1 %cmp7.not.i, i64 %i.08.i67, i64 %sub10.i75 %arrayidx.i.i.i77 = getelementptr inbounds nuw [4 x i8], ptr %vec.i61, i64 0, i64 %sub10.sink.i76 store i8 %conv13.i74, ptr %arrayidx.i.i.i77, align 1 @@ -161902,7 +161902,7 @@ if.end.i100: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i101 = xor i1 %38, %43 %44 = load i32, ptr %current.i.i91, align 8 %conv13.i102 = trunc i32 %44 to i8 - %sub10.i103 = sub nuw nsw i64 7, %i.08.i94 + %sub10.i103 = xor i64 %i.08.i94, 7 %sub10.sink.i104 = select i1 %cmp7.not.i101, i64 %i.08.i94, i64 %sub10.i103 %arrayidx.i.i.i105 = getelementptr inbounds nuw [8 x i8], ptr %vec.i88, i64 0, i64 %sub10.sink.i104 store i8 %conv13.i102, ptr %arrayidx.i.i.i105, align 1 @@ -162041,7 +162041,7 @@ if.end.i159: ; preds = %_ZN8nlohmann16json_ %62 = trunc i8 %61 to i1 %63 = load i32, ptr %current.i.i150, align 8 %conv13.i161 = trunc i32 %63 to i8 - %sub10.i162 = sub nuw nsw i64 3, %i.08.i153 + %sub10.i162 = xor i64 %i.08.i153, 3 %sub10.sink.i163 = select i1 %62, i64 %i.08.i153, i64 %sub10.i162 %arrayidx.i.i.i164 = getelementptr inbounds nuw [4 x i8], ptr %vec.i147, i64 0, i64 %sub10.sink.i163 store i8 %conv13.i161, ptr %arrayidx.i.i.i164, align 1 @@ -162111,7 +162111,7 @@ if.end.i189: ; preds = %_ZN8nlohmann16json_ %71 = trunc i8 %70 to i1 %72 = load i32, ptr %current.i.i180, align 8 %conv13.i191 = trunc i32 %72 to i8 - %sub10.i192 = sub nuw nsw i64 7, %i.08.i183 + %sub10.i192 = xor i64 %i.08.i183, 7 %sub10.sink.i193 = select i1 %71, i64 %i.08.i183, i64 %sub10.i192 %arrayidx.i.i.i194 = getelementptr inbounds nuw [8 x i8], ptr %vec.i177, i64 0, i64 %sub10.sink.i193 store i8 %conv13.i191, ptr %arrayidx.i.i.i194, align 1 @@ -162266,7 +162266,7 @@ if.end.i223: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i224 = xor i1 %86, %91 %92 = load i32, ptr %current.i.i214, align 8 %conv13.i225 = trunc i32 %92 to i8 - %sub10.i226 = sub nuw nsw i64 3, %i.08.i217 + %sub10.i226 = xor i64 %i.08.i217, 3 %sub10.sink.i227 = select i1 %cmp7.not.i224, i64 %i.08.i217, i64 %sub10.i226 %arrayidx.i.i.i228 = getelementptr inbounds nuw [4 x i8], ptr %vec.i211, i64 0, i64 %sub10.sink.i227 store i8 %conv13.i225, ptr %arrayidx.i.i.i228, align 1 @@ -162395,7 +162395,7 @@ if.end.i259: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i260 = xor i1 %101, %106 %107 = load i32, ptr %current.i.i250, align 8 %conv13.i261 = trunc i32 %107 to i8 - %sub10.i262 = sub nuw nsw i64 7, %i.08.i253 + %sub10.i262 = xor i64 %i.08.i253, 7 %sub10.sink.i263 = select i1 %cmp7.not.i260, i64 %i.08.i253, i64 %sub10.i262 %arrayidx.i.i.i264 = getelementptr inbounds nuw [8 x i8], ptr %vec.i247, i64 0, i64 %sub10.sink.i263 store i8 %conv13.i261, ptr %arrayidx.i.i.i264, align 1 @@ -163910,7 +163910,7 @@ if.end.i123: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %40, %45 %46 = load i32, ptr %current, align 8 %conv13.i124 = trunc i32 %46 to i8 - %sub10.i125 = sub nuw nsw i64 3, %i.08.i117 + %sub10.i125 = xor i64 %i.08.i117, 3 %sub10.sink.i126 = select i1 %cmp7.not.i, i64 %i.08.i117, i64 %sub10.i125 %arrayidx.i.i.i127 = getelementptr inbounds nuw [4 x i8], ptr %vec.i111, i64 0, i64 %sub10.sink.i126 store i8 %conv13.i124, ptr %arrayidx.i.i.i127, align 1 @@ -164005,7 +164005,7 @@ if.end.i173: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i174 = xor i1 %54, %59 %60 = load i32, ptr %current, align 8 %conv13.i175 = trunc i32 %60 to i8 - %sub10.i176 = sub nuw nsw i64 7, %i.08.i167 + %sub10.i176 = xor i64 %i.08.i167, 7 %sub10.sink.i177 = select i1 %cmp7.not.i174, i64 %i.08.i167, i64 %sub10.i176 %arrayidx.i.i.i178 = getelementptr inbounds nuw [8 x i8], ptr %vec.i161, i64 0, i64 %sub10.sink.i177 store i8 %conv13.i175, ptr %arrayidx.i.i.i178, align 1 @@ -164165,7 +164165,7 @@ if.end.i253: ; preds = %_ZN8nlohmann16json_ %82 = trunc i8 %81 to i1 %83 = load i32, ptr %current, align 8 %conv13.i255 = trunc i32 %83 to i8 - %sub10.i256 = sub nuw nsw i64 3, %i.08.i247 + %sub10.i256 = xor i64 %i.08.i247, 3 %sub10.sink.i257 = select i1 %82, i64 %i.08.i247, i64 %sub10.i256 %arrayidx.i.i.i258 = getelementptr inbounds nuw [4 x i8], ptr %vec.i241, i64 0, i64 %sub10.sink.i257 store i8 %conv13.i255, ptr %arrayidx.i.i.i258, align 1 @@ -164228,7 +164228,7 @@ if.end.i281: ; preds = %_ZN8nlohmann16json_ %91 = trunc i8 %90 to i1 %92 = load i32, ptr %current, align 8 %conv13.i283 = trunc i32 %92 to i8 - %sub10.i284 = sub nuw nsw i64 7, %i.08.i275 + %sub10.i284 = xor i64 %i.08.i275, 7 %sub10.sink.i285 = select i1 %91, i64 %i.08.i275, i64 %sub10.i284 %arrayidx.i.i.i286 = getelementptr inbounds nuw [8 x i8], ptr %vec.i269, i64 0, i64 %sub10.sink.i285 store i8 %conv13.i283, ptr %arrayidx.i.i.i286, align 1 @@ -165950,7 +165950,7 @@ if.end.i130: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i = xor i1 %43, %48 %49 = load i32, ptr %current.i.i121, align 8 %conv13.i131 = trunc i32 %49 to i8 - %sub10.i132 = sub nuw nsw i64 3, %i.08.i124 + %sub10.i132 = xor i64 %i.08.i124, 3 %sub10.sink.i133 = select i1 %cmp7.not.i, i64 %i.08.i124, i64 %sub10.i132 %arrayidx.i.i.i134 = getelementptr inbounds nuw [4 x i8], ptr %vec.i118, i64 0, i64 %sub10.sink.i133 store i8 %conv13.i131, ptr %arrayidx.i.i.i134, align 1 @@ -166109,7 +166109,7 @@ if.end.i157: ; preds = %_ZN8nlohmann16json_ %cmp7.not.i158 = xor i1 %61, %66 %67 = load i32, ptr %current.i.i148, align 8 %conv13.i159 = trunc i32 %67 to i8 - %sub10.i160 = sub nuw nsw i64 7, %i.08.i151 + %sub10.i160 = xor i64 %i.08.i151, 7 %sub10.sink.i161 = select i1 %cmp7.not.i158, i64 %i.08.i151, i64 %sub10.i160 %arrayidx.i.i.i162 = getelementptr inbounds nuw [8 x i8], ptr %vec.i145, i64 0, i64 %sub10.sink.i161 store i8 %conv13.i159, ptr %arrayidx.i.i.i162, align 1 @@ -166334,7 +166334,7 @@ if.end.i217: ; preds = %_ZN8nlohmann16json_ %92 = trunc i8 %91 to i1 %93 = load i32, ptr %current.i.i208, align 8 %conv13.i219 = trunc i32 %93 to i8 - %sub10.i220 = sub nuw nsw i64 3, %i.08.i211 + %sub10.i220 = xor i64 %i.08.i211, 3 %sub10.sink.i221 = select i1 %92, i64 %i.08.i211, i64 %sub10.i220 %arrayidx.i.i.i222 = getelementptr inbounds nuw [4 x i8], ptr %vec.i205, i64 0, i64 %sub10.sink.i221 store i8 %conv13.i219, ptr %arrayidx.i.i.i222, align 1 @@ -166399,7 +166399,7 @@ if.end.i245: ; preds = %_ZN8nlohmann16json_ %100 = trunc i8 %99 to i1 %101 = load i32, ptr %current.i.i236, align 8 %conv13.i247 = trunc i32 %101 to i8 - %sub10.i248 = sub nuw nsw i64 7, %i.08.i239 + %sub10.i248 = xor i64 %i.08.i239, 7 %sub10.sink.i249 = select i1 %100, i64 %i.08.i239, i64 %sub10.i248 %arrayidx.i.i.i250 = getelementptr inbounds nuw [8 x i8], ptr %vec.i233, i64 0, i64 %sub10.sink.i249 store i8 %conv13.i247, ptr %arrayidx.i.i.i250, align 1 diff --git a/bench/node/optimized/libnode.Protocol.ll b/bench/node/optimized/libnode.Protocol.ll index 708bc8f7e91..eaadcfa02ba 100644 --- a/bench/node/optimized/libnode.Protocol.ll +++ b/bench/node/optimized/libnode.Protocol.ll @@ -6270,7 +6270,7 @@ if.end38: ; preds = %if.then34 for.body.i27: ; preds = %for.body.i27, %if.end38 %shift_bytes.06.i28 = phi i64 [ 0, %if.end38 ], [ %inc.i, %for.body.i27 ] %result.05.i29 = phi i32 [ 0, %if.end38 ], [ %or.i, %for.body.i27 ] - %sub.i30 = sub nuw nsw i64 3, %shift_bytes.06.i28 + %sub.i30 = xor i64 %shift_bytes.06.i28, 3 %arrayidx.i.i31 = getelementptr inbounds nuw i8, ptr %add.ptr.i22, i64 %sub.i30 %4 = load i8, ptr %arrayidx.i.i31, align 1 %conv.i = zext i8 %4 to i32 @@ -6297,7 +6297,7 @@ if.end50: ; preds = %if.then46 for.body.i41: ; preds = %for.body.i41, %if.end50 %shift_bytes.06.i42 = phi i64 [ 0, %if.end50 ], [ %inc.i49, %for.body.i41 ] %result.05.i43 = phi i64 [ 0, %if.end50 ], [ %or.i48, %for.body.i41 ] - %sub.i44 = sub nuw nsw i64 7, %shift_bytes.06.i42 + %sub.i44 = xor i64 %shift_bytes.06.i42, 7 %arrayidx.i.i45 = getelementptr inbounds nuw i8, ptr %add.ptr.i36, i64 %sub.i44 %5 = load i8, ptr %arrayidx.i.i45, align 1 %conv.i46 = zext i8 %5 to i64 @@ -8682,7 +8682,7 @@ if.end38.i: ; preds = %if.then34.i for.body.i27.i: ; preds = %for.body.i27.i, %if.end38.i %shift_bytes.06.i28.i = phi i64 [ 0, %if.end38.i ], [ %inc.i.i, %for.body.i27.i ] %result.05.i29.i = phi i32 [ 0, %if.end38.i ], [ %or.i.i, %for.body.i27.i ] - %sub.i30.i = sub nuw nsw i64 3, %shift_bytes.06.i28.i + %sub.i30.i = xor i64 %shift_bytes.06.i28.i, 3 %arrayidx.i.i31.i = getelementptr inbounds nuw i8, ptr %add.ptr.i22.i, i64 %sub.i30.i %9 = load i8, ptr %arrayidx.i.i31.i, align 1 %conv.i.i = zext i8 %9 to i32 @@ -8709,7 +8709,7 @@ if.end50.i: ; preds = %if.then46.i for.body.i41.i: ; preds = %for.body.i41.i, %if.end50.i %shift_bytes.06.i42.i = phi i64 [ 0, %if.end50.i ], [ %inc.i49.i, %for.body.i41.i ] %result.05.i43.i = phi i64 [ 0, %if.end50.i ], [ %or.i48.i, %for.body.i41.i ] - %sub.i44.i = sub nuw nsw i64 7, %shift_bytes.06.i42.i + %sub.i44.i = xor i64 %shift_bytes.06.i42.i, 7 %arrayidx.i.i45.i = getelementptr inbounds nuw i8, ptr %add.ptr.i36.i, i64 %sub.i44.i %10 = load i8, ptr %arrayidx.i.i45.i, align 1 %conv.i46.i = zext i8 %10 to i64 @@ -8797,7 +8797,7 @@ if.end66: ; preds = %if.end57 for.body.i: ; preds = %for.body.i, %if.end66 %shift_bytes.06.i = phi i64 [ 0, %if.end66 ], [ %inc.i, %for.body.i ] %result.05.i = phi i32 [ 0, %if.end66 ], [ %or.i, %for.body.i ] - %sub.i52 = sub nuw nsw i64 3, %shift_bytes.06.i + %sub.i52 = xor i64 %shift_bytes.06.i, 3 %arrayidx.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i47, i64 %sub.i52 %13 = load i8, ptr %arrayidx.i.i, align 1 %conv.i = zext i8 %13 to i32 @@ -8898,7 +8898,7 @@ if.end38.i89: ; preds = %if.then34.i87 for.body.i27.i91: ; preds = %for.body.i27.i91, %if.end38.i89 %shift_bytes.06.i28.i92 = phi i64 [ 0, %if.end38.i89 ], [ %inc.i.i101, %for.body.i27.i91 ] %result.05.i29.i93 = phi i32 [ 0, %if.end38.i89 ], [ %or.i.i100, %for.body.i27.i91 ] - %sub.i30.i94 = sub nuw nsw i64 3, %shift_bytes.06.i28.i92 + %sub.i30.i94 = xor i64 %shift_bytes.06.i28.i92, 3 %arrayidx.i.i31.i95 = getelementptr inbounds nuw i8, ptr %add.ptr.i22.i90, i64 %sub.i30.i94 %17 = load i8, ptr %arrayidx.i.i31.i95, align 1 %conv.i.i96 = zext i8 %17 to i32 @@ -8925,7 +8925,7 @@ if.end50.i70: ; preds = %if.then46.i68 for.body.i41.i72: ; preds = %for.body.i41.i72, %if.end50.i70 %shift_bytes.06.i42.i73 = phi i64 [ 0, %if.end50.i70 ], [ %inc.i49.i81, %for.body.i41.i72 ] %result.05.i43.i74 = phi i64 [ 0, %if.end50.i70 ], [ %or.i48.i80, %for.body.i41.i72 ] - %sub.i44.i75 = sub nuw nsw i64 7, %shift_bytes.06.i42.i73 + %sub.i44.i75 = xor i64 %shift_bytes.06.i42.i73, 7 %arrayidx.i.i45.i76 = getelementptr inbounds nuw i8, ptr %add.ptr.i36.i71, i64 %sub.i44.i75 %18 = load i8, ptr %arrayidx.i.i45.i76, align 1 %conv.i46.i77 = zext i8 %18 to i64 @@ -9134,7 +9134,7 @@ entry: for.body.i: ; preds = %for.body.i, %entry %shift_bytes.06.i = phi i64 [ 0, %entry ], [ %inc.i, %for.body.i ] %result.05.i = phi i64 [ 0, %entry ], [ %or.i, %for.body.i ] - %sub.i1 = sub nuw nsw i64 7, %shift_bytes.06.i + %sub.i1 = xor i64 %shift_bytes.06.i, 7 %arrayidx.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i, i64 %sub.i1 %3 = load i8, ptr %arrayidx.i.i, align 1 %conv.i = zext i8 %3 to i64 @@ -10513,7 +10513,7 @@ sw.bb25: ; preds = %if.end3 for.body.i.i: ; preds = %for.body.i.i, %sw.bb25 %shift_bytes.06.i.i = phi i64 [ 0, %sw.bb25 ], [ %inc.i.i, %for.body.i.i ] %result.05.i.i = phi i64 [ 0, %sw.bb25 ], [ %or.i.i, %for.body.i.i ] - %sub.i1.i = sub nuw nsw i64 7, %shift_bytes.06.i.i + %sub.i1.i = xor i64 %shift_bytes.06.i.i, 7 %arrayidx.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i, i64 %sub.i1.i %10 = load i8, ptr %arrayidx.i.i.i, align 1 %conv.i.i = zext i8 %10 to i64 @@ -11349,7 +11349,7 @@ sw.bb30: ; preds = %if.end4 for.body.i.i: ; preds = %for.body.i.i, %sw.bb30 %shift_bytes.06.i.i = phi i64 [ 0, %sw.bb30 ], [ %inc.i.i, %for.body.i.i ] %result.05.i.i = phi i64 [ 0, %sw.bb30 ], [ %or.i.i, %for.body.i.i ] - %sub.i1.i = sub nuw nsw i64 7, %shift_bytes.06.i.i + %sub.i1.i = xor i64 %shift_bytes.06.i.i, 7 %arrayidx.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i, i64 %sub.i1.i %18 = load i8, ptr %arrayidx.i.i.i, align 1 %conv.i.i = zext i8 %18 to i64 diff --git a/bench/node/optimized/libnode.inspector_socket.ll b/bench/node/optimized/libnode.inspector_socket.ll index 7fa161e9823..a7c53001eaf 100644 --- a/bench/node/optimized/libnode.inspector_socket.ll +++ b/bench/node/optimized/libnode.inspector_socket.ll @@ -2681,15 +2681,16 @@ _ZNSt6vectorIcSaIcEE9push_backEOc.exit166.i: ; preds = %if.else.i br label %for.body.i for.body.i: ; preds = %for.body.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit166.i - %indvars.iv.i = phi i64 [ 0, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit166.i ], [ %indvars.iv.next.i, %for.body.i ] %remaining.0182.i = phi i64 [ %sub.ptr.sub.i.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit166.i ], [ %shr16.i, %for.body.i ] + %i.0181.i = phi i32 [ 0, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit166.i ], [ %inc.i, %for.body.i ] %conv15.i = trunc i64 %remaining.0182.i to i8 - %3 = sub nuw nsw i64 7, %indvars.iv.i - %arrayidx.i = getelementptr inbounds nuw [8 x i8], ptr %extended_payload_length.i, i64 0, i64 %3 + %sub.i = xor i32 %i.0181.i, 7 + %idxprom.i = zext nneg i32 %sub.i to i64 + %arrayidx.i = getelementptr inbounds nuw [8 x i8], ptr %extended_payload_length.i, i64 0, i64 %idxprom.i store i8 %conv15.i, ptr %arrayidx.i, align 1, !noalias !25 %shr16.i = lshr i64 %remaining.0182.i, 8 - %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 8 + %inc.i = add nuw nsw i32 %i.0181.i, 1 + %exitcond.not.i = icmp eq i32 %inc.i, 8 br i1 %exitcond.not.i, label %for.end.i, label %for.body.i, !llvm.loop !28 for.end.i: ; preds = %for.body.i @@ -2699,7 +2700,7 @@ for.end.i: ; preds = %for.body.i br i1 %cmp23.not.i, label %for.end.if.end32_crit_edge.i, label %do.body28.i for.end.if.end32_crit_edge.i: ; preds = %for.end.i - %.pre185.i = load ptr, ptr %_M_finish.i.i.i, align 8, !alias.scope !25 + %.pre183.i = load ptr, ptr %_M_finish.i.i.i, align 8, !alias.scope !25 %.pre = load ptr, ptr %output, align 8, !alias.scope !25 br label %_ZN4node9inspector12_GLOBAL__N_119encode_frame_hybi17ERKSt6vectorIcSaIcEE.exit @@ -2709,25 +2710,25 @@ do.body28.i: ; preds = %for.end.i unreachable _ZN4node9inspector12_GLOBAL__N_119encode_frame_hybi17ERKSt6vectorIcSaIcEE.exit: ; preds = %_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_.exit.i.i38.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit73.i, %for.end.if.end32_crit_edge.i - %4 = phi ptr [ %.pre, %for.end.if.end32_crit_edge.i ], [ %call5.i.i.i.i.i.i91.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit73.i ], [ %call5.i.i.i.i.i.i29.i, %_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_.exit.i.i38.i ] - %5 = phi ptr [ %.pre185.i, %for.end.if.end32_crit_edge.i ], [ %add.ptr19.i.i.i101.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit73.i ], [ %incdec.ptr.i.i.i35.i, %_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_.exit.i.i38.i ] - %6 = load ptr, ptr %data, align 8, !noalias !25 - %7 = load ptr, ptr %_M_finish.i.i, align 8, !noalias !25 - %sub.ptr.lhs.cast.i.i170.i = ptrtoint ptr %5 to i64 - %sub.ptr.rhs.cast.i.i171.i = ptrtoint ptr %4 to i64 + %3 = phi ptr [ %.pre, %for.end.if.end32_crit_edge.i ], [ %call5.i.i.i.i.i.i91.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit73.i ], [ %call5.i.i.i.i.i.i29.i, %_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_.exit.i.i38.i ] + %4 = phi ptr [ %.pre183.i, %for.end.if.end32_crit_edge.i ], [ %add.ptr19.i.i.i101.i, %_ZNSt6vectorIcSaIcEE9push_backEOc.exit73.i ], [ %incdec.ptr.i.i.i35.i, %_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_.exit.i.i38.i ] + %5 = load ptr, ptr %data, align 8, !noalias !25 + %6 = load ptr, ptr %_M_finish.i.i, align 8, !noalias !25 + %sub.ptr.lhs.cast.i.i170.i = ptrtoint ptr %4 to i64 + %sub.ptr.rhs.cast.i.i171.i = ptrtoint ptr %3 to i64 %sub.ptr.sub.i.i172.i = sub i64 %sub.ptr.lhs.cast.i.i170.i, %sub.ptr.rhs.cast.i.i171.i - %add.ptr.i.i173.i = getelementptr inbounds i8, ptr %4, i64 %sub.ptr.sub.i.i172.i - call void @_ZNSt6vectorIcSaIcEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPKcS1_EEEEvNS4_IPcS1_EET_SA_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(24) %output, ptr %add.ptr.i.i173.i, ptr %6, ptr %7) + %add.ptr.i.i173.i = getelementptr inbounds i8, ptr %3, i64 %sub.ptr.sub.i.i172.i + call void @_ZNSt6vectorIcSaIcEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPKcS1_EEEEvNS4_IPcS1_EET_SA_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(24) %output, ptr %add.ptr.i.i173.i, ptr %5, ptr %6) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %extended_payload_length.i) %tcp_.i = getelementptr inbounds nuw i8, ptr %this, i64 16 - %8 = load ptr, ptr %tcp_.i, align 8 - %call2.i = call noundef range(i32 0, 2) i32 @_ZN4node9inspector9TcpHolder8WriteRawERKSt6vectorIcSaIcEEPFvP10uv_write_siE(ptr noundef nonnull align 8 dereferenceable(288) %8, ptr noundef nonnull align 8 dereferenceable(24) %output, ptr noundef nonnull @_ZN4node9inspector12_GLOBAL__N_112WriteRequest7CleanupEP10uv_write_si) - %9 = load ptr, ptr %output, align 8 - %tobool.not.i.i.i = icmp eq ptr %9, null + %7 = load ptr, ptr %tcp_.i, align 8 + %call2.i = call noundef range(i32 0, 2) i32 @_ZN4node9inspector9TcpHolder8WriteRawERKSt6vectorIcSaIcEEPFvP10uv_write_siE(ptr noundef nonnull align 8 dereferenceable(288) %7, ptr noundef nonnull align 8 dereferenceable(24) %output, ptr noundef nonnull @_ZN4node9inspector12_GLOBAL__N_112WriteRequest7CleanupEP10uv_write_si) + %8 = load ptr, ptr %output, align 8 + %tobool.not.i.i.i = icmp eq ptr %8, null br i1 %tobool.not.i.i.i, label %_ZNSt6vectorIcSaIcEED2Ev.exit, label %if.then.i.i.i if.then.i.i.i: ; preds = %_ZN4node9inspector12_GLOBAL__N_119encode_frame_hybi17ERKSt6vectorIcSaIcEE.exit - call void @_ZdlPv(ptr noundef nonnull %9) #23 + call void @_ZdlPv(ptr noundef nonnull %8) #23 br label %_ZNSt6vectorIcSaIcEED2Ev.exit _ZNSt6vectorIcSaIcEED2Ev.exit: ; preds = %_ZN4node9inspector12_GLOBAL__N_119encode_frame_hybi17ERKSt6vectorIcSaIcEE.exit, %if.then.i.i.i diff --git a/bench/ockam-rs/optimized/1nr6pb10qh86z9fy.ll b/bench/ockam-rs/optimized/1nr6pb10qh86z9fy.ll index 41dc81eb2d3..dcffae8629f 100644 --- a/bench/ockam-rs/optimized/1nr6pb10qh86z9fy.ll +++ b/bench/ockam-rs/optimized/1nr6pb10qh86z9fy.ll @@ -838,7 +838,7 @@ common.resume: ; preds = %25, %.body, %16 %26 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17h1a8dc4668ceb4783E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %10) #32 - to label %common.resume unwind label %63 + to label %common.resume unwind label %61 27: ; preds = %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h7a2850656f4f6ccaE.exit" call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) @@ -877,8 +877,8 @@ common.resume: ; preds = %25, %.body, %16 36: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i", %.lr.ph.i.i %37 = phi i64 [ %33, %.lr.ph.i.i ], [ %51, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i" ] - %.sroa.05.013.i.i = phi i64 [ %12, %.lr.ph.i.i ], [ %37, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i" ] - %38 = icmp ult i64 %.sroa.05.013.i.i, 3 + %.sroa.05.012.i.i = phi i64 [ %12, %.lr.ph.i.i ], [ %37, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i" ] + %38 = icmp ult i64 %.sroa.05.012.i.i, 3 br i1 %38, label %switch.lookup18, label %.loopexit switch.lookup18: ; preds = %36 @@ -905,9 +905,9 @@ switch.lookup18: ; preds = %36 to label %.body unwind label %42, !noalias !196 switch.lookup20: ; preds = %switch.lookup18 - %switch.gep21 = getelementptr inbounds nuw [3 x ptr], ptr @"switch.table._ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h363ac85da1581709E.llvm.17316549881917752266.53", i64 0, i64 %.sroa.05.013.i.i + %switch.gep21 = getelementptr inbounds nuw [3 x ptr], ptr @"switch.table._ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h363ac85da1581709E.llvm.17316549881917752266.53", i64 0, i64 %.sroa.05.012.i.i %switch.load22 = load ptr, ptr %switch.gep21, align 8 - %switch.gep23 = getelementptr inbounds nuw [3 x i64], ptr @"switch.table._ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h363ac85da1581709E.llvm.17316549881917752266.54", i64 0, i64 %.sroa.05.013.i.i + %switch.gep23 = getelementptr inbounds nuw [3 x i64], ptr @"switch.table._ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h363ac85da1581709E.llvm.17316549881917752266.54", i64 0, i64 %.sroa.05.012.i.i %switch.load24 = load i64, ptr %switch.gep23, align 8 %40 = invoke noundef zeroext i1 @"_ZN42_$LT$str$u20$as$u20$core..fmt..Display$GT$3fmt17hc2aaa223287dde65E"(ptr noalias noundef nonnull readonly align 1 %switch.load22, i64 noundef %switch.load24, ptr noalias noundef nonnull align 8 dereferenceable(64) %5) to label %"_ZN73_$LT$ockam_abac..resource..ResourceType$u20$as$u20$core..fmt..Display$GT$3fmt17h39bcde56c49f46f2E.exit.i.i.i.i.i.i" unwind label %.loopexit.i.i, !noalias !196 @@ -947,7 +947,7 @@ switch.lookup20: ; preds = %switch.lookup18 %47 = icmp eq i64 %45, %46 br i1 %47, label %55, label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i" -"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i": ; preds = %60, %55, %44 +"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i": ; preds = %55, %44 %48 = load ptr, ptr %11, align 8, !alias.scope !199, !nonnull !4, !noundef !4 %49 = getelementptr inbounds { { { ptr, i64 }, i64 } }, ptr %48, i64 %45 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 8 dereferenceable(24) %7, i64 24, i1 false) @@ -961,26 +961,21 @@ switch.lookup20: ; preds = %switch.lookup18 %52 = icmp ugt i64 %.reass.i.i, 3 br i1 %52, label %.loopexit, label %36 -53: ; preds = %60 +53: ; preds = %55 %54 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17h1a8dc4668ceb4783E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %7) #32 - to label %.body unwind label %61 + to label %.body unwind label %59 55: ; preds = %44 %56 = add i64 %37, %2 - %57 = icmp ugt i64 %56, 2 - %58 = sub i64 4, %56 - %59 = select i1 %57, i64 1, i64 %58 - %.not12.i.i = icmp eq i64 %59, 0 - br i1 %.not12.i.i, label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i", label %60 - -60: ; preds = %55 - invoke void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17hbdead17bf6eec748E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %45, i64 noundef range(i64 1, 0) %59) + %57 = call i64 @llvm.umin.i64(i64 %56, i64 3) + %58 = sub nuw nsw i64 4, %57 + invoke void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17hbdead17bf6eec748E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %45, i64 noundef range(i64 1, 0) %58) to label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i" unwind label %53 -61: ; preds = %53 - %62 = landingpad { ptr, i32 } +59: ; preds = %53 + %60 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #33 unreachable @@ -988,15 +983,15 @@ switch.lookup20: ; preds = %switch.lookup18 .body: ; preds = %39, %53 %eh.lpad-body = phi { ptr, i32 } [ %lpad.phi.i.i, %39 ], [ %54, %53 ] invoke void @"_ZN4core3ptr65drop_in_place$LT$alloc..vec..Vec$LT$alloc..string..String$GT$$GT$17h15994deaeaf2094aE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %11) #32 - to label %common.resume unwind label %63 + to label %common.resume unwind label %61 .loopexit: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hb11464bd8a11e3dbE.exit.i.i", %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h7a2850656f4f6ccaE.exit.i.i", %36, %29 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %.sroa.8.i.i) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %11, i64 24, i1 false) br label %24 -63: ; preds = %25, %.body - %64 = landingpad { ptr, i32 } +61: ; preds = %25, %.body + %62 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #33 unreachable @@ -12211,13 +12206,13 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #30 declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #31 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.ucmp.i8.i64(i64, i64) #28 +declare i64 @llvm.umin.i64(i64, i64) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #28 +declare i8 @llvm.ucmp.i8.i64(i64, i64) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #28 +declare i64 @llvm.umax.i64(i64, i64) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.scmp.i8.i64(i64, i64) #28 diff --git a/bench/ockam-rs/optimized/3pv8r5vqgt8gdr9t.ll b/bench/ockam-rs/optimized/3pv8r5vqgt8gdr9t.ll index 27d351ee310..d1aaa027d88 100644 --- a/bench/ockam-rs/optimized/3pv8r5vqgt8gdr9t.ll +++ b/bench/ockam-rs/optimized/3pv8r5vqgt8gdr9t.ll @@ -13240,15 +13240,14 @@ define noundef zeroext i1 @"_ZN75_$LT$ockam_abac..resource..ResourceTypeIter$u20 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %7 = load i64, ptr %6, align 8, !alias.scope !1761, !noalias !1766, !noundef !45 %8 = add i64 %7, %5 - %9 = icmp ugt i64 %8, 2 - %10 = sub nuw nsw i64 3, %8 - %.0.i.i = select i1 %9, i64 0, i64 %10 + %9 = tail call i64 @llvm.umin.i64(i64 %8, i64 3) + %.0.i.i = xor i64 %9, 3 store i64 %.0.i.i, ptr %3, align 8 - %11 = call noundef align 8 dereferenceable(16) ptr @_ZN4core3fmt8builders11DebugStruct5field17haf2f6c53e543649eE(ptr noalias noundef nonnull align 8 dereferenceable(16) %4, ptr noalias noundef nonnull readonly align 1 @anon.319bcac2edebe9295f179af30ff32645.157, i64 noundef 3, ptr noundef nonnull align 1 %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.319bcac2edebe9295f179af30ff32645.158) - %12 = call noundef zeroext i1 @_ZN4core3fmt8builders11DebugStruct6finish17h5cca625c6aa0e92fE(ptr noalias noundef nonnull align 8 dereferenceable(16) %11) + %10 = call noundef align 8 dereferenceable(16) ptr @_ZN4core3fmt8builders11DebugStruct5field17haf2f6c53e543649eE(ptr noalias noundef nonnull align 8 dereferenceable(16) %4, ptr noalias noundef nonnull readonly align 1 @anon.319bcac2edebe9295f179af30ff32645.157, i64 noundef 3, ptr noundef nonnull align 1 %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.319bcac2edebe9295f179af30ff32645.158) + %11 = call noundef zeroext i1 @_ZN4core3fmt8builders11DebugStruct6finish17h5cca625c6aa0e92fE(ptr noalias noundef nonnull align 8 dereferenceable(16) %10) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) - ret i1 %12 + ret i1 %11 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -13295,14 +13294,13 @@ define void @"_ZN97_$LT$ockam_abac..resource..ResourceTypeIter$u20$as$u20$core.. %4 = getelementptr inbounds nuw i8, ptr %1, i64 8 %5 = load i64, ptr %4, align 8, !noundef !45 %6 = add i64 %5, %3 - %7 = icmp ugt i64 %6, 2 - %8 = sub nuw nsw i64 3, %6 - %.0 = select i1 %7, i64 0, i64 %8 + %7 = tail call i64 @llvm.umin.i64(i64 %6, i64 3) + %.0 = xor i64 %7, 3 store i64 %.0, ptr %0, align 8 - %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 1, ptr %9, align 8 - %10 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %.0, ptr %10, align 8 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 1, ptr %8, align 8 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %.0, ptr %9, align 8 ret void } @@ -13338,9 +13336,8 @@ define noundef range(i64 0, 4) i64 @"_ZN108_$LT$ockam_abac..resource..ResourceTy %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load i64, ptr %3, align 8, !alias.scope !1771, !noalias !1774, !noundef !45 %5 = add i64 %4, %2 - %6 = icmp ugt i64 %5, 2 - %7 = sub nuw nsw i64 3, %5 - %.0.i = select i1 %6, i64 0, i64 %7 + %6 = tail call i64 @llvm.umin.i64(i64 %5, i64 3) + %.0.i = xor i64 %6, 3 ret i64 %.0.i } diff --git a/bench/opencv/optimized/FilterTIG.cpp.ll b/bench/opencv/optimized/FilterTIG.cpp.ll index 48864845490..2a85ac10017 100644 --- a/bench/opencv/optimized/FilterTIG.cpp.ll +++ b/bench/opencv/optimized/FilterTIG.cpp.ll @@ -276,7 +276,7 @@ define void @_ZN2cv8saliency14ObjectnessBING9FilterTIG11reconstructERNS_3MatE(pt %6 = getelementptr inbounds nuw i8, ptr %5, i64 24 %7 = load ptr, ptr %6, align 8 invoke void %7(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(352) %3, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef -1) - to label %_ZN2cv3MataSERKNS_7MatExprE.exit unwind label %27 + to label %_ZN2cv3MataSERKNS_7MatExprE.exit unwind label %29 _ZN2cv3MataSERKNS_7MatExprE.exit: ; preds = %2 %8 = getelementptr inbounds nuw i8, ptr %3, i64 208 @@ -290,9 +290,9 @@ _ZN2cv3MataSERKNS_7MatExprE.exit: ; preds = %2 %13 = getelementptr inbounds nuw i8, ptr %0, i64 16 br label %14 -14: ; preds = %_ZN2cv3MataSERKNS_7MatExprE.exit, %29 - %15 = phi i1 [ true, %_ZN2cv3MataSERKNS_7MatExprE.exit ], [ false, %29 ] - %indvars.iv18 = phi i64 [ 0, %_ZN2cv3MataSERKNS_7MatExprE.exit ], [ 1, %29 ] +14: ; preds = %_ZN2cv3MataSERKNS_7MatExprE.exit, %31 + %15 = phi i1 [ true, %_ZN2cv3MataSERKNS_7MatExprE.exit ], [ false, %31 ] + %indvars.iv18 = phi i64 [ 0, %_ZN2cv3MataSERKNS_7MatExprE.exit ], [ 1, %31 ] %16 = getelementptr inbounds nuw [2 x i64], ptr %0, i64 0, i64 %indvars.iv18 %17 = load i64, ptr %16, align 8 %18 = getelementptr inbounds nuw [2 x float], ptr %13, i64 0, i64 %indvars.iv18 @@ -301,28 +301,30 @@ _ZN2cv3MataSERKNS_7MatExprE.exit: ; preds = %2 19: ; preds = %14, %19 %indvars.iv = phi i64 [ 0, %14 ], [ %indvars.iv.next, %19 ] %20 = load float, ptr %18, align 4 - %21 = lshr exact i64 -9223372036854775808, %indvars.iv - %22 = and i64 %21, %17 - %.not = icmp eq i64 %22, 0 - %23 = select i1 %.not, float -1.000000e+00, float 1.000000e+00 - %24 = getelementptr inbounds nuw float, ptr %12, i64 %indvars.iv - %25 = load float, ptr %24, align 4 - %26 = call float @llvm.fmuladd.f32(float %20, float %23, float %25) - store float %26, ptr %24, align 4 + %21 = and i64 %indvars.iv, 4294967295 + %22 = xor i64 %21, 63 + %23 = shl nuw i64 1, %22 + %24 = and i64 %23, %17 + %.not = icmp eq i64 %24, 0 + %25 = select i1 %.not, float -1.000000e+00, float 1.000000e+00 + %26 = getelementptr inbounds nuw float, ptr %12, i64 %indvars.iv + %27 = load float, ptr %26, align 4 + %28 = call float @llvm.fmuladd.f32(float %20, float %25, float %27) + store float %28, ptr %26, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 64 - br i1 %exitcond.not, label %29, label %19, !llvm.loop !9 + br i1 %exitcond.not, label %31, label %19, !llvm.loop !9 -27: ; preds = %2 - %28 = landingpad { ptr, i32 } +29: ; preds = %2 + %30 = landingpad { ptr, i32 } cleanup call void @_ZN2cv7MatExprD2Ev(ptr noundef nonnull align 8 dereferenceable(352) %3) #11 - resume { ptr, i32 } %28 + resume { ptr, i32 } %30 -29: ; preds = %19 - br i1 %15, label %14, label %30, !llvm.loop !10 +31: ; preds = %19 + br i1 %15, label %14, label %32, !llvm.loop !10 -30: ; preds = %29 +32: ; preds = %31 ret void } diff --git a/bench/opencv/optimized/darknet_io.cpp.ll b/bench/opencv/optimized/darknet_io.cpp.ll index 4a8ab834ad9..6a8a3c49486 100644 --- a/bench/opencv/optimized/darknet_io.cpp.ll +++ b/bench/opencv/optimized/darknet_io.cpp.ll @@ -11270,7 +11270,7 @@ define hidden noundef zeroext i1 @_ZN2cv3dnn7darknet28ReadDarknetFromWeightsStre 79: ; preds = %77, %75 %.pn139 = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #20 - br label %422 + br label %424 80: ; preds = %66 %81 = call noalias noundef nonnull dereferenceable(12) ptr @_Znwm(i64 noundef 12) #22 @@ -11324,7 +11324,7 @@ define hidden noundef zeroext i1 @_ZN2cv3dnn7darknet28ReadDarknetFromWeightsStre %indvars.iv = phi i64 [ -1, %.lr.ph ], [ %indvars.iv.next, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] %.092308 = phi i32 [ -1, %.lr.ph ], [ %spec.select, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] %.sroa.0221.0306 = phi ptr [ %81, %.lr.ph ], [ %.sroa.0221.2, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] - %.sroa.0218.0305 = phi ptr [ %94, %.lr.ph ], [ %416, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] + %.sroa.0218.0305 = phi ptr [ %94, %.lr.ph ], [ %418, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] %.sroa.25.0304 = phi ptr [ %96, %.lr.ph ], [ %.sroa.25.1, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] %.sroa.17.0303 = phi ptr [ %96, %.lr.ph ], [ %.sroa.17.1, %_ZNSt6vectorIiSaIiEE6resizeEm.exit ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 @@ -11429,7 +11429,7 @@ define hidden noundef zeroext i1 @_ZN2cv3dnn7darknet28ReadDarknetFromWeightsStre 149: ; preds = %147, %145 %.pn = phi { ptr, i32 } [ %148, %147 ], [ %146, %145 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #20 - br label %421 + br label %423 .loopexit: ; preds = %201, %_ZN2cv3dnn14dnn4_v20240521L5totalERKSt6vectorIiSaIiEEii.exit156, %261 %lpad.loopexit = landingpad { ptr, i32 } @@ -12170,7 +12170,7 @@ _ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit209: ; preds = %_ZSt8_DestroyIPN2cv 366: ; preds = %.loopexit, %.loopexit.split-lp, %365, %260, %232, %224, %219, %200, %188, %177, %169, %164, %159, %154 %.pn124.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn124.pn.pn.pn.pn.pn, %365 ], [ %.pn122, %260 ], [ %.pn120, %200 ], [ %.pn118, %188 ], [ %.pn116, %177 ], [ %.pn114, %169 ], [ %.pn112, %164 ], [ %.pn110, %159 ], [ %.pn108, %154 ], [ %.pn106, %232 ], [ %.pn104, %224 ], [ %.pn102, %219 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %14) #20 - br label %417 + br label %419 367: ; preds = %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit209, %122 %.193 = phi i32 [ %.294, %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit209 ], [ %114, %122 ] @@ -12239,13 +12239,13 @@ _ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit209: ; preds = %_ZSt8_DestroyIPN2cv 389: ; preds = %388, %382 %.pn132.pn = phi { ptr, i32 } [ %.pn132, %388 ], [ %383, %382 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #20 - br label %417 + br label %419 390: ; preds = %_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i %391 = landingpad { ptr, i32 } cleanup call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #20 - br label %417 + br label %419 392: ; preds = %378 %393 = ptrtoint ptr %.sroa.17.0303 to i64 @@ -12253,10 +12253,10 @@ _ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit209: ; preds = %_ZSt8_DestroyIPN2cv %395 = sub i64 %393, %394 %396 = ashr exact i64 %395, 2 %397 = icmp eq ptr %.sroa.17.0303, %.sroa.0221.0306 - br i1 %397, label %398, label %410 + br i1 %397, label %398, label %412 398: ; preds = %392 - %399 = sub nuw nsw i64 1, %396 + %399 = xor i64 %396, 1 %400 = ptrtoint ptr %.sroa.25.0304 to i64 %401 = sub i64 %400, %393 %402 = ashr exact i64 %401, 2 @@ -12272,41 +12272,43 @@ _ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i: ; preds = %398 br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i: ; preds = %398 - %406 = invoke noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #22 + %406 = add nuw nsw i64 %399, %396 + %407 = shl nuw nsw i64 %406, 2 + %408 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %407) #22 to label %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i unwind label %390 _ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i: ; preds = %_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i - %407 = getelementptr inbounds i8, ptr %406, i64 %395 - store i32 0, ptr %407, align 4 + %409 = getelementptr inbounds i8, ptr %408, i64 %395 + store i32 0, ptr %409, align 4 call void @_ZdlPv(ptr noundef nonnull %.sroa.0221.0306) #23 - %408 = getelementptr inbounds nuw i32, ptr %407, i64 %399 - %409 = getelementptr inbounds nuw i8, ptr %406, i64 4 + %410 = getelementptr inbounds i32, ptr %409, i64 %399 + %411 = getelementptr inbounds nuw i32, ptr %408, i64 %406 br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit -410: ; preds = %392 - %411 = icmp ugt i64 %396, 1 - %412 = getelementptr inbounds nuw i8, ptr %.sroa.0221.0306, i64 4 - %spec.select243 = select i1 %411, ptr %412, ptr %.sroa.17.0303 +412: ; preds = %392 + %413 = icmp ugt i64 %396, 1 + %414 = getelementptr inbounds nuw i8, ptr %.sroa.0221.0306, i64 4 + %spec.select243 = select i1 %413, ptr %414, ptr %.sroa.17.0303 br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit -_ZNSt6vectorIiSaIiEE6resizeEm.exit: ; preds = %410, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i, %378 - %.sroa.17.1 = phi ptr [ %.sroa.17.0303, %378 ], [ %408, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i ], [ %405, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ], [ %spec.select243, %410 ] - %.sroa.25.1 = phi ptr [ %.sroa.25.0304, %378 ], [ %409, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i ], [ %.sroa.25.0304, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ], [ %.sroa.25.0304, %410 ] - %.sroa.0221.2 = phi ptr [ %.sroa.0221.0306, %378 ], [ %406, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i ], [ %.sroa.0221.0306, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ], [ %.sroa.0221.0306, %410 ] - %413 = load ptr, ptr %112, align 8 - %414 = getelementptr inbounds i32, ptr %413, i64 %indvars.iv.next - %415 = load i32, ptr %414, align 4 - store i32 %415, ptr %.sroa.0221.2, align 4 +_ZNSt6vectorIiSaIiEE6resizeEm.exit: ; preds = %412, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i, %378 + %.sroa.17.1 = phi ptr [ %.sroa.17.0303, %378 ], [ %410, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i ], [ %405, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ], [ %spec.select243, %412 ] + %.sroa.25.1 = phi ptr [ %.sroa.25.0304, %378 ], [ %411, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i ], [ %.sroa.25.0304, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ], [ %.sroa.25.0304, %412 ] + %.sroa.0221.2 = phi ptr [ %.sroa.0221.0306, %378 ], [ %408, %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35.i ], [ %.sroa.0221.0306, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ], [ %.sroa.0221.0306, %412 ] + %415 = load ptr, ptr %112, align 8 + %416 = getelementptr inbounds i32, ptr %415, i64 %indvars.iv.next + %417 = load i32, ptr %416, align 4 + store i32 %417, ptr %.sroa.0221.2, align 4 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #20 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #20 - %416 = call noundef ptr @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(ptr noundef %.sroa.0218.0305) #24 - %.not240 = icmp eq ptr %416, %95 + %418 = call noundef ptr @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(ptr noundef %.sroa.0218.0305) #24 + %.not240 = icmp eq ptr %418, %95 br i1 %.not240, label %._crit_edge, label %113, !llvm.loop !49 -417: ; preds = %390, %389, %366 +419: ; preds = %390, %389, %366 %.pn135 = phi { ptr, i32 } [ %391, %390 ], [ %.pn132.pn, %389 ], [ %.pn124.pn.pn.pn.pn.pn.pn, %366 ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #20 - br label %421 + br label %423 ._crit_edge: ; preds = %_ZNSt6vectorIiSaIiEE6resizeEm.exit %.pre370 = load ptr, ptr %92, align 8 @@ -12316,10 +12318,10 @@ _ZNSt6vectorIiSaIiEE6resizeEm.exit: ; preds = %410, %_ZNSt12_Vecto br i1 %.not4.i.i.i.i.i, label %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i, label %.lr.ph.i.i.i.i.i .lr.ph.i.i.i.i.i: ; preds = %._crit_edge, %.lr.ph.i.i.i.i.i - %.05.i.i.i.i.i = phi ptr [ %418, %.lr.ph.i.i.i.i.i ], [ %.pre370, %._crit_edge ] + %.05.i.i.i.i.i = phi ptr [ %420, %.lr.ph.i.i.i.i.i ], [ %.pre370, %._crit_edge ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %.05.i.i.i.i.i) #20 - %418 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i.i, i64 32 - %.not.i.i.i.i.i = icmp eq ptr %418, %.pre371 + %420 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i.i, i64 32 + %.not.i.i.i.i.i = icmp eq ptr %420, %.pre371 br i1 %.not.i.i.i.i.i, label %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !16 _ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split.i.i: ; preds = %.lr.ph.i.i.i.i.i @@ -12327,32 +12329,32 @@ _ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSa br label %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i _ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i: ; preds = %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split.i.i, %._crit_edge - %419 = phi ptr [ %.pr.i.i, %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split.i.i ], [ %.pre370, %._crit_edge ] - %.not.i.i.i.i211 = icmp eq ptr %419, null - br i1 %.not.i.i.i.i211, label %_ZNSt6vectorIiSaIiEED2Ev.exit, label %420 + %421 = phi ptr [ %.pr.i.i, %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split.i.i ], [ %.pre370, %._crit_edge ] + %.not.i.i.i.i211 = icmp eq ptr %421, null + br i1 %.not.i.i.i.i211, label %_ZNSt6vectorIiSaIiEED2Ev.exit, label %422 -420: ; preds = %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i - call void @_ZdlPv(ptr noundef nonnull %419) #23 +422: ; preds = %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i + call void @_ZdlPv(ptr noundef nonnull %421) #23 br label %_ZNSt6vectorIiSaIiEED2Ev.exit -_ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %91, %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i, %420 - %.sroa.0221.0.lcssa375378 = phi ptr [ %.sroa.0221.2, %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i ], [ %.sroa.0221.2, %420 ], [ %81, %91 ] +_ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %91, %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i, %422 + %.sroa.0221.0.lcssa375378 = phi ptr [ %.sroa.0221.2, %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i ], [ %.sroa.0221.2, %422 ], [ %81, %91 ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %90) #20 call void @_ZdlPv(ptr noundef nonnull %.sroa.0221.0.lcssa375378) #23 ret i1 true -421: ; preds = %417, %149 - %.pn135.pn = phi { ptr, i32 } [ %.pn135, %417 ], [ %.pn, %149 ] +423: ; preds = %419, %149 + %.pn135.pn = phi { ptr, i32 } [ %.pn135, %419 ], [ %.pn, %149 ] call void @_ZN2cv3dnn7darknet15setLayersParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %10) #20 br label %_ZNSt6vectorIiSaIiEED2Ev.exit214 -_ZNSt6vectorIiSaIiEED2Ev.exit214: ; preds = %421, %143 - %.sroa.0221.1 = phi ptr [ %.sroa.0221.0306, %421 ], [ %81, %143 ] - %.pn135.pn.pn = phi { ptr, i32 } [ %.pn135.pn, %421 ], [ %144, %143 ] +_ZNSt6vectorIiSaIiEED2Ev.exit214: ; preds = %423, %143 + %.sroa.0221.1 = phi ptr [ %.sroa.0221.0306, %423 ], [ %81, %143 ] + %.pn135.pn.pn = phi { ptr, i32 } [ %.pn135.pn, %423 ], [ %144, %143 ] call void @_ZdlPv(ptr noundef nonnull %.sroa.0221.1) #23 - br label %422 + br label %424 -422: ; preds = %_ZNSt6vectorIiSaIiEED2Ev.exit214, %79 +424: ; preds = %_ZNSt6vectorIiSaIiEED2Ev.exit214, %79 %.pn139.pn = phi { ptr, i32 } [ %.pn139, %79 ], [ %.pn135.pn.pn, %_ZNSt6vectorIiSaIiEED2Ev.exit214 ] resume { ptr, i32 } %.pn139.pn } diff --git a/bench/opencv/optimized/matrix_sparse.cpp.ll b/bench/opencv/optimized/matrix_sparse.cpp.ll index bc1bcde157f..354a937391d 100644 --- a/bench/opencv/optimized/matrix_sparse.cpp.ll +++ b/bench/opencv/optimized/matrix_sparse.cpp.ll @@ -326,7 +326,7 @@ define void @_ZN2cv9SparseMat3HdrC2EiPKii(ptr noundef nonnull align 8 dereferenc %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %.preheader, label %31, !llvm.loop !4 -35: ; preds = %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i, %67, %_ZNSt6vectorIhSaIhEE5clearEv.exit.i +35: ; preds = %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i, %68, %_ZNSt6vectorIhSaIhEE5clearEv.exit.i %36 = landingpad { ptr, i32 } cleanup %37 = load ptr, ptr %6, align 8 @@ -356,111 +356,112 @@ _ZNSt6vectorIhSaIhEED2Ev.exit: ; preds = %_ZNSt6vectorImSaImE %43 = getelementptr i8, ptr %0, i64 %42 %scevgep = getelementptr i8, ptr %43, i64 88 %44 = shl nuw nsw i32 %.0.lcssa28, 2 - %narrow = sub nuw nsw i32 128, %44 - %45 = zext nneg i32 %narrow to i64 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %45, i1 false) + %45 = xor i32 %44, 124 + %narrow = add nuw nsw i32 %45, 4 + %46 = zext nneg i32 %narrow to i64 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %46, i1 false) %.pre = load ptr, ptr %6, align 8 %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %0, i64 72 %.pre26 = load ptr, ptr %.phi.trans.insert, align 8 - %46 = getelementptr inbounds nuw i8, ptr %0, i64 72 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 72 %.not.i.i.i15 = icmp eq ptr %.pre26, %.pre - br i1 %.not.i.i.i15, label %_ZNSt6vectorImSaImEE6resizeEm.exit.i, label %47 + br i1 %.not.i.i.i15, label %_ZNSt6vectorImSaImEE6resizeEm.exit.i, label %48 -47: ; preds = %._crit_edge - store ptr %.pre, ptr %46, align 8 +48: ; preds = %._crit_edge + store ptr %.pre, ptr %47, align 8 br label %_ZNSt6vectorImSaImEE6resizeEm.exit.i -_ZNSt6vectorImSaImEE6resizeEm.exit.i: ; preds = %._crit_edge.thread, %47, %._crit_edge - %48 = phi ptr [ %46, %47 ], [ %46, %._crit_edge ], [ %30, %._crit_edge.thread ] - %49 = phi ptr [ %.pre, %47 ], [ %.pre, %._crit_edge ], [ null, %._crit_edge.thread ] - %50 = phi ptr [ %.pre, %47 ], [ %.pre26, %._crit_edge ], [ null, %._crit_edge.thread ] - %51 = ptrtoint ptr %50 to i64 - %52 = ptrtoint ptr %49 to i64 - %53 = sub i64 %51, %52 - %54 = ashr exact i64 %53, 3 - %55 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %56 = load ptr, ptr %55, align 8 - %57 = ptrtoint ptr %56 to i64 - %58 = sub i64 %57, %51 - %59 = ashr exact i64 %58, 3 - %60 = icmp ult i64 %54, 1152921504606846976 - tail call void @llvm.assume(i1 %60) - %61 = xor i64 %54, 1152921504606846975 - %62 = icmp ule i64 %59, %61 - tail call void @llvm.assume(i1 %62) - %.not28.i = icmp ult i64 %59, 8 - br i1 %.not28.i, label %65, label %63 - -63: ; preds = %_ZNSt6vectorImSaImEE6resizeEm.exit.i - %64 = getelementptr i8, ptr %50, i64 64 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %50, i8 0, i64 64, i1 false) - store ptr %64, ptr %48, align 8 +_ZNSt6vectorImSaImEE6resizeEm.exit.i: ; preds = %._crit_edge.thread, %48, %._crit_edge + %49 = phi ptr [ %47, %48 ], [ %47, %._crit_edge ], [ %30, %._crit_edge.thread ] + %50 = phi ptr [ %.pre, %48 ], [ %.pre, %._crit_edge ], [ null, %._crit_edge.thread ] + %51 = phi ptr [ %.pre, %48 ], [ %.pre26, %._crit_edge ], [ null, %._crit_edge.thread ] + %52 = ptrtoint ptr %51 to i64 + %53 = ptrtoint ptr %50 to i64 + %54 = sub i64 %52, %53 + %55 = ashr exact i64 %54, 3 + %56 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %57 = load ptr, ptr %56, align 8 + %58 = ptrtoint ptr %57 to i64 + %59 = sub i64 %58, %52 + %60 = ashr exact i64 %59, 3 + %61 = icmp ult i64 %55, 1152921504606846976 + tail call void @llvm.assume(i1 %61) + %62 = xor i64 %55, 1152921504606846975 + %63 = icmp ule i64 %60, %62 + tail call void @llvm.assume(i1 %63) + %.not28.i = icmp ult i64 %60, 8 + br i1 %.not28.i, label %66, label %64 + +64: ; preds = %_ZNSt6vectorImSaImEE6resizeEm.exit.i + %65 = getelementptr i8, ptr %51, i64 64 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %51, i8 0, i64 64, i1 false) + store ptr %65, ptr %49, align 8 br label %.noexc -65: ; preds = %_ZNSt6vectorImSaImEE6resizeEm.exit.i - %66 = icmp samesign ult i64 %61, 8 - br i1 %66, label %67, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i +66: ; preds = %_ZNSt6vectorImSaImEE6resizeEm.exit.i + %67 = icmp samesign ult i64 %62, 8 + br i1 %67, label %68, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i -67: ; preds = %65 +68: ; preds = %66 invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.17) #25 to label %.noexc17 unwind label %35 -.noexc17: ; preds = %67 +.noexc17: ; preds = %68 unreachable -_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i: ; preds = %65 - %.sroa.speculated.i.i = tail call i64 @llvm.umax.i64(i64 %54, i64 8) - %68 = add nuw nsw i64 %.sroa.speculated.i.i, %54 - %69 = tail call i64 @llvm.umin.i64(i64 %68, i64 1152921504606846975) - %70 = shl nuw nsw i64 %69, 3 - %71 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %70) #26 +_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i: ; preds = %66 + %.sroa.speculated.i.i = tail call i64 @llvm.umax.i64(i64 %55, i64 8) + %69 = add nuw nsw i64 %.sroa.speculated.i.i, %55 + %70 = tail call i64 @llvm.umin.i64(i64 %69, i64 1152921504606846975) + %71 = shl nuw nsw i64 %70, 3 + %72 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %71) #26 to label %.noexc18 unwind label %35 .noexc18: ; preds = %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i - %72 = getelementptr inbounds i8, ptr %71, i64 %53 - %73 = icmp sgt i64 %53, 0 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %72, i8 0, i64 64, i1 false) - br i1 %73, label %74, label %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i + %73 = getelementptr inbounds i8, ptr %72, i64 %54 + %74 = icmp sgt i64 %54, 0 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %73, i8 0, i64 64, i1 false) + br i1 %74, label %75, label %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i -74: ; preds = %.noexc18 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %71, ptr align 8 %49, i64 %53, i1 false) +75: ; preds = %.noexc18 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 8 %72, ptr align 8 %50, i64 %54, i1 false) br label %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i -_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i: ; preds = %74, %.noexc18 - %.not.i34.i = icmp eq ptr %49, null - br i1 %.not.i34.i, label %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i, label %75 +_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i: ; preds = %75, %.noexc18 + %.not.i34.i = icmp eq ptr %50, null + br i1 %.not.i34.i, label %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i, label %76 -75: ; preds = %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i - tail call void @_ZdlPv(ptr noundef nonnull %49) #24 +76: ; preds = %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i + tail call void @_ZdlPv(ptr noundef nonnull %50) #24 br label %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i -_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i: ; preds = %75, %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i - store ptr %71, ptr %6, align 8 - %76 = getelementptr inbounds nuw i8, ptr %72, i64 64 - store ptr %76, ptr %48, align 8 - %77 = getelementptr inbounds nuw i64, ptr %71, i64 %69 - store ptr %77, ptr %55, align 8 +_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i: ; preds = %76, %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i + store ptr %72, ptr %6, align 8 + %77 = getelementptr inbounds nuw i8, ptr %73, i64 64 + store ptr %77, ptr %49, align 8 + %78 = getelementptr inbounds nuw i64, ptr %72, i64 %70 + store ptr %78, ptr %56, align 8 br label %.noexc -.noexc: ; preds = %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i, %63 - %78 = load ptr, ptr %5, align 8 - %79 = getelementptr inbounds nuw i8, ptr %0, i64 48 - %80 = load ptr, ptr %79, align 8 - %.not.i.i2.i = icmp eq ptr %80, %78 - br i1 %.not.i.i2.i, label %_ZNSt6vectorIhSaIhEE5clearEv.exit.i, label %81 +.noexc: ; preds = %_ZNSt12_Vector_baseImSaImEE13_M_deallocateEPmm.exit35.i, %64 + %79 = load ptr, ptr %5, align 8 + %80 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %81 = load ptr, ptr %80, align 8 + %.not.i.i2.i = icmp eq ptr %81, %79 + br i1 %.not.i.i2.i, label %_ZNSt6vectorIhSaIhEE5clearEv.exit.i, label %82 -81: ; preds = %.noexc - store ptr %78, ptr %79, align 8 +82: ; preds = %.noexc + store ptr %79, ptr %80, align 8 br label %_ZNSt6vectorIhSaIhEE5clearEv.exit.i -_ZNSt6vectorIhSaIhEE5clearEv.exit.i: ; preds = %81, %.noexc - %82 = load i64, ptr %26, align 8 - invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %82) - to label %83 unwind label %35 +_ZNSt6vectorIhSaIhEE5clearEv.exit.i: ; preds = %82, %.noexc + %83 = load i64, ptr %26, align 8 + invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %83) + to label %84 unwind label %35 -83: ; preds = %_ZNSt6vectorIhSaIhEE5clearEv.exit.i - %84 = getelementptr inbounds nuw i8, ptr %0, i64 24 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %84, i8 0, i64 16, i1 false) +84: ; preds = %_ZNSt6vectorIhSaIhEE5clearEv.exit.i + %85 = getelementptr inbounds nuw i8, ptr %0, i64 24 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %85, i8 0, i64 16, i1 false) ret void } diff --git a/bench/opencv/optimized/ppf_match_3d.cpp.ll b/bench/opencv/optimized/ppf_match_3d.cpp.ll index 478120ac5a7..68ace2060fa 100644 --- a/bench/opencv/optimized/ppf_match_3d.cpp.ll +++ b/bench/opencv/optimized/ppf_match_3d.cpp.ll @@ -6186,9 +6186,9 @@ _ZN2cvmlIdLi3ELi3EEENS_4MatxIT_XT0_EXT1_EEEdRKS3_.exit.i: ; preds = %42 invoke void @_ZNK2cv3Mat6copyToERKNS_12_OutputArrayE(ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef nonnull align 8 dereferenceable(24) %7) to label %59 unwind label %57 -common.resume.i: ; preds = %82, %57 - %.sink.i = phi ptr [ %8, %82 ], [ %6, %57 ] - %common.resume.op.i = phi { ptr, i32 } [ %83, %82 ], [ %58, %57 ] +common.resume.i: ; preds = %83, %57 + %.sink.i = phi ptr [ %8, %83 ], [ %6, %57 ] + %common.resume.op.i = phi { ptr, i32 } [ %84, %83 ], [ %58, %57 ] call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %.sink.i) #24 resume { ptr, i32 } %common.resume.op.i @@ -6207,109 +6207,111 @@ common.resume.i: ; preds = %82, %57 %61 = getelementptr inbounds nuw i8, ptr %11, i64 16 store i64 12884901891, ptr %61, align 8 invoke void @_ZNK2cv3Mat6copyToERKNS_12_OutputArrayE(ptr noundef nonnull align 8 dereferenceable(96) %8, ptr noundef nonnull align 8 dereferenceable(24) %11) - to label %62 unwind label %82 + to label %62 unwind label %83 62: ; preds = %59 call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #24 %63 = fneg double %37 br label %.preheader.i -.preheader.i: ; preds = %90, %62 - %indvars.iv36.i = phi i64 [ 0, %62 ], [ %indvars.iv.next37.i, %90 ] +.preheader.i: ; preds = %91, %62 + %indvars.iv36.i = phi i64 [ 0, %62 ], [ %indvars.iv.next37.i, %91 ] %64 = getelementptr inbounds nuw [3 x double], ptr %12, i64 0, i64 %indvars.iv36.i %65 = mul nuw nsw i64 %indvars.iv36.i, 3 %indvars.iv.next37.i = add nuw nsw i64 %indvars.iv36.i, 1 %66 = icmp eq i64 %indvars.iv.next37.i, 3 %67 = select i1 %66, i64 0, i64 %indvars.iv.next37.i - %68 = load double, ptr %64, align 8 - %69 = fmul double %47, %68 + %68 = shl i64 %indvars.iv36.i, 32 + %sext.i = ashr exact i64 %68, 32 + %69 = xor i64 %sext.i, 3 + %70 = load double, ptr %64, align 8 + %71 = fmul double %47, %70 %.pre.i = shl nuw nsw i64 %indvars.iv36.i, 2 %.phi.trans.insert = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %.pre.i - br label %70 + br label %72 -70: ; preds = %84, %.preheader.i - %indvars.iv.i = phi i64 [ 0, %.preheader.i ], [ %indvars.iv.next.i, %84 ] +72: ; preds = %85, %.preheader.i + %indvars.iv.i = phi i64 [ 0, %.preheader.i ], [ %indvars.iv.next.i, %85 ] %.not.i = icmp eq i64 %indvars.iv36.i, %indvars.iv.i - br i1 %.not.i, label %._crit_edge.i, label %71 + br i1 %.not.i, label %._crit_edge.i, label %73 -._crit_edge.i: ; preds = %70 +._crit_edge.i: ; preds = %72 %.pre = load double, ptr %.phi.trans.insert, align 8 - br label %84 - -71: ; preds = %70 - %72 = icmp eq i64 %67, %indvars.iv.i - %73 = select i1 %72, double %63, double %37 - %74 = add nuw nsw i64 %indvars.iv36.i, %indvars.iv.i - %75 = sub nsw i64 3, %74 - %76 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 %75 - %77 = load double, ptr %76, align 8 - %78 = add nuw nsw i64 %indvars.iv.i, %65 - %79 = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %78 - %80 = load double, ptr %79, align 8 - %81 = call double @llvm.fmuladd.f64(double %73, double %77, double %80) - store double %81, ptr %79, align 8 - br label %84 - -82: ; preds = %59 - %83 = landingpad { ptr, i32 } + br label %85 + +73: ; preds = %72 + %74 = icmp eq i64 %67, %indvars.iv.i + %75 = select i1 %74, double %63, double %37 + %76 = sub nsw i64 %69, %indvars.iv.i + %77 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 %76 + %78 = load double, ptr %77, align 8 + %79 = add nuw nsw i64 %indvars.iv.i, %65 + %80 = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %79 + %81 = load double, ptr %80, align 8 + %82 = call double @llvm.fmuladd.f64(double %75, double %78, double %81) + store double %82, ptr %80, align 8 + br label %85 + +83: ; preds = %59 + %84 = landingpad { ptr, i32 } cleanup br label %common.resume.i -84: ; preds = %71, %._crit_edge.i - %85 = phi double [ %.pre, %._crit_edge.i ], [ %81, %71 ] - %.pre-phi.i = phi i64 [ %.pre.i, %._crit_edge.i ], [ %78, %71 ] - %86 = getelementptr inbounds nuw [3 x double], ptr %12, i64 0, i64 %indvars.iv.i - %87 = load double, ptr %86, align 8 - %88 = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %.pre-phi.i - %89 = call double @llvm.fmuladd.f64(double %69, double %87, double %85) - store double %89, ptr %88, align 8 +85: ; preds = %73, %._crit_edge.i + %86 = phi double [ %.pre, %._crit_edge.i ], [ %82, %73 ] + %.pre-phi.i = phi i64 [ %.pre.i, %._crit_edge.i ], [ %79, %73 ] + %87 = getelementptr inbounds nuw [3 x double], ptr %12, i64 0, i64 %indvars.iv.i + %88 = load double, ptr %87, align 8 + %89 = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %.pre-phi.i + %90 = call double @llvm.fmuladd.f64(double %71, double %88, double %86) + store double %90, ptr %89, align 8 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 3 - br i1 %exitcond.not.i, label %90, label %70, !llvm.loop !169 + br i1 %exitcond.not.i, label %91, label %72, !llvm.loop !169 -90: ; preds = %84 +91: ; preds = %85 br i1 %66, label %_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit, label %.preheader.i, !llvm.loop !170 -_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit: ; preds = %90 +_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit: ; preds = %91 call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) call void @llvm.experimental.noalias.scope.decl(metadata !171) - br label %91 + br label %92 -91: ; preds = %91, %_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit - %indvars.iv.i.i16 = phi i64 [ 0, %_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit ], [ %indvars.iv.next.i.i17, %91 ] - %92 = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %indvars.iv.i.i16 - %93 = load double, ptr %92, align 8, !noalias !171 - %94 = fneg double %93 - %95 = getelementptr inbounds nuw [9 x double], ptr %13, i64 0, i64 %indvars.iv.i.i16 - store double %94, ptr %95, align 8, !alias.scope !171 +92: ; preds = %92, %_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit + %indvars.iv.i.i16 = phi i64 [ 0, %_ZN2cv12ppf_match_3dL5aaToRERKNS_3VecIdLi3EEEdRNS_4MatxIdLi3ELi3EEE.exit ], [ %indvars.iv.next.i.i17, %92 ] + %93 = getelementptr inbounds nuw [9 x double], ptr %2, i64 0, i64 %indvars.iv.i.i16 + %94 = load double, ptr %93, align 8, !noalias !171 + %95 = fneg double %94 + %96 = getelementptr inbounds nuw [9 x double], ptr %13, i64 0, i64 %indvars.iv.i.i16 + store double %95, ptr %96, align 8, !alias.scope !171 %indvars.iv.next.i.i17 = add nuw nsw i64 %indvars.iv.i.i16, 1 %exitcond.not.i.i18 = icmp eq i64 %indvars.iv.next.i.i17, 9 - br i1 %exitcond.not.i.i18, label %.preheader.i.i, label %91, !llvm.loop !138 - -.preheader.i.i: ; preds = %91, %.critedge.i.i - %indvars.iv23.i.i = phi i64 [ %indvars.iv.next24.i.i, %.critedge.i.i ], [ 0, %91 ] - %96 = mul nuw nsw i64 %indvars.iv23.i.i, 3 - br label %97 - -97: ; preds = %97, %.preheader.i.i - %indvars.iv.i.i19 = phi i64 [ 0, %.preheader.i.i ], [ %indvars.iv.next.i.i20, %97 ] - %.01619.i.i = phi double [ 0.000000e+00, %.preheader.i.i ], [ %103, %97 ] - %98 = add nuw nsw i64 %indvars.iv.i.i19, %96 - %99 = getelementptr inbounds nuw [9 x double], ptr %13, i64 0, i64 %98 - %100 = load double, ptr %99, align 8, !noalias !174 - %101 = getelementptr inbounds nuw [3 x double], ptr %0, i64 0, i64 %indvars.iv.i.i19 - %102 = load double, ptr %101, align 8, !noalias !174 - %103 = call double @llvm.fmuladd.f64(double %100, double %102, double %.01619.i.i) + br i1 %exitcond.not.i.i18, label %.preheader.i.i, label %92, !llvm.loop !138 + +.preheader.i.i: ; preds = %92, %.critedge.i.i + %indvars.iv23.i.i = phi i64 [ %indvars.iv.next24.i.i, %.critedge.i.i ], [ 0, %92 ] + %97 = mul nuw nsw i64 %indvars.iv23.i.i, 3 + br label %98 + +98: ; preds = %98, %.preheader.i.i + %indvars.iv.i.i19 = phi i64 [ 0, %.preheader.i.i ], [ %indvars.iv.next.i.i20, %98 ] + %.01619.i.i = phi double [ 0.000000e+00, %.preheader.i.i ], [ %104, %98 ] + %99 = add nuw nsw i64 %indvars.iv.i.i19, %97 + %100 = getelementptr inbounds nuw [9 x double], ptr %13, i64 0, i64 %99 + %101 = load double, ptr %100, align 8, !noalias !174 + %102 = getelementptr inbounds nuw [3 x double], ptr %0, i64 0, i64 %indvars.iv.i.i19 + %103 = load double, ptr %102, align 8, !noalias !174 + %104 = call double @llvm.fmuladd.f64(double %101, double %103, double %.01619.i.i) %indvars.iv.next.i.i20 = add nuw nsw i64 %indvars.iv.i.i19, 1 %exitcond.not.i.i21 = icmp eq i64 %indvars.iv.next.i.i20, 3 - br i1 %exitcond.not.i.i21, label %.critedge.i.i, label %97, !llvm.loop !41 + br i1 %exitcond.not.i.i21, label %.critedge.i.i, label %98, !llvm.loop !41 -.critedge.i.i: ; preds = %97 - %104 = getelementptr inbounds nuw [3 x double], ptr %5, i64 0, i64 %indvars.iv23.i.i - store double %103, ptr %104, align 8 +.critedge.i.i: ; preds = %98 + %105 = getelementptr inbounds nuw [3 x double], ptr %5, i64 0, i64 %indvars.iv23.i.i + store double %104, ptr %105, align 8 %indvars.iv.next24.i.i = add nuw nsw i64 %indvars.iv23.i.i, 1 %exitcond26.not.i.i = icmp eq i64 %indvars.iv.next24.i.i, 3 br i1 %exitcond26.not.i.i, label %_ZN2cvmlIdLi3ELi3EEENS_3VecIT_XT0_EEERKNS_4MatxIS2_XT0_EXT1_EEERKNS1_IS2_XT1_EEE.exit, label %.preheader.i.i, !llvm.loop !42 diff --git a/bench/opencv/optimized/quaternion.cpp.ll b/bench/opencv/optimized/quaternion.cpp.ll index 43afc8cb8a7..efef61b1477 100644 --- a/bench/opencv/optimized/quaternion.cpp.ll +++ b/bench/opencv/optimized/quaternion.cpp.ll @@ -149,7 +149,7 @@ define void @_ZN2cv8ximgproc21createQuaternionImageERKNS_11_InputArrayERKNS_12_O 26: ; preds = %24, %22 %.pn = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ] call void @_ZNSaIcED1Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #17 - br label %84 + br label %85 .noexc: ; preds = %14 %27 = tail call noalias noundef nonnull dereferenceable(384) ptr @_Znwm(i64 noundef 384) #18 @@ -178,15 +178,15 @@ define void @_ZN2cv8ximgproc21createQuaternionImageERKNS_11_InputArrayERKNS_12_O store i32 33882112, ptr %7, align 8 store ptr %6, ptr %34, align 8 invoke void @_ZN2cv5splitERKNS_11_InputArrayERKNS_12_OutputArrayE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %7) - to label %36 unwind label %59 + to label %36 unwind label %60 36: ; preds = %33 %37 = invoke i64 @_ZNK2cv11_InputArray4sizeEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef -1) - to label %38 unwind label %57 + to label %38 unwind label %58 38: ; preds = %36 invoke void @_ZN2cv3Mat5zerosENS_5Size_IiEEi(ptr dead_on_unwind nonnull writable sret(%"class.cv::MatExpr") align 8 %8, i64 %37, i32 noundef 6) - to label %39 unwind label %57 + to label %39 unwind label %58 39: ; preds = %38 %40 = load ptr, ptr %5, align 8 @@ -195,7 +195,7 @@ define void @_ZN2cv8ximgproc21createQuaternionImageERKNS_11_InputArrayERKNS_12_O %43 = getelementptr inbounds nuw i8, ptr %42, i64 24 %44 = load ptr, ptr %43, align 8 invoke void %44(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(352) %8, ptr noundef nonnull align 8 dereferenceable(96) %40, i32 noundef -1) - to label %_ZN2cv3MataSERKNS_7MatExprE.exit unwind label %61 + to label %_ZN2cv3MataSERKNS_7MatExprE.exit unwind label %62 _ZN2cv3MataSERKNS_7MatExprE.exit: ; preds = %39 %45 = getelementptr inbounds nuw i8, ptr %8, i64 208 @@ -208,94 +208,95 @@ _ZN2cv3MataSERKNS_7MatExprE.exit: ; preds = %39 %49 = getelementptr inbounds nuw i8, ptr %9, i64 16 br label %50 -50: ; preds = %_ZN2cv3MataSERKNS_7MatExprE.exit, %56 - %indvars.iv = phi i64 [ 0, %_ZN2cv3MataSERKNS_7MatExprE.exit ], [ %indvars.iv.next, %56 ] +50: ; preds = %_ZN2cv3MataSERKNS_7MatExprE.exit, %57 + %indvars.iv = phi i64 [ 0, %_ZN2cv3MataSERKNS_7MatExprE.exit ], [ %indvars.iv.next, %57 ] %51 = load ptr, ptr %6, align 8 %52 = getelementptr inbounds nuw %"class.cv::Mat", ptr %51, i64 %indvars.iv - %53 = sub nuw nsw i64 3, %indvars.iv - %54 = load ptr, ptr %5, align 8 - %55 = getelementptr inbounds nuw %"class.cv::Mat", ptr %54, i64 %53 + %53 = and i64 %indvars.iv, 4294967295 + %54 = xor i64 %53, 3 + %55 = load ptr, ptr %5, align 8 + %56 = getelementptr inbounds nuw %"class.cv::Mat", ptr %55, i64 %54 store i64 0, ptr %49, align 8 store i32 33619968, ptr %9, align 8 - store ptr %55, ptr %48, align 8 + store ptr %56, ptr %48, align 8 invoke void @_ZNK2cv3Mat9convertToERKNS_12_OutputArrayEidd(ptr noundef nonnull align 8 dereferenceable(96) %52, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 6, double noundef 1.000000e+00, double noundef 0.000000e+00) - to label %56 unwind label %63 + to label %57 unwind label %64 -56: ; preds = %50 +57: ; preds = %50 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 - br i1 %exitcond.not, label %65, label %50, !llvm.loop !6 + br i1 %exitcond.not, label %66, label %50, !llvm.loop !6 -57: ; preds = %38, %36 - %58 = landingpad { ptr, i32 } +58: ; preds = %38, %36 + %59 = landingpad { ptr, i32 } cleanup - br label %83 + br label %84 -59: ; preds = %33 - %60 = landingpad { ptr, i32 } +60: ; preds = %33 + %61 = landingpad { ptr, i32 } cleanup - br label %83 + br label %84 -61: ; preds = %39 - %62 = landingpad { ptr, i32 } +62: ; preds = %39 + %63 = landingpad { ptr, i32 } cleanup call void @_ZN2cv7MatExprD2Ev(ptr noundef nonnull align 8 dereferenceable(352) %8) #17 - br label %83 + br label %84 -63: ; preds = %50 - %64 = landingpad { ptr, i32 } +64: ; preds = %50 + %65 = landingpad { ptr, i32 } cleanup - br label %83 + br label %84 -65: ; preds = %56 - %66 = getelementptr inbounds nuw i8, ptr %10, i64 16 - store i32 0, ptr %66, align 8 - %67 = getelementptr inbounds nuw i8, ptr %10, i64 20 - store i32 0, ptr %67, align 4 +66: ; preds = %57 + %67 = getelementptr inbounds nuw i8, ptr %10, i64 16 + store i32 0, ptr %67, align 8 + %68 = getelementptr inbounds nuw i8, ptr %10, i64 20 + store i32 0, ptr %68, align 4 store i32 17104896, ptr %10, align 8 - %68 = getelementptr inbounds nuw i8, ptr %10, i64 8 - store ptr %5, ptr %68, align 8 + %69 = getelementptr inbounds nuw i8, ptr %10, i64 8 + store ptr %5, ptr %69, align 8 invoke void @_ZN2cv5mergeERKNS_11_InputArrayERKNS_12_OutputArrayE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %1) - to label %69 unwind label %81 + to label %70 unwind label %82 -69: ; preds = %65 - %70 = load ptr, ptr %6, align 8 - %71 = getelementptr inbounds nuw i8, ptr %6, i64 8 - %72 = load ptr, ptr %71, align 8 - %.not4.i.i.i.i = icmp eq ptr %70, %72 +70: ; preds = %66 + %71 = load ptr, ptr %6, align 8 + %72 = getelementptr inbounds nuw i8, ptr %6, i64 8 + %73 = load ptr, ptr %72, align 8 + %.not4.i.i.i.i = icmp eq ptr %71, %73 br i1 %.not4.i.i.i.i, label %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i, label %.lr.ph.i.i.i.i -.lr.ph.i.i.i.i: ; preds = %69, %.lr.ph.i.i.i.i - %.05.i.i.i.i = phi ptr [ %73, %.lr.ph.i.i.i.i ], [ %70, %69 ] +.lr.ph.i.i.i.i: ; preds = %70, %.lr.ph.i.i.i.i + %.05.i.i.i.i = phi ptr [ %74, %.lr.ph.i.i.i.i ], [ %71, %70 ] call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %.05.i.i.i.i) #17 - %73 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i, i64 96 - %.not.i.i.i.i = icmp eq ptr %73, %72 + %74 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i, i64 96 + %.not.i.i.i.i = icmp eq ptr %74, %73 br i1 %.not.i.i.i.i, label %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i, label %.lr.ph.i.i.i.i, !llvm.loop !7 _ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i: ; preds = %.lr.ph.i.i.i.i %.pr.i = load ptr, ptr %6, align 8 br label %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i -_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i, %69 - %74 = phi ptr [ %.pr.i, %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i ], [ %70, %69 ] - %.not.i.i.i = icmp eq ptr %74, null - br i1 %.not.i.i.i, label %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit, label %75 +_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i, %70 + %75 = phi ptr [ %.pr.i, %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i ], [ %71, %70 ] + %.not.i.i.i = icmp eq ptr %75, null + br i1 %.not.i.i.i, label %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit, label %76 -75: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i - call void @_ZdlPv(ptr noundef nonnull %74) #19 +76: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i + call void @_ZdlPv(ptr noundef nonnull %75) #19 br label %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit -_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i, %75 - %76 = load ptr, ptr %5, align 8 - %77 = load ptr, ptr %28, align 8 - %.not4.i.i.i.i34 = icmp eq ptr %76, %77 +_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i, %76 + %77 = load ptr, ptr %5, align 8 + %78 = load ptr, ptr %28, align 8 + %.not4.i.i.i.i34 = icmp eq ptr %77, %78 br i1 %.not4.i.i.i.i34, label %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40, label %.lr.ph.i.i.i.i35 .lr.ph.i.i.i.i35: ; preds = %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit, %.lr.ph.i.i.i.i35 - %.05.i.i.i.i36 = phi ptr [ %78, %.lr.ph.i.i.i.i35 ], [ %76, %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit ] + %.05.i.i.i.i36 = phi ptr [ %79, %.lr.ph.i.i.i.i35 ], [ %77, %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit ] call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %.05.i.i.i.i36) #17 - %78 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i36, i64 96 - %.not.i.i.i.i37 = icmp eq ptr %78, %77 + %79 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i36, i64 96 + %.not.i.i.i.i37 = icmp eq ptr %79, %78 br i1 %.not.i.i.i.i37, label %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i38, label %.lr.ph.i.i.i.i35, !llvm.loop !7 _ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i38: ; preds = %.lr.ph.i.i.i.i35 @@ -303,30 +304,30 @@ _ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i38: ; preds = % br label %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40 _ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i38, %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit - %79 = phi ptr [ %.pr.i39, %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i38 ], [ %76, %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit ] - %.not.i.i.i41 = icmp eq ptr %79, null - br i1 %.not.i.i.i41, label %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit42, label %80 + %80 = phi ptr [ %.pr.i39, %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exitthread-pre-split.i38 ], [ %77, %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit ] + %.not.i.i.i41 = icmp eq ptr %80, null + br i1 %.not.i.i.i41, label %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit42, label %81 -80: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40 - call void @_ZdlPv(ptr noundef nonnull %79) #19 +81: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40 + call void @_ZdlPv(ptr noundef nonnull %80) #19 br label %_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit42 -_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit42: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40, %80 +_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev.exit42: ; preds = %_ZSt8_DestroyIPN2cv3MatES1_EvT_S3_RSaIT0_E.exit.i40, %81 ret void -81: ; preds = %65 - %82 = landingpad { ptr, i32 } +82: ; preds = %66 + %83 = landingpad { ptr, i32 } cleanup - br label %83 + br label %84 -83: ; preds = %81, %63, %61, %59, %57 - %.pn30 = phi { ptr, i32 } [ %64, %63 ], [ %58, %57 ], [ %82, %81 ], [ %62, %61 ], [ %60, %59 ] +84: ; preds = %82, %64, %62, %60, %58 + %.pn30 = phi { ptr, i32 } [ %65, %64 ], [ %59, %58 ], [ %83, %82 ], [ %63, %62 ], [ %61, %60 ] call void @_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #17 call void @_ZNSt6vectorIN2cv3MatESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #17 - br label %84 + br label %85 -84: ; preds = %83, %26 - %.pn30.pn = phi { ptr, i32 } [ %.pn30, %83 ], [ %.pn, %26 ] +85: ; preds = %84, %26 + %.pn30.pn = phi { ptr, i32 } [ %.pn30, %84 ], [ %.pn, %26 ] resume { ptr, i32 } %.pn30.pn } diff --git a/bench/opencv/optimized/upcean_decoder.cpp.ll b/bench/opencv/optimized/upcean_decoder.cpp.ll index 91abc443902..16ce93984c5 100644 --- a/bench/opencv/optimized/upcean_decoder.cpp.ll +++ b/bench/opencv/optimized/upcean_decoder.cpp.ll @@ -1809,7 +1809,7 @@ define internal fastcc void @"_ZZN2cv7barcode15get_AB_PatternsEvENK3$_0clEv"() u store ptr %3, ptr %2, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN2cv7barcode15get_AB_PatternsEvE11AB_Patterns, i8 0, i64 24, i1 false) %5 = invoke noalias noundef nonnull dereferenceable(480) ptr @_Znwm(i64 noundef 480) #17 - to label %.noexc20 unwind label %42 + to label %.noexc20 unwind label %43 .noexc20: ; preds = %.noexc store ptr %5, ptr @_ZZN2cv7barcode15get_AB_PatternsEvE11AB_Patterns, align 8 @@ -1879,66 +1879,67 @@ _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %12, %14 .preheader.preheader: ; preds = %.noexc22, %19 br label %.preheader -.preheader: ; preds = %.preheader.preheader, %47 - %indvars.iv4 = phi i64 [ %indvars.iv.next5, %47 ], [ 0, %.preheader.preheader ] +.preheader: ; preds = %.preheader.preheader, %48 + %indvars.iv4 = phi i64 [ %indvars.iv.next5, %48 ], [ 0, %.preheader.preheader ] br label %32 32: ; preds = %.preheader, %32 %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %32 ] %33 = load ptr, ptr @_ZZN2cv7barcode15get_AB_PatternsEvE11AB_Patterns, align 8 %34 = getelementptr inbounds nuw %"class.std::vector", ptr %33, i64 %indvars.iv4 - %35 = sub nuw nsw i64 3, %indvars.iv - %36 = load ptr, ptr %34, align 8 - %37 = getelementptr inbounds nuw i32, ptr %36, i64 %35 - %38 = load i32, ptr %37, align 4 - %39 = getelementptr inbounds nuw i8, ptr %34, i64 240 - %40 = load ptr, ptr %39, align 8 - %41 = getelementptr inbounds nuw i32, ptr %40, i64 %indvars.iv - store i32 %38, ptr %41, align 4 + %35 = and i64 %indvars.iv, 4294967295 + %36 = xor i64 %35, 3 + %37 = load ptr, ptr %34, align 8 + %38 = getelementptr inbounds nuw i32, ptr %37, i64 %36 + %39 = load i32, ptr %38, align 4 + %40 = getelementptr inbounds nuw i8, ptr %34, i64 240 + %41 = load ptr, ptr %40, align 8 + %42 = getelementptr inbounds nuw i32, ptr %41, i64 %indvars.iv + store i32 %39, ptr %42, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 - br i1 %exitcond.not, label %47, label %32, !llvm.loop !30 + br i1 %exitcond.not, label %48, label %32, !llvm.loop !30 -42: ; preds = %.noexc - %43 = landingpad { ptr, i32 } +43: ; preds = %.noexc + %44 = landingpad { ptr, i32 } cleanup br label %.body -.body: ; preds = %8, %11, %42 - %eh.lpad-body = phi { ptr, i32 } [ %43, %42 ], [ %9, %11 ], [ %9, %8 ] - %44 = load ptr, ptr %0, align 8 - %.not.i.i.i23 = icmp eq ptr %44, null - br i1 %.not.i.i.i23, label %_ZNSt6vectorIiSaIiEED2Ev.exit24, label %45 +.body: ; preds = %8, %11, %43 + %eh.lpad-body = phi { ptr, i32 } [ %44, %43 ], [ %9, %11 ], [ %9, %8 ] + %45 = load ptr, ptr %0, align 8 + %.not.i.i.i23 = icmp eq ptr %45, null + br i1 %.not.i.i.i23, label %_ZNSt6vectorIiSaIiEED2Ev.exit24, label %46 -45: ; preds = %.body - call void @_ZdlPv(ptr noundef nonnull %44) #18 +46: ; preds = %.body + call void @_ZdlPv(ptr noundef nonnull %45) #18 br label %_ZNSt6vectorIiSaIiEED2Ev.exit24 .loopexit: ; preds = %.lr.ph.i.i.i.i.i %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %46 + br label %47 .loopexit.split-lp: ; preds = %_ZNSt6vectorIiSaIiEED2Ev.exit, %16 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup - br label %46 + br label %47 -46: ; preds = %.loopexit.split-lp, %.loopexit +47: ; preds = %.loopexit.split-lp, %.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN2cv7barcode15get_AB_PatternsEvE11AB_Patterns) #19 br label %_ZNSt6vectorIiSaIiEED2Ev.exit24 -47: ; preds = %32 +48: ; preds = %32 %indvars.iv.next5 = add nuw nsw i64 %indvars.iv4, 1 %exitcond7.not = icmp eq i64 %indvars.iv.next5, 10 - br i1 %exitcond7.not, label %48, label %.preheader, !llvm.loop !31 + br i1 %exitcond7.not, label %49, label %.preheader, !llvm.loop !31 -48: ; preds = %47 +49: ; preds = %48 ret void -_ZNSt6vectorIiSaIiEED2Ev.exit24: ; preds = %.body, %45, %46 - %.pn18 = phi { ptr, i32 } [ %lpad.phi, %46 ], [ %eh.lpad-body, %.body ], [ %eh.lpad-body, %45 ] +_ZNSt6vectorIiSaIiEED2Ev.exit24: ; preds = %.body, %46, %47 + %.pn18 = phi { ptr, i32 } [ %lpad.phi, %47 ], [ %eh.lpad-body, %.body ], [ %eh.lpad-body, %46 ] resume { ptr, i32 } %.pn18 } diff --git a/bench/openexr/optimized/internal_piz.c.ll b/bench/openexr/optimized/internal_piz.c.ll index 262272b7ff4..9e833120a61 100644 --- a/bench/openexr/optimized/internal_piz.c.ll +++ b/bench/openexr/optimized/internal_piz.c.ll @@ -677,9 +677,10 @@ while.body.preheader.i: ; preds = %while.cond.preheade %1 = shl nuw nsw i32 %k.1.i, 1 %2 = zext nneg i32 %1 to i64 %scevgep.i = getelementptr i8, ptr %add.ptr, i64 %2 - %narrow.i = sub nuw nsw i32 131072, %1 - %3 = zext nneg i32 %narrow.i to i64 - tail call void @llvm.memset.p0.i64(ptr align 2 %scevgep.i, i8 0, i64 %3, i1 false) + %3 = xor i32 %1, 131070 + %narrow.i = add nuw nsw i32 %3, 2 + %4 = zext nneg i32 %narrow.i to i64 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %scevgep.i, i8 0, i64 %4, i1 false) br label %reverseLutFromBitmap.exit for.body.i: ; preds = %for.inc.i, %if.end39 @@ -692,8 +693,8 @@ lor.lhs.false.i: ; preds = %for.body.i %shr.i = lshr i32 %i.011.i, 3 %idxprom.i = zext nneg i32 %shr.i to i64 %arrayidx.i = getelementptr inbounds nuw i8, ptr %add.ptr7, i64 %idxprom.i - %4 = load i8, ptr %arrayidx.i, align 1 - %conv.i = zext i8 %4 to i32 + %5 = load i8, ptr %arrayidx.i, align 1 + %conv.i = zext i8 %5 to i32 %and.i = and i32 %i.011.i, 7 %shl.i = shl nuw nsw i32 1, %and.i %and2.i = and i32 %shl.i, %conv.i @@ -715,8 +716,8 @@ for.inc.i: ; preds = %if.then.i, %lor.lhs br i1 %exitcond.not.i, label %while.cond.preheader.i, label %for.body.i, !llvm.loop !17 reverseLutFromBitmap.exit: ; preds = %while.cond.preheader.i, %while.body.preheader.i - %5 = trunc i32 %k.1.i to i16 - %conv12.i = add i16 %5, -1 + %6 = trunc i32 %k.1.i to i16 + %conv12.i = add i16 %6, -1 %add41 = add nuw nsw i64 %nBytes.0, 4 %cmp42 = icmp ugt i64 %add41, %packsz br i1 %cmp42, label %return, label %if.end45 @@ -730,17 +731,17 @@ if.end45: ; preds = %reverseLutFromBitma br i1 %cmp51, label %return, label %if.end54 if.end54: ; preds = %if.end45 - %6 = load ptr, ptr %scratch_buffer_1, align 8 + %7 = load ptr, ptr %scratch_buffer_1, align 8 %add.ptr56 = getelementptr inbounds nuw i8, ptr %src, i64 %add41 %div102 = lshr i64 %outsz, 1 - %call58 = tail call i32 @internal_huf_decompress(ptr noundef %decode, ptr noundef nonnull %add.ptr56, i64 noundef %conv49, ptr noundef %6, i64 noundef %div102, ptr noundef nonnull %0, i64 noundef %call) #5 + %call58 = tail call i32 @internal_huf_decompress(ptr noundef %decode, ptr noundef nonnull %add.ptr56, i64 noundef %conv49, ptr noundef %7, i64 noundef %div102, ptr noundef nonnull %0, i64 noundef %call) #5 %cmp59.not = icmp eq i32 %call58, 0 br i1 %cmp59.not, label %if.end62, label %return if.end62: ; preds = %if.end54 %channel_count = getelementptr inbounds nuw i8, ptr %decode, i64 8 - %7 = load i16, ptr %channel_count, align 8 - %cmp65119 = icmp sgt i16 %7, 0 + %8 = load i16, ptr %channel_count, align 8 + %cmp65119 = icmp sgt i16 %8, 0 %.pre144 = load ptr, ptr %scratch_buffer_1, align 8 br i1 %cmp65119, label %for.body.lr.ph, label %for.end83 @@ -749,25 +750,25 @@ for.body.lr.ph: ; preds = %if.end62 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.end - %8 = phi i16 [ %7, %for.body.lr.ph ], [ %34, %for.end ] + %9 = phi i16 [ %8, %for.body.lr.ph ], [ %35, %for.end ] %indvars.iv137 = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next138, %for.end ] %wavbuf.0120 = phi ptr [ %.pre144, %for.body.lr.ph ], [ %add.ptr80, %for.end ] - %9 = load ptr, ptr %decode, align 8 - %add.ptr68 = getelementptr inbounds nuw %struct.exr_coding_channel_info_t, ptr %9, i64 %indvars.iv137 + %10 = load ptr, ptr %decode, align 8 + %add.ptr68 = getelementptr inbounds nuw %struct.exr_coding_channel_info_t, ptr %10, i64 %indvars.iv137 %width = getelementptr inbounds nuw i8, ptr %add.ptr68, i64 12 - %10 = load i32, ptr %width, align 4 + %11 = load i32, ptr %width, align 4 %height = getelementptr inbounds nuw i8, ptr %add.ptr68, i64 8 - %11 = load i32, ptr %height, align 8 + %12 = load i32, ptr %height, align 8 %bytes_per_element = getelementptr inbounds nuw i8, ptr %add.ptr68, i64 25 - %12 = load i8, ptr %bytes_per_element, align 1 - %13 = sdiv i8 %12, 2 - %div70 = sext i8 %13 to i32 - %cmp72116 = icmp sgt i8 %12, 1 - %mul = mul i32 %10, %div70 + %13 = load i8, ptr %bytes_per_element, align 1 + %14 = sdiv i8 %13, 2 + %div70 = sext i8 %14 to i32 + %cmp72116 = icmp sgt i8 %13, 1 + %mul = mul i32 %11, %div70 br i1 %cmp72116, label %for.body74.lr.ph, label %for.end for.body74.lr.ph: ; preds = %for.body - %cond4.i = tail call i32 @llvm.smin.i32(i32 %10, i32 %11) + %cond4.i = tail call i32 @llvm.smin.i32(i32 %11, i32 %12) %wide.trip.count = zext nneg i32 %div70 to i64 br label %for.body74 @@ -794,7 +795,7 @@ while.body11.preheader.i: ; preds = %while.end.i while.body11.i: ; preds = %if.end72.i, %while.body11.preheader.i %p.1130.i = phi i32 [ %shr73.i, %if.end72.i ], [ %shr7.i, %while.body11.preheader.i ] %p2.0129.i = phi i32 [ %p.1130.i, %if.end72.i ], [ %shr.i104, %while.body11.preheader.i ] - %sub.i = sub nsw i32 %11, %p2.0129.i + %sub.i = sub nsw i32 %12, %p2.0129.i %mul.i = mul nsw i32 %sub.i, %mul %idx.ext.i = sext i32 %mul.i to i64 %add.ptr.i = getelementptr inbounds i16, ptr %add.ptr76, i64 %idx.ext.i @@ -806,13 +807,13 @@ while.body11.i: ; preds = %if.end72.i, %while. for.body.lr.ph.i: ; preds = %while.body11.i %mul13.i = mul nsw i32 %p2.0129.i, %mul %mul12.i = mul nsw i32 %p.1130.i, %mul - %sub18.i = sub nsw i32 %10, %p2.0129.i + %sub18.i = sub nsw i32 %11, %p2.0129.i %mul19.i = mul nsw i32 %sub18.i, %div70 %idx.ext20.i = sext i32 %mul19.i to i64 %idx.ext26.i = zext nneg i32 %mul14.i to i64 %idx.ext28.i = sext i32 %mul12.i to i64 %idx.ext32.i = sext i32 %mul15.i to i64 - %and.i105 = and i32 %p.1130.i, %10 + %and.i105 = and i32 %p.1130.i, %11 %tobool34.not.i = icmp eq i32 %and.i105, 0 %idx.ext45.i = sext i32 %mul13.i to i64 %cmp23.not120.i = icmp slt i32 %mul19.i, 0 @@ -831,20 +832,20 @@ for.body25.us.i: ; preds = %for.body25.lr.ph.i, %add.ptr27.us.i = getelementptr inbounds nuw i16, ptr %px.0121.us.i, i64 %idx.ext26.i %add.ptr29.us.i = getelementptr inbounds i16, ptr %px.0121.us.i, i64 %idx.ext28.i %add.ptr31.us.i = getelementptr inbounds nuw i16, ptr %add.ptr29.us.i, i64 %idx.ext26.i - %14 = load i16, ptr %px.0121.us.i, align 2 - %15 = load i16, ptr %add.ptr29.us.i, align 2 - %and.i.us.i = and i16 %15, 1 - %add.i.us.i = add i16 %and.i.us.i, %14 - %shr.i.us.i = ashr i16 %15, 1 + %15 = load i16, ptr %px.0121.us.i, align 2 + %16 = load i16, ptr %add.ptr29.us.i, align 2 + %and.i.us.i = and i16 %16, 1 + %add.i.us.i = add i16 %and.i.us.i, %15 + %shr.i.us.i = ashr i16 %16, 1 %add2.i.us.i = add i16 %add.i.us.i, %shr.i.us.i - %conv4.i.us.i = sub i16 %add2.i.us.i, %15 - %16 = load i16, ptr %add.ptr27.us.i, align 2 - %17 = load i16, ptr %add.ptr31.us.i, align 2 - %and.i72.us.i = and i16 %17, 1 - %add.i73.us.i = add i16 %and.i72.us.i, %16 - %shr.i74.us.i = ashr i16 %17, 1 + %conv4.i.us.i = sub i16 %add2.i.us.i, %16 + %17 = load i16, ptr %add.ptr27.us.i, align 2 + %18 = load i16, ptr %add.ptr31.us.i, align 2 + %and.i72.us.i = and i16 %18, 1 + %add.i73.us.i = add i16 %and.i72.us.i, %17 + %shr.i74.us.i = ashr i16 %18, 1 %add2.i75.us.i = add i16 %add.i73.us.i, %shr.i74.us.i - %conv4.i76.us.i = sub i16 %add2.i75.us.i, %17 + %conv4.i76.us.i = sub i16 %add2.i75.us.i, %18 %and.i77.us.i = and i16 %add2.i75.us.i, 1 %add.i78.us.i = add i16 %and.i77.us.i, %add2.i.us.i %shr.i79.us.i = ashr i16 %add2.i75.us.i, 1 @@ -868,30 +869,30 @@ for.body25.i: ; preds = %for.body25.lr.ph.i, %add.ptr27.i = getelementptr inbounds nuw i16, ptr %px.0121.i, i64 %idx.ext26.i %add.ptr29.i = getelementptr inbounds i16, ptr %px.0121.i, i64 %idx.ext28.i %add.ptr31.i = getelementptr inbounds nuw i16, ptr %add.ptr29.i, i64 %idx.ext26.i - %18 = load i16, ptr %px.0121.i, align 2 - %19 = load i16, ptr %add.ptr29.i, align 2 - %shr.i87.i = lshr i16 %19, 1 - %sub.narrow.i.i = sub i16 %18, %shr.i87.i - %add.narrow.i.i = add i16 %sub.narrow.i.i, %19 - %20 = xor i16 %add.narrow.i.i, -32768 - %21 = load i16, ptr %add.ptr27.i, align 2 - %22 = load i16, ptr %add.ptr31.i, align 2 - %shr.i88.i = lshr i16 %22, 1 - %sub.narrow.i89.i = sub i16 %21, %shr.i88.i - %add.narrow.i90.i = add i16 %sub.narrow.i89.i, %22 - %23 = xor i16 %add.narrow.i90.i, -32768 - %shr.i91.i = lshr i16 %23, 1 - %sub.narrow.i92.i = sub i16 %20, %shr.i91.i - %add.narrow.i93.i = add i16 %sub.narrow.i92.i, %23 - %24 = xor i16 %add.narrow.i93.i, -32768 + %19 = load i16, ptr %px.0121.i, align 2 + %20 = load i16, ptr %add.ptr29.i, align 2 + %shr.i87.i = lshr i16 %20, 1 + %sub.narrow.i.i = sub i16 %19, %shr.i87.i + %add.narrow.i.i = add i16 %sub.narrow.i.i, %20 + %21 = xor i16 %add.narrow.i.i, -32768 + %22 = load i16, ptr %add.ptr27.i, align 2 + %23 = load i16, ptr %add.ptr31.i, align 2 + %shr.i88.i = lshr i16 %23, 1 + %sub.narrow.i89.i = sub i16 %22, %shr.i88.i + %add.narrow.i90.i = add i16 %sub.narrow.i89.i, %23 + %24 = xor i16 %add.narrow.i90.i, -32768 + %shr.i91.i = lshr i16 %24, 1 + %sub.narrow.i92.i = sub i16 %21, %shr.i91.i + %add.narrow.i93.i = add i16 %sub.narrow.i92.i, %24 + %25 = xor i16 %add.narrow.i93.i, -32768 store i16 %sub.narrow.i92.i, ptr %add.ptr27.i, align 2 - store i16 %24, ptr %px.0121.i, align 2 + store i16 %25, ptr %px.0121.i, align 2 %shr.i94.i = lshr i16 %sub.narrow.i89.i, 1 %sub.narrow.i95.i = sub i16 %sub.narrow.i.i, %shr.i94.i %add.narrow.i96.i = add i16 %sub.narrow.i95.i, %sub.narrow.i89.i - %25 = xor i16 %add.narrow.i96.i, -32768 + %26 = xor i16 %add.narrow.i96.i, -32768 store i16 %sub.narrow.i95.i, ptr %add.ptr31.i, align 2 - store i16 %25, ptr %add.ptr29.i, align 2 + store i16 %26, ptr %add.ptr29.i, align 2 %add.ptr33.i = getelementptr inbounds i16, ptr %px.0121.i, i64 %idx.ext32.i %cmp23.not.i = icmp ugt ptr %add.ptr33.i, %add.ptr21.i br i1 %cmp23.not.i, label %for.end.i, label %for.body25.i, !llvm.loop !19 @@ -902,28 +903,28 @@ for.end.i: ; preds = %for.body25.i, %for. if.then35.i: ; preds = %for.end.i %add.ptr38.i = getelementptr inbounds i16, ptr %px.0.lcssa.i, i64 %idx.ext28.i - %26 = load i16, ptr %px.0.lcssa.i, align 2 - %27 = load i16, ptr %add.ptr38.i, align 2 + %27 = load i16, ptr %px.0.lcssa.i, align 2 + %28 = load i16, ptr %add.ptr38.i, align 2 br i1 %cmp.i, label %if.then40.i, label %if.else41.i if.then40.i: ; preds = %if.then35.i - %and.i97.i = and i16 %27, 1 - %add.i98.i = add i16 %and.i97.i, %26 - %shr.i99.i = ashr i16 %27, 1 + %and.i97.i = and i16 %28, 1 + %add.i98.i = add i16 %and.i97.i, %27 + %shr.i99.i = ashr i16 %28, 1 %add2.i100.i = add i16 %add.i98.i, %shr.i99.i - %conv4.i101.i = sub i16 %add2.i100.i, %27 + %conv4.i101.i = sub i16 %add2.i100.i, %28 br label %if.end42.i if.else41.i: ; preds = %if.then35.i - %shr.i102.i = lshr i16 %27, 1 - %sub.narrow.i103.i = sub i16 %26, %shr.i102.i - %add.narrow.i104.i = add i16 %sub.narrow.i103.i, %27 - %28 = xor i16 %add.narrow.i104.i, -32768 + %shr.i102.i = lshr i16 %28, 1 + %sub.narrow.i103.i = sub i16 %27, %shr.i102.i + %add.narrow.i104.i = add i16 %sub.narrow.i103.i, %28 + %29 = xor i16 %add.narrow.i104.i, -32768 br label %if.end42.i if.end42.i: ; preds = %if.else41.i, %if.then40.i %storemerge.i = phi i16 [ %sub.narrow.i103.i, %if.else41.i ], [ %conv4.i101.i, %if.then40.i ] - %i00.0.i = phi i16 [ %28, %if.else41.i ], [ %add2.i100.i, %if.then40.i ] + %i00.0.i = phi i16 [ %29, %if.else41.i ], [ %add2.i100.i, %if.then40.i ] store i16 %storemerge.i, ptr %add.ptr38.i, align 2 store i16 %i00.0.i, ptr %px.0.lcssa.i, align 2 br label %for.inc44.i @@ -935,12 +936,12 @@ for.inc44.i: ; preds = %if.end42.i, %for.en for.end47.i: ; preds = %for.inc44.i, %while.body11.i %py.0.lcssa.i = phi ptr [ %add.ptr76, %while.body11.i ], [ %add.ptr46.i, %for.inc44.i ] - %and48.i = and i32 %p.1130.i, %11 + %and48.i = and i32 %p.1130.i, %12 %tobool49.not.i = icmp eq i32 %and48.i, 0 br i1 %tobool49.not.i, label %if.end72.i, label %if.then50.i if.then50.i: ; preds = %for.end47.i - %sub53.i = sub nsw i32 %10, %p2.0129.i + %sub53.i = sub nsw i32 %11, %p2.0129.i %mul54.i = mul nsw i32 %sub53.i, %div70 %idx.ext55.i = sext i32 %mul54.i to i64 %add.ptr56.i = getelementptr inbounds i16, ptr %py.0.lcssa.i, i64 %idx.ext55.i @@ -955,13 +956,13 @@ for.body60.lr.ph.i: ; preds = %if.then50.i for.body60.us.i: ; preds = %for.body60.lr.ph.i, %for.body60.us.i %px51.0127.us.i = phi ptr [ %add.ptr70.us.i, %for.body60.us.i ], [ %py.0.lcssa.i, %for.body60.lr.ph.i ] %add.ptr63.us.i = getelementptr inbounds nuw i16, ptr %px51.0127.us.i, i64 %idx.ext62.i - %29 = load i16, ptr %px51.0127.us.i, align 2 - %30 = load i16, ptr %add.ptr63.us.i, align 2 - %and.i105.us.i = and i16 %30, 1 - %add.i106.us.i = add i16 %and.i105.us.i, %29 - %shr.i107.us.i = ashr i16 %30, 1 + %30 = load i16, ptr %px51.0127.us.i, align 2 + %31 = load i16, ptr %add.ptr63.us.i, align 2 + %and.i105.us.i = and i16 %31, 1 + %add.i106.us.i = add i16 %and.i105.us.i, %30 + %shr.i107.us.i = ashr i16 %31, 1 %add2.i108.us.i = add i16 %add.i106.us.i, %shr.i107.us.i - %conv4.i109.us.i = sub i16 %add2.i108.us.i, %30 + %conv4.i109.us.i = sub i16 %add2.i108.us.i, %31 store i16 %conv4.i109.us.i, ptr %add.ptr63.us.i, align 2 store i16 %add2.i108.us.i, ptr %px51.0127.us.i, align 2 %add.ptr70.us.i = getelementptr inbounds i16, ptr %px51.0127.us.i, i64 %idx.ext69.i @@ -971,14 +972,14 @@ for.body60.us.i: ; preds = %for.body60.lr.ph.i, for.body60.i: ; preds = %for.body60.lr.ph.i, %for.body60.i %px51.0127.i = phi ptr [ %add.ptr70.i, %for.body60.i ], [ %py.0.lcssa.i, %for.body60.lr.ph.i ] %add.ptr63.i = getelementptr inbounds nuw i16, ptr %px51.0127.i, i64 %idx.ext62.i - %31 = load i16, ptr %px51.0127.i, align 2 - %32 = load i16, ptr %add.ptr63.i, align 2 - %shr.i110.i = lshr i16 %32, 1 - %sub.narrow.i111.i = sub i16 %31, %shr.i110.i - %add.narrow.i112.i = add i16 %sub.narrow.i111.i, %32 - %33 = xor i16 %add.narrow.i112.i, -32768 + %32 = load i16, ptr %px51.0127.i, align 2 + %33 = load i16, ptr %add.ptr63.i, align 2 + %shr.i110.i = lshr i16 %33, 1 + %sub.narrow.i111.i = sub i16 %32, %shr.i110.i + %add.narrow.i112.i = add i16 %sub.narrow.i111.i, %33 + %34 = xor i16 %add.narrow.i112.i, -32768 store i16 %sub.narrow.i111.i, ptr %add.ptr63.i, align 2 - store i16 %33, ptr %px51.0127.i, align 2 + store i16 %34, ptr %px51.0127.i, align 2 %add.ptr70.i = getelementptr inbounds i16, ptr %px51.0127.i, i64 %idx.ext69.i %cmp58.not.i = icmp ugt ptr %add.ptr70.i, %add.ptr56.i br i1 %cmp58.not.i, label %if.end72.i, label %for.body60.i, !llvm.loop !21 @@ -998,13 +999,13 @@ for.end.loopexit: ; preds = %wav_2D_decode.exit br label %for.end for.end: ; preds = %for.body, %for.end.loopexit - %34 = phi i16 [ %.pre, %for.end.loopexit ], [ %8, %for.body ] - %mul78 = mul i32 %mul, %11 + %35 = phi i16 [ %.pre, %for.end.loopexit ], [ %9, %for.body ] + %mul78 = mul i32 %mul, %12 %idx.ext79 = sext i32 %mul78 to i64 %add.ptr80 = getelementptr inbounds i16, ptr %wavbuf.0120, i64 %idx.ext79 %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1 - %35 = sext i16 %34 to i64 - %cmp65 = icmp slt i64 %indvars.iv.next138, %35 + %36 = sext i16 %35 to i64 + %cmp65 = icmp slt i64 %indvars.iv.next138, %36 br i1 %cmp65, label %for.body, label %for.end83.loopexit, !llvm.loop !24 for.end83.loopexit: ; preds = %for.end @@ -1012,26 +1013,26 @@ for.end83.loopexit: ; preds = %for.end br label %for.end83 for.end83: ; preds = %for.end83.loopexit, %if.end62 - %36 = phi ptr [ %.pre143, %for.end83.loopexit ], [ %.pre144, %if.end62 ] + %37 = phi ptr [ %.pre143, %for.end83.loopexit ], [ %.pre144, %if.end62 ] %cmp5.not.i107 = icmp ult i64 %outsz, 2 br i1 %cmp5.not.i107, label %applyLut.exit, label %for.body.i108 for.body.i108: ; preds = %for.end83, %for.body.i108 %i.06.i = phi i64 [ %inc.i111, %for.body.i108 ], [ 0, %for.end83 ] - %arrayidx.i109 = getelementptr inbounds nuw i16, ptr %36, i64 %i.06.i - %37 = load i16, ptr %arrayidx.i109, align 2 - %idxprom.i110 = zext i16 %37 to i64 + %arrayidx.i109 = getelementptr inbounds nuw i16, ptr %37, i64 %i.06.i + %38 = load i16, ptr %arrayidx.i109, align 2 + %idxprom.i110 = zext i16 %38 to i64 %arrayidx1.i = getelementptr inbounds nuw i16, ptr %add.ptr, i64 %idxprom.i110 - %38 = load i16, ptr %arrayidx1.i, align 2 - store i16 %38, ptr %arrayidx.i109, align 2 + %39 = load i16, ptr %arrayidx1.i, align 2 + store i16 %39, ptr %arrayidx.i109, align 2 %inc.i111 = add nuw nsw i64 %i.06.i, 1 %exitcond.not.i112 = icmp eq i64 %inc.i111, %div102 br i1 %exitcond.not.i112, label %applyLut.exit, label %for.body.i108, !llvm.loop !10 applyLut.exit: ; preds = %for.body.i108, %for.end83 %height87 = getelementptr inbounds nuw i8, ptr %decode, i64 36 - %39 = load i32, ptr %height87, align 4 - %cmp88129 = icmp sgt i32 %39, 0 + %40 = load i32, ptr %height87, align 4 + %cmp88129 = icmp sgt i32 %40, 0 br i1 %cmp88129, label %for.body90.lr.ph, label %for.end147 for.body90.lr.ph: ; preds = %applyLut.exit @@ -1040,57 +1041,57 @@ for.body90.lr.ph: ; preds = %applyLut.exit br label %for.body90 for.body90: ; preds = %for.body90.lr.ph, %for.inc145 - %40 = phi i32 [ %39, %for.body90.lr.ph ], [ %53, %for.inc145 ] - %41 = phi i16 [ %.pre145, %for.body90.lr.ph ], [ %54, %for.inc145 ] + %41 = phi i32 [ %40, %for.body90.lr.ph ], [ %54, %for.inc145 ] %42 = phi i16 [ %.pre145, %for.body90.lr.ph ], [ %55, %for.inc145 ] + %43 = phi i16 [ %.pre145, %for.body90.lr.ph ], [ %56, %for.inc145 ] %out.0132 = phi ptr [ %outptr, %for.body90.lr.ph ], [ %out.1.lcssa, %for.inc145 ] %y.0131 = phi i32 [ 0, %for.body90.lr.ph ], [ %inc146, %for.inc145 ] %nOut.0130 = phi i64 [ 0, %for.body90.lr.ph ], [ %nOut.1.lcssa, %for.inc145 ] - %43 = load i32, ptr %start_y, align 8 - %add92 = add nsw i32 %43, %y.0131 - %cmp98123 = icmp sgt i16 %42, 0 + %44 = load i32, ptr %start_y, align 8 + %add92 = add nsw i32 %44, %y.0131 + %cmp98123 = icmp sgt i16 %43, 0 br i1 %cmp98123, label %for.body100.preheader, label %for.inc145 for.body100.preheader: ; preds = %for.body90 - %44 = load ptr, ptr %scratch_buffer_1, align 8 + %45 = load ptr, ptr %scratch_buffer_1, align 8 br label %for.body100 for.body100: ; preds = %for.body100.preheader, %for.inc142 - %45 = phi i16 [ %41, %for.body100.preheader ], [ %51, %for.inc142 ] + %46 = phi i16 [ %42, %for.body100.preheader ], [ %52, %for.inc142 ] %indvars.iv140 = phi i64 [ 0, %for.body100.preheader ], [ %indvars.iv.next141, %for.inc142 ] %out.1126 = phi ptr [ %out.0132, %for.body100.preheader ], [ %out.2, %for.inc142 ] %nOut.1125 = phi i64 [ %nOut.0130, %for.body100.preheader ], [ %nOut.2, %for.inc142 ] - %scratch.0124 = phi ptr [ %44, %for.body100.preheader ], [ %scratch.1, %for.inc142 ] - %46 = load ptr, ptr %decode, align 8 - %add.ptr104 = getelementptr inbounds nuw %struct.exr_coding_channel_info_t, ptr %46, i64 %indvars.iv140 + %scratch.0124 = phi ptr [ %45, %for.body100.preheader ], [ %scratch.1, %for.inc142 ] + %47 = load ptr, ptr %decode, align 8 + %add.ptr104 = getelementptr inbounds nuw %struct.exr_coding_channel_info_t, ptr %47, i64 %indvars.iv140 %width105 = getelementptr inbounds nuw i8, ptr %add.ptr104, i64 12 - %47 = load i32, ptr %width105, align 4 - %conv108 = sext i32 %47 to i64 + %48 = load i32, ptr %width105, align 4 + %conv108 = sext i32 %48 to i64 %bytes_per_element109 = getelementptr inbounds nuw i8, ptr %add.ptr104, i64 25 - %48 = load i8, ptr %bytes_per_element109, align 1 - %conv110 = sext i8 %48 to i64 + %49 = load i8, ptr %bytes_per_element109, align 1 + %conv110 = sext i8 %49 to i64 %mul111 = mul nsw i64 %conv110, %conv108 %cmp112 = icmp eq i64 %mul111, 0 br i1 %cmp112, label %for.inc142, label %if.end115 if.end115: ; preds = %for.body100 %height106 = getelementptr inbounds nuw i8, ptr %add.ptr104, i64 8 - %49 = load i32, ptr %height106, align 8 - %conv116 = sext i32 %49 to i64 + %50 = load i32, ptr %height106, align 8 + %conv116 = sext i32 %50 to i64 %mul117 = mul i64 %mul111, %conv116 %add.ptr118 = getelementptr inbounds i8, ptr %scratch.0124, i64 %mul117 %y_samples = getelementptr inbounds nuw i8, ptr %add.ptr104, i64 20 - %50 = load i32, ptr %y_samples, align 4 - %cmp119 = icmp sgt i32 %50, 1 + %51 = load i32, ptr %y_samples, align 4 + %cmp119 = icmp sgt i32 %51, 1 br i1 %cmp119, label %if.then121, label %if.end135 if.then121: ; preds = %if.end115 - %rem = srem i32 %add92, %50 + %rem = srem i32 %add92, %51 %cmp123.not = icmp eq i32 %rem, 0 br i1 %cmp123.not, label %if.end126, label %for.inc142 if.end126: ; preds = %if.then121 - %div128 = udiv i32 %y.0131, %50 + %div128 = udiv i32 %y.0131, %51 br label %if.end135 if.end135: ; preds = %if.end115, %if.end126 @@ -1105,13 +1106,13 @@ if.end135: ; preds = %if.end115, %if.end1 br label %for.inc142 for.inc142: ; preds = %if.then121, %for.body100, %if.end135 - %51 = phi i16 [ %45, %for.body100 ], [ %45, %if.then121 ], [ %.pre146, %if.end135 ] + %52 = phi i16 [ %46, %for.body100 ], [ %46, %if.then121 ], [ %.pre146, %if.end135 ] %scratch.1 = phi ptr [ %scratch.0124, %for.body100 ], [ %add.ptr118, %if.then121 ], [ %add.ptr118, %if.end135 ] %nOut.2 = phi i64 [ %nOut.1125, %for.body100 ], [ %nOut.1125, %if.then121 ], [ %add141, %if.end135 ] %out.2 = phi ptr [ %out.1126, %for.body100 ], [ %out.1126, %if.then121 ], [ %add.ptr140, %if.end135 ] %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1 - %52 = sext i16 %51 to i64 - %cmp98 = icmp slt i64 %indvars.iv.next141, %52 + %53 = sext i16 %52 to i64 + %cmp98 = icmp slt i64 %indvars.iv.next141, %53 br i1 %cmp98, label %for.body100, label %for.inc145.loopexit, !llvm.loop !25 for.inc145.loopexit: ; preds = %for.inc142 @@ -1119,13 +1120,13 @@ for.inc145.loopexit: ; preds = %for.inc142 br label %for.inc145 for.inc145: ; preds = %for.inc145.loopexit, %for.body90 - %53 = phi i32 [ %40, %for.body90 ], [ %.pre147, %for.inc145.loopexit ] - %54 = phi i16 [ %41, %for.body90 ], [ %51, %for.inc145.loopexit ] - %55 = phi i16 [ %42, %for.body90 ], [ %51, %for.inc145.loopexit ] + %54 = phi i32 [ %41, %for.body90 ], [ %.pre147, %for.inc145.loopexit ] + %55 = phi i16 [ %42, %for.body90 ], [ %52, %for.inc145.loopexit ] + %56 = phi i16 [ %43, %for.body90 ], [ %52, %for.inc145.loopexit ] %nOut.1.lcssa = phi i64 [ %nOut.0130, %for.body90 ], [ %nOut.2, %for.inc145.loopexit ] %out.1.lcssa = phi ptr [ %out.0132, %for.body90 ], [ %out.2, %for.inc145.loopexit ] %inc146 = add nuw nsw i32 %y.0131, 1 - %cmp88 = icmp slt i32 %inc146, %53 + %cmp88 = icmp slt i32 %inc146, %54 br i1 %cmp88, label %for.body90, label %for.end147, !llvm.loop !26 for.end147: ; preds = %for.inc145, %applyLut.exit diff --git a/bench/openjdk/optimized/cfgnode.ll b/bench/openjdk/optimized/cfgnode.ll index 339509167fa..4a01eb3d846 100644 --- a/bench/openjdk/optimized/cfgnode.ll +++ b/bench/openjdk/optimized/cfgnode.ll @@ -900,7 +900,7 @@ _ZNK10RegionNode10is_diamondEv.exit: ; preds = %28 br i1 %82, label %83, label %93 83: ; preds = %76 - %84 = sub nuw nsw i64 3, %indvars.iv.i + %84 = xor i64 %indvars.iv.i, 3 %85 = getelementptr inbounds nuw ptr, ptr %65, i64 %84 %86 = load ptr, ptr %85, align 8 %.not20.i = icmp eq ptr %86, null @@ -1021,19 +1021,19 @@ define hidden noundef zeroext i1 @_ZN7PhiNode20try_clean_memory_phiEP12PhaseIter %10 = getelementptr inbounds nuw i8, ptr %9, i64 8 br label %11 -11: ; preds = %6, %40 - %indvars.iv = phi i64 [ 1, %6 ], [ %indvars.iv.next, %40 ] +11: ; preds = %6, %41 + %indvars.iv = phi i64 [ 1, %6 ], [ %indvars.iv.next, %41 ] %12 = getelementptr inbounds nuw ptr, ptr %8, i64 %indvars.iv %13 = load ptr, ptr %12, align 8 %.not19 = icmp eq ptr %13, null - br i1 %.not19, label %40, label %14 + br i1 %.not19, label %41, label %14 14: ; preds = %11 %15 = getelementptr inbounds nuw i8, ptr %13, i64 44 %16 = load i32, ptr %15, align 4 %17 = and i32 %16, 255 %18 = icmp eq i32 %17, 128 - br i1 %18, label %19, label %40 + br i1 %18, label %19, label %41 19: ; preds = %14 %20 = load ptr, ptr %10, align 8 @@ -1042,38 +1042,39 @@ define hidden noundef zeroext i1 @_ZN7PhiNode20try_clean_memory_phiEP12PhaseIter %23 = getelementptr inbounds nuw i8, ptr %22, i64 32 %24 = load i32, ptr %23, align 8 %25 = icmp eq i32 %24, 1 - br i1 %25, label %26, label %40 + br i1 %25, label %26, label %41 26: ; preds = %19 - %27 = sub nuw nsw i64 3, %indvars.iv - %28 = getelementptr inbounds nuw ptr, ptr %8, i64 %27 - %29 = load ptr, ptr %28, align 8 - %.not20 = icmp eq ptr %29, null - br i1 %.not20, label %40, label %30 + %27 = and i64 %indvars.iv, 4294967295 + %28 = xor i64 %27, 3 + %29 = getelementptr inbounds nuw ptr, ptr %8, i64 %28 + %30 = load ptr, ptr %29, align 8 + %.not20 = icmp eq ptr %30, null + br i1 %.not20, label %41, label %31 -30: ; preds = %26 - %31 = getelementptr inbounds nuw i8, ptr %13, i64 8 - %32 = load ptr, ptr %31, align 8 - %33 = getelementptr inbounds nuw i8, ptr %32, i64 16 - %34 = load ptr, ptr %33, align 8 - %35 = icmp eq ptr %29, %34 - br i1 %35, label %36, label %40 +31: ; preds = %26 + %32 = getelementptr inbounds nuw i8, ptr %13, i64 8 + %33 = load ptr, ptr %32, align 8 + %34 = getelementptr inbounds nuw i8, ptr %33, i64 16 + %35 = load ptr, ptr %34, align 8 + %36 = icmp eq ptr %30, %35 + br i1 %36, label %37, label %41 -36: ; preds = %30 +37: ; preds = %31 tail call void @_ZN12PhaseIterGVN21add_users_to_worklistEP4Node(ptr noundef nonnull align 8 dereferenceable(2416) %1, ptr noundef nonnull %0) #10 - %37 = getelementptr inbounds nuw i8, ptr %1, i64 32 - %38 = load ptr, ptr %37, align 8 - %39 = tail call noundef zeroext i1 @_ZN8NodeHash11hash_deleteEPK4Node(ptr noundef nonnull align 8 dereferenceable(40) %38, ptr noundef nonnull %0) #10 + %38 = getelementptr inbounds nuw i8, ptr %1, i64 32 + %39 = load ptr, ptr %38, align 8 + %40 = tail call noundef zeroext i1 @_ZN8NodeHash11hash_deleteEPK4Node(ptr noundef nonnull align 8 dereferenceable(40) %39, ptr noundef nonnull %0) #10 tail call void @_ZN12PhaseIterGVN12subsume_nodeEP4NodeS1_(ptr noundef nonnull align 8 dereferenceable(2416) %1, ptr noundef nonnull %0, ptr noundef nonnull %13) #10 br label %.loopexit -40: ; preds = %11, %14, %19, %30, %26 +41: ; preds = %11, %14, %19, %31, %26 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 br i1 %exitcond.not, label %.loopexit, label %11, !llvm.loop !14 -.loopexit: ; preds = %40, %2, %36 - %.0 = phi i1 [ true, %36 ], [ false, %2 ], [ false, %40 ] +.loopexit: ; preds = %41, %2, %37 + %.0 = phi i1 [ true, %37 ], [ false, %2 ], [ false, %41 ] ret i1 %.0 } @@ -10696,7 +10697,7 @@ define internal fastcc noundef ptr @_ZL10is_x2logicP8PhaseGVNP7PhiNodei(ptr noun br i1 %or.cond44, label %83, label %142 83: ; preds = %80 - %84 = sub nuw nsw i32 1, %.035 + %84 = xor i32 %.035, 1 br label %85 85: ; preds = %78, %83 @@ -10709,7 +10710,7 @@ define internal fastcc noundef ptr @_ZL10is_x2logicP8PhaseGVNP7PhiNodei(ptr noun ] 88: ; preds = %85 - %89 = sub nuw nsw i32 1, %.1 + %89 = xor i32 %.1, 1 br label %90 90: ; preds = %85, %88 diff --git a/bench/openjdk/optimized/ifnode.ll b/bench/openjdk/optimized/ifnode.ll index f4e1886d1c8..543c624359d 100644 --- a/bench/openjdk/optimized/ifnode.ll +++ b/bench/openjdk/optimized/ifnode.ll @@ -6177,9 +6177,8 @@ define hidden noundef ptr @_ZN6IfNode5IdealEP8PhaseGVNb(ptr noundef nonnull alig 101: ; preds = %100, %98 %.2.i = phi i32 [ %99, %98 ], [ %spec.select.i, %100 ] %102 = icmp eq i32 %53, 2 - %103 = sub nuw nsw i32 1, %.2.i - %spec.select60.i = select i1 %102, i32 %103, i32 %.2.i - %.not59.i = icmp eq i32 %spec.select60.i, 0 + %103 = zext i1 %102 to i32 + %.not59.i = icmp eq i32 %.2.i, %103 br i1 %.not59.i, label %_ZL19remove_useless_boolP6IfNodeP8PhaseGVN.exit, label %104 104: ; preds = %101 diff --git a/bench/openmpi/optimized/bfrop_base_macro_backers.ll b/bench/openmpi/optimized/bfrop_base_macro_backers.ll index 144df0fbda3..f8f947e82a3 100644 --- a/bench/openmpi/optimized/bfrop_base_macro_backers.ll +++ b/bench/openmpi/optimized/bfrop_base_macro_backers.ll @@ -4065,27 +4065,27 @@ pmix_strncpy.exit.i: ; preds = %20, %.lr.ph.i.i %24 = getelementptr inbounds nuw i8, ptr %0, i64 %.0.i.i store i8 58, ptr %24, align 1 %25 = getelementptr i8, ptr %24, i64 1 - %26 = sub nuw nsw i64 255, %.0.i.i br label %.lr.ph.i19.i -.lr.ph.i19.i: ; preds = %29, %pmix_strncpy.exit.i - %.012.i20.i = phi i64 [ %30, %29 ], [ 0, %pmix_strncpy.exit.i ] - %.0811.i21.i = phi ptr [ %32, %29 ], [ %25, %pmix_strncpy.exit.i ] - %.0910.i22.i = phi ptr [ %31, %29 ], [ %2, %pmix_strncpy.exit.i ] - %27 = load i8, ptr %.0910.i22.i, align 1 - store i8 %27, ptr %.0811.i21.i, align 1 - %28 = icmp eq i8 %27, 0 - br i1 %28, label %pmix_strncpy.exit25.i, label %29 - -29: ; preds = %.lr.ph.i19.i - %30 = add nuw i64 %.012.i20.i, 1 - %31 = getelementptr inbounds nuw i8, ptr %.0910.i22.i, i64 1 - %32 = getelementptr inbounds nuw i8, ptr %.0811.i21.i, i64 1 - %exitcond.not.i23.i = icmp eq i64 %30, %26 +.lr.ph.i19.i: ; preds = %28, %pmix_strncpy.exit.i + %.012.i20.i = phi i64 [ %29, %28 ], [ 0, %pmix_strncpy.exit.i ] + %.0811.i21.i = phi ptr [ %31, %28 ], [ %25, %pmix_strncpy.exit.i ] + %.0910.i22.i = phi ptr [ %30, %28 ], [ %2, %pmix_strncpy.exit.i ] + %26 = load i8, ptr %.0910.i22.i, align 1 + store i8 %26, ptr %.0811.i21.i, align 1 + %27 = icmp eq i8 %26, 0 + br i1 %27, label %pmix_strncpy.exit25.i, label %28 + +28: ; preds = %.lr.ph.i19.i + %29 = add nuw i64 %.012.i20.i, 1 + %30 = getelementptr inbounds nuw i8, ptr %.0910.i22.i, i64 1 + %31 = getelementptr inbounds nuw i8, ptr %.0811.i21.i, i64 1 + %32 = xor i64 %29, %.0.i.i + %exitcond.not.i23.i = icmp eq i64 %32, 255 br i1 %exitcond.not.i23.i, label %pmix_strncpy.exit25.i, label %.lr.ph.i19.i, !llvm.loop !4 -pmix_strncpy.exit25.i: ; preds = %29, %.lr.ph.i19.i - %.08.lcssa.i24.ph.i = phi ptr [ %32, %29 ], [ %.0811.i21.i, %.lr.ph.i19.i ] +pmix_strncpy.exit25.i: ; preds = %28, %.lr.ph.i19.i + %.08.lcssa.i24.ph.i = phi ptr [ %31, %28 ], [ %.0811.i21.i, %.lr.ph.i19.i ] store i8 0, ptr %.08.lcssa.i24.ph.i, align 1 br label %pmix_bfrops_base_tma_multicluster_nspace_construct.exit diff --git a/bench/openmpi/optimized/comm_init.ll b/bench/openmpi/optimized/comm_init.ll index 2273883ef18..06a72d13860 100644 --- a/bench/openmpi/optimized/comm_init.ll +++ b/bench/openmpi/optimized/comm_init.ll @@ -1574,83 +1574,83 @@ opal_obj_run_constructors.exit44: ; preds = %.lr.ph.i41, %99 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 184), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_world, i64 184), i64 16, i1 false) %118 = add nuw i8 %114, 1 store i8 %118, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_world, i64 208), align 8 - %narrow = sub nuw nsw i8 3, %112 - %119 = zext nneg i8 %narrow to i64 - %120 = getelementptr inbounds nuw [8 x i8], ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 192), i64 0, i64 %119 - store i8 %118, ptr %120, align 1 - %121 = add nuw nsw i8 %112, 1 - store i8 %121, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 209), align 1 + %119 = xor i8 %112, 3 + %120 = zext nneg i8 %119 to i64 + %121 = getelementptr inbounds nuw [8 x i8], ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 192), i64 0, i64 %120 + store i8 %118, ptr %121, align 1 + %122 = add nuw nsw i8 %112, 1 + store i8 %122, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 209), align 1 store i8 0, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 208), align 8 br label %ompi_comm_extended_cid_block_new.exit ompi_comm_extended_cid_block_new.exit: ; preds = %107, %117 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 168), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 184), i64 16, i1 false) store i32 1, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 216), align 8 - %122 = getelementptr inbounds nuw i8, ptr %108, i64 20 - %123 = load i32, ptr %122, align 4 - store i32 %123, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 220), align 4 + %123 = getelementptr inbounds nuw i8, ptr %108, i64 20 + %124 = load i32, ptr %123, align 4 + store i32 %124, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 220), align 4 store ptr %108, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 248), align 8 store ptr %108, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 256), align 8 - %124 = getelementptr inbounds nuw i8, ptr %108, i64 8 - %125 = load i8, ptr @opal_uses_threads, align 1 - %126 = trunc i8 %125 to i1 - br i1 %126, label %127, label %132 - -127: ; preds = %ompi_comm_extended_cid_block_new.exit - %128 = atomicrmw volatile add ptr %124, i32 1 monotonic, align 4 - %129 = load ptr, ptr @ompi_initial_error_handler_eh, align 8 - store ptr %129, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 296), align 8 - %130 = getelementptr inbounds nuw i8, ptr %129, i64 8 - %131 = atomicrmw volatile add ptr %130, i32 1 monotonic, align 4 + %125 = getelementptr inbounds nuw i8, ptr %108, i64 8 + %126 = load i8, ptr @opal_uses_threads, align 1 + %127 = trunc i8 %126 to i1 + br i1 %127, label %128, label %133 + +128: ; preds = %ompi_comm_extended_cid_block_new.exit + %129 = atomicrmw volatile add ptr %125, i32 1 monotonic, align 4 + %130 = load ptr, ptr @ompi_initial_error_handler_eh, align 8 + store ptr %130, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 296), align 8 + %131 = getelementptr inbounds nuw i8, ptr %130, i64 8 + %132 = atomicrmw volatile add ptr %131, i32 1 monotonic, align 4 br label %opal_thread_add_fetch_32.exit49 -132: ; preds = %ompi_comm_extended_cid_block_new.exit - %133 = load volatile i32, ptr %124, align 4 - %134 = add nsw i32 %133, 1 - store volatile i32 %134, ptr %124, align 4 - %135 = load volatile i32, ptr %124, align 4 - %136 = load ptr, ptr @ompi_initial_error_handler_eh, align 8 - store ptr %136, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 296), align 8 - %137 = getelementptr inbounds nuw i8, ptr %136, i64 8 - %138 = load volatile i32, ptr %137, align 4 - %139 = add nsw i32 %138, 1 - store volatile i32 %139, ptr %137, align 4 - %140 = load volatile i32, ptr %137, align 4 +133: ; preds = %ompi_comm_extended_cid_block_new.exit + %134 = load volatile i32, ptr %125, align 4 + %135 = add nsw i32 %134, 1 + store volatile i32 %135, ptr %125, align 4 + %136 = load volatile i32, ptr %125, align 4 + %137 = load ptr, ptr @ompi_initial_error_handler_eh, align 8 + store ptr %137, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 296), align 8 + %138 = getelementptr inbounds nuw i8, ptr %137, i64 8 + %139 = load volatile i32, ptr %138, align 4 + %140 = add nsw i32 %139, 1 + store volatile i32 %140, ptr %138, align 4 + %141 = load volatile i32, ptr %138, align 4 br label %opal_thread_add_fetch_32.exit49 -opal_thread_add_fetch_32.exit49: ; preds = %127, %132 - %141 = load i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 - %142 = or i32 %141, 4096 - store i32 %142, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 - %143 = call i32 @opal_pointer_array_set_item(ptr noundef nonnull @ompi_mpi_communicators, i32 noundef 1, ptr noundef nonnull @ompi_mpi_comm_self) #12 - %144 = call noalias dereferenceable_or_null(14) ptr @strdup(ptr noundef nonnull @.str.9) #12 - store ptr %144, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 160), align 8 - %145 = load i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 - %146 = or i32 %145, 65542 - store i32 %146, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 - %147 = load ptr, ptr %1, align 8 - %148 = getelementptr inbounds nuw i8, ptr %147, i64 72 - %149 = load ptr, ptr %148, align 8 - store ptr %149, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 336), align 8 +opal_thread_add_fetch_32.exit49: ; preds = %128, %133 + %142 = load i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 + %143 = or i32 %142, 4096 + store i32 %143, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 + %144 = call i32 @opal_pointer_array_set_item(ptr noundef nonnull @ompi_mpi_communicators, i32 noundef 1, ptr noundef nonnull @ompi_mpi_comm_self) #12 + %145 = call noalias dereferenceable_or_null(14) ptr @strdup(ptr noundef nonnull @.str.9) #12 + store ptr %145, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 160), align 8 + %146 = load i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 + %147 = or i32 %146, 65542 + store i32 %147, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 224), align 8 + %148 = load ptr, ptr %1, align 8 + %149 = getelementptr inbounds nuw i8, ptr %148, i64 72 + %150 = load ptr, ptr %149, align 8 + store ptr %150, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 336), align 8 store ptr null, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_comm_self, i64 272), align 8 - %150 = call i32 @ompi_attr_set_predefined_keyvals_for_wm() #12 - %151 = load i8, ptr @opal_uses_threads, align 1 - %152 = trunc i8 %151 to i1 - br i1 %152, label %153, label %155 + %151 = call i32 @ompi_attr_set_predefined_keyvals_for_wm() #12 + %152 = load i8, ptr @opal_uses_threads, align 1 + %153 = trunc i8 %152 to i1 + br i1 %153, label %154, label %156 -153: ; preds = %opal_thread_add_fetch_32.exit49 - %154 = atomicrmw volatile add ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), i32 1 monotonic, align 4 +154: ; preds = %opal_thread_add_fetch_32.exit49 + %155 = atomicrmw volatile add ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), i32 1 monotonic, align 4 br label %opal_thread_add_fetch_32.exit51 -155: ; preds = %opal_thread_add_fetch_32.exit49 - %156 = load volatile i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), align 8 - %157 = add nsw i32 %156, 1 - store volatile i32 %157, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), align 8 - %158 = load volatile i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), align 8 +156: ; preds = %opal_thread_add_fetch_32.exit49 + %157 = load volatile i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), align 8 + %158 = add nsw i32 %157, 1 + store volatile i32 %158, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), align 8 + %159 = load volatile i32, ptr getelementptr inbounds nuw (i8, ptr @ompi_mpi_errors_are_fatal, i64 8), align 8 br label %opal_thread_add_fetch_32.exit51 -opal_thread_add_fetch_32.exit51: ; preds = %155, %153, %opal_obj_run_constructors.exit44, %opal_obj_run_constructors.exit - %.019 = phi i32 [ %17, %opal_obj_run_constructors.exit ], [ %106, %opal_obj_run_constructors.exit44 ], [ 0, %153 ], [ 0, %155 ] +opal_thread_add_fetch_32.exit51: ; preds = %156, %154, %opal_obj_run_constructors.exit44, %opal_obj_run_constructors.exit + %.019 = phi i32 [ %17, %opal_obj_run_constructors.exit ], [ %106, %opal_obj_run_constructors.exit44 ], [ 0, %154 ], [ 0, %156 ] ret i32 %.019 } diff --git a/bench/openspiel/optimized/go_board.cc.ll b/bench/openspiel/optimized/go_board.cc.ll index 1645647c1b9..6b9f7ba1a23 100644 --- a/bench/openspiel/optimized/go_board.cc.ll +++ b/bench/openspiel/optimized/go_board.cc.ll @@ -2652,9 +2652,10 @@ define noundef range(i32 0, 262141) i32 @_ZN10open_spiel2go7GoBoard17CaptureDead %107 = zext nneg i32 %106 to i64 %scevgep = getelementptr i8, ptr %0, i64 %107 %108 = shl nuw nsw i32 %.432, 1 - %narrow = sub nuw nsw i32 8, %108 - %109 = zext nneg i32 %narrow to i64 - tail call void @llvm.memset.p0.i64(ptr align 2 %scevgep, i8 0, i64 %109, i1 false) + %109 = xor i32 %108, 6 + %narrow = add nuw nsw i32 %109, 2 + %110 = zext nneg i32 %narrow to i64 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %scevgep, i8 0, i64 %110, i1 false) br label %._crit_edge ._crit_edge: ; preds = %.lr.ph, %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNS0_7GoBoard17CaptureDeadChainsEtNS0_7GoColorEE3$_0EEvtRKT_.exit" diff --git a/bench/openssl/optimized/libcrypto-lib-bn_nist.ll b/bench/openssl/optimized/libcrypto-lib-bn_nist.ll index 291bec7a3cb..3547583f87f 100644 --- a/bench/openssl/optimized/libcrypto-lib-bn_nist.ll +++ b/bench/openssl/optimized/libcrypto-lib-bn_nist.ll @@ -367,36 +367,37 @@ for.body31.preheader: ; preds = %if.end23, %for.cond %5 = zext nneg i32 %4 to i64 %scevgep = getelementptr i8, ptr %c_d, i64 %5 %6 = shl nuw nsw i32 %ii.0.lcssa86, 3 - %narrow = sub nuw nsw i32 32, %6 - %7 = zext nneg i32 %narrow to i64 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %7, i1 false) + %7 = xor i32 %6, 24 + %narrow = add nuw nsw i32 %7, 8 + %8 = zext nneg i32 %narrow to i64 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %8, i1 false) br label %for.end36 for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds nuw i64, ptr %add.ptr, i64 %indvars.iv - %8 = load i64, ptr %arrayidx, align 8 + %9 = load i64, ptr %arrayidx, align 8 %arrayidx27 = getelementptr inbounds nuw [4 x i64], ptr %c_d, i64 0, i64 %indvars.iv - store i64 %8, ptr %arrayidx27, align 8 + store i64 %9, ptr %arrayidx27, align 8 %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 %for.cond28.preheader, label %for.body, !llvm.loop !6 for.end36: ; preds = %for.body31.preheader, %for.cond28.preheader - %9 = load i64, ptr %c_d, align 16 + %10 = load i64, ptr %c_d, align 16 %arrayidx39 = getelementptr inbounds nuw i8, ptr %c_d, i64 8 - %10 = load i64, ptr %arrayidx39, align 8 - %or = tail call i64 @llvm.fshl.i64(i64 %10, i64 %9, i64 32) + %11 = load i64, ptr %arrayidx39, align 8 + %or = tail call i64 @llvm.fshl.i64(i64 %11, i64 %10, i64 32) %arrayidx44 = getelementptr inbounds nuw i8, ptr %c_d, i64 16 - %11 = load i64, ptr %arrayidx44, align 16 - %or47 = tail call i64 @llvm.fshl.i64(i64 %11, i64 %10, i64 32) + %12 = load i64, ptr %arrayidx44, align 16 + %or47 = tail call i64 @llvm.fshl.i64(i64 %12, i64 %11, i64 32) %arrayidx51 = getelementptr inbounds nuw i8, ptr %c_d, i64 24 - %12 = load i64, ptr %arrayidx51, align 8 - %or54 = tail call i64 @llvm.fshl.i64(i64 %12, i64 %11, i64 32) - %shr56 = lshr i64 %12, 32 + %13 = load i64, ptr %arrayidx51, align 8 + %or54 = tail call i64 @llvm.fshl.i64(i64 %13, i64 %12, i64 32) + %shr56 = lshr i64 %13, 32 %arrayidx58 = getelementptr inbounds nuw i8, ptr %r_d.0, i64 24 - %13 = load i64, ptr %arrayidx58, align 8 - %and = and i64 %13, 4294967295 + %14 = load i64, ptr %arrayidx58, align 8 + %and = and i64 %14, 4294967295 store i64 %and, ptr %arrayidx58, align 8 store i64 0, ptr %t_d, align 16 %arrayidx62 = getelementptr inbounds nuw i8, ptr %t_d, i64 8 @@ -413,7 +414,7 @@ for.end36: ; preds = %for.body31.preheade %shl84 = shl i64 %or54, 32 store i64 %shl84, ptr %arrayidx62, align 8 %shr88 = lshr i64 %or54, 32 - %shl91 = and i64 %12, -4294967296 + %shl91 = and i64 %13, -4294967296 %or93 = or disjoint i64 %shr88, %shl91 store i64 %or93, ptr %arrayidx69, align 16 store i64 0, ptr %arrayidx76, align 8 @@ -427,8 +428,8 @@ for.end36: ; preds = %for.body31.preheade store i64 %shr56, ptr %arrayidx62, align 8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %arrayidx69, i8 0, i64 16, i1 false) %call143 = call i64 @bn_sub_words(ptr noundef %r_d.0, ptr noundef %r_d.0, ptr noundef nonnull %t_d, i32 noundef 4) #6 - %14 = load i64, ptr %arrayidx58, align 8 - %shr147 = lshr i64 %14, 32 + %15 = load i64, ptr %arrayidx58, align 8 + %shr147 = lshr i64 %15, 32 %conv148 = trunc nuw i64 %shr147 to i32 %cmp149 = icmp sgt i32 %conv148, 0 br i1 %cmp149, label %if.then151, label %if.else162 @@ -438,15 +439,15 @@ if.then151: ; preds = %for.end36 %idxprom153 = and i64 %sub152, 4294967295 %arrayidx154 = getelementptr inbounds nuw [2 x [4 x i64]], ptr @_nist_p_224, i64 0, i64 %idxprom153 %call156 = call i64 @bn_sub_words(ptr noundef nonnull %r_d.0, ptr noundef nonnull %r_d.0, ptr noundef nonnull %arrayidx154, i32 noundef 4) #6 - %15 = load i64, ptr %arrayidx58, align 8 - %shr159 = lshr i64 %15, 32 - %16 = trunc nuw i64 %shr159 to i32 - %conv160 = and i32 %16, 1 + %16 = load i64, ptr %arrayidx58, align 8 + %shr159 = lshr i64 %16, 32 + %17 = trunc nuw i64 %shr159 to i32 + %conv160 = and i32 %17, 1 %and161 = xor i32 %conv160, 1 br label %if.end177 if.else162: ; preds = %for.end36 - %cmp163 = icmp slt i64 %14, 0 + %cmp163 = icmp slt i64 %15, 0 br i1 %cmp163, label %if.then165, label %if.end177 if.then165: ; preds = %if.else162 @@ -471,9 +472,9 @@ if.end177: ; preds = %if.else162, %if.the for.body.i69: ; preds = %for.body.i69, %if.end177 %indvars.iv.i70 = phi i64 [ 0, %if.end177 ], [ %indvars.iv.next.i73, %for.body.i69 ] %arrayidx.i71 = getelementptr inbounds nuw i64, ptr %cond186, i64 %indvars.iv.i70 - %17 = load i64, ptr %arrayidx.i71, align 8 + %18 = load i64, ptr %arrayidx.i71, align 8 %arrayidx2.i72 = getelementptr inbounds nuw i64, ptr %r_d.0, i64 %indvars.iv.i70 - store i64 %17, ptr %arrayidx2.i72, align 8 + store i64 %18, ptr %arrayidx2.i72, align 8 %indvars.iv.next.i73 = add nuw nsw i64 %indvars.iv.i70, 1 %exitcond.not.i74 = icmp eq i64 %indvars.iv.next.i73, 4 br i1 %exitcond.not.i74, label %nist_cp_bn.exit75, label %for.body.i69, !llvm.loop !4 @@ -578,9 +579,9 @@ for.body31.preheader: ; preds = %if.end23, %for.cond %8 = zext nneg i32 %7 to i64 %scevgep = getelementptr i8, ptr %buf, i64 %8 %smax = tail call i32 @llvm.smax.i32(i32 %0, i32 4) - %9 = shl i32 %smax, 3 - %10 = sub i32 56, %9 - %11 = zext i32 %10 to i64 + %9 = xor i32 %smax, 7 + %10 = zext nneg i32 %9 to i64 + %11 = shl nuw nsw i64 %10, 3 %12 = add nuw nsw i64 %11, 8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %12, i1 false) br label %for.end36 diff --git a/bench/pbrt-v4/optimized/camera.cpp.ll b/bench/pbrt-v4/optimized/camera.cpp.ll index 119df64ac56..2d3993ec072 100644 --- a/bench/pbrt-v4/optimized/camera.cpp.ll +++ b/bench/pbrt-v4/optimized/camera.cpp.ll @@ -8381,7 +8381,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -9702,7 +9703,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -10790,7 +10792,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -10988,10 +10991,10 @@ if.then10: ; preds = %_ZNK4pbrt13ZSobolSa br i1 %cmp.not6.i154, label %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread, label %for.body.i47 _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread: ; preds = %if.then10 - %conv.i64246 = uitofp i32 %conv to float - %mul3.i247 = fmul float %conv.i64246, 0x3DF0000000000000 - %cmp.i.i65248 = fcmp ogt float %mul3.i247, 0x3FEFFFFFE0000000 - %.sroa.speculated.i66249 = select i1 %cmp.i.i65248, float 0x3FEFFFFFE0000000, float %mul3.i247 + %conv.i64247 = uitofp i32 %conv to float + %mul3.i248 = fmul float %conv.i64247, 0x3DF0000000000000 + %cmp.i.i65249 = fcmp ogt float %mul3.i248, 0x3FEFFFFFE0000000 + %.sroa.speculated.i66250 = select i1 %cmp.i.i65249, float 0x3FEFFFFFE0000000, float %mul3.i248 br label %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 for.body.i47: ; preds = %if.then10, %for.inc.i56 @@ -11048,7 +11051,7 @@ _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit: ; pre br label %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90: ; preds = %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread - %.sroa.speculated.i66250 = phi float [ %.sroa.speculated.i66249, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread ], [ %.sroa.speculated.i66, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit ] + %.sroa.speculated.i66251 = phi float [ %.sroa.speculated.i66250, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread ], [ %.sroa.speculated.i66, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit ] %v.0.lcssa.i84 = phi i32 [ 0, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread ], [ %v.1.i79, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit ] %xor.i.i85 = xor i32 %v.0.lcssa.i84, %conv4 %conv.i86 = uitofp i32 %xor.i.i85 to float @@ -11188,7 +11191,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -11230,8 +11234,8 @@ for.end.i193: ; preds = %for.inc.i188, %_ZN4 br label %for.body.i.i196 for.body.i.i196: ; preds = %for.body.i.i196, %for.end.i193 - %v.addr.19.i.i197 = phi i32 [ %spec.select.i.i195, %for.end.i193 ], [ %v.addr.2.i.i218, %for.body.i.i196 ] - %b.08.i.i198 = phi i32 [ 1, %for.end.i193 ], [ %inc.i.i219, %for.body.i.i196 ] + %v.addr.19.i.i197 = phi i32 [ %spec.select.i.i195, %for.end.i193 ], [ %v.addr.2.i.i219, %for.body.i.i196 ] + %b.08.i.i198 = phi i32 [ 1, %for.end.i193 ], [ %inc.i.i220, %for.body.i.i196 ] %sub.i.i199 = sub nuw nsw i32 32, %b.08.i.i198 %shl.i.i200 = shl nsw i32 -1, %sub.i.i199 %and2.i.i201 = and i32 %shl.i.i200, %v.addr.19.i.i197 @@ -11249,26 +11253,27 @@ for.body.i.i196: ; preds = %for.body.i.i196, %f %shl6.i.i213 = shl nuw i32 1, %b.08.i.i198 %and7.i.i214 = and i32 %shl6.i.i213, %conv5.i.i212 %tobool8.not.i.i215 = icmp eq i32 %and7.i.i214, 0 - %shl11.i.i216 = lshr exact i32 -2147483648, %b.08.i.i198 - %xor12.i.i217 = select i1 %tobool8.not.i.i215, i32 0, i32 %shl11.i.i216 - %v.addr.2.i.i218 = xor i32 %xor12.i.i217, %v.addr.19.i.i197 - %inc.i.i219 = add nuw nsw i32 %b.08.i.i198, 1 - %exitcond.not.i.i220 = icmp eq i32 %inc.i.i219, 32 - br i1 %exitcond.not.i.i220, label %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225, label %for.body.i.i196, !llvm.loop !134 - -_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225: ; preds = %for.body.i.i196 - %conv.i221 = uitofp i32 %v.addr.2.i.i218 to float - %mul3.i222 = fmul float %conv.i221, 0x3DF0000000000000 + %sub10.i.i216 = xor i32 %b.08.i.i198, 31 + %shl11.i.i217 = shl nuw i32 1, %sub10.i.i216 + %xor12.i.i218 = select i1 %tobool8.not.i.i215, i32 0, i32 %shl11.i.i217 + %v.addr.2.i.i219 = xor i32 %xor12.i.i218, %v.addr.19.i.i197 + %inc.i.i220 = add nuw nsw i32 %b.08.i.i198, 1 + %exitcond.not.i.i221 = icmp eq i32 %inc.i.i220, 32 + br i1 %exitcond.not.i.i221, label %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226, label %for.body.i.i196, !llvm.loop !134 + +_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226: ; preds = %for.body.i.i196 + %conv.i222 = uitofp i32 %v.addr.2.i.i219 to float + %mul3.i223 = fmul float %conv.i222, 0x3DF0000000000000 br label %return -return: ; preds = %for.end.loopexit.i39, %if.then, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 - %mul3.i222.sink251 = phi float [ %mul3.i222, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225 ], [ %mul3.i149, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %mul3.i87, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %23, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] - %.sroa.speculated.i176.sink = phi float [ %.sroa.speculated.i176, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225 ], [ %.sroa.speculated.i117, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %.sroa.speculated.i66250, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %.sroa.speculated.i, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] - %cmp.i.i223 = fcmp ogt float %mul3.i222.sink251, 0x3FEFFFFFE0000000 - %.sroa.speculated.i224 = select i1 %cmp.i.i223, float 0x3FEFFFFFE0000000, float %mul3.i222.sink251 - %retval.sroa.0.0.vec.insert233 = insertelement <2 x float> poison, float %.sroa.speculated.i176.sink, i64 0 - %retval.sroa.0.4.vec.insert239 = insertelement <2 x float> %retval.sroa.0.0.vec.insert233, float %.sroa.speculated.i224, i64 1 - ret <2 x float> %retval.sroa.0.4.vec.insert239 +return: ; preds = %for.end.loopexit.i39, %if.then, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 + %mul3.i223.sink252 = phi float [ %mul3.i223, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226 ], [ %mul3.i149, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %mul3.i87, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %23, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] + %.sroa.speculated.i176.sink = phi float [ %.sroa.speculated.i176, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226 ], [ %.sroa.speculated.i117, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %.sroa.speculated.i66251, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %.sroa.speculated.i, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] + %cmp.i.i224 = fcmp ogt float %mul3.i223.sink252, 0x3FEFFFFFE0000000 + %.sroa.speculated.i225 = select i1 %cmp.i.i224, float 0x3FEFFFFFE0000000, float %mul3.i223.sink252 + %retval.sroa.0.0.vec.insert234 = insertelement <2 x float> poison, float %.sroa.speculated.i176.sink, i64 0 + %retval.sroa.0.4.vec.insert240 = insertelement <2 x float> %retval.sroa.0.0.vec.insert234, float %.sroa.speculated.i225, i64 1 + ret <2 x float> %retval.sroa.0.4.vec.insert240 } ; Function Attrs: uwtable diff --git a/bench/pbrt-v4/optimized/integrators.cpp.ll b/bench/pbrt-v4/optimized/integrators.cpp.ll index f6719c286a7..f06247a6600 100644 --- a/bench/pbrt-v4/optimized/integrators.cpp.ll +++ b/bench/pbrt-v4/optimized/integrators.cpp.ll @@ -51864,7 +51864,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -52093,7 +52094,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -52380,7 +52382,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -55089,10 +55092,10 @@ if.then10: ; preds = %_ZNK4pbrt13ZSobolSa br i1 %cmp.not6.i154, label %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread, label %for.body.i47 _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread: ; preds = %if.then10 - %conv.i64246 = uitofp i32 %conv to float - %mul3.i247 = fmul float %conv.i64246, 0x3DF0000000000000 - %cmp.i.i65248 = fcmp ogt float %mul3.i247, 0x3FEFFFFFE0000000 - %.sroa.speculated.i66249 = select i1 %cmp.i.i65248, float 0x3FEFFFFFE0000000, float %mul3.i247 + %conv.i64247 = uitofp i32 %conv to float + %mul3.i248 = fmul float %conv.i64247, 0x3DF0000000000000 + %cmp.i.i65249 = fcmp ogt float %mul3.i248, 0x3FEFFFFFE0000000 + %.sroa.speculated.i66250 = select i1 %cmp.i.i65249, float 0x3FEFFFFFE0000000, float %mul3.i248 br label %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 for.body.i47: ; preds = %if.then10, %for.inc.i56 @@ -55149,7 +55152,7 @@ _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit: ; pre br label %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90: ; preds = %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread - %.sroa.speculated.i66250 = phi float [ %.sroa.speculated.i66249, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread ], [ %.sroa.speculated.i66, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit ] + %.sroa.speculated.i66251 = phi float [ %.sroa.speculated.i66250, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread ], [ %.sroa.speculated.i66, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit ] %v.0.lcssa.i84 = phi i32 [ 0, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit.thread ], [ %v.1.i79, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90.loopexit ] %xor.i.i85 = xor i32 %v.0.lcssa.i84, %conv4 %conv.i86 = uitofp i32 %xor.i.i85 to float @@ -55289,7 +55292,8 @@ for.body.i.i: ; preds = %for.body.i.i, %for. %shl6.i.i = shl nuw i32 1, %b.08.i.i %and7.i.i = and i32 %shl6.i.i, %conv5.i.i %tobool8.not.i.i = icmp eq i32 %and7.i.i, 0 - %shl11.i.i = lshr exact i32 -2147483648, %b.08.i.i + %sub10.i.i = xor i32 %b.08.i.i, 31 + %shl11.i.i = shl nuw i32 1, %sub10.i.i %xor12.i.i = select i1 %tobool8.not.i.i, i32 0, i32 %shl11.i.i %v.addr.2.i.i = xor i32 %xor12.i.i, %v.addr.19.i.i %inc.i.i = add nuw nsw i32 %b.08.i.i, 1 @@ -55331,8 +55335,8 @@ for.end.i193: ; preds = %for.inc.i188, %_ZN4 br label %for.body.i.i196 for.body.i.i196: ; preds = %for.body.i.i196, %for.end.i193 - %v.addr.19.i.i197 = phi i32 [ %spec.select.i.i195, %for.end.i193 ], [ %v.addr.2.i.i218, %for.body.i.i196 ] - %b.08.i.i198 = phi i32 [ 1, %for.end.i193 ], [ %inc.i.i219, %for.body.i.i196 ] + %v.addr.19.i.i197 = phi i32 [ %spec.select.i.i195, %for.end.i193 ], [ %v.addr.2.i.i219, %for.body.i.i196 ] + %b.08.i.i198 = phi i32 [ 1, %for.end.i193 ], [ %inc.i.i220, %for.body.i.i196 ] %sub.i.i199 = sub nuw nsw i32 32, %b.08.i.i198 %shl.i.i200 = shl nsw i32 -1, %sub.i.i199 %and2.i.i201 = and i32 %shl.i.i200, %v.addr.19.i.i197 @@ -55350,26 +55354,27 @@ for.body.i.i196: ; preds = %for.body.i.i196, %f %shl6.i.i213 = shl nuw i32 1, %b.08.i.i198 %and7.i.i214 = and i32 %shl6.i.i213, %conv5.i.i212 %tobool8.not.i.i215 = icmp eq i32 %and7.i.i214, 0 - %shl11.i.i216 = lshr exact i32 -2147483648, %b.08.i.i198 - %xor12.i.i217 = select i1 %tobool8.not.i.i215, i32 0, i32 %shl11.i.i216 - %v.addr.2.i.i218 = xor i32 %xor12.i.i217, %v.addr.19.i.i197 - %inc.i.i219 = add nuw nsw i32 %b.08.i.i198, 1 - %exitcond.not.i.i220 = icmp eq i32 %inc.i.i219, 32 - br i1 %exitcond.not.i.i220, label %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225, label %for.body.i.i196, !llvm.loop !703 - -_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225: ; preds = %for.body.i.i196 - %conv.i221 = uitofp i32 %v.addr.2.i.i218 to float - %mul3.i222 = fmul float %conv.i221, 0x3DF0000000000000 + %sub10.i.i216 = xor i32 %b.08.i.i198, 31 + %shl11.i.i217 = shl nuw i32 1, %sub10.i.i216 + %xor12.i.i218 = select i1 %tobool8.not.i.i215, i32 0, i32 %shl11.i.i217 + %v.addr.2.i.i219 = xor i32 %xor12.i.i218, %v.addr.19.i.i197 + %inc.i.i220 = add nuw nsw i32 %b.08.i.i198, 1 + %exitcond.not.i.i221 = icmp eq i32 %inc.i.i220, 32 + br i1 %exitcond.not.i.i221, label %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226, label %for.body.i.i196, !llvm.loop !703 + +_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226: ; preds = %for.body.i.i196 + %conv.i222 = uitofp i32 %v.addr.2.i.i219 to float + %mul3.i223 = fmul float %conv.i222, 0x3DF0000000000000 br label %return -return: ; preds = %for.end.loopexit.i39, %if.then, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 - %mul3.i222.sink251 = phi float [ %mul3.i222, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225 ], [ %mul3.i149, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %mul3.i87, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %23, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] - %.sroa.speculated.i176.sink = phi float [ %.sroa.speculated.i176, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit225 ], [ %.sroa.speculated.i117, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %.sroa.speculated.i66250, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %.sroa.speculated.i, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] - %cmp.i.i223 = fcmp ogt float %mul3.i222.sink251, 0x3FEFFFFFE0000000 - %.sroa.speculated.i224 = select i1 %cmp.i.i223, float 0x3FEFFFFFE0000000, float %mul3.i222.sink251 - %retval.sroa.0.0.vec.insert233 = insertelement <2 x float> poison, float %.sroa.speculated.i176.sink, i64 0 - %retval.sroa.0.4.vec.insert239 = insertelement <2 x float> %retval.sroa.0.0.vec.insert233, float %.sroa.speculated.i224, i64 1 - ret <2 x float> %retval.sroa.0.4.vec.insert239 +return: ; preds = %for.end.loopexit.i39, %if.then, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 + %mul3.i223.sink252 = phi float [ %mul3.i223, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226 ], [ %mul3.i149, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %mul3.i87, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %23, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] + %.sroa.speculated.i176.sink = phi float [ %.sroa.speculated.i176, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit226 ], [ %.sroa.speculated.i117, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit152 ], [ %.sroa.speculated.i66251, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit90 ], [ %.sroa.speculated.i, %for.end.loopexit.i39 ], [ 0.000000e+00, %if.then ] + %cmp.i.i224 = fcmp ogt float %mul3.i223.sink252, 0x3FEFFFFFE0000000 + %.sroa.speculated.i225 = select i1 %cmp.i.i224, float 0x3FEFFFFFE0000000, float %mul3.i223.sink252 + %retval.sroa.0.0.vec.insert234 = insertelement <2 x float> poison, float %.sroa.speculated.i176.sink, i64 0 + %retval.sroa.0.4.vec.insert240 = insertelement <2 x float> %retval.sroa.0.0.vec.insert234, float %.sroa.speculated.i225, i64 1 + ret <2 x float> %retval.sroa.0.4.vec.insert240 } ; Function Attrs: mustprogress uwtable @@ -97902,9 +97907,9 @@ entry: %bounds.sroa.8.8.extract.trunc.i.i.i = trunc nuw i64 %bounds.sroa.8.8.extract.shift.i.i.i to i32 %cmp.not.i.i.i.i = icmp sge i32 %bounds.sroa.0.0.extract.trunc.i.i.i, %bounds.sroa.5.8.extract.trunc.i.i.i %1 = tail call i32 @llvm.smax.i32(i32 %bounds.sroa.4.0.extract.trunc.i.i.i, i32 %bounds.sroa.8.8.extract.trunc.i.i.i) - %cmp4.i.i373.i.not1.i.i = icmp sge i32 %bounds.sroa.4.0.extract.trunc.i.i.i, %bounds.sroa.8.8.extract.trunc.i.i.i - %cmp4.i.i373.i.not.i.i = select i1 %cmp.not.i.i.i.i, i1 true, i1 %cmp4.i.i373.i.not1.i.i - br i1 %cmp4.i.i373.i.not.i.i, label %"_ZSt10__invoke_rIvRZN4pbrt18FunctionIntegrator6RenderEvE3$_2JNS0_7Bounds2IiEEEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EES7_E4typeEOS8_DpOS9_.exit", label %for.body.lr.ph.i.i.i + %cmp4.i.i374.i.not1.i.i = icmp sge i32 %bounds.sroa.4.0.extract.trunc.i.i.i, %bounds.sroa.8.8.extract.trunc.i.i.i + %cmp4.i.i374.i.not.i.i = select i1 %cmp.not.i.i.i.i, i1 true, i1 %cmp4.i.i374.i.not1.i.i + br i1 %cmp4.i.i374.i.not.i.i, label %"_ZSt10__invoke_rIvRZN4pbrt18FunctionIntegrator6RenderEvE3$_2JNS0_7Bounds2IiEEEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EES7_E4typeEOS8_DpOS9_.exit", label %for.body.lr.ph.i.i.i for.body.lr.ph.i.i.i: ; preds = %entry %2 = getelementptr inbounds nuw i8, ptr %__functor.val, i64 16 @@ -97941,11 +97946,11 @@ for.body.lr.ph.i.i.i: ; preds = %entry br label %for.body.i.i.i for.body.i.i.i: ; preds = %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i, %for.body.lr.ph.i.i.i - %__begin4.sroa.7.0375.i.i.i = phi i32 [ %bounds.sroa.4.0.extract.trunc.i.i.i, %for.body.lr.ph.i.i.i ], [ %__begin4.sroa.7.1.i.i.i, %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i ] - %__begin4.sroa.0.0374.i.i.i = phi i32 [ %bounds.sroa.0.0.extract.trunc.i.i.i, %for.body.lr.ph.i.i.i ], [ %__begin4.sroa.0.1.i.i.i, %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i ] - %__begin4.sroa.7.0.insert.ext.i.i.i = zext i32 %__begin4.sroa.7.0375.i.i.i to i64 + %__begin4.sroa.7.0376.i.i.i = phi i32 [ %bounds.sroa.4.0.extract.trunc.i.i.i, %for.body.lr.ph.i.i.i ], [ %__begin4.sroa.7.1.i.i.i, %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i ] + %__begin4.sroa.0.0375.i.i.i = phi i32 [ %bounds.sroa.0.0.extract.trunc.i.i.i, %for.body.lr.ph.i.i.i ], [ %__begin4.sroa.0.1.i.i.i, %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i ] + %__begin4.sroa.7.0.insert.ext.i.i.i = zext i32 %__begin4.sroa.7.0376.i.i.i to i64 %__begin4.sroa.7.0.insert.shift.i.i.i = shl nuw i64 %__begin4.sroa.7.0.insert.ext.i.i.i, 32 - %__begin4.sroa.0.0.insert.ext.i.i.i = zext i32 %__begin4.sroa.0.0374.i.i.i to i64 + %__begin4.sroa.0.0.insert.ext.i.i.i = zext i32 %__begin4.sroa.0.0375.i.i.i to i64 %__begin4.sroa.0.0.insert.insert.i.i.i = or disjoint i64 %__begin4.sroa.7.0.insert.shift.i.i.i, %__begin4.sroa.0.0.insert.ext.i.i.i %15 = load ptr, ptr %__functor.val, align 8 %16 = load i8, ptr %15, align 1 @@ -97955,10 +97960,10 @@ for.body.i.i.i: ; preds = %_ZNKSt8functionIFdN if.then.i.i.i: ; preds = %for.body.i.i.i %17 = load ptr, ptr %9, align 8 %18 = load i32, ptr %17, align 4 - %sub.i.i.i = sub nsw i32 %__begin4.sroa.0.0374.i.i.i, %18 + %sub.i.i.i = sub nsw i32 %__begin4.sroa.0.0375.i.i.i, %18 %y7.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 4 %19 = load i32, ptr %y7.i.i.i, align 4 - %sub8.i.i.i = sub nsw i32 %__begin4.sroa.7.0375.i.i.i, %19 + %sub8.i.i.i = sub nsw i32 %__begin4.sroa.7.0376.i.i.i, %19 %pMax.i.i.i = getelementptr inbounds nuw i8, ptr %17, i64 8 %20 = load i32, ptr %pMax.i.i.i, align 4 %sub12.i.i.i = sub nsw i32 %20, %18 @@ -98027,12 +98032,12 @@ while.end.loopexit.i39.i.i.i: ; preds = %while.body.i28.i.i. br label %_ZN4pbrt14RadicalInverseEim.exit43.i.i.i _ZN4pbrt14RadicalInverseEim.exit43.i.i.i: ; preds = %while.end.loopexit.i39.i.i.i, %sw.bb.i.i.i - %.sroa.speculated.i384.i.i.i = phi float [ %.sroa.speculated.i.i.i.i, %while.end.loopexit.i39.i.i.i ], [ 0.000000e+00, %sw.bb.i.i.i ] + %.sroa.speculated.i385.i.i.i = phi float [ %.sroa.speculated.i.i.i.i, %while.end.loopexit.i39.i.i.i ], [ 0.000000e+00, %sw.bb.i.i.i ] %mul12.i40.i.i.i = phi float [ %31, %while.end.loopexit.i39.i.i.i ], [ 0.000000e+00, %sw.bb.i.i.i ] %cmp.i.i41.i.i.i = fcmp ogt float %mul12.i40.i.i.i, 0x3FEFFFFFE0000000 %.sroa.speculated.i42.i.i.i = select i1 %cmp.i.i41.i.i.i, float 0x3FEFFFFFE0000000, float %mul12.i40.i.i.i - %u.sroa.0.0.vec.insert344.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i384.i.i.i, i64 0 - %u.sroa.0.4.vec.insert357.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert344.i.i.i, float %.sroa.speculated.i42.i.i.i, i64 1 + %u.sroa.0.0.vec.insert345.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i385.i.i.i, i64 0 + %u.sroa.0.4.vec.insert358.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert345.i.i.i, float %.sroa.speculated.i42.i.i.i, i64 1 br label %if.end140.i.i.i sw.bb20.i.i.i: ; preds = %if.then.i.i.i @@ -98136,8 +98141,8 @@ _ZN4pbrt23ScrambledRadicalInverseEimRKNS_16DigitPermutationE.exit93.i.i.i: ; pre %mul19.i65.i.i.i = phi float [ 0.000000e+00, %_ZN4pbrt23ScrambledRadicalInverseEimRKNS_16DigitPermutationE.exit.i.i.i ], [ %48, %while.end.loopexit.i92.i.i.i ] %cmp.i.i66.i.i.i = fcmp ogt float %mul19.i65.i.i.i, 0x3FEFFFFFE0000000 %.sroa.speculated.i67.i.i.i = select i1 %cmp.i.i66.i.i.i, float 0x3FEFFFFFE0000000, float %mul19.i65.i.i.i - %u.sroa.0.0.vec.insert342.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i50.i.i.i, i64 0 - %u.sroa.0.4.vec.insert355.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert342.i.i.i, float %.sroa.speculated.i67.i.i.i, i64 1 + %u.sroa.0.0.vec.insert343.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i50.i.i.i, i64 0 + %u.sroa.0.4.vec.insert356.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert343.i.i.i, float %.sroa.speculated.i67.i.i.i, i64 1 br label %if.end140.i.i.i sw.bb31.i.i.i: ; preds = %if.then.i.i.i @@ -98161,8 +98166,8 @@ sw.bb31.i.i.i: ; preds = %if.then.i.i.i %58 = load i64, ptr %add.ptr.i96.i.i.i, align 8 %conv43.i.i.i = trunc i64 %58 to i32 %call44.i.i.i = call noundef float @_ZN4pbrt27OwenScrambledRadicalInverseEimj(i32 noundef 1, i64 noundef %conv39.i.i.i, i32 noundef %conv43.i.i.i) - %u.sroa.0.0.vec.insert340.i.i.i = insertelement <2 x float> poison, float %call38.i.i.i, i64 0 - %u.sroa.0.4.vec.insert353.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert340.i.i.i, float %call44.i.i.i, i64 1 + %u.sroa.0.0.vec.insert341.i.i.i = insertelement <2 x float> poison, float %call38.i.i.i, i64 0 + %u.sroa.0.4.vec.insert354.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert341.i.i.i, float %call44.i.i.i, i64 1 br label %if.end140.i.i.i sw.default.i.i.i: ; preds = %if.then.i.i.i @@ -98178,10 +98183,10 @@ if.else.i.i.i: ; preds = %for.body.i.i.i if.then46.i.i.i: ; preds = %if.else.i.i.i %61 = load ptr, ptr %9, align 8 %62 = load i32, ptr %61, align 4 - %sub51.i.i.i = sub nsw i32 %__begin4.sroa.0.0374.i.i.i, %62 + %sub51.i.i.i = sub nsw i32 %__begin4.sroa.0.0375.i.i.i, %62 %y54.i.i.i = getelementptr inbounds nuw i8, ptr %61, i64 4 %63 = load i32, ptr %y54.i.i.i, align 4 - %sub55.i.i.i = sub nsw i32 %__begin4.sroa.7.0375.i.i.i, %63 + %sub55.i.i.i = sub nsw i32 %__begin4.sroa.7.0376.i.i.i, %63 %pMax56.i.i.i = getelementptr inbounds nuw i8, ptr %61, i64 8 %64 = load i32, ptr %pMax56.i.i.i, align 4 %sub60.i.i.i = sub nsw i32 %64, %62 @@ -98258,12 +98263,12 @@ for.end.loopexit.i119.i.i.i: ; preds = %for.inc.i114.i.i.i br label %_ZN4pbrt11SobolSampleINS_12NoRandomizerEEEfliT_.exit123.i.i.i _ZN4pbrt11SobolSampleINS_12NoRandomizerEEEfliT_.exit123.i.i.i: ; preds = %for.end.loopexit.i119.i.i.i, %sw.bb70.i.i.i - %.sroa.speculated.i102371.i.i.i = phi float [ %.sroa.speculated.i102.i.i.i, %for.end.loopexit.i119.i.i.i ], [ 0.000000e+00, %sw.bb70.i.i.i ] + %.sroa.speculated.i102372.i.i.i = phi float [ %.sroa.speculated.i102.i.i.i, %for.end.loopexit.i119.i.i.i ], [ 0.000000e+00, %sw.bb70.i.i.i ] %v.0.lcssa.i120.i.i.i = phi float [ %75, %for.end.loopexit.i119.i.i.i ], [ 0.000000e+00, %sw.bb70.i.i.i ] %cmp.i.i121.i.i.i = fcmp ogt float %v.0.lcssa.i120.i.i.i, 0x3FEFFFFFE0000000 %.sroa.speculated.i122.i.i.i = select i1 %cmp.i.i121.i.i.i, float 0x3FEFFFFFE0000000, float %v.0.lcssa.i120.i.i.i - %u.sroa.0.0.vec.insert338.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i102371.i.i.i, i64 0 - %u.sroa.0.4.vec.insert351.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert338.i.i.i, float %.sroa.speculated.i122.i.i.i, i64 1 + %u.sroa.0.0.vec.insert339.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i102372.i.i.i, i64 0 + %u.sroa.0.4.vec.insert352.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert339.i.i.i, float %.sroa.speculated.i122.i.i.i, i64 1 br label %if.end140.i.i.i sw.bb77.i.i.i: ; preds = %if.then46.i.i.i @@ -98342,8 +98347,8 @@ _ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit169.i.i.i: ; preds %mul3.i166.i.i.i = fmul float %conv.i165.i.i.i, 0x3DF0000000000000 %cmp.i.i167.i.i.i = fcmp ogt float %mul3.i166.i.i.i, 0x3FEFFFFFE0000000 %.sroa.speculated.i168.i.i.i = select i1 %cmp.i.i167.i.i.i, float 0x3FEFFFFFE0000000, float %mul3.i166.i.i.i - %u.sroa.0.0.vec.insert336.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i145.i.i.i, i64 0 - %u.sroa.0.4.vec.insert349.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert336.i.i.i, float %.sroa.speculated.i168.i.i.i, i64 1 + %u.sroa.0.0.vec.insert337.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i145.i.i.i, i64 0 + %u.sroa.0.4.vec.insert350.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert337.i.i.i, float %.sroa.speculated.i168.i.i.i, i64 1 br label %if.end140.i.i.i sw.bb95.i.i.i: ; preds = %if.then46.i.i.i @@ -98444,8 +98449,8 @@ _ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit230.i.i.i: ; preds = %f %mul3.i227.i.i.i = fmul float %conv.i226.i.i.i, 0x3DF0000000000000 %cmp.i.i228.i.i.i = fcmp ogt float %mul3.i227.i.i.i, 0x3FEFFFFFE0000000 %.sroa.speculated.i229.i.i.i = select i1 %cmp.i.i228.i.i.i, float 0x3FEFFFFFE0000000, float %mul3.i227.i.i.i - %u.sroa.0.0.vec.insert334.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i195.i.i.i, i64 0 - %u.sroa.0.4.vec.insert347.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert334.i.i.i, float %.sroa.speculated.i229.i.i.i, i64 1 + %u.sroa.0.0.vec.insert335.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i195.i.i.i, i64 0 + %u.sroa.0.4.vec.insert348.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert335.i.i.i, float %.sroa.speculated.i229.i.i.i, i64 1 br label %if.end140.i.i.i sw.bb113.i.i.i: ; preds = %if.then46.i.i.i @@ -98508,7 +98513,8 @@ for.body.i.i.i.i.i: ; preds = %for.body.i.i.i.i.i, %shl6.i.i.i.i.i = shl nuw i32 1, %b.08.i.i.i.i.i %and7.i.i.i.i.i = and i32 %shl6.i.i.i.i.i, %conv5.i.i.i.i.i %tobool8.not.i.i.i.i.i = icmp eq i32 %and7.i.i.i.i.i, 0 - %shl11.i.i.i.i.i = lshr exact i32 -2147483648, %b.08.i.i.i.i.i + %sub10.i.i.i.i.i = xor i32 %b.08.i.i.i.i.i, 31 + %shl11.i.i.i.i.i = shl nuw i32 1, %sub10.i.i.i.i.i %xor12.i.i.i.i.i = select i1 %tobool8.not.i.i.i.i.i, i32 0, i32 %shl11.i.i.i.i.i %v.addr.2.i.i.i.i.i = xor i32 %xor12.i.i.i.i.i, %v.addr.19.i.i.i.i.i %inc.i.i.i.i.i = add nuw nsw i32 %b.08.i.i.i.i.i, 1 @@ -98555,8 +98561,8 @@ for.end.i271.i.i.i: ; preds = %for.inc.i266.i.i.i, br label %for.body.i.i274.i.i.i for.body.i.i274.i.i.i: ; preds = %for.body.i.i274.i.i.i, %for.end.i271.i.i.i - %v.addr.19.i.i275.i.i.i = phi i32 [ %spec.select.i.i273.i.i.i, %for.end.i271.i.i.i ], [ %v.addr.2.i.i296.i.i.i, %for.body.i.i274.i.i.i ] - %b.08.i.i276.i.i.i = phi i32 [ 1, %for.end.i271.i.i.i ], [ %inc.i.i297.i.i.i, %for.body.i.i274.i.i.i ] + %v.addr.19.i.i275.i.i.i = phi i32 [ %spec.select.i.i273.i.i.i, %for.end.i271.i.i.i ], [ %v.addr.2.i.i297.i.i.i, %for.body.i.i274.i.i.i ] + %b.08.i.i276.i.i.i = phi i32 [ 1, %for.end.i271.i.i.i ], [ %inc.i.i298.i.i.i, %for.body.i.i274.i.i.i ] %sub.i.i277.i.i.i = sub nuw nsw i32 32, %b.08.i.i276.i.i.i %shl.i.i278.i.i.i = shl nsw i32 -1, %sub.i.i277.i.i.i %and2.i.i279.i.i.i = and i32 %shl.i.i278.i.i.i, %v.addr.19.i.i275.i.i.i @@ -98574,20 +98580,21 @@ for.body.i.i274.i.i.i: ; preds = %for.body.i.i274.i.i %shl6.i.i291.i.i.i = shl nuw i32 1, %b.08.i.i276.i.i.i %and7.i.i292.i.i.i = and i32 %shl6.i.i291.i.i.i, %conv5.i.i290.i.i.i %tobool8.not.i.i293.i.i.i = icmp eq i32 %and7.i.i292.i.i.i, 0 - %shl11.i.i294.i.i.i = lshr exact i32 -2147483648, %b.08.i.i276.i.i.i - %xor12.i.i295.i.i.i = select i1 %tobool8.not.i.i293.i.i.i, i32 0, i32 %shl11.i.i294.i.i.i - %v.addr.2.i.i296.i.i.i = xor i32 %xor12.i.i295.i.i.i, %v.addr.19.i.i275.i.i.i - %inc.i.i297.i.i.i = add nuw nsw i32 %b.08.i.i276.i.i.i, 1 - %exitcond.not.i.i298.i.i.i = icmp eq i32 %inc.i.i297.i.i.i, 32 - br i1 %exitcond.not.i.i298.i.i.i, label %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit303.i.i.i, label %for.body.i.i274.i.i.i, !llvm.loop !703 - -_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit303.i.i.i: ; preds = %for.body.i.i274.i.i.i - %conv.i299.i.i.i = uitofp i32 %v.addr.2.i.i296.i.i.i to float - %mul3.i300.i.i.i = fmul float %conv.i299.i.i.i, 0x3DF0000000000000 - %cmp.i.i301.i.i.i = fcmp ogt float %mul3.i300.i.i.i, 0x3FEFFFFFE0000000 - %.sroa.speculated.i302.i.i.i = select i1 %cmp.i.i301.i.i.i, float 0x3FEFFFFFE0000000, float %mul3.i300.i.i.i + %sub10.i.i294.i.i.i = xor i32 %b.08.i.i276.i.i.i, 31 + %shl11.i.i295.i.i.i = shl nuw i32 1, %sub10.i.i294.i.i.i + %xor12.i.i296.i.i.i = select i1 %tobool8.not.i.i293.i.i.i, i32 0, i32 %shl11.i.i295.i.i.i + %v.addr.2.i.i297.i.i.i = xor i32 %xor12.i.i296.i.i.i, %v.addr.19.i.i275.i.i.i + %inc.i.i298.i.i.i = add nuw nsw i32 %b.08.i.i276.i.i.i, 1 + %exitcond.not.i.i299.i.i.i = icmp eq i32 %inc.i.i298.i.i.i, 32 + br i1 %exitcond.not.i.i299.i.i.i, label %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit304.i.i.i, label %for.body.i.i274.i.i.i, !llvm.loop !703 + +_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit304.i.i.i: ; preds = %for.body.i.i274.i.i.i + %conv.i300.i.i.i = uitofp i32 %v.addr.2.i.i297.i.i.i to float + %mul3.i301.i.i.i = fmul float %conv.i300.i.i.i, 0x3DF0000000000000 + %cmp.i.i302.i.i.i = fcmp ogt float %mul3.i301.i.i.i, 0x3FEFFFFFE0000000 + %.sroa.speculated.i303.i.i.i = select i1 %cmp.i.i302.i.i.i, float 0x3FEFFFFFE0000000, float %mul3.i301.i.i.i %u.sroa.0.0.vec.insert.i.i.i = insertelement <2 x float> poison, float %.sroa.speculated.i253.i.i.i, i64 0 - %u.sroa.0.4.vec.insert.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert.i.i.i, float %.sroa.speculated.i302.i.i.i, i64 1 + %u.sroa.0.4.vec.insert.i.i.i = insertelement <2 x float> %u.sroa.0.0.vec.insert.i.i.i, float %.sroa.speculated.i303.i.i.i, i64 1 br label %if.end140.i.i.i sw.default131.i.i.i: ; preds = %if.then46.i.i.i @@ -98612,28 +98619,28 @@ if.else133.i.i.i: ; preds = %if.else.i.i.i store ptr %dimension.addr.i.i.i.i, ptr %8, align 8 %and.i.i.i.i.i.i = and i64 %106, 144115188075855871 %109 = inttoptr i64 %and.i.i.i.i.i.i to ptr - %shr.i.i.i305.i.i.i = lshr i64 %106, 57 - %conv.i.i.i.i.i.i = trunc nuw nsw i64 %shr.i.i.i305.i.i.i to i32 - %sub.i.i306.i.i.i = add nsw i32 %conv.i.i.i.i.i.i, -1 - call void @_ZN4pbrt6detail8DispatchIRZNS_7Sampler16StartPixelSampleENS_6Point2IiEEiiEUlT_E_vNS_14PMJ02BNSamplerENS_18IndependentSamplerENS_17StratifiedSamplerENS_13HaltonSamplerENS_18PaddedSobolSamplerENS_12SobolSamplerENS_13ZSobolSamplerENS_10MLTSamplerEJNS_15DebugMLTSamplerEEvEET0_OS5_Pvi(ptr noundef nonnull align 8 dereferenceable(24) %start.i.i.i.i, ptr noundef %109, i32 noundef %sub.i.i306.i.i.i) + %shr.i.i.i306.i.i.i = lshr i64 %106, 57 + %conv.i.i.i.i.i.i = trunc nuw nsw i64 %shr.i.i.i306.i.i.i to i32 + %sub.i.i307.i.i.i = add nsw i32 %conv.i.i.i.i.i.i, -1 + call void @_ZN4pbrt6detail8DispatchIRZNS_7Sampler16StartPixelSampleENS_6Point2IiEEiiEUlT_E_vNS_14PMJ02BNSamplerENS_18IndependentSamplerENS_17StratifiedSamplerENS_13HaltonSamplerENS_18PaddedSobolSamplerENS_12SobolSamplerENS_13ZSobolSamplerENS_10MLTSamplerEJNS_15DebugMLTSamplerEEvEET0_OS5_Pvi(ptr noundef nonnull align 8 dereferenceable(24) %start.i.i.i.i, ptr noundef %109, i32 noundef %sub.i.i307.i.i.i) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %p.i.i.i.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sampleIndex.addr.i.i.i.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %dimension.addr.i.i.i.i) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %start.i.i.i.i) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %get.i.i.i.i) - %call3.i.i.i.i.i = call <2 x float> @_ZN4pbrt6detail8DispatchIRZNS_7Sampler10GetPixel2DEvEUlT_E_NS_6Point2IfEENS_14PMJ02BNSamplerENS_18IndependentSamplerENS_17StratifiedSamplerENS_13HaltonSamplerENS_18PaddedSobolSamplerENS_12SobolSamplerENS_13ZSobolSamplerENS_10MLTSamplerEJNS_15DebugMLTSamplerEEvEET0_OS3_Pvi(ptr noundef nonnull align 1 dereferenceable(1) %get.i.i.i.i, ptr noundef %109, i32 noundef %sub.i.i306.i.i.i) + %call3.i.i.i.i.i = call <2 x float> @_ZN4pbrt6detail8DispatchIRZNS_7Sampler10GetPixel2DEvEUlT_E_NS_6Point2IfEENS_14PMJ02BNSamplerENS_18IndependentSamplerENS_17StratifiedSamplerENS_13HaltonSamplerENS_18PaddedSobolSamplerENS_12SobolSamplerENS_13ZSobolSamplerENS_10MLTSamplerEJNS_15DebugMLTSamplerEEvEET0_OS3_Pvi(ptr noundef nonnull align 1 dereferenceable(1) %get.i.i.i.i, ptr noundef %109, i32 noundef %sub.i.i307.i.i.i) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %get.i.i.i.i) br label %if.end140.i.i.i -if.end140.i.i.i: ; preds = %if.else133.i.i.i, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit303.i.i.i, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit230.i.i.i, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit169.i.i.i, %_ZN4pbrt11SobolSampleINS_12NoRandomizerEEEfliT_.exit123.i.i.i, %sw.bb31.i.i.i, %_ZN4pbrt23ScrambledRadicalInverseEimRKNS_16DigitPermutationE.exit93.i.i.i, %_ZN4pbrt14RadicalInverseEim.exit43.i.i.i - %u.sroa.0.1.i.i.i = phi <2 x float> [ %u.sroa.0.4.vec.insert353.i.i.i, %sw.bb31.i.i.i ], [ %u.sroa.0.4.vec.insert355.i.i.i, %_ZN4pbrt23ScrambledRadicalInverseEimRKNS_16DigitPermutationE.exit93.i.i.i ], [ %u.sroa.0.4.vec.insert357.i.i.i, %_ZN4pbrt14RadicalInverseEim.exit43.i.i.i ], [ %u.sroa.0.4.vec.insert.i.i.i, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit303.i.i.i ], [ %u.sroa.0.4.vec.insert347.i.i.i, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit230.i.i.i ], [ %u.sroa.0.4.vec.insert349.i.i.i, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit169.i.i.i ], [ %u.sroa.0.4.vec.insert351.i.i.i, %_ZN4pbrt11SobolSampleINS_12NoRandomizerEEEfliT_.exit123.i.i.i ], [ %call3.i.i.i.i.i, %if.else133.i.i.i ] +if.end140.i.i.i: ; preds = %if.else133.i.i.i, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit304.i.i.i, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit230.i.i.i, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit169.i.i.i, %_ZN4pbrt11SobolSampleINS_12NoRandomizerEEEfliT_.exit123.i.i.i, %sw.bb31.i.i.i, %_ZN4pbrt23ScrambledRadicalInverseEimRKNS_16DigitPermutationE.exit93.i.i.i, %_ZN4pbrt14RadicalInverseEim.exit43.i.i.i + %u.sroa.0.1.i.i.i = phi <2 x float> [ %u.sroa.0.4.vec.insert354.i.i.i, %sw.bb31.i.i.i ], [ %u.sroa.0.4.vec.insert356.i.i.i, %_ZN4pbrt23ScrambledRadicalInverseEimRKNS_16DigitPermutationE.exit93.i.i.i ], [ %u.sroa.0.4.vec.insert358.i.i.i, %_ZN4pbrt14RadicalInverseEim.exit43.i.i.i ], [ %u.sroa.0.4.vec.insert.i.i.i, %_ZN4pbrt11SobolSampleINS_13OwenScramblerEEEfliT_.exit304.i.i.i ], [ %u.sroa.0.4.vec.insert348.i.i.i, %_ZN4pbrt11SobolSampleINS_17FastOwenScramblerEEEfliT_.exit230.i.i.i ], [ %u.sroa.0.4.vec.insert350.i.i.i, %_ZN4pbrt11SobolSampleINS_22BinaryPermuteScramblerEEEfliT_.exit169.i.i.i ], [ %u.sroa.0.4.vec.insert352.i.i.i, %_ZN4pbrt11SobolSampleINS_12NoRandomizerEEEfliT_.exit123.i.i.i ], [ %call3.i.i.i.i.i, %if.else133.i.i.i ] call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %__args.i.i.i.i) store <2 x float> %u.sroa.0.1.i.i.i, ptr %__args.i.i.i.i, align 8 %110 = load ptr, ptr %_M_manager.i.i.i.i.i, align 8 %tobool.not.i.i.i.i.i = icmp eq ptr %110, null - br i1 %tobool.not.i.i.i.i.i, label %if.then.i311.i.i.i, label %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i + br i1 %tobool.not.i.i.i.i.i, label %if.then.i312.i.i.i, label %_ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i -if.then.i311.i.i.i: ; preds = %if.end140.i.i.i +if.then.i312.i.i.i: ; preds = %if.end140.i.i.i call void @_ZSt25__throw_bad_function_callv() #35 unreachable @@ -98643,27 +98650,27 @@ _ZNKSt8functionIFdN4pbrt6Point2IfEEEEclES2_.exit.i.i.i: ; preds = %if.end140.i.i call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %__args.i.i.i.i) %112 = load ptr, ptr %14, align 8 %113 = load i32, ptr %112, align 8 - %sub.i312.i.i.i = sub i32 %__begin4.sroa.0.0374.i.i.i, %113 - %y.i313.i.i.i = getelementptr inbounds nuw i8, ptr %112, i64 4 - %114 = load i32, ptr %y.i313.i.i.i, align 4 - %sub6.i314.i.i.i = sub nsw i32 %__begin4.sroa.7.0375.i.i.i, %114 + %sub.i313.i.i.i = sub i32 %__begin4.sroa.0.0375.i.i.i, %113 + %y.i314.i.i.i = getelementptr inbounds nuw i8, ptr %112, i64 4 + %114 = load i32, ptr %y.i314.i.i.i, align 4 + %sub6.i315.i.i.i = sub nsw i32 %__begin4.sroa.7.0376.i.i.i, %114 %values.i.i.i.i = getelementptr inbounds nuw i8, ptr %112, i64 24 %115 = load ptr, ptr %values.i.i.i.i, align 8 - %pMax.i315.i.i.i = getelementptr inbounds nuw i8, ptr %112, i64 8 - %116 = load i32, ptr %pMax.i315.i.i.i, align 8 + %pMax.i316.i.i.i = getelementptr inbounds nuw i8, ptr %112, i64 8 + %116 = load i32, ptr %pMax.i316.i.i.i, align 8 %sub13.i.i.i.i = sub nsw i32 %116, %113 - %mul.i316.i.i.i = mul nsw i32 %sub13.i.i.i.i, %sub6.i314.i.i.i - %add.i317.i.i.i = add nsw i32 %sub.i312.i.i.i, %mul.i316.i.i.i - %idxprom.i.i.i.i = sext i32 %add.i317.i.i.i to i64 - %arrayidx.i318.i.i.i = getelementptr inbounds double, ptr %115, i64 %idxprom.i.i.i.i - %117 = load double, ptr %arrayidx.i318.i.i.i, align 8 + %mul.i317.i.i.i = mul nsw i32 %sub13.i.i.i.i, %sub6.i315.i.i.i + %add.i318.i.i.i = add nsw i32 %sub.i313.i.i.i, %mul.i317.i.i.i + %idxprom.i.i.i.i = sext i32 %add.i318.i.i.i to i64 + %arrayidx.i319.i.i.i = getelementptr inbounds double, ptr %115, i64 %idxprom.i.i.i.i + %117 = load double, ptr %arrayidx.i319.i.i.i, align 8 %add147.i.i.i = fadd double %call2.i.i.i.i, %117 - store double %add147.i.i.i, ptr %arrayidx.i318.i.i.i, align 8 - %inc.i.i319.i.i.i = add nsw i32 %__begin4.sroa.0.0374.i.i.i, 1 - %cmp.i.i320.i.i.i = icmp eq i32 %inc.i.i319.i.i.i, %bounds.sroa.5.8.extract.trunc.i.i.i - %__begin4.sroa.0.1.i.i.i = select i1 %cmp.i.i320.i.i.i, i32 %bounds.sroa.0.0.extract.trunc.i.i.i, i32 %inc.i.i319.i.i.i - %inc10.i.i.i.i.i = zext i1 %cmp.i.i320.i.i.i to i32 - %__begin4.sroa.7.1.i.i.i = add nsw i32 %__begin4.sroa.7.0375.i.i.i, %inc10.i.i.i.i.i + store double %add147.i.i.i, ptr %arrayidx.i319.i.i.i, align 8 + %inc.i.i320.i.i.i = add nsw i32 %__begin4.sroa.0.0375.i.i.i, 1 + %cmp.i.i321.i.i.i = icmp eq i32 %inc.i.i320.i.i.i, %bounds.sroa.5.8.extract.trunc.i.i.i + %__begin4.sroa.0.1.i.i.i = select i1 %cmp.i.i321.i.i.i, i32 %bounds.sroa.0.0.extract.trunc.i.i.i, i32 %inc.i.i320.i.i.i + %inc10.i.i.i.i.i = zext i1 %cmp.i.i321.i.i.i to i32 + %__begin4.sroa.7.1.i.i.i = add nsw i32 %__begin4.sroa.7.0376.i.i.i, %inc10.i.i.i.i.i %cmp.not.i.i.i.i.i = icmp ne i32 %__begin4.sroa.0.1.i.i.i, %bounds.sroa.0.0.extract.trunc.i.i.i %cmp4.i.i.i.i.i = icmp ne i32 %__begin4.sroa.7.1.i.i.i, %1 %118 = select i1 %cmp.not.i.i.i.i.i, i1 true, i1 %cmp4.i.i.i.i.i diff --git a/bench/php/optimized/crypt_freesec.ll b/bench/php/optimized/crypt_freesec.ll index 07bf39c5b9d..87ef97f1466 100644 --- a/bench/php/optimized/crypt_freesec.ll +++ b/bench/php/optimized/crypt_freesec.ll @@ -1001,36 +1001,37 @@ define internal fastcc void @des_setkey(ptr nocapture noundef nonnull readonly % %172 = or i32 %167, %171 %173 = getelementptr inbounds nuw [16 x i32], ptr %112, i64 0, i64 %indvars.iv store i32 %172, ptr %173, align 4 - %174 = sub nuw nsw i64 15, %indvars.iv - %175 = getelementptr inbounds nuw [16 x i32], ptr %113, i64 0, i64 %174 - store i32 %172, ptr %175, align 4 - %176 = getelementptr inbounds nuw [128 x i32], ptr @comp_maskr, i64 0, i64 %130 - %177 = load i32, ptr %176, align 4 - %178 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 512), i64 0, i64 %135 - %179 = load i32, ptr %178, align 4 - %180 = or i32 %179, %177 - %181 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 1024), i64 0, i64 %141 - %182 = load i32, ptr %181, align 4 - %183 = or i32 %180, %182 - %184 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 1536), i64 0, i64 %146 - %185 = load i32, ptr %184, align 4 - %186 = or i32 %183, %185 - %187 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 2048), i64 0, i64 %152 - %188 = load i32, ptr %187, align 4 - %189 = or i32 %186, %188 - %190 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 2560), i64 0, i64 %158 - %191 = load i32, ptr %190, align 4 - %192 = or i32 %189, %191 - %193 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 3072), i64 0, i64 %164 - %194 = load i32, ptr %193, align 4 - %195 = or i32 %192, %194 - %196 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 3584), i64 0, i64 %169 - %197 = load i32, ptr %196, align 4 - %198 = or i32 %195, %197 - %199 = getelementptr inbounds nuw [16 x i32], ptr %114, i64 0, i64 %indvars.iv - store i32 %198, ptr %199, align 4 - %200 = getelementptr inbounds nuw [16 x i32], ptr %115, i64 0, i64 %174 - store i32 %198, ptr %200, align 4 + %174 = and i64 %indvars.iv, 4294967295 + %175 = xor i64 %174, 15 + %176 = getelementptr inbounds nuw [16 x i32], ptr %113, i64 0, i64 %175 + store i32 %172, ptr %176, align 4 + %177 = getelementptr inbounds nuw [128 x i32], ptr @comp_maskr, i64 0, i64 %130 + %178 = load i32, ptr %177, align 4 + %179 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 512), i64 0, i64 %135 + %180 = load i32, ptr %179, align 4 + %181 = or i32 %180, %178 + %182 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 1024), i64 0, i64 %141 + %183 = load i32, ptr %182, align 4 + %184 = or i32 %181, %183 + %185 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 1536), i64 0, i64 %146 + %186 = load i32, ptr %185, align 4 + %187 = or i32 %184, %186 + %188 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 2048), i64 0, i64 %152 + %189 = load i32, ptr %188, align 4 + %190 = or i32 %187, %189 + %191 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 2560), i64 0, i64 %158 + %192 = load i32, ptr %191, align 4 + %193 = or i32 %190, %192 + %194 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 3072), i64 0, i64 %164 + %195 = load i32, ptr %194, align 4 + %196 = or i32 %193, %195 + %197 = getelementptr inbounds nuw [128 x i32], ptr getelementptr inbounds nuw (i8, ptr @comp_maskr, i64 3584), i64 0, i64 %169 + %198 = load i32, ptr %197, align 4 + %199 = or i32 %196, %198 + %200 = getelementptr inbounds nuw [16 x i32], ptr %114, i64 0, i64 %indvars.iv + store i32 %199, ptr %200, align 4 + %201 = getelementptr inbounds nuw [16 x i32], ptr %115, i64 0, i64 %175 + store i32 %199, ptr %201, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 16 br i1 %exitcond.not, label %.loopexit, label %116 diff --git a/bench/php/optimized/hash_fnv.ll b/bench/php/optimized/hash_fnv.ll index f94e6578697..457f11796f4 100644 --- a/bench/php/optimized/hash_fnv.ll +++ b/bench/php/optimized/hash_fnv.ll @@ -52,16 +52,17 @@ define void @PHP_FNV132Final(ptr nocapture noundef writeonly %0, ptr nocapture n 3: ; preds = %2, %3 %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %3 ] - %4 = sub nuw nsw i64 3, %indvars.iv - %5 = getelementptr inbounds nuw i8, ptr %1, i64 %4 - %6 = load i8, ptr %5, align 1 - %7 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv - store i8 %6, ptr %7, align 1 + %4 = and i64 %indvars.iv, 4294967295 + %5 = xor i64 %4, 3 + %6 = getelementptr inbounds nuw i8, ptr %1, i64 %5 + %7 = load i8, ptr %6, align 1 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv + store i8 %7, ptr %8, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 - br i1 %exitcond.not, label %8, label %3 + br i1 %exitcond.not, label %9, label %3 -8: ; preds = %3 +9: ; preds = %3 ret void } @@ -131,16 +132,17 @@ define void @PHP_FNV164Final(ptr nocapture noundef writeonly %0, ptr nocapture n 3: ; preds = %2, %3 %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %3 ] - %4 = sub nuw nsw i64 7, %indvars.iv - %5 = getelementptr inbounds nuw i8, ptr %1, i64 %4 - %6 = load i8, ptr %5, align 1 - %7 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv - store i8 %6, ptr %7, align 1 + %4 = and i64 %indvars.iv, 4294967295 + %5 = xor i64 %4, 7 + %6 = getelementptr inbounds nuw i8, ptr %1, i64 %5 + %7 = load i8, ptr %6, align 1 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv + store i8 %7, ptr %8, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 8 - br i1 %exitcond.not, label %8, label %3 + br i1 %exitcond.not, label %9, label %3 -8: ; preds = %3 +9: ; preds = %3 ret void } diff --git a/bench/php/optimized/hash_joaat.ll b/bench/php/optimized/hash_joaat.ll index 47039fd1141..2454b439699 100644 --- a/bench/php/optimized/hash_joaat.ll +++ b/bench/php/optimized/hash_joaat.ll @@ -54,16 +54,17 @@ define void @PHP_JOAATFinal(ptr nocapture noundef writeonly %0, ptr nocapture no 9: ; preds = %2, %9 %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %9 ] - %10 = sub nuw nsw i64 3, %indvars.iv - %11 = getelementptr inbounds nuw i8, ptr %3, i64 %10 - %12 = load i8, ptr %11, align 1 - %13 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv - store i8 %12, ptr %13, align 1 + %10 = and i64 %indvars.iv, 4294967295 + %11 = xor i64 %10, 3 + %12 = getelementptr inbounds nuw i8, ptr %3, i64 %11 + %13 = load i8, ptr %12, align 1 + %14 = getelementptr inbounds nuw i8, ptr %0, i64 %indvars.iv + store i8 %13, ptr %14, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 - br i1 %exitcond.not, label %14, label %9 + br i1 %exitcond.not, label %15, label %9 -14: ; preds = %9 +15: ; preds = %9 store i32 0, ptr %1, align 4 ret void } diff --git a/bench/qemu/optimized/hw_pci_pci.c.ll b/bench/qemu/optimized/hw_pci_pci.c.ll index 1da5e7e82d3..d11e50968ea 100644 --- a/bench/qemu/optimized/hw_pci_pci.c.ll +++ b/bench/qemu/optimized/hw_pci_pci.c.ll @@ -2626,9 +2626,10 @@ entry: br label %for.body for.body: ; preds = %entry, %for.inc - %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] - %0 = sub nuw nsw i64 255, %indvars.iv - %arrayidx = getelementptr [256 x ptr], ptr %devices, i64 0, i64 %0 + %devfn.05 = phi i32 [ 0, %entry ], [ %inc, %for.inc ] + %0 = xor i32 %devfn.05, 255 + %sub = zext nneg i32 %0 to i64 + %arrayidx = getelementptr [256 x ptr], ptr %devices, i64 0, i64 %sub %1 = load ptr, ptr %arrayidx, align 8 %tobool.not = icmp eq ptr %1, null br i1 %tobool.not, label %for.inc, label %if.then @@ -2638,8 +2639,8 @@ if.then: ; preds = %for.body br label %for.inc for.inc: ; preds = %for.body, %if.then - %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, 256 + %inc = add nuw nsw i32 %devfn.05, 1 + %exitcond.not = icmp eq i32 %inc, 256 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !16 for.end: ; preds = %for.inc @@ -2658,9 +2659,10 @@ if.then: ; preds = %entry br label %for.body.i for.body.i: ; preds = %for.inc.i, %if.then - %indvars.iv.i = phi i64 [ 0, %if.then ], [ %indvars.iv.next.i, %for.inc.i ] - %0 = sub nuw nsw i64 255, %indvars.iv.i - %arrayidx.i = getelementptr [256 x ptr], ptr %devices.i, i64 0, i64 %0 + %devfn.05.i = phi i32 [ 0, %if.then ], [ %inc.i, %for.inc.i ] + %0 = xor i32 %devfn.05.i, 255 + %sub.i = zext nneg i32 %0 to i64 + %arrayidx.i = getelementptr [256 x ptr], ptr %devices.i, i64 0, i64 %sub.i %1 = load ptr, ptr %arrayidx.i, align 8 %tobool.not.i = icmp eq ptr %1, null br i1 %tobool.not.i, label %for.inc.i, label %if.then.i @@ -2670,8 +2672,8 @@ if.then.i: ; preds = %for.body.i br label %for.inc.i for.inc.i: ; preds = %if.then.i, %for.body.i - %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 256 + %inc.i = add nuw nsw i32 %devfn.05.i, 1 + %exitcond.not.i = icmp eq i32 %inc.i, 256 br i1 %exitcond.not.i, label %if.end, label %for.body.i, !llvm.loop !16 if.end: ; preds = %for.inc.i, %entry diff --git a/bench/quickjs/optimized/libbf.ll b/bench/quickjs/optimized/libbf.ll index f0cb7b2cc50..f302e39870b 100644 --- a/bench/quickjs/optimized/libbf.ll +++ b/bench/quickjs/optimized/libbf.ll @@ -23763,26 +23763,26 @@ get_bits.exit.i: ; preds = %187, %179 br i1 %204, label %205, label %.preheader268 205: ; preds = %197 - %206 = sub nuw nsw i32 63, %200 - %207 = sub nsw i64 63, %199 - %208 = and i64 %207, 4294967295 - %notmask.i.i = shl nsw i64 -1, %208 - %209 = xor i64 %notmask.i.i, -1 - %210 = and i64 %.0.i.i177, %209 - %211 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, 0) %210, i1 false) - %212 = xor i64 %.0.i53.i, -1 - %213 = and i64 %209, %212 - %214 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, 0) %213, i1 false) - %215 = tail call i64 @llvm.umin.i64(i64 %211, i64 %214) - %216 = trunc nuw nsw i64 %215 to i32 - %217 = sub nsw i32 %216, %201 - %218 = sext i32 %217 to i64 - %219 = add i64 %203, %218 - %.not52.i = icmp eq i32 %217, %206 + %206 = sub nsw i64 63, %199 + %207 = and i64 %206, 4294967295 + %notmask.i.i = shl nsw i64 -1, %207 + %208 = xor i64 %notmask.i.i, -1 + %209 = and i64 %.0.i.i177, %208 + %210 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, 0) %209, i1 false) + %211 = xor i64 %.0.i53.i, -1 + %212 = and i64 %208, %211 + %213 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, 0) %212, i1 false) + %214 = tail call i64 @llvm.umin.i64(i64 %210, i64 %213) + %215 = trunc nuw nsw i64 %214 to i32 + %216 = sub nsw i32 %215, %201 + %217 = sext i32 %216 to i64 + %218 = add i64 %203, %217 + %219 = xor i32 %216, %200 + %.not52.i = icmp eq i32 %219, 63 br i1 %.not52.i, label %.preheader268, label %count_cancelled_bits.exit .preheader268: ; preds = %205, %197 - %.3.i.ph = phi i64 [ %203, %197 ], [ %219, %205 ] + %.3.i.ph = phi i64 [ %203, %197 ], [ %218, %205 ] br label %220 220: ; preds = %.preheader268, %get_bits.exit61.i @@ -23857,7 +23857,7 @@ get_bits.exit61.i: ; preds = %242, %234 count_cancelled_bits.exit: ; preds = %.count_cancelled_bits.exit_crit_edge, %252, %205, %152 %258 = phi i64 [ %.pre239, %152 ], [ %.pre238, %.count_cancelled_bits.exit_crit_edge ], [ %.pre239, %205 ], [ %.pre239, %252 ] %259 = phi i64 [ %.pre237, %152 ], [ %.pre, %.count_cancelled_bits.exit_crit_edge ], [ %.pre237, %205 ], [ %.pre237, %252 ] - %.0151 = phi i64 [ 1, %152 ], [ 0, %.count_cancelled_bits.exit_crit_edge ], [ %219, %205 ], [ %257, %252 ] + %.0151 = phi i64 [ 1, %152 ], [ 0, %.count_cancelled_bits.exit_crit_edge ], [ %218, %205 ], [ %257, %252 ] %260 = add i64 %3, 65 %261 = add i64 %260, %.0151 %262 = lshr i64 %261, 6 diff --git a/bench/redis/optimized/t_string.ll b/bench/redis/optimized/t_string.ll index a44e2867df2..42b0513de6d 100644 --- a/bench/redis/optimized/t_string.ll +++ b/bench/redis/optimized/t_string.ll @@ -2228,10 +2228,10 @@ if.end4: ; preds = %if.end lor.lhs.false: ; preds = %if.end4 %cmp9 = icmp sgt i64 %incr, 0 %cmp11 = icmp sgt i64 %3, 0 - %or.cond1 = select i1 %cmp9, i1 %cmp11, i1 false - %sub13 = sub nuw nsw i64 9223372036854775807, %3 + %sub13 = xor i64 %3, 9223372036854775807 %cmp14 = icmp sgt i64 %incr, %sub13 - %or.cond35 = select i1 %or.cond1, i1 %cmp14, i1 false + %4 = and i1 %cmp11, %cmp14 + %or.cond35 = select i1 %cmp9, i1 %4, i1 false br i1 %or.cond35, label %if.then15, label %if.end16 if.then15: ; preds = %lor.lhs.false, %if.end4 @@ -2246,60 +2246,60 @@ if.end16: ; preds = %lor.lhs.false land.lhs.true18: ; preds = %if.end16 %refcount = getelementptr inbounds nuw i8, ptr %call, i64 4 - %4 = load i32, ptr %refcount, align 4 - %cmp19 = icmp eq i32 %4, 1 + %5 = load i32, ptr %refcount, align 4 + %cmp19 = icmp eq i32 %5, 1 br i1 %cmp19, label %land.lhs.true20, label %if.then33 land.lhs.true20: ; preds = %land.lhs.true18 %bf.load = load i32, ptr %call, align 8 - %5 = and i32 %bf.load, 240 - %cmp21 = icmp eq i32 %5, 16 + %6 = and i32 %bf.load, 240 + %cmp21 = icmp eq i32 %6, 16 %or.cond2 = icmp ugt i64 %add, 9999 %or.cond36 = select i1 %cmp21, i1 %or.cond2, i1 false br i1 %or.cond36, label %if.then30, label %if.then33 if.then30: ; preds = %land.lhs.true20 - %6 = inttoptr i64 %add to ptr + %7 = inttoptr i64 %add to ptr %ptr = getelementptr inbounds nuw i8, ptr %call, i64 8 - store ptr %6, ptr %ptr, align 8 + store ptr %7, ptr %ptr, align 8 br label %if.end42 if.then33: ; preds = %land.lhs.true20, %land.lhs.true18 %call3137 = call ptr @createStringObjectFromLongLongForValue(i64 noundef %add) #10 - %7 = load ptr, ptr %db, align 8 - %8 = load ptr, ptr %argv, align 8 - %arrayidx36 = getelementptr inbounds nuw i8, ptr %8, i64 8 - %9 = load ptr, ptr %arrayidx36, align 8 - call void @dbReplaceValue(ptr noundef %7, ptr noundef %9, ptr noundef %call3137) #10 + %8 = load ptr, ptr %db, align 8 + %9 = load ptr, ptr %argv, align 8 + %arrayidx36 = getelementptr inbounds nuw i8, ptr %9, i64 8 + %10 = load ptr, ptr %arrayidx36, align 8 + call void @dbReplaceValue(ptr noundef %8, ptr noundef %10, ptr noundef %call3137) #10 br label %if.end42 if.else37: ; preds = %if.end16 %call31 = call ptr @createStringObjectFromLongLongForValue(i64 noundef %add) #10 - %10 = load ptr, ptr %db, align 8 - %11 = load ptr, ptr %argv, align 8 - %arrayidx40 = getelementptr inbounds nuw i8, ptr %11, i64 8 - %12 = load ptr, ptr %arrayidx40, align 8 - call void @dbAdd(ptr noundef %10, ptr noundef %12, ptr noundef %call31) #10 + %11 = load ptr, ptr %db, align 8 + %12 = load ptr, ptr %argv, align 8 + %arrayidx40 = getelementptr inbounds nuw i8, ptr %12, i64 8 + %13 = load ptr, ptr %arrayidx40, align 8 + call void @dbAdd(ptr noundef %11, ptr noundef %13, ptr noundef %call31) #10 br label %if.end42 if.end42: ; preds = %if.then33, %if.else37, %if.then30 - %13 = load ptr, ptr %db, align 8 - %14 = load ptr, ptr %argv, align 8 - %arrayidx45 = getelementptr inbounds nuw i8, ptr %14, i64 8 - %15 = load ptr, ptr %arrayidx45, align 8 - call void @signalModifiedKey(ptr noundef nonnull %c, ptr noundef %13, ptr noundef %15) #10 - %16 = load ptr, ptr %argv, align 8 - %arrayidx47 = getelementptr inbounds nuw i8, ptr %16, i64 8 - %17 = load ptr, ptr %arrayidx47, align 8 - %18 = load ptr, ptr %db, align 8 - %id = getelementptr inbounds nuw i8, ptr %18, i64 48 - %19 = load i32, ptr %id, align 8 - call void @notifyKeyspaceEvent(i32 noundef 8, ptr noundef nonnull @.str.11, ptr noundef %17, i32 noundef %19) #10 - %20 = load i64, ptr getelementptr inbounds nuw (i8, ptr @server, i64 4104), align 8 - %inc = add nsw i64 %20, 1 + %14 = load ptr, ptr %db, align 8 + %15 = load ptr, ptr %argv, align 8 + %arrayidx45 = getelementptr inbounds nuw i8, ptr %15, i64 8 + %16 = load ptr, ptr %arrayidx45, align 8 + call void @signalModifiedKey(ptr noundef nonnull %c, ptr noundef %14, ptr noundef %16) #10 + %17 = load ptr, ptr %argv, align 8 + %arrayidx47 = getelementptr inbounds nuw i8, ptr %17, i64 8 + %18 = load ptr, ptr %arrayidx47, align 8 + %19 = load ptr, ptr %db, align 8 + %id = getelementptr inbounds nuw i8, ptr %19, i64 48 + %20 = load i32, ptr %id, align 8 + call void @notifyKeyspaceEvent(i32 noundef 8, ptr noundef nonnull @.str.11, ptr noundef %18, i32 noundef %20) #10 + %21 = load i64, ptr getelementptr inbounds nuw (i8, ptr @server, i64 4104), align 8 + %inc = add nsw i64 %21, 1 store i64 %inc, ptr getelementptr inbounds nuw (i8, ptr @server, i64 4104), align 8 - %21 = load i64, ptr %value, align 8 - call void @addReplyLongLong(ptr noundef nonnull %c, i64 noundef %21) #10 + %22 = load i64, ptr %value, align 8 + call void @addReplyLongLong(ptr noundef nonnull %c, i64 noundef %22) #10 br label %return return: ; preds = %if.end, %entry, %if.end42, %if.then15 diff --git a/bench/ruby/optimized/compile.ll b/bench/ruby/optimized/compile.ll index 4fbcb7c41ff..b0e120cf23e 100644 --- a/bench/ruby/optimized/compile.ll +++ b/bench/ruby/optimized/compile.ll @@ -75287,7 +75287,7 @@ ibf_dump_pos.exit.loopexit.i: ; preds = %385, %ibf_dump_writ 173: ; preds = %176, %172 %indvars.iv.i.i = phi i64 [ 0, %172 ], [ %indvars.iv.next.i.i, %176 ] %.01617.i.i = phi i64 [ %164, %172 ], [ 0, %176 ] - %174 = sub nuw nsw i64 7, %indvars.iv.i.i + %174 = xor i64 %indvars.iv.i.i, 7 %175 = lshr i64 %.01617.i.i, %174 %.not.i46.i = icmp eq i64 %175, 0 br i1 %.not.i46.i, label %.critedge.split.loop.exit20.i.i, label %176 @@ -75536,7 +75536,7 @@ ISEQ_IS_ENTRY_START.exit.i: ; preds = %256, %.lr.ph.i 290: ; preds = %293, %285 %indvars.iv.i.i.i = phi i64 [ 0, %285 ], [ %indvars.iv.next.i.i.i, %293 ] %.01617.i.i.i = phi i64 [ %289, %285 ], [ %297, %293 ] - %291 = sub nuw nsw i64 7, %indvars.iv.i.i.i + %291 = xor i64 %indvars.iv.i.i.i, 7 %292 = lshr i64 %.01617.i.i.i, %291 %.not.i.i65.i = icmp eq i64 %292, 0 br i1 %.not.i.i65.i, label %.critedge.split.loop.exit20.i.i.i, label %293 @@ -75596,7 +75596,7 @@ ibf_dump_write_small_value.exit.i.i: ; preds = %.critedge.i.i.i 321: ; preds = %324, %ibf_dump_write_small_value.exit.i.i %indvars.iv.i7.i.i = phi i64 [ 0, %ibf_dump_write_small_value.exit.i.i ], [ %indvars.iv.next.i10.i.i, %324 ] %.01617.i8.i.i = phi i64 [ %320, %ibf_dump_write_small_value.exit.i.i ], [ %328, %324 ] - %322 = sub nuw nsw i64 7, %indvars.iv.i7.i.i + %322 = xor i64 %indvars.iv.i7.i.i, 7 %323 = lshr i64 %.01617.i8.i.i, %322 %.not.i9.i.i = icmp eq i64 %323, 0 br i1 %.not.i9.i.i, label %.critedge.split.loop.exit20.i17.i.i, label %324 @@ -75673,7 +75673,7 @@ ibf_dump_object.exit.i: ; preds = %278, %.ibf_table_fi 357: ; preds = %360, %ibf_dump_object.exit.i %indvars.iv.i68.i = phi i64 [ 0, %ibf_dump_object.exit.i ], [ %indvars.iv.next.i71.i, %360 ] %.01617.i69.i = phi i64 [ %.041.i, %ibf_dump_object.exit.i ], [ %364, %360 ] - %358 = sub nuw nsw i64 7, %indvars.iv.i68.i + %358 = xor i64 %indvars.iv.i68.i, 7 %359 = lshr i64 %.01617.i69.i, %358 %.not.i70.i = icmp eq i64 %359, 0 br i1 %.not.i70.i, label %.critedge.split.loop.exit20.i78.i, label %360 @@ -75828,7 +75828,7 @@ ibf_dump_pos.exit.i: ; preds = %ibf_dump_param_opt_ 432: ; preds = %435, %428 %indvars.iv.i.i174 = phi i64 [ 0, %428 ], [ %indvars.iv.next.i.i177, %435 ] %.01617.i.i175 = phi i64 [ %431, %428 ], [ %439, %435 ] - %433 = sub nuw nsw i64 7, %indvars.iv.i.i174 + %433 = xor i64 %indvars.iv.i.i174, 7 %434 = lshr i64 %.01617.i.i175, %433 %.not.i.i176 = icmp eq i64 %434, 0 br i1 %.not.i.i176, label %.critedge.split.loop.exit20.i.i184, label %435 @@ -75888,7 +75888,7 @@ ibf_dump_write_small_value.exit.i183: ; preds = %.critedge.i.i179 463: ; preds = %466, %ibf_dump_write_small_value.exit.i183 %indvars.iv.i14.i = phi i64 [ 0, %ibf_dump_write_small_value.exit.i183 ], [ %indvars.iv.next.i17.i, %466 ] %.01617.i15.i = phi i64 [ %462, %ibf_dump_write_small_value.exit.i183 ], [ %470, %466 ] - %464 = sub nuw nsw i64 7, %indvars.iv.i14.i + %464 = xor i64 %indvars.iv.i14.i, 7 %465 = lshr i64 %.01617.i15.i, %464 %.not.i16.i = icmp eq i64 %465, 0 br i1 %.not.i16.i, label %.critedge.split.loop.exit20.i24.i, label %466 @@ -75948,7 +75948,7 @@ ibf_dump_write_small_value.exit25.i: ; preds = %.critedge.i19.i 494: ; preds = %497, %ibf_dump_write_small_value.exit25.i %indvars.iv.i26.i = phi i64 [ 0, %ibf_dump_write_small_value.exit25.i ], [ %indvars.iv.next.i29.i, %497 ] %.01617.i27.i = phi i64 [ %493, %ibf_dump_write_small_value.exit25.i ], [ %501, %497 ] - %495 = sub nuw nsw i64 7, %indvars.iv.i26.i + %495 = xor i64 %indvars.iv.i26.i, 7 %496 = lshr i64 %.01617.i27.i, %495 %.not.i28.i = icmp eq i64 %496, 0 br i1 %.not.i28.i, label %.critedge.split.loop.exit20.i36.i, label %497 @@ -76047,7 +76047,7 @@ ibf_dump_pos.exit.preheader.i187: ; preds = %ibf_dump_insns_info 543: ; preds = %546, %538 %indvars.iv.i.i191 = phi i64 [ 0, %538 ], [ %indvars.iv.next.i.i194, %546 ] %.01617.i.i192 = phi i64 [ %542, %538 ], [ %550, %546 ] - %544 = sub nuw nsw i64 7, %indvars.iv.i.i191 + %544 = xor i64 %indvars.iv.i.i191, 7 %545 = lshr i64 %.01617.i.i192, %544 %.not.i.i193 = icmp eq i64 %545, 0 br i1 %.not.i.i193, label %.critedge.split.loop.exit20.i.i203, label %546 @@ -76311,7 +76311,7 @@ ibf_dump_id.exit.i: ; preds = %672, %.ibf_table_fi 677: ; preds = %680, %ibf_dump_id.exit.i %indvars.iv.i.i225 = phi i64 [ 0, %ibf_dump_id.exit.i ], [ %indvars.iv.next.i.i228, %680 ] %.01617.i.i226 = phi i64 [ %.0.i37.i, %ibf_dump_id.exit.i ], [ %684, %680 ] - %678 = sub nuw nsw i64 7, %indvars.iv.i.i225 + %678 = xor i64 %indvars.iv.i.i225, 7 %679 = lshr i64 %.01617.i.i226, %678 %.not.i.i227 = icmp eq i64 %679, 0 br i1 %.not.i.i227, label %.critedge.split.loop.exit20.i.i245, label %680 @@ -76384,7 +76384,7 @@ vm_ci_flag.exit.i: ; preds = %708, %705 713: ; preds = %716, %vm_ci_flag.exit.i %indvars.iv.i42.i = phi i64 [ 0, %vm_ci_flag.exit.i ], [ %indvars.iv.next.i45.i, %716 ] %.01617.i43.i = phi i64 [ %712, %vm_ci_flag.exit.i ], [ %720, %716 ] - %714 = sub nuw nsw i64 7, %indvars.iv.i42.i + %714 = xor i64 %indvars.iv.i42.i, 7 %715 = lshr i64 %.01617.i43.i, %714 %.not.i44.i = icmp eq i64 %715, 0 br i1 %.not.i44.i, label %.critedge.split.loop.exit20.i52.i, label %716 @@ -76456,7 +76456,7 @@ vm_ci_argc.exit.i: ; preds = %744, %741 748: ; preds = %751, %vm_ci_argc.exit.i %indvars.iv.i56.i = phi i64 [ 0, %vm_ci_argc.exit.i ], [ %indvars.iv.next.i59.i, %751 ] %.01617.i57.i = phi i64 [ %.0.i55.i, %vm_ci_argc.exit.i ], [ %755, %751 ] - %749 = sub nuw nsw i64 7, %indvars.iv.i56.i + %749 = xor i64 %indvars.iv.i56.i, 7 %750 = lshr i64 %.01617.i57.i, %749 %.not.i58.i = icmp eq i64 %750, 0 br i1 %.not.i58.i, label %.critedge.split.loop.exit20.i66.i, label %751 @@ -76524,7 +76524,7 @@ vm_ci_kwarg.exit.i: ; preds = %ibf_dump_write_smal 781: ; preds = %784, %778 %indvars.iv.i70.i = phi i64 [ 0, %778 ], [ %indvars.iv.next.i73.i, %784 ] %.01617.i71.i = phi i64 [ %780, %778 ], [ %788, %784 ] - %782 = sub nuw nsw i64 7, %indvars.iv.i70.i + %782 = xor i64 %indvars.iv.i70.i, 7 %783 = lshr i64 %.01617.i71.i, %782 %.not.i72.i = icmp eq i64 %783, 0 br i1 %.not.i72.i, label %.critedge.split.loop.exit20.i80.i, label %784 @@ -76620,7 +76620,7 @@ ibf_dump_object.exit.i241: ; preds = %820, %.ibf_table_fi 825: ; preds = %828, %ibf_dump_object.exit.i241 %indvars.iv.i82.i = phi i64 [ 0, %ibf_dump_object.exit.i241 ], [ %indvars.iv.next.i85.i, %828 ] %.01617.i83.i = phi i64 [ %.pre-phi.i.i, %ibf_dump_object.exit.i241 ], [ %832, %828 ] - %826 = sub nuw nsw i64 7, %indvars.iv.i82.i + %826 = xor i64 %indvars.iv.i82.i, 7 %827 = lshr i64 %.01617.i83.i, %826 %.not.i84.i = icmp eq i64 %827, 0 br i1 %.not.i84.i, label %.critedge.split.loop.exit20.i92.i, label %828 @@ -76703,7 +76703,7 @@ ibf_dump_write_small_value.exit105.i: ; preds = %vm_ci_kwarg.exit.th 861: ; preds = %864, %860 %indvars.iv.i106.i = phi i64 [ 0, %860 ], [ %indvars.iv.next.i109.i, %864 ] %.01617.i107.i = phi i64 [ -1, %860 ], [ %868, %864 ] - %862 = sub nuw nsw i64 7, %indvars.iv.i106.i + %862 = xor i64 %indvars.iv.i106.i, 7 %863 = lshr i64 %.01617.i107.i, %862 %.not.i108.i = icmp eq i64 %863, 0 br i1 %.not.i108.i, label %.critedge.split.loop.exit20.i116.i, label %864 @@ -76796,7 +76796,7 @@ ibf_dump_pos.exit247: ; preds = %ibf_dump_ci_entries 903: ; preds = %906, %ibf_dump_pos.exit247 %indvars.iv.i248 = phi i64 [ 0, %ibf_dump_pos.exit247 ], [ %indvars.iv.next.i250, %906 ] %.01617.i = phi i64 [ %902, %ibf_dump_pos.exit247 ], [ %910, %906 ] - %904 = sub nuw nsw i64 7, %indvars.iv.i248 + %904 = xor i64 %indvars.iv.i248, 7 %905 = lshr i64 %.01617.i, %904 %.not.i249 = icmp eq i64 %905, 0 br i1 %.not.i249, label %.critedge.split.loop.exit20.i, label %906 @@ -76856,7 +76856,7 @@ ibf_dump_write_small_value.exit: ; preds = %.critedge.i 935: ; preds = %938, %ibf_dump_write_small_value.exit %indvars.iv.i255 = phi i64 [ 0, %ibf_dump_write_small_value.exit ], [ %indvars.iv.next.i258, %938 ] %.01617.i256 = phi i64 [ %934, %ibf_dump_write_small_value.exit ], [ %942, %938 ] - %936 = sub nuw nsw i64 7, %indvars.iv.i255 + %936 = xor i64 %indvars.iv.i255, 7 %937 = lshr i64 %.01617.i256, %936 %.not.i257 = icmp eq i64 %937, 0 br i1 %.not.i257, label %.critedge.split.loop.exit20.i266, label %938 @@ -76916,7 +76916,7 @@ ibf_dump_write_small_value.exit267: ; preds = %.critedge.i260 966: ; preds = %969, %ibf_dump_write_small_value.exit267 %indvars.iv.i268 = phi i64 [ 0, %ibf_dump_write_small_value.exit267 ], [ %indvars.iv.next.i271, %969 ] %.01617.i269 = phi i64 [ %965, %ibf_dump_write_small_value.exit267 ], [ %973, %969 ] - %967 = sub nuw nsw i64 7, %indvars.iv.i268 + %967 = xor i64 %indvars.iv.i268, 7 %968 = lshr i64 %.01617.i269, %967 %.not.i270 = icmp eq i64 %968, 0 br i1 %.not.i270, label %.critedge.split.loop.exit20.i279, label %969 @@ -76975,7 +76975,7 @@ ibf_dump_write_small_value.exit280: ; preds = %.critedge.i273 996: ; preds = %999, %ibf_dump_write_small_value.exit280 %indvars.iv.i281 = phi i64 [ 0, %ibf_dump_write_small_value.exit280 ], [ %indvars.iv.next.i284, %999 ] %.01617.i282 = phi i64 [ %995, %ibf_dump_write_small_value.exit280 ], [ %1003, %999 ] - %997 = sub nuw nsw i64 7, %indvars.iv.i281 + %997 = xor i64 %indvars.iv.i281, 7 %998 = lshr i64 %.01617.i282, %997 %.not.i283 = icmp eq i64 %998, 0 br i1 %.not.i283, label %.critedge.split.loop.exit20.i292, label %999 @@ -77034,7 +77034,7 @@ ibf_dump_write_small_value.exit293: ; preds = %.critedge.i286 1026: ; preds = %1029, %ibf_dump_write_small_value.exit293 %indvars.iv.i294 = phi i64 [ 0, %ibf_dump_write_small_value.exit293 ], [ %indvars.iv.next.i297, %1029 ] %.01617.i295 = phi i64 [ %1025, %ibf_dump_write_small_value.exit293 ], [ %1033, %1029 ] - %1027 = sub nuw nsw i64 7, %indvars.iv.i294 + %1027 = xor i64 %indvars.iv.i294, 7 %1028 = lshr i64 %.01617.i295, %1027 %.not.i296 = icmp eq i64 %1028, 0 br i1 %.not.i296, label %.critedge.split.loop.exit20.i305, label %1029 @@ -77095,7 +77095,7 @@ ibf_dump_write_small_value.exit306: ; preds = %.critedge.i299 1058: ; preds = %1061, %ibf_dump_write_small_value.exit306 %indvars.iv.i307 = phi i64 [ 0, %ibf_dump_write_small_value.exit306 ], [ %indvars.iv.next.i310, %1061 ] %.01617.i308 = phi i64 [ %1057, %ibf_dump_write_small_value.exit306 ], [ %1065, %1061 ] - %1059 = sub nuw nsw i64 7, %indvars.iv.i307 + %1059 = xor i64 %indvars.iv.i307, 7 %1060 = lshr i64 %.01617.i308, %1059 %.not.i309 = icmp eq i64 %1060, 0 br i1 %.not.i309, label %.critedge.split.loop.exit20.i318, label %1061 @@ -77156,7 +77156,7 @@ ibf_dump_write_small_value.exit319: ; preds = %.critedge.i312 1090: ; preds = %1093, %ibf_dump_write_small_value.exit319 %indvars.iv.i320 = phi i64 [ 0, %ibf_dump_write_small_value.exit319 ], [ %indvars.iv.next.i323, %1093 ] %.01617.i321 = phi i64 [ %1089, %ibf_dump_write_small_value.exit319 ], [ %1097, %1093 ] - %1091 = sub nuw nsw i64 7, %indvars.iv.i320 + %1091 = xor i64 %indvars.iv.i320, 7 %1092 = lshr i64 %.01617.i321, %1091 %.not.i322 = icmp eq i64 %1092, 0 br i1 %.not.i322, label %.critedge.split.loop.exit20.i331, label %1093 @@ -77217,7 +77217,7 @@ ibf_dump_write_small_value.exit332: ; preds = %.critedge.i325 1122: ; preds = %1125, %ibf_dump_write_small_value.exit332 %indvars.iv.i333 = phi i64 [ 0, %ibf_dump_write_small_value.exit332 ], [ %indvars.iv.next.i336, %1125 ] %.01617.i334 = phi i64 [ %1121, %ibf_dump_write_small_value.exit332 ], [ %1129, %1125 ] - %1123 = sub nuw nsw i64 7, %indvars.iv.i333 + %1123 = xor i64 %indvars.iv.i333, 7 %1124 = lshr i64 %.01617.i334, %1123 %.not.i335 = icmp eq i64 %1124, 0 br i1 %.not.i335, label %.critedge.split.loop.exit20.i344, label %1125 @@ -77278,7 +77278,7 @@ ibf_dump_write_small_value.exit345: ; preds = %.critedge.i338 1154: ; preds = %1157, %ibf_dump_write_small_value.exit345 %indvars.iv.i346 = phi i64 [ 0, %ibf_dump_write_small_value.exit345 ], [ %indvars.iv.next.i349, %1157 ] %.01617.i347 = phi i64 [ %1153, %ibf_dump_write_small_value.exit345 ], [ %1161, %1157 ] - %1155 = sub nuw nsw i64 7, %indvars.iv.i346 + %1155 = xor i64 %indvars.iv.i346, 7 %1156 = lshr i64 %.01617.i347, %1155 %.not.i348 = icmp eq i64 %1156, 0 br i1 %.not.i348, label %.critedge.split.loop.exit20.i357, label %1157 @@ -77339,7 +77339,7 @@ ibf_dump_write_small_value.exit358: ; preds = %.critedge.i351 1186: ; preds = %1189, %ibf_dump_write_small_value.exit358 %indvars.iv.i359 = phi i64 [ 0, %ibf_dump_write_small_value.exit358 ], [ %indvars.iv.next.i362, %1189 ] %.01617.i360 = phi i64 [ %1185, %ibf_dump_write_small_value.exit358 ], [ %1193, %1189 ] - %1187 = sub nuw nsw i64 7, %indvars.iv.i359 + %1187 = xor i64 %indvars.iv.i359, 7 %1188 = lshr i64 %.01617.i360, %1187 %.not.i361 = icmp eq i64 %1188, 0 br i1 %.not.i361, label %.critedge.split.loop.exit20.i370, label %1189 @@ -77400,7 +77400,7 @@ ibf_dump_write_small_value.exit371: ; preds = %.critedge.i364 1218: ; preds = %1221, %ibf_dump_write_small_value.exit371 %indvars.iv.i372 = phi i64 [ 0, %ibf_dump_write_small_value.exit371 ], [ %indvars.iv.next.i375, %1221 ] %.01617.i373 = phi i64 [ %1217, %ibf_dump_write_small_value.exit371 ], [ %1225, %1221 ] - %1219 = sub nuw nsw i64 7, %indvars.iv.i372 + %1219 = xor i64 %indvars.iv.i372, 7 %1220 = lshr i64 %.01617.i373, %1219 %.not.i374 = icmp eq i64 %1220, 0 br i1 %.not.i374, label %.critedge.split.loop.exit20.i383, label %1221 @@ -77461,7 +77461,7 @@ ibf_dump_write_small_value.exit384: ; preds = %.critedge.i377 1250: ; preds = %1253, %ibf_dump_write_small_value.exit384 %indvars.iv.i385 = phi i64 [ 0, %ibf_dump_write_small_value.exit384 ], [ %indvars.iv.next.i388, %1253 ] %.01617.i386 = phi i64 [ %1249, %ibf_dump_write_small_value.exit384 ], [ %1257, %1253 ] - %1251 = sub nuw nsw i64 7, %indvars.iv.i385 + %1251 = xor i64 %indvars.iv.i385, 7 %1252 = lshr i64 %.01617.i386, %1251 %.not.i387 = icmp eq i64 %1252, 0 br i1 %.not.i387, label %.critedge.split.loop.exit20.i396, label %1253 @@ -77521,7 +77521,7 @@ ibf_dump_write_small_value.exit397: ; preds = %.critedge.i390 1281: ; preds = %1284, %ibf_dump_write_small_value.exit397 %indvars.iv.i398 = phi i64 [ 0, %ibf_dump_write_small_value.exit397 ], [ %indvars.iv.next.i401, %1284 ] %.01617.i399 = phi i64 [ %1280, %ibf_dump_write_small_value.exit397 ], [ %1288, %1284 ] - %1282 = sub nuw nsw i64 7, %indvars.iv.i398 + %1282 = xor i64 %indvars.iv.i398, 7 %1283 = lshr i64 %.01617.i399, %1282 %.not.i400 = icmp eq i64 %1283, 0 br i1 %.not.i400, label %.critedge.split.loop.exit20.i409, label %1284 @@ -77580,7 +77580,7 @@ ibf_dump_write_small_value.exit410: ; preds = %.critedge.i403 1311: ; preds = %1314, %ibf_dump_write_small_value.exit410 %indvars.iv.i411 = phi i64 [ 0, %ibf_dump_write_small_value.exit410 ], [ %indvars.iv.next.i414, %1314 ] %.01617.i412 = phi i64 [ %1310, %ibf_dump_write_small_value.exit410 ], [ %1318, %1314 ] - %1312 = sub nuw nsw i64 7, %indvars.iv.i411 + %1312 = xor i64 %indvars.iv.i411, 7 %1313 = lshr i64 %.01617.i412, %1312 %.not.i413 = icmp eq i64 %1313, 0 br i1 %.not.i413, label %.critedge.split.loop.exit20.i422, label %1314 @@ -77638,7 +77638,7 @@ ibf_dump_write_small_value.exit423: ; preds = %.critedge.i416 1340: ; preds = %1343, %ibf_dump_write_small_value.exit423 %indvars.iv.i424 = phi i64 [ 0, %ibf_dump_write_small_value.exit423 ], [ %indvars.iv.next.i427, %1343 ] %.01617.i425 = phi i64 [ %.pre-phi.i, %ibf_dump_write_small_value.exit423 ], [ %1347, %1343 ] - %1341 = sub nuw nsw i64 7, %indvars.iv.i424 + %1341 = xor i64 %indvars.iv.i424, 7 %1342 = lshr i64 %.01617.i425, %1341 %.not.i426 = icmp eq i64 %1342, 0 br i1 %.not.i426, label %.critedge.split.loop.exit20.i435, label %1343 @@ -77696,7 +77696,7 @@ ibf_dump_write_small_value.exit436: ; preds = %.critedge.i429 1369: ; preds = %1372, %ibf_dump_write_small_value.exit436 %indvars.iv.i437 = phi i64 [ 0, %ibf_dump_write_small_value.exit436 ], [ %indvars.iv.next.i440, %1372 ] %.01617.i438 = phi i64 [ %.pre-phi.i158, %ibf_dump_write_small_value.exit436 ], [ %1376, %1372 ] - %1370 = sub nuw nsw i64 7, %indvars.iv.i437 + %1370 = xor i64 %indvars.iv.i437, 7 %1371 = lshr i64 %.01617.i438, %1370 %.not.i439 = icmp eq i64 %1371, 0 br i1 %.not.i439, label %.critedge.split.loop.exit20.i448, label %1372 @@ -77754,7 +77754,7 @@ ibf_dump_write_small_value.exit449: ; preds = %.critedge.i442 1398: ; preds = %1401, %ibf_dump_write_small_value.exit449 %indvars.iv.i450 = phi i64 [ 0, %ibf_dump_write_small_value.exit449 ], [ %indvars.iv.next.i453, %1401 ] %.01617.i451 = phi i64 [ %.pre-phi.i164, %ibf_dump_write_small_value.exit449 ], [ %1405, %1401 ] - %1399 = sub nuw nsw i64 7, %indvars.iv.i450 + %1399 = xor i64 %indvars.iv.i450, 7 %1400 = lshr i64 %.01617.i451, %1399 %.not.i452 = icmp eq i64 %1400, 0 br i1 %.not.i452, label %.critedge.split.loop.exit20.i461, label %1401 @@ -77815,7 +77815,7 @@ ibf_dump_write_small_value.exit462: ; preds = %.critedge.i455 1430: ; preds = %1433, %ibf_dump_write_small_value.exit462 %indvars.iv.i463 = phi i64 [ 0, %ibf_dump_write_small_value.exit462 ], [ %indvars.iv.next.i466, %1433 ] %.01617.i464 = phi i64 [ %1429, %ibf_dump_write_small_value.exit462 ], [ %1437, %1433 ] - %1431 = sub nuw nsw i64 7, %indvars.iv.i463 + %1431 = xor i64 %indvars.iv.i463, 7 %1432 = lshr i64 %.01617.i464, %1431 %.not.i465 = icmp eq i64 %1432, 0 br i1 %.not.i465, label %.critedge.split.loop.exit20.i474, label %1433 @@ -77876,7 +77876,7 @@ ibf_dump_write_small_value.exit475: ; preds = %.critedge.i468 1462: ; preds = %1465, %ibf_dump_write_small_value.exit475 %indvars.iv.i476 = phi i64 [ 0, %ibf_dump_write_small_value.exit475 ], [ %indvars.iv.next.i479, %1465 ] %.01617.i477 = phi i64 [ %1461, %ibf_dump_write_small_value.exit475 ], [ %1469, %1465 ] - %1463 = sub nuw nsw i64 7, %indvars.iv.i476 + %1463 = xor i64 %indvars.iv.i476, 7 %1464 = lshr i64 %.01617.i477, %1463 %.not.i478 = icmp eq i64 %1464, 0 br i1 %.not.i478, label %.critedge.split.loop.exit20.i487, label %1465 @@ -77937,7 +77937,7 @@ ibf_dump_write_small_value.exit488: ; preds = %.critedge.i481 1494: ; preds = %1497, %ibf_dump_write_small_value.exit488 %indvars.iv.i489 = phi i64 [ 0, %ibf_dump_write_small_value.exit488 ], [ %indvars.iv.next.i492, %1497 ] %.01617.i490 = phi i64 [ %1493, %ibf_dump_write_small_value.exit488 ], [ %1501, %1497 ] - %1495 = sub nuw nsw i64 7, %indvars.iv.i489 + %1495 = xor i64 %indvars.iv.i489, 7 %1496 = lshr i64 %.01617.i490, %1495 %.not.i491 = icmp eq i64 %1496, 0 br i1 %.not.i491, label %.critedge.split.loop.exit20.i500, label %1497 @@ -77998,7 +77998,7 @@ ibf_dump_write_small_value.exit501: ; preds = %.critedge.i494 1526: ; preds = %1529, %ibf_dump_write_small_value.exit501 %indvars.iv.i502 = phi i64 [ 0, %ibf_dump_write_small_value.exit501 ], [ %indvars.iv.next.i505, %1529 ] %.01617.i503 = phi i64 [ %1525, %ibf_dump_write_small_value.exit501 ], [ %1533, %1529 ] - %1527 = sub nuw nsw i64 7, %indvars.iv.i502 + %1527 = xor i64 %indvars.iv.i502, 7 %1528 = lshr i64 %.01617.i503, %1527 %.not.i504 = icmp eq i64 %1528, 0 br i1 %.not.i504, label %.critedge.split.loop.exit20.i513, label %1529 @@ -78059,7 +78059,7 @@ ibf_dump_write_small_value.exit514: ; preds = %.critedge.i507 1558: ; preds = %1561, %ibf_dump_write_small_value.exit514 %indvars.iv.i515 = phi i64 [ 0, %ibf_dump_write_small_value.exit514 ], [ %indvars.iv.next.i518, %1561 ] %.01617.i516 = phi i64 [ %1557, %ibf_dump_write_small_value.exit514 ], [ %1565, %1561 ] - %1559 = sub nuw nsw i64 7, %indvars.iv.i515 + %1559 = xor i64 %indvars.iv.i515, 7 %1560 = lshr i64 %.01617.i516, %1559 %.not.i517 = icmp eq i64 %1560, 0 br i1 %.not.i517, label %.critedge.split.loop.exit20.i526, label %1561 @@ -78120,7 +78120,7 @@ ibf_dump_write_small_value.exit527: ; preds = %.critedge.i520 1590: ; preds = %1593, %ibf_dump_write_small_value.exit527 %indvars.iv.i528 = phi i64 [ 0, %ibf_dump_write_small_value.exit527 ], [ %indvars.iv.next.i531, %1593 ] %.01617.i529 = phi i64 [ %1589, %ibf_dump_write_small_value.exit527 ], [ %1597, %1593 ] - %1591 = sub nuw nsw i64 7, %indvars.iv.i528 + %1591 = xor i64 %indvars.iv.i528, 7 %1592 = lshr i64 %.01617.i529, %1591 %.not.i530 = icmp eq i64 %1592, 0 br i1 %.not.i530, label %.critedge.split.loop.exit20.i539, label %1593 @@ -78180,7 +78180,7 @@ ibf_dump_write_small_value.exit540: ; preds = %.critedge.i533 1621: ; preds = %1624, %ibf_dump_write_small_value.exit540 %indvars.iv.i541 = phi i64 [ 0, %ibf_dump_write_small_value.exit540 ], [ %indvars.iv.next.i544, %1624 ] %.01617.i542 = phi i64 [ %1620, %ibf_dump_write_small_value.exit540 ], [ %1628, %1624 ] - %1622 = sub nuw nsw i64 7, %indvars.iv.i541 + %1622 = xor i64 %indvars.iv.i541, 7 %1623 = lshr i64 %.01617.i542, %1622 %.not.i543 = icmp eq i64 %1623, 0 br i1 %.not.i543, label %.critedge.split.loop.exit20.i552, label %1624 @@ -78240,7 +78240,7 @@ ibf_dump_write_small_value.exit553: ; preds = %.critedge.i546 1652: ; preds = %1655, %ibf_dump_write_small_value.exit553 %indvars.iv.i554 = phi i64 [ 0, %ibf_dump_write_small_value.exit553 ], [ %indvars.iv.next.i557, %1655 ] %.01617.i555 = phi i64 [ %1651, %ibf_dump_write_small_value.exit553 ], [ %1659, %1655 ] - %1653 = sub nuw nsw i64 7, %indvars.iv.i554 + %1653 = xor i64 %indvars.iv.i554, 7 %1654 = lshr i64 %.01617.i555, %1653 %.not.i556 = icmp eq i64 %1654, 0 br i1 %.not.i556, label %.critedge.split.loop.exit20.i565, label %1655 @@ -78300,7 +78300,7 @@ ibf_dump_write_small_value.exit566: ; preds = %.critedge.i559 1683: ; preds = %1686, %ibf_dump_write_small_value.exit566 %indvars.iv.i567 = phi i64 [ 0, %ibf_dump_write_small_value.exit566 ], [ %indvars.iv.next.i570, %1686 ] %.01617.i568 = phi i64 [ %1682, %ibf_dump_write_small_value.exit566 ], [ %1690, %1686 ] - %1684 = sub nuw nsw i64 7, %indvars.iv.i567 + %1684 = xor i64 %indvars.iv.i567, 7 %1685 = lshr i64 %.01617.i568, %1684 %.not.i569 = icmp eq i64 %1685, 0 br i1 %.not.i569, label %.critedge.split.loop.exit20.i578, label %1686 @@ -78360,7 +78360,7 @@ ibf_dump_write_small_value.exit579: ; preds = %.critedge.i572 1714: ; preds = %1717, %ibf_dump_write_small_value.exit579 %indvars.iv.i580 = phi i64 [ 0, %ibf_dump_write_small_value.exit579 ], [ %indvars.iv.next.i583, %1717 ] %.01617.i581 = phi i64 [ %1713, %ibf_dump_write_small_value.exit579 ], [ %1721, %1717 ] - %1715 = sub nuw nsw i64 7, %indvars.iv.i580 + %1715 = xor i64 %indvars.iv.i580, 7 %1716 = lshr i64 %.01617.i581, %1715 %.not.i582 = icmp eq i64 %1716, 0 br i1 %.not.i582, label %.critedge.split.loop.exit20.i591, label %1717 @@ -78418,7 +78418,7 @@ ibf_dump_write_small_value.exit592: ; preds = %.critedge.i585 1743: ; preds = %1746, %ibf_dump_write_small_value.exit592 %indvars.iv.i593 = phi i64 [ 0, %ibf_dump_write_small_value.exit592 ], [ %indvars.iv.next.i596, %1746 ] %.01617.i594 = phi i64 [ %579, %ibf_dump_write_small_value.exit592 ], [ %1750, %1746 ] - %1744 = sub nuw nsw i64 7, %indvars.iv.i593 + %1744 = xor i64 %indvars.iv.i593, 7 %1745 = lshr i64 %.01617.i594, %1744 %.not.i595 = icmp eq i64 %1745, 0 br i1 %.not.i595, label %.critedge.split.loop.exit20.i604, label %1746 @@ -78478,7 +78478,7 @@ ibf_dump_write_small_value.exit605: ; preds = %.critedge.i598 1774: ; preds = %1777, %ibf_dump_write_small_value.exit605 %indvars.iv.i606 = phi i64 [ 0, %ibf_dump_write_small_value.exit605 ], [ %indvars.iv.next.i609, %1777 ] %.01617.i607 = phi i64 [ %1773, %ibf_dump_write_small_value.exit605 ], [ %1781, %1777 ] - %1775 = sub nuw nsw i64 7, %indvars.iv.i606 + %1775 = xor i64 %indvars.iv.i606, 7 %1776 = lshr i64 %.01617.i607, %1775 %.not.i608 = icmp eq i64 %1776, 0 br i1 %.not.i608, label %.critedge.split.loop.exit20.i617, label %1777 @@ -78538,7 +78538,7 @@ ibf_dump_write_small_value.exit618: ; preds = %.critedge.i611 1804: ; preds = %1807, %ibf_dump_write_small_value.exit618 %indvars.iv.i619 = phi i64 [ 0, %ibf_dump_write_small_value.exit618 ], [ %indvars.iv.next.i622, %1807 ] %.01617.i620 = phi i64 [ %1803, %ibf_dump_write_small_value.exit618 ], [ %1811, %1807 ] - %1805 = sub nuw nsw i64 7, %indvars.iv.i619 + %1805 = xor i64 %indvars.iv.i619, 7 %1806 = lshr i64 %.01617.i620, %1805 %.not.i621 = icmp eq i64 %1806, 0 br i1 %.not.i621, label %.critedge.split.loop.exit20.i630, label %1807 @@ -78598,7 +78598,7 @@ ibf_dump_write_small_value.exit631: ; preds = %.critedge.i624 1834: ; preds = %1837, %ibf_dump_write_small_value.exit631 %indvars.iv.i632 = phi i64 [ 0, %ibf_dump_write_small_value.exit631 ], [ %indvars.iv.next.i635, %1837 ] %.01617.i633 = phi i64 [ %1833, %ibf_dump_write_small_value.exit631 ], [ %1841, %1837 ] - %1835 = sub nuw nsw i64 7, %indvars.iv.i632 + %1835 = xor i64 %indvars.iv.i632, 7 %1836 = lshr i64 %.01617.i633, %1835 %.not.i634 = icmp eq i64 %1836, 0 br i1 %.not.i634, label %.critedge.split.loop.exit20.i643, label %1837 @@ -78658,7 +78658,7 @@ ibf_dump_write_small_value.exit644: ; preds = %.critedge.i637 1864: ; preds = %1867, %ibf_dump_write_small_value.exit644 %indvars.iv.i645 = phi i64 [ 0, %ibf_dump_write_small_value.exit644 ], [ %indvars.iv.next.i648, %1867 ] %.01617.i646 = phi i64 [ %1863, %ibf_dump_write_small_value.exit644 ], [ %1871, %1867 ] - %1865 = sub nuw nsw i64 7, %indvars.iv.i645 + %1865 = xor i64 %indvars.iv.i645, 7 %1866 = lshr i64 %.01617.i646, %1865 %.not.i647 = icmp eq i64 %1866, 0 br i1 %.not.i647, label %.critedge.split.loop.exit20.i656, label %1867 @@ -78718,7 +78718,7 @@ ibf_dump_write_small_value.exit657: ; preds = %.critedge.i650 1895: ; preds = %1898, %ibf_dump_write_small_value.exit657 %indvars.iv.i658 = phi i64 [ 0, %ibf_dump_write_small_value.exit657 ], [ %indvars.iv.next.i661, %1898 ] %.01617.i659 = phi i64 [ %1894, %ibf_dump_write_small_value.exit657 ], [ %1902, %1898 ] - %1896 = sub nuw nsw i64 7, %indvars.iv.i658 + %1896 = xor i64 %indvars.iv.i658, 7 %1897 = lshr i64 %.01617.i659, %1896 %.not.i660 = icmp eq i64 %1897, 0 br i1 %.not.i660, label %.critedge.split.loop.exit20.i669, label %1898 @@ -78778,7 +78778,7 @@ ibf_dump_write_small_value.exit670: ; preds = %.critedge.i663 1926: ; preds = %1929, %ibf_dump_write_small_value.exit670 %indvars.iv.i671 = phi i64 [ 0, %ibf_dump_write_small_value.exit670 ], [ %indvars.iv.next.i674, %1929 ] %.01617.i672 = phi i64 [ %1925, %ibf_dump_write_small_value.exit670 ], [ %1933, %1929 ] - %1927 = sub nuw nsw i64 7, %indvars.iv.i671 + %1927 = xor i64 %indvars.iv.i671, 7 %1928 = lshr i64 %.01617.i672, %1927 %.not.i673 = icmp eq i64 %1928, 0 br i1 %.not.i673, label %.critedge.split.loop.exit20.i682, label %1929 @@ -78838,7 +78838,7 @@ ibf_dump_write_small_value.exit683: ; preds = %.critedge.i676 1957: ; preds = %1960, %ibf_dump_write_small_value.exit683 %indvars.iv.i684 = phi i64 [ 0, %ibf_dump_write_small_value.exit683 ], [ %indvars.iv.next.i687, %1960 ] %.01617.i685 = phi i64 [ %1956, %ibf_dump_write_small_value.exit683 ], [ %1964, %1960 ] - %1958 = sub nuw nsw i64 7, %indvars.iv.i684 + %1958 = xor i64 %indvars.iv.i684, 7 %1959 = lshr i64 %.01617.i685, %1958 %.not.i686 = icmp eq i64 %1959, 0 br i1 %.not.i686, label %.critedge.split.loop.exit20.i695, label %1960 @@ -78899,7 +78899,7 @@ ibf_dump_write_small_value.exit696: ; preds = %.critedge.i689 1989: ; preds = %1992, %ibf_dump_write_small_value.exit696 %indvars.iv.i697 = phi i64 [ 0, %ibf_dump_write_small_value.exit696 ], [ %indvars.iv.next.i700, %1992 ] %.01617.i698 = phi i64 [ %1988, %ibf_dump_write_small_value.exit696 ], [ %1996, %1992 ] - %1990 = sub nuw nsw i64 7, %indvars.iv.i697 + %1990 = xor i64 %indvars.iv.i697, 7 %1991 = lshr i64 %.01617.i698, %1990 %.not.i699 = icmp eq i64 %1991, 0 br i1 %.not.i699, label %.critedge.split.loop.exit20.i708, label %1992 @@ -78960,7 +78960,7 @@ ibf_dump_write_small_value.exit709: ; preds = %.critedge.i702 2021: ; preds = %2024, %ibf_dump_write_small_value.exit709 %indvars.iv.i710 = phi i64 [ 0, %ibf_dump_write_small_value.exit709 ], [ %indvars.iv.next.i713, %2024 ] %.01617.i711 = phi i64 [ %2020, %ibf_dump_write_small_value.exit709 ], [ %2028, %2024 ] - %2022 = sub nuw nsw i64 7, %indvars.iv.i710 + %2022 = xor i64 %indvars.iv.i710, 7 %2023 = lshr i64 %.01617.i711, %2022 %.not.i712 = icmp eq i64 %2023, 0 br i1 %.not.i712, label %.critedge.split.loop.exit20.i721, label %2024 @@ -79021,7 +79021,7 @@ ibf_dump_write_small_value.exit722: ; preds = %.critedge.i715 2053: ; preds = %2056, %ibf_dump_write_small_value.exit722 %indvars.iv.i723 = phi i64 [ 0, %ibf_dump_write_small_value.exit722 ], [ %indvars.iv.next.i726, %2056 ] %.01617.i724 = phi i64 [ %2052, %ibf_dump_write_small_value.exit722 ], [ %2060, %2056 ] - %2054 = sub nuw nsw i64 7, %indvars.iv.i723 + %2054 = xor i64 %indvars.iv.i723, 7 %2055 = lshr i64 %.01617.i724, %2054 %.not.i725 = icmp eq i64 %2055, 0 br i1 %.not.i725, label %.critedge.split.loop.exit20.i734, label %2056 @@ -79082,7 +79082,7 @@ ibf_dump_write_small_value.exit735: ; preds = %.critedge.i728 2085: ; preds = %2088, %ibf_dump_write_small_value.exit735 %indvars.iv.i736 = phi i64 [ 0, %ibf_dump_write_small_value.exit735 ], [ %indvars.iv.next.i739, %2088 ] %.01617.i737 = phi i64 [ %2084, %ibf_dump_write_small_value.exit735 ], [ %2092, %2088 ] - %2086 = sub nuw nsw i64 7, %indvars.iv.i736 + %2086 = xor i64 %indvars.iv.i736, 7 %2087 = lshr i64 %.01617.i737, %2086 %.not.i738 = icmp eq i64 %2087, 0 br i1 %.not.i738, label %.critedge.split.loop.exit20.i747, label %2088 @@ -79143,7 +79143,7 @@ ibf_dump_write_small_value.exit748: ; preds = %.critedge.i741 2117: ; preds = %2120, %ibf_dump_write_small_value.exit748 %indvars.iv.i749 = phi i64 [ 0, %ibf_dump_write_small_value.exit748 ], [ %indvars.iv.next.i752, %2120 ] %.01617.i750 = phi i64 [ %2116, %ibf_dump_write_small_value.exit748 ], [ %2124, %2120 ] - %2118 = sub nuw nsw i64 7, %indvars.iv.i749 + %2118 = xor i64 %indvars.iv.i749, 7 %2119 = lshr i64 %.01617.i750, %2118 %.not.i751 = icmp eq i64 %2119, 0 br i1 %.not.i751, label %.critedge.split.loop.exit20.i760, label %2120 @@ -79204,7 +79204,7 @@ ibf_dump_write_small_value.exit761: ; preds = %.critedge.i754 2149: ; preds = %2152, %ibf_dump_write_small_value.exit761 %indvars.iv.i762 = phi i64 [ 0, %ibf_dump_write_small_value.exit761 ], [ %indvars.iv.next.i765, %2152 ] %.01617.i763 = phi i64 [ %2148, %ibf_dump_write_small_value.exit761 ], [ %2156, %2152 ] - %2150 = sub nuw nsw i64 7, %indvars.iv.i762 + %2150 = xor i64 %indvars.iv.i762, 7 %2151 = lshr i64 %.01617.i763, %2150 %.not.i764 = icmp eq i64 %2151, 0 br i1 %.not.i764, label %.critedge.split.loop.exit20.i773, label %2152 @@ -79265,7 +79265,7 @@ ibf_dump_write_small_value.exit774: ; preds = %.critedge.i767 2181: ; preds = %2184, %ibf_dump_write_small_value.exit774 %indvars.iv.i775 = phi i64 [ 0, %ibf_dump_write_small_value.exit774 ], [ %indvars.iv.next.i778, %2184 ] %.01617.i776 = phi i64 [ %2180, %ibf_dump_write_small_value.exit774 ], [ %2188, %2184 ] - %2182 = sub nuw nsw i64 7, %indvars.iv.i775 + %2182 = xor i64 %indvars.iv.i775, 7 %2183 = lshr i64 %.01617.i776, %2182 %.not.i777 = icmp eq i64 %2183, 0 br i1 %.not.i777, label %.critedge.split.loop.exit20.i786, label %2184 @@ -79326,7 +79326,7 @@ ibf_dump_write_small_value.exit787: ; preds = %.critedge.i780 2213: ; preds = %2216, %ibf_dump_write_small_value.exit787 %indvars.iv.i788 = phi i64 [ 0, %ibf_dump_write_small_value.exit787 ], [ %indvars.iv.next.i791, %2216 ] %.01617.i789 = phi i64 [ %2212, %ibf_dump_write_small_value.exit787 ], [ %2220, %2216 ] - %2214 = sub nuw nsw i64 7, %indvars.iv.i788 + %2214 = xor i64 %indvars.iv.i788, 7 %2215 = lshr i64 %.01617.i789, %2214 %.not.i790 = icmp eq i64 %2215, 0 br i1 %.not.i790, label %.critedge.split.loop.exit20.i799, label %2216 @@ -79828,7 +79828,7 @@ ibf_dump_pos.exit.preheader: ; preds = %._crit_edge 60: ; preds = %63, %56 %indvars.iv.i = phi i64 [ 0, %56 ], [ %indvars.iv.next.i, %63 ] %.01617.i = phi i64 [ %59, %56 ], [ %67, %63 ] - %61 = sub nuw nsw i64 7, %indvars.iv.i + %61 = xor i64 %indvars.iv.i, 7 %62 = lshr i64 %.01617.i, %61 %.not.i = icmp eq i64 %62, 0 br i1 %.not.i, label %.critedge.split.loop.exit20.i, label %63 @@ -79888,7 +79888,7 @@ ibf_dump_write_small_value.exit: ; preds = %.critedge.i 91: ; preds = %94, %ibf_dump_write_small_value.exit %indvars.iv.i38 = phi i64 [ 0, %ibf_dump_write_small_value.exit ], [ %indvars.iv.next.i41, %94 ] %.01617.i39 = phi i64 [ %90, %ibf_dump_write_small_value.exit ], [ %98, %94 ] - %92 = sub nuw nsw i64 7, %indvars.iv.i38 + %92 = xor i64 %indvars.iv.i38, 7 %93 = lshr i64 %.01617.i39, %92 %.not.i40 = icmp eq i64 %93, 0 br i1 %.not.i40, label %.critedge.split.loop.exit20.i48, label %94 @@ -79948,7 +79948,7 @@ ibf_dump_write_small_value.exit49: ; preds = %.critedge.i43 122: ; preds = %125, %ibf_dump_write_small_value.exit49 %indvars.iv.i50 = phi i64 [ 0, %ibf_dump_write_small_value.exit49 ], [ %indvars.iv.next.i53, %125 ] %.01617.i51 = phi i64 [ %121, %ibf_dump_write_small_value.exit49 ], [ %129, %125 ] - %123 = sub nuw nsw i64 7, %indvars.iv.i50 + %123 = xor i64 %indvars.iv.i50, 7 %124 = lshr i64 %.01617.i51, %123 %.not.i52 = icmp eq i64 %124, 0 br i1 %.not.i52, label %.critedge.split.loop.exit20.i60, label %125 @@ -80008,7 +80008,7 @@ ibf_dump_write_small_value.exit61: ; preds = %.critedge.i55 153: ; preds = %156, %ibf_dump_write_small_value.exit61 %indvars.iv.i62 = phi i64 [ 0, %ibf_dump_write_small_value.exit61 ], [ %indvars.iv.next.i65, %156 ] %.01617.i63 = phi i64 [ %152, %ibf_dump_write_small_value.exit61 ], [ %160, %156 ] - %154 = sub nuw nsw i64 7, %indvars.iv.i62 + %154 = xor i64 %indvars.iv.i62, 7 %155 = lshr i64 %.01617.i63, %154 %.not.i64 = icmp eq i64 %155, 0 br i1 %.not.i64, label %.critedge.split.loop.exit20.i72, label %156 @@ -80068,7 +80068,7 @@ ibf_dump_write_small_value.exit73: ; preds = %.critedge.i67 184: ; preds = %187, %ibf_dump_write_small_value.exit73 %indvars.iv.i74 = phi i64 [ 0, %ibf_dump_write_small_value.exit73 ], [ %indvars.iv.next.i77, %187 ] %.01617.i75 = phi i64 [ %183, %ibf_dump_write_small_value.exit73 ], [ %191, %187 ] - %185 = sub nuw nsw i64 7, %indvars.iv.i74 + %185 = xor i64 %indvars.iv.i74, 7 %186 = lshr i64 %.01617.i75, %185 %.not.i76 = icmp eq i64 %186, 0 br i1 %.not.i76, label %.critedge.split.loop.exit20.i84, label %187 @@ -80128,7 +80128,7 @@ ibf_dump_write_small_value.exit85: ; preds = %.critedge.i79 215: ; preds = %218, %ibf_dump_write_small_value.exit85 %indvars.iv.i86 = phi i64 [ 0, %ibf_dump_write_small_value.exit85 ], [ %indvars.iv.next.i89, %218 ] %.01617.i87 = phi i64 [ %214, %ibf_dump_write_small_value.exit85 ], [ %222, %218 ] - %216 = sub nuw nsw i64 7, %indvars.iv.i86 + %216 = xor i64 %indvars.iv.i86, 7 %217 = lshr i64 %.01617.i87, %216 %.not.i88 = icmp eq i64 %217, 0 br i1 %.not.i88, label %.critedge.split.loop.exit20.i96, label %218 @@ -80243,7 +80243,7 @@ ibf_dump_pos.exit: ; preds = %1 18: ; preds = %21, %16 %indvars.iv.i = phi i64 [ 0, %16 ], [ %indvars.iv.next.i, %21 ] %.01617.i = phi i64 [ %17, %16 ], [ %25, %21 ] - %19 = sub nuw nsw i64 7, %indvars.iv.i + %19 = xor i64 %indvars.iv.i, 7 %20 = lshr i64 %.01617.i, %19 %.not.i = icmp eq i64 %20, 0 br i1 %.not.i, label %.critedge.split.loop.exit20.i, label %21 @@ -80372,7 +80372,7 @@ ibf_dump_id.exit: ; preds = %60, %66, %.ibf_tabl 82: ; preds = %85, %ibf_dump_id.exit %indvars.iv.i34 = phi i64 [ 0, %ibf_dump_id.exit ], [ %indvars.iv.next.i37, %85 ] %.01617.i35 = phi i64 [ %.0.i, %ibf_dump_id.exit ], [ %89, %85 ] - %83 = sub nuw nsw i64 7, %indvars.iv.i34 + %83 = xor i64 %indvars.iv.i34, 7 %84 = lshr i64 %.01617.i35, %83 %.not.i36 = icmp eq i64 %84, 0 br i1 %.not.i36, label %.critedge.split.loop.exit20.i44, label %85 @@ -80429,7 +80429,7 @@ ibf_dump_write_small_value.exit45: ; preds = %.critedge.i39 110: ; preds = %113, %ibf_dump_write_small_value.exit45 %indvars.iv.i46 = phi i64 [ 0, %ibf_dump_write_small_value.exit45 ], [ %indvars.iv.next.i49, %113 ] %.01617.i47 = phi i64 [ %64, %ibf_dump_write_small_value.exit45 ], [ %117, %113 ] - %111 = sub nuw nsw i64 7, %indvars.iv.i46 + %111 = xor i64 %indvars.iv.i46, 7 %112 = lshr i64 %.01617.i47, %111 %.not.i48 = icmp eq i64 %112, 0 br i1 %.not.i48, label %.critedge.split.loop.exit20.i56, label %113 @@ -80613,7 +80613,7 @@ ibf_dump_object_object_header.exit.i: ; preds = %33 41: ; preds = %44, %ibf_dump_object_object_header.exit.i %indvars.iv.i.i = phi i64 [ 0, %ibf_dump_object_object_header.exit.i ], [ %indvars.iv.next.i.i, %44 ] %.01617.i.i = phi i64 [ %0, %ibf_dump_object_object_header.exit.i ], [ %48, %44 ] - %42 = sub nuw nsw i64 7, %indvars.iv.i.i + %42 = xor i64 %indvars.iv.i.i, 7 %43 = lshr i64 %.01617.i.i, %42 %.not.i45.i = icmp eq i64 %43, 0 br i1 %.not.i45.i, label %.critedge.split.loop.exit20.i.i, label %44 @@ -80902,7 +80902,7 @@ ibf_dump_object.exit: ; preds = %.ibf_table_find_or_ 34: ; preds = %37, %33 %indvars.iv.i = phi i64 [ 0, %33 ], [ %indvars.iv.next.i, %37 ] %.01617.i = phi i64 [ %.0, %33 ], [ %41, %37 ] - %35 = sub nuw nsw i64 7, %indvars.iv.i + %35 = xor i64 %indvars.iv.i, 7 %36 = lshr i64 %.01617.i, %35 %.not.i = icmp eq i64 %36, 0 br i1 %.not.i, label %.critedge.split.loop.exit20.i, label %37 @@ -80961,7 +80961,7 @@ ibf_dump_write_small_value.exit: ; preds = %.critedge.i 64: ; preds = %67, %ibf_dump_write_small_value.exit %indvars.iv.i17 = phi i64 [ 0, %ibf_dump_write_small_value.exit ], [ %indvars.iv.next.i20, %67 ] %.01617.i18 = phi i64 [ %10, %ibf_dump_write_small_value.exit ], [ %71, %67 ] - %65 = sub nuw nsw i64 7, %indvars.iv.i17 + %65 = xor i64 %indvars.iv.i17, 7 %66 = lshr i64 %.01617.i18, %65 %.not.i19 = icmp eq i64 %66, 0 br i1 %.not.i19, label %.critedge.split.loop.exit20.i27, label %67 @@ -81093,7 +81093,7 @@ ibf_dump_write_byte.exit: ; preds = %ibf_dump_object.exi 30: ; preds = %33, %ibf_dump_write_byte.exit %indvars.iv.i = phi i64 [ 0, %ibf_dump_write_byte.exit ], [ %indvars.iv.next.i, %33 ] %.01617.i = phi i64 [ %.pre-phi.i, %ibf_dump_write_byte.exit ], [ %37, %33 ] - %31 = sub nuw nsw i64 7, %indvars.iv.i + %31 = xor i64 %indvars.iv.i, 7 %32 = lshr i64 %.01617.i, %31 %.not.i = icmp eq i64 %32, 0 br i1 %.not.i, label %.critedge.split.loop.exit20.i, label %33 @@ -81177,7 +81177,7 @@ rb_array_len.exit: ; preds = %9, %12 15: ; preds = %18, %rb_array_len.exit %indvars.iv.i = phi i64 [ 0, %rb_array_len.exit ], [ %indvars.iv.next.i, %18 ] %.01617.i = phi i64 [ %.0.i, %rb_array_len.exit ], [ %22, %18 ] - %16 = sub nuw nsw i64 7, %indvars.iv.i + %16 = xor i64 %indvars.iv.i, 7 %17 = lshr i64 %.01617.i, %16 %.not.i10 = icmp eq i64 %17, 0 br i1 %.not.i10, label %.critedge.split.loop.exit20.i, label %18 @@ -81287,7 +81287,7 @@ ibf_dump_object.exit: ; preds = %.ibf_table_find_or_ 67: ; preds = %70, %ibf_dump_object.exit %indvars.iv.i11 = phi i64 [ 0, %ibf_dump_object.exit ], [ %indvars.iv.next.i14, %70 ] %.01617.i12 = phi i64 [ %.pre-phi.i, %ibf_dump_object.exit ], [ %74, %70 ] - %68 = sub nuw nsw i64 7, %indvars.iv.i11 + %68 = xor i64 %indvars.iv.i11, 7 %69 = lshr i64 %.01617.i12, %68 %.not.i13 = icmp eq i64 %69, 0 br i1 %.not.i13, label %.critedge.split.loop.exit20.i21, label %70 @@ -81375,7 +81375,7 @@ RHASH_SIZE.exit: ; preds = %7, %10 15: ; preds = %18, %RHASH_SIZE.exit %indvars.iv.i = phi i64 [ 0, %RHASH_SIZE.exit ], [ %indvars.iv.next.i, %18 ] %.01617.i = phi i64 [ %.0.i, %RHASH_SIZE.exit ], [ %22, %18 ] - %16 = sub nuw nsw i64 7, %indvars.iv.i + %16 = xor i64 %indvars.iv.i, 7 %17 = lshr i64 %.01617.i, %16 %.not.i = icmp eq i64 %17, 0 br i1 %.not.i, label %.critedge.split.loop.exit20.i, label %18 @@ -81845,7 +81845,7 @@ ibf_dump_object.exit14: ; preds = %.ibf_table_find_or_ 32: ; preds = %35, %ibf_dump_object.exit14 %indvars.iv.i = phi i64 [ 0, %ibf_dump_object.exit14 ], [ %indvars.iv.next.i, %35 ] %.01617.i = phi i64 [ %.pre-phi.i, %ibf_dump_object.exit14 ], [ %39, %35 ] - %33 = sub nuw nsw i64 7, %indvars.iv.i + %33 = xor i64 %indvars.iv.i, 7 %34 = lshr i64 %.01617.i, %33 %.not.i = icmp eq i64 %34, 0 br i1 %.not.i, label %.critedge.split.loop.exit20.i, label %35 @@ -81903,7 +81903,7 @@ ibf_dump_write_small_value.exit: ; preds = %.critedge.i 61: ; preds = %64, %ibf_dump_write_small_value.exit %indvars.iv.i15 = phi i64 [ 0, %ibf_dump_write_small_value.exit ], [ %indvars.iv.next.i18, %64 ] %.01617.i16 = phi i64 [ %.pre-phi.i12, %ibf_dump_write_small_value.exit ], [ %68, %64 ] - %62 = sub nuw nsw i64 7, %indvars.iv.i15 + %62 = xor i64 %indvars.iv.i15, 7 %63 = lshr i64 %.01617.i16, %62 %.not.i17 = icmp eq i64 %63, 0 br i1 %.not.i17, label %.critedge.split.loop.exit20.i25, label %64 diff --git a/bench/slurm/optimized/gpu_nvml.ll b/bench/slurm/optimized/gpu_nvml.ll index 41779a2bfc2..aa564469e44 100644 --- a/bench/slurm/optimized/gpu_nvml.ll +++ b/bench/slurm/optimized/gpu_nvml.ll @@ -2487,7 +2487,7 @@ define ptr @gpu_p_test_cpu_conv(ptr noundef %0) local_unnamed_addr #0 { 8: ; preds = %7 %9 = tail call i32 (ptr, ...) @slurm_error(ptr noundef nonnull @.str.6) #12 %10 = tail call ptr @slurm_xstrdup(ptr noundef nonnull @.str.7) #12 - br label %66 + br label %67 11: ; preds = %7 %12 = load i8, ptr %0, align 1 @@ -2506,7 +2506,7 @@ define ptr @gpu_p_test_cpu_conv(ptr noundef %0) local_unnamed_addr #0 { 15: ; preds = %11 %16 = tail call i32 (ptr, ...) @slurm_error(ptr noundef nonnull @.str.8) #12 %17 = tail call ptr @slurm_xstrdup(ptr noundef nonnull @.str.7) #12 - br label %66 + br label %67 18: ; preds = %.preheader48.preheader %19 = tail call i32 @slurm_xstrcmp(ptr noundef nonnull %0, ptr noundef nonnull @.str.10) #12 @@ -2548,7 +2548,7 @@ define ptr @gpu_p_test_cpu_conv(ptr noundef %0) local_unnamed_addr #0 { %34 = getelementptr inbounds nuw i8, ptr %0, i64 1 %35 = load i8, ptr %34, align 1 %36 = icmp eq i8 %35, 88 - br i1 %36, label %37, label %47 + br i1 %36, label %37, label %48 37: ; preds = %33 %38 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %34) #14 @@ -2569,59 +2569,60 @@ define ptr @gpu_p_test_cpu_conv(ptr noundef %0) local_unnamed_addr #0 { %44 = shl nuw nsw i64 %spec.select45, 3 %scevgep = getelementptr i8, ptr %2, i64 %44 %45 = shl nuw nsw i64 %spec.select45, 3 - %46 = sub nuw nsw i64 4096, %45 - call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 0, i64 %46, i1 false) + %46 = xor i64 %45, 4088 + %47 = add nuw nsw i64 %46, 8 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %47, i1 false) br label %.loopexit.preheader -47: ; preds = %33 - %48 = tail call i32 (ptr, ...) @slurm_error(ptr noundef nonnull @.str.14) #12 - %49 = tail call ptr @slurm_xstrdup(ptr noundef nonnull @.str.7) #12 - br label %66 +48: ; preds = %33 + %49 = tail call i32 (ptr, ...) @slurm_error(ptr noundef nonnull @.str.14) #12 + %50 = tail call ptr @slurm_xstrdup(ptr noundef nonnull @.str.7) #12 + br label %67 -.loopexit: ; preds = %.loopexit.preheader, %61 - %indvars.iv = phi i64 [ %indvars.iv.next, %61 ], [ 0, %.loopexit.preheader ] - %50 = getelementptr inbounds nuw [512 x i64], ptr %2, i64 0, i64 %indvars.iv - %51 = load i64, ptr %50, align 8 - %52 = and i64 %51, 4294967295 - %53 = icmp eq i64 %52, 4294967295 - br i1 %53, label %54, label %55 +.loopexit: ; preds = %.loopexit.preheader, %62 + %indvars.iv = phi i64 [ %indvars.iv.next, %62 ], [ 0, %.loopexit.preheader ] + %51 = getelementptr inbounds nuw [512 x i64], ptr %2, i64 0, i64 %indvars.iv + %52 = load i64, ptr %51, align 8 + %53 = and i64 %52, 4294967295 + %54 = icmp eq i64 %53, 4294967295 + br i1 %54, label %55, label %56 -54: ; preds = %.loopexit +55: ; preds = %.loopexit %putchar44 = tail call i32 @putchar(i32 88) - br label %61 + br label %62 -55: ; preds = %.loopexit - %56 = icmp ugt i64 %51, 9 - br i1 %56, label %57, label %59 +56: ; preds = %.loopexit + %57 = icmp ugt i64 %52, 9 + br i1 %57, label %58, label %60 -57: ; preds = %55 - %58 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i64 noundef %51) - br label %61 +58: ; preds = %56 + %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i64 noundef %52) + br label %62 -59: ; preds = %55 - %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i64 noundef %51) - br label %61 +60: ; preds = %56 + %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i64 noundef %52) + br label %62 -61: ; preds = %54, %59, %57 +62: ; preds = %55, %60, %58 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 512 - br i1 %exitcond.not, label %62, label %.loopexit, !llvm.loop !19 + br i1 %exitcond.not, label %63, label %.loopexit, !llvm.loop !19 -62: ; preds = %61 +63: ; preds = %62 %putchar = tail call i32 @putchar(i32 10) - %63 = tail call ptr @slurm_bit_alloc(i64 noundef 32768) #12 - store ptr %63, ptr %3, align 8 - call fastcc void @_set_cpu_set_bitstr(ptr noundef %63, ptr noundef %2) - %64 = tail call ptr @slurm_bit_fmt_full(ptr noundef %63) #12 - %.not43 = icmp eq ptr %63, null - br i1 %.not43, label %66, label %65 - -65: ; preds = %62 + %64 = tail call ptr @slurm_bit_alloc(i64 noundef 32768) #12 + store ptr %64, ptr %3, align 8 + call fastcc void @_set_cpu_set_bitstr(ptr noundef %64, ptr noundef %2) + %65 = tail call ptr @slurm_bit_fmt_full(ptr noundef %64) #12 + %.not43 = icmp eq ptr %64, null + br i1 %.not43, label %67, label %66 + +66: ; preds = %63 call void @slurm_bit_free(ptr noundef nonnull %3) #12 - br label %66 + br label %67 -66: ; preds = %62, %65, %47, %15, %8 - %.0 = phi ptr [ %17, %15 ], [ %49, %47 ], [ %10, %8 ], [ %64, %65 ], [ %64, %62 ] +67: ; preds = %63, %66, %48, %15, %8 + %.0 = phi ptr [ %17, %15 ], [ %50, %48 ], [ %10, %8 ], [ %65, %66 ], [ %65, %63 ] ret ptr %.0 } diff --git a/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll b/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll index d6847e676b0..2feaaa2d388 100644 --- a/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll +++ b/bench/spdlog/optimized/bundled_fmtlib_format.cpp.ll @@ -20513,8 +20513,9 @@ if.end89: ; preds = %_ZN3fmt2v96detail6b if.then92: ; preds = %if.end89 %173 = load i32, ptr %exp10, align 4 + %add93 = add nsw i32 %173, 1 %cmp.i610 = icmp sgt i32 %173, -1 - %sub.i611 = sub nsw i32 2147483646, %173 + %sub.i611 = xor i32 %add93, 2147483647 %cmp1.i = icmp sgt i32 %num_digits, %sub.i611 %or.cond.i612 = select i1 %cmp.i610, i1 %cmp1.i, i1 false br i1 %or.cond.i612, label %if.then.i, label %_ZN3fmt2v96detail16adjust_precisionERii.exit @@ -20539,8 +20540,7 @@ lpad.i: ; preds = %if.then.i br label %lpad6.body _ZN3fmt2v96detail16adjust_precisionERii.exit: ; preds = %if.then92 - %add93 = add i32 %num_digits, 1 - %add.i614 = add i32 %add93, %173 + %add.i614 = add nsw i32 %add93, %num_digits br label %if.end96 if.end96: ; preds = %_ZN3fmt2v96detail16adjust_precisionERii.exit, %if.end89, %if.end62 @@ -34921,9 +34921,9 @@ _ZN3fmt2v96detail9normalizeILi0EyEENS1_8basic_fpIT0_EES5_.exit: ; preds = %while if.then.i: ; preds = %_ZN3fmt2v96detail9normalizeILi0EyEENS1_8basic_fpIT0_EES5_.exit %add.i = add nsw i32 %sub46, %conv1.i.i96 %cmp.i97 = icmp sgt i32 %add.i, 0 - %sub.i99 = sub nuw nsw i32 2147483647, %add.i + %sub.i99 = xor i32 %add.i, 2147483647 %cmp1.i = icmp sgt i32 %precision, %sub.i99 - %or.cond.i = select i1 %cmp.i97, i1 %cmp1.i, i1 false + %or.cond.i = and i1 %cmp.i97, %cmp1.i br i1 %or.cond.i, label %if.then.i102, label %_ZN3fmt2v96detail16adjust_precisionERii.exit if.then.i102: ; preds = %if.then.i diff --git a/bench/stb/optimized/stb_hexwave.c.ll b/bench/stb/optimized/stb_hexwave.c.ll index 4a7478f0fee..5889e64036f 100644 --- a/bench/stb/optimized/stb_hexwave.c.ll +++ b/bench/stb/optimized/stb_hexwave.c.ll @@ -252,15 +252,16 @@ entry: for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 4, %entry ] - %5 = sub nuw nsw i64 7, %indvars.iv - %arrayidx24 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %5 - %6 = load float, ptr %arrayidx24, align 4 - %sub26 = fsub float 1.000000e+00, %6 + %sub23 = and i64 %indvars.iv, 4294967295 + %idxprom = xor i64 %sub23, 7 + %arrayidx24 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %idxprom + %5 = load float, ptr %arrayidx24, align 4 + %sub26 = fsub float 1.000000e+00, %5 %arrayidx28 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv store float %sub26, ptr %arrayidx28, align 4 %v33 = getelementptr inbounds nuw i8, ptr %arrayidx24, i64 4 - %7 = load float, ptr %v33, align 4 - %fneg = fneg float %7 + %6 = load float, ptr %v33, align 4 + %fneg = fneg float %6 %v36 = getelementptr inbounds nuw i8, ptr %arrayidx28, i64 4 store float %fneg, ptr %v36, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -268,20 +269,20 @@ for.body: ; preds = %entry, %for.body br i1 %exitcond.not, label %if.end, label %for.body, !llvm.loop !6 for.body39: ; preds = %entry, %for.body39 - %indvars.iv86 = phi i64 [ %indvars.iv.next87, %for.body39 ], [ 4, %entry ] - %8 = getelementptr %struct.hexvert, ptr %vert, i64 %indvars.iv86 - %arrayidx42 = getelementptr i8, ptr %8, i64 -48 - %9 = load float, ptr %arrayidx42, align 4 - %add = fadd float %9, 5.000000e-01 - store float %add, ptr %8, align 4 - %v50 = getelementptr i8, ptr %8, i64 -44 - %10 = load float, ptr %v50, align 4 - %fneg51 = fneg float %10 - %v54 = getelementptr inbounds nuw i8, ptr %8, i64 4 + %indvars.iv85 = phi i64 [ %indvars.iv.next86, %for.body39 ], [ 4, %entry ] + %7 = getelementptr %struct.hexvert, ptr %vert, i64 %indvars.iv85 + %arrayidx42 = getelementptr i8, ptr %7, i64 -48 + %8 = load float, ptr %arrayidx42, align 4 + %add = fadd float %8, 5.000000e-01 + store float %add, ptr %7, align 4 + %v50 = getelementptr i8, ptr %7, i64 -44 + %9 = load float, ptr %v50, align 4 + %fneg51 = fneg float %9 + %v54 = getelementptr inbounds nuw i8, ptr %7, i64 4 store float %fneg51, ptr %v54, align 4 - %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1 - %exitcond89.not = icmp eq i64 %indvars.iv.next87, 8 - br i1 %exitcond89.not, label %if.end.loopexit, label %for.body39, !llvm.loop !7 + %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 + %exitcond88.not = icmp eq i64 %indvars.iv.next86, 8 + br i1 %exitcond88.not, label %if.end.loopexit, label %for.body39, !llvm.loop !7 if.end.loopexit: ; preds = %for.body39 %.pre.pre = load float, ptr %vert, align 4 @@ -296,34 +297,34 @@ if.end: ; preds = %for.body, %if.end.l br label %for.body64 for.body64: ; preds = %if.end, %for.inc83 - %11 = phi float [ %.pre, %if.end ], [ %13, %for.inc83 ] - %indvars.iv90 = phi i64 [ 0, %if.end ], [ %indvars.iv.next91, %for.inc83 ] - %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1 - %arrayidx67 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv.next91 - %12 = load float, ptr %arrayidx67, align 4 - %add72 = fadd float %div, %11 - %cmp73 = fcmp ugt float %12, %add72 + %10 = phi float [ %.pre, %if.end ], [ %12, %for.inc83 ] + %indvars.iv89 = phi i64 [ 0, %if.end ], [ %indvars.iv.next90, %for.inc83 ] + %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1 + %arrayidx67 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv.next90 + %11 = load float, ptr %arrayidx67, align 4 + %add72 = fadd float %div, %10 + %cmp73 = fcmp ugt float %11, %add72 br i1 %cmp73, label %for.inc83, label %if.then74 if.then74: ; preds = %for.body64 - store float %11, ptr %arrayidx67, align 4 + store float %10, ptr %arrayidx67, align 4 br label %for.inc83 for.inc83: ; preds = %for.body64, %if.then74 - %13 = phi float [ %12, %for.body64 ], [ %11, %if.then74 ] - %exitcond93.not = icmp eq i64 %indvars.iv.next91, 8 - br i1 %exitcond93.not, label %for.end85, label %for.body64, !llvm.loop !8 + %12 = phi float [ %11, %for.body64 ], [ %10, %if.then74 ] + %exitcond92.not = icmp eq i64 %indvars.iv.next90, 8 + br i1 %exitcond92.not, label %for.end85, label %for.body64, !llvm.loop !8 for.end85: ; preds = %for.inc83 - %14 = load float, ptr %arrayidx58, align 4 - %cmp88 = fcmp une float %14, 1.000000e+00 + %13 = load float, ptr %arrayidx58, align 4 + %cmp88 = fcmp une float %13, 1.000000e+00 br i1 %cmp88, label %for.body95, label %for.body111.preheader for.body95: ; preds = %for.end85, %for.inc105 - %indvars.iv94 = phi i64 [ %indvars.iv.next95, %for.inc105 ], [ 5, %for.end85 ] - %arrayidx97 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv94 - %15 = load float, ptr %arrayidx97, align 4 - %cmp99 = fcmp oeq float %15, %14 + %indvars.iv93 = phi i64 [ %indvars.iv.next94, %for.inc105 ], [ 5, %for.end85 ] + %arrayidx97 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv93 + %14 = load float, ptr %arrayidx97, align 4 + %cmp99 = fcmp oeq float %14, %13 br i1 %cmp99, label %if.then100, label %for.inc105 if.then100: ; preds = %for.body95 @@ -331,47 +332,47 @@ if.then100: ; preds = %for.body95 br label %for.inc105 for.inc105: ; preds = %for.body95, %if.then100 - %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 - %exitcond97.not = icmp eq i64 %indvars.iv.next95, 9 - br i1 %exitcond97.not, label %for.body111.preheader, label %for.body95, !llvm.loop !9 + %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1 + %exitcond96.not = icmp eq i64 %indvars.iv.next94, 9 + br i1 %exitcond96.not, label %for.body111.preheader, label %for.body95, !llvm.loop !9 for.body111.preheader: ; preds = %for.inc105, %for.end85 br label %for.body111 for.body111: ; preds = %for.body111.preheader, %for.inc145 - %16 = phi float [ %17, %for.inc145 ], [ %.pre, %for.body111.preheader ] - %indvars.iv98 = phi i64 [ %indvars.iv.next99, %for.inc145 ], [ 0, %for.body111.preheader ] - %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1 - %arrayidx114 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv.next99 - %17 = load float, ptr %arrayidx114, align 4 - %arrayidx117 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv98 - %cmp119 = fcmp oeq float %17, %16 + %15 = phi float [ %16, %for.inc145 ], [ %.pre, %for.body111.preheader ] + %indvars.iv97 = phi i64 [ %indvars.iv.next98, %for.inc145 ], [ 0, %for.body111.preheader ] + %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1 + %arrayidx114 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv.next98 + %16 = load float, ptr %arrayidx114, align 4 + %arrayidx117 = getelementptr inbounds nuw %struct.hexvert, ptr %vert, i64 %indvars.iv97 + %cmp119 = fcmp oeq float %16, %15 br i1 %cmp119, label %for.inc145, label %if.else123 if.else123: ; preds = %for.body111 %v127 = getelementptr inbounds nuw i8, ptr %arrayidx114, i64 4 - %18 = load float, ptr %v127, align 4 + %17 = load float, ptr %v127, align 4 %v130 = getelementptr inbounds nuw i8, ptr %arrayidx117, i64 4 - %19 = load float, ptr %v130, align 4 - %sub131 = fsub float %18, %19 - %sub139 = fsub float %17, %16 + %18 = load float, ptr %v130, align 4 + %sub131 = fsub float %17, %18 + %sub139 = fsub float %16, %15 %div140 = fdiv float %sub131, %sub139 br label %for.inc145 for.inc145: ; preds = %for.body111, %if.else123 %div140.sink = phi float [ %div140, %if.else123 ], [ 0.000000e+00, %for.body111 ] - %20 = getelementptr inbounds nuw i8, ptr %arrayidx117, i64 8 - store float %div140.sink, ptr %20, align 4 - %exitcond101.not = icmp eq i64 %indvars.iv.next99, 8 - br i1 %exitcond101.not, label %for.end147, label %for.body111, !llvm.loop !10 + %19 = getelementptr inbounds nuw i8, ptr %arrayidx117, i64 8 + store float %div140.sink, ptr %19, align 4 + %exitcond100.not = icmp eq i64 %indvars.iv.next98, 8 + br i1 %exitcond100.not, label %for.end147, label %for.body111, !llvm.loop !10 for.end147: ; preds = %for.inc145 store float 1.000000e+00, ptr %arrayidx58, align 4 store float 0.000000e+00, ptr %v61, align 4 %s155 = getelementptr inbounds nuw i8, ptr %vert, i64 8 - %21 = load float, ptr %s155, align 4 + %20 = load float, ptr %s155, align 4 %s157 = getelementptr inbounds nuw i8, ptr %vert, i64 104 - store float %21, ptr %s157, align 4 + store float %20, ptr %s157, align 4 ret void } diff --git a/bench/stb/optimized/stb_include.c.ll b/bench/stb/optimized/stb_include.c.ll index 18f9d271519..9a1decd52fa 100644 --- a/bench/stb/optimized/stb_include.c.ll +++ b/bench/stb/optimized/stb_include.c.ll @@ -366,19 +366,20 @@ entry: br label %for.body5 for.body5: ; preds = %for.body5, %entry - %indvars.iv = phi i64 [ 1, %entry ], [ %indvars.iv.next, %for.body5 ] + %i.113 = phi i32 [ 1, %entry ], [ %inc11, %for.body5 ] %n.addr.012 = phi i32 [ %n, %entry ], [ %div, %for.body5 ] %rem = srem i32 %n.addr.012, 10 %div = sdiv i32 %n.addr.012, 10 %0 = trunc nsw i32 %rem to i8 %conv = add nsw i8 %0, 48 - %1 = sub nuw nsw i64 7, %indvars.iv - %arrayidx7 = getelementptr inbounds nuw i8, ptr %str, i64 %1 + %sub = xor i32 %i.113, 7 + %idxprom6 = zext nneg i32 %sub to i64 + %arrayidx7 = getelementptr inbounds nuw i8, ptr %str, i64 %idxprom6 store i8 %conv, ptr %arrayidx7, align 1 %n.addr.0.off = add i32 %n.addr.012, 9 %cmp8 = icmp ult i32 %n.addr.0.off, 19 - %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, 8 + %inc11 = add nuw nsw i32 %i.113, 1 + %exitcond.not = icmp eq i32 %inc11, 8 %or.cond = select i1 %cmp8, i1 true, i1 %exitcond.not br i1 %or.cond, label %for.end12, label %for.body5, !llvm.loop !14 @@ -509,51 +510,52 @@ for.body.i.preheader: ; preds = %stb_include_file.ex br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %for.body.i - %indvars.iv.i50 = phi i64 [ %indvars.iv.next.i51, %for.body.i ], [ 0, %for.body.i.preheader ] - %filename.i = getelementptr inbounds nuw %struct.include_info, ptr %.pre, i64 %indvars.iv.i50, i32 2 + %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ 0, %for.body.i.preheader ] + %filename.i = getelementptr inbounds nuw %struct.include_info, ptr %.pre, i64 %indvars.iv.i, i32 2 %2 = load ptr, ptr %filename.i, align 8 call void @free(ptr noundef %2) #16 - %indvars.iv.next.i51 = add nuw nsw i64 %indvars.iv.i50, 1 - %exitcond.not.i52 = icmp eq i64 %indvars.iv.next.i51, %wide.trip.count - br i1 %exitcond.not.i52, label %return, label %for.body.i, !llvm.loop !4 + %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 + %exitcond.not.i50 = icmp eq i64 %indvars.iv.next.i, %wide.trip.count + br i1 %exitcond.not.i50, label %return, label %for.body.i, !llvm.loop !4 if.end57: ; preds = %stb_include_file.exit %call58 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %call4.i) #17 - %add.i53 = add i64 %call58, %add.i41 - %call.i54 = call ptr @realloc(ptr noundef %call.i42, i64 noundef %add.i53) #15 - %add.ptr.i55 = getelementptr inbounds i8, ptr %call.i54, i64 %add.i41 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %add.ptr.i55, ptr nonnull readonly align 1 %call4.i, i64 %call58, i1 false) + %add.i51 = add i64 %call58, %add.i41 + %call.i52 = call ptr @realloc(ptr noundef %call.i42, i64 noundef %add.i51) #15 + %add.ptr.i53 = getelementptr inbounds i8, ptr %call.i52, i64 %add.i41 + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %add.ptr.i53, ptr nonnull readonly align 1 %call4.i, i64 %call58, i1 false) call void @free(ptr noundef nonnull %call4.i) #16 br label %if.end60 if.end60: ; preds = %if.then35, %if.then38, %if.end57 - %textlen.1 = phi i64 [ %add.i41, %if.then35 ], [ %add.i45, %if.then38 ], [ %add.i53, %if.end57 ] - %text.1 = phi ptr [ %call.i42, %if.then35 ], [ %call.i46, %if.then38 ], [ %call.i54, %if.end57 ] + %textlen.1 = phi i64 [ %add.i41, %if.then35 ], [ %add.i45, %if.then38 ], [ %add.i51, %if.end57 ] + %text.1 = phi ptr [ %call.i42, %if.then35 ], [ %call.i46, %if.then38 ], [ %call.i52, %if.end57 ] store i64 9118724144243466, ptr %temp, align 16 %next_line_after = getelementptr inbounds nuw %struct.include_info, ptr %.pre, i64 %indvars.iv, i32 3 %3 = load i32, ptr %next_line_after, align 8 store i64 2314885530818453536, ptr %add.ptr5, align 2 store i8 0, ptr %arrayidx2.i, align 2 - br label %for.body5.i58 - -for.body5.i58: ; preds = %for.body5.i58, %if.end60 - %indvars.iv.i59 = phi i64 [ 1, %if.end60 ], [ %indvars.iv.next.i68, %for.body5.i58 ] - %n.addr.012.i60 = phi i32 [ %3, %if.end60 ], [ %div.i67, %for.body5.i58 ] - %rem.i61 = srem i32 %n.addr.012.i60, 10 - %div.i67 = sdiv i32 %n.addr.012.i60, 10 - %4 = trunc nsw i32 %rem.i61 to i8 - %conv.i62 = add nsw i8 %4, 48 - %5 = sub nuw nsw i64 7, %indvars.iv.i59 - %arrayidx7.i63 = getelementptr inbounds nuw i8, ptr %add.ptr5, i64 %5 - store i8 %conv.i62, ptr %arrayidx7.i63, align 1 - %n.addr.0.off.i64 = add i32 %n.addr.012.i60, 9 + br label %for.body5.i56 + +for.body5.i56: ; preds = %for.body5.i56, %if.end60 + %i.113.i57 = phi i32 [ 1, %if.end60 ], [ %inc11.i68, %for.body5.i56 ] + %n.addr.012.i58 = phi i32 [ %3, %if.end60 ], [ %div.i67, %for.body5.i56 ] + %rem.i59 = srem i32 %n.addr.012.i58, 10 + %div.i67 = sdiv i32 %n.addr.012.i58, 10 + %4 = trunc nsw i32 %rem.i59 to i8 + %conv.i60 = add nsw i8 %4, 48 + %sub.i61 = xor i32 %i.113.i57, 7 + %idxprom6.i62 = zext nneg i32 %sub.i61 to i64 + %arrayidx7.i63 = getelementptr inbounds nuw i8, ptr %add.ptr5, i64 %idxprom6.i62 + store i8 %conv.i60, ptr %arrayidx7.i63, align 1 + %n.addr.0.off.i64 = add i32 %n.addr.012.i58, 9 %cmp8.i65 = icmp ult i32 %n.addr.0.off.i64, 19 - %indvars.iv.next.i68 = add nuw nsw i64 %indvars.iv.i59, 1 - %exitcond.not.i69 = icmp eq i64 %indvars.iv.next.i68, 8 + %inc11.i68 = add nuw nsw i32 %i.113.i57, 1 + %exitcond.not.i69 = icmp eq i32 %inc11.i68, 8 %or.cond = select i1 %cmp8.i65, i1 true, i1 %exitcond.not.i69 - br i1 %or.cond, label %stb_include_itoa.exit70, label %for.body5.i58, !llvm.loop !14 + br i1 %or.cond, label %stb_include_itoa.exit70, label %for.body5.i56, !llvm.loop !14 -stb_include_itoa.exit70: ; preds = %for.body5.i58 +stb_include_itoa.exit70: ; preds = %for.body5.i56 %strlen39 = call i64 @strlen(ptr nonnull dereferenceable(1) %temp) %endptr40 = getelementptr inbounds i8, ptr %temp, i64 %strlen39 store i16 32, ptr %endptr40, align 1 @@ -564,8 +566,8 @@ stb_include_itoa.exit70: ; preds = %for.body5.i58 %add.ptr.i73 = getelementptr inbounds i8, ptr %call.i72, i64 %textlen.1 call void @llvm.memcpy.p0.p0.i64(ptr align 1 %add.ptr.i73, ptr nonnull readonly align 16 %temp, i64 %call75, i1 false) %end = getelementptr inbounds nuw %struct.include_info, ptr %.pre, i64 %indvars.iv, i32 1 - %6 = load i32, ptr %end, align 4 - %conv79 = sext i32 %6 to i64 + %5 = load i32, ptr %end, align 4 + %conv79 = sext i32 %5 to i64 %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 %for.end, label %stb_include_itoa.exit, !llvm.loop !15 @@ -590,8 +592,8 @@ for.body.preheader.i80: ; preds = %for.end for.body.i82: ; preds = %for.body.i82, %for.body.preheader.i80 %indvars.iv.i83 = phi i64 [ 0, %for.body.preheader.i80 ], [ %indvars.iv.next.i85, %for.body.i82 ] %filename.i84 = getelementptr inbounds nuw %struct.include_info, ptr %.pre, i64 %indvars.iv.i83, i32 2 - %7 = load ptr, ptr %filename.i84, align 8 - call void @free(ptr noundef %7) #16 + %6 = load ptr, ptr %filename.i84, align 8 + call void @free(ptr noundef %6) #16 %indvars.iv.next.i85 = add nuw nsw i64 %indvars.iv.i83, 1 %exitcond.not.i86 = icmp eq i64 %indvars.iv.next.i85, %wide.trip.count.i81 br i1 %exitcond.not.i86, label %return, label %for.body.i82, !llvm.loop !4 diff --git a/bench/tev/optimized/Channel.cpp.ll b/bench/tev/optimized/Channel.cpp.ll index c0900eee780..eb3be85b10e 100644 --- a/bench/tev/optimized/Channel.cpp.ll +++ b/bench/tev/optimized/Channel.cpp.ll @@ -23810,13 +23810,13 @@ _ZN3fmt2v96detail6bufferIjE9push_backERKj.exit.i135: ; preds = %.noexc139, %119 cleanup br label %.body -.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %_ZN3fmt2v96detail6bigintlSEi.exit140, %158, %_ZN3fmt2v96detail6bigintlSEi.exit239, %._crit_edge, %45, %68, %76, %95, %104, %124, %149, %_ZN3fmt2v919basic_memory_bufferIjLm32ENSt3__19allocatorIjEEE6resizeEm.exit.thread.i, %_ZN3fmt2v919basic_memory_bufferIjLm32ENSt3__19allocatorIjEEE6resizeEm.exit.thread.i158, %193, %244, %252, %272, %288, %306, %336, %344, %353, %442, %466, %490, %504, %666, %763, %816, %828 +.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %_ZN3fmt2v96detail6bigintlSEi.exit140, %158, %_ZN3fmt2v96detail6bigintlSEi.exit239, %._crit_edge, %45, %68, %76, %95, %104, %124, %149, %_ZN3fmt2v919basic_memory_bufferIjLm32ENSt3__19allocatorIjEEE6resizeEm.exit.thread.i, %_ZN3fmt2v919basic_memory_bufferIjLm32ENSt3__19allocatorIjEEE6resizeEm.exit.thread.i158, %193, %244, %252, %272, %288, %306, %336, %344, %353, %442, %466, %490, %505, %666, %763, %816, %828 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup br label %.body -.body: ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %505 - %eh.lpad-body = phi { ptr, i32 } [ %506, %505 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit537, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit540, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ] +.body: ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %506 + %eh.lpad-body = phi { ptr, i32 } [ %507, %506 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit537, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit540, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ] %130 = load ptr, ptr %25, align 8 %.not.i.i.i = icmp eq ptr %130, %28 br i1 %.not.i.i.i, label %_ZN3fmt2v96detail6bigintD2Ev.exit, label %131 @@ -24720,34 +24720,34 @@ _ZN3fmt2v96detail6bigintmLIiEERS2_T_.exit303: ; preds = %_ZN3fmt2v96detail6b 497: ; preds = %_ZN3fmt2v96detail6bigintmLIiEERS2_T_.exit303 %498 = load i32, ptr %4, align 4 - %499 = icmp sgt i32 %498, -1 - %500 = sub nsw i32 2147483646, %498 - %501 = icmp sgt i32 %2, %500 - %or.cond.i304 = select i1 %499, i1 %501, i1 false - br i1 %or.cond.i304, label %502, label %_ZN3fmt2v96detail16adjust_precisionERii.exit - -502: ; preds = %497 - %503 = call ptr @__cxa_allocate_exception(i64 16) #22 - invoke void @_ZNSt13runtime_errorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %503, ptr noundef nonnull @.str.65) - to label %504 unwind label %505 - -504: ; preds = %502 - store ptr getelementptr inbounds nuw (i8, ptr @_ZTVN3fmt2v912format_errorE, i64 16), ptr %503, align 8 - invoke void @__cxa_throw(ptr nonnull %503, ptr nonnull @_ZTIN3fmt2v912format_errorE, ptr nonnull @_ZN3fmt2v912format_errorD2Ev) #27 + %499 = add nsw i32 %498, 1 + %500 = icmp sgt i32 %498, -1 + %501 = xor i32 %499, 2147483647 + %502 = icmp sgt i32 %2, %501 + %or.cond.i304 = select i1 %500, i1 %502, i1 false + br i1 %or.cond.i304, label %503, label %_ZN3fmt2v96detail16adjust_precisionERii.exit + +503: ; preds = %497 + %504 = call ptr @__cxa_allocate_exception(i64 16) #22 + invoke void @_ZNSt13runtime_errorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %504, ptr noundef nonnull @.str.65) + to label %505 unwind label %506 + +505: ; preds = %503 + store ptr getelementptr inbounds nuw (i8, ptr @_ZTVN3fmt2v912format_errorE, i64 16), ptr %504, align 8 + invoke void @__cxa_throw(ptr nonnull %504, ptr nonnull @_ZTIN3fmt2v912format_errorE, ptr nonnull @_ZN3fmt2v912format_errorD2Ev) #27 to label %.noexc305 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp -.noexc305: ; preds = %504 +.noexc305: ; preds = %505 unreachable -505: ; preds = %502 - %506 = landingpad { ptr, i32 } +506: ; preds = %503 + %507 = landingpad { ptr, i32 } cleanup - call void @__cxa_free_exception(ptr %503) #22 + call void @__cxa_free_exception(ptr %504) #22 br label %.body _ZN3fmt2v96detail16adjust_precisionERii.exit: ; preds = %497 - %507 = add i32 %2, 1 - %508 = add i32 %507, %498 + %508 = add nsw i32 %499, %2 br label %509 509: ; preds = %_ZN3fmt2v96detail16adjust_precisionERii.exit, %_ZN3fmt2v96detail6bigintmLIiEERS2_T_.exit303, %_ZN3fmt2v96detail6bigintlSEi.exit153 @@ -39613,9 +39613,9 @@ _ZN3fmt2v96detail9normalizeILi0EyEENS1_8basic_fpIT0_EES5_.exit: ; preds = %.lr.p 110: ; preds = %_ZN3fmt2v96detail9normalizeILi0EyEENS1_8basic_fpIT0_EES5_.exit %111 = add nsw i32 %93, %109 %112 = icmp sgt i32 %111, 0 - %113 = sub nuw nsw i32 2147483647, %111 + %113 = xor i32 %111, 2147483647 %114 = icmp sgt i32 %1, %113 - %or.cond.i = select i1 %112, i1 %114, i1 false + %or.cond.i = and i1 %112, %114 br i1 %or.cond.i, label %115, label %_ZN3fmt2v96detail16adjust_precisionERii.exit 115: ; preds = %110 diff --git a/bench/turborepo-rs/optimized/0d11a6ei085iwkkzrqqfde2g8.ll b/bench/turborepo-rs/optimized/0d11a6ei085iwkkzrqqfde2g8.ll index 40e43683e26..6e25fa02ec3 100644 --- a/bench/turborepo-rs/optimized/0d11a6ei085iwkkzrqqfde2g8.ll +++ b/bench/turborepo-rs/optimized/0d11a6ei085iwkkzrqqfde2g8.ll @@ -86,7 +86,7 @@ define hidden { ptr, i64 } @_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5w 22: ; preds = %13, %19 %.sroa.07.1 = phi i64 [ %.sroa.07.017, %19 ], [ 1, %13 ] - %23 = sub nuw nsw i64 3, %.sroa.07.1 + %23 = xor i64 %.sroa.07.1, 3 %24 = getelementptr inbounds nuw i8, ptr %1, i64 %.sroa.07.1 %25 = insertvalue { ptr, i64 } poison, ptr %24, 0 %26 = insertvalue { ptr, i64 } %25, i64 %23, 1 @@ -314,29 +314,29 @@ define hidden void @_RINvNtCs8mTrBI1stz4_15turborepo_vt1004term11extend_itoahEB4 _RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit: ; preds = %14, %20 %.sroa.07.1.i = phi i64 [ %.sroa.07.017.i, %20 ], [ 1, %14 ] - %gepdiff = sub nuw nsw i64 3, %.sroa.07.1.i - %22 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %23 = load i64, ptr %22, align 8, !alias.scope !9, !noundef !4 - %24 = load i64, ptr %0, align 8, !alias.scope !9, !noundef !4 - %25 = sub i64 %24, %23 - %26 = icmp ugt i64 %gepdiff, %25 - br i1 %26, label %27, label %_RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE15append_elementsCs8mTrBI1stz4_15turborepo_vt100.llvm.2772946472389925136.exit - -27: ; preds = %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit - tail call void @_RINvNvMs0_NtCs68wO5nsWeTG_5alloc7raw_vecINtB8_6RawVecppE7reserve21do_reserve_and_handlehNtNtBa_5alloc6GlobalECscjWV1zBNszQ_8bitflags(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %23, i64 noundef %gepdiff) - %.pre.i = load i64, ptr %22, align 8, !alias.scope !9 + %22 = xor i64 %.sroa.07.1.i, 3 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %24 = load i64, ptr %23, align 8, !alias.scope !9, !noundef !4 + %25 = load i64, ptr %0, align 8, !alias.scope !9, !noundef !4 + %26 = sub i64 %25, %24 + %27 = icmp ugt i64 %22, %26 + br i1 %27, label %28, label %_RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE15append_elementsCs8mTrBI1stz4_15turborepo_vt100.llvm.2772946472389925136.exit + +28: ; preds = %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit + tail call void @_RINvNvMs0_NtCs68wO5nsWeTG_5alloc7raw_vecINtB8_6RawVecppE7reserve21do_reserve_and_handlehNtNtBa_5alloc6GlobalECscjWV1zBNszQ_8bitflags(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %24, i64 noundef %22) + %.pre.i = load i64, ptr %23, align 8, !alias.scope !9 br label %_RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE15append_elementsCs8mTrBI1stz4_15turborepo_vt100.llvm.2772946472389925136.exit -_RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE15append_elementsCs8mTrBI1stz4_15turborepo_vt100.llvm.2772946472389925136.exit: ; preds = %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit, %27 - %28 = phi i64 [ %.pre.i, %27 ], [ %23, %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit ] - %29 = getelementptr inbounds nuw i8, ptr %3, i64 %.sroa.07.1.i - %30 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %31 = load ptr, ptr %30, align 8, !alias.scope !9, !nonnull !4, !noundef !4 - %32 = getelementptr inbounds i8, ptr %31, i64 %28 - call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %32, ptr nonnull readonly align 1 %29, i64 %gepdiff, i1 false) - %33 = load i64, ptr %22, align 8, !alias.scope !9, !noundef !4 - %34 = add i64 %33, %gepdiff - store i64 %34, ptr %22, align 8, !alias.scope !9 +_RNvMs_NtCs68wO5nsWeTG_5alloc3vecINtB4_3VechE15append_elementsCs8mTrBI1stz4_15turborepo_vt100.llvm.2772946472389925136.exit: ; preds = %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit, %28 + %29 = phi i64 [ %.pre.i, %28 ], [ %24, %_RNvXs5_CsfbvjWzJraAt_4itoahNtNtB5_7private6Sealed5write.llvm.2772946472389925136.exit ] + %30 = getelementptr inbounds nuw i8, ptr %3, i64 %.sroa.07.1.i + %31 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %32 = load ptr, ptr %31, align 8, !alias.scope !9, !nonnull !4, !noundef !4 + %33 = getelementptr inbounds i8, ptr %32, i64 %29 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %33, ptr nonnull readonly align 1 %30, i64 %22, i1 false) + %34 = load i64, ptr %23, align 8, !alias.scope !9, !noundef !4 + %35 = add i64 %34, %22 + store i64 %35, ptr %23, align 8, !alias.scope !9 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) ret void } diff --git a/bench/typst-rs/optimized/1ru1rhojhbz2vfey.ll b/bench/typst-rs/optimized/1ru1rhojhbz2vfey.ll index 9a2a21104aa..fe3aa3d77d7 100644 --- a/bench/typst-rs/optimized/1ru1rhojhbz2vfey.ll +++ b/bench/typst-rs/optimized/1ru1rhojhbz2vfey.ll @@ -115816,7 +115816,7 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; br label %98 .loopexit.split-lp: ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %.body - %.pn.pn = phi { ptr, i32 } [ %.pn, %.body ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit206, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp207, %.loopexit.split-lp.loopexit.split-lp ] + %.pn.pn = phi { ptr, i32 } [ %.pn, %.body ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit205, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp206, %.loopexit.split-lp.loopexit.split-lp ] invoke void @"_ZN4core3ptr115drop_in_place$LT$std..collections..hash..map..HashMap$LT$$RF$str$C$typst..introspection..location..Location$GT$$GT$17h65891bd924795251E"(ptr noalias noundef nonnull align 8 dereferenceable(48) %27) #66 to label %401 unwind label %188 @@ -115826,12 +115826,12 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; br label %.loopexit.split-lp .loopexit.split-lp.loopexit: ; preds = %377, %372, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit" - %lpad.loopexit206 = landingpad { ptr, i32 } + %lpad.loopexit205 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp .loopexit.split-lp.loopexit.split-lp: ; preds = %63 - %lpad.loopexit.split-lp207 = landingpad { ptr, i32 } + %lpad.loopexit.split-lp206 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp @@ -115903,9 +115903,9 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; %70 = load i64, ptr %69, align 8, !noundef !5 %71 = getelementptr inbounds { { { { i64, ptr, {} }, i64 } }, { { { i64, ptr, {} }, i64 } }, { i8, [63 x i8] } }, ptr %68, i64 %70 %72 = icmp eq i64 %70, 0 - br i1 %72, label %._crit_edge, label %.lr.ph219 + br i1 %72, label %._crit_edge, label %.lr.ph218 -.lr.ph219: ; preds = %64 +.lr.ph218: ; preds = %64 %73 = getelementptr inbounds nuw i8, ptr %1, i64 24 %74 = getelementptr inbounds nuw i8, ptr %1, i64 72 %75 = load i64, ptr %74, align 8, !range !1375, !alias.scope !23065, !noundef !5 @@ -115964,11 +115964,11 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; 98: ; preds = %"_ZN4core3ptr115drop_in_place$LT$std..collections..hash..map..HashMap$LT$$RF$str$C$typst..introspection..location..Location$GT$$GT$17h65891bd924795251E.exit", %36 ret void -99: ; preds = %.lr.ph219, %180 - %.sroa.090.0218 = phi ptr [ %68, %.lr.ph219 ], [ %100, %180 ] - %.sroa.7.0217 = phi i64 [ 0, %.lr.ph219 ], [ %101, %180 ] - %100 = getelementptr inbounds nuw i8, ptr %.sroa.090.0218, i64 112 - %101 = add nuw nsw i64 %.sroa.7.0217, 1 +99: ; preds = %.lr.ph218, %180 + %.sroa.090.0217 = phi ptr [ %68, %.lr.ph218 ], [ %100, %180 ] + %.sroa.7.0216 = phi i64 [ 0, %.lr.ph218 ], [ %101, %180 ] + %100 = getelementptr inbounds nuw i8, ptr %.sroa.090.0217, i64 112 + %101 = add nuw nsw i64 %.sroa.7.0216, 1 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %24) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(32) %73, i64 32, i1 false) store i64 %75, ptr %76, align 8 @@ -115979,7 +115979,7 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %.sroa.0) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %.sroa.0, ptr noundef nonnull align 16 dereferenceable(24) %.sroa.0120, i64 24, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) - %102 = getelementptr inbounds nuw i8, ptr %.sroa.090.0218, i64 48 + %102 = getelementptr inbounds nuw i8, ptr %.sroa.090.0217, i64 48 %103 = load i8, ptr %102, align 8, !range !467, !noundef !5 %104 = icmp eq i8 %103, 5 br i1 %104, label %105, label %106 @@ -116049,9 +116049,9 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; "_ZN4core3ptr85drop_in_place$LT$core..option..Option$LT$typst..foundations..content..Content$GT$$GT$17he7b68e2b72a053d5E.llvm.13383457361836014260.exit.i": ; preds = %.noexc7.i, %112, %109 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16), !noalias !23081 - %125 = getelementptr inbounds nuw i8, ptr %.sroa.090.0218, i64 8 + %125 = getelementptr inbounds nuw i8, ptr %.sroa.090.0217, i64 8 %126 = load ptr, ptr %125, align 8, !noalias !23081, !nonnull !5, !noundef !5 - %127 = getelementptr inbounds nuw i8, ptr %.sroa.090.0218, i64 16 + %127 = getelementptr inbounds nuw i8, ptr %.sroa.090.0217, i64 16 %128 = load i64, ptr %127, align 8, !noalias !23081, !noundef !5 call void @llvm.experimental.noalias.scope.decl(metadata !23105) %129 = load i64, ptr %85, align 8, !alias.scope !23105, !noalias !23108, !noundef !5 @@ -116174,9 +116174,9 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; 165: ; preds = %169, %105 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) - %166 = getelementptr i8, ptr %.sroa.090.0218, i64 32 + %166 = getelementptr i8, ptr %.sroa.090.0217, i64 32 %.val = load ptr, ptr %166, align 8, !nonnull !5, !noundef !5 - %167 = getelementptr i8, ptr %.sroa.090.0218, i64 40 + %167 = getelementptr i8, ptr %.sroa.090.0217, i64 40 %.val35 = load i64, ptr %167, align 8, !noundef !5 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9), !noalias !23153 %168 = getelementptr inbounds { i8, [63 x i8] }, ptr %.val, i64 %.val35 @@ -116262,14 +116262,14 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; unreachable 190: ; preds = %.lr.ph, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit.thread.loopexit" - %.sroa.0.0216 = phi ptr [ %.val36, %.lr.ph ], [ %191, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit.thread.loopexit" ] - %191 = getelementptr inbounds nuw i8, ptr %.sroa.0.0216, i64 96 - %192 = getelementptr inbounds nuw i8, ptr %.sroa.0.0216, i64 40 - %193 = getelementptr inbounds nuw i8, ptr %.sroa.0.0216, i64 72 + %.sroa.0.0215 = phi ptr [ %.val36, %.lr.ph ], [ %191, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit.thread.loopexit" ] + %191 = getelementptr inbounds nuw i8, ptr %.sroa.0.0215, i64 96 + %192 = getelementptr inbounds nuw i8, ptr %.sroa.0.0215, i64 40 + %193 = getelementptr inbounds nuw i8, ptr %.sroa.0.0215, i64 72 %194 = load i64, ptr %193, align 8, !alias.scope !23163, !noalias !23168, !noundef !5 %195 = icmp ugt i64 %194, 1 %196 = load ptr, ptr %192, align 8, !alias.scope !23163, !noalias !23168, !nonnull !5 - %197 = getelementptr inbounds nuw i8, ptr %.sroa.0.0216, i64 48 + %197 = getelementptr inbounds nuw i8, ptr %.sroa.0.0215, i64 48 %198 = load i64, ptr %197, align 8, !alias.scope !23163, !noalias !23168 %.sink5.i.i = select i1 %195, ptr %196, ptr %192 %.sink4.i.i = select i1 %195, i64 %198, i64 %194 @@ -116278,9 +116278,9 @@ _ZN3std4hash6random11RandomState3new4KEYS7__getit17h32e2239cb3af4b83E.exit.i: ; br i1 %200, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit.thread.loopexit", label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit" "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf0c97f8915710cdE.exit": ; preds = %190, %"_ZN3std11collections4hash3map18Entry$LT$K$C$V$GT$9or_insert17h9c72ab52a54a6d44E.exit" - %.sroa.081.0215 = phi ptr [ %201, %"_ZN3std11collections4hash3map18Entry$LT$K$C$V$GT$9or_insert17h9c72ab52a54a6d44E.exit" ], [ %.sink5.i.i, %190 ] - %201 = getelementptr inbounds nuw i8, ptr %.sroa.081.0215, i64 32 - %202 = getelementptr inbounds nuw i8, ptr %.sroa.081.0215, i64 24 + %.sroa.081.0214 = phi ptr [ %201, %"_ZN3std11collections4hash3map18Entry$LT$K$C$V$GT$9or_insert17h9c72ab52a54a6d44E.exit" ], [ %.sink5.i.i, %190 ] + %201 = getelementptr inbounds nuw i8, ptr %.sroa.081.0214, i64 32 + %202 = getelementptr inbounds nuw i8, ptr %.sroa.081.0214, i64 24 %203 = invoke { ptr, i64 } @_ZN5typst4util4pico7PicoStr7resolve17h35375a5f4afb5d8eE(ptr noalias noundef nonnull readonly align 4 dereferenceable(4) %202) to label %204 unwind label %.loopexit.split-lp.loopexit @@ -116571,7 +116571,7 @@ _ZN4core4hash3sip9u8to64_le17hc480fe049f23d35fE.exit.i: ; preds = %"_ZN71_$LT$co %379 = load i64, ptr %46, align 8, !noalias !23173, !noundef !5 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %26, ptr noundef nonnull align 16 dereferenceable(32) %.sroa.0.0216, i64 32, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %26, ptr noundef nonnull align 16 dereferenceable(32) %.sroa.0.0215, i64 32, i1 false) %380 = invoke noundef i64 @_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.llvm.11057974413330164255(ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %27, i64 noundef %347) to label %.noexc51 unwind label %.loopexit.split-lp.loopexit diff --git a/bench/wolfssl/optimized/pwdbased.c.ll b/bench/wolfssl/optimized/pwdbased.c.ll index f732d99a0dc..f8c7fdcd71e 100644 --- a/bench/wolfssl/optimized/pwdbased.c.ll +++ b/bench/wolfssl/optimized/pwdbased.c.ll @@ -228,8 +228,8 @@ while.body.us: ; preds = %while.body.lr.ph, % for.cond.us: ; preds = %for.body.us %inc.us = add nuw nsw i32 %j.039.us, 1 - %exitcond97.not = icmp eq i32 %inc.us, 4 - br i1 %exitcond97.not, label %if.end34.us, label %for.body.us, !llvm.loop !7 + %exitcond98.not = icmp eq i32 %inc.us, 4 + br i1 %exitcond98.not, label %if.end34.us, label %for.body.us, !llvm.loop !7 if.end34.us: ; preds = %for.cond.us %call37.us = call i32 @wc_HmacFinal(ptr noundef nonnull %hmac, ptr noundef nonnull %buffer) #6 @@ -303,13 +303,13 @@ for.body.i.us: ; preds = %for.body.i.us, %for xorbuf.exit.us: ; preds = %for.body.i.us, %if.end.i.us %inc65.us = add nuw nsw i32 %j.141.us, 1 - %exitcond98.not = icmp eq i32 %inc65.us, %iterations - br i1 %exitcond98.not, label %for.cond45.if.end70_crit_edge.us, label %for.body48.us, !llvm.loop !10 + %exitcond99.not = icmp eq i32 %inc65.us, %iterations + br i1 %exitcond99.not, label %for.cond45.if.end70_crit_edge.us, label %for.body48.us, !llvm.loop !10 for.body.us: ; preds = %while.body.us, %for.cond.us %j.039.us = phi i32 [ %inc.us, %for.cond.us ], [ 0, %while.body.us ] - %9 = shl nuw nsw i32 %j.039.us, 3 - %mul.us = sub nuw nsw i32 24, %9 + %sub.us = shl nuw nsw i32 %j.039.us, 3 + %mul.us = xor i32 %sub.us, 24 %shr.us = lshr i32 %i.046.us, %mul.us %conv.us = trunc i32 %shr.us to i8 store i8 %conv.us, ptr %b, align 1 @@ -339,8 +339,8 @@ for.cond: ; preds = %for.body for.body: ; preds = %while.body, %for.cond %j.039 = phi i32 [ %inc, %for.cond ], [ 0, %while.body ] - %10 = shl nuw nsw i32 %j.039, 3 - %mul = sub nuw nsw i32 24, %10 + %sub = shl nuw nsw i32 %j.039, 3 + %mul = xor i32 %sub, 24 %shr = lshr i32 %i.046, %mul %conv = trunc i32 %shr to i8 store i8 %conv, ptr %b, align 1 diff --git a/bench/yalantinglibs/optimized/chat_room.cpp.ll b/bench/yalantinglibs/optimized/chat_room.cpp.ll index f72fac976d0..b6f7e420475 100644 --- a/bench/yalantinglibs/optimized/chat_room.cpp.ll +++ b/bench/yalantinglibs/optimized/chat_room.cpp.ll @@ -22708,7 +22708,7 @@ _ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_t br i1 %cmp.i.i.i, label %if.then.i.i, label %if.else.i.i if.then.i.i: ; preds = %_ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEENS_15any_io_executorEEC2EiRKSB_.exit - %sub.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i + %sub.i.i.i.i = xor i64 %call.i.i, 9223372036854775807 %14 = load i64, ptr %expiry_time, align 8 %cmp.i8.i.i = icmp slt i64 %sub.i.i.i.i, %14 br i1 %cmp.i8.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i, label %if.end41.i.i @@ -23172,7 +23172,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -23230,7 +23230,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -44143,18 +44143,19 @@ if.then16: ; preds = %cond.end br label %for.body.i.i for.body.i.i: ; preds = %for.body.i.i, %if.then16 - %indvars.iv.i.i = phi i64 [ 0, %if.then16 ], [ %indvars.iv.next.i.i, %for.body.i.i ] + %i.06.i.i = phi i32 [ 0, %if.then16 ], [ %inc.i.i, %for.body.i.i ] %num.addr.05.i.i = phi i32 [ %add17, %if.then16 ], [ %div.i.i, %for.body.i.i ] %rem.i.i = srem i32 %num.addr.05.i.i, 10 %idxprom.i.i = sext i32 %rem.i.i to i64 %arrayidx.i.i = getelementptr inbounds [10 x i8], ptr @_ZN7cinatraL6digitsE, i64 0, i64 %idxprom.i.i %4 = load i8, ptr %arrayidx.i.i, align 1 - %5 = sub nuw nsw i64 3, %indvars.iv.i.i - %arrayidx2.i.i = getelementptr inbounds nuw i8, ptr %p.0132, i64 %5 + %5 = xor i32 %i.06.i.i, 3 + %sub.i.i = zext nneg i32 %5 to i64 + %arrayidx2.i.i = getelementptr inbounds nuw i8, ptr %p.0132, i64 %sub.i.i store i8 %4, ptr %arrayidx2.i.i, align 1 %div.i.i = sdiv i32 %num.addr.05.i.i, 10 - %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %indvars.iv.next.i.i, 4 + %inc.i.i = add nuw nsw i32 %i.06.i.i, 1 + %exitcond.not.i.i = icmp eq i32 %inc.i.i, 4 br i1 %exitcond.not.i.i, label %_ZN7cinatra7to_yearEPcic.exit, label %for.body.i.i, !llvm.loop !658 _ZN7cinatra7to_yearEPcic.exit: ; preds = %for.body.i.i @@ -44170,13 +44171,13 @@ if.then22: ; preds = %cond.end for.body.i.i56: ; preds = %for.body.i.i56, %if.then22 %cmp.i.i = phi i1 [ true, %if.then22 ], [ false, %for.body.i.i56 ] - %indvars.iv.i.i57 = phi i64 [ 1, %if.then22 ], [ 0, %for.body.i.i56 ] + %i.06.i.i57 = phi i64 [ 1, %if.then22 ], [ 0, %for.body.i.i56 ] %num.addr.05.i.i58 = phi i32 [ %add23, %if.then22 ], [ %div.i.i63, %for.body.i.i56 ] %rem.i.i59 = srem i32 %num.addr.05.i.i58, 10 %idxprom.i.i60 = sext i32 %rem.i.i59 to i64 %arrayidx.i.i61 = getelementptr inbounds [10 x i8], ptr @_ZN7cinatraL6digitsE, i64 0, i64 %idxprom.i.i60 %7 = load i8, ptr %arrayidx.i.i61, align 1 - %arrayidx2.i.i62 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %indvars.iv.i.i57 + %arrayidx2.i.i62 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %i.06.i.i57 store i8 %7, ptr %arrayidx2.i.i62, align 1 %div.i.i63 = sdiv i32 %num.addr.05.i.i58, 10 br i1 %cmp.i.i, label %for.body.i.i56, label %_ZN7cinatra8to_monthEPcic.exit, !llvm.loop !659 @@ -44193,13 +44194,13 @@ if.then30: ; preds = %cond.end for.body.i.i67: ; preds = %for.body.i.i67, %if.then30 %cmp.i.i68 = phi i1 [ true, %if.then30 ], [ false, %for.body.i.i67 ] - %indvars.iv.i.i69 = phi i64 [ 1, %if.then30 ], [ 0, %for.body.i.i67 ] + %i.06.i.i69 = phi i64 [ 1, %if.then30 ], [ 0, %for.body.i.i67 ] %num.addr.05.i.i70 = phi i32 [ %8, %if.then30 ], [ %div.i.i75, %for.body.i.i67 ] %rem.i.i71 = srem i32 %num.addr.05.i.i70, 10 %idxprom.i.i72 = sext i32 %rem.i.i71 to i64 %arrayidx.i.i73 = getelementptr inbounds [10 x i8], ptr @_ZN7cinatraL6digitsE, i64 0, i64 %idxprom.i.i72 %9 = load i8, ptr %arrayidx.i.i73, align 1 - %arrayidx2.i.i74 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %indvars.iv.i.i69 + %arrayidx2.i.i74 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %i.06.i.i69 store i8 %9, ptr %arrayidx2.i.i74, align 1 %div.i.i75 = sdiv i32 %num.addr.05.i.i70, 10 br i1 %cmp.i.i68, label %for.body.i.i67, label %_ZN7cinatra6to_dayEPcic.exit, !llvm.loop !659 @@ -44216,13 +44217,13 @@ if.then37: ; preds = %cond.end for.body.i.i79: ; preds = %for.body.i.i79, %if.then37 %cmp.i.i80 = phi i1 [ true, %if.then37 ], [ false, %for.body.i.i79 ] - %indvars.iv.i.i81 = phi i64 [ 1, %if.then37 ], [ 0, %for.body.i.i79 ] + %i.06.i.i81 = phi i64 [ 1, %if.then37 ], [ 0, %for.body.i.i79 ] %num.addr.05.i.i82 = phi i32 [ %10, %if.then37 ], [ %div.i.i87, %for.body.i.i79 ] %rem.i.i83 = srem i32 %num.addr.05.i.i82, 10 %idxprom.i.i84 = sext i32 %rem.i.i83 to i64 %arrayidx.i.i85 = getelementptr inbounds [10 x i8], ptr @_ZN7cinatraL6digitsE, i64 0, i64 %idxprom.i.i84 %11 = load i8, ptr %arrayidx.i.i85, align 1 - %arrayidx2.i.i86 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %indvars.iv.i.i81 + %arrayidx2.i.i86 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %i.06.i.i81 store i8 %11, ptr %arrayidx2.i.i86, align 1 %div.i.i87 = sdiv i32 %num.addr.05.i.i82, 10 br i1 %cmp.i.i80, label %for.body.i.i79, label %_ZN7cinatra7to_hourEPcic.exit, !llvm.loop !659 @@ -44239,13 +44240,13 @@ if.then47: ; preds = %cond.end for.body.i.i91: ; preds = %for.body.i.i91, %if.then47 %cmp.i.i92 = phi i1 [ true, %if.then47 ], [ false, %for.body.i.i91 ] - %indvars.iv.i.i93 = phi i64 [ 1, %if.then47 ], [ 0, %for.body.i.i91 ] + %i.06.i.i93 = phi i64 [ 1, %if.then47 ], [ 0, %for.body.i.i91 ] %num.addr.05.i.i94 = phi i32 [ %12, %if.then47 ], [ %div.i.i99, %for.body.i.i91 ] %rem.i.i95 = srem i32 %num.addr.05.i.i94, 10 %idxprom.i.i96 = sext i32 %rem.i.i95 to i64 %arrayidx.i.i97 = getelementptr inbounds [10 x i8], ptr @_ZN7cinatraL6digitsE, i64 0, i64 %idxprom.i.i96 %13 = load i8, ptr %arrayidx.i.i97, align 1 - %arrayidx2.i.i98 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %indvars.iv.i.i93 + %arrayidx2.i.i98 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %i.06.i.i93 store i8 %13, ptr %arrayidx2.i.i98, align 1 %div.i.i99 = sdiv i32 %num.addr.05.i.i94, 10 br i1 %cmp.i.i92, label %for.body.i.i91, label %_ZN7cinatra6to_minEPcic.exit, !llvm.loop !659 @@ -44262,13 +44263,13 @@ if.then54: ; preds = %cond.end for.body.i.i103: ; preds = %for.body.i.i103, %if.then54 %cmp.i.i104 = phi i1 [ true, %if.then54 ], [ false, %for.body.i.i103 ] - %indvars.iv.i.i105 = phi i64 [ 1, %if.then54 ], [ 0, %for.body.i.i103 ] + %i.06.i.i105 = phi i64 [ 1, %if.then54 ], [ 0, %for.body.i.i103 ] %num.addr.05.i.i106 = phi i32 [ %14, %if.then54 ], [ %div.i.i111, %for.body.i.i103 ] %rem.i.i107 = srem i32 %num.addr.05.i.i106, 10 %idxprom.i.i108 = sext i32 %rem.i.i107 to i64 %arrayidx.i.i109 = getelementptr inbounds [10 x i8], ptr @_ZN7cinatraL6digitsE, i64 0, i64 %idxprom.i.i108 %15 = load i8, ptr %arrayidx.i.i109, align 1 - %arrayidx2.i.i110 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %indvars.iv.i.i105 + %arrayidx2.i.i110 = getelementptr inbounds nuw i8, ptr %p.0132, i64 %i.06.i.i105 store i8 %15, ptr %arrayidx2.i.i110, align 1 %div.i.i111 = sdiv i32 %num.addr.05.i.i106, 10 br i1 %cmp.i.i104, label %for.body.i.i103, label %_ZN7cinatra6to_secEPcic.exit, !llvm.loop !659 diff --git a/bench/yalantinglibs/optimized/client.cpp.ll b/bench/yalantinglibs/optimized/client.cpp.ll index ed061d03972..a6d7ce939fd 100644 --- a/bench/yalantinglibs/optimized/client.cpp.ll +++ b/bench/yalantinglibs/optimized/client.cpp.ll @@ -34802,7 +34802,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -34860,7 +34860,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -35097,22 +35097,26 @@ call2.i.i.i.i.i.i.i.i.i.i.i.noexc: ; preds = %if.end.i.i.i.i.i.i. br label %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i _ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i: ; preds = %call2.i.i.i.i.i.i.i.i.i.i.i.noexc, %if.then - %9 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i.i.i.i.i.i.i.i, i64 9223372035854775807) - %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i = add nsw i64 %9, 1000000000 + %cmp.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %call.i.i.i.i.i.i.i.i.i.i, -1 + %sub.i.i.i.i.i.i.i.i.i.i.i.i = xor i64 %call.i.i.i.i.i.i.i.i.i.i, 9223372036854775296 + %cmp.i8.i.i.i.i.i.i.i.i.i.i = icmp samesign ult i64 %sub.i.i.i.i.i.i.i.i.i.i.i.i, 1000000000 + %or.cond.i.i.i.i.i.i.i = select i1 %cmp.i.i.i.i.i.i.i.i.i.i.i, i1 %cmp.i8.i.i.i.i.i.i.i.i.i.i, i1 false + %add.i.i.i.i.i.i.i.i.i.i.i.i = add nsw i64 %call.i.i.i.i.i.i.i.i.i.i, 1000000000 + %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i = select i1 %or.cond.i.i.i.i.i.i.i, i64 9223372036854775807, i64 %add.i.i.i.i.i.i.i.i.i.i.i.i %implementation_.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %tmp.sroa.0.0.copyload, i64 8 store i64 %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i, ptr %implementation_.i.i.i.i.i.i.i.i.i, align 8 store i64 %call.i.i.i.i.i.i, ptr %ref.tmp4.i.i.i.i.i.i.i, align 8 - %10 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 8 - %11 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 32 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %10, i8 0, i64 20, i1 false) - store ptr @tot_client, ptr %11, align 8 - %12 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 40 - store ptr %tmp.sroa.2.0.copyload, ptr %12, align 8 - %13 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 48 - store ptr %tmp.sroa.0.0.copyload, ptr %13, align 8 - %14 = load ptr, ptr %tmp.sroa.0.0.copyload, align 8 + %9 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 8 + %10 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 32 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %9, i8 0, i64 20, i1 false) + store ptr @tot_client, ptr %10, align 8 + %11 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 40 + store ptr %tmp.sroa.2.0.copyload, ptr %11, align 8 + %12 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 48 + store ptr %tmp.sroa.0.0.copyload, ptr %12, align 8 + %13 = load ptr, ptr %tmp.sroa.0.0.copyload, align 8 %executor_.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %tmp.sroa.0.0.copyload, i64 64 - invoke void @_ZN4asio6detail22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS5_EEEEE10async_waitIZ5watchI16async_rpc_clientEvRNS_20basic_waitable_timerIS5_S7_NS_15any_io_executorEEERjRSt5dequeIT_SaISJ_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddiEUlRKSt10error_codeE_SE_EEvRNS9_19implementation_typeERSJ_RKT0_(ptr noundef nonnull align 8 dereferenceable(96) %14, ptr noundef nonnull align 8 dereferenceable(56) %implementation_.i.i.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %ref.tmp4.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %executor_.i.i.i.i.i.i.i.i.i.i.i.i) + invoke void @_ZN4asio6detail22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS5_EEEEE10async_waitIZ5watchI16async_rpc_clientEvRNS_20basic_waitable_timerIS5_S7_NS_15any_io_executorEEERjRSt5dequeIT_SaISJ_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddiEUlRKSt10error_codeE_SE_EEvRNS9_19implementation_typeERSJ_RKT0_(ptr noundef nonnull align 8 dereferenceable(96) %13, ptr noundef nonnull align 8 dereferenceable(56) %implementation_.i.i.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %ref.tmp4.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %executor_.i.i.i.i.i.i.i.i.i.i.i.i) to label %invoke.cont5 unwind label %lpad4 invoke.cont5: ; preds = %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i @@ -35121,17 +35125,17 @@ invoke.cont5: ; preds = %_ZN4asio6detail19as br label %return lpad4: ; preds = %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i, %if.end.i.i.i.i.i.i.i.i.i.i.i - %15 = landingpad { ptr, i32 } + %14 = landingpad { ptr, i32 } catch ptr null - %16 = extractvalue { ptr, i32 } %15, 0 + %15 = extractvalue { ptr, i32 } %14, 0 fence release - %17 = call ptr @__cxa_begin_catch(ptr %16) #32 - %18 = load i64, ptr %this, align 8 - %and.i5 = and i64 %18, -4 - %19 = inttoptr i64 %and.i5 to ptr - %impl_7 = getelementptr inbounds nuw i8, ptr %19, i64 8 - %20 = load ptr, ptr %impl_7, align 8 - invoke void @_ZN4asio6detail9scheduler25capture_current_exceptionEv(ptr noundef nonnull align 8 dereferenceable(256) %20) + %16 = call ptr @__cxa_begin_catch(ptr %15) #32 + %17 = load i64, ptr %this, align 8 + %and.i5 = and i64 %17, -4 + %18 = inttoptr i64 %and.i5 to ptr + %impl_7 = getelementptr inbounds nuw i8, ptr %18, i64 8 + %19 = load ptr, ptr %impl_7, align 8 + invoke void @_ZN4asio6detail9scheduler25capture_current_exceptionEv(ptr noundef nonnull align 8 dereferenceable(256) %19) to label %invoke.cont9 unwind label %lpad8 invoke.cont9: ; preds = %lpad4 @@ -35139,7 +35143,7 @@ invoke.cont9: ; preds = %lpad4 br label %return lpad8: ; preds = %lpad4 - %21 = landingpad { ptr, i32 } + %20 = landingpad { ptr, i32 } cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -35154,12 +35158,12 @@ if.end: ; preds = %if.end.i.i, %entry. cond.true.i.i.i.i: ; preds = %if.end %value_.i.i.i.i = getelementptr inbounds nuw i8, ptr %.pr, i64 8 - %22 = load ptr, ptr %value_.i.i.i.i, align 8 + %21 = load ptr, ptr %value_.i.i.i.i, align 8 br label %invoke.cont15 invoke.cont15: ; preds = %if.end.thread, %cond.true.i.i.i.i, %if.end %v17 = phi ptr [ %v, %cond.true.i.i.i.i ], [ %v, %if.end ], [ %v15, %if.end.thread ] - %cond.i.i.i.i = phi ptr [ %22, %cond.true.i.i.i.i ], [ null, %if.end ], [ null, %if.end.thread ] + %cond.i.i.i.i = phi ptr [ %21, %cond.true.i.i.i.i ], [ null, %if.end ], [ null, %if.end.thread ] %call2.i.i = tail call noundef ptr @_ZN4asio6detail16thread_info_base8allocateINS1_11default_tagEEEPvT_PS1_mm(ptr noundef %cond.i.i.i.i, i64 noundef 48, i64 noundef 8) store ptr %call2.i.i, ptr %v17, align 8 %p12 = getelementptr inbounds nuw i8, ptr %p, i64 16 @@ -35171,14 +35175,14 @@ invoke.cont15: ; preds = %if.end.thread, %con %handler_.i = getelementptr inbounds nuw i8, ptr %call2.i.i, i64 24 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %handler_.i, ptr noundef nonnull align 8 dereferenceable(16) %f, i64 16, i1 false) store ptr %call2.i.i, ptr %p12, align 8 - %23 = load i64, ptr %this, align 8 - %and.i6 = and i64 %23, -4 - %24 = inttoptr i64 %and.i6 to ptr - %impl_18 = getelementptr inbounds nuw i8, ptr %24, i64 8 - %25 = load ptr, ptr %impl_18, align 8 - %and21 = and i64 %23, 2 + %22 = load i64, ptr %this, align 8 + %and.i6 = and i64 %22, -4 + %23 = inttoptr i64 %and.i6 to ptr + %impl_18 = getelementptr inbounds nuw i8, ptr %23, i64 8 + %24 = load ptr, ptr %impl_18, align 8 + %and21 = and i64 %22, 2 %cmp22 = icmp ne i64 %and21, 0 - invoke void @_ZN4asio6detail9scheduler25post_immediate_completionEPNS0_19scheduler_operationEb(ptr noundef nonnull align 8 dereferenceable(256) %25, ptr noundef nonnull %call2.i.i, i1 noundef zeroext %cmp22) + invoke void @_ZN4asio6detail9scheduler25post_immediate_completionEPNS0_19scheduler_operationEb(ptr noundef nonnull align 8 dereferenceable(256) %24, ptr noundef nonnull %call2.i.i, i1 noundef zeroext %cmp22) to label %_ZN4asio6detail11executor_opINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EESaIvENS0_19scheduler_operationEE3ptrD2Ev.exit unwind label %lpad14 _ZN4asio6detail11executor_opINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EESaIvENS0_19scheduler_operationEE3ptrD2Ev.exit: ; preds = %invoke.cont15 @@ -35189,20 +35193,20 @@ return: ; preds = %_ZN4asio6detail11ex ret void lpad14: ; preds = %invoke.cont15 - %26 = landingpad { ptr, i32 } + %25 = landingpad { ptr, i32 } cleanup call void @_ZN4asio6detail11executor_opINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EESaIvENS0_19scheduler_operationEE3ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %p) #32 br label %eh.resume eh.resume: ; preds = %lpad8, %lpad14 - %.pn = phi { ptr, i32 } [ %21, %lpad8 ], [ %26, %lpad14 ] + %.pn = phi { ptr, i32 } [ %20, %lpad8 ], [ %25, %lpad14 ] resume { ptr, i32 } %.pn terminate.lpad: ; preds = %lpad8 - %27 = landingpad { ptr, i32 } + %26 = landingpad { ptr, i32 } catch ptr null - %28 = extractvalue { ptr, i32 } %27, 0 - call void @__clang_call_terminate(ptr %28) #37 + %27 = extractvalue { ptr, i32 } %26, 0 + call void @__clang_call_terminate(ptr %27) #37 unreachable } @@ -35836,26 +35840,30 @@ if.end.i.i.i.i.i: ; preds = %if.end42 br label %_Z5watchI16async_rpc_clientEvRN4asio20basic_waitable_timerINSt6chrono3_V212steady_clockENS1_11wait_traitsIS5_EENS1_15any_io_executorEEERjRSt5dequeIT_SaISD_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddi.exit _Z5watchI16async_rpc_clientEvRN4asio20basic_waitable_timerINSt6chrono3_V212steady_clockENS1_11wait_traitsIS5_EENS1_15any_io_executorEEERjRSt5dequeIT_SaISD_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddi.exit: ; preds = %if.end42, %if.end.i.i.i.i.i - %48 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i.i, i64 9223372035854775807) - %retval.sroa.0.0.i.i.i.i = add nsw i64 %48, 1000000000 + %cmp.i.i.i.i.i = icmp sgt i64 %call.i.i.i.i, -1 + %sub.i.i.i.i.i.i = xor i64 %call.i.i.i.i, 9223372036854775296 + %cmp.i8.i.i.i.i = icmp samesign ult i64 %sub.i.i.i.i.i.i, 1000000000 + %or.cond.i = select i1 %cmp.i.i.i.i.i, i1 %cmp.i8.i.i.i.i, i1 false + %add.i.i.i.i.i.i = add nsw i64 %call.i.i.i.i, 1000000000 + %retval.sroa.0.0.i.i.i.i = select i1 %or.cond.i, i64 9223372036854775807, i64 %add.i.i.i.i.i.i %implementation_.i.i.i = getelementptr inbounds nuw i8, ptr %37, i64 8 store i64 %retval.sroa.0.0.i.i.i.i, ptr %implementation_.i.i.i, align 8 store i64 %call21, ptr %ref.tmp4.i, align 8 - %49 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 8 - store double %41, ptr %49, align 8 - %50 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 16 - store double %43, ptr %50, align 8 - %51 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 24 - store i32 %44, ptr %51, align 8 - %52 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 32 - store ptr %38, ptr %52, align 8 - %53 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 40 - store ptr %40, ptr %53, align 8 - %54 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 48 - store ptr %37, ptr %54, align 8 - %55 = load ptr, ptr %37, align 8 + %48 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 8 + store double %41, ptr %48, align 8 + %49 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 16 + store double %43, ptr %49, align 8 + %50 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 24 + store i32 %44, ptr %50, align 8 + %51 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 32 + store ptr %38, ptr %51, align 8 + %52 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 40 + store ptr %40, ptr %52, align 8 + %53 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i, i64 48 + store ptr %37, ptr %53, align 8 + %54 = load ptr, ptr %37, align 8 %executor_.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %37, i64 64 - call void @_ZN4asio6detail22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS5_EEEEE10async_waitIZ5watchI16async_rpc_clientEvRNS_20basic_waitable_timerIS5_S7_NS_15any_io_executorEEERjRSt5dequeIT_SaISJ_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddiEUlRKSt10error_codeE_SE_EEvRNS9_19implementation_typeERSJ_RKT0_(ptr noundef nonnull align 8 dereferenceable(96) %55, ptr noundef nonnull align 8 dereferenceable(56) %implementation_.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %ref.tmp4.i, ptr noundef nonnull align 8 dereferenceable(56) %executor_.i.i.i.i.i.i) + call void @_ZN4asio6detail22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS5_EEEEE10async_waitIZ5watchI16async_rpc_clientEvRNS_20basic_waitable_timerIS5_S7_NS_15any_io_executorEEERjRSt5dequeIT_SaISJ_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddiEUlRKSt10error_codeE_SE_EEvRNS9_19implementation_typeERSJ_RKT0_(ptr noundef nonnull align 8 dereferenceable(96) %54, ptr noundef nonnull align 8 dereferenceable(56) %implementation_.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %ref.tmp4.i, ptr noundef nonnull align 8 dereferenceable(56) %executor_.i.i.i.i.i.i) call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %ref.tmp4.i) br label %if.end52 @@ -36723,22 +36731,26 @@ call2.i.i.i.i.i.i.i.i.i.i.i.noexc: ; preds = %if.end.i.i.i.i.i.i. br label %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i _ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i: ; preds = %call2.i.i.i.i.i.i.i.i.i.i.i.noexc, %if.then - %10 = call i64 @llvm.smin.i64(i64 %call.i.i.i.i.i.i.i.i.i.i, i64 9223372035854775807) - %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i = add nsw i64 %10, 1000000000 + %cmp.i.i.i.i.i.i.i.i.i.i.i = icmp sgt i64 %call.i.i.i.i.i.i.i.i.i.i, -1 + %sub.i.i.i.i.i.i.i.i.i.i.i.i = xor i64 %call.i.i.i.i.i.i.i.i.i.i, 9223372036854775296 + %cmp.i8.i.i.i.i.i.i.i.i.i.i = icmp samesign ult i64 %sub.i.i.i.i.i.i.i.i.i.i.i.i, 1000000000 + %or.cond.i.i.i.i.i.i.i = select i1 %cmp.i.i.i.i.i.i.i.i.i.i.i, i1 %cmp.i8.i.i.i.i.i.i.i.i.i.i, i1 false + %add.i.i.i.i.i.i.i.i.i.i.i.i = add nsw i64 %call.i.i.i.i.i.i.i.i.i.i, 1000000000 + %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i = select i1 %or.cond.i.i.i.i.i.i.i, i64 9223372036854775807, i64 %add.i.i.i.i.i.i.i.i.i.i.i.i %implementation_.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %handler.sroa.0.0.copyload, i64 8 store i64 %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i, ptr %implementation_.i.i.i.i.i.i.i.i.i, align 8 store i64 %call.i.i.i.i.i.i, ptr %ref.tmp4.i.i.i.i.i.i.i, align 8 - %11 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 8 - %12 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 32 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %11, i8 0, i64 20, i1 false) - store ptr @tot_client, ptr %12, align 8 - %13 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 40 - store ptr %handler.sroa.2.0.copyload, ptr %13, align 8 - %14 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 48 - store ptr %handler.sroa.0.0.copyload, ptr %14, align 8 - %15 = load ptr, ptr %handler.sroa.0.0.copyload, align 8 + %10 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 8 + %11 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 32 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %10, i8 0, i64 20, i1 false) + store ptr @tot_client, ptr %11, align 8 + %12 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 40 + store ptr %handler.sroa.2.0.copyload, ptr %12, align 8 + %13 = getelementptr inbounds nuw i8, ptr %ref.tmp4.i.i.i.i.i.i.i, i64 48 + store ptr %handler.sroa.0.0.copyload, ptr %13, align 8 + %14 = load ptr, ptr %handler.sroa.0.0.copyload, align 8 %executor_.i.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %handler.sroa.0.0.copyload, i64 64 - invoke void @_ZN4asio6detail22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS5_EEEEE10async_waitIZ5watchI16async_rpc_clientEvRNS_20basic_waitable_timerIS5_S7_NS_15any_io_executorEEERjRSt5dequeIT_SaISJ_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddiEUlRKSt10error_codeE_SE_EEvRNS9_19implementation_typeERSJ_RKT0_(ptr noundef nonnull align 8 dereferenceable(96) %15, ptr noundef nonnull align 8 dereferenceable(56) %implementation_.i.i.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %ref.tmp4.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %executor_.i.i.i.i.i.i.i.i.i.i.i.i) + invoke void @_ZN4asio6detail22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS5_EEEEE10async_waitIZ5watchI16async_rpc_clientEvRNS_20basic_waitable_timerIS5_S7_NS_15any_io_executorEEERjRSt5dequeIT_SaISJ_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddiEUlRKSt10error_codeE_SE_EEvRNS9_19implementation_typeERSJ_RKT0_(ptr noundef nonnull align 8 dereferenceable(96) %14, ptr noundef nonnull align 8 dereferenceable(56) %implementation_.i.i.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %ref.tmp4.i.i.i.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(56) %executor_.i.i.i.i.i.i.i.i.i.i.i.i) to label %invoke.cont6 unwind label %lpad5 invoke.cont6: ; preds = %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i @@ -36747,11 +36759,11 @@ invoke.cont6: ; preds = %_ZN4asio6detail19as br label %_ZN4asio6detail11executor_opINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EESaIvENS0_19scheduler_operationEE3ptrD2Ev.exit lpad5: ; preds = %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i, %if.end.i.i.i.i.i.i.i.i.i.i.i - %16 = landingpad { ptr, i32 } + %15 = landingpad { ptr, i32 } cleanup fence release call void @_ZN4asio6detail11executor_opINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EESaIvENS0_19scheduler_operationEE3ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %p) #32 - resume { ptr, i32 } %16 + resume { ptr, i32 } %15 _ZN4asio6detail11executor_opINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EESaIvENS0_19scheduler_operationEE3ptrD2Ev.exit: ; preds = %invoke.cont6, %invoke.cont3 ret void diff --git a/bench/yalantinglibs/optimized/data_gen.cpp.ll b/bench/yalantinglibs/optimized/data_gen.cpp.ll index 31d215d4f36..70e2064391c 100644 --- a/bench/yalantinglibs/optimized/data_gen.cpp.ll +++ b/bench/yalantinglibs/optimized/data_gen.cpp.ll @@ -23559,7 +23559,7 @@ _ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_t br i1 %cmp.i.i.i, label %if.then.i.i, label %if.else.i.i if.then.i.i: ; preds = %_ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEENS_15any_io_executorEEC2EiRKSB_.exit - %sub.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i + %sub.i.i.i.i = xor i64 %call.i.i, 9223372036854775807 %14 = load i64, ptr %expiry_time, align 8 %cmp.i8.i.i = icmp slt i64 %sub.i.i.i.i, %14 br i1 %cmp.i8.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i, label %if.end41.i.i @@ -26068,7 +26068,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -26126,7 +26126,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -37429,7 +37429,7 @@ if.end: ; preds = %entry br i1 %cmp.i.i.i.i, label %if.then.i.i.i, label %if.else.i.i.i if.then.i.i.i: ; preds = %if.end - %sub.i.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i.i + %sub.i.i.i.i.i = xor i64 %call.i.i.i, 9223372036854775807 %3 = load i64, ptr %keep_alive_timeout_duration_, align 8 %cmp.i8.i.i.i = icmp slt i64 %sub.i.i.i.i.i, %3 br i1 %cmp.i8.i.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i.i, label %if.end41.i.i.i @@ -118197,19 +118197,23 @@ init.ready: ; preds = %entry.resume invoke.cont18: ; preds = %init.ready %2 = load ptr, ptr %timer.reload.addr, align 8 %call.i.i.i = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #27 - %3 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i, i64 9223372036844775807) - %retval.sroa.0.0.i.i.i = add nsw i64 %3, 10000000 + %cmp.i.i.i.i = icmp sgt i64 %call.i.i.i, -1 + %sub.i.i.i.i.i = xor i64 %call.i.i.i, 9223372036854775680 + %cmp.i8.i.i.i = icmp samesign ult i64 %sub.i.i.i.i.i, 10000000 + %or.cond = select i1 %cmp.i.i.i.i, i1 %cmp.i8.i.i.i, i1 false + %add.i.i.i.i.i = add nsw i64 %call.i.i.i, 10000000 + %retval.sroa.0.0.i.i.i = select i1 %or.cond, i64 9223372036854775807, i64 %add.i.i.i.i.i %might_have_pending_waits.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 56 - %4 = load i8, ptr %might_have_pending_waits.i.i.i.i, align 8 - %tobool.i.i.i.i = trunc i8 %4 to i1 + %3 = load i8, ptr %might_have_pending_waits.i.i.i.i, align 8 + %tobool.i.i.i.i = trunc i8 %3 to i1 br i1 %tobool.i.i.i.i, label %if.end.i.i.i.i, label %invoke.cont19 if.end.i.i.i.i: ; preds = %invoke.cont18 %scheduler_.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 88 - %5 = load ptr, ptr %scheduler_.i.i.i.i, align 8 + %4 = load ptr, ptr %scheduler_.i.i.i.i, align 8 %timer_queue_.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 40 %timer_data.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 64 - %call2.i.i.i.i2 = invoke noundef i64 @_ZN4asio6detail13epoll_reactor12cancel_timerINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEEmRNS0_11timer_queueIT_EERNSC_14per_timer_dataEm(ptr noundef nonnull align 8 dereferenceable(216) %5, ptr noundef nonnull align 8 dereferenceable(48) %timer_queue_.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(40) %timer_data.i.i.i.i, i64 noundef -1) + %call2.i.i.i.i2 = invoke noundef i64 @_ZN4asio6detail13epoll_reactor12cancel_timerINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEEmRNS0_11timer_queueIT_EERNSC_14per_timer_dataEm(ptr noundef nonnull align 8 dereferenceable(216) %4, ptr noundef nonnull align 8 dereferenceable(48) %timer_queue_.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(40) %timer_data.i.i.i.i, i64 noundef -1) to label %call2.i.i.i.i.noexc unwind label %lpad14 call2.i.i.i.i.noexc: ; preds = %if.end.i.i.i.i @@ -118223,10 +118227,10 @@ invoke.cont19: ; preds = %call2.i.i.i.i.noexc to label %CoroSave103 unwind label %terminate.lpad.i terminate.lpad.i: ; preds = %invoke.cont19 - %6 = landingpad { ptr, i32 } + %5 = landingpad { ptr, i32 } catch ptr null - %7 = extractvalue { ptr, i32 } %6, 0 - tail call void @__clang_call_terminate(ptr %7) #38 + %6 = extractvalue { ptr, i32 } %5, 0 + tail call void @__clang_call_terminate(ptr %6) #38 unreachable CoroSave103: ; preds = %invoke.cont19 @@ -118242,11 +118246,11 @@ CoroSave103: ; preds = %invoke.cont19 store i2 0, ptr %index.addr65.i, align 1 tail call void @llvm.experimental.noalias.scope.decl(metadata !1624) %_executor.i = getelementptr inbounds nuw i8, ptr %0, i64 24 - %8 = load ptr, ptr %_executor.i, align 8, !noalias !1624 + %7 = load ptr, ptr %_executor.i, align 8, !noalias !1624 tail call void @llvm.experimental.noalias.scope.decl(metadata !1627) tail call void @llvm.experimental.noalias.scope.decl(metadata !1630) %_executor.i.i.i = getelementptr inbounds nuw i8, ptr %call.i3, i64 24 - store ptr %8, ptr %_executor.i.i.i, align 8, !noalias !1633 + store ptr %7, ptr %_executor.i.i.i, align 8, !noalias !1633 store ptr null, ptr %ref.tmp22.reload.addr, align 8, !noalias !1633 store ptr %call.i3, ptr %ref.tmp21.reload.addr, align 8, !alias.scope !1633 store i2 1, ptr %index.addr, align 4 @@ -118255,38 +118259,38 @@ CoroSave103: ; preds = %invoke.cont19 ret void lpad10: ; preds = %init.ready - %9 = landingpad { ptr, i32 } + %8 = landingpad { ptr, i32 } catch ptr null br label %catch lpad14: ; preds = %if.end.i.i.i.i - %10 = landingpad { ptr, i32 } + %9 = landingpad { ptr, i32 } catch ptr null br label %ehcleanup51 await.ready: ; preds = %entry.resume - %11 = load ptr, ptr %ref.tmp21.reload.addr, align 8 - %12 = getelementptr inbounds nuw i8, ptr %11, i64 16 - %call2.i4 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNO12async_simple4coro6detail11LazyPromiseIbE6resultEv(ptr noundef nonnull align 8 dereferenceable(32) %12) + %10 = load ptr, ptr %ref.tmp21.reload.addr, align 8 + %11 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %call2.i4 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNO12async_simple4coro6detail11LazyPromiseIbE6resultEv(ptr noundef nonnull align 8 dereferenceable(32) %11) to label %call2.i.noexc unwind label %lpad37 call2.i.noexc: ; preds = %await.ready - %13 = load ptr, ptr %ref.tmp21.reload.addr, align 8 - %14 = getelementptr inbounds nuw i8, ptr %13, i64 8 - %15 = load ptr, ptr %14, align 8 - invoke fastcc void %15(ptr nonnull %13) + %12 = load ptr, ptr %ref.tmp21.reload.addr, align 8 + %13 = getelementptr inbounds nuw i8, ptr %12, i64 8 + %14 = load ptr, ptr %13, align 8 + invoke fastcc void %14(ptr nonnull %12) to label %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit unwind label %lpad37 _ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit: ; preds = %call2.i.noexc store ptr null, ptr %ref.tmp21.reload.addr, align 8 - %16 = load ptr, ptr %ref.tmp22.reload.addr, align 8 - %cmp.i.not.i.i = icmp eq ptr %16, null + %15 = load ptr, ptr %ref.tmp22.reload.addr, align 8 + %cmp.i.not.i.i = icmp eq ptr %15, null br i1 %cmp.i.not.i.i, label %_ZN12async_simple4coro4LazyIbED2Ev.exit, label %if.then.i.i if.then.i.i: ; preds = %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit - %17 = getelementptr inbounds nuw i8, ptr %16, i64 8 - %18 = load ptr, ptr %17, align 8 - invoke fastcc void %18(ptr nonnull %16) + %16 = getelementptr inbounds nuw i8, ptr %15, i64 8 + %17 = load ptr, ptr %16, align 8 + invoke fastcc void %17(ptr nonnull %15) to label %invoke.cont.i.i unwind label %terminate.lpad.i.i invoke.cont.i.i: ; preds = %if.then.i.i @@ -118294,10 +118298,10 @@ invoke.cont.i.i: ; preds = %if.then.i.i br label %_ZN12async_simple4coro4LazyIbED2Ev.exit terminate.lpad.i.i: ; preds = %if.then.i.i - %19 = landingpad { ptr, i32 } + %18 = landingpad { ptr, i32 } catch ptr null - %20 = extractvalue { ptr, i32 } %19, 0 - tail call void @__clang_call_terminate(ptr %20) #38 + %19 = extractvalue { ptr, i32 } %18, 0 + tail call void @__clang_call_terminate(ptr %19) #38 unreachable _ZN12async_simple4coro4LazyIbED2Ev.exit: ; preds = %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit, %invoke.cont.i.i @@ -118309,16 +118313,16 @@ cleanup50: ; preds = %_ZN12async_simple4c br label %CoroSave107 lpad37: ; preds = %call2.i.noexc, %await.ready - %21 = landingpad { ptr, i32 } + %20 = landingpad { ptr, i32 } catch ptr null - %22 = load ptr, ptr %ref.tmp21.reload.addr, align 8 - %cmp.i.not.i.i.i6 = icmp eq ptr %22, null + %21 = load ptr, ptr %ref.tmp21.reload.addr, align 8 + %cmp.i.not.i.i.i6 = icmp eq ptr %21, null br i1 %cmp.i.not.i.i.i6, label %ehcleanup, label %if.then.i.i.i7 if.then.i.i.i7: ; preds = %lpad37 - %23 = getelementptr inbounds nuw i8, ptr %22, i64 8 - %24 = load ptr, ptr %23, align 8 - invoke fastcc void %24(ptr nonnull %22) + %22 = getelementptr inbounds nuw i8, ptr %21, i64 8 + %23 = load ptr, ptr %22, align 8 + invoke fastcc void %23(ptr nonnull %21) to label %invoke.cont.i.i.i9 unwind label %terminate.lpad.i.i.i8 invoke.cont.i.i.i9: ; preds = %if.then.i.i.i7 @@ -118326,21 +118330,21 @@ invoke.cont.i.i.i9: ; preds = %if.then.i.i.i7 br label %ehcleanup terminate.lpad.i.i.i8: ; preds = %if.then.i.i.i7 - %25 = landingpad { ptr, i32 } + %24 = landingpad { ptr, i32 } catch ptr null - %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #38 + %25 = extractvalue { ptr, i32 } %24, 0 + tail call void @__clang_call_terminate(ptr %25) #38 unreachable ehcleanup: ; preds = %invoke.cont.i.i.i9, %lpad37 - %27 = load ptr, ptr %ref.tmp22.reload.addr, align 8 - %cmp.i.not.i.i11 = icmp eq ptr %27, null + %26 = load ptr, ptr %ref.tmp22.reload.addr, align 8 + %cmp.i.not.i.i11 = icmp eq ptr %26, null br i1 %cmp.i.not.i.i11, label %ehcleanup51, label %if.then.i.i12 if.then.i.i12: ; preds = %ehcleanup - %28 = getelementptr inbounds nuw i8, ptr %27, i64 8 - %29 = load ptr, ptr %28, align 8 - invoke fastcc void %29(ptr nonnull %27) + %27 = getelementptr inbounds nuw i8, ptr %26, i64 8 + %28 = load ptr, ptr %27, align 8 + invoke fastcc void %28(ptr nonnull %26) to label %invoke.cont.i.i14 unwind label %terminate.lpad.i.i13 invoke.cont.i.i14: ; preds = %if.then.i.i12 @@ -118348,26 +118352,26 @@ invoke.cont.i.i14: ; preds = %if.then.i.i12 br label %ehcleanup51 terminate.lpad.i.i13: ; preds = %if.then.i.i12 - %30 = landingpad { ptr, i32 } + %29 = landingpad { ptr, i32 } catch ptr null - %31 = extractvalue { ptr, i32 } %30, 0 - tail call void @__clang_call_terminate(ptr %31) #38 + %30 = extractvalue { ptr, i32 } %29, 0 + tail call void @__clang_call_terminate(ptr %30) #38 unreachable lpad48: ; preds = %_ZN12async_simple4coro4LazyIbED2Ev.exit - %32 = landingpad { ptr, i32 } + %31 = landingpad { ptr, i32 } catch ptr null br label %ehcleanup51 ehcleanup51: ; preds = %invoke.cont.i.i14, %ehcleanup, %lpad48, %lpad14 - %.pn1 = phi { ptr, i32 } [ %32, %lpad48 ], [ %10, %lpad14 ], [ %21, %ehcleanup ], [ %21, %invoke.cont.i.i14 ] + %.pn1 = phi { ptr, i32 } [ %31, %lpad48 ], [ %9, %lpad14 ], [ %20, %ehcleanup ], [ %20, %invoke.cont.i.i14 ] tail call void @_ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEENS_15any_io_executorEED2Ev(ptr noundef nonnull align 8 dereferenceable(120) %timer.reload.addr) #27 br label %catch catch: ; preds = %lpad10, %ehcleanup51 - %.pn1.pn = phi { ptr, i32 } [ %.pn1, %ehcleanup51 ], [ %9, %lpad10 ] + %.pn1.pn = phi { ptr, i32 } [ %.pn1, %ehcleanup51 ], [ %8, %lpad10 ] %exn.slot.2 = extractvalue { ptr, i32 } %.pn1.pn, 0 - %33 = tail call ptr @__cxa_begin_catch(ptr %exn.slot.2) #27 + %32 = tail call ptr @__cxa_begin_catch(ptr %exn.slot.2) #27 tail call void @_ZN12async_simple4coro6detail11LazyPromiseIvE19unhandled_exceptionEv(ptr noundef nonnull align 8 dereferenceable(24) %__promise.reload.addr) #27 invoke void @__cxa_end_catch() to label %CoroSave107 unwind label %lpad56 @@ -118376,16 +118380,16 @@ CoroSave107: ; preds = %cleanup50, %catch store ptr null, ptr %0, align 8 store i2 -2, ptr %index.addr, align 4 %retval.sroa.0.0.copyload.i16 = load ptr, ptr %__promise.reload.addr, align 8 - %34 = load ptr, ptr %retval.sroa.0.0.copyload.i16, align 8 - musttail call fastcc void %34(ptr nonnull %retval.sroa.0.0.copyload.i16) + %33 = load ptr, ptr %retval.sroa.0.0.copyload.i16, align 8 + musttail call fastcc void %33(ptr nonnull %retval.sroa.0.0.copyload.i16) ret void lpad56: ; preds = %catch - %35 = landingpad { ptr, i32 } + %34 = landingpad { ptr, i32 } cleanup store ptr null, ptr %0, align 8 store i2 -2, ptr %index.addr, align 4 - resume { ptr, i32 } %35 + resume { ptr, i32 } %34 } ; Function Attrs: mustprogress uwtable @@ -127391,7 +127395,7 @@ invoke.cont: ; preds = %entry.resume br i1 %cmp.i.i.i.i, label %if.then.i.i.i, label %if.else.i.i.i if.then.i.i.i: ; preds = %invoke.cont - %sub.i.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i.i + %sub.i.i.i.i.i = xor i64 %call.i.i.i, 9223372036854775807 %cmp.i8.i.i.i = icmp slt i64 %sub.i.i.i.i.i, %mul.i.i.i br i1 %cmp.i8.i.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i.i, label %if.end41.i.i.i @@ -130304,7 +130308,7 @@ invoke.cont: ; preds = %entry.resume br i1 %cmp.i.i.i.i, label %if.then.i.i.i, label %if.else.i.i.i if.then.i.i.i: ; preds = %invoke.cont - %sub.i.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i.i + %sub.i.i.i.i.i = xor i64 %call.i.i.i, 9223372036854775807 %cmp.i8.i.i.i = icmp slt i64 %sub.i.i.i.i.i, %mul.i.i.i br i1 %cmp.i8.i.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i.i, label %if.end41.i.i.i diff --git a/bench/yalantinglibs/optimized/server.cpp.ll b/bench/yalantinglibs/optimized/server.cpp.ll index d475c0fe917..49b00d7957e 100644 --- a/bench/yalantinglibs/optimized/server.cpp.ll +++ b/bench/yalantinglibs/optimized/server.cpp.ll @@ -17719,7 +17719,7 @@ _ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_t br i1 %cmp.i.i.i, label %if.then.i.i, label %if.else.i.i if.then.i.i: ; preds = %_ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEENS_15any_io_executorEEC2EiRKSB_.exit - %sub.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i + %sub.i.i.i.i = xor i64 %call.i.i, 9223372036854775807 %14 = load i64, ptr %expiry_time, align 8 %cmp.i8.i.i = icmp slt i64 %sub.i.i.i.i, %14 br i1 %cmp.i8.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i, label %if.end41.i.i @@ -20228,7 +20228,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -20286,7 +20286,7 @@ if.else.i: ; preds = %if.then.i br i1 %cmp.i.i.i, label %if.end5.i, label %if.else20.i if.else20.i: ; preds = %if.else.i - %sub.i.i26.i = sub nuw nsw i64 9223372036854775807, %retval.sroa.0.0.copyload.i.i.i + %sub.i.i26.i = xor i64 %retval.sroa.0.0.copyload.i.i.i, 9223372036854775807 %sub.i.i29.i = sub nsw i64 0, %call.i %cmp.i30.i = icmp samesign ult i64 %sub.i.i26.i, %sub.i.i29.i %sub.i.i33.i = sub nsw i64 %retval.sroa.0.0.copyload.i.i.i, %call.i @@ -34467,7 +34467,7 @@ if.end: ; preds = %entry br i1 %cmp.i.i.i.i, label %if.then.i.i.i, label %if.else.i.i.i if.then.i.i.i: ; preds = %if.end - %sub.i.i.i.i.i = sub nuw nsw i64 9223372036854775807, %call.i.i.i + %sub.i.i.i.i.i = xor i64 %call.i.i.i, 9223372036854775807 %3 = load i64, ptr %keep_alive_timeout_duration_, align 8 %cmp.i8.i.i.i = icmp slt i64 %sub.i.i.i.i.i, %3 br i1 %cmp.i8.i.i.i, label %_ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS4_EEE3addERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEERKSC_.exit.i.i, label %if.end41.i.i.i @@ -77497,19 +77497,23 @@ init.ready: ; preds = %entry.resume invoke.cont18: ; preds = %init.ready %2 = load ptr, ptr %timer.reload.addr, align 8 %call.i.i.i = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #34 - %3 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i, i64 9223372036844775807) - %retval.sroa.0.0.i.i.i = add nsw i64 %3, 10000000 + %cmp.i.i.i.i = icmp sgt i64 %call.i.i.i, -1 + %sub.i.i.i.i.i = xor i64 %call.i.i.i, 9223372036854775680 + %cmp.i8.i.i.i = icmp samesign ult i64 %sub.i.i.i.i.i, 10000000 + %or.cond = select i1 %cmp.i.i.i.i, i1 %cmp.i8.i.i.i, i1 false + %add.i.i.i.i.i = add nsw i64 %call.i.i.i, 10000000 + %retval.sroa.0.0.i.i.i = select i1 %or.cond, i64 9223372036854775807, i64 %add.i.i.i.i.i %might_have_pending_waits.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 56 - %4 = load i8, ptr %might_have_pending_waits.i.i.i.i, align 8 - %tobool.i.i.i.i = trunc i8 %4 to i1 + %3 = load i8, ptr %might_have_pending_waits.i.i.i.i, align 8 + %tobool.i.i.i.i = trunc i8 %3 to i1 br i1 %tobool.i.i.i.i, label %if.end.i.i.i.i, label %invoke.cont19 if.end.i.i.i.i: ; preds = %invoke.cont18 %scheduler_.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 88 - %5 = load ptr, ptr %scheduler_.i.i.i.i, align 8 + %4 = load ptr, ptr %scheduler_.i.i.i.i, align 8 %timer_queue_.i.i.i.i = getelementptr inbounds nuw i8, ptr %2, i64 40 %timer_data.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 64 - %call2.i.i.i.i2 = invoke noundef i64 @_ZN4asio6detail13epoll_reactor12cancel_timerINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEEmRNS0_11timer_queueIT_EERNSC_14per_timer_dataEm(ptr noundef nonnull align 8 dereferenceable(216) %5, ptr noundef nonnull align 8 dereferenceable(48) %timer_queue_.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(40) %timer_data.i.i.i.i, i64 noundef -1) + %call2.i.i.i.i2 = invoke noundef i64 @_ZN4asio6detail13epoll_reactor12cancel_timerINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEEmRNS0_11timer_queueIT_EERNSC_14per_timer_dataEm(ptr noundef nonnull align 8 dereferenceable(216) %4, ptr noundef nonnull align 8 dereferenceable(48) %timer_queue_.i.i.i.i, ptr noundef nonnull align 8 dereferenceable(40) %timer_data.i.i.i.i, i64 noundef -1) to label %call2.i.i.i.i.noexc unwind label %lpad14 call2.i.i.i.i.noexc: ; preds = %if.end.i.i.i.i @@ -77523,10 +77527,10 @@ invoke.cont19: ; preds = %call2.i.i.i.i.noexc to label %CoroSave103 unwind label %terminate.lpad.i terminate.lpad.i: ; preds = %invoke.cont19 - %6 = landingpad { ptr, i32 } + %5 = landingpad { ptr, i32 } catch ptr null - %7 = extractvalue { ptr, i32 } %6, 0 - tail call void @__clang_call_terminate(ptr %7) #38 + %6 = extractvalue { ptr, i32 } %5, 0 + tail call void @__clang_call_terminate(ptr %6) #38 unreachable CoroSave103: ; preds = %invoke.cont19 @@ -77542,11 +77546,11 @@ CoroSave103: ; preds = %invoke.cont19 store i2 0, ptr %index.addr65.i, align 1 tail call void @llvm.experimental.noalias.scope.decl(metadata !1235) %_executor.i = getelementptr inbounds nuw i8, ptr %0, i64 24 - %8 = load ptr, ptr %_executor.i, align 8, !noalias !1235 + %7 = load ptr, ptr %_executor.i, align 8, !noalias !1235 tail call void @llvm.experimental.noalias.scope.decl(metadata !1238) tail call void @llvm.experimental.noalias.scope.decl(metadata !1241) %_executor.i.i.i = getelementptr inbounds nuw i8, ptr %call.i3, i64 24 - store ptr %8, ptr %_executor.i.i.i, align 8, !noalias !1244 + store ptr %7, ptr %_executor.i.i.i, align 8, !noalias !1244 store ptr null, ptr %ref.tmp22.reload.addr, align 8, !noalias !1244 store ptr %call.i3, ptr %ref.tmp21.reload.addr, align 8, !alias.scope !1244 store i2 1, ptr %index.addr, align 4 @@ -77555,38 +77559,38 @@ CoroSave103: ; preds = %invoke.cont19 ret void lpad10: ; preds = %init.ready - %9 = landingpad { ptr, i32 } + %8 = landingpad { ptr, i32 } catch ptr null br label %catch lpad14: ; preds = %if.end.i.i.i.i - %10 = landingpad { ptr, i32 } + %9 = landingpad { ptr, i32 } catch ptr null br label %ehcleanup51 await.ready: ; preds = %entry.resume - %11 = load ptr, ptr %ref.tmp21.reload.addr, align 8 - %12 = getelementptr inbounds nuw i8, ptr %11, i64 16 - %call2.i4 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNO12async_simple4coro6detail11LazyPromiseIbE6resultEv(ptr noundef nonnull align 8 dereferenceable(32) %12) + %10 = load ptr, ptr %ref.tmp21.reload.addr, align 8 + %11 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %call2.i4 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNO12async_simple4coro6detail11LazyPromiseIbE6resultEv(ptr noundef nonnull align 8 dereferenceable(32) %11) to label %call2.i.noexc unwind label %lpad37 call2.i.noexc: ; preds = %await.ready - %13 = load ptr, ptr %ref.tmp21.reload.addr, align 8 - %14 = getelementptr inbounds nuw i8, ptr %13, i64 8 - %15 = load ptr, ptr %14, align 8 - invoke fastcc void %15(ptr nonnull %13) + %12 = load ptr, ptr %ref.tmp21.reload.addr, align 8 + %13 = getelementptr inbounds nuw i8, ptr %12, i64 8 + %14 = load ptr, ptr %13, align 8 + invoke fastcc void %14(ptr nonnull %12) to label %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit unwind label %lpad37 _ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit: ; preds = %call2.i.noexc store ptr null, ptr %ref.tmp21.reload.addr, align 8 - %16 = load ptr, ptr %ref.tmp22.reload.addr, align 8 - %cmp.i.not.i.i = icmp eq ptr %16, null + %15 = load ptr, ptr %ref.tmp22.reload.addr, align 8 + %cmp.i.not.i.i = icmp eq ptr %15, null br i1 %cmp.i.not.i.i, label %_ZN12async_simple4coro4LazyIbED2Ev.exit, label %if.then.i.i if.then.i.i: ; preds = %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit - %17 = getelementptr inbounds nuw i8, ptr %16, i64 8 - %18 = load ptr, ptr %17, align 8 - invoke fastcc void %18(ptr nonnull %16) + %16 = getelementptr inbounds nuw i8, ptr %15, i64 8 + %17 = load ptr, ptr %16, align 8 + invoke fastcc void %17(ptr nonnull %15) to label %invoke.cont.i.i unwind label %terminate.lpad.i.i invoke.cont.i.i: ; preds = %if.then.i.i @@ -77594,10 +77598,10 @@ invoke.cont.i.i: ; preds = %if.then.i.i br label %_ZN12async_simple4coro4LazyIbED2Ev.exit terminate.lpad.i.i: ; preds = %if.then.i.i - %19 = landingpad { ptr, i32 } + %18 = landingpad { ptr, i32 } catch ptr null - %20 = extractvalue { ptr, i32 } %19, 0 - tail call void @__clang_call_terminate(ptr %20) #38 + %19 = extractvalue { ptr, i32 } %18, 0 + tail call void @__clang_call_terminate(ptr %19) #38 unreachable _ZN12async_simple4coro4LazyIbED2Ev.exit: ; preds = %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit, %invoke.cont.i.i @@ -77609,16 +77613,16 @@ cleanup50: ; preds = %_ZN12async_simple4c br label %CoroSave107 lpad37: ; preds = %call2.i.noexc, %await.ready - %21 = landingpad { ptr, i32 } + %20 = landingpad { ptr, i32 } catch ptr null - %22 = load ptr, ptr %ref.tmp21.reload.addr, align 8 - %cmp.i.not.i.i.i6 = icmp eq ptr %22, null + %21 = load ptr, ptr %ref.tmp21.reload.addr, align 8 + %cmp.i.not.i.i.i6 = icmp eq ptr %21, null br i1 %cmp.i.not.i.i.i6, label %ehcleanup, label %if.then.i.i.i7 if.then.i.i.i7: ; preds = %lpad37 - %23 = getelementptr inbounds nuw i8, ptr %22, i64 8 - %24 = load ptr, ptr %23, align 8 - invoke fastcc void %24(ptr nonnull %22) + %22 = getelementptr inbounds nuw i8, ptr %21, i64 8 + %23 = load ptr, ptr %22, align 8 + invoke fastcc void %23(ptr nonnull %21) to label %invoke.cont.i.i.i9 unwind label %terminate.lpad.i.i.i8 invoke.cont.i.i.i9: ; preds = %if.then.i.i.i7 @@ -77626,21 +77630,21 @@ invoke.cont.i.i.i9: ; preds = %if.then.i.i.i7 br label %ehcleanup terminate.lpad.i.i.i8: ; preds = %if.then.i.i.i7 - %25 = landingpad { ptr, i32 } + %24 = landingpad { ptr, i32 } catch ptr null - %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #38 + %25 = extractvalue { ptr, i32 } %24, 0 + tail call void @__clang_call_terminate(ptr %25) #38 unreachable ehcleanup: ; preds = %invoke.cont.i.i.i9, %lpad37 - %27 = load ptr, ptr %ref.tmp22.reload.addr, align 8 - %cmp.i.not.i.i11 = icmp eq ptr %27, null + %26 = load ptr, ptr %ref.tmp22.reload.addr, align 8 + %cmp.i.not.i.i11 = icmp eq ptr %26, null br i1 %cmp.i.not.i.i11, label %ehcleanup51, label %if.then.i.i12 if.then.i.i12: ; preds = %ehcleanup - %28 = getelementptr inbounds nuw i8, ptr %27, i64 8 - %29 = load ptr, ptr %28, align 8 - invoke fastcc void %29(ptr nonnull %27) + %27 = getelementptr inbounds nuw i8, ptr %26, i64 8 + %28 = load ptr, ptr %27, align 8 + invoke fastcc void %28(ptr nonnull %26) to label %invoke.cont.i.i14 unwind label %terminate.lpad.i.i13 invoke.cont.i.i14: ; preds = %if.then.i.i12 @@ -77648,26 +77652,26 @@ invoke.cont.i.i14: ; preds = %if.then.i.i12 br label %ehcleanup51 terminate.lpad.i.i13: ; preds = %if.then.i.i12 - %30 = landingpad { ptr, i32 } + %29 = landingpad { ptr, i32 } catch ptr null - %31 = extractvalue { ptr, i32 } %30, 0 - tail call void @__clang_call_terminate(ptr %31) #38 + %30 = extractvalue { ptr, i32 } %29, 0 + tail call void @__clang_call_terminate(ptr %30) #38 unreachable lpad48: ; preds = %_ZN12async_simple4coro4LazyIbED2Ev.exit - %32 = landingpad { ptr, i32 } + %31 = landingpad { ptr, i32 } catch ptr null br label %ehcleanup51 ehcleanup51: ; preds = %invoke.cont.i.i14, %ehcleanup, %lpad48, %lpad14 - %.pn1 = phi { ptr, i32 } [ %32, %lpad48 ], [ %10, %lpad14 ], [ %21, %ehcleanup ], [ %21, %invoke.cont.i.i14 ] + %.pn1 = phi { ptr, i32 } [ %31, %lpad48 ], [ %9, %lpad14 ], [ %20, %ehcleanup ], [ %20, %invoke.cont.i.i14 ] tail call void @_ZN4asio6detail14io_object_implINS0_22deadline_timer_serviceINS0_18chrono_time_traitsINSt6chrono3_V212steady_clockENS_11wait_traitsIS6_EEEEEENS_15any_io_executorEED2Ev(ptr noundef nonnull align 8 dereferenceable(120) %timer.reload.addr) #34 br label %catch catch: ; preds = %lpad10, %ehcleanup51 - %.pn1.pn = phi { ptr, i32 } [ %.pn1, %ehcleanup51 ], [ %9, %lpad10 ] + %.pn1.pn = phi { ptr, i32 } [ %.pn1, %ehcleanup51 ], [ %8, %lpad10 ] %exn.slot.2 = extractvalue { ptr, i32 } %.pn1.pn, 0 - %33 = tail call ptr @__cxa_begin_catch(ptr %exn.slot.2) #34 + %32 = tail call ptr @__cxa_begin_catch(ptr %exn.slot.2) #34 tail call void @_ZN12async_simple4coro6detail11LazyPromiseIvE19unhandled_exceptionEv(ptr noundef nonnull align 8 dereferenceable(24) %__promise.reload.addr) #34 invoke void @__cxa_end_catch() to label %CoroSave107 unwind label %lpad56 @@ -77676,16 +77680,16 @@ CoroSave107: ; preds = %cleanup50, %catch store ptr null, ptr %0, align 8 store i2 -2, ptr %index.addr, align 4 %retval.sroa.0.0.copyload.i16 = load ptr, ptr %__promise.reload.addr, align 8 - %34 = load ptr, ptr %retval.sroa.0.0.copyload.i16, align 8 - musttail call fastcc void %34(ptr nonnull %retval.sroa.0.0.copyload.i16) + %33 = load ptr, ptr %retval.sroa.0.0.copyload.i16, align 8 + musttail call fastcc void %33(ptr nonnull %retval.sroa.0.0.copyload.i16) ret void lpad56: ; preds = %catch - %35 = landingpad { ptr, i32 } + %34 = landingpad { ptr, i32 } cleanup store ptr null, ptr %0, align 8 store i2 -2, ptr %index.addr, align 4 - resume { ptr, i32 } %35 + resume { ptr, i32 } %34 } ; Function Attrs: mustprogress uwtable diff --git a/bench/zxing/optimized/AZDetector.cpp.ll b/bench/zxing/optimized/AZDetector.cpp.ll index cf57d297b0f..f4a4a007099 100644 --- a/bench/zxing/optimized/AZDetector.cpp.ll +++ b/bench/zxing/optimized/AZDetector.cpp.ll @@ -2186,7 +2186,7 @@ _ZN5ZXing21FastEdgeToEdgeCounterC2ERKNS_15BitMatrixCursorINS_6PointTIiEEEE.exit2 %.sroa.975.0109 = phi i32 [ %80, %93 ], [ %122, %138 ] %.sroa.065.0108 = phi ptr [ %97, %93 ], [ %142, %138 ] %.sroa.968.0107 = phi i32 [ %98, %93 ], [ %143, %138 ] - %.084106 = phi i32 [ %104, %93 ], [ %147, %138 ] + %.084106 = phi i32 [ %104, %93 ], [ %148, %138 ] %.sroa.speculated.i.i = tail call i32 @llvm.smin.i32(i32 %.084106, i32 %.sroa.975.0109) %smax.i.i = tail call i32 @llvm.smax.i32(i32 %.sroa.speculated.i.i, i32 0) %106 = zext nneg i32 %smax.i.i to i64 @@ -2261,88 +2261,89 @@ _ZN5ZXing21FastEdgeToEdgeCounterC2ERKNS_15BitMatrixCursorINS_6PointTIiEEEE.exit2 %142 = getelementptr inbounds i8, ptr %.sroa.065.0108, i64 %141 %143 = sub nsw i32 %.sroa.968.0107, %139 %144 = trunc i32 %139 to i16 - %145 = sub nuw nsw i64 3, %indvars.iv - %146 = getelementptr inbounds nuw [7 x i16], ptr %7, i64 0, i64 %145 - store i16 %144, ptr %146, align 2 - %147 = sub nsw i32 %126, %139 + %145 = and i64 %indvars.iv, 4294967295 + %146 = xor i64 %145, 3 + %147 = getelementptr inbounds nuw [7 x i16], ptr %7, i64 0, i64 %146 + store i16 %144, ptr %147, align 2 + %148 = sub nsw i32 %126, %139 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %.lr.ph.i.i.i.i, label %105, !llvm.loop !56 .lr.ph.i.i.i.i: ; preds = %138, %.lr.ph.i.i.i.i %.08.i.i.i.idx.i = phi i64 [ %.08.i.i.i.add.i, %.lr.ph.i.i.i.i ], [ 0, %138 ] - %.057.i.i.i.i = phi i16 [ %149, %.lr.ph.i.i.i.i ], [ 0, %138 ] + %.057.i.i.i.i = phi i16 [ %150, %.lr.ph.i.i.i.i ], [ 0, %138 ] %.08.i.i.i.ptr.i = getelementptr inbounds nuw i8, ptr %7, i64 %.08.i.i.i.idx.i - %148 = load i16, ptr %.08.i.i.i.ptr.i, align 2 - %149 = add i16 %148, %.057.i.i.i.i + %149 = load i16, ptr %.08.i.i.i.ptr.i, align 2 + %150 = add i16 %149, %.057.i.i.i.i %.08.i.i.i.add.i = add nuw nsw i64 %.08.i.i.i.idx.i, 2 %.not.i.i.i.i = icmp eq i64 %.08.i.i.i.add.i, 14 br i1 %.not.i.i.i.i, label %_ZNK5ZXing11PatternView3sumEi.exit.i, label %.lr.ph.i.i.i.i, !llvm.loop !20 _ZNK5ZXing11PatternView3sumEi.exit.i: ; preds = %.lr.ph.i.i.i.i - %150 = uitofp i16 %149 to double - %151 = fdiv double %150, 7.000000e+00 - %152 = tail call double @llvm.fmuladd.f64(double %151, double 5.000000e-01, double 5.000000e-01) - br label %154 + %151 = uitofp i16 %150 to double + %152 = fdiv double %151, 7.000000e+00 + %153 = tail call double @llvm.fmuladd.f64(double %152, double 5.000000e-01, double 5.000000e-01) + br label %155 -153: ; preds = %154 +154: ; preds = %155 %indvars.iv.next.i45 = add nuw nsw i64 %indvars.iv.i44, 1 %exitcond.not.i46 = icmp eq i64 %indvars.iv.next.i45, 7 - br i1 %exitcond.not.i46, label %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit, label %154, !llvm.loop !57 - -154: ; preds = %153, %_ZNK5ZXing11PatternView3sumEi.exit.i - %indvars.iv.i44 = phi i64 [ 0, %_ZNK5ZXing11PatternView3sumEi.exit.i ], [ %indvars.iv.next.i45, %153 ] - %155 = getelementptr inbounds nuw i16, ptr %7, i64 %indvars.iv.i44 - %156 = load i16, ptr %155, align 2 - %157 = uitofp i16 %156 to double - %158 = getelementptr inbounds nuw [7 x i16], ptr %6, i64 0, i64 %indvars.iv.i44 - %159 = load i16, ptr %158, align 2 - %160 = uitofp i16 %159 to double - %161 = fneg double %160 - %162 = tail call double @llvm.fmuladd.f64(double %161, double %151, double %157) - %163 = tail call noundef double @llvm.fabs.f64(double %162) - %164 = fcmp ogt double %163, %152 - br i1 %164, label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread, label %153 - -_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit: ; preds = %153 - %165 = fcmp oeq double %151, 0.000000e+00 - br i1 %165, label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread, label %166 - -166: ; preds = %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit - br i1 %4, label %167, label %.lr.ph.i.i.i.preheader - -167: ; preds = %166 - %168 = lshr i16 %101, 1 - %169 = zext nneg i16 %168 to i32 - %reass.sub = sub i32 %169, %94 - %170 = add i32 %reass.sub, 1 - %171 = mul nsw i32 %170, %14 - %172 = mul nsw i32 %170, %10 - %173 = add nsw i32 %171, %.sroa.558.8.extract.trunc - store i32 %173, ptr %16, align 8 - %174 = add nsw i32 %172, %18 - store i32 %174, ptr %17, align 4 + br i1 %exitcond.not.i46, label %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit, label %155, !llvm.loop !57 + +155: ; preds = %154, %_ZNK5ZXing11PatternView3sumEi.exit.i + %indvars.iv.i44 = phi i64 [ 0, %_ZNK5ZXing11PatternView3sumEi.exit.i ], [ %indvars.iv.next.i45, %154 ] + %156 = getelementptr inbounds nuw i16, ptr %7, i64 %indvars.iv.i44 + %157 = load i16, ptr %156, align 2 + %158 = uitofp i16 %157 to double + %159 = getelementptr inbounds nuw [7 x i16], ptr %6, i64 0, i64 %indvars.iv.i44 + %160 = load i16, ptr %159, align 2 + %161 = uitofp i16 %160 to double + %162 = fneg double %161 + %163 = tail call double @llvm.fmuladd.f64(double %162, double %152, double %158) + %164 = tail call noundef double @llvm.fabs.f64(double %163) + %165 = fcmp ogt double %164, %153 + br i1 %165, label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread, label %154 + +_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit: ; preds = %154 + %166 = fcmp oeq double %152, 0.000000e+00 + br i1 %166, label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread, label %167 + +167: ; preds = %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit + br i1 %4, label %168, label %.lr.ph.i.i.i.preheader + +168: ; preds = %167 + %169 = lshr i16 %101, 1 + %170 = zext nneg i16 %169 to i32 + %reass.sub = sub i32 %170, %94 + %171 = add i32 %reass.sub, 1 + %172 = mul nsw i32 %171, %14 + %173 = mul nsw i32 %171, %10 + %174 = add nsw i32 %172, %.sroa.558.8.extract.trunc + store i32 %174, ptr %16, align 8 + %175 = add nsw i32 %173, %18 + store i32 %175, ptr %17, align 4 br label %.lr.ph.i.i.i.preheader -.lr.ph.i.i.i.preheader: ; preds = %167, %166 +.lr.ph.i.i.i.preheader: ; preds = %168, %167 br label %.lr.ph.i.i.i .lr.ph.i.i.i: ; preds = %.lr.ph.i.i.i.preheader, %.lr.ph.i.i.i %.08.i.i.idx.i = phi i64 [ %.08.i.i.add.i, %.lr.ph.i.i.i ], [ 0, %.lr.ph.i.i.i.preheader ] - %.057.i.i.i = phi i16 [ %176, %.lr.ph.i.i.i ], [ 0, %.lr.ph.i.i.i.preheader ] + %.057.i.i.i = phi i16 [ %177, %.lr.ph.i.i.i ], [ 0, %.lr.ph.i.i.i.preheader ] %.08.i.i.ptr.i = getelementptr inbounds nuw i8, ptr %7, i64 %.08.i.i.idx.i - %175 = load i16, ptr %.08.i.i.ptr.i, align 2 - %176 = add i16 %175, %.057.i.i.i + %176 = load i16, ptr %.08.i.i.ptr.i, align 2 + %177 = add i16 %176, %.057.i.i.i %.08.i.i.add.i = add nuw nsw i64 %.08.i.i.idx.i, 2 %.not.i.i.i48 = icmp eq i64 %.08.i.i.add.i, 14 br i1 %.not.i.i.i48, label %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit, label %.lr.ph.i.i.i, !llvm.loop !20 _ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit: ; preds = %.lr.ph.i.i.i - %177 = zext i16 %176 to i32 + %178 = zext i16 %177 to i32 br label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread -_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread: ; preds = %130, %109, %154, %85, %67, %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit - %.013 = phi i32 [ %177, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit ], [ 0, %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit ], [ 0, %67 ], [ 0, %85 ], [ 0, %154 ], [ 0, %109 ], [ 0, %130 ] +_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread: ; preds = %130, %109, %155, %85, %67, %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit + %.013 = phi i32 [ %178, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit ], [ 0, %_ZN5ZXing9IsPatternILb0ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd.exit ], [ 0, %67 ], [ 0, %85 ], [ 0, %155 ], [ 0, %109 ], [ 0, %130 ] ret i32 %.013 } @@ -2530,7 +2531,7 @@ _ZN5ZXing21FastEdgeToEdgeCounterC2ERKNS_15BitMatrixCursorINS_6PointTIiEEEE.exit2 %.sroa.970.0102 = phi i32 [ %81, %94 ], [ %123, %139 ] %.sroa.060.0101 = phi ptr [ %98, %94 ], [ %143, %139 ] %.sroa.963.0100 = phi i32 [ %99, %94 ], [ %144, %139 ] - %.07999 = phi i32 [ %105, %94 ], [ %148, %139 ] + %.07999 = phi i32 [ %105, %94 ], [ %149, %139 ] %.sroa.speculated.i.i = tail call i32 @llvm.smin.i32(i32 %.07999, i32 %.sroa.970.0102) %smax.i.i = tail call i32 @llvm.smax.i32(i32 %.sroa.speculated.i.i, i32 0) %107 = zext nneg i32 %smax.i.i to i64 @@ -2605,64 +2606,65 @@ _ZN5ZXing21FastEdgeToEdgeCounterC2ERKNS_15BitMatrixCursorINS_6PointTIiEEEE.exit2 %143 = getelementptr inbounds i8, ptr %.sroa.060.0101, i64 %142 %144 = sub nsw i32 %.sroa.963.0100, %140 %145 = trunc i32 %140 to i16 - %146 = sub nuw nsw i64 3, %indvars.iv - %147 = getelementptr inbounds nuw [7 x i16], ptr %7, i64 0, i64 %146 - store i16 %145, ptr %147, align 2 - %148 = sub nsw i32 %127, %140 + %146 = and i64 %indvars.iv, 4294967295 + %147 = xor i64 %146, 3 + %148 = getelementptr inbounds nuw [7 x i16], ptr %7, i64 0, i64 %147 + store i16 %145, ptr %148, align 2 + %149 = sub nsw i32 %127, %140 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 - br i1 %exitcond.not, label %149, label %106, !llvm.loop !61 + br i1 %exitcond.not, label %150, label %106, !llvm.loop !61 -149: ; preds = %139 +150: ; preds = %139 store ptr %7, ptr %8, align 8 - %150 = getelementptr inbounds nuw i8, ptr %8, i64 8 - store i32 7, ptr %150, align 8 - %151 = getelementptr inbounds nuw i8, ptr %8, i64 16 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %151, i8 0, i64 16, i1 false) - %152 = call noundef double @_ZN5ZXing9IsPatternILb1ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 2 dereferenceable(14) %6, i32 noundef 0, double noundef 0.000000e+00, double noundef 0.000000e+00) - %153 = fcmp oeq double %152, 0.000000e+00 - br i1 %153, label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread, label %154 - -154: ; preds = %149 - br i1 %4, label %155, label %.lr.ph.i.i.i.preheader - -155: ; preds = %154 - %156 = load i16, ptr %103, align 2 - %157 = lshr i16 %156, 1 - %158 = zext nneg i16 %157 to i32 - %reass.sub = sub i32 %158, %95 - %159 = add i32 %reass.sub, 1 - %160 = load i32, ptr %9, align 8 - %161 = mul nsw i32 %159, %160 - %162 = load i32, ptr %10, align 4 - %163 = mul nsw i32 %159, %162 - %164 = load i32, ptr %17, align 8 - %165 = add nsw i32 %161, %164 - store i32 %165, ptr %17, align 8 - %166 = load i32, ptr %18, align 4 - %167 = add nsw i32 %166, %163 - store i32 %167, ptr %18, align 4 + %151 = getelementptr inbounds nuw i8, ptr %8, i64 8 + store i32 7, ptr %151, align 8 + %152 = getelementptr inbounds nuw i8, ptr %8, i64 16 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %152, i8 0, i64 16, i1 false) + %153 = call noundef double @_ZN5ZXing9IsPatternILb1ELi7ELi7EEEdRKNS_11PatternViewERKNS_12FixedPatternIXT0_EXT1_ELb0EEEidd(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 2 dereferenceable(14) %6, i32 noundef 0, double noundef 0.000000e+00, double noundef 0.000000e+00) + %154 = fcmp oeq double %153, 0.000000e+00 + br i1 %154, label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread, label %155 + +155: ; preds = %150 + br i1 %4, label %156, label %.lr.ph.i.i.i.preheader + +156: ; preds = %155 + %157 = load i16, ptr %103, align 2 + %158 = lshr i16 %157, 1 + %159 = zext nneg i16 %158 to i32 + %reass.sub = sub i32 %159, %95 + %160 = add i32 %reass.sub, 1 + %161 = load i32, ptr %9, align 8 + %162 = mul nsw i32 %160, %161 + %163 = load i32, ptr %10, align 4 + %164 = mul nsw i32 %160, %163 + %165 = load i32, ptr %17, align 8 + %166 = add nsw i32 %162, %165 + store i32 %166, ptr %17, align 8 + %167 = load i32, ptr %18, align 4 + %168 = add nsw i32 %167, %164 + store i32 %168, ptr %18, align 4 br label %.lr.ph.i.i.i.preheader -.lr.ph.i.i.i.preheader: ; preds = %155, %154 +.lr.ph.i.i.i.preheader: ; preds = %156, %155 br label %.lr.ph.i.i.i .lr.ph.i.i.i: ; preds = %.lr.ph.i.i.i.preheader, %.lr.ph.i.i.i %.08.i.i.idx.i = phi i64 [ %.08.i.i.add.i, %.lr.ph.i.i.i ], [ 0, %.lr.ph.i.i.i.preheader ] - %.057.i.i.i = phi i16 [ %169, %.lr.ph.i.i.i ], [ 0, %.lr.ph.i.i.i.preheader ] + %.057.i.i.i = phi i16 [ %170, %.lr.ph.i.i.i ], [ 0, %.lr.ph.i.i.i.preheader ] %.08.i.i.ptr.i = getelementptr inbounds nuw i8, ptr %7, i64 %.08.i.i.idx.i - %168 = load i16, ptr %.08.i.i.ptr.i, align 2 - %169 = add i16 %168, %.057.i.i.i + %169 = load i16, ptr %.08.i.i.ptr.i, align 2 + %170 = add i16 %169, %.057.i.i.i %.08.i.i.add.i = add nuw nsw i64 %.08.i.i.idx.i, 2 %.not.i.i.i44 = icmp eq i64 %.08.i.i.add.i, 14 br i1 %.not.i.i.i44, label %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit, label %.lr.ph.i.i.i, !llvm.loop !20 _ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit: ; preds = %.lr.ph.i.i.i - %170 = zext i16 %169 to i32 + %171 = zext i16 %170 to i32 br label %_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread -_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread: ; preds = %131, %110, %86, %68, %149, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit - %.013 = phi i32 [ %170, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit ], [ 0, %149 ], [ 0, %68 ], [ 0, %86 ], [ 0, %110 ], [ 0, %131 ] +_ZN5ZXing21FastEdgeToEdgeCounter14stepToNextEdgeEi.exit.thread: ; preds = %131, %110, %86, %68, %150, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit + %.013 = phi i32 [ %171, %_ZN5ZXing6ReduceISt5arrayItLm7EEtSt4plusItEEET0_RKT_S5_T1_.exit ], [ 0, %150 ], [ 0, %68 ], [ 0, %86 ], [ 0, %110 ], [ 0, %131 ] ret i32 %.013 } diff --git a/bench/zxing/optimized/PDFCodewordDecoder.cpp.ll b/bench/zxing/optimized/PDFCodewordDecoder.cpp.ll index f33655687e3..3f046bc5b2e 100644 --- a/bench/zxing/optimized/PDFCodewordDecoder.cpp.ll +++ b/bench/zxing/optimized/PDFCodewordDecoder.cpp.ll @@ -365,9 +365,9 @@ define internal fastcc void @"_ZZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5ar store ptr %1, ptr getelementptr inbounds nuw (i8, ptr @_ZZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5arrayIiLm8EEE10ratioTable, i64 8), align 8 br label %3 -3: ; preds = %2, %21 - %indvars.iv14 = phi i64 [ 0, %2 ], [ %indvars.iv.next15, %21 ] - %4 = getelementptr inbounds nuw [2787 x i16], ptr @_ZN5ZXing6Pdf417L12SYMBOL_TABLEE, i64 0, i64 %indvars.iv14 +3: ; preds = %2, %23 + %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %23 ] + %4 = getelementptr inbounds nuw [2787 x i16], ptr @_ZN5ZXing6Pdf417L12SYMBOL_TABLEE, i64 0, i64 %indvars.iv %5 = load i16, ptr %4, align 2 %6 = zext i16 %5 to i32 %7 = or disjoint i32 %6, 65536 @@ -375,7 +375,7 @@ define internal fastcc void @"_ZZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5ar br label %.preheader .preheader: ; preds = %3, %._crit_edge - %indvars.iv = phi i64 [ 0, %3 ], [ %indvars.iv.next, %._crit_edge ] + %.0168 = phi i32 [ 0, %3 ], [ %22, %._crit_edge ] %.0177 = phi i32 [ %8, %3 ], [ %.lcssa, %._crit_edge ] %.0186 = phi i32 [ %7, %3 ], [ %.1.lcssa, %._crit_edge ] %9 = and i32 %.0186, 1 @@ -401,20 +401,21 @@ define internal fastcc void @"_ZZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5ar %.lcssa = phi i32 [ %9, %.preheader ], [ %13, %._crit_edge.loopexit ] %16 = fdiv float %.0.lcssa, 1.700000e+01 %17 = load ptr, ptr @_ZZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5arrayIiLm8EEE10ratioTable, align 8 - %18 = getelementptr inbounds nuw %"struct.std::array.1", ptr %17, i64 %indvars.iv14 - %19 = sub nuw nsw i64 7, %indvars.iv - %20 = getelementptr inbounds nuw [8 x float], ptr %18, i64 0, i64 %19 - store float %16, ptr %20, align 4 + %18 = getelementptr inbounds nuw %"struct.std::array.1", ptr %17, i64 %indvars.iv + %19 = xor i32 %.0168, 7 + %20 = zext nneg i32 %19 to i64 + %21 = getelementptr inbounds nuw [8 x float], ptr %18, i64 0, i64 %20 + store float %16, ptr %21, align 4 + %22 = add nuw nsw i32 %.0168, 1 + %exitcond.not = icmp eq i32 %22, 8 + br i1 %exitcond.not, label %23, label %.preheader, !llvm.loop !19 + +23: ; preds = %._crit_edge %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, 8 - br i1 %exitcond.not, label %21, label %.preheader, !llvm.loop !19 + %exitcond14.not = icmp eq i64 %indvars.iv.next, 2787 + br i1 %exitcond14.not, label %24, label %3, !llvm.loop !20 -21: ; preds = %._crit_edge - %indvars.iv.next15 = add nuw nsw i64 %indvars.iv14, 1 - %exitcond17.not = icmp eq i64 %indvars.iv.next15, 2787 - br i1 %exitcond17.not, label %22, label %3, !llvm.loop !20 - -22: ; preds = %21 +24: ; preds = %23 ret void } diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..e7cf79c9668 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/122542 export COMPTIME_MODE=0 # Please rebase manually