1 ; RUN: opt -S < %s | FileCheck %s
2 ; RUN: llvm-dis < %s.bc | FileCheck %s
4 define float @fadd_acc(<4 x float> %in, float %acc) {
5 ; CHECK-LABEL: @fadd_acc
6 ; CHECK: %res = call float @llvm.experimental.vector.reduce.v2.fadd.f32.v4f32(float %acc, <4 x float> %in)
7 %res = call float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float %acc, <4 x float> %in)
11 define float @fadd_undef(<4 x float> %in) {
12 ; CHECK-LABEL: @fadd_undef
13 ; CHECK: %res = call float @llvm.experimental.vector.reduce.v2.fadd.f32.v4f32(float undef, <4 x float> %in)
14 %res = call float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float undef, <4 x float> %in)
18 define float @fadd_fast_acc(<4 x float> %in, float %acc) {
19 ; CHECK-LABEL: @fadd_fast_acc
20 ; CHECK: %res = call fast float @llvm.experimental.vector.reduce.v2.fadd.f32.v4f32(float 0.000000e+00, <4 x float> %in)
21 %res = call fast float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float %acc, <4 x float> %in)
25 define float @fadd_fast_undef(<4 x float> %in) {
26 ; CHECK-LABEL: @fadd_fast_undef
27 ; CHECK: %res = call fast float @llvm.experimental.vector.reduce.v2.fadd.f32.v4f32(float 0.000000e+00, <4 x float> %in)
28 %res = call fast float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float undef, <4 x float> %in)
32 define float @fmul_acc(<4 x float> %in, float %acc) {
33 ; CHECK-LABEL: @fmul_acc
34 ; CHECK: %res = call float @llvm.experimental.vector.reduce.v2.fmul.f32.v4f32(float %acc, <4 x float> %in)
35 %res = call float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float %acc, <4 x float> %in)
39 define float @fmul_undef(<4 x float> %in) {
40 ; CHECK-LABEL: @fmul_undef
41 ; CHECK: %res = call float @llvm.experimental.vector.reduce.v2.fmul.f32.v4f32(float undef, <4 x float> %in)
42 %res = call float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float undef, <4 x float> %in)
46 define float @fmul_fast_acc(<4 x float> %in, float %acc) {
47 ; CHECK-LABEL: @fmul_fast_acc
48 ; CHECK: %res = call fast float @llvm.experimental.vector.reduce.v2.fmul.f32.v4f32(float 1.000000e+00, <4 x float> %in)
49 %res = call fast float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float %acc, <4 x float> %in)
53 define float @fmul_fast_undef(<4 x float> %in) {
54 ; CHECK-LABEL: @fmul_fast_undef
55 ; CHECK: %res = call fast float @llvm.experimental.vector.reduce.v2.fmul.f32.v4f32(float 1.000000e+00, <4 x float> %in)
56 %res = call fast float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float undef, <4 x float> %in)
60 declare float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float, <4 x float>)
61 ; CHECK: declare float @llvm.experimental.vector.reduce.v2.fadd.f32.v4f32(float, <4 x float>)
63 declare float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float, <4 x float>)
64 ; CHECK: declare float @llvm.experimental.vector.reduce.v2.fmul.f32.v4f32(float, <4 x float>)