mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Add AVX vbroadcast new instruction
llvm-svn: 108788
This commit is contained in:
parent
15f94c52e6
commit
88869cb4db
@ -411,6 +411,15 @@ class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
||||
: Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TA,
|
||||
Requires<[HasSSE42]>;
|
||||
|
||||
// AVX Instruction Templates:
|
||||
// Instructions introduced in AVX (no SSE equivalent forms)
|
||||
//
|
||||
// AVX8I - AVX instructions with T8 and OpSize prefix.
|
||||
class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
||||
list<dag> pattern>
|
||||
: I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8, OpSize,
|
||||
Requires<[HasAVX]>;
|
||||
|
||||
// AES Instruction Templates:
|
||||
//
|
||||
// AES8I
|
||||
|
@ -4980,3 +4980,22 @@ def AESKEYGENASSIST128rm : AESAI<0xDF, MRMSrcMem, (outs VR128:$dst),
|
||||
(int_x86_aesni_aeskeygenassist (bitconvert (memopv2i64 addr:$src1)),
|
||||
imm:$src2))]>,
|
||||
OpSize;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AVX Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
let isAsmParserOnly = 1 in {
|
||||
|
||||
// Load from memory and broadcast to all elements of the destination operand
|
||||
class avx_broadcast<bits<8> opc, string OpcodeStr, RegisterClass RC,
|
||||
X86MemOperand x86memop> :
|
||||
AVX8I<opc, MRMSrcMem, (outs RC:$dst), (ins x86memop:$src),
|
||||
!strconcat(OpcodeStr, "\t{$src, $dst|$dst, $src}"), []>, VEX;
|
||||
|
||||
def VBROADCASTSS : avx_broadcast<0x18, "vbroadcastss", VR128, f32mem>;
|
||||
def VBROADCASTSSY : avx_broadcast<0x18, "vbroadcastss", VR256, f32mem>;
|
||||
def VBROADCASTSD : avx_broadcast<0x19, "vbroadcastsd", VR256, f64mem>;
|
||||
def VBROADCASTF128 : avx_broadcast<0x1A, "vbroadcastf128", VR256, f128mem>;
|
||||
|
||||
} // isAsmParserOnly
|
||||
|
@ -3072,3 +3072,19 @@ pshufb CPI1_0(%rip), %xmm1
|
||||
// CHECK: encoding: [0xc4,0x63,0x2d,0x40,0x18,0x03]
|
||||
vdpps $3, (%rax), %ymm10, %ymm11
|
||||
|
||||
// CHECK: vbroadcastf128 (%rax), %ymm12
|
||||
// CHECK: encoding: [0xc4,0x62,0x7d,0x1a,0x20]
|
||||
vbroadcastf128 (%rax), %ymm12
|
||||
|
||||
// CHECK: vbroadcastsd (%rax), %ymm12
|
||||
// CHECK: encoding: [0xc4,0x62,0x7d,0x19,0x20]
|
||||
vbroadcastsd (%rax), %ymm12
|
||||
|
||||
// CHECK: vbroadcastss (%rax), %xmm12
|
||||
// CHECK: encoding: [0xc4,0x62,0x79,0x18,0x20]
|
||||
vbroadcastss (%rax), %xmm12
|
||||
|
||||
// CHECK: vbroadcastss (%rax), %ymm12
|
||||
// CHECK: encoding: [0xc4,0x62,0x7d,0x18,0x20]
|
||||
vbroadcastss (%rax), %ymm12
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user