From: Elena Demikhovsky Date: Tue, 2 Jun 2015 14:12:54 +0000 (+0000) Subject: AVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lower... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6628cb50bda59e0f904fbf6817260501bcbe0727;p=oota-llvm.git 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@intel.com) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238834 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrAVX512.td b/lib/Target/X86/X86InstrAVX512.td index b1f68b63660..15fd0601652 100644 --- a/lib/Target/X86/X86InstrAVX512.td +++ b/lib/Target/X86/X86InstrAVX512.td @@ -6091,3 +6091,10 @@ defm VRANGEPS : avx512_common_fp_sae_packed_imm<"vrangeps", avx512vl_f32_info, 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>; + diff --git a/test/MC/X86/x86-64-avx512dq.s b/test/MC/X86/x86-64-avx512dq.s index dde4f8b7292..92656dd3405 100644 --- a/test/MC/X86/x86-64-avx512dq.s +++ b/test/MC/X86/x86-64-avx512dq.s @@ -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