This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Jan 2015 08:52:20 +0000
- Subject: [Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3
- Auto-submitted: auto-generated
- References: <bug-59354-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Summary|[4.8/4.9/5/Regression] |[4.8/4.9/5 Regression]
|Element swizzling produces |Element swizzling produces
|invalid result with -O3 |invalid result with -O3
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to UroÅ Bizjak from comment #3)
> It looks to me that cunrolli pass is messing up element swizzling code.
>
> bisection-friendly C testcase:
>
> --cut here--
> void abort (void);
>
> unsigned int a[256];
> unsigned char b[256];
>
> int main()
> {
> int i, z, x, y;
>
> for(i = 0; i < 256; i++)
> a[i] = i % 5;
>
> for (z = 0; z < 16; z++)
> for (y = 0; y < 4; y++)
> for (x = 0; x < 4; x++)
> b[y*64 + z*4 + x] = a[z*16 + y*4 + x];
>
> if (b[4] != 1)
> abort ();
>
> return 0;
> }
> --cut here--
This testcase works for me on trunk now (maybe one of my recent vectorizer
fixes) but it miscompiles on the 4.9 and 4.8 branches (4.7 seems to work).
Maybe somebody can bisect what fixed it on trunk? (and confirm the bug is
indeed gone on trunk)