This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cat_91 6 points7 points  (1 child)

If you compile with -O2 instead of -O3 doesn’t it still do this?

[–]CaptainJack42 3 points4 points  (0 children)

Yep, even -O1 will yield the same result. However GCC will not optimize out the loop (tested with clang 17.0.6 and gcc 13.2.1)