We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
tip (6f4a458)
Compile this code:
func f(a []int) { for i, x := range a { g(i, x) } } //go:noinline func g(i, x int) {}
It generates
b1: v1 = InitMem <mem> v29 = Arg <int> {a} [8] : a+8[int] v32 = Arg <*int> {a} : a[*int] v6 = LoadReg <int> v29 : AX v33 = TESTQ <flags> v6 v6 GT v33 -> b2 b3 (likely) b2: <- b1 v2 = SP <uintptr> : SP v28 = LoadReg <*int> v32 : CX v11 = MOVQconst <int> [0] : DX Plain -> b4 b4: <- b2 b5 v12 = Phi <*int> v28 v3 : CX v13 = Phi <mem> v1 v21 v16 = Phi <int> v11 v17 : DX v30 = StoreReg <*int> v12 : .autotmp_5[*int] v23 = StoreReg <int> v16 : i[int] v15 = MOVQload <int> v12 v13 : BX v18 = MOVQstore <mem> v2 v16 v13 v20 = MOVQstore <mem> [8] v2 v15 v18 v21 = CALLstatic <mem> {"".g} [16] v20 v26 = LoadReg <*int> v30 : AX v24 = ADDQconst <*int> [8] v26 : AX v19 = LoadReg <int> v23 : CX v27 = ADDQconst <int> [1] v19 : CX v5 = LoadReg <int> v29 : DX v7 = CMPQ <flags> v27 v5 LT v7 -> b5 b3 (likely) b5: <- b4 v17 = Copy <int> v27 : DX v3 = Copy <*int> v24 : CX v4 = LoadReg <int> v29 : AX // <------ this Plain -> b4 b3: <- b1 b4 v31 = Phi <mem> v1 v21 Ret v31
Note v4 loads a value in AX, but it is never used. It would be good not to generate this.
The text was updated successfully, but these errors were encountered:
Pretty sure this is a dup of #14761
Sorry, something went wrong.
CL https://golang.org/cl/38457 mentions this issue.
No branches or pull requests
What version of Go are you using (
go version
)?tip (6f4a458)
Compile this code:
It generates
Note v4 loads a value in AX, but it is never used. It would be good not to generate this.
The text was updated successfully, but these errors were encountered: