llvm.org GIT mirror llvm / 4ad0017
[X86][AVX512] Add support for VPERMPD/VPERMQ masked shuffle comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274469 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 4 years ago
3 changed file(s) with 24 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
130130 CASE_AVX512_INS_COMMON(Inst, Z, src##i) \
131131 CASE_AVX512_INS_COMMON(Inst, Z256, src##i) \
132132 CASE_AVX_INS_COMMON(Inst, Y, src##i)
133
134 #define CASE_MASK_VPERM(Inst, src) \
135 CASE_MASK_INS_COMMON(Inst, Z, src##i) \
136 CASE_MASK_INS_COMMON(Inst, Z256, src##i)
137
138 #define CASE_MASKZ_VPERM(Inst, src) \
139 CASE_MASKZ_INS_COMMON(Inst, Z, src##i) \
140 CASE_MASKZ_INS_COMMON(Inst, Z256, src##i)
133141
134142 #define CASE_VSHUF(Inst, src) \
135143 CASE_AVX512_INS_COMMON(SHUFF##Inst, Z, r##src##i) \
260268 CASE_MASKZ_VPERMILPI(PSHUFHW, r)
261269 CASE_MASKZ_VPERMILPI(PSHUFLW, m)
262270 CASE_MASKZ_VPERMILPI(PSHUFLW, r)
271 CASE_MASKZ_VPERM(PERMPD, m)
272 CASE_MASKZ_VPERM(PERMPD, r)
273 CASE_MASKZ_VPERM(PERMQ, m)
274 CASE_MASKZ_VPERM(PERMQ, r)
263275 CASE_MASKZ_VSHUF(64X2, m)
264276 CASE_MASKZ_VSHUF(64X2, r)
265277 CASE_MASKZ_VSHUF(32X4, m)
321333 CASE_MASK_VPERMILPI(PSHUFHW, r)
322334 CASE_MASK_VPERMILPI(PSHUFLW, m)
323335 CASE_MASK_VPERMILPI(PSHUFLW, r)
336 CASE_MASK_VPERM(PERMPD, m)
337 CASE_MASK_VPERM(PERMPD, r)
338 CASE_MASK_VPERM(PERMQ, m)
339 CASE_MASK_VPERM(PERMQ, r)
324340 CASE_MASK_VSHUF(64X2, m)
325341 CASE_MASK_VSHUF(64X2, r)
326342 CASE_MASK_VSHUF(32X4, m)
63516351 ; CHECK-LABEL: test_int_x86_avx512_mask_perm_df_512:
63526352 ; CHECK: ## BB#0:
63536353 ; CHECK-NEXT: kmovw %esi, %k1
6354 ; CHECK-NEXT: vpermpd {{.*#+}} zmm1 = zmm0[3,0,0,0,7,4,4,4]
6355 ; CHECK-NEXT: vpermpd {{.*#+}} zmm2 = zmm0[3,0,0,0,7,4,4,4]
6354 ; CHECK-NEXT: vpermpd {{.*#+}} zmm1 {%k1} = zmm0[3,0,0,0,7,4,4,4]
6355 ; CHECK-NEXT: vpermpd {{.*#+}} zmm2 {%k1} {z} = zmm0[3,0,0,0,7,4,4,4]
63566356 ; CHECK-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,0,0,0,7,4,4,4]
63576357 ; CHECK-NEXT: vaddpd %zmm2, %zmm1, %zmm1
63586358 ; CHECK-NEXT: vaddpd %zmm0, %zmm1, %zmm0
63716371 ; CHECK-LABEL: test_int_x86_avx512_mask_perm_di_512:
63726372 ; CHECK: ## BB#0:
63736373 ; CHECK-NEXT: kmovw %esi, %k1
6374 ; CHECK-NEXT: vpermq {{.*#+}} zmm1 = zmm0[3,0,0,0,7,4,4,4]
6375 ; CHECK-NEXT: vpermq {{.*#+}} zmm2 = zmm0[3,0,0,0,7,4,4,4]
6374 ; CHECK-NEXT: vpermq {{.*#+}} zmm1 {%k1} = zmm0[3,0,0,0,7,4,4,4]
6375 ; CHECK-NEXT: vpermq {{.*#+}} zmm2 {%k1} {z} = zmm0[3,0,0,0,7,4,4,4]
63766376 ; CHECK-NEXT: vpermq {{.*#+}} zmm0 = zmm0[3,0,0,0,7,4,4,4]
63776377 ; CHECK-NEXT: vpaddq %zmm2, %zmm1, %zmm1
63786378 ; CHECK-NEXT: vpaddq %zmm0, %zmm1, %zmm0
80758075 ; CHECK: ## BB#0:
80768076 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
80778077 ; CHECK-NEXT: vpermpd $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf3,0xfd,0x29,0x01,0xc8,0x03]
8078 ; CHECK-NEXT: ## ymm1 = ymm0[3,0,0,0]
8078 ; CHECK-NEXT: ## ymm1 {%k1} = ymm0[3,0,0,0]
80798079 ; CHECK-NEXT: vpermpd $3, %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf3,0xfd,0xa9,0x01,0xd0,0x03]
8080 ; CHECK-NEXT: ## ymm2 = ymm0[3,0,0,0]
8080 ; CHECK-NEXT: ## ymm2 {%k1} {z} = ymm0[3,0,0,0]
80818081 ; CHECK-NEXT: vpermpd $3, %ymm0, %ymm0 ## encoding: [0x62,0xf3,0xfd,0x28,0x01,0xc0,0x03]
80828082 ; CHECK-NEXT: ## ymm0 = ymm0[3,0,0,0]
80838083 ; CHECK-NEXT: vaddpd %ymm2, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0xf5,0x28,0x58,0xca]
80988098 ; CHECK: ## BB#0:
80998099 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
81008100 ; CHECK-NEXT: vpermq $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf3,0xfd,0x29,0x00,0xc8,0x03]
8101 ; CHECK-NEXT: ## ymm1 = ymm0[3,0,0,0]
8101 ; CHECK-NEXT: ## ymm1 {%k1} = ymm0[3,0,0,0]
81028102 ; CHECK-NEXT: vpermq $3, %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf3,0xfd,0xa9,0x00,0xd0,0x03]
8103 ; CHECK-NEXT: ## ymm2 = ymm0[3,0,0,0]
8103 ; CHECK-NEXT: ## ymm2 {%k1} {z} = ymm0[3,0,0,0]
81048104 ; CHECK-NEXT: vpermq $3, %ymm0, %ymm0 ## encoding: [0x62,0xf3,0xfd,0x28,0x00,0xc0,0x03]
81058105 ; CHECK-NEXT: ## ymm0 = ymm0[3,0,0,0]
81068106 ; CHECK-NEXT: vpaddq %ymm2, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0xf5,0x28,0xd4,0xca]