diff options
| author | Igor Breger <igor.breger@intel.com> | 2015-07-01 13:24:28 +0000 |
|---|---|---|
| committer | Igor Breger <igor.breger@intel.com> | 2015-07-01 13:24:28 +0000 |
| commit | 15820b072b796c03f5f87a8fb0440a931d957022 (patch) | |
| tree | fe407cb237b0e97622fdd774dadaa0de151e73f3 /llvm/test/CodeGen | |
| parent | a06d2585304db4ae07940d5fe86b75bdfaf6efa4 (diff) | |
| download | bcm5719-llvm-15820b072b796c03f5f87a8fb0440a931d957022.tar.gz bcm5719-llvm-15820b072b796c03f5f87a8fb0440a931d957022.zip | |
AVX-512: Implemented missing encoding for FMA scalar instructions
Added tests for encoding
Differential Revision: http://reviews.llvm.org/D10865
llvm-svn: 241159
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/avx512-fma.ll | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-fma.ll b/llvm/test/CodeGen/X86/avx512-fma.ll index c4a44e60c5f..ed046de005c 100644 --- a/llvm/test/CodeGen/X86/avx512-fma.ll +++ b/llvm/test/CodeGen/X86/avx512-fma.ll @@ -59,12 +59,41 @@ define <8 x double> @test_x86_fmsub_pd_z(<8 x double> %a0, <8 x double> %a1, <8 ret <8 x double> %res } -define double @test_x86_fmsub_sd_z(double %a0, double %a1, double %a2) { +define double @test_x86_fmsub_213(double %a0, double %a1, double %a2) { +; CHECK-LABEL: test_x86_fmsub_213: +; CHECK: ## BB#0: +; CHECK-NEXT: vfmsub213sd %xmm2, %xmm0, %xmm1 +; CHECK-NEXT: vmovaps %zmm1, %zmm0 +; CHECK-NEXT: retq %x = fmul double %a0, %a1 %res = fsub double %x, %a2 ret double %res } +define double @test_x86_fmsub_213_m(double %a0, double %a1, double * %a2_ptr) { +; CHECK-LABEL: test_x86_fmsub_213_m: +; CHECK: ## BB#0: +; CHECK-NEXT: vfmsub213sd (%rdi), %xmm0, %xmm1 +; CHECK-NEXT: vmovaps %zmm1, %zmm0 +; CHECK-NEXT: retq + %a2 = load double , double *%a2_ptr + %x = fmul double %a0, %a1 + %res = fsub double %x, %a2 + ret double %res +} + +define double @test_x86_fmsub_231_m(double %a0, double %a1, double * %a2_ptr) { +; CHECK-LABEL: test_x86_fmsub_231_m: +; CHECK: ## BB#0: +; CHECK-NEXT: vfmsub231sd (%rdi), %xmm0, %xmm1 +; CHECK-NEXT: vmovaps %zmm1, %zmm0 +; CHECK-NEXT: retq + %a2 = load double , double *%a2_ptr + %x = fmul double %a0, %a2 + %res = fsub double %x, %a1 + ret double %res +} + define <16 x float> @test231_br(<16 x float> %a1, <16 x float> %a2) nounwind { ; CHECK-LABEL: test231_br: ; CHECK: ## BB#0: |

