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

            Bug ID: 70028
           Summary: Error: operand size mismatch for `kmovw' (wrong
                    assembly generated) with -mavx512bw -masm=intel
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: assemble-failure
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

Created attachment 37832
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37832&action=edit
reduced testcase

Compiler output:
$ gcc -O2 -fno-forward-propagate -mavx512bw -masm=intel testcase.c
/tmp/ccxxiwnV.s: Assembler messages:
/tmp/ccxxiwnV.s:78: Error: operand size mismatch for `kmovw'

@@ -75,7 +75,7 @@
        mov     rdx, QWORD PTR [rsp+16]
        mov     rcx, QWORD PTR [rsp+24]
        call    __modti3
-       kmovw   k0, DWORD PTR [rsp+62]
+       kmovw   k0, WORD PTR [rsp+62]
        kmovw   edi, k0
        add     rax, r13
        adc     rdx, r14

fixes the assembly (results in the same binary image as with -masm=att)

Reply via email to