1// asmcheck
2
3// Copyright 2022 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package codegen
8
9type I interface{ M() }
10
11func NopConvertIface(x I) I {
12	// amd64:-`.*runtime.convI2I`
13	return I(x)
14}
15
16func NopConvertGeneric[T any](x T) T {
17	// amd64:-`.*runtime.convI2I`
18	return T(x)
19}
20
21var NopConvertGenericIface = NopConvertGeneric[I]
22
23func ConvToM(x any) I {
24	// amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(.*\)`,`MOVQ\t8\(.*\)(.*\*1)`
25	// arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU`,`MOVD\t\(R.*\)\(R.*\)`
26	return x.(I)
27}
28