3 ms·
These 3 examples optimize to the the same thing because they generate identical instructions: https://godbolt.org/z/a1Yq9rceE https://godbolt.org/z/a1Yq9rceE
by 1letterunixname 3y ago
These 3 examples optimize to the the same thing because they generate identical instructions:
https://godbolt.org/z/a1Yq9rceE 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.