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.v2.fadd.f16.v1f16(half, <1 x half>)
5 declare float @llvm.experimental.vector.reduce.v2.fadd.f32.v1f32(float, <1 x float>)
6 declare double @llvm.experimental.vector.reduce.v2.fadd.f64.v1f64(double, <1 x double>)
7 declare fp128 @llvm.experimental.vector.reduce.v2.fadd.f128.v1f128(fp128, <1 x fp128>)
9 declare float @llvm.experimental.vector.reduce.v2.fadd.f32.v3f32(float, <3 x float>)
10 declare fp128 @llvm.experimental.vector.reduce.v2.fadd.f128.v2f128(fp128, <2 x fp128>)
11 declare float @llvm.experimental.vector.reduce.v2.fadd.f32.v16f32(float, <16 x float>)
13 define half @test_v1f16(<1 x half> %a) nounwind {
14 ; CHECK-LABEL: test_v1f16:
17 %b = call fast nnan half @llvm.experimental.vector.reduce.v2.fadd.f16.v1f16(half 0.0, <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 fast nnan float @llvm.experimental.vector.reduce.v2.fadd.f32.v1f32(float 0.0, <1 x float> %a)
31 define double @test_v1f64(<1 x double> %a) nounwind {
32 ; CHECK-LABEL: test_v1f64:
35 %b = call fast nnan double @llvm.experimental.vector.reduce.v2.fadd.f64.v1f64(double 0.0, <1 x double> %a)
39 define fp128 @test_v1f128(<1 x fp128> %a) nounwind {
40 ; CHECK-LABEL: test_v1f128:
43 %b = call fast nnan fp128 @llvm.experimental.vector.reduce.v2.fadd.f128.v1f128(fp128 zeroinitializer, <1 x fp128> %a)
47 define float @test_v3f32(<3 x float> %a) nounwind {
48 ; CHECK-LABEL: test_v3f32:
50 ; CHECK-NEXT: fmov s1, wzr
51 ; CHECK-NEXT: mov v0.s[3], v1.s[0]
52 ; CHECK-NEXT: ext v1.16b, v0.16b, v0.16b, #8
53 ; CHECK-NEXT: fadd v0.2s, v0.2s, v1.2s
54 ; CHECK-NEXT: faddp s0, v0.2s
56 %b = call fast nnan float @llvm.experimental.vector.reduce.v2.fadd.f32.v3f32(float 0.0, <3 x float> %a)
60 define fp128 @test_v2f128(<2 x fp128> %a) nounwind {
61 ; CHECK-LABEL: test_v2f128:
63 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
64 ; CHECK-NEXT: bl __addtf3
65 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
67 %b = call fast nnan fp128 @llvm.experimental.vector.reduce.v2.fadd.f128.v2f128(fp128 zeroinitializer, <2 x fp128> %a)
71 define float @test_v16f32(<16 x float> %a) nounwind {
72 ; CHECK-LABEL: test_v16f32:
74 ; CHECK-NEXT: fadd v1.4s, v1.4s, v3.4s
75 ; CHECK-NEXT: fadd v0.4s, v0.4s, v2.4s
76 ; CHECK-NEXT: fadd v0.4s, v0.4s, v1.4s
77 ; CHECK-NEXT: ext v1.16b, v0.16b, v0.16b, #8
78 ; CHECK-NEXT: fadd v0.2s, v0.2s, v1.2s
79 ; CHECK-NEXT: faddp s0, v0.2s
81 %b = call fast nnan float @llvm.experimental.vector.reduce.v2.fadd.f32.v16f32(float 0.0, <16 x float> %a)