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
Instead of moving %a3 on top of the stack, popping it, and then subtracting, subtracting and then cleaning up would result in better assembly:
JUMPDEST
SUB
SWAP1
POP
SWAP1
JUMP
Other examples showing the same pattern can be found in test/CodeGen/EVM/stack-ops.ll and test/CodeGen/EVM/stack-ops-commutable.ll (e.g. same_arg_alive_with_junk).
The text was updated successfully, but these errors were encountered:
It looks like stackification attempts to clean up the stack before doing computations. Consider the following example:
Instead of moving
%a3
on top of the stack, popping it, and then subtracting, subtracting and then cleaning up would result in better assembly:Other examples showing the same pattern can be found in
test/CodeGen/EVM/stack-ops.ll
andtest/CodeGen/EVM/stack-ops-commutable.ll
(e.g.same_arg_alive_with_junk
).The text was updated successfully, but these errors were encountered: