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
In builtin StoreFastElementIC_Standard, following code snippet will be generated:
0x7f18e20f0054 e194 00800693 li a3, 8
0x7f18e20f0058 e198 fb843703 ld a4, -72(fp)
0x7f18e20f005c e19c 02d74733 div a4, a4, a3
The code is from a code-assembler API, IntPtrDiv code gen from here and the lowered into Sea-of-Node machine operator Int64Div, which finally lowered by instruction selector into Div64.
But as the code snippet shows, one of its operand, or say the divider, is a constant 8, so we can use shift right to get the same result. It's a strength reduction optimization.
We can check and make the optimization.
The text was updated successfully, but these errors were encountered:
In builtin StoreFastElementIC_Standard, following code snippet will be generated:
The code is from a code-assembler API, IntPtrDiv code gen from here and the lowered into Sea-of-Node machine operator Int64Div, which finally lowered by instruction selector into Div64.
But as the code snippet shows, one of its operand, or say the divider, is a constant 8, so we can use shift right to get the same result. It's a strength reduction optimization.
We can check and make the optimization.
The text was updated successfully, but these errors were encountered: