[clang] [llvm] [AArch64] Implement ACLE FEAT_FPv2 SVE elementwise minimum/maximum intrinsics (PR #246450)

Kieran B via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 06:48:37 PST 2026


================
@@ -0,0 +1,382 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2p3,fpv2 -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,CHECK-SVE
+; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme2p3,fpv2 -force-streaming -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,CHECK-SME
+; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme,+sve2p3,fpv2 -force-streaming -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,CHECK-SME-SVE
+
+define <vscale x 8 x half> @test_svmaxinm_f16_m(<vscale x 8 x i1> %pg, <vscale x 8 x half> %zn, <vscale x 8 x half> %zm) {
+; CHECK-LABEL: test_svmaxinm_f16_m:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    fmaxinm z0.h, p0/m, z0.h, z1.h
+; CHECK-NEXT:    ret
+  %res = call <vscale x 8 x half> @llvm.aarch64.sve.fmaxinm.nxv8f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %zn, <vscale x 8 x half> %zm)
+  ret <vscale x 8 x half> %res
+}
+
+define <vscale x 4 x float> @test_svmaxinm_f32_m(<vscale x 4 x i1> %pg, <vscale x 4 x float> %zn, <vscale x 4 x float> %zm) {
+; CHECK-LABEL: test_svmaxinm_f32_m:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    fmaxinm z0.s, p0/m, z0.s, z1.s
+; CHECK-NEXT:    ret
+  %res = call <vscale x 4 x float> @llvm.aarch64.sve.fmaxinm.nxv4f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %zn, <vscale x 4 x float> %zm)
+  ret <vscale x 4 x float> %res
+}
+
+define <vscale x 2 x double> @test_svmaxinm_f64_m(<vscale x 2 x i1> %pg, <vscale x 2 x double> %zn, <vscale x 2 x double> %zm) {
+; CHECK-LABEL: test_svmaxinm_f64_m:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    fmaxinm z0.d, p0/m, z0.d, z1.d
+; CHECK-NEXT:    ret
+  %res = call <vscale x 2 x double> @llvm.aarch64.sve.fmaxinm.nxv2f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %zn, <vscale x 2 x double> %zm)
+  ret <vscale x 2 x double> %res
+}
+
+define <vscale x 8 x half> @test_svmaxinm_f16_z(<vscale x 8 x i1> %pg, <vscale x 8 x half> %zn, <vscale x 8 x half> %zm) {
----------------
kieroxide wrote:

What do you mean? All the _z functions? 

https://github.com/llvm/llvm-project/pull/246450


More information about the cfe-commits mailing list