1/* Test that data prefetch instructions are not generated for i386 variants
2   that do not support those instructions.  */
3
4/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
5/* { dg-require-effective-target ilp32 } */
6
7extern void exit (int);
8
9char *msg = "howdy there";
10
11void foo (char *p)
12{
13  __builtin_prefetch (p, 0, 0);
14  __builtin_prefetch (p, 0, 1);
15  __builtin_prefetch (p, 0, 2);
16  __builtin_prefetch (p, 0, 3);
17  __builtin_prefetch (p, 1, 0);
18  __builtin_prefetch (p, 1, 1);
19  __builtin_prefetch (p, 1, 2);
20  __builtin_prefetch (p, 1, 3);
21}
22
23int main ()
24{
25  foo (msg);
26  exit (0);
27}
28
29/* { dg-final { scan-assembler-not "fetch" } } */
30