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
This generates simpler code by omitting branches and replacing shr with sar. The compiler cannot reason as well as you might think in this situation, it does indeed introduce branches in both cases in the extent code. This change should behave exactly the same but be simpler code and possibly a little bit faster. Someone should go through all such sign-extension logic on instruction decoding operations and apply such fixes.
The text was updated successfully, but these errors were encountered:
I am at a bit of an impass. I like the code the way you put it better, but doing optimizations takes the code from 15036 compiled to the same size for the second optimization (And appears to be the same code)... and if I do the first optimization, the code 15148 bytes!! And diffing the .lst's, I can't even figure out why. The compiler just like loses its mind when it goes through a signed typecast.
The first seems like it should be such an obvious win, but the compiler's fighting me and it's got hands.
Your code contains several parts that looks like:
or
but this could instead be:
and
respectively.
This generates simpler code by omitting branches and replacing
shr
withsar
. The compiler cannot reason as well as you might think in this situation, it does indeed introduce branches in both cases in the extent code. This change should behave exactly the same but be simpler code and possibly a little bit faster. Someone should go through all such sign-extension logic on instruction decoding operations and apply such fixes.The text was updated successfully, but these errors were encountered: