Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit e7c8559

Browse files
committed
[AVX-512] Add missing EVEX version of pattern for (v2f64 (extloadv2f32 addr:)) -> VCVTPS2PDZ128rm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286059 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent ac00b70 commit e7c8559

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/Target/X86/X86InstrAVX512.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6077,6 +6077,8 @@ def : Pat<(v8f64 (extloadv8f32 addr:$src)),
60776077
(VCVTPS2PDZrm addr:$src)>;
60786078

60796079
let Predicates = [HasVLX] in {
6080+
def : Pat<(v2f64 (extloadv2f32 addr:$src)),
6081+
(VCVTPS2PDZ128rm addr:$src)>;
60806082
def : Pat<(v4f64 (extloadv4f32 addr:$src)),
60816083
(VCVTPS2PDZ256rm addr:$src)>;
60826084
}

lib/Target/X86/X86InstrSSE.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,7 @@ let Predicates = [UseSSE2] in {
21352135
} // Predicates = [UseSSE2]
21362136

21372137
// Convert packed single to packed double
2138-
let Predicates = [HasAVX] in {
2138+
let Predicates = [HasAVX, NoVLX] in {
21392139
// SSE2 instructions without OpSize prefix
21402140
def VCVTPS2PDrr : I<0x5A, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
21412141
"vcvtps2pd\t{$src, $dst|$dst, $src}",

test/CodeGen/X86/vec_fpext.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ define void @fpext_frommem(<2 x float>* %in, <2 x double>* %out) {
2828
; X32-AVX512VL: # BB#0: # %entry
2929
; X32-AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x08]
3030
; X32-AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %ecx # encoding: [0x8b,0x4c,0x24,0x04]
31-
; X32-AVX512VL-NEXT: vcvtps2pd (%ecx), %xmm0 # encoding: [0xc5,0xf8,0x5a,0x01]
31+
; X32-AVX512VL-NEXT: vcvtps2pd (%ecx), %xmm0 # encoding: [0x62,0xf1,0x7c,0x08,0x5a,0x01]
3232
; X32-AVX512VL-NEXT: vmovups %xmm0, (%eax) # encoding: [0x62,0xf1,0x7c,0x08,0x11,0x00]
3333
; X32-AVX512VL-NEXT: retl # encoding: [0xc3]
3434
;
@@ -46,7 +46,7 @@ define void @fpext_frommem(<2 x float>* %in, <2 x double>* %out) {
4646
;
4747
; X64-AVX512VL-LABEL: fpext_frommem:
4848
; X64-AVX512VL: # BB#0: # %entry
49-
; X64-AVX512VL-NEXT: vcvtps2pd (%rdi), %xmm0 # encoding: [0xc5,0xf8,0x5a,0x07]
49+
; X64-AVX512VL-NEXT: vcvtps2pd (%rdi), %xmm0 # encoding: [0x62,0xf1,0x7c,0x08,0x5a,0x07]
5050
; X64-AVX512VL-NEXT: vmovups %xmm0, (%rsi) # encoding: [0x62,0xf1,0x7c,0x08,0x11,0x06]
5151
; X64-AVX512VL-NEXT: retq # encoding: [0xc3]
5252
entry:

0 commit comments

Comments
 (0)