1 ; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s 2 3 define float @test_fminv_v2f32(<2 x float> %in) { 4 ; CHECK: test_fminv_v2f32: 5 ; CHECK: fminp s0, v0.2s 6 %min = call float @llvm.aarch64.neon.fminv.f32.v2f32(<2 x float> %in) 7 ret float %min 8 } 9 10 define float @test_fminv_v4f32(<4 x float> %in) { 11 ; CHECK: test_fminv_v4f32: 12 ; CHECK: fminv s0, v0.4s 13 %min = call float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float> %in) 14 ret float %min 15 } 16 17 define double @test_fminv_v2f64(<2 x double> %in) { 18 ; CHECK: test_fminv_v2f64: 19 ; CHECK: fminp d0, v0.2d 20 %min = call double @llvm.aarch64.neon.fminv.f64.v2f64(<2 x double> %in) 21 ret double %min 22 } 23 24 declare float @llvm.aarch64.neon.fminv.f32.v2f32(<2 x float>) 25 declare float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float>) 26 declare double @llvm.aarch64.neon.fminv.f64.v2f64(<2 x double>) 27 28 define float @test_fmaxv_v2f32(<2 x float> %in) { 29 ; CHECK: test_fmaxv_v2f32: 30 ; CHECK: fmaxp s0, v0.2s 31 %max = call float @llvm.aarch64.neon.fmaxv.f32.v2f32(<2 x float> %in) 32 ret float %max 33 } 34 35 define float @test_fmaxv_v4f32(<4 x float> %in) { 36 ; CHECK: test_fmaxv_v4f32: 37 ; CHECK: fmaxv s0, v0.4s 38 %max = call float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float> %in) 39 ret float %max 40 } 41 42 define double @test_fmaxv_v2f64(<2 x double> %in) { 43 ; CHECK: test_fmaxv_v2f64: 44 ; CHECK: fmaxp d0, v0.2d 45 %max = call double @llvm.aarch64.neon.fmaxv.f64.v2f64(<2 x double> %in) 46 ret double %max 47 } 48 49 declare float @llvm.aarch64.neon.fmaxv.f32.v2f32(<2 x float>) 50 declare float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float>) 51 declare double @llvm.aarch64.neon.fmaxv.f64.v2f64(<2 x double>) 52 53 define float @test_fminnmv_v2f32(<2 x float> %in) { 54 ; CHECK: test_fminnmv_v2f32: 55 ; CHECK: fminnmp s0, v0.2s 56 %minnm = call float @llvm.aarch64.neon.fminnmv.f32.v2f32(<2 x float> %in) 57 ret float %minnm 58 } 59 60 define float @test_fminnmv_v4f32(<4 x float> %in) { 61 ; CHECK: test_fminnmv_v4f32: 62 ; CHECK: fminnmv s0, v0.4s 63 %minnm = call float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float> %in) 64 ret float %minnm 65 } 66 67 define double @test_fminnmv_v2f64(<2 x double> %in) { 68 ; CHECK: test_fminnmv_v2f64: 69 ; CHECK: fminnmp d0, v0.2d 70 %minnm = call double @llvm.aarch64.neon.fminnmv.f64.v2f64(<2 x double> %in) 71 ret double %minnm 72 } 73 74 declare float @llvm.aarch64.neon.fminnmv.f32.v2f32(<2 x float>) 75 declare float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float>) 76 declare double @llvm.aarch64.neon.fminnmv.f64.v2f64(<2 x double>) 77 78 define float @test_fmaxnmv_v2f32(<2 x float> %in) { 79 ; CHECK: test_fmaxnmv_v2f32: 80 ; CHECK: fmaxnmp s0, v0.2s 81 %maxnm = call float @llvm.aarch64.neon.fmaxnmv.f32.v2f32(<2 x float> %in) 82 ret float %maxnm 83 } 84 85 define float @test_fmaxnmv_v4f32(<4 x float> %in) { 86 ; CHECK: test_fmaxnmv_v4f32: 87 ; CHECK: fmaxnmv s0, v0.4s 88 %maxnm = call float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float> %in) 89 ret float %maxnm 90 } 91 92 define double @test_fmaxnmv_v2f64(<2 x double> %in) { 93 ; CHECK: test_fmaxnmv_v2f64: 94 ; CHECK: fmaxnmp d0, v0.2d 95 %maxnm = call double @llvm.aarch64.neon.fmaxnmv.f64.v2f64(<2 x double> %in) 96 ret double %maxnm 97 } 98 99 declare float @llvm.aarch64.neon.fmaxnmv.f32.v2f32(<2 x float>) 100 declare float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float>) 101 declare double @llvm.aarch64.neon.fmaxnmv.f64.v2f64(<2 x double>) 102