]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: update TestIntendedInlining for riscv64
authorJoel Sing <joel@sing.id.au>
Mon, 13 Apr 2020 16:36:36 +0000 (02:36 +1000)
committerJoel Sing <joel@sing.id.au>
Mon, 13 Apr 2020 17:29:23 +0000 (17:29 +0000)
Mark nextFreeFast as not inline, as it is too expensive to inline on riscv64.
Also remove riscv64 from non-atomic inline architectures, as we now have
atomic intrisics.

Updates #22239

Change-Id: I6e0e72c1192070e39f065bee486f48df4cc74b35
Reviewed-on: https://go-review.googlesource.com/c/go/+/227808
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/inl_test.go

index c8521e584dc99e330093bbe1373577f71619a62a..9d3b8c59fd6ec52f0cbf0cda8bf06ee385bdd221 100644 (file)
@@ -155,11 +155,11 @@ func TestIntendedInlining(t *testing.T) {
                },
        }
 
-       if runtime.GOARCH != "386" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" {
+       if runtime.GOARCH != "386" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" && runtime.GOARCH != "riscv64" {
                // 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.
-               // On MIPS64x, Ctz64 is not intrinsified and causes nextFreeFast too expensive to inline
-               // (Issue 22239).
+               // On mips64x and riscv64, Ctz64 is not intrinsified and causes nextFreeFast too expensive
+               // to inline (Issue 22239).
                want["runtime"] = append(want["runtime"], "nextFreeFast")
        }
        if runtime.GOARCH != "386" {
@@ -175,7 +175,7 @@ func TestIntendedInlining(t *testing.T) {
        }
 
        switch runtime.GOARCH {
-       case "386", "wasm", "arm", "riscv64":
+       case "386", "wasm", "arm":
        default:
                // TODO(mvdan): As explained in /test/inline_sync.go, some
                // architectures don't have atomic intrinsics, so these go over