[PATCH] D14766: AVX512 : vpextrw.s implementation.

Igor Breger via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 23:47:49 PST 2015


igorb created this revision.
igorb added reviewers: delena, AsafBadouh.
igorb added a subscriber: llvm-commits.
igorb set the repository for this revision to rL LLVM.

AVX512: Implemented encoding for vpextrw.s instructions.

Repository:
  rL LLVM

http://reviews.llvm.org/D14766

Files:
  lib/Target/X86/X86InstrAVX512.td
  test/MC/X86/x86-64-avx512bw.s

Index: test/MC/X86/x86-64-avx512bw.s
===================================================================
--- test/MC/X86/x86-64-avx512bw.s
+++ test/MC/X86/x86-64-avx512bw.s
@@ -4691,3 +4691,51 @@
 // CHECK:  encoding: [0x62,0x62,0x7d,0xc9,0x7b,0xc0]
           vpbroadcastw %eax, %zmm24 {%k1} {z}
 
+// CHECK: vpextrw.s $171, %xmm28, %eax
+// CHECK:  encoding: [0x62,0x63,0x7d,0x08,0x15,0xe0,0xab]
+          vpextrw.s $0xab, %xmm28, %eax
+
+// CHECK: vpextrw.s $123, %xmm28, %eax
+// CHECK:  encoding: [0x62,0x63,0x7d,0x08,0x15,0xe0,0x7b]
+          vpextrw.s $0x7b, %xmm28, %eax
+
+// CHECK: vpextrw.s $123, %xmm28, %r8d
+// CHECK:  encoding: [0x62,0x43,0x7d,0x08,0x15,0xe0,0x7b]
+          vpextrw.s $0x7b, %xmm28, %r8d
+
+// CHECK: vpextrw.s $171, %xmm28, %eax
+// CHECK:  encoding: [0x62,0x63,0x7d,0x08,0x15,0xe0,0xab]
+          vpextrw.s $0xab, %xmm28, %eax
+
+// CHECK: vpextrw.s $123, %xmm28, %eax
+// CHECK:  encoding: [0x62,0x63,0x7d,0x08,0x15,0xe0,0x7b]
+          vpextrw.s $0x7b, %xmm28, %eax
+
+// CHECK: vpextrw.s $123, %xmm28, %r8d
+// CHECK:  encoding: [0x62,0x43,0x7d,0x08,0x15,0xe0,0x7b]
+          vpextrw.s $0x7b, %xmm28, %r8d
+
+// CHECK: vpextrw.s $171, %xmm20, %eax
+// CHECK:  encoding: [0x62,0xe3,0x7d,0x08,0x15,0xe0,0xab]
+          vpextrw.s $0xab, %xmm20, %eax
+
+// CHECK: vpextrw.s $123, %xmm20, %eax
+// CHECK:  encoding: [0x62,0xe3,0x7d,0x08,0x15,0xe0,0x7b]
+          vpextrw.s $0x7b, %xmm20, %eax
+
+// CHECK: vpextrw.s $123, %xmm20, %r8d
+// CHECK:  encoding: [0x62,0xc3,0x7d,0x08,0x15,0xe0,0x7b]
+          vpextrw.s $0x7b, %xmm20, %r8d
+
+// CHECK: vpextrw.s $171, %xmm19, %eax
+// CHECK:  encoding: [0x62,0xe3,0x7d,0x08,0x15,0xd8,0xab]
+          vpextrw.s $0xab, %xmm19, %eax
+
+// CHECK: vpextrw.s $123, %xmm19, %eax
+// CHECK:  encoding: [0x62,0xe3,0x7d,0x08,0x15,0xd8,0x7b]
+          vpextrw.s $0x7b, %xmm19, %eax
+
+// CHECK: vpextrw.s $123, %xmm19, %r8d
+// CHECK:  encoding: [0x62,0xc3,0x7d,0x08,0x15,0xd8,0x7b]
+          vpextrw.s $0x7b, %xmm19, %r8d
+
Index: lib/Target/X86/X86InstrAVX512.td
===================================================================
--- lib/Target/X86/X86InstrAVX512.td
+++ lib/Target/X86/X86InstrAVX512.td
@@ -7199,6 +7199,11 @@
                         (X86pextrw (_.VT _.RC:$src1), imm:$src2))]>,
                   EVEX, PD;
 
+    def rr_REV : AVX512Ii8<0x15, MRMDestReg, (outs GR32orGR64:$dst),
+                   (ins _.RC:$src1, u8imm:$src2),
+                   OpcodeStr#".s\t{$src2, $src1, $dst|$dst, $src1, $src2}", []>,
+                   EVEX, TAPD;
+
     defm NAME : avx512_extract_elt_bw_m<0x15, OpcodeStr, X86pextrw, _>, TAPD;
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14766.40475.patch
Type: text/x-patch
Size: 2633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151118/456fd1bd/attachment.bin>


More information about the llvm-commits mailing list