1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s --check-prefix=CHECK
4 declare half @llvm.experimental.vector.reduce.fmax.v1f16(<1 x half> %a)
5 declare float @llvm.experimental.vector.reduce.fmax.v1f32(<1 x float> %a)
6 declare double @llvm.experimental.vector.reduce.fmax.v1f64(<1 x double> %a)
7 declare fp128 @llvm.experimental.vector.reduce.fmax.v1f128(<1 x fp128> %a)
9 declare float @llvm.experimental.vector.reduce.fmax.v3f32(<3 x float> %a)
10 declare fp128 @llvm.experimental.vector.reduce.fmax.v2f128(<2 x fp128> %a)
11 declare float @llvm.experimental.vector.reduce.fmax.v16f32(<16 x float> %a)
13 define half @test_v1f16(<1 x half> %a) nounwind {
14 ; CHECK-LABEL: test_v1f16:
17 %b = call nnan half @llvm.experimental.vector.reduce.fmax.v1f16(<1 x half> %a)
21 define float @test_v1f32(<1 x float> %a) nounwind {
22 ; CHECK-LABEL: test_v1f32:
24 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
25 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
27 %b = call nnan float @llvm.experimental.vector.reduce.fmax.v1f32(<1 x float> %a)
31 define double @test_v1f64(<1 x double> %a) nounwind {
32 ; CHECK-LABEL: test_v1f64:
35 %b = call nnan double @llvm.experimental.vector.reduce.fmax.v1f64(<1 x double> %a)
39 define fp128 @test_v1f128(<1 x fp128> %a) nounwind {
40 ; CHECK-LABEL: test_v1f128:
43 %b = call nnan fp128 @llvm.experimental.vector.reduce.fmax.v1f128(<1 x fp128> %a)
47 define float @test_v3f32(<3 x float> %a) nounwind {
48 ; CHECK-LABEL: test_v3f32:
50 ; CHECK-NEXT: mov w8, #2139095040
51 ; CHECK-NEXT: fmov s1, w8
52 ; CHECK-NEXT: mov v0.s[3], v1.s[0]
53 ; CHECK-NEXT: fmaxnmv s0, v0.4s
55 %b = call nnan float @llvm.experimental.vector.reduce.fmax.v3f32(<3 x float> %a)
59 define fp128 @test_v2f128(<2 x fp128> %a) nounwind {
60 ; CHECK-LABEL: test_v2f128:
63 %b = call nnan fp128 @llvm.experimental.vector.reduce.fmax.v2f128(<2 x fp128> %a)
67 define float @test_v16f32(<16 x float> %a) nounwind {
68 ; CHECK-LABEL: test_v16f32:
70 ; CHECK-NEXT: fmaxnm v1.4s, v1.4s, v3.4s
71 ; CHECK-NEXT: fmaxnm v0.4s, v0.4s, v2.4s
72 ; CHECK-NEXT: fmaxnm v0.4s, v0.4s, v1.4s
73 ; CHECK-NEXT: fmaxnmv s0, v0.4s
75 %b = call nnan float @llvm.experimental.vector.reduce.fmax.v16f32(<16 x float> %a)