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 tree-optimization/64365] [4.9/5 Regression] Predictive commoning after loop vectorization produces incorrect code.
Date: Wed, 14 Jan 2015 12:44:00 -0000	[thread overview]
Message-ID: <bug-64365-4-4cgupc1zlJ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64365-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.9.2                       |4.8.3
            Summary|[5 Regression] Predictive   |[4.9/5 Regression]
                   |commoning after loop        |Predictive commoning after
                   |vectorization produces      |loop vectorization produces
                   |incorrect code.             |incorrect code.
      Known to fail|                            |4.9.2

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Testcase that also fails on the 4.9 branch:

extern void abort (void);
extern int memcmp (const void * , const void *, __SIZE_TYPE__);

void __attribute__((noinline,noclone))
foo(int *in)
{
  int i;
  for (i = 62; i >= 10; i--)
    {
      in[i - 8] -= in[i];
      in[i - 5] += in[i] * 2;
      in[i - 4] += in[i];
    }
}

int main()
{
  int x[64];
  int y[64] = { 0, 1, -2380134, -1065336, -1026376, 3264240, 3113534, 2328130,
3632054, 3839634, 2380136, 1065339, 1026380, 1496037, 1397286, 789976, 386408,
450984, 597112, 497464, 262008, 149184, 194768, 231519, 173984, 87753, 60712,
82042, 87502, 60014, 30050, 25550, 33570, 32386, 20464, 10675, 10868, 13329,
11794, 6892, 3988, 4564, 5148, 4228, 2284, 1568, 1848, 1943, 1472, 741, 628,
702, 714, 474, 230, 234, 238, 242, 120, 59, 60, 61, 62, 63 };
  int i;

  for (i = 0; i < 64; ++i)
    {
      x[i] = i;
      __asm__ volatile ("");
    }

  foo (x);

  if (memcmp (x, y, sizeof (x)) != 0)
    abort ();

  return 0;
}


  parent reply	other threads:[~2015-01-14 12:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20  0:25 [Bug tree-optimization/64365] New: " congh at google dot com
2015-01-13 22:15 ` [Bug tree-optimization/64365] " congh at google dot com
2015-01-14  9:00 ` rguenth at gcc dot gnu.org
2015-01-14 12:14 ` rguenth at gcc dot gnu.org
2015-01-14 12:15 ` [Bug tree-optimization/64365] [5 Regression] " rguenth at gcc dot gnu.org
2015-01-14 12:36 ` jakub at gcc dot gnu.org
2015-01-14 12:44 ` rguenth at gcc dot gnu.org [this message]
2015-01-14 13:27 ` [Bug tree-optimization/64365] [4.9/5 " rguenth at gcc dot gnu.org
2015-01-15  8:41 ` rguenth at gcc dot gnu.org
2015-01-15 10:31 ` [Bug tree-optimization/64365] [4.9 " rguenth at gcc dot gnu.org
2015-01-15 18:15 ` congh at google dot com
2015-01-22 22:59 ` brooks at gcc dot gnu.org
2015-01-23  9:13 ` rguenther at suse dot de
2015-01-29 19:58 ` brooks at gcc dot gnu.org
2015-01-30  3:25 ` brooks at gcc dot gnu.org
2015-02-19 14:14 ` rguenth at gcc dot gnu.org
2015-02-19 14:14 ` rguenth 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-64365-4-4cgupc1zlJ@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: link
Be 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).