https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112711
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-11-25
Target Milestone|--- |14.0
Summary|[14 Regression] possibly |[14 Regression] SRA seems
|wrong code in bswap32(int) |to ignore writes when using
|on llvm-16.0.6 test suite |__builtin_assume_aligned
Component|target |tree-optimization
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Keywords| |alias
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It has nothing to do with __builtin_bswap32 really but rather
__builtin_assume_aligned and the memcpy.
SRA does not detect:
_9 = __builtin_assume_aligned (&data, 1);
MEM <unsigned int> [(char * {ref-all})_9] = 3451308718;
_1 = data[0];
The store to _9 as touching data ...