[llvm] r238834 - AVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lowering for all these forms.
Elena Demikhovsky
elena.demikhovsky at intel.com
Tue Jun 2 07:12:55 PDT 2015
Author: delena
Date: Tue Jun 2 09:12:54 2015
New Revision: 238834
URL: http://llvm.org/viewvc/llvm-project?rev=238834&view=rev
Log:
AVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lowering for all these forms.
Added tests for encoding.
By Igor Breger (igor.breger at intel.com)
Modified:
llvm/trunk/lib/Target/X86/X86InstrAVX512.td
llvm/trunk/test/MC/X86/x86-64-avx512dq.s
Modified: llvm/trunk/lib/Target/X86/X86InstrAVX512.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=238834&r1=238833&r2=238834&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrAVX512.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td Tue Jun 2 09:12:54 2015
@@ -6091,3 +6091,10 @@ defm VRANGEPS : avx512_common_fp_sae_pac
0x50, X86VRange, HasDQI>,
AVX512AIi8Base, EVEX_4V, EVEX_CD8<32, CD8VF>;
+defm VRANGESD: avx512_common_fp_sae_scalar_imm<"vrangesd", f64x_info,
+ 0x51, X86VRange, HasDQI>,
+ AVX512AIi8Base, VEX_LIG, EVEX_4V, EVEX_CD8<64, CD8VT1>, VEX_W;
+defm VRANGESS: avx512_common_fp_sae_scalar_imm<"vrangess", f32x_info,
+ 0x51, X86VRange, HasDQI>,
+ AVX512AIi8Base, VEX_LIG, EVEX_4V, EVEX_CD8<32, CD8VT1>;
+
Modified: llvm/trunk/test/MC/X86/x86-64-avx512dq.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-64-avx512dq.s?rev=238834&r1=238833&r2=238834&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-64-avx512dq.s (original)
+++ llvm/trunk/test/MC/X86/x86-64-avx512dq.s Tue Jun 2 09:12:54 2015
@@ -1294,3 +1294,99 @@
// CHECK: vrangeps $123, -516(%rdx){1to16}, %zmm21, %zmm24
// CHECK: encoding: [0x62,0x63,0x55,0x50,0x50,0x82,0xfc,0xfd,0xff,0xff,0x7b]
vrangeps $0x7b,-516(%rdx){1to16}, %zmm21, %zmm24
+
+// CHECK: vrangesd $171, %xmm21, %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xa3,0xf5,0x00,0x51,0xcd,0xab]
+ vrangesd $0xab, %xmm21, %xmm17, %xmm17
+
+// CHECK: vrangesd $171, %xmm21, %xmm17, %xmm17 {%k5}
+// CHECK: encoding: [0x62,0xa3,0xf5,0x05,0x51,0xcd,0xab]
+ vrangesd $0xab, %xmm21, %xmm17, %xmm17 {%k5}
+
+// CHECK: vrangesd $171, %xmm21, %xmm17, %xmm17 {%k5} {z}
+// CHECK: encoding: [0x62,0xa3,0xf5,0x85,0x51,0xcd,0xab]
+ vrangesd $0xab, %xmm21, %xmm17, %xmm17 {%k5} {z}
+
+// CHECK: vrangesd $171,{sae}, %xmm21, %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xa3,0xf5,0x10,0x51,0xcd,0xab]
+ vrangesd $0xab,{sae}, %xmm21, %xmm17, %xmm17
+
+// CHECK: vrangesd $123, %xmm21, %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xa3,0xf5,0x00,0x51,0xcd,0x7b]
+ vrangesd $0x7b, %xmm21, %xmm17, %xmm17
+
+// CHECK: vrangesd $123,{sae}, %xmm21, %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xa3,0xf5,0x10,0x51,0xcd,0x7b]
+ vrangesd $0x7b,{sae}, %xmm21, %xmm17, %xmm17
+
+// CHECK: vrangesd $123, (%rcx), %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xe3,0xf5,0x00,0x51,0x09,0x7b]
+ vrangesd $0x7b,(%rcx), %xmm17, %xmm17
+
+// CHECK: vrangesd $123, 291(%rax,%r14,8), %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xa3,0xf5,0x00,0x51,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b]
+ vrangesd $0x7b,291(%rax,%r14,8), %xmm17, %xmm17
+
+// CHECK: vrangesd $123, 1016(%rdx), %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xe3,0xf5,0x00,0x51,0x4a,0x7f,0x7b]
+ vrangesd $0x7b,1016(%rdx), %xmm17, %xmm17
+
+// CHECK: vrangesd $123, 1024(%rdx), %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xe3,0xf5,0x00,0x51,0x8a,0x00,0x04,0x00,0x00,0x7b]
+ vrangesd $0x7b,1024(%rdx), %xmm17, %xmm17
+
+// CHECK: vrangesd $123, -1024(%rdx), %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xe3,0xf5,0x00,0x51,0x4a,0x80,0x7b]
+ vrangesd $0x7b,-1024(%rdx), %xmm17, %xmm17
+
+// CHECK: vrangesd $123, -1032(%rdx), %xmm17, %xmm17
+// CHECK: encoding: [0x62,0xe3,0xf5,0x00,0x51,0x8a,0xf8,0xfb,0xff,0xff,0x7b]
+ vrangesd $0x7b,-1032(%rdx), %xmm17, %xmm17
+
+// CHECK: vrangess $171, %xmm20, %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x23,0x3d,0x00,0x51,0xcc,0xab]
+ vrangess $0xab, %xmm20, %xmm24, %xmm25
+
+// CHECK: vrangess $171, %xmm20, %xmm24, %xmm25 {%k5}
+// CHECK: encoding: [0x62,0x23,0x3d,0x05,0x51,0xcc,0xab]
+ vrangess $0xab, %xmm20, %xmm24, %xmm25 {%k5}
+
+// CHECK: vrangess $171, %xmm20, %xmm24, %xmm25 {%k5} {z}
+// CHECK: encoding: [0x62,0x23,0x3d,0x85,0x51,0xcc,0xab]
+ vrangess $0xab, %xmm20, %xmm24, %xmm25 {%k5} {z}
+
+// CHECK: vrangess $171,{sae}, %xmm20, %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x23,0x3d,0x10,0x51,0xcc,0xab]
+ vrangess $0xab,{sae}, %xmm20, %xmm24, %xmm25
+
+// CHECK: vrangess $123, %xmm20, %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x23,0x3d,0x00,0x51,0xcc,0x7b]
+ vrangess $0x7b, %xmm20, %xmm24, %xmm25
+
+// CHECK: vrangess $123,{sae}, %xmm20, %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x23,0x3d,0x10,0x51,0xcc,0x7b]
+ vrangess $0x7b,{sae}, %xmm20, %xmm24, %xmm25
+
+// CHECK: vrangess $123, (%rcx), %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x63,0x3d,0x00,0x51,0x09,0x7b]
+ vrangess $0x7b,(%rcx), %xmm24, %xmm25
+
+// CHECK: vrangess $123, 291(%rax,%r14,8), %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x23,0x3d,0x00,0x51,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b]
+ vrangess $0x7b,291(%rax,%r14,8), %xmm24, %xmm25
+
+// CHECK: vrangess $123, 508(%rdx), %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x63,0x3d,0x00,0x51,0x4a,0x7f,0x7b]
+ vrangess $0x7b,508(%rdx), %xmm24, %xmm25
+
+// CHECK: vrangess $123, 512(%rdx), %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x63,0x3d,0x00,0x51,0x8a,0x00,0x02,0x00,0x00,0x7b]
+ vrangess $0x7b,512(%rdx), %xmm24, %xmm25
+
+// CHECK: vrangess $123, -512(%rdx), %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x63,0x3d,0x00,0x51,0x4a,0x80,0x7b]
+ vrangess $0x7b,-512(%rdx), %xmm24, %xmm25
+
+// CHECK: vrangess $123, -516(%rdx), %xmm24, %xmm25
+// CHECK: encoding: [0x62,0x63,0x3d,0x00,0x51,0x8a,0xfc,0xfd,0xff,0xff,0x7b]
+ vrangess $0x7b,-516(%rdx), %xmm24, %xmm25
More information about the llvm-commits
mailing list