https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127363
Bug ID: 127363
Summary: auto vectorize remove __builtin_assoc_barrier
Product: gcc
Version: 16.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: z00823823 at outlook dot com
Target Milestone: ---
```c++
void round_values(float* values) {
constexpr float big = 0x1p24f;
for (int i = 0; i < 8; ++i) {
values[i] = __builtin_assoc_barrier(values[i] + big) - big;
}
}
```
this code compiles to nothing due to auto vectorize under `-ffast-math -O2`.
adding `-fno-tree-vectorize` fix it.
https://gcc.godbolt.org/z/h44s9nfPW