mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction
llvm-svn: 220638
This commit is contained in:
parent
6aca626b5c
commit
467839f2f5
@ -735,18 +735,27 @@ def : Pat<(v8i32 (X86VBroadcastm (v8i1 VK8WM:$mask), (loadi32 addr:$src))),
|
||||
//---
|
||||
|
||||
multiclass avx512_mask_broadcast<bits<8> opc, string OpcodeStr,
|
||||
RegisterClass DstRC, RegisterClass KRC,
|
||||
ValueType OpVT, ValueType SrcVT> {
|
||||
def rr : AVX512XS8I<opc, MRMDestReg, (outs DstRC:$dst), (ins KRC:$src),
|
||||
RegisterClass KRC> {
|
||||
let Predicates = [HasCDI] in
|
||||
def Zrr : AVX512XS8I<opc, MRMSrcReg, (outs VR512:$dst), (ins KRC:$src),
|
||||
!strconcat(OpcodeStr, " \t{$src, $dst|$dst, $src}"),
|
||||
[]>, EVEX;
|
||||
[]>, EVEX, EVEX_V512;
|
||||
|
||||
let Predicates = [HasCDI, HasVLX] in {
|
||||
def Z128rr : AVX512XS8I<opc, MRMSrcReg, (outs VR128:$dst), (ins KRC:$src),
|
||||
!strconcat(OpcodeStr, " \t{$src, $dst|$dst, $src}"),
|
||||
[]>, EVEX, EVEX_V128;
|
||||
def Z256rr : AVX512XS8I<opc, MRMSrcReg, (outs VR256:$dst), (ins KRC:$src),
|
||||
!strconcat(OpcodeStr, " \t{$src, $dst|$dst, $src}"),
|
||||
[]>, EVEX, EVEX_V256;
|
||||
}
|
||||
}
|
||||
|
||||
let Predicates = [HasCDI] in {
|
||||
defm VPBROADCASTMW2D : avx512_mask_broadcast<0x3A, "vpbroadcastmw2d", VR512,
|
||||
VK16, v16i32, v16i1>, EVEX_V512;
|
||||
defm VPBROADCASTMB2Q : avx512_mask_broadcast<0x2A, "vpbroadcastmb2q", VR512,
|
||||
VK8, v8i64, v8i1>, EVEX_V512, VEX_W;
|
||||
defm VPBROADCASTMW2D : avx512_mask_broadcast<0x3A, "vpbroadcastmw2d",
|
||||
VK16>;
|
||||
defm VPBROADCASTMB2Q : avx512_mask_broadcast<0x2A, "vpbroadcastmb2q",
|
||||
VK8>, VEX_W;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -1,4 +1,5 @@
|
||||
# RUN: llvm-mc --disassemble %s -triple=x86_64-apple-darwin9 -mcpu=knl | FileCheck %s
|
||||
# RUN: llvm-mc --disassemble %s -triple=x86_64-apple-darwin9 -mcpu=skx | FileCheck --check-prefix=CHECK-SKX %s
|
||||
|
||||
# CHECK: vpbroadcastd %xmm18, %zmm28 {%k7} {z}
|
||||
0x62 0x22 0x7d 0xcf 0x58 0xe2
|
||||
@ -13,7 +14,13 @@
|
||||
0x62 0x32 0xed 0x48 0x16 0x04 0x96
|
||||
|
||||
# CHECK: vpbroadcastmw2d %k2, %zmm8
|
||||
0x62 0xd2 0x7e 0x48 0x3a 0xd0
|
||||
0x62 0x72 0x7e 0x48 0x3a 0xc2
|
||||
|
||||
# CHECK-SKX: vpbroadcastmw2d %k2, %xmm8
|
||||
0x62 0x72 0x7e 0x08 0x3a 0xc2
|
||||
|
||||
# CHECK-SKX: vpbroadcastmw2d %k2, %ymm8
|
||||
0x62 0x72 0x7e 0x28 0x3a 0xc2
|
||||
|
||||
# CHECK: vpbroadcastq (%r9,%rax), %zmm28
|
||||
0x62 0x42 0xfd 0x48 0x59 0x24 0x01
|
||||
|
Loading…
Reference in New Issue
Block a user