Skip to content

Commit ae5c391

Browse files
committed
aarch64: use f16::min and f16::max
1 parent 9430936 commit ae5c391

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13261,14 +13261,7 @@ pub fn vmaxnmq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
1326113261
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
1326213262
#[cfg_attr(test, assert_instr(fmaxnm))]
1326313263
pub fn vmaxnmh_f16(a: f16, b: f16) -> f16 {
13264-
unsafe extern "unadjusted" {
13265-
#[cfg_attr(
13266-
any(target_arch = "aarch64", target_arch = "arm64ec"),
13267-
link_name = "llvm.aarch64.neon.fmaxnm.f16"
13268-
)]
13269-
fn _vmaxnmh_f16(a: f16, b: f16) -> f16;
13270-
}
13271-
unsafe { _vmaxnmh_f16(a, b) }
13264+
f16::max(a, b)
1327213265
}
1327313266
#[doc = "Floating-point maximum number across vector"]
1327413267
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmaxnmv_f16)"]
@@ -13709,14 +13702,7 @@ pub fn vminnmq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
1370913702
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
1371013703
#[cfg_attr(test, assert_instr(fminnm))]
1371113704
pub fn vminnmh_f16(a: f16, b: f16) -> f16 {
13712-
unsafe extern "unadjusted" {
13713-
#[cfg_attr(
13714-
any(target_arch = "aarch64", target_arch = "arm64ec"),
13715-
link_name = "llvm.aarch64.neon.fminnm.f16"
13716-
)]
13717-
fn _vminnmh_f16(a: f16, b: f16) -> f16;
13718-
}
13719-
unsafe { _vminnmh_f16(a, b) }
13705+
f16::min(a, b)
1372013706
}
1372113707
#[doc = "Floating-point minimum number across vector"]
1372213708
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vminnmv_f16)"]

crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6611,11 +6611,7 @@ intrinsics:
66116611
types:
66126612
- f16
66136613
compose:
6614-
- LLVMLink:
6615-
name: "vmaxh.{neon_type}"
6616-
links:
6617-
- link: "llvm.aarch64.neon.fmaxnm.{type}"
6618-
arch: aarch64,arm64ec
6614+
- FnCall: ["f16::max", [a, b]]
66196615

66206616

66216617
- name: "vminnmh_{type}"
@@ -6630,11 +6626,7 @@ intrinsics:
66306626
types:
66316627
- f16
66326628
compose:
6633-
- LLVMLink:
6634-
name: "vminh.{neon_type}"
6635-
links:
6636-
- link: "llvm.aarch64.neon.fminnm.{type}"
6637-
arch: aarch64,arm64ec
6629+
- FnCall: ["f16::min", [a, b]]
66386630

66396631

66406632
- name: "vmaxnmv{neon_type[0].no}"

0 commit comments

Comments
 (0)