]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: skip runtime.nextFreeFast inlining test on MIPS64x
authorCherry Zhang <cherryyz@google.com>
Fri, 20 Oct 2017 14:53:48 +0000 (10:53 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 20 Oct 2017 20:20:15 +0000 (20:20 +0000)
Since inlining budget calculation is fixed in CL 70151
runtime.nextFreeFast is no longer inlineable on MIPS64x because
it does not support Ctz64 as intrinsic. Skip the test.

Updates #22239.

Change-Id: Id00d55628ddb4b48d27aebfa10377a896765d569
Reviewed-on: https://go-review.googlesource.com/72271
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/inl_test.go

index 3fdbf1e49238b3eb06b04e15ba0811f6cc3db1ae..6c2b7299c2f86a52460a5be5a4afd1e5e4ca38a8 100644 (file)
@@ -135,11 +135,14 @@ func TestIntendedInlining(t *testing.T) {
                },
        }
 
-       if runtime.GOARCH != "386" {
+       if runtime.GOARCH != "386" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" {
                // nextFreeFast calls sys.Ctz64, which on 386 is implemented in asm and is not inlinable.
                // We currently don't have midstack inlining so nextFreeFast is also not inlinable on 386.
-               // So check for it only on non-386 platforms.
+               // On MIPS64x, Ctz64 is not intrinsified and causes nextFreeFast too expensive to inline
+               // (Issue 22239).
                want["runtime"] = append(want["runtime"], "nextFreeFast")
+       }
+       if runtime.GOARCH != "386" {
                // As explained above, Ctz64 and Ctz32 are not Go code on 386.
                // The same applies to Bswap32.
                want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Ctz64")