From: Joel Sing Date: Mon, 13 Apr 2020 16:36:36 +0000 (+1000) Subject: cmd/compile: update TestIntendedInlining for riscv64 X-Git-Tag: go1.15beta1~576 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d3d21d0a4280444dd1d093eb73596a7326c0a651;p=gostls13.git cmd/compile: update TestIntendedInlining for riscv64 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 Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/gc/inl_test.go b/src/cmd/compile/internal/gc/inl_test.go index c8521e584d..9d3b8c59fd 100644 --- a/src/cmd/compile/internal/gc/inl_test.go +++ b/src/cmd/compile/internal/gc/inl_test.go @@ -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