Index: llvm/trunk/include/llvm/IR/IntrinsicsX86.td =================================================================== --- llvm/trunk/include/llvm/IR/IntrinsicsX86.td +++ llvm/trunk/include/llvm/IR/IntrinsicsX86.td @@ -4869,6 +4869,54 @@ Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; + def int_x86_avx512_mask_getmant_pd_128 : + GCCBuiltin<"__builtin_ia32_getmantpd128_mask">, + Intrinsic<[llvm_v2f64_ty], + [llvm_v2f64_ty,llvm_i32_ty, llvm_v2f64_ty, llvm_i8_ty], + [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_pd_256 : + GCCBuiltin<"__builtin_ia32_getmantpd256_mask">, + Intrinsic<[llvm_v4f64_ty], + [llvm_v4f64_ty,llvm_i32_ty, llvm_v4f64_ty, llvm_i8_ty], + [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_pd_512 : + GCCBuiltin<"__builtin_ia32_getmantpd512_mask">, + Intrinsic<[llvm_v8f64_ty], + [llvm_v8f64_ty,llvm_i32_ty, llvm_v8f64_ty, llvm_i8_ty,llvm_i32_ty ], + [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_ps_128 : + GCCBuiltin<"__builtin_ia32_getmantps128_mask">, + Intrinsic<[llvm_v4f32_ty], + [llvm_v4f32_ty, llvm_i32_ty, llvm_v4f32_ty, llvm_i8_ty], + [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_ps_256 : + GCCBuiltin<"__builtin_ia32_getmantps256_mask">, + Intrinsic<[llvm_v8f32_ty], + [llvm_v8f32_ty, llvm_i32_ty, llvm_v8f32_ty, llvm_i8_ty], + [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_ps_512 : + GCCBuiltin<"__builtin_ia32_getmantps512_mask">, + Intrinsic<[llvm_v16f32_ty], + [llvm_v16f32_ty,llvm_i32_ty, llvm_v16f32_ty,llvm_i16_ty,llvm_i32_ty], + [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_ss : + GCCBuiltin<"__builtin_ia32_getmantss_mask">, + Intrinsic<[llvm_v4f32_ty], + [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty, llvm_v4f32_ty, + llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; + + def int_x86_avx512_mask_getmant_sd : + GCCBuiltin<"__builtin_ia32_getmantsd_mask">, + Intrinsic<[llvm_v2f64_ty], + [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty, llvm_v2f64_ty, + llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; + def int_x86_avx512_rsqrt14_ss : GCCBuiltin<"__builtin_ia32_rsqrt14ss_mask">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; Index: llvm/trunk/lib/Target/X86/X86ISelLowering.h =================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h @@ -213,6 +213,8 @@ // FP vector get exponent FGETEXP_RND, + // Extract Normalized Mantissas + VGETMANT, // FP Scale SCALEF, // Integer add/sub with unsigned saturation. Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp =================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp @@ -15689,6 +15689,18 @@ Src1, Src2, Rnd), Mask, PassThru, Subtarget, DAG); } + case INTR_TYPE_3OP_SCALAR_MASK_RM: { + SDValue Src1 = Op.getOperand(1); + SDValue Src2 = Op.getOperand(2); + SDValue Src3 = Op.getOperand(3); + SDValue PassThru = Op.getOperand(4); + SDValue Mask = Op.getOperand(5); + SDValue Sae = Op.getOperand(6); + + return getScalarMaskingNode(DAG.getNode(IntrData->Opc0, dl, VT, Src1, + Src2, Src3, Sae), + Mask, PassThru, Subtarget, DAG); + } case INTR_TYPE_3OP_MASK_RM: { SDValue Src1 = Op.getOperand(1); SDValue Src2 = Op.getOperand(2); @@ -19394,6 +19406,7 @@ case X86ISD::FMSUBADD_RND: return "X86ISD::FMSUBADD_RND"; case X86ISD::VRNDSCALE: return "X86ISD::VRNDSCALE"; case X86ISD::VREDUCE: return "X86ISD::VREDUCE"; + case X86ISD::VGETMANT: return "X86ISD::VGETMANT"; case X86ISD::PCMPESTRI: return "X86ISD::PCMPESTRI"; case X86ISD::PCMPISTRI: return "X86ISD::PCMPISTRI"; case X86ISD::XTEST: return "X86ISD::XTEST"; Index: llvm/trunk/lib/Target/X86/X86InstrAVX512.td =================================================================== --- llvm/trunk/lib/Target/X86/X86InstrAVX512.td +++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td @@ -6553,12 +6553,12 @@ } } -multiclass avx512_common_fp_sae_packed_imm_all opcPs, - bits<8> opcPd, SDNode OpNode, Predicate prd>{ - defm PS : avx512_common_unary_fp_sae_packed_imm, EVEX_CD8<32, CD8VF>; - defm PD : avx512_common_unary_fp_sae_packed_imm,EVEX_CD8<64, CD8VF> , VEX_W; +multiclass avx512_common_unary_fp_sae_packed_imm_all opcPs, bits<8> opcPd, SDNode OpNode, Predicate prd>{ + defm PS : avx512_common_unary_fp_sae_packed_imm, EVEX_CD8<32, CD8VF>; + defm PD : avx512_common_unary_fp_sae_packed_imm, EVEX_CD8<64, CD8VF>, VEX_W; } defm VFIXUPIMMPD : avx512_common_fp_sae_packed_imm<"vfixupimmpd", @@ -6575,8 +6575,13 @@ 0x55, X86VFixupimm, HasAVX512>, AVX512AIi8Base, VEX_LIG, EVEX_4V, EVEX_CD8<32, CD8VT1>; -defm VREDUCE : avx512_common_fp_sae_packed_imm_all<"vreduce", 0x56, 0x56, X86VReduce, HasDQI>,AVX512AIi8Base,EVEX; -defm VRNDSCALE : avx512_common_fp_sae_packed_imm_all<"vrndscale", 0x08, 0x09, X86VRndScale, HasAVX512>,AVX512AIi8Base, EVEX; +defm VREDUCE : avx512_common_unary_fp_sae_packed_imm_all<"vreduce", 0x56, 0x56, + X86VReduce, HasDQI>, AVX512AIi8Base, EVEX; +defm VRNDSCALE : avx512_common_unary_fp_sae_packed_imm_all<"vrndscale", 0x08, 0x09, + X86VRndScale, HasAVX512>, AVX512AIi8Base, EVEX; +defm VGETMANT : avx512_common_unary_fp_sae_packed_imm_all<"vgetmant", 0x26, 0x26, + X86VGetMant, HasAVX512>, AVX512AIi8Base, EVEX; + defm VRANGEPD : avx512_common_fp_sae_packed_imm<"vrangepd", avx512vl_f64_info, 0x50, X86VRange, HasDQI>, @@ -6599,6 +6604,13 @@ 0x57, X86Reduces, HasDQI>, AVX512AIi8Base, VEX_LIG, EVEX_4V, EVEX_CD8<32, CD8VT1>; +defm VGETMANTSD: avx512_common_fp_sae_scalar_imm<"vgetmantsd", f64x_info, + 0x27, X86GetMants, HasAVX512>, + AVX512AIi8Base, VEX_LIG, EVEX_4V, EVEX_CD8<64, CD8VT1>, VEX_W; +defm VGETMANTSS: avx512_common_fp_sae_scalar_imm<"vgetmantss", f32x_info, + 0x27, X86GetMants, HasAVX512>, + AVX512AIi8Base, VEX_LIG, EVEX_4V, EVEX_CD8<32, CD8VT1>; + multiclass avx512_shuff_packed_128 opc, SDNode OpNode = X86Shuf128>{ let Predicates = [HasAVX512] in { Index: llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td =================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td +++ llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td @@ -304,10 +304,11 @@ def X86VPerm2x128 : SDNode<"X86ISD::VPERM2X128", SDTShuff3OpI>; -def X86VFixupimm : SDNode<"X86ISD::VFIXUPIMM", SDTFPBinOpImmRound>; -def X86VRange : SDNode<"X86ISD::VRANGE", SDTFPBinOpImmRound>; -def X86VReduce : SDNode<"X86ISD::VREDUCE", SDTFPUnaryOpImmRound>; -def X86VRndScale : SDNode<"X86ISD::VRNDSCALE", SDTFPUnaryOpImmRound>; +def X86VFixupimm : SDNode<"X86ISD::VFIXUPIMM", SDTFPBinOpImmRound>; +def X86VRange : SDNode<"X86ISD::VRANGE", SDTFPBinOpImmRound>; +def X86VReduce : SDNode<"X86ISD::VREDUCE", SDTFPUnaryOpImmRound>; +def X86VRndScale : SDNode<"X86ISD::VRNDSCALE", SDTFPUnaryOpImmRound>; +def X86VGetMant : SDNode<"X86ISD::VGETMANT", SDTFPUnaryOpImmRound>; def X86SubVBroadcast : SDNode<"X86ISD::SUBV_BROADCAST", SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVec<1>, @@ -351,10 +352,11 @@ def X86rcp28 : SDNode<"X86ISD::RCP28", STDFp1SrcRm>; def X86exp2 : SDNode<"X86ISD::EXP2", STDFp1SrcRm>; -def X86rsqrt28s : SDNode<"X86ISD::RSQRT28", STDFp2SrcRm>; -def X86rcp28s : SDNode<"X86ISD::RCP28", STDFp2SrcRm>; +def X86rsqrt28s : SDNode<"X86ISD::RSQRT28", STDFp2SrcRm>; +def X86rcp28s : SDNode<"X86ISD::RCP28", STDFp2SrcRm>; def X86RndScales : SDNode<"X86ISD::VRNDSCALE", STDFp3SrcRm>; -def X86Reduces : SDNode<"X86ISD::VREDUCE", STDFp3SrcRm>; +def X86Reduces : SDNode<"X86ISD::VREDUCE", STDFp3SrcRm>; +def X86GetMants : SDNode<"X86ISD::VGETMANT", STDFp3SrcRm>; def SDT_PCMPISTRI : SDTypeProfile<2, 3, [SDTCisVT<0, i32>, SDTCisVT<1, i32>, SDTCisVT<2, v16i8>, SDTCisVT<3, v16i8>, Index: llvm/trunk/lib/Target/X86/X86IntrinsicsInfo.h =================================================================== --- llvm/trunk/lib/Target/X86/X86IntrinsicsInfo.h +++ llvm/trunk/lib/Target/X86/X86IntrinsicsInfo.h @@ -26,7 +26,8 @@ INTR_TYPE_3OP_MASK, INTR_TYPE_3OP_MASK_RM, INTR_TYPE_3OP_IMM8_MASK, FMA_OP_MASK, FMA_OP_MASKZ, FMA_OP_MASK3, VPERM_3OP_MASK, VPERM_3OP_MASKZ, - INTR_TYPE_SCALAR_MASK_RM, COMPRESS_EXPAND_IN_REG, COMPRESS_TO_MEM, + INTR_TYPE_SCALAR_MASK_RM, INTR_TYPE_3OP_SCALAR_MASK_RM, + COMPRESS_EXPAND_IN_REG, COMPRESS_TO_MEM, TRUNCATE_TO_MEM_VI8, TRUNCATE_TO_MEM_VI16, TRUNCATE_TO_MEM_VI32, EXPAND_FROM_MEM, BLEND }; @@ -668,7 +669,23 @@ X86_INTRINSIC_DATA(avx512_mask_getexp_sd, INTR_TYPE_SCALAR_MASK_RM, X86ISD::FGETEXP_RND, 0), X86_INTRINSIC_DATA(avx512_mask_getexp_ss, INTR_TYPE_SCALAR_MASK_RM, - X86ISD::FGETEXP_RND, 0), + X86ISD::FGETEXP_RND, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_pd_128, INTR_TYPE_2OP_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_pd_256, INTR_TYPE_2OP_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_pd_512, INTR_TYPE_2OP_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_ps_128, INTR_TYPE_2OP_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_ps_256, INTR_TYPE_2OP_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_ps_512, INTR_TYPE_2OP_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_sd, INTR_TYPE_3OP_SCALAR_MASK_RM, + X86ISD::VGETMANT, 0), + X86_INTRINSIC_DATA(avx512_mask_getmant_ss, INTR_TYPE_3OP_SCALAR_MASK_RM, + X86ISD::VGETMANT, 0), X86_INTRINSIC_DATA(avx512_mask_max_pd_128, INTR_TYPE_2OP_MASK, X86ISD::FMAX, 0), X86_INTRINSIC_DATA(avx512_mask_max_pd_256, INTR_TYPE_2OP_MASK, X86ISD::FMAX, 0), X86_INTRINSIC_DATA(avx512_mask_max_pd_512, INTR_TYPE_2OP_MASK, X86ISD::FMAX, Index: llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll +++ llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll @@ -3951,6 +3951,90 @@ ret <2 x double> %res } +declare <8 x double> @llvm.x86.avx512.mask.getmant.pd.512(<8 x double>, i32, <8 x double>, i8, i32) + +define <8 x double>@test_int_x86_avx512_mask_getmant_pd_512(<8 x double> %x0, <8 x double> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_pd_512: +; CHECK: ## BB#0: +; CHECK-NEXT: movzbl %dil, %eax +; CHECK-NEXT: kmovw %eax, %k1 +; CHECK-NEXT: vgetmantpd $11, %zmm0, %zmm1 {%k1} +; CHECK-NEXT: vgetmantpd $11,{sae}, %zmm0, %zmm0 +; CHECK-NEXT: vaddpd %zmm0, %zmm1, %zmm0 +; CHECK-NEXT: retq + %res = call <8 x double> @llvm.x86.avx512.mask.getmant.pd.512(<8 x double> %x0, i32 11, <8 x double> %x2, i8 %x3, i32 4) + %res1 = call <8 x double> @llvm.x86.avx512.mask.getmant.pd.512(<8 x double> %x0, i32 11, <8 x double> %x2, i8 -1, i32 8) + %res2 = fadd <8 x double> %res, %res1 + ret <8 x double> %res2 +} + +declare <16 x float> @llvm.x86.avx512.mask.getmant.ps.512(<16 x float>, i32, <16 x float>, i16, i32) + +define <16 x float>@test_int_x86_avx512_mask_getmant_ps_512(<16 x float> %x0, <16 x float> %x2, i16 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_ps_512: +; CHECK: ## BB#0: +; CHECK-NEXT: kmovw %edi, %k1 +; CHECK-NEXT: vgetmantps $11, %zmm0, %zmm1 {%k1} +; CHECK-NEXT: vgetmantps $11,{sae}, %zmm0, %zmm0 +; CHECK-NEXT: vaddps %zmm0, %zmm1, %zmm0 +; CHECK-NEXT: retq + %res = call <16 x float> @llvm.x86.avx512.mask.getmant.ps.512(<16 x float> %x0, i32 11, <16 x float> %x2, i16 %x3, i32 4) + %res1 = call <16 x float> @llvm.x86.avx512.mask.getmant.ps.512(<16 x float> %x0, i32 11, <16 x float> %x2, i16 -1, i32 8) + %res2 = fadd <16 x float> %res, %res1 + ret <16 x float> %res2 +} + +declare <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double>, <2 x double>, i32, <2 x double>, i8, i32) + +define <2 x double>@test_int_x86_avx512_mask_getmant_sd(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_sd: +; CHECK: ## BB#0: +; CHECK-NEXT: andl $1, %edi +; CHECK-NEXT: kmovw %edi, %k1 +; CHECK-NEXT: vmovaps %zmm2, %zmm3 +; CHECK-NEXT: vgetmantsd $11, %xmm1, %xmm0, %xmm3 {%k1} +; CHECK-NEXT: vgetmantsd $11, %xmm1, %xmm0, %xmm4 {%k1} {z} +; CHECK-NEXT: vgetmantsd $11, %xmm1, %xmm0, %xmm5 +; CHECK-NEXT: vgetmantsd $11,{sae}, %xmm1, %xmm0, %xmm2 {%k1} +; CHECK-NEXT: vaddpd %xmm4, %xmm3, %xmm0 +; CHECK-NEXT: vaddpd %xmm5, %xmm2, %xmm1 +; CHECK-NEXT: vaddpd %xmm1, %xmm0, %xmm0 +; CHECK-NEXT: retq + %res = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %x0, <2 x double> %x1, i32 11, <2 x double> %x2, i8 %x3, i32 4) + %res1 = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %x0, <2 x double> %x1, i32 11, <2 x double> zeroinitializer, i8 %x3, i32 4) + %res2 = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %x0, <2 x double> %x1, i32 11, <2 x double> %x2, i8 %x3, i32 8) + %res3 = call <2 x double> @llvm.x86.avx512.mask.getmant.sd(<2 x double> %x0, <2 x double> %x1, i32 11, <2 x double> %x2, i8 -1, i32 4) + %res11 = fadd <2 x double> %res, %res1 + %res12 = fadd <2 x double> %res2, %res3 + %res13 = fadd <2 x double> %res11, %res12 + ret <2 x double> %res13 +} + +declare <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float>, <4 x float>, i32, <4 x float>, i8, i32) + +define <4 x float>@test_int_x86_avx512_mask_getmant_ss(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_ss: +; CHECK: ## BB#0: +; CHECK-NEXT: andl $1, %edi +; CHECK-NEXT: kmovw %edi, %k1 +; CHECK-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm2 {%k1} +; CHECK-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm3 {%k1} {z} +; CHECK-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm4 +; CHECK-NEXT: vgetmantss $11,{sae}, %xmm1, %xmm0, %xmm0 +; CHECK-NEXT: vaddps %xmm3, %xmm2, %xmm1 +; CHECK-NEXT: vaddps %xmm4, %xmm0, %xmm0 +; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 +; CHECK-NEXT: retq + %res = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %x0, <4 x float> %x1, i32 11, <4 x float> %x2, i8 %x3, i32 4) + %res1 = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %x0, <4 x float> %x1, i32 11, <4 x float> zeroinitializer, i8 %x3, i32 4) + %res2 = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %x0, <4 x float> %x1, i32 11, <4 x float> %x2, i8 -1, i32 8) + %res3 = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %x0, <4 x float> %x1, i32 11, <4 x float> %x2, i8 -1, i32 4) + %res11 = fadd <4 x float> %res, %res1 + %res12 = fadd <4 x float> %res2, %res3 + %res13 = fadd <4 x float> %res11, %res12 + ret <4 x float> %res13 +} + declare <8 x double> @llvm.x86.avx512.mask.shuf.pd.512(<8 x double>, <8 x double>, i32, <8 x double>, i8) define <8 x double>@test_int_x86_avx512_mask_shuf_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x3, i8 %x4) { Index: llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll +++ llvm/trunk/test/CodeGen/X86/avx512vl-intrinsics.ll @@ -4508,6 +4508,78 @@ ret <8 x float> %res2 } +declare <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double>, i32, <2 x double>, i8) + +define <2 x double>@test_int_x86_avx512_mask_getmant_pd_128(<2 x double> %x0, <2 x double> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_pd_128: +; CHECK: ## BB#0: +; CHECK-NEXT: movzbl %dil, %eax +; CHECK-NEXT: kmovw %eax, %k1 +; CHECK-NEXT: vgetmantpd $11, %xmm0, %xmm1 {%k1} +; CHECK-NEXT: vgetmantpd $11, %xmm0, %xmm2 {%k1} {z} +; CHECK-NEXT: vgetmantpd $11, %xmm0, %xmm0 +; CHECK-NEXT: vaddpd %xmm0, %xmm1, %xmm0 +; CHECK-NEXT: vaddpd %xmm0, %xmm2, %xmm0 +; CHECK-NEXT: retq + %res = call <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double> %x0, i32 11, <2 x double> %x2, i8 %x3) + %res2 = call <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double> %x0, i32 11, <2 x double> zeroinitializer, i8 %x3) + %res1 = call <2 x double> @llvm.x86.avx512.mask.getmant.pd.128(<2 x double> %x0, i32 11, <2 x double> %x2, i8 -1) + %res3 = fadd <2 x double> %res, %res1 + %res4 = fadd <2 x double> %res2, %res3 + ret <2 x double> %res4 +} + +declare <4 x double> @llvm.x86.avx512.mask.getmant.pd.256(<4 x double>, i32, <4 x double>, i8) + +define <4 x double>@test_int_x86_avx512_mask_getmant_pd_256(<4 x double> %x0, <4 x double> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_pd_256: +; CHECK: ## BB#0: +; CHECK-NEXT: movzbl %dil, %eax +; CHECK-NEXT: kmovw %eax, %k1 +; CHECK-NEXT: vgetmantpd $11, %ymm0, %ymm1 {%k1} +; CHECK-NEXT: vgetmantpd $11, %ymm0, %ymm0 +; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 +; CHECK-NEXT: retq + %res = call <4 x double> @llvm.x86.avx512.mask.getmant.pd.256(<4 x double> %x0, i32 11, <4 x double> %x2, i8 %x3) + %res1 = call <4 x double> @llvm.x86.avx512.mask.getmant.pd.256(<4 x double> %x0, i32 11, <4 x double> %x2, i8 -1) + %res2 = fadd <4 x double> %res, %res1 + ret <4 x double> %res2 +} + +declare <4 x float> @llvm.x86.avx512.mask.getmant.ps.128(<4 x float>, i32, <4 x float>, i8) + +define <4 x float>@test_int_x86_avx512_mask_getmant_ps_128(<4 x float> %x0, <4 x float> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_ps_128: +; CHECK: ## BB#0: +; CHECK-NEXT: movzbl %dil, %eax +; CHECK-NEXT: kmovw %eax, %k1 +; CHECK-NEXT: vgetmantps $11, %xmm0, %xmm1 {%k1} +; CHECK-NEXT: vgetmantps $11, %xmm0, %xmm0 +; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 +; CHECK-NEXT: retq + %res = call <4 x float> @llvm.x86.avx512.mask.getmant.ps.128(<4 x float> %x0, i32 11, <4 x float> %x2, i8 %x3) + %res1 = call <4 x float> @llvm.x86.avx512.mask.getmant.ps.128(<4 x float> %x0, i32 11, <4 x float> %x2, i8 -1) + %res2 = fadd <4 x float> %res, %res1 + ret <4 x float> %res2 +} + +declare <8 x float> @llvm.x86.avx512.mask.getmant.ps.256(<8 x float>, i32, <8 x float>, i8) + +define <8 x float>@test_int_x86_avx512_mask_getmant_ps_256(<8 x float> %x0, <8 x float> %x2, i8 %x3) { +; CHECK-LABEL: test_int_x86_avx512_mask_getmant_ps_256: +; CHECK: ## BB#0: +; CHECK-NEXT: movzbl %dil, %eax +; CHECK-NEXT: kmovw %eax, %k1 +; CHECK-NEXT: vgetmantps $11, %ymm0, %ymm1 {%k1} +; CHECK-NEXT: vgetmantps $11, %ymm0, %ymm0 +; CHECK-NEXT: vaddps %ymm0, %ymm1, %ymm0 +; CHECK-NEXT: retq + %res = call <8 x float> @llvm.x86.avx512.mask.getmant.ps.256(<8 x float> %x0, i32 11, <8 x float> %x2, i8 %x3) + %res1 = call <8 x float> @llvm.x86.avx512.mask.getmant.ps.256(<8 x float> %x0, i32 11, <8 x float> %x2, i8 -1) + %res2 = fadd <8 x float> %res, %res1 + ret <8 x float> %res2 +} + declare <2 x double> @llvm.x86.avx512.mask.shuf.pd.128(<2 x double>, <2 x double>, i32, <2 x double>, i8) define <2 x double>@test_int_x86_avx512_mask_shuf_pd_128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x3, i8 %x4) { Index: llvm/trunk/test/MC/X86/avx512-encodings.s =================================================================== --- llvm/trunk/test/MC/X86/avx512-encodings.s +++ llvm/trunk/test/MC/X86/avx512-encodings.s @@ -14958,6 +14958,238 @@ // CHECK: encoding: [0x62,0xf2,0xc5,0x08,0x43,0x92,0xf8,0xfb,0xff,0xff] vgetexpsd -1032(%rdx), %xmm7, %xmm2 +// CHECK: vgetmantss $171, %xmm12, %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xd3,0x6d,0x08,0x27,0xdc,0xab] + vgetmantss $0xab, %xmm12, %xmm2, %xmm3 + +// CHECK: vgetmantss $171, %xmm12, %xmm2, %xmm3 {%k7} +// CHECK: encoding: [0x62,0xd3,0x6d,0x0f,0x27,0xdc,0xab] + vgetmantss $0xab, %xmm12, %xmm2, %xmm3 {%k7} + +// CHECK: vgetmantss $171, %xmm12, %xmm2, %xmm3 {%k7} {z} +// CHECK: encoding: [0x62,0xd3,0x6d,0x8f,0x27,0xdc,0xab] + vgetmantss $0xab, %xmm12, %xmm2, %xmm3 {%k7} {z} + +// CHECK: vgetmantss $171,{sae}, %xmm12, %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xd3,0x6d,0x18,0x27,0xdc,0xab] + vgetmantss $0xab,{sae}, %xmm12, %xmm2, %xmm3 + +// CHECK: vgetmantss $123, %xmm12, %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xd3,0x6d,0x08,0x27,0xdc,0x7b] + vgetmantss $0x7b, %xmm12, %xmm2, %xmm3 + +// CHECK: vgetmantss $123,{sae}, %xmm12, %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xd3,0x6d,0x18,0x27,0xdc,0x7b] + vgetmantss $0x7b,{sae}, %xmm12, %xmm2, %xmm3 + +// CHECK: vgetmantss $123, (%rcx), %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xf3,0x6d,0x08,0x27,0x19,0x7b] + vgetmantss $0x7b, (%rcx), %xmm2, %xmm3 + +// CHECK: vgetmantss $123, 291(%rax,%r14,8), %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xb3,0x6d,0x08,0x27,0x9c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantss $0x7b, 291(%rax,%r14,8), %xmm2, %xmm3 + +// CHECK: vgetmantss $123, 508(%rdx), %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xf3,0x6d,0x08,0x27,0x5a,0x7f,0x7b] + vgetmantss $0x7b, 508(%rdx), %xmm2, %xmm3 + +// CHECK: vgetmantss $123, 512(%rdx), %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xf3,0x6d,0x08,0x27,0x9a,0x00,0x02,0x00,0x00,0x7b] + vgetmantss $0x7b, 512(%rdx), %xmm2, %xmm3 + +// CHECK: vgetmantss $123, -512(%rdx), %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xf3,0x6d,0x08,0x27,0x5a,0x80,0x7b] + vgetmantss $0x7b, -512(%rdx), %xmm2, %xmm3 + +// CHECK: vgetmantss $123, -516(%rdx), %xmm2, %xmm3 +// CHECK: encoding: [0x62,0xf3,0x6d,0x08,0x27,0x9a,0xfc,0xfd,0xff,0xff,0x7b] + vgetmantss $0x7b, -516(%rdx), %xmm2, %xmm3 + +// CHECK: vgetmantsd $171, %xmm8, %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xd3,0xa5,0x00,0x27,0xd8,0xab] + vgetmantsd $0xab, %xmm8, %xmm27, %xmm3 + +// CHECK: vgetmantsd $171, %xmm8, %xmm27, %xmm3 {%k6} +// CHECK: encoding: [0x62,0xd3,0xa5,0x06,0x27,0xd8,0xab] + vgetmantsd $0xab, %xmm8, %xmm27, %xmm3 {%k6} + +// CHECK: vgetmantsd $171, %xmm8, %xmm27, %xmm3 {%k6} {z} +// CHECK: encoding: [0x62,0xd3,0xa5,0x86,0x27,0xd8,0xab] + vgetmantsd $0xab, %xmm8, %xmm27, %xmm3 {%k6} {z} + +// CHECK: vgetmantsd $171,{sae}, %xmm8, %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xd3,0xa5,0x10,0x27,0xd8,0xab] + vgetmantsd $0xab,{sae}, %xmm8, %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, %xmm8, %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xd3,0xa5,0x00,0x27,0xd8,0x7b] + vgetmantsd $0x7b, %xmm8, %xmm27, %xmm3 + +// CHECK: vgetmantsd $123,{sae}, %xmm8, %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xd3,0xa5,0x10,0x27,0xd8,0x7b] + vgetmantsd $0x7b,{sae}, %xmm8, %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, (%rcx), %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xf3,0xa5,0x00,0x27,0x19,0x7b] + vgetmantsd $0x7b, (%rcx), %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, 291(%rax,%r14,8), %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xb3,0xa5,0x00,0x27,0x9c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantsd $0x7b, 291(%rax,%r14,8), %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, 1016(%rdx), %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xf3,0xa5,0x00,0x27,0x5a,0x7f,0x7b] + vgetmantsd $0x7b, 1016(%rdx), %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, 1024(%rdx), %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xf3,0xa5,0x00,0x27,0x9a,0x00,0x04,0x00,0x00,0x7b] + vgetmantsd $0x7b, 1024(%rdx), %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, -1024(%rdx), %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xf3,0xa5,0x00,0x27,0x5a,0x80,0x7b] + vgetmantsd $0x7b, -1024(%rdx), %xmm27, %xmm3 + +// CHECK: vgetmantsd $123, -1032(%rdx), %xmm27, %xmm3 +// CHECK: encoding: [0x62,0xf3,0xa5,0x00,0x27,0x9a,0xf8,0xfb,0xff,0xff,0x7b] + vgetmantsd $0x7b, -1032(%rdx), %xmm27, %xmm3 + +// CHECK: vgetmantps $171, %zmm28, %zmm22 +// CHECK: encoding: [0x62,0x83,0x7d,0x48,0x26,0xf4,0xab] + vgetmantps $0xab, %zmm28, %zmm22 + +// CHECK: vgetmantps $171, %zmm28, %zmm22 {%k3} +// CHECK: encoding: [0x62,0x83,0x7d,0x4b,0x26,0xf4,0xab] + vgetmantps $0xab, %zmm28, %zmm22 {%k3} + +// CHECK: vgetmantps $171, %zmm28, %zmm22 {%k3} {z} +// CHECK: encoding: [0x62,0x83,0x7d,0xcb,0x26,0xf4,0xab] + vgetmantps $0xab, %zmm28, %zmm22 {%k3} {z} + +// CHECK: vgetmantps $171,{sae}, %zmm28, %zmm22 +// CHECK: encoding: [0x62,0x83,0x7d,0x18,0x26,0xf4,0xab] + vgetmantps $0xab,{sae}, %zmm28, %zmm22 + +// CHECK: vgetmantps $123, %zmm28, %zmm22 +// CHECK: encoding: [0x62,0x83,0x7d,0x48,0x26,0xf4,0x7b] + vgetmantps $0x7b, %zmm28, %zmm22 + +// CHECK: vgetmantps $123,{sae}, %zmm28, %zmm22 +// CHECK: encoding: [0x62,0x83,0x7d,0x18,0x26,0xf4,0x7b] + vgetmantps $0x7b,{sae}, %zmm28, %zmm22 + +// CHECK: vgetmantps $123, (%rcx), %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x48,0x26,0x31,0x7b] + vgetmantps $0x7b, (%rcx), %zmm22 + +// CHECK: vgetmantps $123, 291(%rax,%r14,8), %zmm22 +// CHECK: encoding: [0x62,0xa3,0x7d,0x48,0x26,0xb4,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantps $0x7b, 291(%rax,%r14,8), %zmm22 + +// CHECK: vgetmantps $123, (%rcx){1to16}, %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x58,0x26,0x31,0x7b] + vgetmantps $0x7b, (%rcx){1to16}, %zmm22 + +// CHECK: vgetmantps $123, 8128(%rdx), %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x48,0x26,0x72,0x7f,0x7b] + vgetmantps $0x7b, 8128(%rdx), %zmm22 + +// CHECK: vgetmantps $123, 8192(%rdx), %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x48,0x26,0xb2,0x00,0x20,0x00,0x00,0x7b] + vgetmantps $0x7b, 8192(%rdx), %zmm22 + +// CHECK: vgetmantps $123, -8192(%rdx), %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x48,0x26,0x72,0x80,0x7b] + vgetmantps $0x7b, -8192(%rdx), %zmm22 + +// CHECK: vgetmantps $123, -8256(%rdx), %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x48,0x26,0xb2,0xc0,0xdf,0xff,0xff,0x7b] + vgetmantps $0x7b, -8256(%rdx), %zmm22 + +// CHECK: vgetmantps $123, 508(%rdx){1to16}, %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x58,0x26,0x72,0x7f,0x7b] + vgetmantps $0x7b, 508(%rdx){1to16}, %zmm22 + +// CHECK: vgetmantps $123, 512(%rdx){1to16}, %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x58,0x26,0xb2,0x00,0x02,0x00,0x00,0x7b] + vgetmantps $0x7b, 512(%rdx){1to16}, %zmm22 + +// CHECK: vgetmantps $123, -512(%rdx){1to16}, %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x58,0x26,0x72,0x80,0x7b] + vgetmantps $0x7b, -512(%rdx){1to16}, %zmm22 + +// CHECK: vgetmantps $123, -516(%rdx){1to16}, %zmm22 +// CHECK: encoding: [0x62,0xe3,0x7d,0x58,0x26,0xb2,0xfc,0xfd,0xff,0xff,0x7b] + vgetmantps $0x7b, -516(%rdx){1to16}, %zmm22 + +// CHECK: vgetmantpd $171, %zmm26, %zmm2 +// CHECK: encoding: [0x62,0x93,0xfd,0x48,0x26,0xd2,0xab] + vgetmantpd $0xab, %zmm26, %zmm2 + +// CHECK: vgetmantpd $171, %zmm26, %zmm2 {%k7} +// CHECK: encoding: [0x62,0x93,0xfd,0x4f,0x26,0xd2,0xab] + vgetmantpd $0xab, %zmm26, %zmm2 {%k7} + +// CHECK: vgetmantpd $171, %zmm26, %zmm2 {%k7} {z} +// CHECK: encoding: [0x62,0x93,0xfd,0xcf,0x26,0xd2,0xab] + vgetmantpd $0xab, %zmm26, %zmm2 {%k7} {z} + +// CHECK: vgetmantpd $171,{sae}, %zmm26, %zmm2 +// CHECK: encoding: [0x62,0x93,0xfd,0x18,0x26,0xd2,0xab] + vgetmantpd $0xab,{sae}, %zmm26, %zmm2 + +// CHECK: vgetmantpd $123, %zmm26, %zmm2 +// CHECK: encoding: [0x62,0x93,0xfd,0x48,0x26,0xd2,0x7b] + vgetmantpd $0x7b, %zmm26, %zmm2 + +// CHECK: vgetmantpd $123,{sae}, %zmm26, %zmm2 +// CHECK: encoding: [0x62,0x93,0xfd,0x18,0x26,0xd2,0x7b] + vgetmantpd $0x7b,{sae}, %zmm26, %zmm2 + +// CHECK: vgetmantpd $123, (%rcx), %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x48,0x26,0x11,0x7b] + vgetmantpd $0x7b, (%rcx), %zmm2 + +// CHECK: vgetmantpd $123, 291(%rax,%r14,8), %zmm2 +// CHECK: encoding: [0x62,0xb3,0xfd,0x48,0x26,0x94,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantpd $0x7b, 291(%rax,%r14,8), %zmm2 + +// CHECK: vgetmantpd $123, (%rcx){1to8}, %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x58,0x26,0x11,0x7b] + vgetmantpd $0x7b, (%rcx){1to8}, %zmm2 + +// CHECK: vgetmantpd $123, 8128(%rdx), %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x48,0x26,0x52,0x7f,0x7b] + vgetmantpd $0x7b, 8128(%rdx), %zmm2 + +// CHECK: vgetmantpd $123, 8192(%rdx), %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x48,0x26,0x92,0x00,0x20,0x00,0x00,0x7b] + vgetmantpd $0x7b, 8192(%rdx), %zmm2 + +// CHECK: vgetmantpd $123, -8192(%rdx), %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x48,0x26,0x52,0x80,0x7b] + vgetmantpd $0x7b, -8192(%rdx), %zmm2 + +// CHECK: vgetmantpd $123, -8256(%rdx), %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x48,0x26,0x92,0xc0,0xdf,0xff,0xff,0x7b] + vgetmantpd $0x7b, -8256(%rdx), %zmm2 + +// CHECK: vgetmantpd $123, 1016(%rdx){1to8}, %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x58,0x26,0x52,0x7f,0x7b] + vgetmantpd $0x7b, 1016(%rdx){1to8}, %zmm2 + +// CHECK: vgetmantpd $123, 1024(%rdx){1to8}, %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x58,0x26,0x92,0x00,0x04,0x00,0x00,0x7b] + vgetmantpd $0x7b, 1024(%rdx){1to8}, %zmm2 + +// CHECK: vgetmantpd $123, -1024(%rdx){1to8}, %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x58,0x26,0x52,0x80,0x7b] + vgetmantpd $0x7b, -1024(%rdx){1to8}, %zmm2 + +// CHECK: vgetmantpd $123, -1032(%rdx){1to8}, %zmm2 +// CHECK: encoding: [0x62,0xf3,0xfd,0x58,0x26,0x92,0xf8,0xfb,0xff,0xff,0x7b] + vgetmantpd $0x7b, -1032(%rdx){1to8}, %zmm2 + // CHECK: vshufps $171, %zmm9, %zmm6, %zmm5 // CHECK: encoding: [0x62,0xd1,0x4c,0x48,0xc6,0xe9,0xab] vshufps $0xab, %zmm9, %zmm6, %zmm5 Index: llvm/trunk/test/MC/X86/x86-64-avx512f_vl.s =================================================================== --- llvm/trunk/test/MC/X86/x86-64-avx512f_vl.s +++ llvm/trunk/test/MC/X86/x86-64-avx512f_vl.s @@ -19739,6 +19739,246 @@ // CHECK: encoding: [0x62,0xe1,0xe5,0x30,0x6d,0xa2,0xf8,0xfb,0xff,0xff] vpunpckhqdq -1032(%rdx){1to4}, %ymm19, %ymm20 +// CHECK: vgetmantps $171, %xmm23, %xmm29 +// CHECK: encoding: [0x62,0x23,0x7d,0x08,0x26,0xef,0xab] + vgetmantps $0xab, %xmm23, %xmm29 + +// CHECK: vgetmantps $171, %xmm23, %xmm29 {%k5} +// CHECK: encoding: [0x62,0x23,0x7d,0x0d,0x26,0xef,0xab] + vgetmantps $0xab, %xmm23, %xmm29 {%k5} + +// CHECK: vgetmantps $171, %xmm23, %xmm29 {%k5} {z} +// CHECK: encoding: [0x62,0x23,0x7d,0x8d,0x26,0xef,0xab] + vgetmantps $0xab, %xmm23, %xmm29 {%k5} {z} + +// CHECK: vgetmantps $123, %xmm23, %xmm29 +// CHECK: encoding: [0x62,0x23,0x7d,0x08,0x26,0xef,0x7b] + vgetmantps $0x7b, %xmm23, %xmm29 + +// CHECK: vgetmantps $123, (%rcx), %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x08,0x26,0x29,0x7b] + vgetmantps $0x7b, (%rcx), %xmm29 + +// CHECK: vgetmantps $123, 291(%rax,%r14,8), %xmm29 +// CHECK: encoding: [0x62,0x23,0x7d,0x08,0x26,0xac,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantps $0x7b, 291(%rax,%r14,8), %xmm29 + +// CHECK: vgetmantps $123, (%rcx){1to4}, %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x18,0x26,0x29,0x7b] + vgetmantps $0x7b, (%rcx){1to4}, %xmm29 + +// CHECK: vgetmantps $123, 2032(%rdx), %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x08,0x26,0x6a,0x7f,0x7b] + vgetmantps $0x7b, 2032(%rdx), %xmm29 + +// CHECK: vgetmantps $123, 2048(%rdx), %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x08,0x26,0xaa,0x00,0x08,0x00,0x00,0x7b] + vgetmantps $0x7b, 2048(%rdx), %xmm29 + +// CHECK: vgetmantps $123, -2048(%rdx), %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x08,0x26,0x6a,0x80,0x7b] + vgetmantps $0x7b, -2048(%rdx), %xmm29 + +// CHECK: vgetmantps $123, -2064(%rdx), %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x08,0x26,0xaa,0xf0,0xf7,0xff,0xff,0x7b] + vgetmantps $0x7b, -2064(%rdx), %xmm29 + +// CHECK: vgetmantps $123, 508(%rdx){1to4}, %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x18,0x26,0x6a,0x7f,0x7b] + vgetmantps $0x7b, 508(%rdx){1to4}, %xmm29 + +// CHECK: vgetmantps $123, 512(%rdx){1to4}, %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x18,0x26,0xaa,0x00,0x02,0x00,0x00,0x7b] + vgetmantps $0x7b, 512(%rdx){1to4}, %xmm29 + +// CHECK: vgetmantps $123, -512(%rdx){1to4}, %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x18,0x26,0x6a,0x80,0x7b] + vgetmantps $0x7b, -512(%rdx){1to4}, %xmm29 + +// CHECK: vgetmantps $123, -516(%rdx){1to4}, %xmm29 +// CHECK: encoding: [0x62,0x63,0x7d,0x18,0x26,0xaa,0xfc,0xfd,0xff,0xff,0x7b] + vgetmantps $0x7b, -516(%rdx){1to4}, %xmm29 + +// CHECK: vgetmantps $171, %ymm29, %ymm17 +// CHECK: encoding: [0x62,0x83,0x7d,0x28,0x26,0xcd,0xab] + vgetmantps $0xab, %ymm29, %ymm17 + +// CHECK: vgetmantps $171, %ymm29, %ymm17 {%k1} +// CHECK: encoding: [0x62,0x83,0x7d,0x29,0x26,0xcd,0xab] + vgetmantps $0xab, %ymm29, %ymm17 {%k1} + +// CHECK: vgetmantps $171, %ymm29, %ymm17 {%k1} {z} +// CHECK: encoding: [0x62,0x83,0x7d,0xa9,0x26,0xcd,0xab] + vgetmantps $0xab, %ymm29, %ymm17 {%k1} {z} + +// CHECK: vgetmantps $123, %ymm29, %ymm17 +// CHECK: encoding: [0x62,0x83,0x7d,0x28,0x26,0xcd,0x7b] + vgetmantps $0x7b, %ymm29, %ymm17 + +// CHECK: vgetmantps $123, (%rcx), %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x28,0x26,0x09,0x7b] + vgetmantps $0x7b, (%rcx), %ymm17 + +// CHECK: vgetmantps $123, 291(%rax,%r14,8), %ymm17 +// CHECK: encoding: [0x62,0xa3,0x7d,0x28,0x26,0x8c,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantps $0x7b, 291(%rax,%r14,8), %ymm17 + +// CHECK: vgetmantps $123, (%rcx){1to8}, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x38,0x26,0x09,0x7b] + vgetmantps $0x7b, (%rcx){1to8}, %ymm17 + +// CHECK: vgetmantps $123, 4064(%rdx), %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x28,0x26,0x4a,0x7f,0x7b] + vgetmantps $0x7b, 4064(%rdx), %ymm17 + +// CHECK: vgetmantps $123, 4096(%rdx), %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x28,0x26,0x8a,0x00,0x10,0x00,0x00,0x7b] + vgetmantps $0x7b, 4096(%rdx), %ymm17 + +// CHECK: vgetmantps $123, -4096(%rdx), %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x28,0x26,0x4a,0x80,0x7b] + vgetmantps $0x7b, -4096(%rdx), %ymm17 + +// CHECK: vgetmantps $123, -4128(%rdx), %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x28,0x26,0x8a,0xe0,0xef,0xff,0xff,0x7b] + vgetmantps $0x7b, -4128(%rdx), %ymm17 + +// CHECK: vgetmantps $123, 508(%rdx){1to8}, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x38,0x26,0x4a,0x7f,0x7b] + vgetmantps $0x7b, 508(%rdx){1to8}, %ymm17 + +// CHECK: vgetmantps $123, 512(%rdx){1to8}, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x38,0x26,0x8a,0x00,0x02,0x00,0x00,0x7b] + vgetmantps $0x7b, 512(%rdx){1to8}, %ymm17 + +// CHECK: vgetmantps $123, -512(%rdx){1to8}, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x38,0x26,0x4a,0x80,0x7b] + vgetmantps $0x7b, -512(%rdx){1to8}, %ymm17 + +// CHECK: vgetmantps $123, -516(%rdx){1to8}, %ymm17 +// CHECK: encoding: [0x62,0xe3,0x7d,0x38,0x26,0x8a,0xfc,0xfd,0xff,0xff,0x7b] + vgetmantps $0x7b, -516(%rdx){1to8}, %ymm17 + +// CHECK: vgetmantpd $171, %xmm29, %xmm28 +// CHECK: encoding: [0x62,0x03,0xfd,0x08,0x26,0xe5,0xab] + vgetmantpd $0xab, %xmm29, %xmm28 + +// CHECK: vgetmantpd $171, %xmm29, %xmm28 {%k4} +// CHECK: encoding: [0x62,0x03,0xfd,0x0c,0x26,0xe5,0xab] + vgetmantpd $0xab, %xmm29, %xmm28 {%k4} + +// CHECK: vgetmantpd $171, %xmm29, %xmm28 {%k4} {z} +// CHECK: encoding: [0x62,0x03,0xfd,0x8c,0x26,0xe5,0xab] + vgetmantpd $0xab, %xmm29, %xmm28 {%k4} {z} + +// CHECK: vgetmantpd $123, %xmm29, %xmm28 +// CHECK: encoding: [0x62,0x03,0xfd,0x08,0x26,0xe5,0x7b] + vgetmantpd $0x7b, %xmm29, %xmm28 + +// CHECK: vgetmantpd $123, (%rcx), %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x08,0x26,0x21,0x7b] + vgetmantpd $0x7b, (%rcx), %xmm28 + +// CHECK: vgetmantpd $123, 291(%rax,%r14,8), %xmm28 +// CHECK: encoding: [0x62,0x23,0xfd,0x08,0x26,0xa4,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantpd $0x7b, 291(%rax,%r14,8), %xmm28 + +// CHECK: vgetmantpd $123, (%rcx){1to2}, %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x18,0x26,0x21,0x7b] + vgetmantpd $0x7b, (%rcx){1to2}, %xmm28 + +// CHECK: vgetmantpd $123, 2032(%rdx), %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x08,0x26,0x62,0x7f,0x7b] + vgetmantpd $0x7b, 2032(%rdx), %xmm28 + +// CHECK: vgetmantpd $123, 2048(%rdx), %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x08,0x26,0xa2,0x00,0x08,0x00,0x00,0x7b] + vgetmantpd $0x7b, 2048(%rdx), %xmm28 + +// CHECK: vgetmantpd $123, -2048(%rdx), %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x08,0x26,0x62,0x80,0x7b] + vgetmantpd $0x7b, -2048(%rdx), %xmm28 + +// CHECK: vgetmantpd $123, -2064(%rdx), %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x08,0x26,0xa2,0xf0,0xf7,0xff,0xff,0x7b] + vgetmantpd $0x7b, -2064(%rdx), %xmm28 + +// CHECK: vgetmantpd $123, 1016(%rdx){1to2}, %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x18,0x26,0x62,0x7f,0x7b] + vgetmantpd $0x7b, 1016(%rdx){1to2}, %xmm28 + +// CHECK: vgetmantpd $123, 1024(%rdx){1to2}, %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x18,0x26,0xa2,0x00,0x04,0x00,0x00,0x7b] + vgetmantpd $0x7b, 1024(%rdx){1to2}, %xmm28 + +// CHECK: vgetmantpd $123, -1024(%rdx){1to2}, %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x18,0x26,0x62,0x80,0x7b] + vgetmantpd $0x7b, -1024(%rdx){1to2}, %xmm28 + +// CHECK: vgetmantpd $123, -1032(%rdx){1to2}, %xmm28 +// CHECK: encoding: [0x62,0x63,0xfd,0x18,0x26,0xa2,0xf8,0xfb,0xff,0xff,0x7b] + vgetmantpd $0x7b, -1032(%rdx){1to2}, %xmm28 + +// CHECK: vgetmantpd $171, %ymm23, %ymm23 +// CHECK: encoding: [0x62,0xa3,0xfd,0x28,0x26,0xff,0xab] + vgetmantpd $0xab, %ymm23, %ymm23 + +// CHECK: vgetmantpd $171, %ymm23, %ymm23 {%k5} +// CHECK: encoding: [0x62,0xa3,0xfd,0x2d,0x26,0xff,0xab] + vgetmantpd $0xab, %ymm23, %ymm23 {%k5} + +// CHECK: vgetmantpd $171, %ymm23, %ymm23 {%k5} {z} +// CHECK: encoding: [0x62,0xa3,0xfd,0xad,0x26,0xff,0xab] + vgetmantpd $0xab, %ymm23, %ymm23 {%k5} {z} + +// CHECK: vgetmantpd $123, %ymm23, %ymm23 +// CHECK: encoding: [0x62,0xa3,0xfd,0x28,0x26,0xff,0x7b] + vgetmantpd $0x7b, %ymm23, %ymm23 + +// CHECK: vgetmantpd $123, (%rcx), %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x28,0x26,0x39,0x7b] + vgetmantpd $0x7b, (%rcx), %ymm23 + +// CHECK: vgetmantpd $123, 291(%rax,%r14,8), %ymm23 +// CHECK: encoding: [0x62,0xa3,0xfd,0x28,0x26,0xbc,0xf0,0x23,0x01,0x00,0x00,0x7b] + vgetmantpd $0x7b, 291(%rax,%r14,8), %ymm23 + +// CHECK: vgetmantpd $123, (%rcx){1to4}, %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x38,0x26,0x39,0x7b] + vgetmantpd $0x7b, (%rcx){1to4}, %ymm23 + +// CHECK: vgetmantpd $123, 4064(%rdx), %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x28,0x26,0x7a,0x7f,0x7b] + vgetmantpd $0x7b, 4064(%rdx), %ymm23 + +// CHECK: vgetmantpd $123, 4096(%rdx), %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x28,0x26,0xba,0x00,0x10,0x00,0x00,0x7b] + vgetmantpd $0x7b, 4096(%rdx), %ymm23 + +// CHECK: vgetmantpd $123, -4096(%rdx), %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x28,0x26,0x7a,0x80,0x7b] + vgetmantpd $0x7b, -4096(%rdx), %ymm23 + +// CHECK: vgetmantpd $123, -4128(%rdx), %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x28,0x26,0xba,0xe0,0xef,0xff,0xff,0x7b] + vgetmantpd $0x7b, -4128(%rdx), %ymm23 + +// CHECK: vgetmantpd $123, 1016(%rdx){1to4}, %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x38,0x26,0x7a,0x7f,0x7b] + vgetmantpd $0x7b, 1016(%rdx){1to4}, %ymm23 + +// CHECK: vgetmantpd $123, 1024(%rdx){1to4}, %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x38,0x26,0xba,0x00,0x04,0x00,0x00,0x7b] + vgetmantpd $0x7b, 1024(%rdx){1to4}, %ymm23 + +// CHECK: vgetmantpd $123, -1024(%rdx){1to4}, %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x38,0x26,0x7a,0x80,0x7b] + vgetmantpd $0x7b, -1024(%rdx){1to4}, %ymm23 + +// CHECK: vgetmantpd $123, -1032(%rdx){1to4}, %ymm23 +// CHECK: encoding: [0x62,0xe3,0xfd,0x38,0x26,0xba,0xf8,0xfb,0xff,0xff,0x7b] + vgetmantpd $0x7b, -1032(%rdx){1to4}, %ymm23 + // CHECK: vshufps $171, %xmm21, %xmm23, %xmm17 // CHECK: encoding: [0x62,0xa1,0x44,0x00,0xc6,0xcd,0xab] vshufps $0xab, %xmm21, %xmm23, %xmm17