https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Looks like gas bug to me:
vpgatherqq      8(,%ymm1,1), %ymm0{%k2}
vpgatherqq      8(%rcx,%ymm1,1), %ymm0{%k2}
vpgatherqq      %ymm2, 8(,%ymm1,1), %ymm0
vpgatherqq      %ymm2, 8(%rcx,%ymm1,1), %ymm0
when assembled with gas and objdump -d:
   0:   62 f2 fd 2a 91 04 0d    vpgatherqq 0x1(,%ymm1,1),%ymm0{%k2}
   7:   01 00 00 00 
   b:   62 f2 fd 2a 91 44 09    vpgatherqq 0x8(%rcx,%ymm1,1),%ymm0{%k2}
  12:   01 
  13:   c4 e2 ed 91 04 0d 08    vpgatherqq %ymm2,0x8(,%ymm1,1),%ymm0
  1a:   00 00 00 
  1d:   c4 e2 ed 91 44 09 08    vpgatherqq %ymm2,0x8(%rcx,%ymm1,1),%ymm0
while when assembled with clang and objdump -d:
   0:   62 f2 fd 2a 91 04 0d    vpgatherqq 0x8(,%ymm1,1),%ymm0{%k2}
   7:   08 00 00 00 
   b:   62 f2 fd 2a 91 44 09    vpgatherqq 0x8(%rcx,%ymm1,1),%ymm0{%k2}
  12:   01 
  13:   c4 e2 ed 91 04 0d 08    vpgatherqq %ymm2,0x8(,%ymm1,1),%ymm0
  1a:   00 00 00 
  1d:   c4 e2 ed 91 44 09 08    vpgatherqq %ymm2,0x8(%rcx,%ymm1,1),%ymm0
But trying current binutils trunk assembles it correctly too:
   0:   62 f2 fd 2a 91 04 0d    vpgatherqq 0x8(,%ymm1,1),%ymm0{%k2}
   7:   08 00 00 00 
   b:   62 f2 fd 2a 91 44 09    vpgatherqq 0x8(%rcx,%ymm1,1),%ymm0{%k2}
  12:   01 
  13:   c4 e2 ed 91 04 0d 08    vpgatherqq %ymm2,0x8(,%ymm1,1),%ymm0
  1a:   00 00 00 
  1d:   c4 e2 ed 91 44 09 08    vpgatherqq %ymm2,0x8(%rcx,%ymm1,1),%ymm0
That said, strangely even current binutils trunk doesn't have any test coverage
for the EVEX encoded v*gather* instructions with no base register (i.e.
disp(,%[xyz]mm*,*) ) while it has coverage for such AVX2 gathers.

Reply via email to