public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66866] [miscompile] incorrect load address on manual vector shuffle Date: Tue, 14 Jul 2015 12:26:00 -0000 [thread overview] Message-ID: <bug-66866-4-gPrYmYKwAa@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-66866-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66866 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- More reduced, fails at -O1: extern "C" void abort (void); typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); typedef short A __attribute__((__may_alias__)); __m128i __attribute__((noinline)) shuf(const __m128i v) { __m128i r; reinterpret_cast<A *>(&r)[5] = reinterpret_cast<const A *>(&v)[4]; return r; } int main() { __attribute__((aligned(16))) short mem[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; *reinterpret_cast<__m128i *>(mem) = shuf (*reinterpret_cast<__m128i *>(mem)); if (mem[5] != 4) abort (); return 0; } _Z4shufDv2_x: .LFB527: .cfi_startproc movaps %xmm0, -24(%rsp) pxor %xmm0, %xmm0 pinsrw $5, -24(%rsp), %xmm0 ret
next prev parent reply other threads:[~2015-07-14 12:26 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-07-14 10:38 [Bug target/66866] New: " kretz at kde dot org 2015-07-14 12:14 ` [Bug target/66866] " rguenth at gcc dot gnu.org 2015-07-14 12:26 ` rguenth at gcc dot gnu.org [this message] 2015-07-14 12:45 ` rguenth at gcc dot gnu.org 2015-07-14 12:47 ` rguenth at gcc dot gnu.org 2015-07-14 12:51 ` rguenth at gcc dot gnu.org 2015-07-15 9:05 ` ubizjak at gmail dot com 2015-07-15 22:20 ` uros at gcc dot gnu.org 2015-07-15 22:23 ` [Bug target/66866] [4.9/5 Regression] " ubizjak at gmail dot com 2015-07-17 20:25 ` uros at gcc dot gnu.org 2015-07-17 21:40 ` uros at gcc dot gnu.org 2015-07-17 21:41 ` ubizjak at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-66866-4-gPrYmYKwAa@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).