diff --git a/src/cmd/compile/internal/test/inl_test.go b/src/cmd/compile/internal/test/inl_test.go index 619c57874ffd10c8c798bcf6c880e839dff3694f..091933e1e75ed25ebf20ee1e9710d6cba7facf30 100644 --- a/src/cmd/compile/internal/test/inl_test.go +++ b/src/cmd/compile/internal/test/inl_test.go @@ -284,6 +284,25 @@ func TestIntendedInlining(t *testing.T) { } } + if runtime.GOARCH != "wasm" { + // mutex implementation for multi-threaded GOARCHes + want["runtime"] = append(want["runtime"], + // in the fast paths of lock2 and unlock2 + "key8", + "(*mLockProfile).store", + ) + if bits.UintSize == 64 { + // these use 64-bit arithmetic, which is hard to inline on 32-bit platforms + want["runtime"] = append(want["runtime"], + // in the fast paths of lock2 and unlock2 + "mutexSampleContention", + + // in a slow path of lock2, but within the critical section + "(*mLockProfile).end", + ) + } + } + // Functions that must actually be inlined; they must have actual callers. must := map[string]bool{ "compress/flate.byLiteral.Len": true,