diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2018-04-11 14:43:11 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2018-04-11 14:43:11 +0000 |
commit | 21027f253e95f4d39e7e10f7373d190bd7bc9c1c (patch) | |
tree | 1e8509f6859057cc818797eb507c7adbc7a4ba6d /test/CodeGen/aarch64-neon-2velem.c | |
parent | 7175a52e21c264ba3daa98be5087914760a3a52f (diff) | |
download | clang-21027f253e95f4d39e7e10f7373d190bd7bc9c1c.tar.gz |
[NEON] Support vfma_n and vfms_n intrinsics
Differential Revision: https://reviews.llvm.org/D45483
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/aarch64-neon-2velem.c')
-rw-r--r-- | test/CodeGen/aarch64-neon-2velem.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/aarch64-neon-2velem.c b/test/CodeGen/aarch64-neon-2velem.c index 3867b01afb..320ce0286b 100644 --- a/test/CodeGen/aarch64-neon-2velem.c +++ b/test/CodeGen/aarch64-neon-2velem.c @@ -3083,6 +3083,17 @@ float32x2_t test_vfma_n_f32(float32x2_t a, float32x2_t b, float32_t n) { return vfma_n_f32(a, b, n); } +// CHECK-LABEL: @test_vfma_n_f64( +// CHECK: [[VECINIT_I:%.*]] = insertelement <1 x double> undef, double %n, i32 0 +// CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> +// CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> +// CHECK: [[TMP2:%.*]] = bitcast <1 x double> [[VECINIT_I]] to <8 x i8> +// CHECK: [[TMP3:%.*]] = call <1 x double> @llvm.fma.v1f64(<1 x double> %b, <1 x double> [[VECINIT_I]], <1 x double> %a) +// CHECK: ret <1 x double> [[TMP3]] +float64x1_t test_vfma_n_f64(float64x1_t a, float64x1_t b, float64_t n) { + return vfma_n_f64(a, b, n); +} + // CHECK-LABEL: @test_vfmaq_n_f32( // CHECK: [[VECINIT_I:%.*]] = insertelement <4 x float> undef, float %n, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <4 x float> [[VECINIT_I]], float %n, i32 1 @@ -3110,6 +3121,18 @@ float32x2_t test_vfms_n_f32(float32x2_t a, float32x2_t b, float32_t n) { return vfms_n_f32(a, b, n); } +// CHECK-LABEL: @test_vfms_n_f64( +// CHECK: [[SUB_I:%.*]] = fsub <1 x double> <double -0.000000e+00>, %b +// CHECK: [[VECINIT_I:%.*]] = insertelement <1 x double> undef, double %n, i32 0 +// CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> +// CHECK: [[TMP1:%.*]] = bitcast <1 x double> [[SUB_I]] to <8 x i8> +// CHECK: [[TMP2:%.*]] = bitcast <1 x double> [[VECINIT_I]] to <8 x i8> +// CHECK: [[TMP3:%.*]] = call <1 x double> @llvm.fma.v1f64(<1 x double> [[SUB_I]], <1 x double> [[VECINIT_I]], <1 x double> %a) +// CHECK: ret <1 x double> [[TMP3]] +float64x1_t test_vfms_n_f64(float64x1_t a, float64x1_t b, float64_t n) { + return vfms_n_f64(a, b, n); +} + // CHECK-LABEL: @test_vfmsq_n_f32( // CHECK: [[SUB_I:%.*]] = fsub <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, %b // CHECK: [[VECINIT_I:%.*]] = insertelement <4 x float> undef, float %n, i32 0 |