Add benchmarks for f128 division
This commit is contained in:
parent
764a177497
commit
4842bd6ab1
2 changed files with 31 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#![cfg_attr(f128_enabled, feature(f128))]
|
||||
|
||||
use compiler_builtins::float::div;
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use criterion::{criterion_main, Criterion};
|
||||
use testcrate::float_bench;
|
||||
|
||||
float_bench! {
|
||||
|
|
@ -64,5 +66,28 @@ float_bench! {
|
|||
],
|
||||
}
|
||||
|
||||
criterion_group!(float_div, div_f32, div_f64);
|
||||
#[cfg(f128_enabled)]
|
||||
float_bench! {
|
||||
name: div_f128,
|
||||
sig: (a: f128, b: f128) -> f128,
|
||||
crate_fn: div::__divtf3,
|
||||
crate_fn_ppc: div::__divkf3,
|
||||
sys_fn: __divtf3,
|
||||
sys_fn_ppc: __divkf3,
|
||||
sys_available: not(feature = "no-sys-f128"),
|
||||
asm: []
|
||||
}
|
||||
|
||||
pub fn float_div() {
|
||||
let mut criterion = Criterion::default().configure_from_args();
|
||||
|
||||
div_f32(&mut criterion);
|
||||
div_f64(&mut criterion);
|
||||
|
||||
#[cfg(f128_enabled)]
|
||||
{
|
||||
div_f128(&mut criterion);
|
||||
}
|
||||
}
|
||||
|
||||
criterion_main!(float_div);
|
||||
|
|
|
|||
|
|
@ -30,13 +30,14 @@ pub fn skip_sys_checks(test_name: &str) -> bool {
|
|||
|
||||
// FIXME(f16_f128): system symbols have incorrect results
|
||||
// <https://github.com/rust-lang/compiler-builtins/issues/617#issuecomment-2125914639>
|
||||
const X86_NO_SSE_SKIPPED: &[&str] =
|
||||
&["add_f128", "sub_f128", "mul_f128", "powi_f32", "powi_f64"];
|
||||
const X86_NO_SSE_SKIPPED: &[&str] = &[
|
||||
"add_f128", "sub_f128", "mul_f128", "div_f128", "powi_f32", "powi_f64",
|
||||
];
|
||||
|
||||
// FIXME(f16_f128): Wide multiply carry bug in `compiler-rt`, re-enable when nightly no longer
|
||||
// uses `compiler-rt` version.
|
||||
// <https://github.com/llvm/llvm-project/issues/91840>
|
||||
const AARCH64_SKIPPED: &[&str] = &["mul_f128"];
|
||||
const AARCH64_SKIPPED: &[&str] = &["mul_f128", "div_f128"];
|
||||
|
||||
// FIXME(llvm): system symbols have incorrect results on Windows
|
||||
// <https://github.com/rust-lang/compiler-builtins/issues/617#issuecomment-2121359807>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue