diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index fcc9fc40e474..932e413c97be 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -18291,6 +18291,7 @@ const char *X86TargetLowering::getTargetNodeName(unsigned Opcode) const { case X86ISD::VPERMIV3: return "X86ISD::VPERMIV3"; case X86ISD::VPERMI: return "X86ISD::VPERMI"; case X86ISD::VFIXUPIMM: return "X86ISD::VFIXUPIMM"; + case X86ISD::VRANGE: return "X86ISD::VRANGE"; case X86ISD::PMULUDQ: return "X86ISD::PMULUDQ"; case X86ISD::PMULDQ: return "X86ISD::PMULDQ"; case X86ISD::PSADBW: return "X86ISD::PSADBW"; diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h index 970b3fd0a983..e68786c4d77e 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.h +++ b/llvm/lib/Target/X86/X86ISelLowering.h @@ -379,6 +379,8 @@ namespace llvm { VPERM2X128, //Fix Up Special Packed Float32/64 values VFIXUPIMM, + //Range Restriction Calculation For Packed Pairs of Float32/64 values + VRANGE, // Broadcast scalar to vector VBROADCAST, // Broadcast subvector to vector diff --git a/llvm/lib/Target/X86/X86InstrAVX512.td b/llvm/lib/Target/X86/X86InstrAVX512.td index 314732c5b18f..84990664d3f7 100644 --- a/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/llvm/lib/Target/X86/X86InstrAVX512.td @@ -6009,15 +6009,15 @@ multiclass avx512_fp_sae_packed_imm opc, string OpcodeStr, (i32 FROUND_NO_EXC))>, EVEX_B; } -multiclass avx512_vfixupimm_float opc = 0x54, SDNode OpNode = X86VFixupimm>{ - let Predicates = [HasAVX512] in { +multiclass avx512_common_fp_sae_packed_imm opc, SDNode OpNode, Predicate prd>{ + let Predicates = [prd] in { defm Z : avx512_fp_packed_imm, avx512_fp_sae_packed_imm, EVEX_V512; } - let Predicates = [HasAVX512, HasVLX] in { + let Predicates = [prd, HasVLX] in { defm Z128 : avx512_fp_packed_imm, EVEX_V128; defm Z256 : avx512_fp_packed_imm, @@ -6025,8 +6025,32 @@ multiclass avx512_vfixupimm_float, +defm VFIXUPIMMPD : avx512_common_fp_sae_packed_imm<"vfixupimmpd", + avx512vl_f64_info, 0x54, X86VFixupimm, HasAVX512>, AVX512AIi8Base, EVEX_4V, EVEX_CD8<64, CD8VF>, VEX_W; -defm VFIXUPIMMPS : avx512_vfixupimm_float<"vfixupimmps", avx512vl_f32_info>, +defm VFIXUPIMMPS : avx512_common_fp_sae_packed_imm<"vfixupimmps", + avx512vl_f32_info, 0x54, X86VFixupimm, HasAVX512>, AVX512AIi8Base, EVEX_4V, EVEX_CD8<32, CD8VF>; + +defm VRANGEPD : avx512_common_fp_sae_packed_imm<"vrangepd", avx512vl_f64_info, + 0x50, X86VRange, HasDQI>, + AVX512AIi8Base, EVEX_4V, EVEX_CD8<64, CD8VF>, VEX_W; +defm VRANGEPS : avx512_common_fp_sae_packed_imm<"vrangeps", avx512vl_f32_info, + 0x50, X86VRange, HasDQI>, + AVX512AIi8Base, EVEX_4V, EVEX_CD8<32, CD8VF>; + + + + + + + + + + + + + + + diff --git a/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td b/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td index 0b91f79bf3bb..b8a5cbf1fc30 100644 --- a/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td +++ b/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td @@ -285,6 +285,7 @@ def X86VPermiv3 : SDNode<"X86ISD::VPERMIV3", SDTShuff3Op>; def X86VPerm2x128 : SDNode<"X86ISD::VPERM2X128", SDTShuff3OpI>; def X86VFixupimm : SDNode<"X86ISD::VFIXUPIMM", SDTFPBinOpImmRound>; +def X86VRange : SDNode<"X86ISD::VRANGE", SDTFPBinOpImmRound>; def X86SubVBroadcast : SDNode<"X86ISD::SUBV_BROADCAST", SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVec<1>, diff --git a/llvm/test/MC/X86/x86-64-avx512dq.s b/llvm/test/MC/X86/x86-64-avx512dq.s index 7d33abd7deb1..dde4f8b7292c 100644 --- a/llvm/test/MC/X86/x86-64-avx512dq.s +++ b/llvm/test/MC/X86/x86-64-avx512dq.s @@ -1158,3 +1158,139 @@ // CHECK: vbroadcasti64x2 -2064(%rdx), %zmm20 // CHECK: encoding: [0x62,0xe2,0xfd,0x48,0x5a,0xa2,0xf0,0xf7,0xff,0xff] vbroadcasti64x2 -2064(%rdx), %zmm20 + +// CHECK: vrangepd $171, %zmm17, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xa3,0xe5,0x40,0x50,0xc9,0xab] + vrangepd $0xab, %zmm17, %zmm19, %zmm17 + +// CHECK: vrangepd $171, %zmm17, %zmm19, %zmm17 {%k6} +// CHECK: encoding: [0x62,0xa3,0xe5,0x46,0x50,0xc9,0xab] + vrangepd $0xab, %zmm17, %zmm19, %zmm17 {%k6} + +// CHECK: vrangepd $171, %zmm17, %zmm19, %zmm17 {%k6} {z} +// CHECK: encoding: [0x62,0xa3,0xe5,0xc6,0x50,0xc9,0xab] + vrangepd $0xab, %zmm17, %zmm19, %zmm17 {%k6} {z} + +// CHECK: vrangepd $171,{sae}, %zmm17, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xa3,0xe5,0x10,0x50,0xc9,0xab] + vrangepd $0xab,{sae}, %zmm17, %zmm19, %zmm17 + +// CHECK: vrangepd $123, %zmm17, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xa3,0xe5,0x40,0x50,0xc9,0x7b] + vrangepd $0x7b, %zmm17, %zmm19, %zmm17 + +// CHECK: vrangepd $123,{sae}, %zmm17, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xa3,0xe5,0x10,0x50,0xc9,0x7b] + vrangepd $0x7b,{sae}, %zmm17, %zmm19, %zmm17 + +// CHECK: vrangepd $123, (%rcx), %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x40,0x50,0x09,0x7b] + vrangepd $0x7b,(%rcx), %zmm19, %zmm17 + +// CHECK: vrangepd $123, 291(%rax,%r14,8), %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xa3,0xe5,0x40,0x50,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vrangepd $0x7b,291(%rax,%r14,8), %zmm19, %zmm17 + +// CHECK: vrangepd $123, (%rcx){1to8}, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x50,0x50,0x09,0x7b] + vrangepd $0x7b,(%rcx){1to8}, %zmm19, %zmm17 + +// CHECK: vrangepd $123, 8128(%rdx), %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x40,0x50,0x4a,0x7f,0x7b] + vrangepd $0x7b,8128(%rdx), %zmm19, %zmm17 + +// CHECK: vrangepd $123, 8192(%rdx), %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x40,0x50,0x8a,0x00,0x20,0x00,0x00,0x7b] + vrangepd $0x7b,8192(%rdx), %zmm19, %zmm17 + +// CHECK: vrangepd $123, -8192(%rdx), %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x40,0x50,0x4a,0x80,0x7b] + vrangepd $0x7b,-8192(%rdx), %zmm19, %zmm17 + +// CHECK: vrangepd $123, -8256(%rdx), %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x40,0x50,0x8a,0xc0,0xdf,0xff,0xff,0x7b] + vrangepd $0x7b,-8256(%rdx), %zmm19, %zmm17 + +// CHECK: vrangepd $123, 1016(%rdx){1to8}, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x50,0x50,0x4a,0x7f,0x7b] + vrangepd $0x7b,1016(%rdx){1to8}, %zmm19, %zmm17 + +// CHECK: vrangepd $123, 1024(%rdx){1to8}, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x50,0x50,0x8a,0x00,0x04,0x00,0x00,0x7b] + vrangepd $0x7b,1024(%rdx){1to8}, %zmm19, %zmm17 + +// CHECK: vrangepd $123, -1024(%rdx){1to8}, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x50,0x50,0x4a,0x80,0x7b] + vrangepd $0x7b,-1024(%rdx){1to8}, %zmm19, %zmm17 + +// CHECK: vrangepd $123, -1032(%rdx){1to8}, %zmm19, %zmm17 +// CHECK: encoding: [0x62,0xe3,0xe5,0x50,0x50,0x8a,0xf8,0xfb,0xff,0xff,0x7b] + vrangepd $0x7b,-1032(%rdx){1to8}, %zmm19, %zmm17 + +// CHECK: vrangeps $171, %zmm17, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x23,0x55,0x40,0x50,0xc1,0xab] + vrangeps $0xab, %zmm17, %zmm21, %zmm24 + +// CHECK: vrangeps $171, %zmm17, %zmm21, %zmm24 {%k6} +// CHECK: encoding: [0x62,0x23,0x55,0x46,0x50,0xc1,0xab] + vrangeps $0xab, %zmm17, %zmm21, %zmm24 {%k6} + +// CHECK: vrangeps $171, %zmm17, %zmm21, %zmm24 {%k6} {z} +// CHECK: encoding: [0x62,0x23,0x55,0xc6,0x50,0xc1,0xab] + vrangeps $0xab, %zmm17, %zmm21, %zmm24 {%k6} {z} + +// CHECK: vrangeps $171,{sae}, %zmm17, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x23,0x55,0x10,0x50,0xc1,0xab] + vrangeps $0xab,{sae}, %zmm17, %zmm21, %zmm24 + +// CHECK: vrangeps $123, %zmm17, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x23,0x55,0x40,0x50,0xc1,0x7b] + vrangeps $0x7b, %zmm17, %zmm21, %zmm24 + +// CHECK: vrangeps $123,{sae}, %zmm17, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x23,0x55,0x10,0x50,0xc1,0x7b] + vrangeps $0x7b,{sae}, %zmm17, %zmm21, %zmm24 + +// CHECK: vrangeps $123, (%rcx), %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x40,0x50,0x01,0x7b] + vrangeps $0x7b,(%rcx), %zmm21, %zmm24 + +// CHECK: vrangeps $123, 291(%rax,%r14,8), %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x23,0x55,0x40,0x50,0x84,0xf0,0x23,0x01,0x00,0x00,0x7b] + vrangeps $0x7b,291(%rax,%r14,8), %zmm21, %zmm24 + +// CHECK: vrangeps $123, (%rcx){1to16}, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x50,0x50,0x01,0x7b] + vrangeps $0x7b,(%rcx){1to16}, %zmm21, %zmm24 + +// CHECK: vrangeps $123, 8128(%rdx), %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x40,0x50,0x42,0x7f,0x7b] + vrangeps $0x7b,8128(%rdx), %zmm21, %zmm24 + +// CHECK: vrangeps $123, 8192(%rdx), %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x40,0x50,0x82,0x00,0x20,0x00,0x00,0x7b] + vrangeps $0x7b,8192(%rdx), %zmm21, %zmm24 + +// CHECK: vrangeps $123, -8192(%rdx), %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x40,0x50,0x42,0x80,0x7b] + vrangeps $0x7b,-8192(%rdx), %zmm21, %zmm24 + +// CHECK: vrangeps $123, -8256(%rdx), %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x40,0x50,0x82,0xc0,0xdf,0xff,0xff,0x7b] + vrangeps $0x7b,-8256(%rdx), %zmm21, %zmm24 + +// CHECK: vrangeps $123, 508(%rdx){1to16}, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x50,0x50,0x42,0x7f,0x7b] + vrangeps $0x7b,508(%rdx){1to16}, %zmm21, %zmm24 + +// CHECK: vrangeps $123, 512(%rdx){1to16}, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x50,0x50,0x82,0x00,0x02,0x00,0x00,0x7b] + vrangeps $0x7b,512(%rdx){1to16}, %zmm21, %zmm24 + +// CHECK: vrangeps $123, -512(%rdx){1to16}, %zmm21, %zmm24 +// CHECK: encoding: [0x62,0x63,0x55,0x50,0x50,0x42,0x80,0x7b] + vrangeps $0x7b,-512(%rdx){1to16}, %zmm21, %zmm24 + +// 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 diff --git a/llvm/test/MC/X86/x86-64-avx512dq_vl.s b/llvm/test/MC/X86/x86-64-avx512dq_vl.s index 2de4564b5f51..d14ae6ec3741 100644 --- a/llvm/test/MC/X86/x86-64-avx512dq_vl.s +++ b/llvm/test/MC/X86/x86-64-avx512dq_vl.s @@ -1968,3 +1968,242 @@ // CHECK: encoding: [0x62,0xe2,0xfd,0x28,0x5a,0x92,0xf0,0xf7,0xff,0xff] vbroadcasti64x2 -2064(%rdx), %ymm18 +// CHECK: vrangepd $171, %xmm26, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x03,0xa5,0x00,0x50,0xca,0xab] + vrangepd $0xab, %xmm26, %xmm27, %xmm25 + +// CHECK: vrangepd $171, %xmm26, %xmm27, %xmm25 {%k6} +// CHECK: encoding: [0x62,0x03,0xa5,0x06,0x50,0xca,0xab] + vrangepd $0xab, %xmm26, %xmm27, %xmm25 {%k6} + +// CHECK: vrangepd $171, %xmm26, %xmm27, %xmm25 {%k6} {z} +// CHECK: encoding: [0x62,0x03,0xa5,0x86,0x50,0xca,0xab] + vrangepd $0xab, %xmm26, %xmm27, %xmm25 {%k6} {z} + +// CHECK: vrangepd $123, %xmm26, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x03,0xa5,0x00,0x50,0xca,0x7b] + vrangepd $0x7b, %xmm26, %xmm27, %xmm25 + +// CHECK: vrangepd $123, (%rcx), %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x00,0x50,0x09,0x7b] + vrangepd $0x7b,(%rcx), %xmm27, %xmm25 + +// CHECK: vrangepd $123, 291(%rax,%r14,8), %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x23,0xa5,0x00,0x50,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vrangepd $0x7b,291(%rax,%r14,8), %xmm27, %xmm25 + +// CHECK: vrangepd $123, (%rcx){1to2}, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x10,0x50,0x09,0x7b] + vrangepd $0x7b,(%rcx){1to2}, %xmm27, %xmm25 + +// CHECK: vrangepd $123, 2032(%rdx), %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x00,0x50,0x4a,0x7f,0x7b] + vrangepd $0x7b,2032(%rdx), %xmm27, %xmm25 + +// CHECK: vrangepd $123, 2048(%rdx), %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x00,0x50,0x8a,0x00,0x08,0x00,0x00,0x7b] + vrangepd $0x7b,2048(%rdx), %xmm27, %xmm25 + +// CHECK: vrangepd $123, -2048(%rdx), %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x00,0x50,0x4a,0x80,0x7b] + vrangepd $0x7b,-2048(%rdx), %xmm27, %xmm25 + +// CHECK: vrangepd $123, -2064(%rdx), %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x00,0x50,0x8a,0xf0,0xf7,0xff,0xff,0x7b] + vrangepd $0x7b,-2064(%rdx), %xmm27, %xmm25 + +// CHECK: vrangepd $123, 1016(%rdx){1to2}, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x10,0x50,0x4a,0x7f,0x7b] + vrangepd $0x7b,1016(%rdx){1to2}, %xmm27, %xmm25 + +// CHECK: vrangepd $123, 1024(%rdx){1to2}, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x10,0x50,0x8a,0x00,0x04,0x00,0x00,0x7b] + vrangepd $0x7b,1024(%rdx){1to2}, %xmm27, %xmm25 + +// CHECK: vrangepd $123, -1024(%rdx){1to2}, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x10,0x50,0x4a,0x80,0x7b] + vrangepd $0x7b,-1024(%rdx){1to2}, %xmm27, %xmm25 + +// CHECK: vrangepd $123, -1032(%rdx){1to2}, %xmm27, %xmm25 +// CHECK: encoding: [0x62,0x63,0xa5,0x10,0x50,0x8a,0xf8,0xfb,0xff,0xff,0x7b] + vrangepd $0x7b,-1032(%rdx){1to2}, %xmm27, %xmm25 + +// CHECK: vrangepd $171, %ymm28, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x03,0xa5,0x20,0x50,0xec,0xab] + vrangepd $0xab, %ymm28, %ymm27, %ymm29 + +// CHECK: vrangepd $171, %ymm28, %ymm27, %ymm29 {%k7} +// CHECK: encoding: [0x62,0x03,0xa5,0x27,0x50,0xec,0xab] + vrangepd $0xab, %ymm28, %ymm27, %ymm29 {%k7} + +// CHECK: vrangepd $171, %ymm28, %ymm27, %ymm29 {%k7} {z} +// CHECK: encoding: [0x62,0x03,0xa5,0xa7,0x50,0xec,0xab] + vrangepd $0xab, %ymm28, %ymm27, %ymm29 {%k7} {z} + +// CHECK: vrangepd $123, %ymm28, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x03,0xa5,0x20,0x50,0xec,0x7b] + vrangepd $0x7b, %ymm28, %ymm27, %ymm29 + +// CHECK: vrangepd $123, (%rcx), %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x20,0x50,0x29,0x7b] + vrangepd $0x7b,(%rcx), %ymm27, %ymm29 + +// CHECK: vrangepd $123, 291(%rax,%r14,8), %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x23,0xa5,0x20,0x50,0xac,0xf0,0x23,0x01,0x00,0x00,0x7b] + vrangepd $0x7b,291(%rax,%r14,8), %ymm27, %ymm29 + +// CHECK: vrangepd $123, (%rcx){1to4}, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x30,0x50,0x29,0x7b] + vrangepd $0x7b,(%rcx){1to4}, %ymm27, %ymm29 + +// CHECK: vrangepd $123, 4064(%rdx), %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x20,0x50,0x6a,0x7f,0x7b] + vrangepd $0x7b,4064(%rdx), %ymm27, %ymm29 + +// CHECK: vrangepd $123, 4096(%rdx), %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x20,0x50,0xaa,0x00,0x10,0x00,0x00,0x7b] + vrangepd $0x7b,4096(%rdx), %ymm27, %ymm29 + +// CHECK: vrangepd $123, -4096(%rdx), %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x20,0x50,0x6a,0x80,0x7b] + vrangepd $0x7b,-4096(%rdx), %ymm27, %ymm29 + +// CHECK: vrangepd $123, -4128(%rdx), %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x20,0x50,0xaa,0xe0,0xef,0xff,0xff,0x7b] + vrangepd $0x7b,-4128(%rdx), %ymm27, %ymm29 + +// CHECK: vrangepd $123, 1016(%rdx){1to4}, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x30,0x50,0x6a,0x7f,0x7b] + vrangepd $0x7b,1016(%rdx){1to4}, %ymm27, %ymm29 + +// CHECK: vrangepd $123, 1024(%rdx){1to4}, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x30,0x50,0xaa,0x00,0x04,0x00,0x00,0x7b] + vrangepd $0x7b,1024(%rdx){1to4}, %ymm27, %ymm29 + +// CHECK: vrangepd $123, -1024(%rdx){1to4}, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x30,0x50,0x6a,0x80,0x7b] + vrangepd $0x7b,-1024(%rdx){1to4}, %ymm27, %ymm29 + +// CHECK: vrangepd $123, -1032(%rdx){1to4}, %ymm27, %ymm29 +// CHECK: encoding: [0x62,0x63,0xa5,0x30,0x50,0xaa,0xf8,0xfb,0xff,0xff,0x7b] + vrangepd $0x7b,-1032(%rdx){1to4}, %ymm27, %ymm29 + +// CHECK: vrangeps $171, %xmm24, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x03,0x45,0x00,0x50,0xd8,0xab] + vrangeps $0xab, %xmm24, %xmm23, %xmm27 + +// CHECK: vrangeps $171, %xmm24, %xmm23, %xmm27 {%k6} +// CHECK: encoding: [0x62,0x03,0x45,0x06,0x50,0xd8,0xab] + vrangeps $0xab, %xmm24, %xmm23, %xmm27 {%k6} + +// CHECK: vrangeps $171, %xmm24, %xmm23, %xmm27 {%k6} {z} +// CHECK: encoding: [0x62,0x03,0x45,0x86,0x50,0xd8,0xab] + vrangeps $0xab, %xmm24, %xmm23, %xmm27 {%k6} {z} + +// CHECK: vrangeps $123, %xmm24, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x03,0x45,0x00,0x50,0xd8,0x7b] + vrangeps $0x7b, %xmm24, %xmm23, %xmm27 + +// CHECK: vrangeps $123, (%rcx), %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x00,0x50,0x19,0x7b] + vrangeps $0x7b,(%rcx), %xmm23, %xmm27 + +// CHECK: vrangeps $123, 291(%rax,%r14,8), %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x23,0x45,0x00,0x50,0x9c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vrangeps $0x7b,291(%rax,%r14,8), %xmm23, %xmm27 + +// CHECK: vrangeps $123, (%rcx){1to4}, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x10,0x50,0x19,0x7b] + vrangeps $0x7b,(%rcx){1to4}, %xmm23, %xmm27 + +// CHECK: vrangeps $123, 2032(%rdx), %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x00,0x50,0x5a,0x7f,0x7b] + vrangeps $0x7b,2032(%rdx), %xmm23, %xmm27 + +// CHECK: vrangeps $123, 2048(%rdx), %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x00,0x50,0x9a,0x00,0x08,0x00,0x00,0x7b] + vrangeps $0x7b,2048(%rdx), %xmm23, %xmm27 + +// CHECK: vrangeps $123, -2048(%rdx), %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x00,0x50,0x5a,0x80,0x7b] + vrangeps $0x7b,-2048(%rdx), %xmm23, %xmm27 + +// CHECK: vrangeps $123, -2064(%rdx), %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x00,0x50,0x9a,0xf0,0xf7,0xff,0xff,0x7b] + vrangeps $0x7b,-2064(%rdx), %xmm23, %xmm27 + +// CHECK: vrangeps $123, 508(%rdx){1to4}, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x10,0x50,0x5a,0x7f,0x7b] + vrangeps $0x7b,508(%rdx){1to4}, %xmm23, %xmm27 + +// CHECK: vrangeps $123, 512(%rdx){1to4}, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x10,0x50,0x9a,0x00,0x02,0x00,0x00,0x7b] + vrangeps $0x7b,512(%rdx){1to4}, %xmm23, %xmm27 + +// CHECK: vrangeps $123, -512(%rdx){1to4}, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x10,0x50,0x5a,0x80,0x7b] + vrangeps $0x7b,-512(%rdx){1to4}, %xmm23, %xmm27 + +// CHECK: vrangeps $123, -516(%rdx){1to4}, %xmm23, %xmm27 +// CHECK: encoding: [0x62,0x63,0x45,0x10,0x50,0x9a,0xfc,0xfd,0xff,0xff,0x7b] + vrangeps $0x7b,-516(%rdx){1to4}, %xmm23, %xmm27 + +// CHECK: vrangeps $171, %ymm21, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x23,0x45,0x20,0x50,0xc5,0xab] + vrangeps $0xab, %ymm21, %ymm23, %ymm24 + +// CHECK: vrangeps $171, %ymm21, %ymm23, %ymm24 {%k7} +// CHECK: encoding: [0x62,0x23,0x45,0x27,0x50,0xc5,0xab] + vrangeps $0xab, %ymm21, %ymm23, %ymm24 {%k7} + +// CHECK: vrangeps $171, %ymm21, %ymm23, %ymm24 {%k7} {z} +// CHECK: encoding: [0x62,0x23,0x45,0xa7,0x50,0xc5,0xab] + vrangeps $0xab, %ymm21, %ymm23, %ymm24 {%k7} {z} + +// CHECK: vrangeps $123, %ymm21, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x23,0x45,0x20,0x50,0xc5,0x7b] + vrangeps $0x7b, %ymm21, %ymm23, %ymm24 + +// CHECK: vrangeps $123, (%rcx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x20,0x50,0x01,0x7b] + vrangeps $0x7b,(%rcx), %ymm23, %ymm24 + +// CHECK: vrangeps $123, 291(%rax,%r14,8), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x23,0x45,0x20,0x50,0x84,0xf0,0x23,0x01,0x00,0x00,0x7b] + vrangeps $0x7b,291(%rax,%r14,8), %ymm23, %ymm24 + +// CHECK: vrangeps $123, (%rcx){1to8}, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x30,0x50,0x01,0x7b] + vrangeps $0x7b,(%rcx){1to8}, %ymm23, %ymm24 + +// CHECK: vrangeps $123, 4064(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x20,0x50,0x42,0x7f,0x7b] + vrangeps $0x7b,4064(%rdx), %ymm23, %ymm24 + +// CHECK: vrangeps $123, 4096(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x20,0x50,0x82,0x00,0x10,0x00,0x00,0x7b] + vrangeps $0x7b,4096(%rdx), %ymm23, %ymm24 + +// CHECK: vrangeps $123, -4096(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x20,0x50,0x42,0x80,0x7b] + vrangeps $0x7b,-4096(%rdx), %ymm23, %ymm24 + +// CHECK: vrangeps $123, -4128(%rdx), %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x20,0x50,0x82,0xe0,0xef,0xff,0xff,0x7b] + vrangeps $0x7b,-4128(%rdx), %ymm23, %ymm24 + +// CHECK: vrangeps $123, 508(%rdx){1to8}, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x30,0x50,0x42,0x7f,0x7b] + vrangeps $0x7b,508(%rdx){1to8}, %ymm23, %ymm24 + +// CHECK: vrangeps $123, 512(%rdx){1to8}, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x30,0x50,0x82,0x00,0x02,0x00,0x00,0x7b] + vrangeps $0x7b,512(%rdx){1to8}, %ymm23, %ymm24 + +// CHECK: vrangeps $123, -512(%rdx){1to8}, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x30,0x50,0x42,0x80,0x7b] + vrangeps $0x7b,-512(%rdx){1to8}, %ymm23, %ymm24 + +// CHECK: vrangeps $123, -516(%rdx){1to8}, %ymm23, %ymm24 +// CHECK: encoding: [0x62,0x63,0x45,0x30,0x50,0x82,0xfc,0xfd,0xff,0xff,0x7b] + vrangeps $0x7b,-516(%rdx){1to8}, %ymm23, %ymm24