https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89040
Bug ID: 89040 Summary: Wrong code with -mno-mmx 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: x86-64 [hjl@gnu-cfl-1 gcc]$ cat /tmp/3.i typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); typedef int __m64_u __attribute__ ((__vector_size__ (8), __may_alias__, __aligned__ (1))); typedef int __v2si __attribute__ ((__vector_size__ (8))); typedef short __v4hi __attribute__ ((__vector_size__ (8))); typedef char __v8qi __attribute__ ((__vector_size__ (8))); typedef long long __v1di __attribute__ ((__vector_size__ (8))); typedef float __v2sf __attribute__ ((__vector_size__ (8))); int foo3b (__m64 __i) { return ((__v2si)__i)[0]; } [hjl@gnu-cfl-1 gcc]$ ./xgcc -B./ -S -O2 /tmp/3.i -mno-mmx [hjl@gnu-cfl-1 gcc]$ cat 3.s .file "3.i" .text .p2align 4 .globl foo3b .type foo3b, @function foo3b: .LFB0: .cfi_startproc movq %xmm0, %rax <<<<<<<< This should be "movd %xmm0, %eax". ret .cfi_endproc .LFE0: .size foo3b, .-foo3b .ident "GCC: (GNU) 9.0.1 20190123 (experimental)" .section .note.GNU-stack,"",@progbits [hjl@gnu-cfl-1 gcc]$