http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819
Bug ID: 60819 Summary: dse1 removing not-dead insn (aliasing issue?) Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target: x86_64-linux-gnu #include <mmintrin.h> int f (__m64 const __A, int const __N) { return ((__v4hi)__A)[__N]; } compiler with -O2, produces: movslq %edi, %rdi movswl -8(%rsp,%rdi,2), %eax ret dse1 removed the instruction that copies xmm0 to the stack! Could be related to PR 56965, I didn't try the patch in that PR. Already broken in gcc-4.6, not a (recent) regression.