cmd/compile: unnecessary copy in regalloc #44670
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
After CLs 297049 and 297050, generate code for shrVU_g in math/big.
The result includes these two instructions:
v121 00026 (+181) LEAQ 1(R10), R8
v107 00027 (181) MOVQ R8, CX
After this, R8 is dead. So this could have just been one instruction,
LEAQ 1(R10), CX
. Here's the relevant block after regalloc:This is the sort of thing a peephole pass could help with (#15300), but maybe now that Values have Uses counts there's a way to detect and improve this in regalloc directly.
cc @randall77 @cherrymui
The text was updated successfully, but these errors were encountered: