mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
Reorder declarations of vmovmskp* and also put the necessary AVX
predicate and TB encoding fields. This fix the encoding for the attached testcase. This fixes PR10625. llvm-svn: 137684
This commit is contained in:
parent
822410da56
commit
1e817d1451
@ -1475,17 +1475,6 @@ multiclass sse12_extr_sign_mask<RegisterClass RC, Intrinsic Int, string asm,
|
|||||||
!strconcat(asm, "\t{$src, $dst|$dst, $src}"), [], d>, REX_W;
|
!strconcat(asm, "\t{$src, $dst|$dst, $src}"), [], d>, REX_W;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mask creation
|
|
||||||
defm VMOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps,
|
|
||||||
"movmskps", SSEPackedSingle>, VEX;
|
|
||||||
defm VMOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd,
|
|
||||||
"movmskpd", SSEPackedDouble>, OpSize,
|
|
||||||
VEX;
|
|
||||||
defm VMOVMSKPSY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_ps_256,
|
|
||||||
"movmskps", SSEPackedSingle>, VEX;
|
|
||||||
defm VMOVMSKPDY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_pd_256,
|
|
||||||
"movmskpd", SSEPackedDouble>, OpSize,
|
|
||||||
VEX;
|
|
||||||
defm MOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps, "movmskps",
|
defm MOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps, "movmskps",
|
||||||
SSEPackedSingle>, TB;
|
SSEPackedSingle>, TB;
|
||||||
defm MOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd, "movmskpd",
|
defm MOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd, "movmskpd",
|
||||||
@ -1493,29 +1482,44 @@ defm MOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd, "movmskpd",
|
|||||||
|
|
||||||
// X86fgetsign
|
// X86fgetsign
|
||||||
def MOVMSKPDrr32_alt : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins FR64:$src),
|
def MOVMSKPDrr32_alt : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins FR64:$src),
|
||||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||||
[(set GR32:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB, OpSize;
|
[(set GR32:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB,
|
||||||
|
OpSize;
|
||||||
def MOVMSKPDrr64_alt : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins FR64:$src),
|
def MOVMSKPDrr64_alt : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins FR64:$src),
|
||||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||||
[(set GR64:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB, OpSize;
|
[(set GR64:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB,
|
||||||
|
OpSize;
|
||||||
def MOVMSKPSrr32_alt : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins FR32:$src),
|
def MOVMSKPSrr32_alt : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins FR32:$src),
|
||||||
"movmskps\t{$src, $dst|$dst, $src}",
|
"movmskps\t{$src, $dst|$dst, $src}",
|
||||||
[(set GR32:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
[(set GR32:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
||||||
def MOVMSKPSrr64_alt : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins FR32:$src),
|
def MOVMSKPSrr64_alt : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins FR32:$src),
|
||||||
"movmskps\t{$src, $dst|$dst, $src}",
|
"movmskps\t{$src, $dst|$dst, $src}",
|
||||||
[(set GR64:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
[(set GR64:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
||||||
|
|
||||||
// Assembler Only
|
let Predicates = [HasAVX] in {
|
||||||
def VMOVMSKPSr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
defm VMOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps,
|
||||||
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
"movmskps", SSEPackedSingle>, TB, VEX;
|
||||||
def VMOVMSKPDr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
defm VMOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd,
|
||||||
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
"movmskpd", SSEPackedDouble>, TB, OpSize,
|
||||||
VEX;
|
VEX;
|
||||||
def VMOVMSKPSYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
defm VMOVMSKPSY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_ps_256,
|
||||||
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
"movmskps", SSEPackedSingle>, TB, VEX;
|
||||||
def VMOVMSKPDYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
defm VMOVMSKPDY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_pd_256,
|
||||||
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
"movmskpd", SSEPackedDouble>, TB, OpSize,
|
||||||
VEX;
|
VEX;
|
||||||
|
|
||||||
|
// Assembler Only
|
||||||
|
def VMOVMSKPSr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
||||||
|
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
||||||
|
def VMOVMSKPDr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
||||||
|
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
||||||
|
VEX;
|
||||||
|
def VMOVMSKPSYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
||||||
|
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
||||||
|
def VMOVMSKPDYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
||||||
|
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
||||||
|
VEX;
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// SSE 1 & 2 - Misc aliasing of packed SSE 1 & 2 instructions
|
// SSE 1 & 2 - Misc aliasing of packed SSE 1 & 2 instructions
|
||||||
|
@ -479,6 +479,14 @@
|
|||||||
// CHECK: encoding: [0xc5,0xf9,0x50,0xc2]
|
// CHECK: encoding: [0xc5,0xf9,0x50,0xc2]
|
||||||
vmovmskpd %xmm2, %eax
|
vmovmskpd %xmm2, %eax
|
||||||
|
|
||||||
|
// CHECK: vmovmskps %ymm2, %eax
|
||||||
|
// CHECK: encoding: [0xc5,0xfc,0x50,0xc2]
|
||||||
|
vmovmskps %ymm2, %eax
|
||||||
|
|
||||||
|
// CHECK: vmovmskpd %ymm2, %eax
|
||||||
|
// CHECK: encoding: [0xc5,0xfd,0x50,0xc2]
|
||||||
|
vmovmskpd %ymm2, %eax
|
||||||
|
|
||||||
// CHECK: vcmpss $0, %xmm1, %xmm2, %xmm3
|
// CHECK: vcmpss $0, %xmm1, %xmm2, %xmm3
|
||||||
// CHECK: encoding: [0xc5,0xea,0xc2,0xd9,0x00]
|
// CHECK: encoding: [0xc5,0xea,0xc2,0xd9,0x00]
|
||||||
vcmpeqss %xmm1, %xmm2, %xmm3
|
vcmpeqss %xmm1, %xmm2, %xmm3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user