[Bug target/84786] [miscompilation] vunpcklpd accessing xmm16-22 targeting KNL
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 12 09:48:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84786
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simplified testcase for the testsuite:
/* PR target/84786 */
/* { dg-do run } */
/* { dg-options "-mavx512f -mno-avx512vl -O2" } */
/* { dg-require-effective-target avx512f } */
#include "avx512f-check.h"
typedef double V __attribute__((vector_size (16)));
__attribute__((noipa)) V
foo (V x, double y)
{
register double z __asm ("xmm18");
asm volatile ("" : "=v" (z) : "0" (y));
x[1] = z;
return x;
}
static void
avx512f_test (void)
{
V a = foo ((V) { 1.0, 2.0 }, 3.0);
if (a[0] != 1.0 || a[1] != 3.0)
abort ();
}
Now, the hard part is look around for similar issues (I've done it already at
some point, but this case apparently went unnoticed).
More information about the Gcc-bugs
mailing list