diff --git a/bench/coreutils-rs/optimized/56596qkor8w4ma8l.ll b/bench/coreutils-rs/optimized/56596qkor8w4ma8l.ll index fa485f83894..a715783c9a3 100644 --- a/bench/coreutils-rs/optimized/56596qkor8w4ma8l.ll +++ b/bench/coreutils-rs/optimized/56596qkor8w4ma8l.ll @@ -818,10 +818,8 @@ define hidden void @_ZN5uu_od9prn_float17format_item_flo3217h6de27fb484fc90ebE.l br i1 %or.cond13.i, label %22, label %14 14: ; preds = %2 - %15 = bitcast float %13 to i32 - %16 = and i32 %15, 2139095040 - %17 = icmp eq i32 %16, 0 - br i1 %17, label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit.i, label %22 + %15 = tail call i1 @llvm.is.fpclass.f32(float %13, i32 144) + br i1 %15, label %_ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit.i, label %20 _ZN5alloc3fmt6format17h7ead8f60e83381d7E.exit.i: ; preds = %14 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7), !noalias !116 diff --git a/bench/hermes/optimized/dtoa.c.ll b/bench/hermes/optimized/dtoa.c.ll index 9f46fc4e381..a4c846cf833 100644 --- a/bench/hermes/optimized/dtoa.c.ll +++ b/bench/hermes/optimized/dtoa.c.ll @@ -2655,9 +2655,7 @@ if.then940.i: ; preds = %if.end937.i %243 = load double, ptr %rv.i, align 8 %mul943.i = fmul double %243, 0x3950000000000000 store double %mul943.i, ptr %rv.i, align 8 - %244 = bitcast double %mul943.i to i64 - %245 = and i64 %244, 9218868437227405312 - %tobool946.not.i = icmp eq i64 %245, 0 + %244 = call i1 @llvm.is.fpclass.f64(double %mul943.i, i32 240) br i1 %tobool946.not.i, label %if.then947.i, label %ret.i if.then947.i: ; preds = %if.then940.i @@ -8128,6 +8126,9 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #15 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #15 + attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/libquic/optimized/dtoa.cc.ll b/bench/libquic/optimized/dtoa.cc.ll index 248ef3a678e..269e4580213 100644 --- a/bench/libquic/optimized/dtoa.cc.ll +++ b/bench/libquic/optimized/dtoa.cc.ll @@ -2359,9 +2359,7 @@ if.then789: ; preds = %if.end786 %222 = load double, ptr %rv, align 8 %mul792 = fmul double %222, 0x3950000000000000 store double %mul792, ptr %rv, align 8 - %223 = bitcast double %mul792 to i64 - %224 = and i64 %223, 9218868437227405312 - %tobool795.not = icmp eq i64 %224, 0 + %223 = tail call i1 @llvm.is.fpclass.f64(double %mul792, i32 240) br i1 %tobool795.not, label %if.then796, label %ret if.then796: ; preds = %if.then789 @@ -5957,6 +5955,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #15 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #15 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #13 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #13 diff --git a/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll b/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll index 832abef8cfe..659c9426de8 100644 --- a/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll +++ b/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll @@ -2876,14 +2876,10 @@ define hidden void @"_ZN136_$LT$palette..alpha..alpha..Alpha$LT$C2$C$T$GT$$u20$a %.0.i6.i.i = select i1 %5, float %.sroa.5.0.copyload, float %6 %7 = fmul float %.sroa.4.0.copyload, %.0.i6.i.i %8 = fadd float %.sroa.5.0.copyload, %7 - %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %8, i32 408) - %9 = bitcast float %8 to i32 - %10 = and i32 %9, 2139095040 - %11 = icmp ne i32 %10, 0 - %.0.i.i.i.i = and i1 %or.cond1.i.i.i, %11 - %12 = fmul float %7, 2.000000e+00 - %13 = fdiv float %12, %8 - %.0.i.i.i = select i1 %.0.i.i.i.i, float %13, float 0.000000e+00 + %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %8, i32 264) + %9 = fmul float %7, 2.000000e+00 + %10 = fdiv float %9, %8 + %11 = select i1 %or.cond1.i.i.i, float %10, float 0.000000e+00 store float %.sroa.01.0.copyload, ptr %0, align 4 %.sroa.43.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 4 store float %.0.i.i.i, ptr %.sroa.43.0..sroa_idx, align 4 @@ -4285,14 +4281,10 @@ define hidden void @"_ZN152_$LT$palette..hsv..Hsv$LT$S$C$T$GT$$u20$as$u20$palett %6 = load float, ptr %5, align 4, !noundef !7 %7 = fmul float %6, %.0.i6 %8 = fadd float %.val, %7 - %or.cond1.i = tail call i1 @llvm.is.fpclass.f32(float %8, i32 408) - %9 = bitcast float %8 to i32 - %10 = and i32 %9, 2139095040 - %11 = icmp ne i32 %10, 0 - %.0.i.i = and i1 %or.cond1.i, %11 - %12 = fmul float %7, 2.000000e+00 - %13 = fdiv float %12, %8 - %.0.i = select i1 %.0.i.i, float %13, float 0.000000e+00 + %or.cond1.i = tail call i1 @llvm.is.fpclass.f32(float %8, i32 264) + %9 = fmul float %7, 2.000000e+00 + %10 = fdiv float %9, %8 + %11 = select i1 %or.cond1.i, float %10, float 0.000000e+00 %.sroa.02.0.copyload = load float, ptr %1, align 4 store float %.sroa.02.0.copyload, ptr %0, align 4 %14 = getelementptr inbounds nuw i8, ptr %0, i64 4 @@ -31382,14 +31374,10 @@ define hidden void @"_ZN94_$LT$T$u20$as$u20$palette..convert..from_into_color_un %7 = load float, ptr %6, align 4, !alias.scope !6289, !noalias !6286, !noundef !7 %8 = fmul float %7, %.0.i6.i %9 = fadd float %.val.i, %8 - %or.cond1.i.i = tail call i1 @llvm.is.fpclass.f32(float %9, i32 408) - %10 = bitcast float %9 to i32 - %11 = and i32 %10, 2139095040 - %12 = icmp ne i32 %11, 0 - %.0.i.i.i = and i1 %or.cond1.i.i, %12 - %13 = fmul float %8, 2.000000e+00 - %14 = fdiv float %13, %9 - %.0.i.i = select i1 %.0.i.i.i, float %14, float 0.000000e+00 + %or.cond1.i.i = tail call i1 @llvm.is.fpclass.f32(float %9, i32 264) + %10 = fmul float %8, 2.000000e+00 + %11 = fdiv float %10, %9 + %12 = select i1 %or.cond1.i.i, float %11, float 0.000000e+00 %.sroa.02.0.copyload.i = load float, ptr %1, align 4, !alias.scope !6289, !noalias !6286 store float %.sroa.02.0.copyload.i, ptr %0, align 4, !alias.scope !6286, !noalias !6289 %15 = getelementptr inbounds nuw i8, ptr %0, i64 4 diff --git a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll index 1047a8f1fd8..e1db0658a53 100644 --- a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll +++ b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll @@ -65635,67 +65635,63 @@ define hidden void @"_ZN4core6option15Option$LT$T$GT$11map_or_else17ha57e4e493c8 %34 = load float, ptr %33, align 4, !alias.scope !18323, !noalias !18301, !noundef !4 %35 = fmul float %26, %34 %36 = fadd float %32, %35 - %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %36, i32 408) - %37 = bitcast float %36 to i32 - %38 = and i32 %37, 2139095040 - %39 = icmp ne i32 %38, 0 - %.0.i.i.i.i = select i1 %or.cond1.i.i.i, i1 %39, i1 false - br i1 %.0.i.i.i.i, label %"_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h2941e00db1d8e073E.exit", label %40 - -40: ; preds = %5 + %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %36, i32 264) + br i1 %or.cond1.i.i.i, label %"_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h2941e00db1d8e073E.exit", label %37 + +37:; preds = %5 tail call void @_ZN4core9panicking5panic17h90e84101c01877efE(ptr noalias noundef nonnull readonly align 1 @anon.ecbbdf4ce99fb387dde54de6349d4c38.181, i64 noundef 34, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.ecbbdf4ce99fb387dde54de6349d4c38.182) #50, !noalias !18326 unreachable "_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h2941e00db1d8e073E.exit": ; preds = %5 %41 = fmul float %7, %27 %42 = fmul float %18, %30 + %40 = fsub float %38, %39 + %41 = fmul float %12, %27 + %42 = fmul float %18, %34 %43 = fsub float %41, %42 - %44 = fmul float %12, %27 - %45 = fmul float %18, %34 + %44 = fmul float %12, %30 + %45 = fmul float %7, %34 %46 = fsub float %44, %45 - %47 = fmul float %12, %30 - %48 = fmul float %7, %34 + %47 = fmul float %14, %27 + %48 = fmul float %21, %30 %49 = fsub float %47, %48 - %50 = fmul float %14, %27 - %51 = fmul float %21, %30 + %50 = fmul float %9, %27 + %51 = fmul float %21, %34 %52 = fsub float %50, %51 - %53 = fmul float %9, %27 - %54 = fmul float %21, %34 + %53 = fmul float %9, %30 + %54 = fmul float %14, %34 %55 = fsub float %53, %54 - %56 = fmul float %9, %30 - %57 = fmul float %14, %34 - %58 = fsub float %56, %57 - %59 = fdiv float 1.000000e+00, %36 - %60 = fmul float %16, %59 - %61 = fneg float %58 - %62 = fmul float %59, %61 - %63 = fmul float %49, %59 - %64 = fneg float %23 - %65 = fmul float %59, %64 - %66 = fmul float %55, %59 - %67 = fneg float %46 - %68 = fmul float %59, %67 - %69 = fmul float %26, %59 - %70 = fneg float %52 - %71 = fmul float %59, %70 - %72 = fmul float %43, %59 - store float %60, ptr %0, align 4, !alias.scope !18301, !noalias !18296 - %73 = getelementptr inbounds nuw i8, ptr %0, i64 4 - store float %62, ptr %73, align 4, !alias.scope !18301, !noalias !18296 - %74 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store float %63, ptr %74, align 4, !alias.scope !18301, !noalias !18296 - %75 = getelementptr inbounds nuw i8, ptr %0, i64 12 - store float %65, ptr %75, align 4, !alias.scope !18301, !noalias !18296 - %76 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store float %66, ptr %76, align 4, !alias.scope !18301, !noalias !18296 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 20 - store float %68, ptr %77, align 4, !alias.scope !18301, !noalias !18296 - %78 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store float %69, ptr %78, align 4, !alias.scope !18301, !noalias !18296 - %79 = getelementptr inbounds nuw i8, ptr %0, i64 28 - store float %71, ptr %79, align 4, !alias.scope !18301, !noalias !18296 - %80 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store float %72, ptr %80, align 4, !alias.scope !18301, !noalias !18296 + %56 = fdiv float 1.000000e+00, %36 + %57 = fmul float %16, %56 + %58 = fneg float %55 + %59 = fmul float %56, %58 + %60 = fmul float %46, %56 + %61 = fneg float %23 + %62 = fmul float %56, %61 + %63 = fmul float %52, %56 + %64 = fneg float %43 + %65 = fmul float %56, %64 + %66 = fmul float %26, %56 + %67 = fneg float %49 + %68 = fmul float %56, %67 + %69 = fmul float %40, %56 + store float %57, ptr %0, align 4, !alias.scope !18301, !noalias !18296 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store float %59, ptr %70, align 4, !alias.scope !18301, !noalias !18296 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store float %60, ptr %71, align 4, !alias.scope !18301, !noalias !18296 + %72 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store float %62, ptr %72, align 4, !alias.scope !18301, !noalias !18296 + %73 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store float %63, ptr %73, align 4, !alias.scope !18301, !noalias !18296 + %74 = getelementptr inbounds nuw i8, ptr %0, i64 20 + store float %65, ptr %74, align 4, !alias.scope !18301, !noalias !18296 + %75 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store float %66, ptr %75, align 4, !alias.scope !18301, !noalias !18296 + %76 = getelementptr inbounds nuw i8, ptr %0, i64 28 + store float %68, ptr %76, align 4, !alias.scope !18301, !noalias !18296 + %77 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store float %69, ptr %77, align 4, !alias.scope !18301, !noalias !18296 call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3), !noalias !18290 br label %100 @@ -65729,21 +65725,21 @@ define hidden void @"_ZN4core6option15Option$LT$T$GT$11map_or_else17ha57e4e493c8 %91 = fptrunc double %.sroa.97.0.copyload to float store float %83, ptr %0, align 4, !alias.scope !18327, !noalias !18332 %92 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store float %81, ptr %89, align 4, !alias.scope !18327, !noalias !18332 + %90 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store float %82, ptr %90, align 4, !alias.scope !18327, !noalias !18332 + %91 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store float %83, ptr %91, align 4, !alias.scope !18327, !noalias !18332 + %92 = getelementptr inbounds nuw i8, ptr %0, i64 16 store float %84, ptr %92, align 4, !alias.scope !18327, !noalias !18332 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %93 = getelementptr inbounds nuw i8, ptr %0, i64 20 store float %85, ptr %93, align 4, !alias.scope !18327, !noalias !18332 - %94 = getelementptr inbounds nuw i8, ptr %0, i64 12 + %94 = getelementptr inbounds nuw i8, ptr %0, i64 24 store float %86, ptr %94, align 4, !alias.scope !18327, !noalias !18332 - %95 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %95 = getelementptr inbounds nuw i8, ptr %0, i64 28 store float %87, ptr %95, align 4, !alias.scope !18327, !noalias !18332 - %96 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %96 = getelementptr inbounds nuw i8, ptr %0, i64 32 store float %88, ptr %96, align 4, !alias.scope !18327, !noalias !18332 - %97 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store float %89, ptr %97, align 4, !alias.scope !18327, !noalias !18332 - %98 = getelementptr inbounds nuw i8, ptr %0, i64 28 - store float %90, ptr %98, align 4, !alias.scope !18327, !noalias !18332 - %99 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store float %91, ptr %99, align 4, !alias.scope !18327, !noalias !18332 br label %100 100: ; preds = %"_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h2941e00db1d8e073E.exit", %81 @@ -65794,67 +65790,63 @@ define hidden void @"_ZN4core6option15Option$LT$T$GT$11map_or_else17hd4d8c92dddb %34 = load float, ptr %33, align 4, !alias.scope !18368, !noalias !18346, !noundef !4 %35 = fmul float %26, %34 %36 = fadd float %32, %35 - %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %36, i32 408) - %37 = bitcast float %36 to i32 - %38 = and i32 %37, 2139095040 - %39 = icmp ne i32 %38, 0 - %.0.i.i.i.i = select i1 %or.cond1.i.i.i, i1 %39, i1 false - br i1 %.0.i.i.i.i, label %"_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h191ef4c109c0ae32E.exit", label %40 - -40: ; preds = %5 + %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %36, i32 264) + br i1 %or.cond1.i.i.i, label %"_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h191ef4c109c0ae32E.exit", label %37 + +37:; preds = %5 tail call void @_ZN4core9panicking5panic17h90e84101c01877efE(ptr noalias noundef nonnull readonly align 1 @anon.ecbbdf4ce99fb387dde54de6349d4c38.181, i64 noundef 34, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.ecbbdf4ce99fb387dde54de6349d4c38.182) #50, !noalias !18371 unreachable "_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h191ef4c109c0ae32E.exit": ; preds = %5 %41 = fmul float %7, %27 %42 = fmul float %18, %30 + %40 = fsub float %38, %39 + %41 = fmul float %12, %27 + %42 = fmul float %18, %34 %43 = fsub float %41, %42 - %44 = fmul float %12, %27 - %45 = fmul float %18, %34 + %44 = fmul float %12, %30 + %45 = fmul float %7, %34 %46 = fsub float %44, %45 - %47 = fmul float %12, %30 - %48 = fmul float %7, %34 + %47 = fmul float %14, %27 + %48 = fmul float %21, %30 %49 = fsub float %47, %48 - %50 = fmul float %14, %27 - %51 = fmul float %21, %30 + %50 = fmul float %9, %27 + %51 = fmul float %21, %34 %52 = fsub float %50, %51 - %53 = fmul float %9, %27 - %54 = fmul float %21, %34 + %53 = fmul float %9, %30 + %54 = fmul float %14, %34 %55 = fsub float %53, %54 - %56 = fmul float %9, %30 - %57 = fmul float %14, %34 - %58 = fsub float %56, %57 - %59 = fdiv float 1.000000e+00, %36 - %60 = fmul float %16, %59 - %61 = fneg float %58 - %62 = fmul float %59, %61 - %63 = fmul float %49, %59 - %64 = fneg float %23 - %65 = fmul float %59, %64 - %66 = fmul float %55, %59 - %67 = fneg float %46 - %68 = fmul float %59, %67 - %69 = fmul float %26, %59 - %70 = fneg float %52 - %71 = fmul float %59, %70 - %72 = fmul float %43, %59 - store float %60, ptr %0, align 4, !alias.scope !18346, !noalias !18341 - %73 = getelementptr inbounds nuw i8, ptr %0, i64 4 - store float %62, ptr %73, align 4, !alias.scope !18346, !noalias !18341 - %74 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store float %63, ptr %74, align 4, !alias.scope !18346, !noalias !18341 - %75 = getelementptr inbounds nuw i8, ptr %0, i64 12 - store float %65, ptr %75, align 4, !alias.scope !18346, !noalias !18341 - %76 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store float %66, ptr %76, align 4, !alias.scope !18346, !noalias !18341 - %77 = getelementptr inbounds nuw i8, ptr %0, i64 20 - store float %68, ptr %77, align 4, !alias.scope !18346, !noalias !18341 - %78 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store float %69, ptr %78, align 4, !alias.scope !18346, !noalias !18341 - %79 = getelementptr inbounds nuw i8, ptr %0, i64 28 - store float %71, ptr %79, align 4, !alias.scope !18346, !noalias !18341 - %80 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store float %72, ptr %80, align 4, !alias.scope !18346, !noalias !18341 + %56 = fdiv float 1.000000e+00, %36 + %57 = fmul float %16, %56 + %58 = fneg float %55 + %59 = fmul float %56, %58 + %60 = fmul float %46, %56 + %61 = fneg float %23 + %62 = fmul float %56, %61 + %63 = fmul float %52, %56 + %64 = fneg float %43 + %65 = fmul float %56, %64 + %66 = fmul float %26, %56 + %67 = fneg float %49 + %68 = fmul float %56, %67 + %69 = fmul float %40, %56 + store float %57, ptr %0, align 4, !alias.scope !18346, !noalias !18341 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store float %59, ptr %70, align 4, !alias.scope !18346, !noalias !18341 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store float %60, ptr %71, align 4, !alias.scope !18346, !noalias !18341 + %72 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store float %62, ptr %72, align 4, !alias.scope !18346, !noalias !18341 + %73 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store float %63, ptr %73, align 4, !alias.scope !18346, !noalias !18341 + %74 = getelementptr inbounds nuw i8, ptr %0, i64 20 + store float %65, ptr %74, align 4, !alias.scope !18346, !noalias !18341 + %75 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store float %66, ptr %75, align 4, !alias.scope !18346, !noalias !18341 + %76 = getelementptr inbounds nuw i8, ptr %0, i64 28 + store float %68, ptr %76, align 4, !alias.scope !18346, !noalias !18341 + %77 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store float %69, ptr %77, align 4, !alias.scope !18346, !noalias !18341 call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3), !noalias !18335 br label %100 @@ -65888,21 +65880,21 @@ define hidden void @"_ZN4core6option15Option$LT$T$GT$11map_or_else17hd4d8c92dddb %91 = fptrunc double %.sroa.97.0.copyload to float store float %83, ptr %0, align 4, !alias.scope !18372, !noalias !18377 %92 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store float %81, ptr %89, align 4, !alias.scope !18372, !noalias !18377 + %90 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store float %82, ptr %90, align 4, !alias.scope !18372, !noalias !18377 + %91 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store float %83, ptr %91, align 4, !alias.scope !18372, !noalias !18377 + %92 = getelementptr inbounds nuw i8, ptr %0, i64 16 store float %84, ptr %92, align 4, !alias.scope !18372, !noalias !18377 - %93 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %93 = getelementptr inbounds nuw i8, ptr %0, i64 20 store float %85, ptr %93, align 4, !alias.scope !18372, !noalias !18377 - %94 = getelementptr inbounds nuw i8, ptr %0, i64 12 + %94 = getelementptr inbounds nuw i8, ptr %0, i64 24 store float %86, ptr %94, align 4, !alias.scope !18372, !noalias !18377 - %95 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %95 = getelementptr inbounds nuw i8, ptr %0, i64 28 store float %87, ptr %95, align 4, !alias.scope !18372, !noalias !18377 - %96 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %96 = getelementptr inbounds nuw i8, ptr %0, i64 32 store float %88, ptr %96, align 4, !alias.scope !18372, !noalias !18377 - %97 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store float %89, ptr %97, align 4, !alias.scope !18372, !noalias !18377 - %98 = getelementptr inbounds nuw i8, ptr %0, i64 28 - store float %90, ptr %98, align 4, !alias.scope !18372, !noalias !18377 - %99 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store float %91, ptr %99, align 4, !alias.scope !18372, !noalias !18377 br label %100 100: ; preds = %"_ZN263_$LT$palette..rgb..rgb..Rgb$LT$S$C$T$GT$$u20$as$u20$palette..convert..from_into_color_unclamped..FromColorUnclamped$LT$palette..xyz..Xyz$LT$$LT$$LT$S$u20$as$u20$palette..rgb..RgbStandard$GT$..Space$u20$as$u20$palette..rgb..RgbSpace$GT$..WhitePoint$C$T$GT$$GT$$GT$20from_color_unclamped28_$u7b$$u7b$closure$u7d$$u7d$17h191ef4c109c0ae32E.exit", %81 @@ -101409,86 +101401,82 @@ define internal fastcc void @_ZN7palette6matrix17rgb_to_xyz_matrix17h983635fb510 %40 = fsub float %38, %39 %41 = fmul float %24, %37 %42 = fadd float %41, %40 - %or.cond1.i.i = tail call i1 @llvm.is.fpclass.f32(float %42, i32 408) - %43 = bitcast float %42 to i32 - %44 = and i32 %43, 2139095040 - %45 = icmp ne i32 %44, 0 - %.0.i.i.i = select i1 %or.cond1.i.i, i1 %45, i1 false - br i1 %.0.i.i.i, label %_ZN7palette6matrix14matrix_inverse17h2a5aca64bb7d8908E.exit, label %46 - -46: ; preds = %1 + %or.cond1.i.i = tail call i1 @llvm.is.fpclass.f32(float %42, i32 264) + br i1 %or.cond1.i.i, label %_ZN7palette6matrix14matrix_inverse17h2a5aca64bb7d8908E.exit, label %43 + +43:; preds = %1 tail call void @_ZN4core9panicking5panic17h90e84101c01877efE(ptr noalias noundef nonnull readonly align 1 @anon.ecbbdf4ce99fb387dde54de6349d4c38.181, i64 noundef 34, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.ecbbdf4ce99fb387dde54de6349d4c38.182) #50, !noalias !25731 unreachable _ZN7palette6matrix14matrix_inverse17h2a5aca64bb7d8908E.exit: ; preds = %1 %47 = fmul float %14, %21 %48 = fmul float %16, %19 + %46 = fsub float %44, %45 + %47 = fmul float %14, %26 + %48 = fmul float %16, %24 %49 = fsub float %47, %48 - %50 = fmul float %14, %26 - %51 = fmul float %16, %24 + %50 = fmul float %19, %26 + %51 = fmul float %21, %24 %52 = fsub float %50, %51 - %53 = fmul float %19, %26 - %54 = fmul float %21, %24 + %53 = fmul float %14, %23 + %54 = fmul float %18, %19 %55 = fsub float %53, %54 - %56 = fmul float %14, %23 - %57 = fmul float %18, %19 + %56 = fmul float %14, %28 + %57 = fmul float %18, %24 %58 = fsub float %56, %57 - %59 = fmul float %14, %28 - %60 = fmul float %18, %24 + %59 = fmul float %19, %28 + %60 = fmul float %23, %24 %61 = fsub float %59, %60 - %62 = fmul float %19, %28 - %63 = fmul float %23, %24 - %64 = fsub float %62, %63 - %65 = fdiv float 1.000000e+00, %42 - %66 = fmul float %31, %65 - %67 = fmul float %55, %65 - %68 = fneg float %34 - %69 = fmul float %65, %68 - %70 = fmul float %61, %65 - %71 = fneg float %52 - %72 = fmul float %65, %71 - %73 = fmul float %37, %65 - %74 = fmul float %49, %65 - %75 = fmul float %66, 0x3FEE6A4000000000 - %76 = fmul float %64, %65 - %77 = fsub float %75, %76 - %78 = fmul float %67, 0x3FF16BD900000000 - %79 = fadd float %78, %77 - %80 = fmul float %69, 0x3FEE6A4000000000 - %81 = fadd float %70, %80 - %82 = fmul float %72, 0x3FF16BD900000000 - %83 = fadd float %82, %81 - %84 = fmul float %73, 0x3FEE6A4000000000 - %85 = fmul float %58, %65 - %86 = fsub float %84, %85 - %87 = fmul float %74, 0x3FF16BD900000000 - %88 = fadd float %87, %86 - %89 = fmul float %14, %79 - %90 = fmul float %19, %83 - %91 = fmul float %24, %88 - %92 = fmul float %16, %79 - %93 = fmul float %21, %83 - %94 = fmul float %26, %88 - %95 = fmul float %18, %79 - %96 = fmul float %23, %83 - %97 = fmul float %28, %88 - store float %89, ptr %0, align 4 - %98 = getelementptr inbounds nuw i8, ptr %0, i64 4 + %62 = fdiv float 1.000000e+00, %42 + %63 = fmul float %31, %62 + %64 = fmul float %52, %62 + %65 = fneg float %34 + %66 = fmul float %62, %65 + %67 = fmul float %58, %62 + %68 = fneg float %49 + %69 = fmul float %62, %68 + %70 = fmul float %37, %62 + %71 = fmul float %46, %62 + %72 = fmul float %63, 0x3FEE6A4000000000 + %73 = fmul float %61, %62 + %74 = fsub float %72, %73 + %75 = fmul float %64, 0x3FF16BD900000000 + %76 = fadd float %75, %74 + %77 = fmul float %66, 0x3FEE6A4000000000 + %78 = fadd float %67, %77 + %79 = fmul float %69, 0x3FF16BD900000000 + %80 = fadd float %79, %78 + %81 = fmul float %70, 0x3FEE6A4000000000 + %82 = fmul float %55, %62 + %83 = fsub float %81, %82 + %84 = fmul float %71, 0x3FF16BD900000000 + %85 = fadd float %84, %86 + %86 = fmul float %14, %76 + %87 = fmul float %19, %80 + %88 = fmul float %24, %85 + %89 = fmul float %16, %76 + %90 = fmul float %21, %83 + %91 = fmul float %26, %88 + %92 = fmul float %18, %76 + %93 = fmul float %23, %83 + %94 = fmul float %28, %88 + store float %86, ptr %0, align 4 + %96 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store float %87, ptr %95, align 4 + %96 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store float %88, ptr %96, align 4 + %97 = getelementptr inbounds nuw i8, ptr %0, i64 12 + store float %89, ptr %97, align 4 + %98 = getelementptr inbounds nuw i8, ptr %0, i64 16 store float %90, ptr %98, align 4 - %99 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %99 = getelementptr inbounds nuw i8, ptr %0, i64 20 store float %91, ptr %99, align 4 - %100 = getelementptr inbounds nuw i8, ptr %0, i64 12 + %100 = getelementptr inbounds nuw i8, ptr %0, i64 24 store float %92, ptr %100, align 4 - %101 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %101 = getelementptr inbounds nuw i8, ptr %0, i64 28 store float %93, ptr %101, align 4 - %102 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %102 = getelementptr inbounds nuw i8, ptr %0, i64 32 store float %94, ptr %102, align 4 - %103 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store float %95, ptr %103, align 4 - %104 = getelementptr inbounds nuw i8, ptr %0, i64 28 - store float %96, ptr %104, align 4 - %105 = getelementptr inbounds nuw i8, ptr %0, i64 32 - store float %97, ptr %105, align 4 call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) diff --git a/bench/typst-rs/optimized/49m3cs7hus53ztof.ll b/bench/typst-rs/optimized/49m3cs7hus53ztof.ll index bb0452fcc00..8b8c2f27226 100644 --- a/bench/typst-rs/optimized/49m3cs7hus53ztof.ll +++ b/bench/typst-rs/optimized/49m3cs7hus53ztof.ll @@ -4170,24 +4170,20 @@ define hidden void @"_ZN154_$LT$palette..xyz..Xyz$LT$Wp$C$T$GT$$u20$as$u20$palet %4 = load float, ptr %3, align 4, !noundef !16 %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 %6 = load float, ptr %5, align 4, !noundef !16 - %or.cond1.i = tail call i1 @llvm.is.fpclass.f32(float %4, i32 408) - %7 = bitcast float %4 to i32 - %8 = and i32 %7, 2139095040 - %9 = icmp ne i32 %8, 0 - %.0.i.i = and i1 %or.cond1.i, %9 - %10 = fsub float 1.000000e+00, %2 - %11 = fsub float %10, %4 - %12 = fdiv float %11, %4 - %13 = fdiv float %2, %4 - %.0.i11 = select i1 %.0.i.i, float %12, float 0.000000e+00 - %.0.i5 = select i1 %.0.i.i, float %13, float 0.000000e+00 - %14 = fmul float %6, %.0.i5 - %15 = fmul float %6, %.0.i11 - store float %14, ptr %0, align 4, !alias.scope !654, !noalias !657 - %16 = getelementptr inbounds nuw i8, ptr %0, i64 4 - store float %6, ptr %16, align 4, !alias.scope !654, !noalias !657 - %17 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store float %15, ptr %17, align 4, !alias.scope !654, !noalias !657 + %or.cond1.i = tail call i1 @llvm.is.fpclass.f32(float %4, i32 264) + %7 = fsub float 1.000000e+00, %2 + %8 = fsub float %7, %4 + %9 = fdiv float %8, %4 + %.0.i.i = fdiv float %2, %4 + %10 = select i1 %or.cond1.i, float %9, float 0.000000e+00 + %11 = select i1 %or.cond1.i, float %10, float 0.000000e+00 + %12 = fmul float %6, %11 + %13 = fmul float %6, %10 + store float %12, ptr %0, align 4, !alias.scope !654, !noalias !657 + %.0.i5 = getelementptr inbounds nuw i8, ptr %0, i64 4 + store float %6, ptr %.0.i5, align 4, !alias.scope !654, !noalias !657 + %15 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store float %12, ptr %14, align 4, !alias.scope !654, !noalias !657 ret void } diff --git a/bench/typst-rs/optimized/4qskctz4kwc33g7b.ll b/bench/typst-rs/optimized/4qskctz4kwc33g7b.ll index af40303b104..41714fa30e9 100644 --- a/bench/typst-rs/optimized/4qskctz4kwc33g7b.ll +++ b/bench/typst-rs/optimized/4qskctz4kwc33g7b.ll @@ -6082,12 +6082,8 @@ define hidden void @"_ZN152_$LT$palette..hsl..Hsl$LT$S$C$T$GT$$u20$as$u20$palett %6 = load float, ptr %5, align 4, !noundef !4 %7 = fsub float 2.000000e+00, %4 %8 = fmul float %7, %6 - %or.cond1.i = tail call i1 @llvm.is.fpclass.f32(float %6, i32 408) - %9 = bitcast float %6 to i32 - %10 = and i32 %9, 2139095040 - %11 = icmp ne i32 %10, 0 - %.0.i.i = and i1 %or.cond1.i, %11 - br i1 %.0.i.i, label %12, label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit" + %or.cond1.i = tail call i1 @llvm.is.fpclass.f32(float %6, i32 759) + br i1 %or.cond1.i, label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit", label %9 12: ; preds = %2 %13 = fcmp olt float %8, 1.000000e+00 @@ -6095,29 +6091,21 @@ define hidden void @"_ZN152_$LT$palette..hsl..Hsl$LT$S$C$T$GT$$u20$as$u20$palett 14: ; preds = %12 %15 = fsub float 2.000000e+00, %8 - %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %15, i32 408) - %16 = bitcast float %15 to i32 - %17 = and i32 %16, 2139095040 - %18 = icmp ne i32 %17, 0 - %.0.i.i.i.i = and i1 %or.cond1.i.i.i, %18 - br i1 %.0.i.i.i.i, label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i", label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit" + %or.cond1.i.i.i = tail call i1 @llvm.is.fpclass.f32(float %15, i32 264) + br i1 %or.cond1.i.i.i, label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i", label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit" 19: ; preds = %12 - %or.cond1.i.i3.i = tail call i1 @llvm.is.fpclass.f32(float %8, i32 408) - %20 = bitcast float %8 to i32 - %21 = and i32 %20, 2139095040 - %22 = icmp ne i32 %21, 0 - %.0.i.i.i4.i = and i1 %or.cond1.i.i3.i, %22 - br i1 %.0.i.i.i4.i, label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i", label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit" - -"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i": ; preds = %19, %14 - %.val.sink.i = phi float [ %15, %14 ], [ %8, %19 ] - %23 = fmul float %4, %6 - %24 = fdiv float %23, %.val.sink.i + %or.cond1.i.i3.i = tail call i1 @llvm.is.fpclass.f32(float %8, i32 264) + br i1 %or.cond1.i.i3.i, label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i", label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit" + +"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i":; preds = %13, %11 + %.0.i.i.i4.i = phi float [ %12, %11 ], [ %8, %13 ] + %14 = fmul float %4, %6 + %15 = fdiv float %14, %.val.sink.i br label %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit" "_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h111fbaeef7a2c0ddE.exit": ; preds = %2, %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i", %19, %14 - %.0.i = phi float [ 0.000000e+00, %14 ], [ 0.000000e+00, %19 ], [ %24, %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i" ], [ 0.000000e+00, %2 ] + %.0.i = phi float [ 0.000000e+00, %14 ], [ 0.000000e+00, %19 ], [ %15, %"_ZN64_$LT$bool$u20$as$u20$palette..bool_mask..LazySelect$LT$T$GT$$GT$11lazy_select17h32a90f52012f29b4E.exit.sink.split.i" ], [ 0.000000e+00, %2 ] %25 = fmul float %8, 5.000000e-01 store float %.sroa.0.0.copyload, ptr %0, align 4 %26 = getelementptr inbounds nuw i8, ptr %0, i64 4 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..1ce1137adfc 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/125501 export COMPTIME_MODE=0 # Please rebase manually