[llvm] r316853 - [X86] Add AVX512 support to X86FastISel::X86MaterializeFP
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 28 19:18:42 PDT 2017
Author: ctopper
Date: Sat Oct 28 19:18:41 2017
New Revision: 316853
URL: http://llvm.org/viewvc/llvm-project?rev=316853&view=rev
Log:
[X86] Add AVX512 support to X86FastISel::X86MaterializeFP
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=316853&r1=316852&r2=316853&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Sat Oct 28 19:18:41 2017
@@ -3712,7 +3712,9 @@ unsigned X86FastISel::X86MaterializeFP(c
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(c
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;
Modified: llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll?rev=316853&r1=316852&r2=316853&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll Sat Oct 28 19:18:41 2017
@@ -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) {
More information about the llvm-commits
mailing list