mirror of
https://github.com/golang/go
synced 2024-11-23 18:50:05 -07:00
cmd/compile: fix incorrect go:noinline usage
This pragma is not actually honored by the compiler. The tests implicitly relied on the inliner being unable to inline closures with captured variables, which will soon change. Fixes #22208 Change-Id: I13abc9c930b9156d43ec216f8efb768952a29439 Reviewed-on: https://go-review.googlesource.com/73211 Reviewed-by: Michael Munday <mike.munday@ibm.com>
This commit is contained in:
parent
eac6fe082b
commit
3c46f49f94
@ -242,7 +242,7 @@ var allAsmTests = []*asmTests{
|
|||||||
{
|
{
|
||||||
arch: "arm",
|
arch: "arm",
|
||||||
os: "linux",
|
os: "linux",
|
||||||
imports: []string{"math/bits"},
|
imports: []string{"math/bits", "runtime"},
|
||||||
tests: linuxARMTests,
|
tests: linuxARMTests,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1020,12 +1020,11 @@ var linuxAMD64Tests = []*asmTest{
|
|||||||
// make sure assembly output has matching offset and base register.
|
// make sure assembly output has matching offset and base register.
|
||||||
fn: `
|
fn: `
|
||||||
func f72(a, b int) int {
|
func f72(a, b int) int {
|
||||||
//go:noinline
|
runtime.GC() // use some frame
|
||||||
func() {_, _ = a, b} () // use some frame
|
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
pos: []string{"b\\+40\\(SP\\)"},
|
pos: []string{"b\\+24\\(SP\\)"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// check load combining
|
// check load combining
|
||||||
@ -1803,8 +1802,7 @@ var linuxARMTests = []*asmTest{
|
|||||||
// make sure assembly output has matching offset and base register.
|
// make sure assembly output has matching offset and base register.
|
||||||
fn: `
|
fn: `
|
||||||
func f13(a, b int) int {
|
func f13(a, b int) int {
|
||||||
//go:noinline
|
runtime.GC() // use some frame
|
||||||
func() {_, _ = a, b} () // use some frame
|
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
Loading…
Reference in New Issue
Block a user