From: Elena Demikhovsky Date: Sun, 26 Oct 2014 09:52:24 +0000 (+0000) Subject: AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b01b7306cd084de0d435e1df50fdf4dbcebdc08;p=platform%2Fupstream%2Fllvm.git AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction llvm-svn: 220638 --- diff --git a/llvm/lib/Target/X86/X86InstrAVX512.td b/llvm/lib/Target/X86/X86InstrAVX512.td index 05c09e2..3853e15 100644 --- a/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/llvm/lib/Target/X86/X86InstrAVX512.td @@ -735,18 +735,27 @@ def : Pat<(v8i32 (X86VBroadcastm (v8i1 VK8WM:$mask), (loadi32 addr:$src))), //--- multiclass avx512_mask_broadcast opc, string OpcodeStr, - RegisterClass DstRC, RegisterClass KRC, - ValueType OpVT, ValueType SrcVT> { -def rr : AVX512XS8I { +let Predicates = [HasCDI] in +def Zrr : AVX512XS8I, EVEX; + []>, EVEX, EVEX_V512; + +let Predicates = [HasCDI, HasVLX] in { +def Z128rr : AVX512XS8I, EVEX, EVEX_V128; +def Z256rr : AVX512XS8I, 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; } //===----------------------------------------------------------------------===// diff --git a/llvm/test/MC/Disassembler/X86/avx-512.txt b/llvm/test/MC/Disassembler/X86/avx-512.txt index f78db55..62fc35b 100644 --- a/llvm/test/MC/Disassembler/X86/avx-512.txt +++ b/llvm/test/MC/Disassembler/X86/avx-512.txt @@ -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