https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120712

            Bug ID: 120712
           Summary: how to use __builtin_ia32_prefetchi
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: LYN_2019 at outlook dot com
  Target Milestone: ---

x86_64-linux-g++ -m64 -mprefetchi 

```cpp
void x86_perfchi(void* p) noexcept
{
    __builtin_ia32_prefetchi(p, 0);
}
```

```
<source>: In function 'void x86_perfchi(void*)':
<source>:3:29: warning: instruction prefetch applies when in 64-bit mode with
RIP-relative addressing and option '-mprefetchi'; they stay NOPs otherwise
    3 |     __builtin_ia32_prefetchi(p, 0);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Compiler returned: 0
```

Reply via email to