Skip to content

Commit 961c518

Browse files
Apply suggestions from code review
Co-authored-by: Jubilee <[email protected]>
1 parent 5de9a1e commit 961c518

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ fn codegen_float_intrinsic_call<'tcx>(
328328
sym::fabsf64 => ("fabs", 1, fx.tcx.types.f64, types::F64),
329329
sym::fmaf32 => ("fmaf", 3, fx.tcx.types.f32, types::F32),
330330
sym::fmaf64 => ("fma", 3, fx.tcx.types.f64, types::F64),
331-
sym::fmuladdf32 => ("fmaf", 3, fx.tcx.types.f32, types::F32), // NOTE: pessimal without FMA target feature
332-
sym::fmuladdf64 => ("fma", 3, fx.tcx.types.f64, types::F64), // NOTE: pessimal without FMA target feature
331+
sym::fmuladdf32 => ("fmaf", 3, fx.tcx.types.f32, types::F32), // NOTE: software emulation without FMA target feature
332+
sym::fmuladdf64 => ("fma", 3, fx.tcx.types.f64, types::F64), // NOTE: software emulation without FMA target feature
333333
sym::copysignf32 => ("copysignf", 2, fx.tcx.types.f32, types::F32),
334334
sym::copysignf64 => ("copysign", 2, fx.tcx.types.f64, types::F64),
335335
sym::floorf32 => ("floorf", 1, fx.tcx.types.f32, types::F32),

library/std/src/f32/tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ fn test_mul_add() {
409409
assert_eq!((-3.2f32).mul_add(2.4, neg_inf), neg_inf);
410410
}
411411

412+
#[cfg(not(bootstrap))]
412413
#[test]
413414
fn test_mul_add_fast() {
414415
let nan: f32 = f32::NAN;

library/std/src/f64/tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ fn test_mul_add() {
397397
assert_eq!((-3.2f64).mul_add(2.4, neg_inf), neg_inf);
398398
}
399399

400+
#[cfg(not(bootstrap))]
400401
#[test]
401402
fn test_mul_add_fast() {
402403
let nan: f64 = f64::NAN;

src/tools/miri/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![feature(cell_update)]
33
#![feature(const_option)]
44
#![feature(float_gamma)]
5-
#![feature(float_mul_add_fast)]
5+
#![cfg_attr(not(bootstrap), feature(float_mul_add_fast))]
66
#![feature(map_try_insert)]
77
#![feature(never_type)]
88
#![feature(try_blocks)]

0 commit comments

Comments
 (0)