summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-1.c
blob: a291dab874e7c7f293927752239603ef2c2cd0eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+%r\[^\n\]+%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+%(?:e|r\[0-9\]+d)\[^\n\]+%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\n\]+%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\n\]+%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 { target ia32 } } } */

#include <x86intrin.h>

__m512i
foo_1 (long long y)
{
  return __extension__ (__m512i)(__v8di){ y, y, y, y, y, y, y, y };
}

__m512i
foo_2 (int y)
{
  return __extension__ (__m512i)(__v16si){ y, y, y, y, y, y, y, y, y,
				      y, y, y, y, y, y, y };
}