From: Simon Pilgrim Date: Fri, 21 Oct 2016 12:14:24 +0000 (+0000) Subject: [X86][AVX512] Add mask/maskz writemask support to subvector broadcast shuffle decode... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32b06235da7fa1dce35dbca96585321bd948f927;p=platform%2Fupstream%2Fllvm.git [X86][AVX512] Add mask/maskz writemask support to subvector broadcast shuffle decode comments llvm-svn: 284821 --- diff --git a/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp b/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp index 1cbb180..cfbb907 100644 --- a/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp +++ b/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp @@ -277,6 +277,26 @@ static std::string getMaskName(const MCInst *MI, const char *DestName, CASE_MASKZ_VSHUF(64X2, r) CASE_MASKZ_VSHUF(32X4, m) CASE_MASKZ_VSHUF(32X4, r) + CASE_MASKZ_INS_COMMON(BROADCASTF64X2, Z128, rm) + CASE_MASKZ_INS_COMMON(BROADCASTI64X2, Z128, rm) + CASE_MASKZ_INS_COMMON(BROADCASTF64X2, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTI64X2, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTF64X4, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTI64X4, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTF32X4, Z256, rm) + CASE_MASKZ_INS_COMMON(BROADCASTI32X4, Z256, rm) + CASE_MASKZ_INS_COMMON(BROADCASTF32X4, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTI32X4, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTF32X8, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTI32X8, , rm) + CASE_MASKZ_INS_COMMON(BROADCASTF32X2, Z256, r) + CASE_MASKZ_INS_COMMON(BROADCASTI32X2, Z256, r) + CASE_MASKZ_INS_COMMON(BROADCASTF32X2, Z256, m) + CASE_MASKZ_INS_COMMON(BROADCASTI32X2, Z256, m) + CASE_MASKZ_INS_COMMON(BROADCASTF32X2, Z, r) + CASE_MASKZ_INS_COMMON(BROADCASTI32X2, Z, r) + CASE_MASKZ_INS_COMMON(BROADCASTF32X2, Z, m) + CASE_MASKZ_INS_COMMON(BROADCASTI32X2, Z, m) MaskWithZero = true; MaskRegName = getRegName(MI->getOperand(1).getReg()); break; @@ -342,6 +362,26 @@ static std::string getMaskName(const MCInst *MI, const char *DestName, CASE_MASK_VSHUF(64X2, r) CASE_MASK_VSHUF(32X4, m) CASE_MASK_VSHUF(32X4, r) + CASE_MASK_INS_COMMON(BROADCASTF64X2, Z128, rm) + CASE_MASK_INS_COMMON(BROADCASTI64X2, Z128, rm) + CASE_MASK_INS_COMMON(BROADCASTF64X2, , rm) + CASE_MASK_INS_COMMON(BROADCASTI64X2, , rm) + CASE_MASK_INS_COMMON(BROADCASTF64X4, , rm) + CASE_MASK_INS_COMMON(BROADCASTI64X4, , rm) + CASE_MASK_INS_COMMON(BROADCASTF32X4, Z256, rm) + CASE_MASK_INS_COMMON(BROADCASTI32X4, Z256, rm) + CASE_MASK_INS_COMMON(BROADCASTF32X4, , rm) + CASE_MASK_INS_COMMON(BROADCASTI32X4, , rm) + CASE_MASK_INS_COMMON(BROADCASTF32X8, , rm) + CASE_MASK_INS_COMMON(BROADCASTI32X8, , rm) + CASE_MASK_INS_COMMON(BROADCASTF32X2, Z256, r) + CASE_MASK_INS_COMMON(BROADCASTI32X2, Z256, r) + CASE_MASK_INS_COMMON(BROADCASTF32X2, Z256, m) + CASE_MASK_INS_COMMON(BROADCASTI32X2, Z256, m) + CASE_MASK_INS_COMMON(BROADCASTF32X2, Z, r) + CASE_MASK_INS_COMMON(BROADCASTI32X2, Z, r) + CASE_MASK_INS_COMMON(BROADCASTF32X2, Z, m) + CASE_MASK_INS_COMMON(BROADCASTI32X2, Z, m) MaskRegName = getRegName(MI->getOperand(2).getReg()); break; } diff --git a/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll b/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll index db6dfc4..5826bb6 100644 --- a/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll +++ b/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll @@ -532,8 +532,8 @@ define <16 x float>@test_int_x86_avx512_mask_broadcastf32x2_512(<4 x float> %x0, ; CHECK-LABEL: test_int_x86_avx512_mask_broadcastf32x2_512: ; CHECK: ## BB#0: ; CHECK-NEXT: kmovw %edi, %k1 -; CHECK-NEXT: vbroadcastf32x2 {{.*#+}} zmm1 = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] -; CHECK-NEXT: vbroadcastf32x2 {{.*#+}} zmm2 = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] +; CHECK-NEXT: vbroadcastf32x2 {{.*#+}} zmm1 {%k1} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] +; CHECK-NEXT: vbroadcastf32x2 {{.*#+}} zmm2 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] ; CHECK-NEXT: vbroadcastf32x2 {{.*#+}} zmm0 = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] ; CHECK-NEXT: vaddps %zmm2, %zmm1, %zmm1 ; CHECK-NEXT: vaddps %zmm0, %zmm1, %zmm0 @@ -552,8 +552,8 @@ define <16 x i32>@test_int_x86_avx512_mask_broadcasti32x2_512(<4 x i32> %x0, <16 ; CHECK-LABEL: test_int_x86_avx512_mask_broadcasti32x2_512: ; CHECK: ## BB#0: ; CHECK-NEXT: kmovw %edi, %k1 -; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm1 = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] -; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm2 = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] +; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm1 {%k1} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] +; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm2 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1] ; CHECK-NEXT: vpaddd %zmm2, %zmm1, %zmm1 ; CHECK-NEXT: vpaddd %zmm0, %zmm1, %zmm0 diff --git a/llvm/test/CodeGen/X86/avx512dqvl-intrinsics.ll b/llvm/test/CodeGen/X86/avx512dqvl-intrinsics.ll index 0801c6a..9d777b5 100644 --- a/llvm/test/CodeGen/X86/avx512dqvl-intrinsics.ll +++ b/llvm/test/CodeGen/X86/avx512dqvl-intrinsics.ll @@ -652,9 +652,9 @@ define <8 x float>@test_int_x86_avx512_mask_broadcastf32x2_256(<4 x float> %x0, ; CHECK: ## BB#0: ; CHECK-NEXT: kmovb %edi, %k1 ## encoding: [0xc5,0xf9,0x92,0xcf] ; CHECK-NEXT: vbroadcastf32x2 %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x19,0xc8] -; CHECK-NEXT: ## ymm1 = xmm0[0,1,0,1,0,1,0,1] +; CHECK-NEXT: ## ymm1 {%k1} = xmm0[0,1,0,1,0,1,0,1] ; CHECK-NEXT: vbroadcastf32x2 %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x19,0xd0] -; CHECK-NEXT: ## ymm2 = xmm0[0,1,0,1,0,1,0,1] +; CHECK-NEXT: ## ymm2 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1] ; CHECK-NEXT: vbroadcastf32x2 %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x19,0xc0] ; CHECK-NEXT: ## ymm0 = xmm0[0,1,0,1,0,1,0,1] ; CHECK-NEXT: vaddps %ymm2, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0x74,0x28,0x58,0xca] @@ -675,9 +675,9 @@ define <8 x i32>@test_int_x86_avx512_mask_broadcasti32x2_256(<4 x i32> %x0, <8 x ; CHECK: ## BB#0: ; CHECK-NEXT: kmovb %edi, %k1 ## encoding: [0xc5,0xf9,0x92,0xcf] ; CHECK-NEXT: vbroadcasti32x2 (%rsi), %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x59,0x0e] -; CHECK-NEXT: ## ymm1 = mem[0,1,0,1,0,1,0,1] +; CHECK-NEXT: ## ymm1 {%k1} = mem[0,1,0,1,0,1,0,1] ; CHECK-NEXT: vbroadcasti32x2 %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x59,0xd0] -; CHECK-NEXT: ## ymm2 = xmm0[0,1,0,1,0,1,0,1] +; CHECK-NEXT: ## ymm2 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1] ; CHECK-NEXT: vbroadcasti32x2 %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x59,0xc0] ; CHECK-NEXT: ## ymm0 = xmm0[0,1,0,1,0,1,0,1] ; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6d,0x28,0xfe,0xc0]