https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88522
Bug ID: 88522 Summary: Error: operand size mismatch for `vpgatherqq' Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: ubizjak at gmail dot com Target Milestone: --- Target: i386,x86-64 With binutils 2.32, I got [hjl@gnu-skx-1 gcc]$ /export/users/hjl/build/gnu/tools-build/gcc-32bit/build-i686-linux/gcc/xgcc -B/export/users/hjl/build/gnu/tools-build/gcc-32bit/build-i686-linux/gcc/ -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -Ofast -mavx512vl -masm=intel -c -o avx512vl-pr79299-2.o /export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/avx512vl-pr79299-2.c -m32 /tmp/ccptGe0Q.s: Assembler messages: /tmp/ccptGe0Q.s:18: Error: operand size mismatch for `vgatherdps' /tmp/ccptGe0Q.s:43: Error: operand size mismatch for `vgatherdps' /tmp/ccptGe0Q.s:67: Error: operand size mismatch for `vgatherdpd' /tmp/ccptGe0Q.s:92: Error: operand size mismatch for `vgatherdpd' /tmp/ccptGe0Q.s:116: Error: operand size mismatch for `vgatherqps' /tmp/ccptGe0Q.s:141: Error: operand size mismatch for `vgatherqps' /tmp/ccptGe0Q.s:165: Error: operand size mismatch for `vgatherqpd' /tmp/ccptGe0Q.s:190: Error: operand size mismatch for `vgatherqpd' /tmp/ccptGe0Q.s:213: Error: operand size mismatch for `vpgatherdd' /tmp/ccptGe0Q.s:238: Error: operand size mismatch for `vpgatherdd' /tmp/ccptGe0Q.s:262: Error: operand size mismatch for `vpgatherdq' /tmp/ccptGe0Q.s:287: Error: operand size mismatch for `vpgatherdq' /tmp/ccptGe0Q.s:311: Error: operand size mismatch for `vpgatherqd' /tmp/ccptGe0Q.s:336: Error: operand size mismatch for `vpgatherqd' /tmp/ccptGe0Q.s:360: Error: operand size mismatch for `vpgatherqq' /tmp/ccptGe0Q.s:385: Error: operand size mismatch for `vpgatherqq' /tmp/ccptGe0Q.s:410: Error: operand size mismatch for `vgatherdps' /tmp/ccptGe0Q.s:429: Error: operand size mismatch for `vgatherdps' /tmp/ccptGe0Q.s:451: Error: operand size mismatch for `vgatherdpd' /tmp/ccptGe0Q.s:470: Error: operand size mismatch for `vgatherdpd' /tmp/ccptGe0Q.s:492: Error: operand size mismatch for `vgatherqps' /tmp/ccptGe0Q.s:512: Error: operand size mismatch for `vgatherqps' /tmp/ccptGe0Q.s:534: Error: operand size mismatch for `vgatherqpd' /tmp/ccptGe0Q.s:553: Error: operand size mismatch for `vgatherqpd' /tmp/ccptGe0Q.s:575: Error: operand size mismatch for `vpgatherdd' /tmp/ccptGe0Q.s:594: Error: operand size mismatch for `vpgatherdd' /tmp/ccptGe0Q.s:616: Error: operand size mismatch for `vpgatherdq' /tmp/ccptGe0Q.s:635: Error: operand size mismatch for `vpgatherdq' /tmp/ccptGe0Q.s:657: Error: operand size mismatch for `vpgatherqd' /tmp/ccptGe0Q.s:677: Error: operand size mismatch for `vpgatherqd' /tmp/ccptGe0Q.s:699: Error: operand size mismatch for `vpgatherqq' /tmp/ccptGe0Q.s:718: Error: operand size mismatch for `vpgatherqq' /tmp/ccptGe0Q.s:739: Error: operand size mismatch for `vgatherdps' /tmp/ccptGe0Q.s:756: Error: operand size mismatch for `vgatherdps' /tmp/ccptGe0Q.s:776: Error: operand size mismatch for `vgatherdpd' /tmp/ccptGe0Q.s:793: Error: operand size mismatch for `vgatherdpd' /tmp/ccptGe0Q.s:813: Error: operand size mismatch for `vgatherqps' /tmp/ccptGe0Q.s:831: Error: operand size mismatch for `vgatherqps' /tmp/ccptGe0Q.s:851: Error: operand size mismatch for `vgatherqpd' /tmp/ccptGe0Q.s:868: Error: operand size mismatch for `vgatherqpd' /tmp/ccptGe0Q.s:888: Error: operand size mismatch for `vpgatherdd' /tmp/ccptGe0Q.s:905: Error: operand size mismatch for `vpgatherdd' /tmp/ccptGe0Q.s:925: Error: operand size mismatch for `vpgatherdq' /tmp/ccptGe0Q.s:942: Error: operand size mismatch for `vpgatherdq' /tmp/ccptGe0Q.s:962: Error: operand size mismatch for `vpgatherqd' /tmp/ccptGe0Q.s:980: Error: operand size mismatch for `vpgatherqd' /tmp/ccptGe0Q.s:1000: Error: operand size mismatch for `vpgatherqq' /tmp/ccptGe0Q.s:1017: Error: operand size mismatch for `vpgatherqq' [hjl@gnu-skx-1 gcc]$ We have [hjl@gnu-skx-1 gcc]$ cat x.s .intel_syntax noprefix vpgatherdd xmm0{k1}, XMMWORD PTR [eax+xmm1*1] vpgatherdd ymm0{k1}, YMMWORD PTR [eax+ymm1*1] vpgatherdd zmm1{k1}, ZMMWORD PTR [eax+zmm0*1] vpgatherdq xmm0{k1}, XMMWORD PTR [eax+xmm1*1] vpgatherdq ymm0{k1}, YMMWORD PTR [eax+xmm1*1] vpgatherdq zmm1{k1}, ZMMWORD PTR [eax+ymm0*1] vpgatherqd xmm0{k1}, QWORD PTR [eax+xmm1*1] vpgatherqd xmm0{k1}, XMMWORD PTR [eax+ymm1*1] vpgatherqd ymm1{k1}, YMMWORD PTR [eax+zmm0*1] vpgatherqd ymm2{k1}, YMMWORD PTR [edx+zmm1*1] vpgatherqq xmm0{k1}, XMMWORD PTR [eax+xmm1*1] vpgatherqq ymm0{k1}, YMMWORD PTR [eax+ymm1*1] vpgatherqq zmm2{k1}, ZMMWORD PTR [edx+zmm1*1] [hjl@gnu-skx-1 gcc]$ gcc -m32 -c x.s x.s: Assembler messages: x.s:2: Error: operand size mismatch for `vpgatherdd' x.s:3: Error: operand size mismatch for `vpgatherdd' x.s:4: Error: operand size mismatch for `vpgatherdd' x.s:5: Error: operand size mismatch for `vpgatherdq' x.s:6: Error: operand size mismatch for `vpgatherdq' x.s:7: Error: operand size mismatch for `vpgatherdq' x.s:8: Error: operand size mismatch for `vpgatherqd' x.s:9: Error: operand size mismatch for `vpgatherqd' x.s:10: Error: operand size mismatch for `vpgatherqd' x.s:11: Error: operand size mismatch for `vpgatherqd' x.s:12: Error: operand size mismatch for `vpgatherqq' x.s:13: Error: operand size mismatch for `vpgatherqq' x.s:14: Error: operand size mismatch for `vpgatherqq' [hjl@gnu-skx-1 gcc]$ GCC should generate: [hjl@gnu-skx-1 gcc]$ cat y.s .intel_syntax noprefix vpgatherdd xmm0{k1}, DWORD PTR [eax+xmm1*1] vpgatherdd ymm0{k1}, DWORD PTR [eax+ymm1*1] vpgatherdd zmm1{k1}, DWORD PTR [eax+zmm0*1] vpgatherdq xmm0{k1}, QWORD PTR [eax+xmm1*1] vpgatherdq ymm0{k1}, QWORD PTR [eax+xmm1*1] vpgatherdq zmm1{k1}, QWORD PTR [eax+ymm0*1] vpgatherqd xmm0{k1}, DWORD PTR [eax+xmm1*1] vpgatherqd xmm0{k1}, DWORD PTR [eax+ymm1*1] vpgatherqd ymm1{k1}, DWORD PTR [eax+zmm0*1] vpgatherqd ymm2{k1}, DWORD PTR [edx+zmm1*1] vpgatherqq xmm0{k1}, QWORD PTR [eax+xmm1*1] vpgatherqq ymm0{k1}, QWORD PTR [eax+ymm1*1] vpgatherqq zmm2{k1}, QWORD PTR [edx+zmm1*1] [hjl@gnu-skx-1 gcc]$ gcc -c -m32 y.s That is DWORD for 'd' suffix and QWORD for 'q' suffix.