some clippy fixes

This commit is contained in:
Marijn Schouten
2025-07-06 07:15:54 +00:00
committed by Amanieu d'Antras
parent 1bc289da3a
commit fddd05bd7f
7 changed files with 12 additions and 14 deletions

View File

@@ -7925,7 +7925,7 @@ pub fn vcvth_f16_u64(a: u64) -> f16 {
#[unstable(feature = "stdarch_neon_f16", issue = "136306")] #[unstable(feature = "stdarch_neon_f16", issue = "136306")]
pub fn vcvth_n_f16_s16<const N: i32>(a: i16) -> f16 { pub fn vcvth_n_f16_s16<const N: i32>(a: i16) -> f16 {
static_assert!(N >= 1 && N <= 16); static_assert!(N >= 1 && N <= 16);
vcvth_n_f16_s32::<N>(a as i32) as f16 vcvth_n_f16_s32::<N>(a as i32)
} }
#[doc = "Fixed-point convert to floating-point"] #[doc = "Fixed-point convert to floating-point"]
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvth_n_f16_s32)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvth_n_f16_s32)"]
@@ -7972,7 +7972,7 @@ pub fn vcvth_n_f16_s64<const N: i32>(a: i64) -> f16 {
#[unstable(feature = "stdarch_neon_f16", issue = "136306")] #[unstable(feature = "stdarch_neon_f16", issue = "136306")]
pub fn vcvth_n_f16_u16<const N: i32>(a: u16) -> f16 { pub fn vcvth_n_f16_u16<const N: i32>(a: u16) -> f16 {
static_assert!(N >= 1 && N <= 16); static_assert!(N >= 1 && N <= 16);
vcvth_n_f16_u32::<N>(a as u32) as f16 vcvth_n_f16_u32::<N>(a as u32)
} }
#[doc = "Fixed-point convert to floating-point"] #[doc = "Fixed-point convert to floating-point"]
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvth_n_f16_u32)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvth_n_f16_u32)"]
@@ -24082,7 +24082,6 @@ pub fn vrsqrtes_f32(a: f32) -> f32 {
#[doc = "Reciprocal square-root estimate."] #[doc = "Reciprocal square-root estimate."]
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrsqrteh_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrsqrteh_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")]
#[cfg_attr(test, assert_instr(frsqrte))] #[cfg_attr(test, assert_instr(frsqrte))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[unstable(feature = "stdarch_neon_f16", issue = "136306")] #[unstable(feature = "stdarch_neon_f16", issue = "136306")]

View File

@@ -20,10 +20,10 @@
//! Section 10.1 of ACLE says: //! Section 10.1 of ACLE says:
//! //!
//! - "In the sequence of Arm architectures { v5, v5TE, v6, v6T2, v7 } each architecture includes //! - "In the sequence of Arm architectures { v5, v5TE, v6, v6T2, v7 } each architecture includes
//! its predecessor instruction set." //! its predecessor's instruction set."
//! //!
//! - "In the sequence of Thumb-only architectures { v6-M, v7-M, v7E-M } each architecture includes //! - "In the sequence of Thumb-only architectures { v6-M, v7-M, v7E-M } each architecture includes
//! its predecessor instruction set." //! its predecessor's instruction set."
//! //!
//! From that info and from looking at how LLVM features work (using custom targets) we can identify //! From that info and from looking at how LLVM features work (using custom targets) we can identify
//! features that are subsets of others: //! features that are subsets of others:
@@ -38,7 +38,7 @@
//! *NOTE*: Section 5.4.7 of ACLE says: //! *NOTE*: Section 5.4.7 of ACLE says:
//! //!
//! - "__ARM_FEATURE_DSP is defined to 1 if the DSP (v5E) instructions are supported and the //! - "__ARM_FEATURE_DSP is defined to 1 if the DSP (v5E) instructions are supported and the
//! intrinsics defined in Saturating intrinsics are available." //! intrinsics defined in Saturating intrinsics are available."
//! //!
//! This does *not* match how LLVM uses the '+dsp' feature; this feature is not set for v5te //! This does *not* match how LLVM uses the '+dsp' feature; this feature is not set for v5te
//! targets so we have to work around this difference. //! targets so we have to work around this difference.

View File

@@ -777,8 +777,8 @@ pub struct float16x8x2_t(pub float16x8_t, pub float16x8_t);
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[unstable(feature = "stdarch_neon_f16", issue = "136306")] #[unstable(feature = "stdarch_neon_f16", issue = "136306")]
pub struct float16x8x3_t(pub float16x8_t, pub float16x8_t, pub float16x8_t); pub struct float16x8x3_t(pub float16x8_t, pub float16x8_t, pub float16x8_t);
/// Arm-specific type containing four `float16x8_t` vectors. /// Arm-specific type containing four `float16x8_t` vectors.
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]

View File

@@ -48,7 +48,7 @@ pub fn compare_outputs(
return Some(FailureReason::RunRust(intrinsic_name.clone())); return Some(FailureReason::RunRust(intrinsic_name.clone()));
} }
info!("Comparing intrinsic: {}", intrinsic_name); info!("Comparing intrinsic: {intrinsic_name}");
let c = std::str::from_utf8(&c.stdout) let c = std::str::from_utf8(&c.stdout)
.unwrap() .unwrap()

View File

@@ -79,7 +79,7 @@ pub fn compile_c_programs(compiler_commands: &[String]) -> bool {
false false
} }
} else { } else {
error!("Command failed: {:#?}", output); error!("Command failed: {output:#?}");
false false
} }
}) })

View File

@@ -120,7 +120,7 @@ path = "{binary}/main.rs""#,
false false
} }
} else { } else {
error!("Command failed: {:#?}", output); error!("Command failed: {output:#?}");
false false
} }
} }

View File

@@ -1252,7 +1252,7 @@ intrinsics:
- [i16, f16, 'h', 'i32', 'as i32'] - [i16, f16, 'h', 'i32', 'as i32']
compose: compose:
- FnCall: [static_assert!, ['N >= 1 && N <= 16']] - FnCall: [static_assert!, ['N >= 1 && N <= 16']]
- "vcvt{type[2]}_n_{type[1]}_{type[3]}::<N>(a {type[4]}) as {type[1]}" - "vcvt{type[2]}_n_{type[1]}_{type[3]}::<N>(a {type[4]})"
- name: "vcvt{type[2]}_n_{type[1]}_{type[0]}" - name: "vcvt{type[2]}_n_{type[1]}_{type[0]}"
@@ -1270,7 +1270,7 @@ intrinsics:
- [u16, f16, 'h', u32] - [u16, f16, 'h', u32]
compose: compose:
- FnCall: [static_assert!, ['N >= 1 && N <= 16']] - FnCall: [static_assert!, ['N >= 1 && N <= 16']]
- "vcvt{type[2]}_n_{type[1]}_{type[3]}::<N>(a as {type[3]}) as {type[1]}" - "vcvt{type[2]}_n_{type[1]}_{type[3]}::<N>(a as {type[3]})"
- name: "vcvt{type[2]}" - name: "vcvt{type[2]}"
@@ -11697,7 +11697,6 @@ intrinsics:
arguments: ["a: {type[1]}"] arguments: ["a: {type[1]}"]
return_type: "{type[1]}" return_type: "{type[1]}"
attr: attr:
- *neon-fp16
- FnCall: [cfg_attr, [test, {FnCall: [assert_instr, [frsqrte]]}]] - FnCall: [cfg_attr, [test, {FnCall: [assert_instr, [frsqrte]]}]]
- *neon-fp16 - *neon-fp16
- *neon-unstable-f16 - *neon-unstable-f16