1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc -mattr=+sve2 < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme2 -force-streaming < %s | FileCheck %s
5 target triple = "aarch64-linux"
7 define <vscale x 8 x half> @famin_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
8 ; CHECK-LABEL: famin_f16:
10 ; CHECK-NEXT: famin z0.h, p0/m, z0.h, z1.h
12 %r = call <vscale x 8 x half> @llvm.aarch64.sve.famin.nxv8f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> %b)
13 ret <vscale x 8 x half> %r
16 define <vscale x 4 x float> @famin_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
17 ; CHECK-LABEL: famin_f32:
19 ; CHECK-NEXT: famin z0.s, p0/m, z0.s, z1.s
21 %r = call <vscale x 4 x float> @llvm.aarch64.sve.famin.nxv4f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> %b)
22 ret <vscale x 4 x float> %r
25 define <vscale x 2 x double> @famin_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
26 ; CHECK-LABEL: famin_f64:
28 ; CHECK-NEXT: famin z0.d, p0/m, z0.d, z1.d
30 %r = call <vscale x 2 x double> @llvm.aarch64.sve.famin.nxv2f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> %b)
31 ret <vscale x 2 x double> %r
34 define <vscale x 8 x half> @famin_u_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
35 ; CHECK-LABEL: famin_u_f16:
37 ; CHECK-NEXT: famin z0.h, p0/m, z0.h, z1.h
39 %r = call <vscale x 8 x half> @llvm.aarch64.sve.famin.u.nxv8f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %b, <vscale x 8 x half> %a)
40 ret <vscale x 8 x half> %r
43 define <vscale x 4 x float> @famin_u_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
44 ; CHECK-LABEL: famin_u_f32:
46 ; CHECK-NEXT: famin z0.s, p0/m, z0.s, z1.s
48 %r = call <vscale x 4 x float> @llvm.aarch64.sve.famin.u.nxv4f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %b, <vscale x 4 x float> %a)
49 ret <vscale x 4 x float> %r
52 define <vscale x 2 x double> @famin_u_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
53 ; CHECK-LABEL: famin_u_f64:
55 ; CHECK-NEXT: famin z0.d, p0/m, z0.d, z1.d
57 %r = call <vscale x 2 x double> @llvm.aarch64.sve.famin.u.nxv2f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %b, <vscale x 2 x double> %a)
58 ret <vscale x 2 x double> %r
61 define <vscale x 8 x half> @famax_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
62 ; CHECK-LABEL: famax_f16:
64 ; CHECK-NEXT: famax z0.h, p0/m, z0.h, z1.h
66 %r = call <vscale x 8 x half> @llvm.aarch64.sve.famax.nxv8f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> %b)
67 ret <vscale x 8 x half> %r
70 define <vscale x 4 x float> @famax_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
71 ; CHECK-LABEL: famax_f32:
73 ; CHECK-NEXT: famax z0.s, p0/m, z0.s, z1.s
75 %r = call <vscale x 4 x float> @llvm.aarch64.sve.famax.nxv4f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> %b)
76 ret <vscale x 4 x float> %r
79 define <vscale x 2 x double> @famax_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
80 ; CHECK-LABEL: famax_f64:
82 ; CHECK-NEXT: famax z0.d, p0/m, z0.d, z1.d
84 %r = call <vscale x 2 x double> @llvm.aarch64.sve.famax.nxv2f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> %b)
85 ret <vscale x 2 x double> %r
88 define <vscale x 8 x half> @famax_u_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
89 ; CHECK-LABEL: famax_u_f16:
91 ; CHECK-NEXT: famax z0.h, p0/m, z0.h, z1.h
93 %r = call <vscale x 8 x half> @llvm.aarch64.sve.famax.u.nxv8f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %b, <vscale x 8 x half> %a)
94 ret <vscale x 8 x half> %r
97 define <vscale x 4 x float> @famax_u_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
98 ; CHECK-LABEL: famax_u_f32:
100 ; CHECK-NEXT: famax z0.s, p0/m, z0.s, z1.s
102 %r = call <vscale x 4 x float> @llvm.aarch64.sve.famax.u.nxv4f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %b, <vscale x 4 x float> %a)
103 ret <vscale x 4 x float> %r
106 define <vscale x 2 x double> @famax_u_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
107 ; CHECK-LABEL: famax_u_f64:
109 ; CHECK-NEXT: famax z0.d, p0/m, z0.d, z1.d
111 %r = call <vscale x 2 x double> @llvm.aarch64.sve.famax.u.nxv2f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %b, <vscale x 2 x double> %a)
112 ret <vscale x 2 x double> %r
115 attributes #0 = { nounwind "target-features" = "+faminmax" }