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
{{ message }}
Repository navigation
cmd/compile: inlining blocks integer range optimization #74915
If, however, I manually inline the gte4 and lt20 functions the result is more optimal:
00006 SUB $4, R0, R3
00007 CMP $16, R3
00008 BHS 11
00009 MOVD R1, R0
00010 RET
00011 MOVD R2, R0
00012 RET
After a bit of investigation it turns out this is because the InlMark op has a memory argument which currently prevents speculative execution of any block containing it. That in turn blocks the integer range check optimisation. I will send a fix.
Activity
gopherbot commentedon Aug 6, 2025
Change https://go.dev/cl/693795 mentions this issue:
cmd/compile: allow InlMark operations to be speculatively executed