https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87354
Bug ID: 87354 Summary: x86-64: 16- and 32-byte register variables cannot be put in XMM16/YMM16 and up without -mavx512vl Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jbeulich at novell dot com Target Milestone: --- The same issue had been present in gas, but was corrected by commit 6e041cf4b0: YMM (and of course also XMM) registers can certainly be used with AVX512F alone, just that the set of insns is pretty limited. I realize that making this work may not be a trivial change, as assumptions to this effect appear to be made all over the place, but this code should imo compile (and assemble) fine with just -mavx512f, while currently only the first function compiles without error (QI mode vectors have been used just for simplicity and to make things look reasonably uniform): asm(".arch generic64"); asm(".arch .avx512f"); typedef char __attribute__((vector_size(64))) v64qi_t; typedef char __attribute__((vector_size(16))) v16qi_t; typedef char __attribute__((vector_size(32))) v32qi_t; v64qi_t test512(v64qi_t x) { register v64qi_t y asm("zmm16"); asm("vmovdqa32 %1,%0" : "=v" (y) : "v" (x)); return y; } v16qi_t test128(v64qi_t x) { register v16qi_t y asm("xmm16"); asm("vpmovqw %1,%0" : "=v" (y) : "v" (x)); return y; } v32qi_t test256(v64qi_t x) { register v32qi_t y asm("ymm16"); asm("vpmovqd %1,%0" : "=v" (y) : "v" (x)); return y; }