Skip to content

Commit d3d21d0

Browse files
committed
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 <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 28a55d0 commit d3d21d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ func TestIntendedInlining(t *testing.T) {
155155
},
156156
}
157157

158-
if runtime.GOARCH != "386" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" {
158+
if runtime.GOARCH != "386" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" && runtime.GOARCH != "riscv64" {
159159
// nextFreeFast calls sys.Ctz64, which on 386 is implemented in asm and is not inlinable.
160160
// We currently don't have midstack inlining so nextFreeFast is also not inlinable on 386.
161-
// On MIPS64x, Ctz64 is not intrinsified and causes nextFreeFast too expensive to inline
162-
// (Issue 22239).
161+
// On mips64x and riscv64, Ctz64 is not intrinsified and causes nextFreeFast too expensive
162+
// to inline (Issue 22239).
163163
want["runtime"] = append(want["runtime"], "nextFreeFast")
164164
}
165165
if runtime.GOARCH != "386" {
@@ -175,7 +175,7 @@ func TestIntendedInlining(t *testing.T) {
175175
}
176176

177177
switch runtime.GOARCH {
178-
case "386", "wasm", "arm", "riscv64":
178+
case "386", "wasm", "arm":
179179
default:
180180
// TODO(mvdan): As explained in /test/inline_sync.go, some
181181
// architectures don't have atomic intrinsics, so these go over

0 commit comments

Comments
 (0)