Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gcc.misc-tests / i386-pf-3dnow-1.c
blob638749a5a6892b764edb5cbaa9970478934ae149
1 /* Test that the correct data prefetch instructions are generated for i386
2 variants that use 3DNow! prefetch instructions. */
4 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
6 extern void exit (int);
8 char *msg = "howdy there";
10 void foo (char *p)
12 __builtin_prefetch (p, 0, 0);
13 __builtin_prefetch (p, 0, 1);
14 __builtin_prefetch (p, 0, 2);
15 __builtin_prefetch (p, 0, 3);
16 __builtin_prefetch (p, 1, 0);
17 __builtin_prefetch (p, 1, 1);
18 __builtin_prefetch (p, 1, 2);
19 __builtin_prefetch (p, 1, 3);
22 int main ()
24 foo (msg);
25 exit (0);
28 /* { dg-final { scan-assembler "prefetch" } } */
29 /* { dg-final { scan-assembler "prefetchw" } } */
30 /* { dg-final { scan-assembler-not "prefetchnta" } } */
31 /* { dg-final { scan-assembler-not "prefetcht" } } */