You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Result::unwrap_unchecked writes to state_ but also assumes it is always
an Ok value. The optimizer fails to remove branches that construct the
Result currently, but succeeds if we tell it that the state_ is an Ok
value before clobbering it.
Repeat the same thing in Result::unwrap_err_unchecked and in
Option::unwrap_unchecked for good measure.
The difference can be seen in here:
https://godbolt.org/z/Gax47shsb
Without it, the signed code generation is terrible. But with the
optimizer hint, it's as good as working with ints directly.
0 commit comments