1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s
3 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple -global-isel | FileCheck %s
5 define <2 x float> @f1(<2 x float> %a, <2 x float> %b) nounwind readnone ssp {
8 ; CHECK-NEXT: fmaxnm.2s v0, v0, v1
10 %vmaxnm2.i = tail call <2 x float> @llvm.aarch64.neon.fmaxnm.v2f32(<2 x float> %a, <2 x float> %b) nounwind
11 ret <2 x float> %vmaxnm2.i
14 define <4 x float> @f2(<4 x float> %a, <4 x float> %b) nounwind readnone ssp {
17 ; CHECK-NEXT: fmaxnm.4s v0, v0, v1
19 %vmaxnm2.i = tail call <4 x float> @llvm.aarch64.neon.fmaxnm.v4f32(<4 x float> %a, <4 x float> %b) nounwind
20 ret <4 x float> %vmaxnm2.i
23 define <2 x double> @f3(<2 x double> %a, <2 x double> %b) nounwind readnone ssp {
26 ; CHECK-NEXT: fmaxnm.2d v0, v0, v1
28 %vmaxnm2.i = tail call <2 x double> @llvm.aarch64.neon.fmaxnm.v2f64(<2 x double> %a, <2 x double> %b) nounwind
29 ret <2 x double> %vmaxnm2.i
32 define <2 x float> @f4(<2 x float> %a, <2 x float> %b) nounwind readnone ssp {
35 ; CHECK-NEXT: fminnm.2s v0, v0, v1
37 %vminnm2.i = tail call <2 x float> @llvm.aarch64.neon.fminnm.v2f32(<2 x float> %a, <2 x float> %b) nounwind
38 ret <2 x float> %vminnm2.i
41 define <4 x float> @f5(<4 x float> %a, <4 x float> %b) nounwind readnone ssp {
44 ; CHECK-NEXT: fminnm.4s v0, v0, v1
46 %vminnm2.i = tail call <4 x float> @llvm.aarch64.neon.fminnm.v4f32(<4 x float> %a, <4 x float> %b) nounwind
47 ret <4 x float> %vminnm2.i
50 define <2 x double> @f6(<2 x double> %a, <2 x double> %b) nounwind readnone ssp {
53 ; CHECK-NEXT: fminnm.2d v0, v0, v1
55 %vminnm2.i = tail call <2 x double> @llvm.aarch64.neon.fminnm.v2f64(<2 x double> %a, <2 x double> %b) nounwind
56 ret <2 x double> %vminnm2.i
59 define float @f7(float %a, float %b) nounwind readnone ssp {
62 ; CHECK-NEXT: fmaxnm s0, s0, s1
64 %vmaxnm2.i = tail call float @llvm.aarch64.neon.fmaxnm.f32(float %a, float %b) nounwind
68 define double @f8(double %a, double %b) nounwind readnone ssp {
71 ; CHECK-NEXT: fminnm d0, d0, d1
73 %vmaxnm2.i = tail call double @llvm.aarch64.neon.fminnm.f64(double %a, double %b) nounwind
77 declare <2 x double> @llvm.aarch64.neon.fminnm.v2f64(<2 x double>, <2 x double>) nounwind readnone
78 declare <4 x float> @llvm.aarch64.neon.fminnm.v4f32(<4 x float>, <4 x float>) nounwind readnone
79 declare <2 x float> @llvm.aarch64.neon.fminnm.v2f32(<2 x float>, <2 x float>) nounwind readnone
80 declare <2 x double> @llvm.aarch64.neon.fmaxnm.v2f64(<2 x double>, <2 x double>) nounwind readnone
81 declare <4 x float> @llvm.aarch64.neon.fmaxnm.v4f32(<4 x float>, <4 x float>) nounwind readnone
82 declare <2 x float> @llvm.aarch64.neon.fmaxnm.v2f32(<2 x float>, <2 x float>) nounwind readnone
83 declare float @llvm.aarch64.neon.fmaxnm.f32(float, float) nounwind readnone
84 declare double @llvm.aarch64.neon.fminnm.f64(double, double) nounwind readnone
86 define double @test_fmaxnmv(<2 x double> %in) {
87 ; CHECK-LABEL: test_fmaxnmv:
89 ; CHECK-NEXT: fmaxnmp.2d d0, v0
91 %max = call double @llvm.aarch64.neon.fmaxnmv.f64.v2f64(<2 x double> %in)
95 define double @test_fminnmv(<2 x double> %in) {
96 ; CHECK-LABEL: test_fminnmv:
98 ; CHECK-NEXT: fminnmp.2d d0, v0
100 %min = call double @llvm.aarch64.neon.fminnmv.f64.v2f64(<2 x double> %in)
104 declare double @llvm.aarch64.neon.fmaxnmv.f64.v2f64(<2 x double>)
105 declare double @llvm.aarch64.neon.fminnmv.f64.v2f64(<2 x double>)