AVX512: Implemented encoding for vpextrw.s instruction.
authorIgor Breger <igor.breger@intel.com>
Wed, 18 Nov 2015 08:46:16 +0000 (08:46 +0000)
committerIgor Breger <igor.breger@intel.com>
Wed, 18 Nov 2015 08:46:16 +0000 (08:46 +0000)
Differential Revision: http://reviews.llvm.org/D14766

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253447 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 132952f4735cf8ee0908db90cb98ea8fedb98f25..0069dd00d6fc2ee46aa5639f6caa477051da35d2 100644 (file)
@@ -7199,6 +7199,11 @@ multiclass avx512_extract_elt_w<string OpcodeStr, X86VectorVTInfo _> {
                         (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;
   }
 }
index d6be005735433021e03c42f68293407c79ca00fa..579abe7c9db7aaa43852c52455ab0ba4a0928f38 100644 (file)
 // 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
+