diff options
| -rw-r--r-- | llvm/test/CodeGen/Generic/expand-experimental-reductions.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/expand-experimental-reductions.ll b/llvm/test/CodeGen/Generic/expand-experimental-reductions.ll index ef813fa7205..d38e9504705 100644 --- a/llvm/test/CodeGen/Generic/expand-experimental-reductions.ll +++ b/llvm/test/CodeGen/Generic/expand-experimental-reductions.ll @@ -110,6 +110,17 @@ entry: ret float %r } +define float @fadd_f32_strict_accum(float %accum, <4 x float> %vec) { +; CHECK-LABEL: @fadd_f32_strict_accum( +; CHECK-NEXT: entry: +; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.vector.reduce.fadd.f32.f32.v4f32(float [[ACCUM:%.*]], <4 x float> [[VEC:%.*]]) +; CHECK-NEXT: ret float [[R]] +; +entry: + %r = call float @llvm.experimental.vector.reduce.fadd.f32.v4f32(float %accum, <4 x float> %vec) + ret float %r +} + define float @fmul_f32(<4 x float> %vec) { ; CHECK-LABEL: @fmul_f32( ; CHECK-NEXT: entry: @@ -125,6 +136,28 @@ entry: ret float %r } +define float @fmul_f32_strict(<4 x float> %vec) { +; CHECK-LABEL: @fmul_f32_strict( +; CHECK-NEXT: entry: +; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.vector.reduce.fmul.f32.f32.v4f32(float undef, <4 x float> [[VEC:%.*]]) +; CHECK-NEXT: ret float [[R]] +; +entry: + %r = call float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float undef, <4 x float> %vec) + ret float %r +} + +define float @fmul_f32_strict_accum(float %accum, <4 x float> %vec) { +; CHECK-LABEL: @fmul_f32_strict_accum( +; CHECK-NEXT: entry: +; CHECK-NEXT: [[R:%.*]] = call float @llvm.experimental.vector.reduce.fmul.f32.f32.v4f32(float [[ACCUM:%.*]], <4 x float> [[VEC:%.*]]) +; CHECK-NEXT: ret float [[R]] +; +entry: + %r = call float @llvm.experimental.vector.reduce.fmul.f32.v4f32(float %accum, <4 x float> %vec) + ret float %r +} + define i64 @smax_i64(<2 x i64> %vec) { ; CHECK-LABEL: @smax_i64( ; CHECK-NEXT: entry: |

