diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/constant-fold-math.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/constant-fold-math.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/constant-fold-math.ll b/llvm/test/Transforms/InstCombine/constant-fold-math.ll index 00fceb19151..14377df3729 100644 --- a/llvm/test/Transforms/InstCombine/constant-fold-math.ll +++ b/llvm/test/Transforms/InstCombine/constant-fold-math.ll @@ -2,6 +2,7 @@ declare float @llvm.fma.f32(float, float, float) #0 declare float @llvm.fmuladd.f32(float, float, float) #0 +declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>) #0 declare double @llvm.fma.f64(double, double, double) #0 declare double @llvm.fmuladd.f64(double, double, double) #0 @@ -15,6 +16,13 @@ define float @constant_fold_fma_f32() #0 { ret float %x } +; CHECK-LABEL: @constant_fold_fma_v4f32 +; CHECK-NEXT: ret <4 x float> <float 1.200000e+01, float 1.400000e+01, float 1.600000e+01, float 1.800000e+01> +define <4 x float> @constant_fold_fma_v4f32() #0 { + %x = call <4 x float> @llvm.fma.v4f32(<4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float> <float 2.0, float 2.0, float 2.0, float 2.0>, <4 x float> <float 10.0, float 10.0, float 10.0, float 10.0>) + ret <4 x float> %x +} + ; CHECK-LABEL: @constant_fold_fmuladd_f32 ; CHECK-NEXT: ret float 6.000000e+00 define float @constant_fold_fmuladd_f32() #0 { |

