Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile/internal/ssa: regalloc handles arguments poorly #14597
compiling this function with SSA
produces this output after regalloc
v34(len(src)) and v39(ptr(src)) both get loaded inside the loop body, even though their assigned registers are free for the entire function. I suspect it's because Arg values are handled as pre-spilled.
Weird. I just tried
and that produces a load into y which is registerized across the entire function. If you make