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 middle-end/52584] New: Fails to constant fold vector upper/lower half BIT_FIELD_REFs Date: Wed, 14 Mar 2012 13:01:00 -0000 [thread overview] Message-ID: <bug-52584-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52584 Bug #: 52584 Summary: Fails to constant fold vector upper/lower half BIT_FIELD_REFs Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: middle-end AssignedTo: rguenth@gcc.gnu.org ReportedBy: rguenth@gcc.gnu.org Target: x86_64-*-* int main() { int a = 1; typedef int v4si __attribute__ ((vector_size (8 * sizeof(int)))); v4si x; v4si y; y = x + a; foo(y); return 0; } shows a missed optimization in how we fold BIT_FIELD_REFs that select the upper/lower part of a vector: <bb 2>: D.1719_9 = BIT_FIELD_REF <x_4(D), 128, 0>; D.1721_10 = BIT_FIELD_REF <{ 1, 1, 1, 1, 1, 1, 1, 1 }, 128, 0>; D.1722_11 = D.1719_9 + D.1721_10; D.1723_12 = BIT_FIELD_REF <x_4(D), 128, 128>; D.1725_13 = BIT_FIELD_REF <{ 1, 1, 1, 1, 1, 1, 1, 1 }, 128, 128>; D.1726_14 = D.1723_12 + D.1725_13; y_5 = {D.1722_11, D.1726_14}; foo (y_5); return 0; we should have constant-folded D.1721_10 and D.1725_13.
next reply other threads:[~2012-03-14 12:57 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-14 13:01 rguenth at gcc dot gnu.org [this message] 2012-03-14 15:35 ` [Bug middle-end/52584] " rguenth at gcc dot gnu.org 2012-03-16 13:33 ` rguenth at gcc dot gnu.org 2012-03-16 14:54 ` rguenth at gcc dot gnu.org 2012-03-16 18:46 ` rguenth at gcc dot gnu.org 2012-05-19 7:59 ` davem at gcc dot gnu.org
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-52584-4@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).