blob: e05ce9c733d41944f1cd803cfb5f9bf5a7a512b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* { dg-do compile { target { ia32 } } } */
/* { dg-options "-mprefetchi -O2" } */
/* { dg-final { scan-assembler-not "\[ \\t\]+prefetchit0" } } */
/* { dg-final { scan-assembler-not "\[ \\t\]+prefetchit1" } } */
#include <x86intrin.h>
int
bar (int a)
{
return a + 1;
}
int
foo1 (int b)
{
__builtin_ia32_prefetch (bar, 0, 3, 1); /* { dg-warning "instruction prefetch applies when in 64-bit mode with RIP-relative addressing and option '-mprefetchi'; they stay NOPs otherwise" } */
return bar (b) + 1;
}
int
foo2 (int b)
{
__builtin_ia32_prefetchi (bar, 2); /* { dg-warning "instruction prefetch applies when in 64-bit mode with RIP-relative addressing and option '-mprefetchi'; they stay NOPs otherwise" } */
return bar (b) + 1;
}
|