diff options
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/strings.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/codegen/strings.go b/test/codegen/strings.go index 94512f5cd3..f98c062d1b 100644 --- a/test/codegen/strings.go +++ b/test/codegen/strings.go @@ -67,4 +67,14 @@ func ConstantLoad() { bsink = []byte("0123456789ab") } +// self-equality is always true. See issue 60777. +func EqualSelf(s string) bool { + // amd64:`MOVL\t\$1, AX`,-`.*memequal.*` + return s == s +} +func NotEqualSelf(s string) bool { + // amd64:`XORL\tAX, AX`,-`.*memequal.*` + return s != s +} + var bsink []byte |
