Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: bug in spill sinking #20472
What version of Go are you using (
I think I see what is going wrong.
To decide whether we need to move/copy the spill v403 to an exit, we need to know whether the value is live at that exit. Unfortunately, we conflate uses of v403 with uses of v395. At the exit in question, v395 is live but v403 isn't. So we move the spill v403 to that exit, even though it isn't needed there. Even worse, spill location assigned to v403 is by this point used by another spill.
I think we just have to be more careful about only using the spilled value when computing liveness, not the orig of that value. I'll see if I can whip up a CL tonight.