https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104974
Bug ID: 104974 Summary: [avx512fp16] Error: operand type mismatch for `vmovw' Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: crazylht at gmail dot com Target Milestone: --- cat test.c short foo (short a) { register short b __asm ("%xmm1") = a; asm volatile ("": "+v" (b)); register short c __asm ("%xmm2") = b; asm volatile ("": "+v" (c)); return a; } foo(short): mov eax, edi vmovw xmm1, edi vmovw xmm2, xmm1 ret To move HImode from sse reg to sse reg under avx512fp16, vmovsh should be used instead of vmovw.