This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/70354] [6 Regression] Wrong code with -O3 -march=broadwell and -march=skylake-avx512.
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Mar 2016 13:17:03 +0000
- Subject: [Bug target/70354] [6 Regression] Wrong code with -O3 -march=broadwell and -march=skylake-avx512.
- Auto-submitted: auto-generated
- References: <bug-70354-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70354
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simplified testcase (-O2 -mavx2 works, -O3 -mavx2 fails, -O2 -ftree-vectorize
-mavx2 fails):
long long int b[64], c[64], g[64], h[64];
unsigned long long int a[64], d[64], e[64], f[64];
__attribute__ ((noinline, noclone)) void
foo (void)
{
int i;
for (i = 0; i < 64; i++)
{
d[i] = h[i] << (((((unsigned long long int) b[i] * e[i])
<< (-a[i] - 3752448776177690134ULL))
- 8214565720323784703ULL) - 1ULL);
e[i] = (_Bool) (f[i] + (unsigned long long int) g[i]);
g[i] = c[i];
}
}
int
main ()
{
int i;
for (i = 0; i < 64; ++i)
{
a[i] = 14694295297531861425ULL;
b[i] = -1725558902283030715LL;
c[i] = 4402992416302558097LL;
e[i] = 6297173129107286501ULL;
f[i] = 13865724171235650855ULL;
g[i] = 982871027473857427LL;
h[i] = 8193845517487445944LL;
}
foo ();
for (i = 0; i < 64; i++)
if (d[i] != 8193845517487445944ULL || e[i] != 1
|| g[i] != 4402992416302558097ULL)
__builtin_abort ();
return 0;
}