Re:Push ifs up and fors down
by 1letterunixname on Wednesday November 15, 2023 @08:21PM
(#38284777)
These 3 examples optimize to the the same thing because they generate identical instructions:
https://godbolt.org/z/a1Yq9rceE
Note: Inverting and rearranging conditions changes what LLVM decides to output, sometimes for the worse. --opt-level=s is counterproductive here.
For instance