forked from OSchip/llvm-project
[X86] Add AVX512 support to X86FastISel::X86MaterializeFP
llvm-svn: 316853
This commit is contained in:
parent
07964fbdcb
commit
1e30d783dd
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue