diff options
| author | Craig Topper <craig.topper@intel.com> | 2017-10-29 02:18:41 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2017-10-29 02:18:41 +0000 |
| commit | 1e30d783dd3023a7ed0c13ac379709bcdcbbe149 (patch) | |
| tree | 5b73e686e08bb1c567208302b8112c423acebc5a /llvm | |
| parent | 07964fbdcb0fdccbcdcdb26179dc4f0d3a78fc01 (diff) | |
| download | bcm5719-llvm-1e30d783dd3023a7ed0c13ac379709bcdcbbe149.tar.gz bcm5719-llvm-1e30d783dd3023a7ed0c13ac379709bcdcbbe149.zip | |
[X86] Add AVX512 support to X86FastISel::X86MaterializeFP
llvm-svn: 316853
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 8 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/fast-isel-constpool.ll | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index 30cdb36ab8b..4c8decaf591 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -3712,7 +3712,9 @@ unsigned X86FastISel::X86MaterializeFP(const ConstantFP *CFP, MVT VT) { default: return 0; case MVT::f32: if (X86ScalarSSEf32) { - Opc = Subtarget->hasAVX() ? X86::VMOVSSrm : X86::MOVSSrm; + Opc = Subtarget->hasAVX512() + ? X86::VMOVSSZrm + : Subtarget->hasAVX() ? X86::VMOVSSrm : X86::MOVSSrm; RC = &X86::FR32RegClass; } else { Opc = X86::LD_Fp32m; @@ -3721,7 +3723,9 @@ unsigned X86FastISel::X86MaterializeFP(const ConstantFP *CFP, MVT VT) { break; case MVT::f64: if (X86ScalarSSEf64) { - Opc = Subtarget->hasAVX() ? X86::VMOVSDrm : X86::MOVSDrm; + Opc = Subtarget->hasAVX512() + ? X86::VMOVSDZrm + : Subtarget->hasAVX() ? X86::VMOVSDrm : X86::MOVSDrm; RC = &X86::FR64RegClass; } else { Opc = X86::LD_Fp64m; diff --git a/llvm/test/CodeGen/X86/fast-isel-constpool.ll b/llvm/test/CodeGen/X86/fast-isel-constpool.ll index dda7ce949cf..374a5e3907c 100644 --- a/llvm/test/CodeGen/X86/fast-isel-constpool.ll +++ b/llvm/test/CodeGen/X86/fast-isel-constpool.ll @@ -3,6 +3,8 @@ ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small -mattr=avx < %s | FileCheck %s --check-prefix=AVX ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large -mattr=avx < %s | FileCheck %s --check-prefix=LARGE_AVX +; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small -mattr=avx512f < %s | FileCheck %s --check-prefix=AVX +; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large -mattr=avx512f < %s | FileCheck %s --check-prefix=LARGE_AVX ; Make sure fast isel uses rip-relative addressing for the small code model. define float @constpool_float(float %x) { |

