https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110249
--- Comment #4 from David Brown ---
Yes, __builtin_assume_aligned is the best way to write things in this
particular case (and optimises fine for -O1 and -O2). It is also clearer in
the source code (IMHO), as it shows the programmer's
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110249
--- Comment #3 from Richard Biener ---
We could pattern-match this to
p = __builtin_assume_aligned (p, 8);
which is btw the better way to write this.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110249
--- Comment #2 from David Brown ---
My apologies - it does not optimise the code to a single aligned load at -O1
(at least, not with the combinations I have now tried). The code was
originally C++, with a reference, which /does/ exhibit this
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110249
Alexander Monakov changed:
What|Removed |Added
CC||amonakov at gcc dot gnu.org
---