llvm.org GIT mirror llvm / 1b4de08
[AVX512] Fix shuffle comment printing for EVEX encoded PSHUFD, PSHUFHW, and PSHUFLW. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271628 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
4 changed file(s) with 42 addition(s) and 42 deletion(s). Raw diff Collapse all Expand all
6161 CASE_AVX_INS_COMMON(Inst, Y, r##src) \
6262 CASE_SSE_INS_COMMON(Inst, r##src)
6363
64 #define CASE_SHUF(Inst, src) \
65 CASE_AVX512_INS_COMMON(Inst, Z, r##src##i) \
66 CASE_AVX512_INS_COMMON(Inst, Z256, r##src##i) \
67 CASE_AVX512_INS_COMMON(Inst, Z128, r##src##i) \
68 CASE_AVX_INS_COMMON(Inst, , r##src##i) \
69 CASE_AVX_INS_COMMON(Inst, Y, r##src##i) \
70 CASE_SSE_INS_COMMON(Inst, r##src##i)
64 #define CASE_SHUF(Inst, suf) \
65 CASE_AVX512_INS_COMMON(Inst, Z, suf) \
66 CASE_AVX512_INS_COMMON(Inst, Z256, suf) \
67 CASE_AVX512_INS_COMMON(Inst, Z128, suf) \
68 CASE_AVX_INS_COMMON(Inst, , suf) \
69 CASE_AVX_INS_COMMON(Inst, Y, suf) \
70 CASE_SSE_INS_COMMON(Inst, suf)
7171
7272 #define CASE_VPERM(Inst, src) \
7373 CASE_AVX512_INS_COMMON(Inst, Z, src##i) \
357357 ShuffleMask);
358358 break;
359359
360 case X86::PSHUFDri:
361 case X86::VPSHUFDri:
362 case X86::VPSHUFDYri:
363 Src1Name = getRegName(MI->getOperand(1).getReg());
364 // FALL THROUGH.
365 case X86::PSHUFDmi:
366 case X86::VPSHUFDmi:
367 case X86::VPSHUFDYmi:
360 CASE_SHUF(PSHUFD, ri)
361 Src1Name = getRegName(MI->getOperand(1).getReg());
362 // FALL THROUGH.
363 CASE_SHUF(PSHUFD, mi)
368364 DestName = getRegName(MI->getOperand(0).getReg());
369365 if (MI->getOperand(NumOperands - 1).isImm())
370366 DecodePSHUFMask(getRegOperandVectorVT(MI, MVT::i32, 0),
372368 ShuffleMask);
373369 break;
374370
375 case X86::PSHUFHWri:
376 case X86::VPSHUFHWri:
377 case X86::VPSHUFHWYri:
378 Src1Name = getRegName(MI->getOperand(1).getReg());
379 // FALL THROUGH.
380 case X86::PSHUFHWmi:
381 case X86::VPSHUFHWmi:
382 case X86::VPSHUFHWYmi:
371 CASE_SHUF(PSHUFHW, ri)
372 Src1Name = getRegName(MI->getOperand(1).getReg());
373 // FALL THROUGH.
374 CASE_SHUF(PSHUFHW, mi)
383375 DestName = getRegName(MI->getOperand(0).getReg());
384376 if (MI->getOperand(NumOperands - 1).isImm())
385377 DecodePSHUFHWMask(getRegOperandVectorVT(MI, MVT::i16, 0),
387379 ShuffleMask);
388380 break;
389381
390 case X86::PSHUFLWri:
391 case X86::VPSHUFLWri:
392 case X86::VPSHUFLWYri:
393 Src1Name = getRegName(MI->getOperand(1).getReg());
394 // FALL THROUGH.
395 case X86::PSHUFLWmi:
396 case X86::VPSHUFLWmi:
397 case X86::VPSHUFLWYmi:
382 CASE_SHUF(PSHUFLW, ri)
383 Src1Name = getRegName(MI->getOperand(1).getReg());
384 // FALL THROUGH.
385 CASE_SHUF(PSHUFLW, mi)
398386 DestName = getRegName(MI->getOperand(0).getReg());
399387 if (MI->getOperand(NumOperands - 1).isImm())
400388 DecodePSHUFLWMask(getRegOperandVectorVT(MI, MVT::i16, 0),
505493 DecodeUNPCKLMask(getRegOperandVectorVT(MI, MVT::i64, 0), ShuffleMask);
506494 break;
507495
508 CASE_SHUF(SHUFPD, r)
509 Src2Name = getRegName(MI->getOperand(2).getReg());
510 // FALL THROUGH.
511 CASE_SHUF(SHUFPD, m)
496 CASE_SHUF(SHUFPD, rri)
497 Src2Name = getRegName(MI->getOperand(2).getReg());
498 // FALL THROUGH.
499 CASE_SHUF(SHUFPD, rmi)
512500 if (MI->getOperand(NumOperands - 1).isImm())
513501 DecodeSHUFPMask(getRegOperandVectorVT(MI, MVT::f64, 0),
514502 MI->getOperand(NumOperands - 1).getImm(),
517505 DestName = getRegName(MI->getOperand(0).getReg());
518506 break;
519507
520 CASE_SHUF(SHUFPS, r)
521 Src2Name = getRegName(MI->getOperand(2).getReg());
522 // FALL THROUGH.
523 CASE_SHUF(SHUFPS, m)
508 CASE_SHUF(SHUFPS, rri)
509 Src2Name = getRegName(MI->getOperand(2).getReg());
510 // FALL THROUGH.
511 CASE_SHUF(SHUFPS, rmi)
524512 if (MI->getOperand(NumOperands - 1).isImm())
525513 DecodeSHUFPMask(getRegOperandVectorVT(MI, MVT::f32, 0),
526514 MI->getOperand(NumOperands - 1).getImm(),
64426442 ; CHECK-LABEL: test_int_x86_avx512_mask_pshuf_d_512:
64436443 ; CHECK: ## BB#0:
64446444 ; CHECK-NEXT: kmovw %esi, %k1
6445 ; CHECK-NEXT: vpshufd $3, %zmm0, %zmm1 {%k1}
6446 ; CHECK-NEXT: vpshufd $3, %zmm0, %zmm2 {%k1} {z}
6447 ; CHECK-NEXT: vpshufd $3, %zmm0, %zmm0
6445 ; CHECK-NEXT: vpshufd {{.*#+}} zmm1 = zmm1[3,0,0,0,7,4,4,4,11,8,8,8,15,12,12,12]
6446 ; CHECK-NEXT: vpshufd {{.*#+}} zmm2 = k1[3,0,0,0,7,4,4,4,11,8,8,8,15,12,12,12]
6447 ; CHECK-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[3,0,0,0,7,4,4,4,11,8,8,8,15,12,12,12]
64486448 ; CHECK-NEXT: vpaddd %zmm2, %zmm1, %zmm1
64496449 ; CHECK-NEXT: vpaddd %zmm0, %zmm1, %zmm0
64506450 ; CHECK-NEXT: retq
59865986 ; CHECK: ## BB#0:
59875987 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
59885988 ; CHECK-NEXT: vpshufhw $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0x70,0xc8,0x03]
5989 ; CHECK-NEXT: ## xmm1 = xmm1[0,1,2,3,7,4,4,4]
59895990 ; CHECK-NEXT: vpshufhw $3, %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0x89,0x70,0xd0,0x03]
5991 ; CHECK-NEXT: ## xmm2 = k1[0,1,2,3,7,4,4,4]
59905992 ; CHECK-NEXT: vpshufhw $3, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x70,0xc0,0x03]
59915993 ; CHECK-NEXT: ## xmm0 = xmm0[0,1,2,3,7,4,4,4]
59925994 ; CHECK-NEXT: vpaddw %xmm2, %xmm1, %xmm1 ## encoding: [0x62,0xf1,0x75,0x08,0xfd,0xca]
60076009 ; CHECK: ## BB#0:
60086010 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
60096011 ; CHECK-NEXT: vpshufhw $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0x70,0xc8,0x03]
6012 ; CHECK-NEXT: ## ymm1 = ymm1[0,1,2,3,7,4,4,4,8,9,10,11,15,12,12,12]
60106013 ; CHECK-NEXT: vpshufhw $3, %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0xa9,0x70,0xd0,0x03]
6014 ; CHECK-NEXT: ## ymm2 = k1[0,1,2,3,7,4,4,4,8,9,10,11,15,12,12,12]
60116015 ; CHECK-NEXT: vpshufhw $3, %ymm0, %ymm0 ## encoding: [0xc5,0xfe,0x70,0xc0,0x03]
60126016 ; CHECK-NEXT: ## ymm0 = ymm0[0,1,2,3,7,4,4,4,8,9,10,11,15,12,12,12]
60136017 ; CHECK-NEXT: vpaddw %ymm2, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0x75,0x28,0xfd,0xca]
60286032 ; CHECK: ## BB#0:
60296033 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
60306034 ; CHECK-NEXT: vpshuflw $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7f,0x09,0x70,0xc8,0x03]
6035 ; CHECK-NEXT: ## xmm1 = xmm1[3,0,0,0,4,5,6,7]
60316036 ; CHECK-NEXT: vpshuflw $3, %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7f,0x89,0x70,0xd0,0x03]
6037 ; CHECK-NEXT: ## xmm2 = k1[3,0,0,0,4,5,6,7]
60326038 ; CHECK-NEXT: vpshuflw $3, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x70,0xc0,0x03]
60336039 ; CHECK-NEXT: ## xmm0 = xmm0[3,0,0,0,4,5,6,7]
60346040 ; CHECK-NEXT: vpaddw %xmm2, %xmm1, %xmm1 ## encoding: [0x62,0xf1,0x75,0x08,0xfd,0xca]
60496055 ; CHECK: ## BB#0:
60506056 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
60516057 ; CHECK-NEXT: vpshuflw $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7f,0x29,0x70,0xc8,0x03]
6058 ; CHECK-NEXT: ## ymm1 = ymm1[3,0,0,0,4,5,6,7,11,8,8,8,12,13,14,15]
60526059 ; CHECK-NEXT: vpshuflw $3, %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7f,0xa9,0x70,0xd0,0x03]
6060 ; CHECK-NEXT: ## ymm2 = k1[3,0,0,0,4,5,6,7,11,8,8,8,12,13,14,15]
60536061 ; CHECK-NEXT: vpshuflw $3, %ymm0, %ymm0 ## encoding: [0xc5,0xff,0x70,0xc0,0x03]
60546062 ; CHECK-NEXT: ## ymm0 = ymm0[3,0,0,0,4,5,6,7,11,8,8,8,12,13,14,15]
60556063 ; CHECK-NEXT: vpaddw %ymm2, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0x75,0x28,0xfd,0xca]
95519551 ; CHECK: ## BB#0:
95529552 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
95539553 ; CHECK-NEXT: vpshufd $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x70,0xc8,0x03]
9554 ; CHECK-NEXT: ## xmm1 = xmm1[3,0,0,0]
95549555 ; CHECK-NEXT: vpshufd $3, %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x70,0xd0,0x03]
9556 ; CHECK-NEXT: ## xmm2 = k1[3,0,0,0]
95559557 ; CHECK-NEXT: vpshufd $3, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x70,0xc0,0x03]
95569558 ; CHECK-NEXT: ## xmm0 = xmm0[3,0,0,0]
95579559 ; CHECK-NEXT: vpaddd %xmm2, %xmm1, %xmm1 ## encoding: [0x62,0xf1,0x75,0x08,0xfe,0xca]
95729574 ; CHECK: ## BB#0:
95739575 ; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
95749576 ; CHECK-NEXT: vpshufd $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x70,0xc8,0x03]
9577 ; CHECK-NEXT: ## ymm1 = ymm1[3,0,0,0,7,4,4,4]
95759578 ; CHECK-NEXT: vpshufd $3, %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x70,0xd0,0x03]
9579 ; CHECK-NEXT: ## ymm2 = k1[3,0,0,0,7,4,4,4]
95769580 ; CHECK-NEXT: vpshufd $3, %ymm0, %ymm0 ## encoding: [0xc5,0xfd,0x70,0xc0,0x03]
95779581 ; CHECK-NEXT: ## ymm0 = ymm0[3,0,0,0,7,4,4,4]
95789582 ; CHECK-NEXT: vpaddd %ymm2, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0x75,0x28,0xfe,0xca]