i386-pf-none-1.c 621 B

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